aboutsummaryrefslogtreecommitdiff
path: root/src/common.hh
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-09-13 00:37:10 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-09-13 00:39:31 -0300
commit465620a871e7da8d72d82a999eac8623570d13fd (patch)
treed66a0d17556630e88730488b5223823adef19b03 /src/common.hh
parent16f2e00b055c8356a7e80fa3b92e7df5a5c89a4c (diff)
downloadgame-465620a871e7da8d72d82a999eac8623570d13fd.tar.gz
game-465620a871e7da8d72d82a999eac8623570d13fd.zip
add `MAX_DEPOTS` constant + enable assertions in debug mode
Diffstat (limited to 'src/common.hh')
-rw-r--r--src/common.hh18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/common.hh b/src/common.hh
index daf66ad..a8f1460 100644
--- a/src/common.hh
+++ b/src/common.hh
@@ -66,7 +66,7 @@ typedef size_t usize;
#endif
#define ASSERT_ALWAYS(expr) if(!(expr)) { TRAP(); }
-#if BUILD_DEBUG
+#if ENABLE_ASSERTIONS
# define ASSERT(expr) ASSERT_ALWAYS(expr)
#else
# define ASSERT(expr) ((void)(expr))
@@ -86,6 +86,22 @@ STATIC_ASSERT(OS_LINUX);
# define sigev_notify_thread_id _sigev_un._tid
#endif
+// Constants
+// =============================================================================
+// TODO(fusion): There are many constants that are hardcoded as decompilation
+// artifacts. We should define them here and use when appropriate. It is not
+// as simple because I've been using `NARRAY` in some cases and they're used
+// essentially everywhere.
+
+//#define MAX_NAME 30 // used with most short strings (should replace MAX_IDENT_LENGTH too)
+//#define MAX_IPADDRESS 16
+//#define MAX_BUDDIES 100
+//#define MAX_SKILLS 25
+//#define MAX_SPELLS 256
+//#define MAX_QUESTS 500
+#define MAX_DEPOTS 9
+//#define MAX_OPEN_CONTAINERS 16
+
// shm.cc
// =============================================================================
void StartGame(void);