- GCC warning fixes (GCC stupidity for the most part.)

SVN r3154 (trunk)
This commit is contained in:
Christoph Oelckers 2011-02-19 08:59:43 +00:00
parent 1ea5cc8bd8
commit 1993e969b7
38 changed files with 152 additions and 119 deletions

View file

@ -1,7 +1,7 @@
cmake_minimum_required( VERSION 2.4 ) cmake_minimum_required( VERSION 2.4 )
if( CMAKE_COMPILER_IS_GNUC ) if( CMAKE_COMPILER_IS_GNUC )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
endif( CMAKE_COMPILER_IS_GNUC ) endif( CMAKE_COMPILER_IS_GNUC )
add_definitions( -DBZ_NO_STDIO ) add_definitions( -DBZ_NO_STDIO )

View file

@ -7,7 +7,7 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
if( CMAKE_COMPILER_IS_GNUCXX ) if( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
if( NOT PROFILE ) if( NOT PROFILE )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" )
endif( NOT PROFILE ) endif( NOT PROFILE )

View file

@ -9,7 +9,7 @@ if( MSVC )
endif( MSVC ) endif( MSVC )
if( CMAKE_COMPILER_IS_GNUCXX ) if( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
endif( CMAKE_COMPILER_IS_GNUCXX ) endif( CMAKE_COMPILER_IS_GNUCXX )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} )

View file

@ -1,7 +1,7 @@
cmake_minimum_required( VERSION 2.4 ) cmake_minimum_required( VERSION 2.4 )
if( CMAKE_COMPILER_IS_GNUC ) if( CMAKE_COMPILER_IS_GNUC )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
endif( CMAKE_COMPILER_IS_GNUC ) endif( CMAKE_COMPILER_IS_GNUC )
add_library( jpeg add_library( jpeg

View file

@ -1,7 +1,7 @@
cmake_minimum_required( VERSION 2.4 ) cmake_minimum_required( VERSION 2.4 )
if( CMAKE_COMPILER_IS_GNUC ) if( CMAKE_COMPILER_IS_GNUC )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
endif( CMAKE_COMPILER_IS_GNUC ) endif( CMAKE_COMPILER_IS_GNUC )
set( LZMA_FILES set( LZMA_FILES

View file

@ -396,7 +396,7 @@ if( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${REL_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${REL_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused -Wextra" )
# Remove extra warnings when using the official DirectX headers. # Remove extra warnings when using the official DirectX headers.
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid, # Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,

View file

@ -124,7 +124,7 @@ static const FBinding DefBindings[] =
{ "pad_start", "pause" }, { "pad_start", "pause" },
{ "pad_back", "menu_main" }, { "pad_back", "menu_main" },
{ "lthumb", "crouch" }, { "lthumb", "crouch" },
{ NULL } { NULL, NULL }
}; };
static const FBinding DefRavenBindings[] = static const FBinding DefRavenBindings[] =
@ -135,13 +135,13 @@ static const FBinding DefRavenBindings[] =
{ "pgdn", "+lookup" }, { "pgdn", "+lookup" },
{ "del", "+lookdown" }, { "del", "+lookdown" },
{ "end", "centerview" }, { "end", "centerview" },
{ NULL } { NULL, NULL }
}; };
static const FBinding DefHereticBindings[] = static const FBinding DefHereticBindings[] =
{ {
{ "backspace", "use ArtiTomeOfPower" }, { "backspace", "use ArtiTomeOfPower" },
{ NULL } { NULL, NULL }
}; };
static const FBinding DefHexenBindings[] = static const FBinding DefHexenBindings[] =
@ -156,7 +156,7 @@ static const FBinding DefHexenBindings[] =
{ "6", "use ArtiPork" }, { "6", "use ArtiPork" },
{ "5", "use ArtiInvulnerability2" }, { "5", "use ArtiInvulnerability2" },
{ "scroll", "+showscores" }, { "scroll", "+showscores" },
{ NULL } { NULL, NULL }
}; };
static const FBinding DefStrifeBindings[] = static const FBinding DefStrifeBindings[] =
@ -167,7 +167,7 @@ static const FBinding DefStrifeBindings[] =
{ "z", "showpop 3" }, { "z", "showpop 3" },
{ "k", "showpop 2" }, { "k", "showpop 2" },
{ "q", "invquery" }, { "q", "invquery" },
{ NULL } { NULL, NULL }
// not done // not done
// h - use health // h - use health
}; };
@ -190,7 +190,7 @@ static const FBinding DefAutomapBindings[] =
{ "kp+", "+am_zoomin" }, { "kp+", "+am_zoomin" },
{ "mwheelup", "am_zoom 1.2" }, { "mwheelup", "am_zoom 1.2" },
{ "mwheeldown", "am_zoom -1.2" }, { "mwheeldown", "am_zoom -1.2" },
{ NULL } { NULL, NULL }
}; };

View file

