From 051a394f476bbf7578d9400aec3b18132b5469b7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 20 Feb 2017 00:22:36 +0100 Subject: [PATCH 1/2] - fixed some mess in the graphics organization for the Strife status bar. This alternatingly loaded two different patch sets but it was entirely unclear which was supposed to be loaded when so they now are merged into one. It should have been two different variables from the start. --- src/g_statusbar/sbar.h | 10 ---------- src/g_statusbar/strife_sbar.cpp | 21 +++++---------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/src/g_statusbar/sbar.h b/src/g_statusbar/sbar.h index 3c911e693..1e8af1514 100644 --- a/src/g_statusbar/sbar.h +++ b/src/g_statusbar/sbar.h @@ -404,16 +404,6 @@ public: double CrosshairSize; double Displacement; - enum - { - imgLAME = 0, - imgNEGATIVE = 1, - imgINumbers = 2, - imgBNEGATIVE = 12, - imgBNumbers = 13, - imgSmNumbers = 23, - NUM_BASESB_IMAGES = 33 - }; FImageCollection Images; player_t *CPlayer; diff --git a/src/g_statusbar/strife_sbar.cpp b/src/g_statusbar/strife_sbar.cpp index 177117eb2..972657482 100644 --- a/src/g_statusbar/strife_sbar.cpp +++ b/src/g_statusbar/strife_sbar.cpp @@ -186,18 +186,6 @@ class DStrifeStatusBar : public DBaseStatusBar public: DStrifeStatusBar () : DBaseStatusBar (32) { - static const char *sharedLumpNames[] = - { - NULL, NULL, "INVFONY0", "INVFONY1", "INVFONY2", - "INVFONY3", "INVFONY4", "INVFONY5", "INVFONY6", "INVFONY7", - "INVFONY8", "INVFONY9", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, "INVFONG0", "INVFONG1", - "INVFONG2", "INVFONG3", "INVFONG4", "INVFONG5", "INVFONG6", - "INVFONG7", "INVFONG8", "INVFONG9" - }; - - DBaseStatusBar::Images.Init (sharedLumpNames, NUM_BASESB_IMAGES); DoCommonInit (); } @@ -301,10 +289,11 @@ private: "INVFONY0", "INVFONY1", "INVFONY2", "INVFONY3", "INVFONY4", "INVFONY5", "INVFONY6", "INVFONY7", "INVFONY8", "INVFONY9", "INVFONY%", - "I_COMM", "I_MDKT", "I_ARM1", "I_ARM2" + "I_COMM", "I_MDKT", "I_ARM1", "I_ARM2", nullptr + }; - Images.Init (strifeLumpNames, NUM_STRIFESB_IMAGES); + Images.Init (strifeLumpNames, countof(strifeLumpNames)); CursorImage = Images[imgINVCURS] != NULL ? imgINVCURS : imgCURSOR01; @@ -834,8 +823,8 @@ private: imgMEDI, imgARM1, imgARM2, - - NUM_STRIFESB_IMAGES + imgNEGATIVE, + imgINumbers = imgFONG0, }; FImageCollection Images; From bb6e667f33adddb024fa38a3f1984a1ff273724b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 20 Feb 2017 01:42:53 +0100 Subject: [PATCH 2/2] - removed some unneeded version.h #includes. --- src/g_statusbar/sbarinfo.cpp | 1 - src/gl/compatibility/gl_20.cpp | 1 - src/menu/menu.h | 1 - src/scripting/decorate/thingdef_parse.cpp | 1 - src/scripting/decorate/thingdef_states.cpp | 1 - src/scripting/zscript/zcc_compile.cpp | 1 - 6 files changed, 6 deletions(-) diff --git a/src/g_statusbar/sbarinfo.cpp b/src/g_statusbar/sbarinfo.cpp index 2fd21737f..5096ee813 100644 --- a/src/g_statusbar/sbarinfo.cpp +++ b/src/g_statusbar/sbarinfo.cpp @@ -54,7 +54,6 @@ #include "v_palette.h" #include "p_acs.h" #include "gstrings.h" -#include "version.h" #include "cmdlib.h" #include "g_levellocals.h" diff --git a/src/gl/compatibility/gl_20.cpp b/src/gl/compatibility/gl_20.cpp index eeb5572c1..7fc8b783b 100644 --- a/src/gl/compatibility/gl_20.cpp +++ b/src/gl/compatibility/gl_20.cpp @@ -34,7 +34,6 @@ #include "doomtype.h" #include "m_argv.h" #include "zstring.h" -#include "version.h" #include "i_system.h" #include "v_text.h" #include "r_utility.h" diff --git a/src/menu/menu.h b/src/menu/menu.h index 8922147e1..6d7bdc927 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -9,7 +9,6 @@ #include "r_data/r_translate.h" #include "c_cvars.h" #include "v_font.h" -#include "version.h" #include "textures/textures.h" EXTERN_CVAR(Float, snd_menuvolume) diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index 991577f68..e444d30a9 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -52,7 +52,6 @@ #include "backend/codegen.h" #include "w_wad.h" #include "v_video.h" -#include "version.h" #include "v_text.h" #include "m_argv.h" diff --git a/src/scripting/decorate/thingdef_states.cpp b/src/scripting/decorate/thingdef_states.cpp index 63269eeeb..74c67cf84 100644 --- a/src/scripting/decorate/thingdef_states.cpp +++ b/src/scripting/decorate/thingdef_states.cpp @@ -54,7 +54,6 @@ #include "i_system.h" #include "colormatcher.h" #include "backend/codegen.h" -#include "version.h" #include "templates.h" #include "backend/vmbuilder.h" diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index c802dda36..29f82d90e 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -49,7 +49,6 @@ #include "i_system.h" #include "gdtoa.h" #include "backend/vmbuilder.h" -#include "version.h" static int GetIntConst(FxExpression *ex, FCompileContext &ctx) {