From b151298459cd3c748ec80b6d7cd4a8d7bdd3ee86 Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Thu, 22 May 2003 00:23:07 +0000 Subject: [PATCH] warning removal. --- src/avp/bh_far.c | 1 + src/avp/bh_gener.c | 2 +- src/avp/bh_light.c | 2 +- src/avp/bh_pargen.c | 2 +- src/avp/bh_queen.c | 2 +- src/avp/bh_track.c | 2 +- src/avp/bh_types.c | 2 +- src/avp/game_statistics.c | 2 +- src/avp/huddefs.h | 6 -- src/avp/inventry.c | 2 +- src/avp/lighting.c | 2 +- src/avp/particle.c | 2 +- src/avp/savegame.c | 6 +- src/avp/support/indexfnt.hpp | 2 +- src/avp/weapons.c | 2 +- src/avp/win95/ddplat.cpp | 115 ++++++++--------------------------- src/avp/win95/hud_data.h | 47 +++++++------- src/files.h | 2 + src/kshape.c | 4 +- src/win95/awtexld.h | 4 +- src/win95/texio.c | 21 +------ 21 files changed, 77 insertions(+), 153 deletions(-) diff --git a/src/avp/bh_far.c b/src/avp/bh_far.c index a3538d9..93bab27 100644 --- a/src/avp/bh_far.c +++ b/src/avp/bh_far.c @@ -148,6 +148,7 @@ void FarAlienBehaviour(STRATEGYBLOCK *sbPtr) } default: { + descriptor=NULL; LOCALASSERT(1==0); /* should never get here */ } } diff --git a/src/avp/bh_gener.c b/src/avp/bh_gener.c index 2477248..85b56e6 100644 --- a/src/avp/bh_gener.c +++ b/src/avp/bh_gener.c @@ -788,7 +788,7 @@ int NumNPCsFromThisGenerator(STRATEGYBLOCK* gen_sbptr) } break; - default: // - do nothing + default: ; /* do nothing */ } } diff --git a/src/avp/bh_light.c b/src/avp/bh_light.c index d43cd3e..6aacf43 100644 --- a/src/avp/bh_light.c +++ b/src/avp/bh_light.c @@ -546,7 +546,7 @@ void SendRequestToPlacedLight(STRATEGYBLOCK* sbptr,BOOL state,int extended_data) case Light_State_StrobeDownDelay: pl_bhv->timer+=pl_bhv->fade_down_time; - default: + default: ; } } diff --git a/src/avp/bh_pargen.c b/src/avp/bh_pargen.c index 3f8cb43..da4f128 100644 --- a/src/avp/bh_pargen.c +++ b/src/avp/bh_pargen.c @@ -228,7 +228,7 @@ void ParticleGeneratorBehaveFun(STRATEGYBLOCK* sbptr) } break; - default: + default: ; } } diff --git a/src/avp/bh_queen.c b/src/avp/bh_queen.c index 3eb1f1e..4132481 100644 --- a/src/avp/bh_queen.c +++ b/src/avp/bh_queen.c @@ -3827,7 +3827,7 @@ void QueenBehaviour(STRATEGYBLOCK *sbPtr) textprint("Queen climbing out of airlock\n"); break; - default: + default: ; } } textprint("Queen Bias - Object %d Player %d\n",queenStatusPointer->QueenObjectBias,queenStatusPointer->QueenPlayerBias); diff --git a/src/avp/bh_track.c b/src/avp/bh_track.c index 6ee629b..6cbf3d3 100644 --- a/src/avp/bh_track.c +++ b/src/avp/bh_track.c @@ -267,7 +267,7 @@ void TrackObjectBehaveFun(STRATEGYBLOCK* sbptr) } break; - default: + default: ; } if(!track->playing) return; diff --git a/src/avp/bh_types.c b/src/avp/bh_types.c index 2eba2c9..8b30e3f 100644 --- a/src/avp/bh_types.c +++ b/src/avp/bh_types.c @@ -2392,7 +2392,7 @@ void RequestState(STRATEGYBLOCK* sbptr, int message, STRATEGYBLOCK * SBRequester lfxbb->current_state = LFXS_Flicking; } break; - default: + default: ; } } diff --git a/src/avp/game_statistics.c b/src/avp/game_statistics.c index c0937fc..709c428 100644 --- a/src/avp/game_statistics.c +++ b/src/avp/game_statistics.c @@ -829,7 +829,7 @@ extern void CurrentGameStats_CreatureKilled(STRATEGYBLOCK *sbPtr,SECTION_DATA *s break; } - default: + default: ; } } diff --git a/src/avp/huddefs.h b/src/avp/huddefs.h index bd2b8e0..bd28f2e 100644 --- a/src/avp/huddefs.h +++ b/src/avp/huddefs.h @@ -245,12 +245,6 @@ extern void NewOnScreenMessage(unsigned char *messagePtr); * still being displayed will be overwritten. * ********************************************************************KJL*/ -extern void DrawOnScreenMessage(unsigned char *messagePtr); -/*KJL********************************************************************* -* This is a platform specific fn which draws the required message to the * -* screen. Implemented in ddplat.cpp on the PC. * -*********************************************************************KJL*/ - #ifdef __cplusplus }; /* end of C-Linkage spec */ #endif diff --git a/src/avp/inventry.c b/src/avp/inventry.c index dc34e60..0c34d4e 100644 --- a/src/avp/inventry.c +++ b/src/avp/inventry.c @@ -154,7 +154,7 @@ void MaintainPlayersInventory(void) break; } - default: + default: ; } } } else if((collidedWith) && (collidedWith->I_SBtype == I_BehaviourNetGhost)) { diff --git a/src/avp/lighting.c b/src/avp/lighting.c index 294d88b..a5e3034 100644 --- a/src/avp/lighting.c +++ b/src/avp/lighting.c @@ -360,7 +360,7 @@ void MakeLightElement(VECTORCH *positionPtr, enum LIGHTELEMENT_BEHAVIOUR_ID beha lightElementPtr->LifeTime = 0; break; } - default: + default: ; } } diff --git a/src/avp/particle.c b/src/avp/particle.c index 444fe7f..800e420 100644 --- a/src/avp/particle.c +++ b/src/avp/particle.c @@ -5415,7 +5415,7 @@ void TimeScaleThingy() DesiredTimeScale=MUL_FIXED(DesiredTimeScale,ONE_FIXED*.7); break; - default: + default: ; } } } diff --git a/src/avp/savegame.c b/src/avp/savegame.c index e09ce20..0047c99 100644 --- a/src/avp/savegame.c +++ b/src/avp/savegame.c @@ -376,7 +376,7 @@ static BOOL SaveGameAllowed() if(NumberOfSavesLeft > NUM_SAVES_FOR_HARD_MODE) NumberOfSavesLeft = NUM_SAVES_FOR_HARD_MODE; break; - default: + default: ; } @@ -1036,7 +1036,7 @@ static void SaveStrategies() SaveStrategy_Frisbee(sbPtr); break; - default: + default: ; } } @@ -1226,7 +1226,7 @@ static void LoadStrategy(SAVE_BLOCK_STRATEGY_HEADER* header) LoadStrategy_Frisbee(header); break; - default: + default: ; } } diff --git a/src/avp/support/indexfnt.hpp b/src/avp/support/indexfnt.hpp index 19d57c6..71fd22a 100644 --- a/src/avp/support/indexfnt.hpp +++ b/src/avp/support/indexfnt.hpp @@ -218,7 +218,7 @@ ProjChar ProjCh ) const { - return AAFontWidths[ProjCh]; + return AAFontWidths[(unsigned char)ProjCh]; } inline int GetHeight(void) const diff --git a/src/avp/weapons.c b/src/avp/weapons.c index 1383c47..b8f3fa3 100644 --- a/src/avp/weapons.c +++ b/src/avp/weapons.c @@ -11251,7 +11251,7 @@ int FriendlyFireDamageFilter(DAMAGE_PROFILE *damage) { return(VulnerableToPredatorDamage); break; - default: + default: ; } return TRUE; diff --git a/src/avp/win95/ddplat.cpp b/src/avp/win95/ddplat.cpp index 477451a..e606183 100644 --- a/src/avp/win95/ddplat.cpp +++ b/src/avp/win95/ddplat.cpp @@ -57,6 +57,8 @@ int UsingDataBase = 0; /* HUD globals */ extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock; + +#if 0 // SBF - unused static int TrackerPolyBuffer[25]; static int ScanlinePolyBuffer[25]; static int MotionTrackerWidth; @@ -67,6 +69,8 @@ static RECT MT_BarDestRect; static int MT_BlipHeight; static int MT_BlipWidth; struct LittleMDescTag *MTLittleMPtr; +#endif + enum HUD_RES_ID HUDResolution; /* display co-ords, etc. */ @@ -107,9 +111,9 @@ void BLTPredatorNumericsToHUD(void); void LoadDDGraphic(struct DDGraphicTag *DDGfxPtr, char *Filename); - +#if 0 // SBF - unused static void SetupScanlinePoly(char const *filenamePtr, int width); - +#endif extern void D3D_InitialiseMarineHUD(void); extern void D3D_BLTMotionTrackerToHUD(int scanLineSize); @@ -133,14 +137,17 @@ void LoadDDGraphic(struct DDGraphicTag *DDGfxPtr, char *Filename) ****************************************/ void PlatformSpecificInitMarineHUD(void) { - if ((ScanDrawMode != ScanDrawDirectDraw) && (ZBufferOn==ZBufferMode)) +// SBF +// if ((ScanDrawMode != ScanDrawDirectDraw) && (ZBufferOn==ZBufferMode)) + { D3D_InitialiseMarineHUD(); LoadCommonTextures(); // ChromeImageNumber = CL_LoadImageOnce("Common\\chromelike.RIM",LIO_D3DTEXTURE|LIO_RELATIVEPATH|LIO_RESTORABLE); return; } - + +#if 0 // SBF - unused //SelectGenTexDirectory(ITI_TEXTURE); /* set game mode: different, though for multiplayer game */ @@ -250,6 +257,7 @@ void PlatformSpecificInitMarineHUD(void) LoadDDGraphic(&PauseDDInfo,"paused"); +#endif // SBF } void PlatformSpecificInitPredatorHUD(void) @@ -272,6 +280,7 @@ void PlatformSpecificInitPredatorHUD(void) } return; +#if 0 // SBF - unused int gfxID = NO_OF_PREDATOR_HUD_GFX; if (ScreenDescriptorBlock.SDB_Width>=640) @@ -305,6 +314,7 @@ void PlatformSpecificInitPredatorHUD(void) LoadDDGraphic(&E3FontDDInfo,"e3font"); } LoadDDGraphic(&PauseDDInfo,"paused"); +#endif // SBF } @@ -327,7 +337,8 @@ void PlatformSpecificInitAlienHUD(void) } return; - + +#if 0 // SBF - unused int gfxID = NO_OF_ALIEN_HUD_GFX; if (ScreenDescriptorBlock.SDB_Width==640) @@ -362,6 +373,7 @@ void PlatformSpecificInitAlienHUD(void) LoadDDGraphic(&E3FontDDInfo,"e3font"); } LoadDDGraphic(&PauseDDInfo,"paused"); +#endif // SBF } @@ -610,7 +622,7 @@ extern void BLTMarineNumericsToHUD(enum MARINE_HUD_DIGIT digitsToDraw) while(digit--); } -#if 0 /* TODO: remove */ +#if 0 /* SBF - TODO: remove */ static void BLTDigitToHUD(char digit, int x, int y, int font) { // HRESULT ddrval; @@ -693,7 +705,7 @@ void BLTGunSightToScreen(int screenX, int screenY, enum GUNSIGHT_SHAPE gunsightS } -#if 0 /* TODO: remove this directdraw code */ +#if 0 /* SBF - TODO: remove this directdraw code */ /*KJL************************ @@ -1423,7 +1435,7 @@ int BLTFontOffsetToHUD(PFFONT* font , int xdest, int ydest, int offset) -#endif +#endif // SBF @@ -1432,7 +1444,7 @@ int BLTFontOffsetToHUD(PFFONT* font , int xdest, int ydest, int offset) void YClipMotionTrackerVertices(struct VertexTag *v1, struct VertexTag *v2); void XClipMotionTrackerVertices(struct VertexTag *v1, struct VertexTag *v2); -#if 0 /* not used */ +#if 0 /* SBF - not used */ static void DrawMotionTrackerPoly(void) { struct VertexTag vertex[4]; @@ -1531,7 +1543,7 @@ static void DrawMotionTrackerPoly(void) Draw_Item_2dTexturePolygon(TrackerPolyBuffer); } } -#endif +#endif /* SBF */ void YClipMotionTrackerVertices(struct VertexTag *v1, struct VertexTag *v2) { @@ -1606,6 +1618,7 @@ void XClipMotionTrackerVertices(struct VertexTag *v1, struct VertexTag *v2) } } +#if 0 // SBF - unused static void SetupScanlinePoly(char const *filenamePtr, int width) { int imageNumber; @@ -1630,86 +1643,6 @@ static void SetupScanlinePoly(char const *filenamePtr, int width) ScanlinePolyBuffer[20] = Term; } - -#define MAX_MESSAGE_LENGTH 50 -#define MESSAGE_FONT_WIDTH 5 -#define MESSAGE_FONT_HEIGHT 8 -extern void DrawOnScreenMessage(unsigned char *messagePtr) -{ - RECT srcRect; - int destX,destY; - int lengthOfMessage=0; - int messageFontHeight,messageFontWidth; - - fprintf(stderr, "DrawOnScreenMessage(%s)\n", messagePtr); - - { - unsigned char *textPtr = messagePtr; - - while(*textPtr++) - { - lengthOfMessage++; - if(lengthOfMessage>MAX_MESSAGE_LENGTH) - { - /* message is too long; this could indicate a corrupt ptr */ - LOCALASSERT(0); - return; - } - } - } - if (HUDResolution == HUD_RES_LO) - { - messageFontWidth = MESSAGE_FONT_WIDTH; - messageFontHeight = MESSAGE_FONT_HEIGHT; - srcRect.top = 0; - srcRect.bottom = messageFontHeight; - } - else - { - messageFontWidth = MESSAGE_FONT_WIDTH*2; - messageFontHeight = MESSAGE_FONT_HEIGHT*2; - srcRect.left = 0; - srcRect.right = messageFontWidth; - } - - destX = (ScreenDescriptorBlock.SDB_Width - (messageFontWidth+1)*lengthOfMessage)/2; - destX &= 0xfffffffe; - destY = ScreenDescriptorBlock.SDB_Height/2 - messageFontHeight*3; - - - while(*messagePtr) - { - signed int letter; - - letter = *messagePtr++; - letter -= 'A'; - - /* needs changing for other languages! */ - if (letter>=0 && letter<=26) - { - if (HUDResolution == HUD_RES_LO) - { - srcRect.left = letter*messageFontWidth; - srcRect.right = srcRect.left+messageFontWidth; - } - else - { - srcRect.top = letter*messageFontHeight; - srcRect.bottom = srcRect.top+messageFontHeight; - } -/* - lpDDSBack->BltFast - ( - destX,destY, - E3FontDDInfo.LPDDS, - &srcRect, - DDBLTFAST_WAIT | DDBLTFAST_SRCCOLORKEY - ); -*/ - } - destX += messageFontWidth+2; - } -} - +#endif // SBF }; // extern diff --git a/src/avp/win95/hud_data.h b/src/avp/win95/hud_data.h index 415f6e4..dd30dec 100644 --- a/src/avp/win95/hud_data.h +++ b/src/avp/win95/hud_data.h @@ -50,6 +50,8 @@ static struct DigitPropertiesTag LoresMarineHUDDigitProperties[] = {-61,25, MARINE_HUD_FONT_RED}, {-70,25, MARINE_HUD_FONT_RED}, }; + +#if 0 /* SBF - unused */ static char *LoresMarineHUDGfxFilenamePtr[]= { {"blips.pg0"}, //MARINE_HUD_GFX_MOTIONTRACKERBLIP, @@ -58,6 +60,8 @@ static char *LoresMarineHUDGfxFilenamePtr[]= {"trakfont.pg0"}, {"bluebar.pg0"}, }; +#endif /* SBF */ + #if 0 static struct HUDFontDescTag LoresHUDFontDesc[] = { @@ -94,6 +98,8 @@ static struct HUDFontDescTag LoresHUDFontDesc[] = }; #endif + +#if 0 /* SBF - unused */ static struct LittleMDescTag LoresHUDLittleM = { 80,8, // source top,left @@ -102,7 +108,7 @@ static struct LittleMDescTag LoresHUDLittleM = 7,7, // screen x,y }; - +#endif /* SBF */ /* MARINE MED RES (width = 640) */ static struct DigitPropertiesTag MedresMarineHUDDigitProperties[] = @@ -148,6 +154,8 @@ static struct DigitPropertiesTag MedresMarineHUDDigitProperties[] = {-122,50, MARINE_HUD_FONT_RED}, {-140,50, MARINE_HUD_FONT_RED}, }; + +#if 0 /* SBF - unused */ static char *MedresMarineHUDGfxFilenamePtr[]= { {"blipsHRz.pg0"}, //MARINE_HUD_GFX_MOTIONTRACKERBLIP, @@ -156,6 +164,8 @@ static char *MedresMarineHUDGfxFilenamePtr[]= {"trkfntmr.pg0"}, {"blubarmr.pg0"}, }; +#endif /* SBF */ + #if 0 static struct HUDFontDescTag MedresHUDFontDesc[] = { @@ -192,6 +202,8 @@ static struct HUDFontDescTag MedresHUDFontDesc[] = }; #endif + +#if 0 /* SBF - unused */ static struct LittleMDescTag MedresHUDLittleM = { 120,14, // source top,left @@ -200,7 +212,7 @@ static struct LittleMDescTag MedresHUDLittleM = 10,10, // screen x,y }; - +#endif /* SBF */ @@ -250,6 +262,8 @@ static struct DigitPropertiesTag HiresMarineHUDDigitProperties[] = {-122,55, MARINE_HUD_FONT_RED}, {-142,55, MARINE_HUD_FONT_RED}, }; + +#if 0 /* SBF - unused */ static char *HiresMarineHUDGfxFilenamePtr[]= { {"blipsHRz.pg0"}, //MARINE_HUD_GFX_MOTIONTRACKERBLIP, @@ -258,6 +272,8 @@ static char *HiresMarineHUDGfxFilenamePtr[]= {"trkfnthr.pg0"}, {"blubarhr.pg0"}, }; +#endif /* SBF */ + #if 0 static struct HUDFontDescTag HiresHUDFontDesc[] = { @@ -287,6 +303,8 @@ static struct HUDFontDescTag HiresHUDFontDesc[] = }, }; #endif + +#if 0 /* SBF - unused */ static struct LittleMDescTag HiresHUDLittleM = { 150,17, // source top,left @@ -295,26 +313,9 @@ static struct LittleMDescTag HiresHUDLittleM = 14,14, // screen x,y }; +#endif - - - - - - - - - - - - - - - - - - - +#if 0 /* SBF - unused */ /* PREDATOR */ @@ -408,6 +409,7 @@ static char *MedresAlienHUDGfxFilenamePtr[]= {"ahMRTop.pg0"}, // ALIEN_HUD_GFX_TOP {"ahMRNum.pg0"}, // ALIEN_HUD_GFX_NUMBERS }; + #if 0 static struct DigitPropertiesTag LoresAlienHUDDigitProperties[] = { @@ -425,3 +427,6 @@ static struct DigitPropertiesTag MedresAlienHUDDigitProperties[] = {274*2, 157*2+80, ALIEN_HUD_GFX_NUMBERS}, }; #endif + +#endif /* SBF */ + diff --git a/src/files.h b/src/files.h index 5e4aa6a..87359e2 100644 --- a/src/files.h +++ b/src/files.h @@ -1,6 +1,8 @@ #ifndef __FILES_H__ #define __FILES_H__ +#include + #define FILEMODE_READONLY 0x01 #define FILEMODE_WRITEONLY 0x02 #define FILEMODE_READWRITE 0x04 diff --git a/src/kshape.c b/src/kshape.c index cdb49be..2202c17 100644 --- a/src/kshape.c +++ b/src/kshape.c @@ -3874,7 +3874,9 @@ void AddShape(DISPLAYBLOCK *dptr, VIEWDESCRIPTORBLOCK *VDB_Ptr) if(dptr->ObMorphCtrl) { LOCALASSERT(dptr->ObMorphCtrl->ObMorphHeader); - if(dptr->ObMorphCtrl->ObMorphHeader) + + /* SBF - commented out */ + /* if(dptr->ObMorphCtrl->ObMorphHeader) */ { GetMorphDisplay(&MorphDisplay, dptr); dptr->ObShape = MorphDisplay.md_shape1; diff --git a/src/win95/awtexld.h b/src/win95/awtexld.h index 51266e0..5be1a97 100644 --- a/src/win95/awtexld.h +++ b/src/win95/awtexld.h @@ -65,11 +65,13 @@ enum , _AW_TLF_FORCE32BITENUM = 0x0fffffffU /* probably entirely unnecessary */ }; -/* alt_tab junk */ +/* SBF - alt_tab junk */ #define ATIncludeSurfaceDb(p, d, s) fprintf(stderr, "ATIncludeSurfaceDb: %s/%d: %s\n", __FILE__, __LINE__, s) #define ATIncludeTextureDb(p, d, s) fprintf(stderr, "ATIncludeTextureDb: %s/%d: %s\n", __FILE__, __LINE__, s) void ATIncludeSurface(DDSurface * pSurface, AW_BACKUPTEXTUREHANDLE hBackup); void ATRemoveSurface(DDSurface * pSurface); +void ATRemoveTexture(D3DTexture * pTexture); + extern AW_TL_ERC awTlLastErr; diff --git a/src/win95/texio.c b/src/win95/texio.c index 3e23805..2044dd7 100644 --- a/src/win95/texio.c +++ b/src/win95/texio.c @@ -35,7 +35,10 @@ #include "awtexld.h" + +#if 0 /* SBF - commented out */ #include "alt_tab.h" +#endif /* #define for experimental purposes @@ -45,16 +48,6 @@ #define DefinedTextureType TextureTypePPM -#if 0 -#if debug -int tripa = 100; -int tripb = 100; -int tripc = 0; -#define trip_up tripa = tripb / tripc; -#endif -#endif - - /* externs for commonly used global variables and arrays @@ -857,10 +850,6 @@ void SpriteResizing(SHAPEHEADER *sptr) } - /* TEST */ - /*trip_up;*/ - - texture_defn_index = (pheader->PolyColour >> TxDefn); txah_ptr = (TXANIMHEADER **) shape_textures[texture_defn_index]; @@ -1227,10 +1216,6 @@ void FindImageExtents(IMAGEHEADER *ihdr, int numuvs, int *uvdata, IMAGEEXTENTS * if(e->u_high == smallint) e->u_high = e_curr->u_high; if(e->v_high == smallint) e->v_high = e_curr->v_high; - - /* TEST */ - /*trip_up;*/ - } break;