@ -309,7 +309,7 @@ static const struct {
{ "[PARS]", PatchPars }, { "[PARS]", PatchPars },
{ "[CODEPTR]", PatchCodePtrs }, { "[CODEPTR]", PatchCodePtrs },
{ "[MUSIC]", PatchMusic }, { "[MUSIC]", PatchMusic },
{ NULL, }, { NULL, NULL },
}; };
static int HandleMode (const char *mode, int num); static int HandleMode (const char *mode, int num);
@ -1712,7 +1712,7 @@ static int PatchMisc (int dummy)
{ "IDKFA Armor", myoffsetof(struct DehInfo,KFAArmor) }, { "IDKFA Armor", myoffsetof(struct DehInfo,KFAArmor) },
{ "IDKFA Armor Class", myoffsetof(struct DehInfo,KFAAC) }, { "IDKFA Armor Class", myoffsetof(struct DehInfo,KFAAC) },
{ "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) }, { "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) },
{ NULL, } { NULL, NULL }
}; };
int result; int result;
@ -1866,8 +1866,8 @@ static int PatchMisc (int dummy)
player->health = deh.StartHealth; player->health = deh.StartHealth;
// Hm... I'm not sure that this is the right way to change this info... // Hm... I'm not sure that this is the right way to change this info...
unsigned int index = PClass::FindClass(NAME_DoomPlayer)->Meta.GetMetaInt (ACMETA_DropItems) - 1; int index = PClass::FindClass(NAME_DoomPlayer)->Meta.GetMetaInt (ACMETA_DropItems) - 1;
if (index >= 0 && index < DropItemList.Size()) if (index >= 0 && index < (signed)DropItemList.Size())
{ {
FDropItem * di = DropItemList[index]; FDropItem * di = DropItemList[index];
while (di != NULL) while (di != NULL)

View file

@ -2318,7 +2318,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
for (i = 0; i < argn; ++i) for (i = 0; i < argn; ++i)
{ {
int argval = ReadLong(stream); int argval = ReadLong(stream);
if (i < countof(arg)) if ((unsigned)i < countof(arg))
{ {
arg[i] = argval; arg[i] = argval;
} }
@ -2337,7 +2337,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
for (i = 0; i < argn; ++i) for (i = 0; i < argn; ++i)
{ {
int argval = ReadLong(stream); int argval = ReadLong(stream);
if (i < countof(arg)) if ((unsigned)i < countof(arg))
{ {
arg[i] = argval; arg[i] = argval;
} }
@ -2426,7 +2426,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
{ {
players[player].weapons.Slots[slot].Clear(); players[player].weapons.Slots[slot].Clear();
} }
for(int i = 0; i < count; ++i) for(i = 0; i < count; ++i)
{ {
const PClass *wpn = Net_ReadWeapon(stream); const PClass *wpn = Net_ReadWeapon(stream);
players[player].weapons.AddSlot(slot, wpn, player == consoleplayer); players[player].weapons.AddSlot(slot, wpn, player == consoleplayer);

View file

@ -242,7 +242,7 @@ const PClass *PClass::FindClass (FName zaname)
} }
else if (lexx == 0) else if (lexx == 0)
{ {
return cls->Size<0? NULL : cls; return cls;
} }
else else
{ {

View file

@ -231,7 +231,10 @@ void level_info_t::Reset()
partime = 0; partime = 0;
sucktime = 0; sucktime = 0;
flags = 0; flags = 0;
flags2 = gameinfo.gametype == GAME_Hexen? 0 : LEVEL2_LAXMONSTERACTIVATION; if (gameinfo.gametype == GAME_Hexen)
flags2 = 0;
else
flags2 = LEVEL2_LAXMONSTERACTIVATION;
Music = ""; Music = "";
LevelName = ""; LevelName = "";
strcpy (fadetable, "COLORMAP"); strcpy (fadetable, "COLORMAP");
@ -1213,7 +1216,7 @@ MapFlagHandlers[] =
{ "deathslideshow", MITYPE_SETFLAG2, 0, 0 }, { "deathslideshow", MITYPE_SETFLAG2, 0, 0 },
{ "strictmonsteractivation", MITYPE_CLRFLAG2, LEVEL2_LAXMONSTERACTIVATION, LEVEL2_LAXACTIVATIONMAPINFO }, { "strictmonsteractivation", MITYPE_CLRFLAG2, LEVEL2_LAXMONSTERACTIVATION, LEVEL2_LAXACTIVATIONMAPINFO },
{ "laxmonsteractivation", MITYPE_SETFLAG2, LEVEL2_LAXMONSTERACTIVATION, LEVEL2_LAXACTIVATIONMAPINFO }, { "laxmonsteractivation", MITYPE_SETFLAG2, LEVEL2_LAXMONSTERACTIVATION, LEVEL2_LAXACTIVATIONMAPINFO },
{ "additive_scrollers", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL}, { "additive_scrollers", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL, 0 },
{ "keepfullinventory", MITYPE_SETFLAG2, LEVEL2_KEEPFULLINVENTORY, 0 }, { "keepfullinventory", MITYPE_SETFLAG2, LEVEL2_KEEPFULLINVENTORY, 0 },
{ "monsterfallingdamage", MITYPE_SETFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 }, { "monsterfallingdamage", MITYPE_SETFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 },
{ "nomonsterfallingdamage", MITYPE_CLRFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 }, { "nomonsterfallingdamage", MITYPE_CLRFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 },
@ -1241,40 +1244,40 @@ MapFlagHandlers[] =
{ "noautosavehint", MITYPE_SETFLAG2, LEVEL2_NOAUTOSAVEHINT, 0 }, { "noautosavehint", MITYPE_SETFLAG2, LEVEL2_NOAUTOSAVEHINT, 0 },
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 }, { "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes { "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX}, { "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX}, { "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
{ "compat_limitpain", MITYPE_COMPATFLAG, COMPATF_LIMITPAIN}, { "compat_limitpain", MITYPE_COMPATFLAG, COMPATF_LIMITPAIN, 0 },
{ "compat_nopassover", MITYPE_COMPATFLAG, COMPATF_NO_PASSMOBJ}, { "compat_nopassover", MITYPE_COMPATFLAG, COMPATF_NO_PASSMOBJ, 0 },
{ "compat_notossdrops", MITYPE_COMPATFLAG, COMPATF_NOTOSSDROPS}, { "compat_notossdrops", MITYPE_COMPATFLAG, COMPATF_NOTOSSDROPS, 0 },
{ "compat_useblocking", MITYPE_COMPATFLAG, COMPATF_USEBLOCKING}, { "compat_useblocking", MITYPE_COMPATFLAG, COMPATF_USEBLOCKING, 0 },
{ "compat_nodoorlight", MITYPE_COMPATFLAG, COMPATF_NODOORLIGHT}, { "compat_nodoorlight", MITYPE_COMPATFLAG, COMPATF_NODOORLIGHT, 0 },
{ "compat_ravenscroll", MITYPE_COMPATFLAG, COMPATF_RAVENSCROLL}, { "compat_ravenscroll", MITYPE_COMPATFLAG, COMPATF_RAVENSCROLL, 0 },
{ "compat_soundtarget", MITYPE_COMPATFLAG, COMPATF_SOUNDTARGET}, { "compat_soundtarget", MITYPE_COMPATFLAG, COMPATF_SOUNDTARGET, 0 },
{ "compat_dehhealth", MITYPE_COMPATFLAG, COMPATF_DEHHEALTH}, { "compat_dehhealth", MITYPE_COMPATFLAG, COMPATF_DEHHEALTH, 0 },
{ "compat_trace", MITYPE_COMPATFLAG, COMPATF_TRACE}, { "compat_trace", MITYPE_COMPATFLAG, COMPATF_TRACE, 0 },
{ "compat_dropoff", MITYPE_COMPATFLAG, COMPATF_DROPOFF}, { "compat_dropoff", MITYPE_COMPATFLAG, COMPATF_DROPOFF, 0 },
{ "compat_boomscroll", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL}, { "compat_boomscroll", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL, 0 },
{ "compat_invisibility", MITYPE_COMPATFLAG, COMPATF_INVISIBILITY}, { "compat_invisibility", MITYPE_COMPATFLAG, COMPATF_INVISIBILITY, 0 },
{ "compat_silent_instant_floors", MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS}, { "compat_silent_instant_floors", MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS, 0 },
{ "compat_sectorsounds", MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS}, { "compat_sectorsounds", MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS, 0 },
{ "compat_missileclip", MITYPE_COMPATFLAG, COMPATF_MISSILECLIP}, { "compat_missileclip", MITYPE_COMPATFLAG, COMPATF_MISSILECLIP, 0 },
{ "compat_crossdropoff", MITYPE_COMPATFLAG, COMPATF_CROSSDROPOFF}, { "compat_crossdropoff", MITYPE_COMPATFLAG, COMPATF_CROSSDROPOFF, 0 },
{ "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH}, { "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH, 0 },
{ "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR}, { "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR, 0 },
{ "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM}, { "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM, 0 },
{ "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE}, { "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE, 0 },
{ "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS}, { "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS, 0 },
{ "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS}, { "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS, 0 },
{ "compat_spritesort", MITYPE_COMPATFLAG, COMPATF_SPRITESORT}, { "compat_spritesort", MITYPE_COMPATFLAG, COMPATF_SPRITESORT, 0 },
{ "compat_light", MITYPE_COMPATFLAG, COMPATF_LIGHT}, { "compat_light", MITYPE_COMPATFLAG, COMPATF_LIGHT, 0 },
{ "compat_polyobj", MITYPE_COMPATFLAG, COMPATF_POLYOBJ}, { "compat_polyobj", MITYPE_COMPATFLAG, COMPATF_POLYOBJ, 0 },
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end3_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end3_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_intermission_track", MITYPE_EATNEXT, 0, 0 }, { "cd_intermission_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_title_track", MITYPE_EATNEXT, 0, 0 }, { "cd_title_track", MITYPE_EATNEXT, 0, 0 },
{ NULL, MITYPE_IGNORE, 0} { NULL, MITYPE_IGNORE, 0, 0}
}; };
//========================================================================== //==========================================================================

View file

@ -261,7 +261,7 @@ void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, in
int changed = oldbuttons ^ newbuttons; int changed = oldbuttons ^ newbuttons;
if (changed != 0) if (changed != 0)
{ {
event_t ev = { 0 }; event_t ev = { 0, 0, 0, 0, 0, 0, 0 };
int mask = 1; int mask = 1;
for (int j = 0; j < numbuttons; mask <<= 1, ++j) for (int j = 0; j < numbuttons; mask <<= 1, ++j)
{ {
@ -280,7 +280,7 @@ void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, co
int changed = oldbuttons ^ newbuttons; int changed = oldbuttons ^ newbuttons;
if (changed != 0) if (changed != 0)
{ {
event_t ev = { 0 }; event_t ev = { 0, 0, 0, 0, 0, 0, 0 };
int mask = 1; int mask = 1;
for (int j = 0; j < numbuttons; mask <<= 1, ++j) for (int j = 0; j < numbuttons; mask <<= 1, ++j)
{ {

View file

@ -213,6 +213,8 @@ void FNodeBuilder::CreateSubsectorsForReal ()
sub.sector = NULL; sub.sector = NULL;
sub.polys = NULL; sub.polys = NULL;
sub.BSP = NULL; sub.BSP = NULL;
sub.flags = 0;
sub.render_sector = NULL;
for (i = 0; i < SubsectorSets.Size(); ++i) for (i = 0; i < SubsectorSets.Size(); ++i)
{ {

View file

@ -1239,7 +1239,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
module = StaticLoadModule (lump); module = StaticLoadModule (lump);
} }
if (module != NULL) Imports.Push (module); if (module != NULL) Imports.Push (module);
do ; while (parse[++i]); do {;} while (parse[++i]);
} }
++i; ++i;
} }
@ -1302,7 +1302,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
{ {
MapVars[varNum] = &lib->MapVarStore[impNum]; MapVars[varNum] = &lib->MapVarStore[impNum];
} }
do ; while (parse[++j]); do {;} while (parse[++j]);
++j; ++j;
} }
} }
@ -1331,7 +1331,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
ModuleName, expectedSize); ModuleName, expectedSize);
} }
} }
do ; while (*++parse); do {;} while (*++parse);
++parse; ++parse;
} }
} }

