From: lordhavoc Date: Mon, 18 Sep 2000 18:45:19 +0000 (+0000) Subject: removal of various id386 junk X-Git-Tag: RELEASE_0_2_0_RC1~984 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=58085f067a994572314e77c72fbe0de1af9f29f7;p=xonotic%2Fdarkplaces.git removal of various id386 junk git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@36 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/bspfile.h b/bspfile.h index a1268b4f..626c74e4 100644 --- a/bspfile.h +++ b/bspfile.h @@ -154,7 +154,6 @@ typedef struct */ -// !!! if this is changed, it must be changed in asm_i386.h too !!! typedef struct { int planenum; diff --git a/mathlib.c b/mathlib.c index f1bbacff..ba4f3d4a 100644 --- a/mathlib.c +++ b/mathlib.c @@ -164,134 +164,6 @@ float anglemod(float a) return a; } -/* -================== -BOPS_Error - -Split out like this for ASM to call. -================== -*/ -/* -void BOPS_Error (void) -{ - Sys_Error ("BoxOnPlaneSide: Bad signbits"); -} - - -#if !id386 - -*/ -/* -================== -BoxOnPlaneSide - -Returns 1, 2, or 1 + 2 -================== -*/ -/* -int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, mplane_t *p) -{ - float dist1, dist2; - int sides; - -#if 0 // this is done by the BOX_ON_PLANE_SIDE macro before calling this - // function -// fast axial cases - if (p->type < 3) - { - if (p->dist <= emins[p->type]) - return 1; - if (p->dist >= emaxs[p->type]) - return 2; - return 3; - } -#endif - -// general case - switch (p->signbits) - { - case 0: -dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; -dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; - break; - case 1: -dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; -dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; - break; - case 2: -dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; -dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; - break; - case 3: -dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; -dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; - break; - case 4: -dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; -dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; - break; - case 5: -dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; -dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; - break; - case 6: -dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; -dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; - break; - case 7: -dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; -dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; - break; - default: - dist1 = dist2 = 0; // shut up compiler - BOPS_Error (); - break; - } - -#if 0 - int i; - vec3_t corners[2]; - - for (i=0 ; i<3 ; i++) - { - if (plane->normal[i] < 0) - { - corners[0][i] = emins[i]; - corners[1][i] = emaxs[i]; - } - else - { - corners[1][i] = emins[i]; - corners[0][i] = emaxs[i]; - } - } - dist = DotProduct (plane->normal, corners[0]) - plane->dist; - dist2 = DotProduct (plane->normal, corners[1]) - plane->dist; - sides = 0; - if (dist1 >= 0) - sides = 1; - if (dist2 < 0) - sides |= 2; - -#endif - - sides = 0; - if (dist1 >= p->dist) - sides = 1; - if (dist2 < p->dist) - sides |= 2; - -#ifdef PARANOID -if (sides == 0) - Sys_Error ("BoxOnPlaneSide: sides==0"); -#endif - - return sides; -} - -#endif -*/ - int BoxOnPlaneSide0 (vec3_t emins, vec3_t emaxs, mplane_t *p) {return (((p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]) >= p->dist) | (((p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]) < p->dist) << 1));} int BoxOnPlaneSide1 (vec3_t emins, vec3_t emaxs, mplane_t *p) {return (((p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]) >= p->dist) | (((p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]) < p->dist) << 1));} int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, mplane_t *p) {return (((p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]) >= p->dist) | (((p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]) < p->dist) << 1));} @@ -613,27 +485,3 @@ int GreatestCommonDivisor (int i1, int i2) return GreatestCommonDivisor (i1, i2 % i1); } } - - -#if !id386 - -// TODO: move to nonintel.c - -/* -=================== -Invert24To16 - -Inverts an 8.24 value to a 16.16 value -==================== -*/ - -fixed16_t Invert24To16(fixed16_t val) -{ - if (val < 256) - return (0xFFFFFFFF); - - return (fixed16_t) - (((double)0x10000 * (double)0x1000000 / (double)val) + 0.5); -} - -#endif diff --git a/mathlib.h b/mathlib.h index cba2c7a7..cdd8e432 100644 --- a/mathlib.h +++ b/mathlib.h @@ -58,7 +58,6 @@ void _VectorCopy (vec3_t in, vec3_t out); int VectorCompare (vec3_t v1, vec3_t v2); vec_t Length (vec3_t v); -//void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross); float VectorNormalizeLength (vec3_t v); // returns vector length float VectorNormalizeLength2 (vec3_t v, vec3_t dest); // returns vector length void VectorInverse (vec3_t v); @@ -68,13 +67,10 @@ int Q_log2(int val); void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); -void FloorDivMod (double numer, double denom, int *quotient, - int *rem); -fixed16_t Invert24To16(fixed16_t val); +void FloorDivMod (double numer, double denom, int *quotient, int *rem); int GreatestCommonDivisor (int i1, int i2); void AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); -//int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct mplane_s *plane); float anglemod(float a); @@ -96,8 +92,6 @@ void BoxOnPlaneSideClassify(struct mplane_s *p); : \ (p)->BoxOnPlaneSideFunc( (emins), (emaxs), (p))) -// BoxOnPlaneSide( (emins), (emaxs), (p))) - #define PlaneDist(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal)) #define PlaneDiff(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] - (plane)->dist : DotProduct((point), (plane)->normal) - (plane)->dist) diff --git a/model_brush.h b/model_brush.h index 8deb6abb..40970db3 100644 --- a/model_brush.h +++ b/model_brush.h @@ -42,7 +42,6 @@ typedef struct // plane_t structure -// !!! if this is changed, it must be changed in asm_i386.h too !!! typedef struct mplane_s { vec3_t normal; @@ -181,7 +180,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 { dclipnode_t *clipnodes; diff --git a/snd_mix.c b/snd_mix.c index 92cf6cd8..1da0fcf6 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -36,7 +36,6 @@ short *snd_out; void Snd_WriteLinearBlastStereo16 (void); extern cvar_t snd_swapstereo; -#if !id386 void Snd_WriteLinearBlastStereo16 (void) { int i; @@ -85,7 +84,6 @@ void Snd_WriteLinearBlastStereo16 (void) } } } -#endif void S_TransferStereo16 (int endtime) { @@ -366,8 +364,6 @@ void SND_InitScaletable (void) } -#if !id386 - void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count) { // int data; @@ -407,9 +403,6 @@ void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count) ch->pos += count; } -#endif // !id386 - - void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count) { // int data; diff --git a/sound.h b/sound.h index 4818755e..c1e24d38 100644 --- a/sound.h +++ b/sound.h @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DEFAULT_SOUND_PACKET_VOLUME 255 #define DEFAULT_SOUND_PACKET_ATTENUATION 1.0 -// !!! if this is changed, it much be changed in asm_i386.h too !!! typedef struct { int left; @@ -38,7 +37,6 @@ typedef struct sfx_s cache_user_t cache; } sfx_t; -// !!! if this is changed, it much be changed in asm_i386.h too !!! typedef struct { int length; @@ -63,7 +61,6 @@ typedef struct unsigned char *buffer; } dma_t; -// !!! if this is changed, it much be changed in asm_i386.h too !!! typedef struct { sfx_t *sfx; // sfx number diff --git a/sys.h b/sys.h index c5d61a7f..958037fe 100644 --- a/sys.h +++ b/sys.h @@ -65,7 +65,3 @@ void Sys_Sleep (void); void Sys_SendKeyEvents (void); // Perform Key_Event () callbacks until the input que is empty -void Sys_LowFPPrecision (void); -void Sys_HighFPPrecision (void); -void Sys_SetFPCW (void); - diff --git a/sys_linux.c b/sys_linux.c index dc19728c..c24d4cf0 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -162,9 +162,11 @@ void Sys_Printf (char *fmt, ...) #if 0 static char end1[] = -"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE: The Doomed Dimension \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ---------------------------------------------------------------------------- \x1b[3;1H CALL 1-800-IDGAMES TO ORDER OR FOR TECHNICAL SUPPORT \x1b[4;1H PRICE: $45.00 (PRICES MAY VARY OUTSIDE THE US.) \x1b[5;1H \x1b[6;1H \x1b[37mYes! You only have one fourth of this incredible epic. That is because most \x1b[7;1H of you have paid us nothing or at most, very little. You could steal the \x1b[8;1H game from a friend. But we both know you'll be punished by God if you do. \x1b[9;1H \x1b[33mWHY RISK ETERNAL DAMNATION? CALL 1-800-IDGAMES AND BUY NOW! \x1b[10;1H \x1b[37mRemember, we love you almost as much as He does. \x1b[11;1H \x1b[12;1H \x1b[33mProgramming: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[13;1H \x1b[33mDesign: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[14;1H \x1b[33mArt: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[15;1H \x1b[33mBiz: \x1b[37mJay Wilbur, Mike Wilson, Donna Jackson \x1b[16;1H \x1b[33mProjects: \x1b[37mShawn Green \x1b[33mSupport: \x1b[37mBarrett Alexander \x1b[17;1H \x1b[33mSound Effects: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[18;1H For other information or details on ordering outside the US, check out the \x1b[19;1H files accompanying QUAKE or our website at http://www.idsoftware.com. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed to \x1b[22;1H Nothing Interactive, Inc. All rights reserved. \x1b[40m\x1b[23;1H\x1b[0m"; +"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE: The Doomed Dimension \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ---------------------------------------------------------------------------- \x1b[3;1H CALL 1-800-IDGAMES TO ORDER OR FOR TECHNICAL SUPPORT \x1b[4;1H PRICE: $45.00 (PRICES MAY VARY OUTSIDE THE US.) \x1b[5;1H \x1b[6;1H \x1b[37mYes! You only have one fourth of this incredible epic. That is because most \x1b[7;1H of you have paid us nothing or at most, very little. You could steal the \x1b[8;1H game from a friend. But we both know you'll be punished by God if you do. \x1b[9;1H \x1b[33mWHY RISK ETERNAL DAMNATION? CALL 1-800-IDGAMES AND BUY NOW! \x1b[10;1H \x1b[37mRemember, we love you almost as much as He does. \x1b[11;1H \x1b[12;1H \x1b[33mProgramming: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[13;1H \x1b[33mDesign: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[14;1H \x1b[33mArt: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[15;1H \x1b[33mBiz: \x1b[37mJay Wilbur, Mike Wilson, Donna Jackson \x1b[16;1H \x1b[33mProjects: \x1b[37mShawn Green \x1b[33mSupport: \x1b[37mBarrett Alexander \x1b[17;1H \x1b[33mSound Effects: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[18;1H For other information or details on ordering outside the US, check out the \x1b[19;1H files accompanying QUAKE or our website at http://www.idsoftware.com. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a r +egistered trademark licensed to \x1b[22;1H Nothing Interactive, Inc. All rights reserved. \x1b[40m\x1b[23;1H\x1b[0m"; static char end2[] = -"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ----------------------------------------------------------------------------- \x1b[3;1H \x1b[37mWhy did you quit from the registered version of QUAKE? Did the \x1b[4;1H scary monsters frighten you? Or did Mr. Sandman tug at your \x1b[5;1H little lids? No matter! What is important is you love our \x1b[6;1H game, and gave us your money. Congratulations, you are probably \x1b[7;1H not a thief. \x1b[8;1H Thank You. \x1b[9;1H \x1b[33;44mid\x1b[41m Software is: \x1b[10;1H PROGRAMMING: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[11;1H \x1b[33mDESIGN: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[12;1H \x1b[33mART: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[13;1H \x1b[33mBIZ: \x1b[37mJay Wilbur, Mike Wilson \x1b[33mPROJECTS MAN: \x1b[37mShawn Green \x1b[14;1H \x1b[33mBIZ ASSIST: \x1b[37mDonna Jackson \x1b[33mSUPPORT: \x1b[37mBarrett Alexander \x1b[15;1H \x1b[33mSOUND EFFECTS AND MUSIC: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[16;1H \x1b[17;1H If you need help running QUAKE refer to the text files in the \x1b[18;1H QUAKE directory, or our website at http://www.idsoftware.com. \x1b[19;1H If all else fails, call our technical support at 1-800-IDGAMES. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed \x1b[22;1H to Nothing Interactive, Inc. All rights reserved. \x1b[23;1H\x1b[40m\x1b[0m"; +"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ----------------------------------------------------------------------------- \x1b[3;1H \x1b[37mWhy did you quit from the registered version of QUAKE? Did the \x1b[4;1H scary monsters frighten you? Or did Mr. Sandman tug at your \x1b[5;1H little lids? No matter! What is important is you love our \x1b[6;1H game, and gave us your money. Congratulations, you are probably \x1b[7;1H not a thief. \x1b[8;1H Thank You. \x1b[9;1H \x1b[33;44mid\x1b[41m Software is: \x1b[10;1H PROGRAMMING: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[11;1H \x1b[33mDESIGN: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[12;1H \x1b[33mART: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[13;1H \x1b[33mBIZ: \x1b[37mJay Wilbur, Mike Wilson \x1b[33mPROJECTS MAN: \x1b[37mShawn Green \x1b[14;1H \x1b[33mBIZ ASSIST: \x1b[37mDonna Jackson \x1b[33mSUPPORT: \x1b[37mBarrett Alexander \x1b[15;1H \x1b[33mSOUND EFFECTS AND MUSIC: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[16;1H \x1b[17;1H If you need help running QUAKE refer to the text files in the \x1b[18;1H QUAKE directory, or our website at http://www.idsoftware.com. \x1b[19;1H If all else fails, call our technical support at 1-800-IDGAMES. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. N +IN logo is a registered trademark licensed \x1b[22;1H to Nothing Interactive, Inc. All rights reserved. \x1b[23;1H\x1b[40m\x1b[0m"; #endif void Sys_Quit (void) @@ -183,9 +185,6 @@ void Sys_Quit (void) void Sys_Init(void) { -#if id386 - Sys_SetFPCW(); -#endif } void Sys_Error (char *error, ...) @@ -393,16 +392,6 @@ char *Sys_ConsoleInput(void) return NULL; } -#if !id386 -void Sys_HighFPPrecision (void) -{ -} - -void Sys_LowFPPrecision (void) -{ -} -#endif - int main (int c, char **v) { diff --git a/sys_win.c b/sys_win.c index ead6e343..f593a567 100644 --- a/sys_win.c +++ b/sys_win.c @@ -55,10 +55,7 @@ static HANDLE hFile; static HANDLE heventParent; static HANDLE heventChild; -void MaskExceptions (void); void Sys_InitFloatTime (void); -void Sys_PushFPCW_SetHigh (void); -void Sys_PopFPCW (void); volatile int sys_checksum; @@ -238,26 +235,6 @@ void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length) } -//#ifndef _M_IX86 - -void Sys_SetFPCW (void) -{ -} - -void Sys_PushFPCW_SetHigh (void) -{ -} - -void Sys_PopFPCW (void) -{ -} - -void MaskExceptions (void) -{ -} - -//#endif - /* ================ Sys_Init @@ -269,9 +246,6 @@ void Sys_Init (void) unsigned int lowpart, highpart; OSVERSIONINFO vinfo; - MaskExceptions (); - Sys_SetFPCW (); - if (!QueryPerformanceFrequency (&PerformanceFreq)) Sys_Error ("No hardware timer available"); @@ -436,8 +410,6 @@ double Sys_FloatTime (void) unsigned int temp, t2; double time; - Sys_PushFPCW_SetHigh (); - QueryPerformanceCounter (&PerformanceCount); temp = ((unsigned int)PerformanceCount.LowPart >> lowshift) | @@ -483,8 +455,6 @@ double Sys_FloatTime (void) } } - Sys_PopFPCW (); - return curtime; } diff --git a/sys_wind.c b/sys_wind.c index 5e17373e..95d7e5d8 100644 --- a/sys_wind.c +++ b/sys_wind.c @@ -211,14 +211,6 @@ void Sys_SendKeyEvents (void) { } -void Sys_HighFPPrecision (void) -{ -} - -void Sys_LowFPPrecision (void) -{ -} - char *Sys_ConsoleInput (void) { static char text[256];