From f68ee5c4e5e33abae34e36a1f295954b1b144b9e Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Sat, 21 Sep 2019 15:22:42 +0200 Subject: [PATCH] Added an enum for g_GameFlags and a few comments in CampLoop Signed-off-by: Gabriel Ravier --- src/ArmsItem.cpp | 4 +++- src/Game.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ArmsItem.cpp b/src/ArmsItem.cpp index 4fcec026..8221b7ad 100644 --- a/src/ArmsItem.cpp +++ b/src/ArmsItem.cpp @@ -435,6 +435,7 @@ int CampLoop() gCampActive = FALSE; gSelectedItem = 0; + // Compute current amount of weapons arms_num = 0; while (gArmsData[arms_num].code != 0) ++arms_num; @@ -448,6 +449,7 @@ int CampLoop() { GetTrg(); + // Handle ESC if (gKeyTrg & KEY_ESCAPE) { switch (Call_Escape(ghWnd)) @@ -459,7 +461,7 @@ int CampLoop() } } - if (g_GameFlags & 2) + if (g_GameFlags & GAME_FLAG_IS_CONTROL_ENABLED) MoveCampCursor(); switch (TextScriptProc()) diff --git a/src/Game.h b/src/Game.h index e821ed8c..65c20bce 100644 --- a/src/Game.h +++ b/src/Game.h @@ -2,6 +2,11 @@ #include "WindowsWrapper.h" +enum GameFlagsValues +{ + GAME_FLAG_IS_CONTROL_ENABLED = 2, // Idk tbh +}; + extern int g_GameFlags; extern int gCounter;