View file

@ -766,8 +766,9 @@ static void CreateStartSpot (fixed_t *pos, FMapThing *start)
{ {
0, (LittleLong(pos[0])<<12), ((-LittleLong(pos[1]))<<12), 0,// tid, x, y, z 0, (LittleLong(pos[0])<<12), ((-LittleLong(pos[1]))<<12), 0,// tid, x, y, z
short(Scale ((2048-angle)&2047, 360, 2048)), 1, // angle, type short(Scale ((2048-angle)&2047, 360, 2048)), 1, // angle, type
0, 0, // Skillfilter, Classfilter
7|MTF_SINGLE|224, // flags 7|MTF_SINGLE|224, // flags
// special and args are 0 0, {NULL}, NULL // special is 0, args and Conversation are NULL
}; };
*start = mt; *start = mt;

View file

@ -361,7 +361,7 @@ static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeaker
type = GetStrifeType (speech.SpeakerType); type = GetStrifeType (speech.SpeakerType);
node->SpeakerType = type; node->SpeakerType = type;
if (speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType) if ((signed)(speech.SpeakerType) >= 0 && prevSpeakerType != speech.SpeakerType)
{ {
if (type != NULL) if (type != NULL)
{ {
@ -434,7 +434,7 @@ static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeaker
type = GetStrifeType (speech.SpeakerType); type = GetStrifeType (speech.SpeakerType);
node->SpeakerType = type; node->SpeakerType = type;
if (speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType) if ((signed)speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType)
{ {
if (type != NULL) if (type != NULL)
{ {

View file

@ -93,7 +93,7 @@ static const struct ColorList {
{&dred, 80, 0, 0 }, {&dred, 80, 0, 0 },
{&maroon1, 154, 49, 49 }, {&maroon1, 154, 49, 49 },
{&maroon2, 125, 24, 24 }, {&maroon2, 125, 24, 24 },
{NULL} {NULL, 0, 0, 0 }
}; };
void P_InitEffects () void P_InitEffects ()

View file

@ -1009,7 +1009,8 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
{ {
vertexes, numvertexes, vertexes, numvertexes,
sides, numsides, sides, numsides,
lines, numlines lines, numlines,
0, 0, 0, 0
}; };
leveldata.FindMapBounds (); leveldata.FindMapBounds ();
FNodeBuilder builder (leveldata, polyspots, anchors, true); FNodeBuilder builder (leveldata, polyspots, anchors, true);

View file

@ -5540,7 +5540,7 @@ FDropItem *AActor::GetDropItems()
{ {
unsigned int index = GetClass()->Meta.GetMetaInt (ACMETA_DropItems) - 1; unsigned int index = GetClass()->Meta.GetMetaInt (ACMETA_DropItems) - 1;
if (index >= 0 && index < DropItemList.Size()) if (index < DropItemList.Size())
{ {
return DropItemList[index]; return DropItemList[index];
} }

View file

@ -3722,7 +3722,8 @@ void P_SetupLevel (char *lumpname, int position)
{ {
vertexes, numvertexes, vertexes, numvertexes,
sides, numsides, sides, numsides,
lines, numlines lines, numlines,
0, 0, 0, 0
}; };
leveldata.FindMapBounds (); leveldata.FindMapBounds ();
// We need GL nodes if am_textured is on. // We need GL nodes if am_textured is on.

View file

@ -63,8 +63,8 @@ CCMD (dumpmap)
return; return;
} }
wadinfo_t header = { PWAD_ID, 12 }; wadinfo_t header = { PWAD_ID, 12, 0 };
wadlump_t lumps[12] = { {0} }; wadlump_t lumps[12] = { {0, 0, {NULL}} };
fseek (file, 12, SEEK_SET); fseek (file, 12, SEEK_SET);
@ -95,7 +95,7 @@ CCMD (dumpmap)
static int WriteTHINGS (FILE *file) static int WriteTHINGS (FILE *file)
{ {
mapthinghexen_t mt = { 0 }; mapthinghexen_t mt = { 0, 0, 0, 0, 0, 0, 0, 0, {NULL} };
AActor *mo = players[consoleplayer].mo; AActor *mo = players[consoleplayer].mo;
mt.x = LittleShort(short(mo->x >> FRACBITS)); mt.x = LittleShort(short(mo->x >> FRACBITS));

View file

@ -1329,10 +1329,8 @@ void R_Subsector (subsector_t *sub)
fake3D = FAKE3D_FAKECEILING; fake3D = FAKE3D_FAKECEILING;
tempsec = *fakeFloor->model; tempsec = *fakeFloor->model;
tempsec.ceilingplane = *fakeFloor->bottom.plane; tempsec.ceilingplane = *fakeFloor->bottom.plane;
if (!(fakeFloor->flags & FF_THISINSIDE) && if ((!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) ||
!(fakeFloor->flags & FF_INVERTSECTOR) || (fakeFloor->flags & FF_THISINSIDE && fakeFloor->flags & FF_INVERTSECTOR))
fakeFloor->flags & FF_THISINSIDE &&
fakeFloor->flags & FF_INVERTSECTOR)
{ {
tempsec.SetTexture(sector_t::ceiling, tempsec.GetTexture(sector_t::floor)); tempsec.SetTexture(sector_t::ceiling, tempsec.GetTexture(sector_t::floor));
} }

View file

@ -959,7 +959,7 @@ static InterpolationViewer *FindPastViewer (AActor *actor)
} }
// Not found, so make a new one // Not found, so make a new one
InterpolationViewer iview = { 0 }; InterpolationViewer iview = { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
iview.ViewActor = actor; iview.ViewActor = actor;
iview.otic = -1; iview.otic = -1;
return &PastViewers[PastViewers.Push (iview)]; return &PastViewers[PastViewers.Push (iview)];

View file

@ -480,7 +480,7 @@ void R_InitSpriteDefs ()
while (hash != -1) while (hash != -1)
{ {
VHasher *vh = &vhashes[hash]; VHasher *vh = &vhashes[hash];
if (vh->Name == intname) if (vh->Name == (int)intname)
{ {
FVoxel *vox = R_LoadKVX(hash); FVoxel *vox = R_LoadKVX(hash);
if (vox == NULL) if (vox == NULL)
@ -612,7 +612,7 @@ static bool VOX_ReadSpriteNames(FScanner &sc, TArray<DWORD> &vsprites)
spritename = *(int *)sc.String; spritename = *(int *)sc.String;
for (i = 0; i < sprites.Size(); ++i) for (i = 0; i < sprites.Size(); ++i)
{ {
if (sprites[i].dwName == spritename) if ((int)sprites[i].dwName == spritename)
{ {
break; break;
} }
@ -3943,7 +3943,7 @@ void R_CheckOffscreenBuffer(int width, int height, bool spansonly)
assert(OffscreenColorBuffer == NULL && "The color buffer cannot exist without the coverage buffer"); assert(OffscreenColorBuffer == NULL && "The color buffer cannot exist without the coverage buffer");
OffscreenCoverageBuffer = new FCoverageBuffer(width); OffscreenCoverageBuffer = new FCoverageBuffer(width);
} }
else if (OffscreenCoverageBuffer->NumLists != width) else if (OffscreenCoverageBuffer->NumLists != (unsigned)width)
{ {
delete OffscreenCoverageBuffer; delete OffscreenCoverageBuffer;
OffscreenCoverageBuffer = new FCoverageBuffer(width); OffscreenCoverageBuffer = new FCoverageBuffer(width);

View file

@ -123,7 +123,8 @@ static ReverbContainer Psychotic =
0x1900, 0x1900,
true, true,
false, false,
{0,25, 1.0f, 0.50f, -1000, -151, 0, 7.56f, 0.91f, 1.0f, -626, 0.020f, 0.0f,0.0f,0.0f, 774, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 4.00f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f } {0,25, 1.0f, 0.50f, -1000, -151, 0, 7.56f, 0.91f, 1.0f, -626, 0.020f, 0.0f,0.0f,0.0f, 774, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 4.00f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer Dizzy = static ReverbContainer Dizzy =
@ -133,7 +134,8 @@ static ReverbContainer Dizzy =
0x1800, 0x1800,
true, true,
false, false,
{0,24, 1.8f, 0.60f, -1000, -400, 0, 17.23f, 0.56f, 1.0f, -1713, 0.020f, 0.0f,0.0f,0.0f, -613, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.81f, 0.310f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f } {0,24, 1.8f, 0.60f, -1000, -400, 0, 17.23f, 0.56f, 1.0f, -1713, 0.020f, 0.0f,0.0f,0.0f, -613, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.81f, 0.310f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer Drugged = static ReverbContainer Drugged =
@ -143,7 +145,8 @@ static ReverbContainer Drugged =
0x1700, 0x1700,
true, true,
false, false,
{0,23, 1.9f, 0.50f, -1000, 0, 0, 8.39f, 1.39f, 1.0f, -115, 0.002f, 0.0f,0.0f,0.0f, 985, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f } {0,23, 1.9f, 0.50f, -1000, 0, 0, 8.39f, 1.39f, 1.0f, -115, 0.002f, 0.0f,0.0f,0.0f, 985, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer Underwater = static ReverbContainer Underwater =
@ -153,7 +156,8 @@ static ReverbContainer Underwater =
0x1600, 0x1600,
true, true,
false, false,
{0,22, 1.8f, 1.00f, -1000, -4000, 0, 1.49f, 0.10f, 1.0f, -449, 0.007f, 0.0f,0.0f,0.0f, 1700, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 1.18f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,22, 1.8f, 1.00f, -1000, -4000, 0, 1.49f, 0.10f, 1.0f, -449, 0.007f, 0.0f,0.0f,0.0f, 1700, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 1.18f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer SewerPipe = static ReverbContainer SewerPipe =
@ -163,7 +167,8 @@ static ReverbContainer SewerPipe =
0x1500, 0x1500,
true, true,
false, false,
{0,21, 1.7f, 0.80f, -1000, -1000, 0, 2.81f, 0.14f, 1.0f, 429, 0.014f, 0.0f,0.0f,0.0f, 1023, 0.021f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 80.0f, 60.0f, 0x3f } {0,21, 1.7f, 0.80f, -1000, -1000, 0, 2.81f, 0.14f, 1.0f, 429, 0.014f, 0.0f,0.0f,0.0f, 1023, 0.021f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 80.0f, 60.0f, 0x3f },
false
}; };
static ReverbContainer ParkingLot = static ReverbContainer ParkingLot =
@ -173,7 +178,8 @@ static ReverbContainer ParkingLot =
0x1400, 0x1400,
true, true,
false, false,
{0,20, 8.3f, 1.00f, -1000, 0, 0, 1.65f, 1.50f, 1.0f, -1363, 0.008f, 0.0f,0.0f,0.0f, -1153, 0.012f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f } {0,20, 8.3f, 1.00f, -1000, 0, 0, 1.65f, 1.50f, 1.0f, -1363, 0.008f, 0.0f,0.0f,0.0f, -1153, 0.012f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer Plain = static ReverbContainer Plain =
@ -183,7 +189,8 @@ static ReverbContainer Plain =
0x1300, 0x1300,
true, true,
false, false,
{0,19, 42.5f, 0.21f, -1000, -2000, 0, 1.49f, 0.50f, 1.0f, -2466, 0.179f, 0.0f,0.0f,0.0f, -1926, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 21.0f, 100.0f, 0x3f } {0,19, 42.5f, 0.21f, -1000, -2000, 0, 1.49f, 0.50f, 1.0f, -2466, 0.179f, 0.0f,0.0f,0.0f, -1926, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 21.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Quarry = static ReverbContainer Quarry =
@ -193,7 +200,8 @@ static ReverbContainer Quarry =
0x1200, 0x1200,
true, true,
false, false,
{0,18, 17.5f, 1.00f, -1000, -1000, 0, 1.49f, 0.83f, 1.0f, -10000, 0.061f, 0.0f,0.0f,0.0f, 500, 0.025f, 0.0f,0.0f,0.0f, 0.125f, 0.70f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,18, 17.5f, 1.00f, -1000, -1000, 0, 1.49f, 0.83f, 1.0f, -10000, 0.061f, 0.0f,0.0f,0.0f, 500, 0.025f, 0.0f,0.0f,0.0f, 0.125f, 0.70f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Mountains = static ReverbContainer Mountains =
@ -203,7 +211,8 @@ static ReverbContainer Mountains =
0x1100, 0x1100,
true, true,
false, false,
{0,17, 100.0f, 0.27f, -1000, -2500, 0, 1.49f, 0.21f, 1.0f, -2780, 0.300f, 0.0f,0.0f,0.0f, -1434, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 27.0f, 100.0f, 0x1f } {0,17, 100.0f, 0.27f, -1000, -2500, 0, 1.49f, 0.21f, 1.0f, -2780, 0.300f, 0.0f,0.0f,0.0f, -1434, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 27.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer City = static ReverbContainer City =
@ -213,7 +222,8 @@ static ReverbContainer City =
0x1000, 0x1000,
true, true,
false, false,
{0,16, 7.5f, 0.50f, -1000, -800, 0, 1.49f, 0.67f, 1.0f, -2273, 0.007f, 0.0f,0.0f,0.0f, -1691, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 50.0f, 100.0f, 0x3f } {0,16, 7.5f, 0.50f, -1000, -800, 0, 1.49f, 0.67f, 1.0f, -2273, 0.007f, 0.0f,0.0f,0.0f, -1691, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 50.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Forest = static ReverbContainer Forest =
@ -223,7 +233,8 @@ static ReverbContainer Forest =
0x0F00, 0x0F00,
true, true,
false, false,
{0,15, 38.0f, 0.30f, -1000, -3300, 0, 1.49f, 0.54f, 1.0f, -2560, 0.162f, 0.0f,0.0f,0.0f, -229, 0.088f, 0.0f,0.0f,0.0f, 0.125f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 79.0f, 100.0f, 0x3f } {0,15, 38.0f, 0.30f, -1000, -3300, 0, 1.49f, 0.54f, 1.0f, -2560, 0.162f, 0.0f,0.0f,0.0f, -229, 0.088f, 0.0f,0.0f,0.0f, 0.125f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 79.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Alley = static ReverbContainer Alley =
@ -233,7 +244,8 @@ static ReverbContainer Alley =
0x0E00, 0x0E00,
true, true,
false, false,
{0,14, 7.5f, 0.30f, -1000, -270, 0, 1.49f, 0.86f, 1.0f, -1204, 0.007f, 0.0f,0.0f,0.0f, -4, 0.011f, 0.0f,0.0f,0.0f, 0.125f, 0.95f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,14, 7.5f, 0.30f, -1000, -270, 0, 1.49f, 0.86f, 1.0f, -1204, 0.007f, 0.0f,0.0f,0.0f, -4, 0.011f, 0.0f,0.0f,0.0f, 0.125f, 0.95f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer StoneCorridor = static ReverbContainer StoneCorridor =
@ -243,7 +255,8 @@ static ReverbContainer StoneCorridor =
0x0D00, 0x0D00,
true, true,
false, false,
{0,13, 13.5f, 1.00f, -1000, -237, 0, 2.70f, 0.79f, 1.0f, -1214, 0.013f, 0.0f,0.0f,0.0f, 395, 0.020f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,13, 13.5f, 1.00f, -1000, -237, 0, 2.70f, 0.79f, 1.0f, -1214, 0.013f, 0.0f,0.0f,0.0f, 395, 0.020f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Hallway = static ReverbContainer Hallway =
@ -253,7 +266,8 @@ static ReverbContainer Hallway =
0x0C00, 0x0C00,
true, true,
false, false,
{0,12, 1.8f, 1.00f, -1000, -300, 0, 1.49f, 0.59f, 1.0f, -1219, 0.007f, 0.0f,0.0f,0.0f, 441, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,12, 1.8f, 1.00f, -1000, -300, 0, 1.49f, 0.59f, 1.0f, -1219, 0.007f, 0.0f,0.0f,0.0f, 441, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer CarpettedHallway = static ReverbContainer CarpettedHallway =
@ -263,7 +277,8 @@ static ReverbContainer CarpettedHallway =
0x0B00, 0x0B00,
true, true,
false, false,
{0,11, 1.9f, 1.00f, -1000, -4000, 0, 0.30f, 0.10f, 1.0f, -1831, 0.002f, 0.0f,0.0f,0.0f, -1630, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,11, 1.9f, 1.00f, -1000, -4000, 0, 0.30f, 0.10f, 1.0f, -1831, 0.002f, 0.0f,0.0f,0.0f, -1630, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Hangar = static ReverbContainer Hangar =
@ -273,7 +288,8 @@ static ReverbContainer Hangar =
0x0A00, 0x0A00,
true, true,
false, false,
{0,10, 50.3f, 1.00f, -1000, -1000, 0, 10.05f, 0.23f, 1.0f, -602, 0.020f, 0.0f,0.0f,0.0f, 198, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0,10, 50.3f, 1.00f, -1000, -1000, 0, 10.05f, 0.23f, 1.0f, -602, 0.020f, 0.0f,0.0f,0.0f, 198, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Arena = static ReverbContainer Arena =
@ -283,7 +299,8 @@ static ReverbContainer Arena =
0x0900, 0x0900,
true, true,
false, false,
{0, 9, 36.2f, 1.00f, -1000, -698, 0, 7.24f, 0.33f, 1.0f, -1166, 0.020f, 0.0f,0.0f,0.0f, 16, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 9, 36.2f, 1.00f, -1000, -698, 0, 7.24f, 0.33f, 1.0f, -1166, 0.020f, 0.0f,0.0f,0.0f, 16, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Cave = static ReverbContainer Cave =
@ -293,7 +310,8 @@ static ReverbContainer Cave =
0x0800, 0x0800,
true, true,
false, false,
{0, 8, 14.6f, 1.00f, -1000, 0, 0, 2.91f, 1.30f, 1.0f, -602, 0.015f, 0.0f,0.0f,0.0f, -302, 0.022f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f } {0, 8, 14.6f, 1.00f, -1000, 0, 0, 2.91f, 1.30f, 1.0f, -602, 0.015f, 0.0f,0.0f,0.0f, -302, 0.022f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f },
false
}; };
static ReverbContainer ConcertHall = static ReverbContainer ConcertHall =
@ -303,7 +321,8 @@ static ReverbContainer ConcertHall =
0x0700, 0x0700,
true, true,
false, false,
{0, 7, 19.6f, 1.00f, -1000, -500, 0, 3.92f, 0.70f, 1.0f, -1230, 0.020f, 0.0f,0.0f,0.0f, -2, 0.029f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 7, 19.6f, 1.00f, -1000, -500, 0, 3.92f, 0.70f, 1.0f, -1230, 0.020f, 0.0f,0.0f,0.0f, -2, 0.029f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Auditorium = static ReverbContainer Auditorium =
@ -313,7 +332,8 @@ static ReverbContainer Auditorium =
0x0600, 0x0600,
true, true,
false, false,
{0, 6, 21.6f, 1.00f, -1000, -476, 0, 4.32f, 0.59f, 1.0f, -789, 0.020f, 0.0f,0.0f,0.0f, -289, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 6, 21.6f, 1.00f, -1000, -476, 0, 4.32f, 0.59f, 1.0f, -789, 0.020f, 0.0f,0.0f,0.0f, -289, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer StoneRoom = static ReverbContainer StoneRoom =
@ -323,7 +343,8 @@ static ReverbContainer StoneRoom =
0x0500, 0x0500,
true, true,
false, false,
{0, 5, 11.6f, 1.00f, -1000, -300, 0, 2.31f, 0.64f, 1.0f, -711, 0.012f, 0.0f,0.0f,0.0f, 83, 0.017f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 5, 11.6f, 1.00f, -1000, -300, 0, 2.31f, 0.64f, 1.0f, -711, 0.012f, 0.0f,0.0f,0.0f, 83, 0.017f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer LivingRoom = static ReverbContainer LivingRoom =
@ -333,7 +354,8 @@ static ReverbContainer LivingRoom =
0x0400, 0x0400,
true, true,
false, false,
{0, 4, 2.5f, 1.00f, -1000, -6000, 0, 0.50f, 0.10f, 1.0f, -1376, 0.003f, 0.0f,0.0f,0.0f, -1104, 0.004f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 4, 2.5f, 1.00f, -1000, -6000, 0, 0.50f, 0.10f, 1.0f, -1376, 0.003f, 0.0f,0.0f,0.0f, -1104, 0.004f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Bathroom = static ReverbContainer Bathroom =
@ -343,7 +365,8 @@ static ReverbContainer Bathroom =
0x0300, 0x0300,
true, true,
false, false,
{0, 3, 1.4f, 1.00f, -1000, -1200, 0, 1.49f, 0.54f, 1.0f, -370, 0.007f, 0.0f,0.0f,0.0f, 1030, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 60.0f, 0x3f } {0, 3, 1.4f, 1.00f, -1000, -1200, 0, 1.49f, 0.54f, 1.0f, -370, 0.007f, 0.0f,0.0f,0.0f, 1030, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 60.0f, 0x3f },
false
}; };
static ReverbContainer Room = static ReverbContainer Room =
@ -353,7 +376,8 @@ static ReverbContainer Room =
0x0200, 0x0200,
true, true,
false, false,
{0, 2, 1.9f, 1.00f, -1000, -454, 0, 0.40f, 0.83f, 1.0f, -1646, 0.002f, 0.0f,0.0f,0.0f, 53, 0.003f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 2, 1.9f, 1.00f, -1000, -454, 0, 0.40f, 0.83f, 1.0f, -1646, 0.002f, 0.0f,0.0f,0.0f, 53, 0.003f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer PaddedCell = static ReverbContainer PaddedCell =
@ -363,7 +387,8 @@ static ReverbContainer PaddedCell =
0x0100, 0x0100,
true, true,
false, false,
{0, 1, 1.4f, 1.00f, -1000, -6000, 0, 0.17f, 0.10f, 1.0f, -1204, 0.001f, 0.0f,0.0f,0.0f, 207, 0.002f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 1, 1.4f, 1.00f, -1000, -6000, 0, 0.17f, 0.10f, 1.0f, -1204, 0.001f, 0.0f,0.0f,0.0f, 207, 0.002f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Generic = static ReverbContainer Generic =
@ -373,7 +398,8 @@ static ReverbContainer Generic =
0x0001, 0x0001,
true, true,
false, false,
{0, 0, 7.5f, 1.00f, -1000, -100, 0, 1.49f, 0.83f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f } {0, 0, 7.5f, 1.00f, -1000, -100, 0, 1.49f, 0.83f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f },
false
}; };
static ReverbContainer Off = static ReverbContainer Off =
@ -383,7 +409,8 @@ static ReverbContainer Off =
0x0000, 0x0000,
true, true,
false, false,
{0, 0, 7.5f, 1.00f, -10000, -10000, 0, 1.00f, 1.00f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 0.0f, 0.0f, 0x33f } {0, 0, 7.5f, 1.00f, -10000, -10000, 0, 1.00f, 1.00f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 0.0f, 0.0f, 0x33f },
false
}; };
ReverbContainer *DefaultEnvironments[26] = ReverbContainer *DefaultEnvironments[26] =

View file

@ -268,7 +268,7 @@ static const hexenseq_t HexenSequences[] = {
{ NAME_DoorCreak, { HexenDoorSeq(3), HexenLastSeq } }, { NAME_DoorCreak, { HexenDoorSeq(3), HexenLastSeq } },
{ NAME_DoorMetal2, { HexenDoorSeq(9), HexenLastSeq } }, { NAME_DoorMetal2, { HexenDoorSeq(9), HexenLastSeq } },
{ NAME_Wind, { HexenEnvSeq(10), HexenLastSeq } }, { NAME_Wind, { HexenEnvSeq(10), HexenLastSeq } },
{ NAME_None } { NAME_None, {NULL} }
}; };
static int SeqTrans[64*3]; static int SeqTrans[64*3];

View file

@ -172,7 +172,7 @@ static void CenterMouse ()
static void PostMouseMove (int x, int y) static void PostMouseMove (int x, int y)
{ {
static int lastx = 0, lasty = 0; static int lastx = 0, lasty = 0;
event_t ev = { 0 }; event_t ev = { 0,0,0,0,0,0,0 };
if (m_filter) if (m_filter)
{ {
@ -286,7 +286,7 @@ void MessagePump (const SDL_Event &sev)
{ {
static int lastx = 0, lasty = 0; static int lastx = 0, lasty = 0;
int x, y; int x, y;
event_t event = { 0, }; event_t event = { 0,0,0,0,0,0,0 };
switch (sev.type) switch (sev.type)
{ {

View file

@ -575,7 +575,7 @@ int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
if (close_style == 1) if (close_style == 1)
{ {
GtkTreeModel *model; GtkTreeModel *model;
GValue value = { 0, }; GValue value = { 0, { {0} } };
// Find out which IWAD was selected. // Find out which IWAD was selected.
gtk_tree_selection_get_selected (selection, &model, &iter); gtk_tree_selection_get_selected (selection, &model, &iter);

View file

@ -339,7 +339,7 @@ public:
Channel->setSpeakerMix(1, 1, 1, 1, 1, 1, 1, 1); Channel->setSpeakerMix(1, 1, 1, 1, 1, 1, 1, 1);
Channel->setVolume(volume); Channel->setVolume(volume);
// Ensure reverb is disabled. // Ensure reverb is disabled.
FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, }; FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
if (FMOD_OK == Channel->getReverbProperties(&reverb)) if (FMOD_OK == Channel->getReverbProperties(&reverb))
{ {
reverb.Room = -10000; reverb.Room = -10000;
@ -1666,7 +1666,7 @@ FISoundChannel *FMODSoundRenderer::StartSound(SoundHandle sfx, float vol, int pi
} }
if (flags & SNDF_NOREVERB) if (flags & SNDF_NOREVERB)
{ {
FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, }; FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
if (FMOD_OK == chan->getReverbProperties(&reverb)) if (FMOD_OK == chan->getReverbProperties(&reverb))
{ {
reverb.Room = -10000; reverb.Room = -10000;
@ -1786,7 +1786,7 @@ FISoundChannel *FMODSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener *
} }
if (flags & SNDF_NOREVERB) if (flags & SNDF_NOREVERB)
{ {
FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, }; FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
if (FMOD_OK == chan->getReverbProperties(&reverb)) if (FMOD_OK == chan->getReverbProperties(&reverb))
{ {
reverb.Room = -10000; reverb.Room = -10000;

View file

@ -245,7 +245,7 @@ void FTeam::ClearTeams ()
bool FTeam::IsValidTeam (unsigned int uiTeam) bool FTeam::IsValidTeam (unsigned int uiTeam)
{ {
if (uiTeam < 0 || uiTeam >= Teams.Size ()) if (uiTeam >= Teams.Size ())
return false; return false;
return true; return true;

View file

@ -816,7 +816,7 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int d
pnames >> numpatches; pnames >> numpatches;
// Check whether the amount of names reported is correct. // Check whether the amount of names reported is correct.
if (numpatches < 0) if ((signed)numpatches < 0)
{ {
Printf("Corrupt PNAMES lump found (negative amount of entries reported)"); Printf("Corrupt PNAMES lump found (negative amount of entries reported)");
return; return;

View file

@ -498,7 +498,7 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
case TEX_RGB: case TEX_RGB:
{ {
FCopyInfo inf = {OP_OVERWRITE, }; FCopyInfo inf = {OP_OVERWRITE, BLEND_NONE, {NULL}, 0, 0};
FBitmap bmp(buff, pitch, pitch/4, height); FBitmap bmp(buff, pitch, pitch/4, height);
CopyTrueColorPixels(&bmp, 0, 0, 0, &inf); CopyTrueColorPixels(&bmp, 0, 0, 0, &inf);
break; break;

View file

@ -1135,7 +1135,7 @@ int FTextureManager::CountLumpTextures (int lumpnum)
if (lumpnum >= 0) if (lumpnum >= 0)
{ {
FWadLump file = Wads.OpenLumpNum (lumpnum); FWadLump file = Wads.OpenLumpNum (lumpnum);
DWORD numtex; SDWORD numtex;
file >> numtex; file >> numtex;
return numtex >= 0 ? numtex : 0; return numtex >= 0 ? numtex : 0;

View file

@ -168,14 +168,14 @@ static void ParseShdr(SFFile *sf2, FileReader *f, DWORD chunkid, DWORD chunklen)
ListHandler INFOHandlers[] = ListHandler INFOHandlers[] =
{ {
{ ID_ifil, ParseIfil }, { ID_ifil, ParseIfil },
{ 0 } { 0, 0 }
}; };
ListHandler SdtaHandlers[] = ListHandler SdtaHandlers[] =
{ {
{ ID_smpl, ParseSmpl }, { ID_smpl, ParseSmpl },
{ ID_sm24, ParseSm24 }, { ID_sm24, ParseSm24 },
{ 0 } { 0, 0 }
}; };
ListHandler PdtaHandlers[] = ListHandler PdtaHandlers[] =
@ -189,7 +189,7 @@ ListHandler PdtaHandlers[] =
{ ID_imod, ParseMod }, { ID_imod, ParseMod },
{ ID_igen, ParseGen }, { ID_igen, ParseGen },
{ ID_shdr, ParseShdr }, { ID_shdr, ParseShdr },
{ 0 } { 0, 0 }
}; };
static double timecent_to_sec(SWORD timecent) static double timecent_to_sec(SWORD timecent)

View file

@ -2037,7 +2037,7 @@ void V_InitFontColors ()
{ {
TArray<FName> names; TArray<FName> names;
int lump, lastlump = 0; int lump, lastlump = 0;
TranslationParm tparm = { 0 }; // Silence GCC TranslationParm tparm = { 0, 0, {NULL}, {NULL} }; // Silence GCC (for real with -Wextra )
TArray<TranslationParm> parms; TArray<TranslationParm> parms;
TArray<TempParmInfo> parminfo; TArray<TempParmInfo> parminfo;
TArray<TempColorInfo> colorinfo; TArray<TempColorInfo> colorinfo;

View file

@ -841,7 +841,7 @@ void DFrameBuffer::DrawRateStuff ()
{ {
DWORD ms = I_FPSTime(); DWORD ms = I_FPSTime();
DWORD howlong = ms - LastMS; DWORD howlong = ms - LastMS;
if (howlong >= 0) if ((signed)howlong >= 0)
{ {
char fpsbuff[40]; char fpsbuff[40];
int chars; int chars;

View file

@ -1256,7 +1256,7 @@ int compress_lzma(Byte *out, unsigned int *outlen, const Byte *in, unsigned int
int compress_bzip2(Byte *out, unsigned int *outlen, const Byte *in, unsigned int inlen) int compress_bzip2(Byte *out, unsigned int *outlen, const Byte *in, unsigned int inlen)
{ {
if (BZ_OK == BZ2_bzBuffToBuffCompress(out, outlen, in, inlen, 9, 0, 0)) if (BZ_OK == BZ2_bzBuffToBuffCompress(out, outlen, (char *)in, inlen, 9, 0, 0))
{ {
return 0; return 0;
} }

View file

@ -1,7 +1,7 @@
cmake_minimum_required( VERSION 2.4 ) cmake_minimum_required( VERSION 2.4 )
if( CMAKE_COMPILER_IS_GNUC ) if( CMAKE_COMPILER_IS_GNUC )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
endif( CMAKE_COMPILER_IS_GNUC ) endif( CMAKE_COMPILER_IS_GNUC )
add_library( z add_library( z