From 11e5099eb7abb2e016527795ffd32c5094e5324f Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 4 Nov 2005 22:32:00 +0000 Subject: * Replaced a bunch of inline and __inline with ID_INLINE * Replaced a bunch of __i386__ with id386 * General tidy up of asm preprocessor decisions * Removed C_ONLY from the dedicated server build git-svn-id: svn://svn.icculus.org/quake3/trunk@269 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/Makefile | 6 +- code/unix/ftola.s | 1 - code/unix/matha.s | 1 - code/unix/qasm.h | 253 +----------------------------------------------- code/unix/snapvectora.s | 1 - code/unix/unix_shared.c | 2 +- 6 files changed, 7 insertions(+), 257 deletions(-) (limited to 'code/unix') diff --git a/code/unix/Makefile b/code/unix/Makefile index f708233..c048426 100644 --- a/code/unix/Makefile +++ b/code/unix/Makefile @@ -506,7 +506,7 @@ DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $< DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< DO_SHLIB_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< -DO_DED_CC=$(CC) -DDEDICATED -DC_ONLY $(CFLAGS) -o $@ -c $< +DO_DED_CC=$(CC) -DDEDICATED $(CFLAGS) -o $@ -c $< DO_WINDRES=$(WINDRES) -i $< -o $@ ############################################################################# @@ -1111,7 +1111,8 @@ Q3DOBJ = \ $(B)/ded/null_snddma.o ifeq ($(ARCH),i386) - Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftola.o $(B)/ded/snapvectora.o + Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftola.o \ + $(B)/ded/snapvectora.o $(B)/ded/matha.o endif ifeq ($(ARCH),x86_64) @@ -1196,6 +1197,7 @@ $(B)/ded/vm_interpreted.o : $(CMDIR)/vm_interpreted.c; $(DO_DED_CC) $(B)/ded/ftola.o : $(UDIR)/ftola.s; $(DO_AS) $(B)/ded/snapvectora.o : $(UDIR)/snapvectora.s; $(DO_AS) +$(B)/ded/matha.o : $(UDIR)/matha.s; $(DO_AS) $(B)/ded/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_DED_CC) $(B)/ded/vm_x86_64.o : $(CMDIR)/vm_x86_64.c; $(DO_DED_CC) diff --git a/code/unix/ftola.s b/code/unix/ftola.s index 31c6634..e4b4839 100644 --- a/code/unix/ftola.s +++ b/code/unix/ftola.s @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // 23/09/05 Ported to gas by intel2gas, best supporting actor Tim Angus // -#define GLQUAKE 1 // don't include unneeded defs #include "qasm.h" #ifdef id386 diff --git a/code/unix/matha.s b/code/unix/matha.s index 2f7b31c..3bc2220 100644 --- a/code/unix/matha.s +++ b/code/unix/matha.s @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // math.s // x86 assembly-language math routines. -#define GLQUAKE 1 // don't include unneeded defs #include "qasm.h" diff --git a/code/unix/qasm.h b/code/unix/qasm.h index 34fe963..25a0ed9 100644 --- a/code/unix/qasm.h +++ b/code/unix/qasm.h @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __ASM_I386__ #define __ASM_I386__ +#include "../qcommon/q_platform.h" + #ifdef __MINGW32__ #undef ELF #endif @@ -32,251 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define C(label) _##label #endif - -//#define GLQUAKE 1 - -#if defined(_WIN32) && !defined(WINDED) - -#if defined(_M_IX86) -#define __i386__ 1 -#endif - -#endif - -#ifdef __i386__ -#define id386 1 -#else -#define id386 0 -#endif - -// !!! must be kept the same as in d_iface.h !!! -#define TRANSPARENT_COLOR 255 - -#ifndef GLQUAKE - .extern C(d_zistepu) - .extern C(d_pzbuffer) - .extern C(d_zistepv) - .extern C(d_zrowbytes) - .extern C(d_ziorigin) - .extern C(r_turb_s) - .extern C(r_turb_t) - .extern C(r_turb_pdest) - .extern C(r_turb_spancount) - .extern C(r_turb_turb) - .extern C(r_turb_pbase) - .extern C(r_turb_sstep) - .extern C(r_turb_tstep) - .extern C(r_bmodelactive) - .extern C(d_sdivzstepu) - .extern C(d_tdivzstepu) - .extern C(d_sdivzstepv) - .extern C(d_tdivzstepv) - .extern C(d_sdivzorigin) - .extern C(d_tdivzorigin) - .extern C(sadjust) - .extern C(tadjust) - .extern C(bbextents) - .extern C(bbextentt) - .extern C(cacheblock) - .extern C(d_viewbuffer) - .extern C(cachewidth) - .extern C(d_pzbuffer) - .extern C(d_zrowbytes) - .extern C(d_zwidth) - .extern C(d_scantable) - .extern C(r_lightptr) - .extern C(r_numvblocks) - .extern C(prowdestbase) - .extern C(pbasesource) - .extern C(r_lightwidth) - .extern C(lightright) - .extern C(lightrightstep) - .extern C(lightdeltastep) - .extern C(lightdelta) - .extern C(lightright) - .extern C(lightdelta) - .extern C(sourcetstep) - .extern C(surfrowbytes) - .extern C(lightrightstep) - .extern C(lightdeltastep) - .extern C(r_sourcemax) - .extern C(r_stepback) - .extern C(colormap) - .extern C(blocksize) - .extern C(sourcesstep) - .extern C(lightleft) - .extern C(blockdivshift) - .extern C(blockdivmask) - .extern C(lightleftstep) - .extern C(r_origin) - .extern C(r_ppn) - .extern C(r_pup) - .extern C(r_pright) - .extern C(ycenter) - .extern C(xcenter) - .extern C(d_vrectbottom_particle) - .extern C(d_vrectright_particle) - .extern C(d_vrecty) - .extern C(d_vrectx) - .extern C(d_pix_shift) - .extern C(d_pix_min) - .extern C(d_pix_max) - .extern C(d_y_aspect_shift) - .extern C(screenwidth) - .extern C(r_leftclipped) - .extern C(r_leftenter) - .extern C(r_rightclipped) - .extern C(r_rightenter) - .extern C(modelorg) - .extern C(xscale) - .extern C(r_refdef) - .extern C(yscale) - .extern C(r_leftexit) - .extern C(r_rightexit) - .extern C(r_lastvertvalid) - .extern C(cacheoffset) - .extern C(newedges) - .extern C(removeedges) - .extern C(r_pedge) - .extern C(r_framecount) - .extern C(r_u1) - .extern C(r_emitted) - .extern C(edge_p) - .extern C(surface_p) - .extern C(surfaces) - .extern C(r_lzi1) - .extern C(r_v1) - .extern C(r_ceilv1) - .extern C(r_nearzi) - .extern C(r_nearzionly) - .extern C(edge_aftertail) - .extern C(edge_tail) - .extern C(current_iv) - .extern C(edge_head_u_shift20) - .extern C(span_p) - .extern C(edge_head) - .extern C(fv) - .extern C(edge_tail_u_shift20) - .extern C(r_apverts) - .extern C(r_anumverts) - .extern C(aliastransform) - .extern C(r_avertexnormals) - .extern C(r_plightvec) - .extern C(r_ambientlight) - .extern C(r_shadelight) - .extern C(aliasxcenter) - .extern C(aliasycenter) - .extern C(a_sstepxfrac) - .extern C(r_affinetridesc) - .extern C(acolormap) - .extern C(d_pcolormap) - .extern C(r_affinetridesc) - .extern C(d_sfrac) - .extern C(d_ptex) - .extern C(d_pedgespanpackage) - .extern C(d_tfrac) - .extern C(d_light) - .extern C(d_zi) - .extern C(d_pdest) - .extern C(d_pz) - .extern C(d_aspancount) - .extern C(erroradjustup) - .extern C(errorterm) - .extern C(d_xdenom) - .extern C(r_p0) - .extern C(r_p1) - .extern C(r_p2) - .extern C(a_tstepxfrac) - .extern C(r_sstepx) - .extern C(r_tstepx) - .extern C(a_ststepxwhole) - .extern C(zspantable) - .extern C(skintable) - .extern C(r_zistepx) - .extern C(erroradjustdown) - .extern C(d_countextrastep) - .extern C(ubasestep) - .extern C(a_ststepxwhole) - .extern C(a_tstepxfrac) - .extern C(r_lstepx) - .extern C(a_spans) - .extern C(erroradjustdown) - .extern C(d_pdestextrastep) - .extern C(d_pzextrastep) - .extern C(d_sfracextrastep) - .extern C(d_ptexextrastep) - .extern C(d_countextrastep) - .extern C(d_tfracextrastep) - .extern C(d_lightextrastep) - .extern C(d_ziextrastep) - .extern C(d_pdestbasestep) - .extern C(d_pzbasestep) - .extern C(d_sfracbasestep) - .extern C(d_ptexbasestep) - .extern C(ubasestep) - .extern C(d_tfracbasestep) - .extern C(d_lightbasestep) - .extern C(d_zibasestep) - .extern C(zspantable) - .extern C(r_lstepy) - .extern C(r_sstepy) - .extern C(r_tstepy) - .extern C(r_zistepy) - .extern C(D_PolysetSetEdgeTable) - .extern C(D_RasterizeAliasPolySmooth) - - .extern float_point5 - .extern Float2ToThe31nd - .extern izistep - .extern izi - .extern FloatMinus2ToThe31nd - .extern float_1 - .extern float_particle_z_clip - .extern float_minus_1 - .extern float_0 - .extern fp_16 - .extern fp_64k - .extern fp_1m - .extern fp_1m_minus_1 - .extern fp_8 - .extern entryvec_table - .extern advancetable - .extern sstep - .extern tstep - .extern pspantemp - .extern counttemp - .extern jumptemp - .extern reciprocal_table - .extern DP_Count - .extern DP_u - .extern DP_v - .extern DP_32768 - .extern DP_Color - .extern DP_Pix - .extern DP_EntryTable - .extern pbase - .extern s - .extern t - .extern sfracf - .extern tfracf - .extern snext - .extern tnext - .extern spancountminus1 - .extern zi16stepu - .extern sdivz16stepu - .extern tdivz16stepu - .extern zi8stepu - .extern sdivz8stepu - .extern tdivz8stepu - .extern reciprocal_table_16 - .extern entryvec_table_16 - .extern ceil_cw - .extern single_cw - .extern fp_64kx64k - .extern pz - .extern spr8entryvec_table -#endif - .extern C(snd_scaletable) .extern C(paintbuffer) .extern C(snd_linear_count) @@ -360,12 +117,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // times !!! // -// !!! if this is changed, it must be changed in r_local.h too !!! -#define NEAR_CLIP 0.01 - -// !!! if this is changed, it must be changed in r_local.h too !!! -#define CYCLE 128 - // espan_t structure // !!! if this is changed, it must be changed in r_shared.h too !!! #define espan_t_u 0 diff --git a/code/unix/snapvectora.s b/code/unix/snapvectora.s index 63ea3e8..73f2584 100644 --- a/code/unix/snapvectora.s +++ b/code/unix/snapvectora.s @@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // 23/09/05 Ported to gas by intel2gas, best supporting actor Tim Angus // -#define GLQUAKE 1 // don't include unneeded defs #include "qasm.h" #ifdef id386 diff --git a/code/unix/unix_shared.c b/code/unix/unix_shared.c index be39955..c037813 100644 --- a/code/unix/unix_shared.c +++ b/code/unix/unix_shared.c @@ -139,7 +139,7 @@ int Sys_XTimeToSysTime (unsigned long xtime) #endif //#if 0 // bk001215 - see snapvector.nasm for replacement -#if !(defined __i386__) // rcg010206 - using this for PPC builds... +#if !id386 // rcg010206 - using this for PPC builds... long fastftol( float f ) { // bk001213 - from win32/win_shared.c //static int tmp; // __asm fld f -- cgit v1.2.3