diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f9f349257..f46b28d88 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,11 @@ -March 25, 2009 (Changes by Graf Zahl) +March 25, 2009 +- Changed gameinfo_t and gameborder_t to be named structs instead of + typedef'ed anonymous structs. +- Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. +- Fixed: SBARINFO did not recognize 5:4 aspect ratio. +- Fixed: screenshot_dir was ignored. + +March 25, 2009 (Changes by Graf Zahl) - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when diff --git a/src/g_shared/sbarinfo.h b/src/g_shared/sbarinfo.h index daa136095..539d6a7b5 100644 --- a/src/g_shared/sbarinfo.h +++ b/src/g_shared/sbarinfo.h @@ -275,7 +275,7 @@ enum //aspect ratios ASPECTRATIO_4_3 = 0, ASPECTRATIO_16_9 = 1, ASPECTRATIO_16_10 = 2, - ASPECTRATIO_5_4 = 3, + ASPECTRATIO_5_4 = 4, }; enum //Key words diff --git a/src/gi.h b/src/gi.h index 73a7d946f..0e3ad50a2 100644 --- a/src/gi.h +++ b/src/gi.h @@ -47,7 +47,7 @@ extern const char *GameNames[17]; -typedef struct +struct gameborder_t { BYTE offset; BYTE size; @@ -59,9 +59,9 @@ typedef struct char bl[8]; char b[8]; char br[8]; -} gameborder_t; +}; -typedef struct +struct gameinfo_t { int flags; EGameType gametype; @@ -94,7 +94,7 @@ typedef struct FString intermissionMusic; const char *GetFinalePage(unsigned int num) const; -} gameinfo_t; +}; extern gameinfo_t gameinfo; diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 0ce267d1c..c68c75453 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -648,7 +648,7 @@ void M_ScreenShot (const char *filename) { size_t dirlen; autoname = Args->CheckValue("-shotdir"); - if (autoname == NULL) + if (autoname.IsEmpty()) { autoname = screenshot_dir; } @@ -671,6 +671,7 @@ void M_ScreenShot (const char *filename) } } autoname = NicePath(autoname); + CreatePath(autoname); if (!FindFreeName (autoname, writepcx ? "pcx" : "png")) { Printf ("M_ScreenShot: Delete some screenshots\n"); @@ -682,7 +683,6 @@ void M_ScreenShot (const char *filename) autoname = filename; DefaultExtension (autoname, writepcx ? ".pcx" : ".png"); } - CreatePath(screenshot_dir); // save the screenshot const BYTE *buffer; diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 5adcbdbbb..bd3f47a80 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -779,8 +779,8 @@ void P_AutoUseHealth(player_t *player, int saveHealth) { int mode = static_cast(inv)->autousemode; - if (mode == 0) NormalHealthItems.Push(inv); - else if (mode == 1) LargeHealthItems.Push(inv); + if (mode == 1) NormalHealthItems.Push(inv); + else if (mode == 2) LargeHealthItems.Push(inv); } }