diff --git a/src/compatibility.cpp b/src/compatibility.cpp index ddbe8b3e8..25bf0f5d3 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -59,7 +59,7 @@ struct FCompatOption { const char *Name; - int CompatFlags; + DWORD CompatFlags; int WhichSlot; }; diff --git a/src/d_player.h b/src/d_player.h index bb6e87e7b..d1f564470 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -427,7 +427,7 @@ extern player_t players[MAXPLAYERS]; FArchive &operator<< (FArchive &arc, player_t *&p); -void P_CheckPlayerSprite(AActor *mo, unsigned &spritenum, fixed_t &scalex, fixed_t &scaley); +void P_CheckPlayerSprite(AActor *mo, int &spritenum, fixed_t &scalex, fixed_t &scaley); inline void AActor::SetFriendPlayer(player_t *player) { diff --git a/src/doomdef.h b/src/doomdef.h index 114f8c701..f7e6c959e 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -333,7 +333,7 @@ enum COMPATF_HITSCAN = 1 << 28, // Hitscans use original blockmap anf hit check code. COMPATF_LIGHT = 1 << 29, // Find neighboring light level like Doom COMPATF_POLYOBJ = 1 << 30, // Draw polyobjects the old fashioned way - COMPATF_MASKEDMIDTEX = 1 << 31, // Ignore compositing when drawing masked midtextures + COMPATF_MASKEDMIDTEX = 1u << 31, // Ignore compositing when drawing masked midtextures COMPATF2_BADANGLES = 1 << 0, // It is impossible to face directly NSEW. COMPATF2_FLOORMOVE = 1 << 1, // Use the same floor motion behavior as Doom. diff --git a/src/oplsynth/OPL3.cpp b/src/oplsynth/OPL3.cpp index 80caffcdf..c4806a694 100644 --- a/src/oplsynth/OPL3.cpp +++ b/src/oplsynth/OPL3.cpp @@ -89,6 +89,7 @@ public: double leftPan, rightPan; Channel (int baseAddress, double startvol); + virtual ~Channel() {} void update_2_KON1_BLOCK3_FNUMH2(class OPL3 *OPL3); void update_FNUML8(class OPL3 *OPL3); void update_CHD1_CHC1_CHB1_CHA1_FB3_CNT1(class OPL3 *OPL3); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 5d05b8c80..35d3c4718 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2618,7 +2618,7 @@ AActor *AActor::TIDHash[128]; void AActor::ClearTIDHashes () { - memset(TIDHash, NULL, sizeof(TIDHash)); + memset(TIDHash, 0, sizeof(TIDHash)); } // @@ -6083,22 +6083,22 @@ void PrintMiscActorInfo(AActor *query) "OptFuzzy", "Stencil", "Translucent", "Add", "Shaded", "TranslucentStencil"}; Printf("%s @ %p has the following flags:\n\tflags: %x", query->GetTag(), query, query->flags); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags & 1<flags2); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags2 & 1<flags3); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags3 & 1<flags4); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags4 & 1<flags5); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags5 & 1<flags6); - for (flagi = 0; flagi < 31; flagi++) + for (flagi = 0; flagi <= 31; flagi++) if (query->flags6 & 1<BounceFlags, FIXED2FLOAT(query->bouncefactor), diff --git a/src/p_user.cpp b/src/p_user.cpp index d718b084e..0060641db 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1488,7 +1488,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckPlayerDone) // //=========================================================================== -void P_CheckPlayerSprite(AActor *actor, unsigned &spritenum, fixed_t &scalex, fixed_t &scaley) +void P_CheckPlayerSprite(AActor *actor, int &spritenum, fixed_t &scalex, fixed_t &scaley) { player_t *player = actor->player; int crouchspriteno; diff --git a/src/r_things.cpp b/src/r_things.cpp index 82edfed78..dae30ae1c 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -523,7 +523,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor tex = NULL; voxel = NULL; - unsigned spritenum = thing->sprite; + int spritenum = thing->sprite; fixed_t spritescaleX = thing->scaleX; fixed_t spritescaleY = thing->scaleY; if (thing->player != NULL) @@ -565,7 +565,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor { // decide which texture to use for the sprite #ifdef RANGECHECK - if (spritenum >= (unsigned)sprites.Size ()) + if (spritenum >= (signed)sprites.Size () || spritenum < 0) { DPrintf ("R_ProjectSprite: invalid sprite number %u\n", spritenum); return; diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index e8d0f0a55..d1519a260 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -19,7 +19,7 @@ class FScanner; struct FFlagDef { - int flagbit; + unsigned int flagbit; const char *name; int structoffset; }; @@ -27,7 +27,7 @@ struct FFlagDef FFlagDef *FindFlag (const PClass *type, const char *part1, const char *part2); void HandleDeprecatedFlags(AActor *defaults, FActorInfo *info, bool set, int index); bool CheckDeprecatedFlags(AActor *actor, FActorInfo *info, int index); -const char *GetFlagName(int flagnum, int flagoffset); +const char *GetFlagName(unsigned int flagnum, int flagoffset); #define FLAG_NAME(flagnum, flagvar) GetFlagName(flagnum, myoffsetof(AActor, flagvar)) diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index bc75c2105..16028d249 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -428,7 +428,7 @@ FFlagDef *FindFlag (const PClass *type, const char *part1, const char *part2) // //========================================================================== -const char *GetFlagName(int flagnum, int flagoffset) +const char *GetFlagName(unsigned int flagnum, int flagoffset) { for(unsigned i = 0; i < countof(ActorFlags); i++) { diff --git a/src/w_wad.cpp b/src/w_wad.cpp index b29d02072..11a9b4213 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -839,7 +839,7 @@ void FWadCollection::RenameNerve () { continue; } - if (fr->GetLength() != nervesize) + if (fr->GetLength() != (long)nervesize) { // Skip MD5 computation when there is a // cheaper way to know this is not the file