From 43ddce519c863912248a9c74a3e79f9befeaafb4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 19 Dec 2006 16:08:48 +0000 Subject: [PATCH] - Fixed: Inventory.Icon printed error message for all the missing icons in Strife's teaser. - Fixed: st_start.cpp needed a #define _WIN32_WINNT 0x0501. - Fixed a few uninitialized variables warnings for GCC. SVN r418 (trunk) --- docs/rh-log.txt | 7 +++++++ src/g_doom/doom_sbar.cpp | 2 +- src/thingdef.cpp | 7 ++++++- src/v_font.cpp | 2 +- src/w_wad.cpp | 2 +- src/win32/st_start.cpp | 1 + 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0eb94e690..d05b79ab1 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,10 @@ +December 19, 2006 (Changes by Graf Zahl) +- Fixed: Inventory.Icon printed error message for all the missing icons in + Strife's teaser. +- Fixed: st_start.cpp needed a + #define _WIN32_WINNT 0x0501. +- Fixed a few uninitialized variables warnings for GCC. + December 18, 2006 - Reorganized the network startup loops so now they are event driven. There is a single function that gets called to drive it, and it uses callbacks to diff --git a/src/g_doom/doom_sbar.cpp b/src/g_doom/doom_sbar.cpp index a5892fe05..9597c380c 100644 --- a/src/g_doom/doom_sbar.cpp +++ b/src/g_doom/doom_sbar.cpp @@ -845,7 +845,7 @@ private: FaceIndex = CalcPainOffset() + ST_OUCHOFFSET; FacePriority = 8; } - else + else if (CPlayer->mo != NULL) { badguyangle = R_PointToAngle2(CPlayer->mo->x, CPlayer->mo->y, diff --git a/src/thingdef.cpp b/src/thingdef.cpp index 489a584a8..7759c7be8 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -3414,8 +3414,13 @@ static void InventoryIcon (AInventory *defaults, Baggage &bag) defaults->Icon = TexMan.AddPatch (sc_String, ns_sprites); if (defaults->Icon<=0) { - if (bag.Info->GameFilter == GAME_Any || bag.Info->GameFilter & gameinfo.gametype) + // Don't print warnings if the item is for another game or if this is a shareware IWAD. + // Strife's teaser doesn't contain all the icon graphics of the full game. + if ((bag.Info->GameFilter == GAME_Any || bag.Info->GameFilter & gameinfo.gametype) && + !(gameinfo.flags&GI_SHAREWARE)) + { Printf("Icon '%s' for '%s' not found\n", sc_String, bag.Info->Class->TypeName.GetChars()); + } } } } diff --git a/src/v_font.cpp b/src/v_font.cpp index 135052300..2028dc758 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -1592,7 +1592,7 @@ void V_InitFontColors () { TArray names; int lump, lastlump = 0; - TranslationParm tparm; + TranslationParm tparm = { 0 }; // Silence GCC TArray parms; TArray parminfo; TArray colorinfo; diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 45e68521f..6e6ed1eb1 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -283,7 +283,7 @@ int FWadCollection::AddExternalFile(const char *filename) LumpRecord lump; lump.fullname = copystring(filename); - lump.name[0]=0; + memset(lump.name, 0, sizeof(lump.name)); lump.wadnum=-1; lump.flags = LUMPF_EXTERNAL; lump.position = 0; diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index ea965bba0..60ffd2f45 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -33,6 +33,7 @@ */ #define WIN32_LEAN_AND_MEAN +#define _WIN32_WINNT 0x0501 // required to get the MARQUEE defines #include #include #include