diff --git a/src/stat.cc b/src/stat.cc index dcc02c8..4579906 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -9,6 +9,7 @@ #include "interface.h" #include "item.h" #include "memory.h" +#include "message.h" #include "object.h" #include "perk.h" #include "platform_compat.h" @@ -23,8 +24,18 @@ #include +// Provides metadata about stats. +typedef struct StatDescription { + char* name; + char* description; + int frmId; + int minimumValue; + int maximumValue; + int defaultValue; +} StatDescription; + // 0x51D53C -StatDescription gStatDescriptions[STAT_COUNT] = { +static StatDescription gStatDescriptions[STAT_COUNT] = { { NULL, NULL, 0, PRIMARY_STAT_MIN, PRIMARY_STAT_MAX, 5 }, { NULL, NULL, 1, PRIMARY_STAT_MIN, PRIMARY_STAT_MAX, 5 }, { NULL, NULL, 2, PRIMARY_STAT_MIN, PRIMARY_STAT_MAX, 5 }, @@ -66,7 +77,7 @@ StatDescription gStatDescriptions[STAT_COUNT] = { }; // 0x51D8CC -StatDescription gPcStatDescriptions[PC_STAT_COUNT] = { +static StatDescription gPcStatDescriptions[PC_STAT_COUNT] = { { NULL, NULL, 0, 0, INT_MAX, 0 }, { NULL, NULL, 0, 1, PC_LEVEL_MAX, 1 }, { NULL, NULL, 0, 0, INT_MAX, 0 }, @@ -75,13 +86,13 @@ StatDescription gPcStatDescriptions[PC_STAT_COUNT] = { }; // 0x66817C -MessageList gStatsMessageList; +static MessageList gStatsMessageList; // 0x668184 -char* gStatValueDescriptions[PRIMARY_STAT_RANGE]; +static char* gStatValueDescriptions[PRIMARY_STAT_RANGE]; // 0x6681AC -int gPcStatValues[PC_STAT_COUNT]; +static int gPcStatValues[PC_STAT_COUNT]; // 0x4AED70 int statsInit() diff --git a/src/stat.h b/src/stat.h index 6c9876c..d5132b9 100644 --- a/src/stat.h +++ b/src/stat.h @@ -2,30 +2,12 @@ #define STAT_H #include "db.h" -#include "message.h" #include "obj_types.h" #include "proto_types.h" #include "stat_defs.h" #define STAT_ERR_INVALID_STAT (-5) -// Provides metadata about stats. -typedef struct StatDescription { - char* name; - char* description; - int frmId; - int minimumValue; - int maximumValue; - int defaultValue; -} StatDescription; - -extern StatDescription gStatDescriptions[STAT_COUNT]; -extern StatDescription gPcStatDescriptions[PC_STAT_COUNT]; - -extern MessageList gStatsMessageList; -extern char* gStatValueDescriptions[PRIMARY_STAT_RANGE]; -extern int gPcStatValues[PC_STAT_COUNT]; - int statsInit(); int statsReset(); int statsExit();