From 2eda61931e4b311cc00c58711ada623b4c87345f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 08:37:47 +0900 Subject: [PATCH 1/7] Disable checking for XMMS by default. I got tired of seeing the noise about XMMS' config script not being installed making it seem like XMMS is important to QF. It might be useful, but it's certainly not important enoug for a scary looking message. --- config.d/cdrom.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.d/cdrom.m4 b/config.d/cdrom.m4 index fa2362709..7abb70e4e 100644 --- a/config.d/cdrom.m4 +++ b/config.d/cdrom.m4 @@ -4,9 +4,9 @@ dnl ================================================================== dnl XMMS Checks AC_ARG_ENABLE(xmms, -[ --disable-xmms disable checking for XMMS], +[ --enable-xmms enable checking for XMMS], ) -if test "x$mingw" != xyes -a "x$enable_xmms" != xno; then +if test "x$mingw" != xyes -a "x$enable_xmms" == xyes; then AM_PATH_XMMS(0.9.5.1, HAVE_XMMS=yes, HAVE_XMMS=no) From 995a8d3e4e9d3fb177be5753f086961877c212bd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 08:51:29 +0900 Subject: [PATCH 2/7] Don't use assembly code for SV_HullPointContents. This is the only assembly code dependent on the size of dclipnode_t. Removing it paves the way for fixing clipnodes in large maps. --- include/QF/bspfile.h | 1 - include/asm_i386.h | 10 --- nq/source/Makefile.am | 13 +--- nq/source/world.c | 6 +- nq/source/worlda.S | 150 ------------------------------------------ qw/source/Makefile.am | 18 ++--- qw/source/world.c | 6 +- qw/source/worlda.S | 150 ------------------------------------------ 8 files changed, 11 insertions(+), 343 deletions(-) delete mode 100644 nq/source/worlda.S delete mode 100644 qw/source/worlda.S diff --git a/include/QF/bspfile.h b/include/QF/bspfile.h index 5addb86c6..88397c972 100644 --- a/include/QF/bspfile.h +++ b/include/QF/bspfile.h @@ -157,7 +157,6 @@ typedef struct dplane_s { #define CONTENTS_CURRENT_DOWN -14 -// !!! if this is changed, it must be changed in asm_i386.h too !!! typedef struct dnode_s { int32_t planenum; int16_t children[2]; // negative numbers are -(leafs+1), not nodes diff --git a/include/asm_i386.h b/include/asm_i386.h index 22ea6f417..9a2665422 100644 --- a/include/asm_i386.h +++ b/include/asm_i386.h @@ -67,14 +67,4 @@ #define hu_clip_maxs 28 #define hu_size 40 -// dnode_t structure -// !!! if this is changed, it must be changed in bspfile.h too !!! -#define nd_planenum 0 -#define nd_children 4 -#define nd_mins 8 -#define nd_maxs 20 -#define nd_firstface 32 -#define nd_numfaces 36 -#define nd_size 40 - #endif diff --git a/nq/source/Makefile.am b/nq/source/Makefile.am index eb71cceb9..83738a91d 100644 --- a/nq/source/Makefile.am +++ b/nq/source/Makefile.am @@ -44,17 +44,9 @@ bin_PROGRAMS= @NQ_TARGETS@ EXTRA_PROGRAMS= nq-fbdev nq-glx nq-mgl nq-sdl nq-sdl32 nq-sgl nq-svga nq-3dfx \ nq-wgl nq-x11 nq-server -if ASM_ARCH -asm= libasm.a -else -asm= -endif +noinst_LIBRARIES= @nq_libs@ +EXTRA_LIBRARIES=libnq_client.a libnq_common.a libnq_sdl.a libnq_server.a -noinst_LIBRARIES= @nq_libs@ $(asm) -EXTRA_LIBRARIES=libasm.a libnq_client.a libnq_common.a libnq_sdl.a libnq_server.a - -libasm_a_SOURCES= worlda.S -libasm_la_CCASFLAGS=@PREFER_NON_PIC@ libnq_common_a_SOURCES=game.c world.c com.c libnq_sdl_a_SOURCES= sys_sdl.c libnq_sdl_a_CFLAGS= $(SDL_CFLAGS) @@ -75,7 +67,6 @@ server_LIBFILES= \ $(top_builddir)/libs/models/libQFmodels.la common_LIBFILES= \ - $(asm) \ $(top_builddir)/libs/net/libnet_main.la \ $(top_builddir)/libs/console/libQFconsole.la \ $(top_builddir)/libs/gamecode/builtins/libQFgamecode_builtins.la \ diff --git a/nq/source/world.c b/nq/source/world.c index d617af55a..e38f59946 100644 --- a/nq/source/world.c +++ b/nq/source/world.c @@ -431,7 +431,6 @@ SV_LinkEdict (edict_t *ent, qboolean touch_triggers) /* POINT TESTING IN HULLS */ -#ifndef USE_INTEL_ASM int SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { @@ -440,8 +439,8 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) mplane_t *plane; while (num >= 0) { - if (num < hull->firstclipnode || num > hull->lastclipnode) - Sys_Error ("SV_HullPointContents: bad node number"); + //if (num < hull->firstclipnode || num > hull->lastclipnode) + // Sys_Error ("SV_HullPointContents: bad node number"); node = hull->clipnodes + num; plane = hull->planes + node->planenum; @@ -458,7 +457,6 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) return num; } -#endif // !USE_INTEL_ASM int SV_PointContents (const vec3_t p) diff --git a/nq/source/worlda.S b/nq/source/worlda.S deleted file mode 100644 index cb06d4868..000000000 --- a/nq/source/worlda.S +++ /dev/null @@ -1,150 +0,0 @@ -/* - worlda.S - - x86 assembly-language server testing stuff - - Copyright (C) 1996-1997 Id Software, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to: - - Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307, USA - - $Id$ -*/ - -#ifdef HAVE_CONFIG_H -# include -#endif -#include "asm_i386.h" -//#include "quakeasm.h" -//include "d_ifacea.h" - -#ifdef USE_INTEL_ASM - - .data - -Ltemp: .long 0 - - .text - -//---------------------------------------------------------------------- -// hull-point test -//---------------------------------------------------------------------- - -#define hull 4+8 // because only partially pushed -#define num 8+4 // because only partially pushed -#define p 12+12 // because only partially pushed - - .align 4 -.globl C(SV_HullPointContents) -C(SV_HullPointContents): - pushl %edi // preserve register variables - movl num(%esp),%eax - testl %eax,%eax - js Lhquickout - -// float d; -// dclipnode_t *node; -// mplane_t *plane; - - pushl %ebx - movl hull(%esp),%ebx - - pushl %ebp - movl p(%esp),%edx - - movl hu_clipnodes(%ebx),%edi - movl hu_planes(%ebx),%ebp - - subl %ebx,%ebx - pushl %esi - -// %ebx: 0 -// %eax: num -// %edx: p -// %edi: hull->clipnodes -// %ebp: hull->planes - -// while (num >= 0) -// { - -Lhloop: - -// node = hull->clipnodes + num; -// plane = hull->planes + node->planenum; -// !!! if the size of dclipnode_t changes, the scaling of %eax needs to be -// changed !!! - movl nd_planenum(%edi,%eax,8),%ecx - movl nd_children(%edi,%eax,8),%eax - movl %eax,%esi - rorl $16,%eax - leal (%ecx,%ecx,4),%ecx - -// if (plane->type < 3) -// d = p[plane->type] - plane->dist; - movb pl_type(%ebp,%ecx,4),%bl - cmpb $3,%bl - jb Lnodot - -// else -// d = DotProduct (plane->normal, p) - plane->dist; - flds pl_normal(%ebp,%ecx,4) - fmuls 0(%edx) - flds pl_normal+4(%ebp,%ecx,4) - fmuls 4(%edx) - flds pl_normal+8(%ebp,%ecx,4) - fmuls 8(%edx) - fxch %st(1) - faddp %st(0),%st(2) - faddp %st(0),%st(1) - fsubs pl_dist(%ebp,%ecx,4) - jmp Lsub - -Lnodot: - flds pl_dist(%ebp,%ecx,4) - fsubrs (%edx,%ebx,4) - -Lsub: - sarl $16,%eax - sarl $16,%esi - -// if (d < 0) -// num = node->children[1]; -// else -// num = node->children[0]; - fstps Ltemp - movl Ltemp,%ecx - sarl $31,%ecx - andl %ecx,%esi - xorl $0xFFFFFFFF,%ecx - andl %ecx,%eax - orl %esi,%eax - jns Lhloop - -// return num; -Lhdone: - popl %esi - popl %ebp - popl %ebx // restore register variables - -Lhquickout: - popl %edi - - ret - -#endif // USE_INTEL_ASM - diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index 2ad3da7b9..d3e34bd20 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -45,18 +45,10 @@ EXTRA_PROGRAMS= qw-client-fbdev qw-client-glx qw-client-mgl qw-client-sdl \ qw-client-sdl32 qw-client-sgl qw-client-svga qw-client-3dfx \ qw-client-wgl qw-client-x11 qw-server qw-master -if ASM_ARCH -asm= libasm.a -else -asm= -endif - -noinst_LIBRARIES= @qw_libs@ $(asm) -EXTRA_LIBRARIES=libasm.a libqw_client.a libqw_common.a libqw_sdl.a libqw_server.a +noinst_LIBRARIES= @qw_libs@ +EXTRA_LIBRARIES=libqw_client.a libqw_common.a libqw_sdl.a libqw_server.a -libasm_a_SOURCES= worlda.S -libasm_la_CCASFLAGS=@PREFER_NON_PIC@ libqw_common_a_SOURCES=\ com.c game.c map_cfg.c pmove.c pmovetst.c net_packetlog.c libqw_sdl_a_SOURCES=cl_sys_sdl.c @@ -93,9 +85,9 @@ qw_server_LIBS= \ $(top_builddir)/libs/util/libQFutil.la qw_server_SOURCES= -qw_server_LDADD= libqw_server.a libqw_common.a $(asm) $(qw_server_LIBS) $(NET_LIBS) $(DL_LIBS) $(CURSES_LIBS) +qw_server_LDADD= libqw_server.a libqw_common.a $(qw_server_LIBS) $(NET_LIBS) $(DL_LIBS) $(CURSES_LIBS) qw_server_LDFLAGS= $(common_ldflags) -qw_server_DEPENDENCIES= libqw_common.a libqw_server.a $(asm) $(qw_server_LIBS) +qw_server_DEPENDENCIES= libqw_common.a libqw_server.a $(qw_server_LIBS) qw_master_SOURCES= master.c qw_master_LDADD= $(top_builddir)/libs/util/libQFutil.la $(NET_LIBS) @@ -118,7 +110,7 @@ qw_client_LIBS= \ $(top_builddir)/libs/util/libQFutil.la \ $(top_builddir)/libs/gib/libQFgib.la -client_LIBS= $(asm) $(qw_client_LIBS) +client_LIBS= $(qw_client_LIBS) client_libs= libqw_client.a libqw_common.a libqw_client_a_SOURCES= \ diff --git a/qw/source/world.c b/qw/source/world.c index 09e4efc3f..7bff06369 100644 --- a/qw/source/world.c +++ b/qw/source/world.c @@ -419,7 +419,6 @@ SV_LinkEdict (edict_t *ent, qboolean touch_triggers) /* POINT TESTING IN HULLS */ -#ifndef USE_INTEL_ASM int SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { @@ -428,8 +427,8 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) mplane_t *plane; while (num >= 0) { - if (num < hull->firstclipnode || num > hull->lastclipnode) - Sys_Error ("SV_HullPointContents: bad node number"); + //if (num < hull->firstclipnode || num > hull->lastclipnode) + // Sys_Error ("SV_HullPointContents: bad node number"); node = hull->clipnodes + num; plane = hull->planes + node->planenum; @@ -446,7 +445,6 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) return num; } -#endif // !USE_INTEL_ASM int SV_PointContents (const vec3_t p) diff --git a/qw/source/worlda.S b/qw/source/worlda.S deleted file mode 100644 index cb06d4868..000000000 --- a/qw/source/worlda.S +++ /dev/null @@ -1,150 +0,0 @@ -/* - worlda.S - - x86 assembly-language server testing stuff - - Copyright (C) 1996-1997 Id Software, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to: - - Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307, USA - - $Id$ -*/ - -#ifdef HAVE_CONFIG_H -# include -#endif -#include "asm_i386.h" -//#include "quakeasm.h" -//include "d_ifacea.h" - -#ifdef USE_INTEL_ASM - - .data - -Ltemp: .long 0 - - .text - -//---------------------------------------------------------------------- -// hull-point test -//---------------------------------------------------------------------- - -#define hull 4+8 // because only partially pushed -#define num 8+4 // because only partially pushed -#define p 12+12 // because only partially pushed - - .align 4 -.globl C(SV_HullPointContents) -C(SV_HullPointContents): - pushl %edi // preserve register variables - movl num(%esp),%eax - testl %eax,%eax - js Lhquickout - -// float d; -// dclipnode_t *node; -// mplane_t *plane; - - pushl %ebx - movl hull(%esp),%ebx - - pushl %ebp - movl p(%esp),%edx - - movl hu_clipnodes(%ebx),%edi - movl hu_planes(%ebx),%ebp - - subl %ebx,%ebx - pushl %esi - -// %ebx: 0 -// %eax: num -// %edx: p -// %edi: hull->clipnodes -// %ebp: hull->planes - -// while (num >= 0) -// { - -Lhloop: - -// node = hull->clipnodes + num; -// plane = hull->planes + node->planenum; -// !!! if the size of dclipnode_t changes, the scaling of %eax needs to be -// changed !!! - movl nd_planenum(%edi,%eax,8),%ecx - movl nd_children(%edi,%eax,8),%eax - movl %eax,%esi - rorl $16,%eax - leal (%ecx,%ecx,4),%ecx - -// if (plane->type < 3) -// d = p[plane->type] - plane->dist; - movb pl_type(%ebp,%ecx,4),%bl - cmpb $3,%bl - jb Lnodot - -// else -// d = DotProduct (plane->normal, p) - plane->dist; - flds pl_normal(%ebp,%ecx,4) - fmuls 0(%edx) - flds pl_normal+4(%ebp,%ecx,4) - fmuls 4(%edx) - flds pl_normal+8(%ebp,%ecx,4) - fmuls 8(%edx) - fxch %st(1) - faddp %st(0),%st(2) - faddp %st(0),%st(1) - fsubs pl_dist(%ebp,%ecx,4) - jmp Lsub - -Lnodot: - flds pl_dist(%ebp,%ecx,4) - fsubrs (%edx,%ebx,4) - -Lsub: - sarl $16,%eax - sarl $16,%esi - -// if (d < 0) -// num = node->children[1]; -// else -// num = node->children[0]; - fstps Ltemp - movl Ltemp,%ecx - sarl $31,%ecx - andl %ecx,%esi - xorl $0xFFFFFFFF,%ecx - andl %ecx,%eax - orl %esi,%eax - jns Lhloop - -// return num; -Lhdone: - popl %esi - popl %ebp - popl %ebx // restore register variables - -Lhquickout: - popl %edi - - ret - -#endif // USE_INTEL_ASM - From 763ae7133505732eb738fbe2ea3a1e5f7c8662c6 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 09:03:56 +0900 Subject: [PATCH 3/7] Remove the hull_t defines. Nothing uses them... --- include/QF/model.h | 1 - include/asm_i386.h | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/include/QF/model.h b/include/QF/model.h index 67790253f..ff2cb2a33 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -199,7 +199,6 @@ typedef struct mleaf_s byte ambient_sound_level[NUM_AMBIENTS]; } mleaf_t; -// !!! if this is changed, it must be changed in asm_i386.h too !!! typedef struct hull_s { dclipnode_t *clipnodes; diff --git a/include/asm_i386.h b/include/asm_i386.h index 9a2665422..515cb2085 100644 --- a/include/asm_i386.h +++ b/include/asm_i386.h @@ -57,14 +57,4 @@ #define pl_pad 18 #define pl_size 20 -// hull_t structure -// !!! if this is changed, it must be changed in model.h too !!! -#define hu_clipnodes 0 -#define hu_planes 4 -#define hu_firstclipnode 8 -#define hu_lastclipnode 12 -#define hu_clip_mins 16 -#define hu_clip_maxs 28 -#define hu_size 40 - #endif From 85c693d2b8aa1b0ad46bd965c0f15add20e1d16e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 09:34:11 +0900 Subject: [PATCH 4/7] whitespace --- include/QF/model.h | 60 ++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/include/QF/model.h b/include/QF/model.h index ff2cb2a33..a76c649e7 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -53,8 +53,7 @@ // BRUSH MODELS =============================================================== -typedef struct efrag_s -{ +typedef struct efrag_s { struct mleaf_s *leaf; struct efrag_s *leafnext; struct entity_s *entity; @@ -65,13 +64,11 @@ typedef struct efrag_s // in memory representation =================================================== // !!! if this is changed, it must be changed in asm_draw.h too !!! -typedef struct -{ +typedef struct { vec3_t position; } mvertex_t; -typedef struct texture_s -{ +typedef struct texture_s { char name[16]; unsigned int width, height; int gl_texturenum; @@ -99,14 +96,12 @@ typedef struct texture_s #define SURF_LIGHTBOTHSIDES 0x800 // !!! if this is changed, it must be changed in asm_draw.h too !!! -typedef struct -{ +typedef struct { unsigned short v[2]; unsigned int cachededgeoffset; } medge_t; -typedef struct -{ +typedef struct { float vecs[2][4]; float mipadjust; texture_t *texture; @@ -115,8 +110,7 @@ typedef struct #define VERTEXSIZE 7 -typedef struct glpoly_s -{ +typedef struct glpoly_s { struct glpoly_s *next; struct glpoly_s *chain; struct glpoly_s *fb_chain; @@ -125,8 +119,7 @@ typedef struct glpoly_s float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2) } glpoly_t; -typedef struct msurface_s -{ +typedef struct msurface_s { int visframe; // should be drawn when node is crossed mplane_t *plane; @@ -159,8 +152,7 @@ typedef struct msurface_s byte *samples; // [numstyles*surfsize] } msurface_t; -typedef struct mnode_s -{ +typedef struct mnode_s { // common with leaf int contents; // 0, to differentiate from leafs int visframe; // node needs to be traversed if current @@ -177,8 +169,7 @@ typedef struct mnode_s unsigned short numsurfaces; } mnode_t; -typedef struct mleaf_s -{ +typedef struct mleaf_s { // common with node int contents; // wil be a negative contents number int visframe; // node needs to be traversed if current @@ -199,8 +190,7 @@ typedef struct mleaf_s byte ambient_sound_level[NUM_AMBIENTS]; } mleaf_t; -typedef struct hull_s -{ +typedef struct hull_s { dclipnode_t *clipnodes; mplane_t *planes; int firstclipnode; @@ -212,8 +202,7 @@ typedef struct hull_s // SPRITE MODELS ============================================================== // FIXME: shorten these? -typedef struct mspriteframe_s -{ +typedef struct mspriteframe_s { int width; int height; float up, down, left, right; @@ -221,21 +210,18 @@ typedef struct mspriteframe_s int gl_texturenum; } mspriteframe_t; -typedef struct -{ +typedef struct { int numframes; float *intervals; mspriteframe_t *frames[1]; } mspritegroup_t; -typedef struct -{ +typedef struct { spriteframetype_t type; mspriteframe_t *frameptr; } mspriteframedesc_t; -typedef struct -{ +typedef struct { int type; int maxwidth; int maxheight; @@ -250,8 +236,7 @@ typedef struct // Alias models are position independent, so the cache manager can move them. // NOTE: the first three lines must match maliasgroupframedesc_t -typedef struct -{ +typedef struct { trivertx_t bboxmin; trivertx_t bboxmax; int frame; @@ -262,30 +247,26 @@ typedef struct char name[16]; } maliasframedesc_t; -typedef struct -{ +typedef struct { aliasskintype_t type; int skin; int texnum; int fb_texnum; } maliasskindesc_t; -typedef struct -{ +typedef struct { trivertx_t bboxmin; trivertx_t bboxmax; int frame; } maliasgroupframedesc_t; -typedef struct -{ +typedef struct { int numframes; int intervals; maliasgroupframedesc_t frames[1]; } maliasgroup_t; -typedef struct -{ +typedef struct { int numskins; int intervals; maliasskindesc_t skindescs[1]; @@ -339,8 +320,7 @@ typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t; #define EF_TRACER3 128 // purple trail #define EF_GLOWTRAIL 4096 // glowcolor particle trail -typedef struct model_s -{ +typedef struct model_s { char name[MAX_QPATH]; qboolean needload; // bmodels and sprites don't cache normally qboolean hasfullbrights; From 8831a109a4c0a92e3d7736252fb1326e7cefd48a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 09:36:21 +0900 Subject: [PATCH 5/7] Create and use mclipnode_t. I didn't realize this was a critical part of fitzquake's large map support. This should fix the non-solid brush entities in Conflagrant Rodent. --- include/QF/model.h | 9 +++++++-- include/world.h | 2 +- libs/models/brush/model_brush.c | 5 +++-- libs/models/clip_hull.c | 6 +++--- libs/models/trace.c | 2 +- nq/source/world.c | 6 +++--- qw/source/pmovetst.c | 6 +++--- qw/source/world.c | 6 +++--- 8 files changed, 24 insertions(+), 18 deletions(-) diff --git a/include/QF/model.h b/include/QF/model.h index a76c649e7..86c098c02 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -190,8 +190,13 @@ typedef struct mleaf_s { byte ambient_sound_level[NUM_AMBIENTS]; } mleaf_t; +typedef struct mclipnode_s { + int planenum; + int children[2]; +} mclipnode_t; + typedef struct hull_s { - dclipnode_t *clipnodes; + mclipnode_t *clipnodes; mplane_t *planes; int firstclipnode; int lastclipnode; @@ -376,7 +381,7 @@ typedef struct model_s { int *surfedges; int numclipnodes; - dclipnode_t *clipnodes; + mclipnode_t *clipnodes; int nummarksurfaces; msurface_t **marksurfaces; diff --git a/include/world.h b/include/world.h index 62c08bfbf..a641eaa79 100644 --- a/include/world.h +++ b/include/world.h @@ -71,7 +71,7 @@ typedef struct areanode_s { extern areanode_t sv_areanodes[AREA_NODES]; -void SV_InitHull (hull_t *hull, dclipnode_t *clipnodes, mplane_t *planes); +void SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes); void SV_ClearWorld (void); // called after the world model has been loaded, before linking any entities diff --git a/libs/models/brush/model_brush.c b/libs/models/brush/model_brush.c index f61c03d17..aba444a10 100644 --- a/libs/models/brush/model_brush.c +++ b/libs/models/brush/model_brush.c @@ -685,7 +685,8 @@ Mod_LoadLeafs (bsp_t *bsp) static void Mod_LoadClipnodes (bsp_t *bsp) { - dclipnode_t *in, *out; + dclipnode_t *in; + mclipnode_t *out; hull_t *hull; int count, i; @@ -756,7 +757,7 @@ Mod_LoadClipnodes (bsp_t *bsp) static void Mod_MakeHull0 (void) { - dclipnode_t *out; + mclipnode_t *out; hull_t *hull; int count, i, j; mnode_t *in, *child; diff --git a/libs/models/clip_hull.c b/libs/models/clip_hull.c index 255d972ac..6161c6d38 100644 --- a/libs/models/clip_hull.c +++ b/libs/models/clip_hull.c @@ -47,7 +47,7 @@ MOD_Alloc_Hull (int nodes, int planes) int size, i; size = sizeof (hull_t); - size += sizeof (dclipnode_t) * nodes + sizeof (mplane_t) * planes; + size += sizeof (mclipnode_t) * nodes + sizeof (mplane_t) * planes; size *= MAX_MAP_HULLS; size += sizeof (clip_hull_t); @@ -57,11 +57,11 @@ MOD_Alloc_Hull (int nodes, int planes) ch->hulls[0] = (hull_t *) &ch[1]; for (i = 1; i < MAX_MAP_HULLS; i++) ch->hulls[i] = &ch->hulls[i - 1][1]; - ch->hulls[0]->clipnodes = (dclipnode_t *) &ch->hulls[i - 1][1]; + ch->hulls[0]->clipnodes = (mclipnode_t *) &ch->hulls[i - 1][1]; ch->hulls[0]->planes = (mplane_t *) &ch->hulls[0]->clipnodes[nodes]; for (i = 1; i < MAX_MAP_HULLS; i++) { ch->hulls[i]->clipnodes = - (dclipnode_t *) &ch->hulls[i - 1]->planes[planes]; + (mclipnode_t *) &ch->hulls[i - 1]->planes[planes]; ch->hulls[i]->planes = (mplane_t *) &ch->hulls[i]->clipnodes[nodes]; } return ch; diff --git a/libs/models/trace.c b/libs/models/trace.c index d14cd027d..5bfaa75b3 100644 --- a/libs/models/trace.c +++ b/libs/models/trace.c @@ -101,7 +101,7 @@ MOD_TraceLine (hull_t *hull, int num, int side, empty, solid; tracestack_t *tstack; tracestack_t tracestack[256]; - dclipnode_t *node; + mclipnode_t *node; mplane_t *plane, *split_plane; VectorCopy (start_point, start); diff --git a/nq/source/world.c b/nq/source/world.c index e38f59946..a88089415 100644 --- a/nq/source/world.c +++ b/nq/source/world.c @@ -70,7 +70,7 @@ typedef struct { /* HULL BOXES */ static hull_t box_hull; -static dclipnode_t box_clipnodes[6]; +static mclipnode_t box_clipnodes[6]; static mplane_t box_planes[6]; @@ -81,7 +81,7 @@ static mplane_t box_planes[6]; can just be stored out and get a proper hull_t structure. */ void -SV_InitHull (hull_t *hull, dclipnode_t *clipnodes, mplane_t *planes) +SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes) { int side, i; @@ -435,7 +435,7 @@ int SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { float d; - dclipnode_t *node; + mclipnode_t *node; mplane_t *plane; while (num >= 0) { diff --git a/qw/source/pmovetst.c b/qw/source/pmovetst.c index e20e5f05a..c368a3290 100644 --- a/qw/source/pmovetst.c +++ b/qw/source/pmovetst.c @@ -48,7 +48,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "world.h" static hull_t box_hull; -static dclipnode_t box_clipnodes[6]; +static mclipnode_t box_clipnodes[6]; static mplane_t box_planes[6]; @@ -108,7 +108,7 @@ inline int PM_HullPointContents (hull_t *hull, int num, const vec3_t p) { float d; - dclipnode_t *node; + mclipnode_t *node; mplane_t *plane; while (num >= 0) { @@ -133,7 +133,7 @@ PM_PointContents (const vec3_t p) { float d; int num; - dclipnode_t *node; + mclipnode_t *node; hull_t *hull; mplane_t *plane; diff --git a/qw/source/world.c b/qw/source/world.c index 7bff06369..4090b0d21 100644 --- a/qw/source/world.c +++ b/qw/source/world.c @@ -70,7 +70,7 @@ typedef struct { /* HULL BOXES */ static hull_t box_hull; -static dclipnode_t box_clipnodes[6]; +static mclipnode_t box_clipnodes[6]; static mplane_t box_planes[6]; @@ -81,7 +81,7 @@ static mplane_t box_planes[6]; can just be stored out and get a proper hull_t structure. */ void -SV_InitHull (hull_t *hull, dclipnode_t *clipnodes, mplane_t *planes) +SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes) { int side, i; @@ -423,7 +423,7 @@ int SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { float d; - dclipnode_t *node; + mclipnode_t *node; mplane_t *plane; while (num >= 0) { From 0e737cae1588e9ffe1d12a102ed1108492d1e08c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 12:54:26 +0900 Subject: [PATCH 6/7] Fix some "a" -> "an". --- include/QF/progs.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/QF/progs.h b/include/QF/progs.h index 61506e637..7d81f415f 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -328,7 +328,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define G_FLOAT(p,o) G_var (p, o, float) -/** Access a integer global. Can be assigned to. +/** Access an integer global. Can be assigned to. \par QC type: \c integer @@ -340,7 +340,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define G_INT(p,o) G_var (p, o, integer) -/** Access a unsigned integer global. Can be assigned to. +/** Access an unsigned integer global. Can be assigned to. \par QC type: \c uinteger @@ -505,7 +505,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define P_FLOAT(p,n) P_var (p, n, float) -/** Access a integer parameter. Can be assigned to. +/** Access an integer parameter. Can be assigned to. \par QC type: \c integer @@ -517,7 +517,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define P_INT(p,n) P_var (p, n, integer) -/** Access a unsigned integer parameter. Can be assigned to. +/** Access an unsigned integer parameter. Can be assigned to. \par QC type: \c uinteger @@ -590,7 +590,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define P_EDICT(p,n) ((edict_t *)(PR_edicts (p) + P_INT (p, n))) -/** Access a entity parameter. +/** Access an entity parameter. \par QC type: \c entity @@ -825,7 +825,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define E_FLOAT(e,o) E_var (e, o, float) -/** Access a integer entity field. Can be assigned to. +/** Access an integer entity field. Can be assigned to. \par QC type: \c integer @@ -837,7 +837,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_ */ #define E_INT(e,o) E_var (e, o, integer) -/** Access a unsigned integer entity field. Can be assigned to. +/** Access an unsigned integer entity field. Can be assigned to. \par QC type: \c uinteger From d8eb3aab3678d034d49446b0f275b12ecd378ab1 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 29 Nov 2010 14:26:33 +0900 Subject: [PATCH 7/7] Move the desktop files into their own directory. --- Makefile.am | 3 +- config.d/ac_config_files.m4 | 1 + desktop/Makefile.am | 49 +++++++++++++++++++ .../quakeforge-nq-glx.desktop | 0 .../quakeforge-nq-sdl.desktop | 0 .../quakeforge-nq-sdl32.desktop | 0 .../quakeforge-nq-sgl.desktop | 0 .../quakeforge-nq-x11.desktop | 0 .../quakeforge-qw-glx.desktop | 0 .../quakeforge-qw-sdl.desktop | 0 .../quakeforge-qw-sdl32.desktop | 0 .../quakeforge-qw-sgl.desktop | 0 .../quakeforge-qw-x11.desktop | 0 nq/source/Makefile.am | 6 --- qw/source/Makefile.am | 6 --- 15 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 desktop/Makefile.am rename {nq/source => desktop}/quakeforge-nq-glx.desktop (100%) rename {nq/source => desktop}/quakeforge-nq-sdl.desktop (100%) rename {nq/source => desktop}/quakeforge-nq-sdl32.desktop (100%) rename {nq/source => desktop}/quakeforge-nq-sgl.desktop (100%) rename {nq/source => desktop}/quakeforge-nq-x11.desktop (100%) rename {qw/source => desktop}/quakeforge-qw-glx.desktop (100%) rename {qw/source => desktop}/quakeforge-qw-sdl.desktop (100%) rename {qw/source => desktop}/quakeforge-qw-sdl32.desktop (100%) rename {qw/source => desktop}/quakeforge-qw-sgl.desktop (100%) rename {qw/source => desktop}/quakeforge-qw-x11.desktop (100%) diff --git a/Makefile.am b/Makefile.am index 0e2246816..e5e2a1757 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ AUTOMAKE_OPTIONS= foreign ACLOCAL_AMFLAGS = -I m4 -SUBDIRS= RPM debian doc include libs hw nq qtv qw tools ruamoko pkg-config +SUBDIRS=RPM debian desktop doc include libs hw nq qtv qw tools ruamoko \ + pkg-config ## configure.ac needs to be listed here for older autoconfs EXTRA_DIST= ChangeLog configure.ac \ diff --git a/config.d/ac_config_files.m4 b/config.d/ac_config_files.m4 index 32e247c24..1b5ca4ac9 100644 --- a/config.d/ac_config_files.m4 +++ b/config.d/ac_config_files.m4 @@ -89,3 +89,4 @@ doc/man/Makefile debian/Makefile + desktop/Makefile diff --git a/desktop/Makefile.am b/desktop/Makefile.am new file mode 100644 index 000000000..3a16d6597 --- /dev/null +++ b/desktop/Makefile.am @@ -0,0 +1,49 @@ +## Process this file with automake to produce Makefile.in +# +# Makefile.am +# +# Automake-using build system for QuakeForge +# +# Copyright (C) 2000 Jeff Teunissen +# +# This Makefile is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to: +# +# Free Software Foundation, Inc. +# 59 Temple Place - Suite 330 +# Boston, MA 02111-1307, USA +# +# $Id$ +# + +AUTOMAKE_OPTIONS= foreign + +# Stuff that is common to both client and server +# Desktop files +if HAVE_XDG +desktopdir=$(datarootdir)/applications +desktop_DATA= @NQ_DESKTOP_DATA@ @QW_DESKTOP_DATA@ +endif + +# Stuff that doesn't get linked into an executable NEEDS to be mentioned here, +# or it won't be distributed with 'make dist' + +EXTRA_DATA= quakeforge-nq-glx.desktop quakeforge-nq-sdl.desktop \ + quakeforge-nq-sdl32.desktop quakeforge-nq-sgl.desktop \ + quakeforge-nq-x11.desktop quakeforge-qw-glx.desktop \ + quakeforge-qw-sdl.desktop quakeforge-qw-sdl32.desktop \ + quakeforge-qw-sgl.desktop quakeforge-qw-x11.desktop + +# Kill the temp files, hopefully. +CLEANFILES = *.i *.s $(YACCLEX_CLEANFILES) diff --git a/nq/source/quakeforge-nq-glx.desktop b/desktop/quakeforge-nq-glx.desktop similarity index 100% rename from nq/source/quakeforge-nq-glx.desktop rename to desktop/quakeforge-nq-glx.desktop diff --git a/nq/source/quakeforge-nq-sdl.desktop b/desktop/quakeforge-nq-sdl.desktop similarity index 100% rename from nq/source/quakeforge-nq-sdl.desktop rename to desktop/quakeforge-nq-sdl.desktop diff --git a/nq/source/quakeforge-nq-sdl32.desktop b/desktop/quakeforge-nq-sdl32.desktop similarity index 100% rename from nq/source/quakeforge-nq-sdl32.desktop rename to desktop/quakeforge-nq-sdl32.desktop diff --git a/nq/source/quakeforge-nq-sgl.desktop b/desktop/quakeforge-nq-sgl.desktop similarity index 100% rename from nq/source/quakeforge-nq-sgl.desktop rename to desktop/quakeforge-nq-sgl.desktop diff --git a/nq/source/quakeforge-nq-x11.desktop b/desktop/quakeforge-nq-x11.desktop similarity index 100% rename from nq/source/quakeforge-nq-x11.desktop rename to desktop/quakeforge-nq-x11.desktop diff --git a/qw/source/quakeforge-qw-glx.desktop b/desktop/quakeforge-qw-glx.desktop similarity index 100% rename from qw/source/quakeforge-qw-glx.desktop rename to desktop/quakeforge-qw-glx.desktop diff --git a/qw/source/quakeforge-qw-sdl.desktop b/desktop/quakeforge-qw-sdl.desktop similarity index 100% rename from qw/source/quakeforge-qw-sdl.desktop rename to desktop/quakeforge-qw-sdl.desktop diff --git a/qw/source/quakeforge-qw-sdl32.desktop b/desktop/quakeforge-qw-sdl32.desktop similarity index 100% rename from qw/source/quakeforge-qw-sdl32.desktop rename to desktop/quakeforge-qw-sdl32.desktop diff --git a/qw/source/quakeforge-qw-sgl.desktop b/desktop/quakeforge-qw-sgl.desktop similarity index 100% rename from qw/source/quakeforge-qw-sgl.desktop rename to desktop/quakeforge-qw-sgl.desktop diff --git a/qw/source/quakeforge-qw-x11.desktop b/desktop/quakeforge-qw-x11.desktop similarity index 100% rename from qw/source/quakeforge-qw-x11.desktop rename to desktop/quakeforge-qw-x11.desktop diff --git a/nq/source/Makefile.am b/nq/source/Makefile.am index 83738a91d..005512692 100644 --- a/nq/source/Makefile.am +++ b/nq/source/Makefile.am @@ -33,12 +33,6 @@ AUTOMAKE_OPTIONS= foreign INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/nq/include SDL_LIBS = @SDL_LIBS@ -# Desktop files -if HAVE_XDG -desktopdir=$(datarootdir)/applications -desktop_DATA= @NQ_DESKTOP_DATA@ -endif - bin_PROGRAMS= @NQ_TARGETS@ EXTRA_PROGRAMS= nq-fbdev nq-glx nq-mgl nq-sdl nq-sdl32 nq-sgl nq-svga nq-3dfx \ diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index d3e34bd20..a80c80b51 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -33,12 +33,6 @@ AUTOMAKE_OPTIONS= foreign INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/qw/include SDL_LIBS = @SDL_LIBS@ -# Desktop files -if HAVE_XDG -desktopdir=$(datarootdir)/applications -desktop_DATA= @QW_DESKTOP_DATA@ -endif - bin_PROGRAMS= @QW_TARGETS@ EXTRA_PROGRAMS= qw-client-fbdev qw-client-glx qw-client-mgl qw-client-sdl \