shithub: cstory

Download patch

ref: f68ee5c4e5e33abae34e36a1f295954b1b144b9e
parent: 7de9ecf1e7afd3a01403ceaa992afb63f73ac22e
author: Gabriel Ravier <gabravier@gmail.com>
date: Sat Sep 21 11:22:42 EDT 2019

Added an enum for g_GameFlags and a few comments in CampLoop

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/src/ArmsItem.cpp
+++ b/src/ArmsItem.cpp
@@ -435,6 +435,7 @@
 	gCampActive = FALSE;
 	gSelectedItem = 0;
 
+	// Compute current amount of weapons
 	arms_num = 0;
 	while (gArmsData[arms_num].code != 0)
 		++arms_num;
@@ -448,6 +449,7 @@
 	{
 		GetTrg();
 
+		// Handle ESC
 		if (gKeyTrg & KEY_ESCAPE)
 		{
 			switch (Call_Escape(ghWnd))
@@ -459,7 +461,7 @@
 			}
 		}
 
-		if (g_GameFlags & 2)
+		if (g_GameFlags & GAME_FLAG_IS_CONTROL_ENABLED)
 			MoveCampCursor();
 
 		switch (TextScriptProc())
--- 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;