diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt index e819f4cde..5c1255604 100644 --- a/bzip2/CMakeLists.txt +++ b/bzip2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) 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 ) add_definitions( -DBZ_NO_STDIO ) diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt index 0f1355336..7905f847a 100644 --- a/game-music-emu/CMakeLists.txt +++ b/game-music-emu/CMakeLists.txt @@ -7,7 +7,7 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) 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 ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" ) endif( NOT PROFILE ) diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt index 9ef4b9c3e..6fc394d8d 100644 --- a/gdtoa/CMakeLists.txt +++ b/gdtoa/CMakeLists.txt @@ -8,8 +8,8 @@ if( MSVC ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102" ) endif( MSVC ) -if( CMAKE_COMPILER_IS_GNUCXX ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" ) +if( CMAKE_COMPILER_IS_GNUCXX ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) endif( CMAKE_COMPILER_IS_GNUCXX ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/jpeg-6b/CMakeLists.txt b/jpeg-6b/CMakeLists.txt index 665e99d4a..c3a5f458c 100644 --- a/jpeg-6b/CMakeLists.txt +++ b/jpeg-6b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) 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 ) add_library( jpeg diff --git a/lzma/CMakeLists.txt b/lzma/CMakeLists.txt index b9b4bc047..6a2561c68 100644 --- a/lzma/CMakeLists.txt +++ b/lzma/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) 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 ) set( LZMA_FILES diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 33465a1fd..71fc1adf3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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_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. # Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid, diff --git a/src/c_bind.cpp b/src/c_bind.cpp index cceb8bd35..0aa8ddc19 100644 --- a/src/c_bind.cpp +++ b/src/c_bind.cpp @@ -124,7 +124,7 @@ static const FBinding DefBindings[] = { "pad_start", "pause" }, { "pad_back", "menu_main" }, { "lthumb", "crouch" }, - { NULL } + { NULL, NULL } }; static const FBinding DefRavenBindings[] = @@ -135,13 +135,13 @@ static const FBinding DefRavenBindings[] = { "pgdn", "+lookup" }, { "del", "+lookdown" }, { "end", "centerview" }, - { NULL } + { NULL, NULL } }; static const FBinding DefHereticBindings[] = { { "backspace", "use ArtiTomeOfPower" }, - { NULL } + { NULL, NULL } }; static const FBinding DefHexenBindings[] = @@ -156,7 +156,7 @@ static const FBinding DefHexenBindings[] = { "6", "use ArtiPork" }, { "5", "use ArtiInvulnerability2" }, { "scroll", "+showscores" }, - { NULL } + { NULL, NULL } }; static const FBinding DefStrifeBindings[] = @@ -167,7 +167,7 @@ static const FBinding DefStrifeBindings[] = { "z", "showpop 3" }, { "k", "showpop 2" }, { "q", "invquery" }, - { NULL } + { NULL, NULL } // not done // h - use health }; @@ -190,7 +190,7 @@ static const FBinding DefAutomapBindings[] = { "kp+", "+am_zoomin" }, { "mwheelup", "am_zoom 1.2" }, { "mwheeldown", "am_zoom -1.2" }, - { NULL } + { NULL, NULL } }; diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index e5fd308b5..e1260c014 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -309,7 +309,7 @@ static const struct { { "[PARS]", PatchPars }, { "[CODEPTR]", PatchCodePtrs }, { "[MUSIC]", PatchMusic }, - { NULL, }, + { NULL, NULL }, }; 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 Class", myoffsetof(struct DehInfo,KFAAC) }, { "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) }, - { NULL, } + { NULL, NULL } }; int result; @@ -1866,8 +1866,8 @@ static int PatchMisc (int dummy) player->health = deh.StartHealth; // 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; - if (index >= 0 && index < DropItemList.Size()) + int index = PClass::FindClass(NAME_DoomPlayer)->Meta.GetMetaInt (ACMETA_DropItems) - 1; + if (index >= 0 && index < (signed)DropItemList.Size()) { FDropItem * di = DropItemList[index]; while (di != NULL) diff --git a/src/d_net.cpp b/src/d_net.cpp index 2b97151a2..33a66c1b1 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2318,7 +2318,7 @@ void Net_DoCommand (int type, BYTE **stream, int player) for (i = 0; i < argn; ++i) { int argval = ReadLong(stream); - if (i < countof(arg)) + if ((unsigned)i < countof(arg)) { arg[i] = argval; } @@ -2337,7 +2337,7 @@ void Net_DoCommand (int type, BYTE **stream, int player) for (i = 0; i < argn; ++i) { int argval = ReadLong(stream); - if (i < countof(arg)) + if ((unsigned)i < countof(arg)) { arg[i] = argval; } @@ -2426,7 +2426,7 @@ void Net_DoCommand (int type, BYTE **stream, int player) { 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); players[player].weapons.AddSlot(slot, wpn, player == consoleplayer); diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 03a8d2ded..232e91f30 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -242,7 +242,7 @@ const PClass *PClass::FindClass (FName zaname) } else if (lexx == 0) { - return cls->Size<0? NULL : cls; + return cls; } else { diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index b4183ef2f..cee0acbe7 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -231,7 +231,10 @@ void level_info_t::Reset() partime = 0; sucktime = 0; flags = 0; - flags2 = gameinfo.gametype == GAME_Hexen? 0 : LEVEL2_LAXMONSTERACTIVATION; + if (gameinfo.gametype == GAME_Hexen) + flags2 = 0; + else + flags2 = LEVEL2_LAXMONSTERACTIVATION; Music = ""; LevelName = ""; strcpy (fadetable, "COLORMAP"); @@ -1213,7 +1216,7 @@ MapFlagHandlers[] = { "deathslideshow", MITYPE_SETFLAG2, 0, 0 }, { "strictmonsteractivation", MITYPE_CLRFLAG2, 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 }, { "monsterfallingdamage", MITYPE_SETFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 }, { "nomonsterfallingdamage", MITYPE_CLRFLAG2, LEVEL2_MONSTERFALLINGDAMAGE, 0 }, @@ -1241,40 +1244,40 @@ MapFlagHandlers[] = { "noautosavehint", MITYPE_SETFLAG2, LEVEL2_NOAUTOSAVEHINT, 0 }, { "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 }, { "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes - { "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX}, - { "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX}, - { "compat_limitpain", MITYPE_COMPATFLAG, COMPATF_LIMITPAIN}, - { "compat_nopassover", MITYPE_COMPATFLAG, COMPATF_NO_PASSMOBJ}, - { "compat_notossdrops", MITYPE_COMPATFLAG, COMPATF_NOTOSSDROPS}, - { "compat_useblocking", MITYPE_COMPATFLAG, COMPATF_USEBLOCKING}, - { "compat_nodoorlight", MITYPE_COMPATFLAG, COMPATF_NODOORLIGHT}, - { "compat_ravenscroll", MITYPE_COMPATFLAG, COMPATF_RAVENSCROLL}, - { "compat_soundtarget", MITYPE_COMPATFLAG, COMPATF_SOUNDTARGET}, - { "compat_dehhealth", MITYPE_COMPATFLAG, COMPATF_DEHHEALTH}, - { "compat_trace", MITYPE_COMPATFLAG, COMPATF_TRACE}, - { "compat_dropoff", MITYPE_COMPATFLAG, COMPATF_DROPOFF}, - { "compat_boomscroll", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL}, - { "compat_invisibility", MITYPE_COMPATFLAG, COMPATF_INVISIBILITY}, - { "compat_silent_instant_floors", MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS}, - { "compat_sectorsounds", MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS}, - { "compat_missileclip", MITYPE_COMPATFLAG, COMPATF_MISSILECLIP}, - { "compat_crossdropoff", MITYPE_COMPATFLAG, COMPATF_CROSSDROPOFF}, - { "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH}, - { "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR}, - { "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM}, - { "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE}, - { "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS}, - { "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS}, - { "compat_spritesort", MITYPE_COMPATFLAG, COMPATF_SPRITESORT}, - { "compat_light", MITYPE_COMPATFLAG, COMPATF_LIGHT}, - { "compat_polyobj", MITYPE_COMPATFLAG, COMPATF_POLYOBJ}, + { "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 }, + { "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 }, + { "compat_limitpain", MITYPE_COMPATFLAG, COMPATF_LIMITPAIN, 0 }, + { "compat_nopassover", MITYPE_COMPATFLAG, COMPATF_NO_PASSMOBJ, 0 }, + { "compat_notossdrops", MITYPE_COMPATFLAG, COMPATF_NOTOSSDROPS, 0 }, + { "compat_useblocking", MITYPE_COMPATFLAG, COMPATF_USEBLOCKING, 0 }, + { "compat_nodoorlight", MITYPE_COMPATFLAG, COMPATF_NODOORLIGHT, 0 }, + { "compat_ravenscroll", MITYPE_COMPATFLAG, COMPATF_RAVENSCROLL, 0 }, + { "compat_soundtarget", MITYPE_COMPATFLAG, COMPATF_SOUNDTARGET, 0 }, + { "compat_dehhealth", MITYPE_COMPATFLAG, COMPATF_DEHHEALTH, 0 }, + { "compat_trace", MITYPE_COMPATFLAG, COMPATF_TRACE, 0 }, + { "compat_dropoff", MITYPE_COMPATFLAG, COMPATF_DROPOFF, 0 }, + { "compat_boomscroll", MITYPE_COMPATFLAG, COMPATF_BOOMSCROLL, 0 }, + { "compat_invisibility", MITYPE_COMPATFLAG, COMPATF_INVISIBILITY, 0 }, + { "compat_silent_instant_floors", MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS, 0 }, + { "compat_sectorsounds", MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS, 0 }, + { "compat_missileclip", MITYPE_COMPATFLAG, COMPATF_MISSILECLIP, 0 }, + { "compat_crossdropoff", MITYPE_COMPATFLAG, COMPATF_CROSSDROPOFF, 0 }, + { "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH, 0 }, + { "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR, 0 }, + { "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM, 0 }, + { "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE, 0 }, + { "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS, 0 }, + { "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS, 0 }, + { "compat_spritesort", MITYPE_COMPATFLAG, COMPATF_SPRITESORT, 0 }, + { "compat_light", MITYPE_COMPATFLAG, COMPATF_LIGHT, 0 }, + { "compat_polyobj", MITYPE_COMPATFLAG, COMPATF_POLYOBJ, 0 }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end3_track", MITYPE_EATNEXT, 0, 0 }, { "cd_intermission_track", MITYPE_EATNEXT, 0, 0 }, { "cd_title_track", MITYPE_EATNEXT, 0, 0 }, - { NULL, MITYPE_IGNORE, 0} + { NULL, MITYPE_IGNORE, 0, 0} }; //========================================================================== diff --git a/src/m_joy.cpp b/src/m_joy.cpp index d89129f5d..027c699c7 100644 --- a/src/m_joy.cpp +++ b/src/m_joy.cpp @@ -261,7 +261,7 @@ void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, in int changed = oldbuttons ^ newbuttons; if (changed != 0) { - event_t ev = { 0 }; + event_t ev = { 0, 0, 0, 0, 0, 0, 0 }; int mask = 1; 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; if (changed != 0) { - event_t ev = { 0 }; + event_t ev = { 0, 0, 0, 0, 0, 0, 0 }; int mask = 1; for (int j = 0; j < numbuttons; mask <<= 1, ++j) { diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index cbeb23f77..47643e4cd 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -213,6 +213,8 @@ void FNodeBuilder::CreateSubsectorsForReal () sub.sector = NULL; sub.polys = NULL; sub.BSP = NULL; + sub.flags = 0; + sub.render_sector = NULL; for (i = 0; i < SubsectorSets.Size(); ++i) { diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 41f627bd1..83740009a 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1239,7 +1239,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len) module = StaticLoadModule (lump); } if (module != NULL) Imports.Push (module); - do ; while (parse[++i]); + do {;} while (parse[++i]); } ++i; } @@ -1302,7 +1302,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len) { MapVars[varNum] = &lib->MapVarStore[impNum]; } - do ; while (parse[++j]); + do {;} while (parse[++j]); ++j; } } @@ -1331,7 +1331,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len) ModuleName, expectedSize); } } - do ; while (*++parse); + do {;} while (*++parse); ++parse; } } diff --git a/src/p_buildmap.cpp b/src/p_buildmap.cpp index afc6d5277..90180b0c2 100644 --- a/src/p_buildmap.cpp +++ b/src/p_buildmap.cpp @@ -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 short(Scale ((2048-angle)&2047, 360, 2048)), 1, // angle, type + 0, 0, // Skillfilter, Classfilter 7|MTF_SINGLE|224, // flags - // special and args are 0 + 0, {NULL}, NULL // special is 0, args and Conversation are NULL }; *start = mt; diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index f9479c0cc..64708aa98 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -361,7 +361,7 @@ static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeaker type = GetStrifeType (speech.SpeakerType); node->SpeakerType = type; - if (speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType) + if ((signed)(speech.SpeakerType) >= 0 && prevSpeakerType != speech.SpeakerType) { if (type != NULL) { @@ -434,7 +434,7 @@ static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeaker type = GetStrifeType (speech.SpeakerType); node->SpeakerType = type; - if (speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType) + if ((signed)speech.SpeakerType >= 0 && prevSpeakerType != speech.SpeakerType) { if (type != NULL) { diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 0ecb53798..c5ea4e2d1 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -93,7 +93,7 @@ static const struct ColorList { {&dred, 80, 0, 0 }, {&maroon1, 154, 49, 49 }, {&maroon2, 125, 24, 24 }, - {NULL} + {NULL, 0, 0, 0 } }; void P_InitEffects () diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 4d34c7047..8f623486d 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1009,7 +1009,8 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime) { vertexes, numvertexes, sides, numsides, - lines, numlines + lines, numlines, + 0, 0, 0, 0 }; leveldata.FindMapBounds (); FNodeBuilder builder (leveldata, polyspots, anchors, true); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index f52be1fc5..49c1d026c 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5540,7 +5540,7 @@ FDropItem *AActor::GetDropItems() { unsigned int index = GetClass()->Meta.GetMetaInt (ACMETA_DropItems) - 1; - if (index >= 0 && index < DropItemList.Size()) + if (index < DropItemList.Size()) { return DropItemList[index]; } diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 1b691cfee..79c27c6c1 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3722,7 +3722,8 @@ void P_SetupLevel (char *lumpname, int position) { vertexes, numvertexes, sides, numsides, - lines, numlines + lines, numlines, + 0, 0, 0, 0 }; leveldata.FindMapBounds (); // We need GL nodes if am_textured is on. diff --git a/src/p_writemap.cpp b/src/p_writemap.cpp index 7a052cb3b..a4e445118 100644 --- a/src/p_writemap.cpp +++ b/src/p_writemap.cpp @@ -63,8 +63,8 @@ CCMD (dumpmap) return; } - wadinfo_t header = { PWAD_ID, 12 }; - wadlump_t lumps[12] = { {0} }; + wadinfo_t header = { PWAD_ID, 12, 0 }; + wadlump_t lumps[12] = { {0, 0, {NULL}} }; fseek (file, 12, SEEK_SET); @@ -95,7 +95,7 @@ CCMD (dumpmap) 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; mt.x = LittleShort(short(mo->x >> FRACBITS)); diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index ca6b0ffef..a69b0170b 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1329,10 +1329,8 @@ void R_Subsector (subsector_t *sub) fake3D = FAKE3D_FAKECEILING; tempsec = *fakeFloor->model; tempsec.ceilingplane = *fakeFloor->bottom.plane; - if (!(fakeFloor->flags & FF_THISINSIDE) && - !(fakeFloor->flags & FF_INVERTSECTOR) || - fakeFloor->flags & FF_THISINSIDE && - fakeFloor->flags & FF_INVERTSECTOR) + if ((!(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)); } diff --git a/src/r_main.cpp b/src/r_main.cpp index 49b437380..fd7aa8342 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -959,7 +959,7 @@ static InterpolationViewer *FindPastViewer (AActor *actor) } // 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.otic = -1; return &PastViewers[PastViewers.Push (iview)]; diff --git a/src/r_things.cpp b/src/r_things.cpp index 5666c3adc..d1cfef9e9 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -480,7 +480,7 @@ void R_InitSpriteDefs () while (hash != -1) { VHasher *vh = &vhashes[hash]; - if (vh->Name == intname) + if (vh->Name == (int)intname) { FVoxel *vox = R_LoadKVX(hash); if (vox == NULL) @@ -612,7 +612,7 @@ static bool VOX_ReadSpriteNames(FScanner &sc, TArray &vsprites) spritename = *(int *)sc.String; for (i = 0; i < sprites.Size(); ++i) { - if (sprites[i].dwName == spritename) + if ((int)sprites[i].dwName == spritename) { 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"); OffscreenCoverageBuffer = new FCoverageBuffer(width); } - else if (OffscreenCoverageBuffer->NumLists != width) + else if (OffscreenCoverageBuffer->NumLists != (unsigned)width) { delete OffscreenCoverageBuffer; OffscreenCoverageBuffer = new FCoverageBuffer(width); diff --git a/src/s_environment.cpp b/src/s_environment.cpp index 001b3d4ed..98060b4a9 100644 --- a/src/s_environment.cpp +++ b/src/s_environment.cpp @@ -123,7 +123,8 @@ static ReverbContainer Psychotic = 0x1900, true, 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 = @@ -133,7 +134,8 @@ static ReverbContainer Dizzy = 0x1800, true, 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 = @@ -143,7 +145,8 @@ static ReverbContainer Drugged = 0x1700, true, 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 = @@ -153,7 +156,8 @@ static ReverbContainer Underwater = 0x1600, true, 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 = @@ -163,7 +167,8 @@ static ReverbContainer SewerPipe = 0x1500, true, 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 = @@ -173,7 +178,8 @@ static ReverbContainer ParkingLot = 0x1400, true, 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 = @@ -183,7 +189,8 @@ static ReverbContainer Plain = 0x1300, true, 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 = @@ -193,7 +200,8 @@ static ReverbContainer Quarry = 0x1200, true, 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 = @@ -203,7 +211,8 @@ static ReverbContainer Mountains = 0x1100, true, 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 = @@ -213,7 +222,8 @@ static ReverbContainer City = 0x1000, true, 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 = @@ -223,7 +233,8 @@ static ReverbContainer Forest = 0x0F00, true, 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 = @@ -233,7 +244,8 @@ static ReverbContainer Alley = 0x0E00, true, 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 = @@ -243,7 +255,8 @@ static ReverbContainer StoneCorridor = 0x0D00, true, 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 = @@ -253,7 +266,8 @@ static ReverbContainer Hallway = 0x0C00, true, 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 = @@ -263,7 +277,8 @@ static ReverbContainer CarpettedHallway = 0x0B00, true, 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 = @@ -273,7 +288,8 @@ static ReverbContainer Hangar = 0x0A00, true, 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 = @@ -283,7 +299,8 @@ static ReverbContainer Arena = 0x0900, true, 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 = @@ -293,7 +310,8 @@ static ReverbContainer Cave = 0x0800, true, 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 = @@ -303,7 +321,8 @@ static ReverbContainer ConcertHall = 0x0700, true, 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 = @@ -313,7 +332,8 @@ static ReverbContainer Auditorium = 0x0600, true, 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 = @@ -323,7 +343,8 @@ static ReverbContainer StoneRoom = 0x0500, true, 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 = @@ -333,7 +354,8 @@ static ReverbContainer LivingRoom = 0x0400, true, 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 = @@ -343,7 +365,8 @@ static ReverbContainer Bathroom = 0x0300, true, 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 = @@ -353,7 +376,8 @@ static ReverbContainer Room = 0x0200, true, 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 = @@ -363,7 +387,8 @@ static ReverbContainer PaddedCell = 0x0100, true, 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 = @@ -373,7 +398,8 @@ static ReverbContainer Generic = 0x0001, true, 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 = @@ -383,7 +409,8 @@ static ReverbContainer Off = 0x0000, true, 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] = diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index da02bcab4..f01d8c29d 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -268,7 +268,7 @@ static const hexenseq_t HexenSequences[] = { { NAME_DoorCreak, { HexenDoorSeq(3), HexenLastSeq } }, { NAME_DoorMetal2, { HexenDoorSeq(9), HexenLastSeq } }, { NAME_Wind, { HexenEnvSeq(10), HexenLastSeq } }, - { NAME_None } + { NAME_None, {NULL} } }; static int SeqTrans[64*3]; diff --git a/src/sdl/i_input.cpp b/src/sdl/i_input.cpp index 0e67944f5..2d8602824 100644 --- a/src/sdl/i_input.cpp +++ b/src/sdl/i_input.cpp @@ -172,7 +172,7 @@ static void CenterMouse () static void PostMouseMove (int x, int y) { static int lastx = 0, lasty = 0; - event_t ev = { 0 }; + event_t ev = { 0,0,0,0,0,0,0 }; if (m_filter) { @@ -286,7 +286,7 @@ void MessagePump (const SDL_Event &sev) { static int lastx = 0, lasty = 0; int x, y; - event_t event = { 0, }; + event_t event = { 0,0,0,0,0,0,0 }; switch (sev.type) { diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 49628eef4..5a7d89e8a 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -575,7 +575,7 @@ int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad) if (close_style == 1) { GtkTreeModel *model; - GValue value = { 0, }; + GValue value = { 0, { {0} } }; // Find out which IWAD was selected. gtk_tree_selection_get_selected (selection, &model, &iter); diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 182ba488d..308e6db9e 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -339,7 +339,7 @@ public: Channel->setSpeakerMix(1, 1, 1, 1, 1, 1, 1, 1); Channel->setVolume(volume); // 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)) { reverb.Room = -10000; @@ -1666,7 +1666,7 @@ FISoundChannel *FMODSoundRenderer::StartSound(SoundHandle sfx, float vol, int pi } 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)) { reverb.Room = -10000; @@ -1786,7 +1786,7 @@ FISoundChannel *FMODSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener * } 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)) { reverb.Room = -10000; diff --git a/src/teaminfo.cpp b/src/teaminfo.cpp index f5c3c35e2..46c3c4b61 100644 --- a/src/teaminfo.cpp +++ b/src/teaminfo.cpp @@ -245,7 +245,7 @@ void FTeam::ClearTeams () bool FTeam::IsValidTeam (unsigned int uiTeam) { - if (uiTeam < 0 || uiTeam >= Teams.Size ()) + if (uiTeam >= Teams.Size ()) return false; return true; diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 76a2dd612..0ee8d7d18 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -816,7 +816,7 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int d pnames >> numpatches; // 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)"); return; diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 576c30de9..4a649e061 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -498,7 +498,7 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt) case TEX_RGB: { - FCopyInfo inf = {OP_OVERWRITE, }; + FCopyInfo inf = {OP_OVERWRITE, BLEND_NONE, {NULL}, 0, 0}; FBitmap bmp(buff, pitch, pitch/4, height); CopyTrueColorPixels(&bmp, 0, 0, 0, &inf); break; diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 72eb59f29..88319c360 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -1135,7 +1135,7 @@ int FTextureManager::CountLumpTextures (int lumpnum) if (lumpnum >= 0) { FWadLump file = Wads.OpenLumpNum (lumpnum); - DWORD numtex; + SDWORD numtex; file >> numtex; return numtex >= 0 ? numtex : 0; diff --git a/src/timidity/instrum_sf2.cpp b/src/timidity/instrum_sf2.cpp index a455bbdee..dae330644 100644 --- a/src/timidity/instrum_sf2.cpp +++ b/src/timidity/instrum_sf2.cpp @@ -168,14 +168,14 @@ static void ParseShdr(SFFile *sf2, FileReader *f, DWORD chunkid, DWORD chunklen) ListHandler INFOHandlers[] = { { ID_ifil, ParseIfil }, - { 0 } + { 0, 0 } }; ListHandler SdtaHandlers[] = { { ID_smpl, ParseSmpl }, { ID_sm24, ParseSm24 }, - { 0 } + { 0, 0 } }; ListHandler PdtaHandlers[] = @@ -189,7 +189,7 @@ ListHandler PdtaHandlers[] = { ID_imod, ParseMod }, { ID_igen, ParseGen }, { ID_shdr, ParseShdr }, - { 0 } + { 0, 0 } }; static double timecent_to_sec(SWORD timecent) diff --git a/src/v_font.cpp b/src/v_font.cpp index 9a2e6c8f0..04ea9f978 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -2037,7 +2037,7 @@ void V_InitFontColors () { TArray names; int lump, lastlump = 0; - TranslationParm tparm = { 0 }; // Silence GCC + TranslationParm tparm = { 0, 0, {NULL}, {NULL} }; // Silence GCC (for real with -Wextra ) TArray parms; TArray parminfo; TArray colorinfo; diff --git a/src/v_video.cpp b/src/v_video.cpp index 1986a2a97..deb53c6de 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -841,7 +841,7 @@ void DFrameBuffer::DrawRateStuff () { DWORD ms = I_FPSTime(); DWORD howlong = ms - LastMS; - if (howlong >= 0) + if ((signed)howlong >= 0) { char fpsbuff[40]; int chars; diff --git a/tools/zipdir/zipdir.c b/tools/zipdir/zipdir.c index ae4738b04..9b521bedf 100644 --- a/tools/zipdir/zipdir.c +++ b/tools/zipdir/zipdir.c @@ -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) { - 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; } diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 4a614c7f2..5992b7bc6 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) 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 ) add_library( z