27 #ifndef ICB_PXGLOBALVARIABLES 28 #define ICB_PXGLOBALVARIABLES 30 #include "common/noncopyable.h" 31 #include "engines/icb/common/px_common.h" 32 #include "engines/icb/common/px_clu_api.h" 36 #define MAX_global_vars 256 38 #define GLOBAL_VAR_NOT_SET (0) 39 #define GLOBAL_VAR_SET (1) 52 uint8 m_varInit[MAX_global_vars];
61 int32 GetVariable(uint32 hash,
const char *name = NULL, int32 warn = 1);
62 int32 GetVariable(
const char *n) {
63 return GetVariable(EngineHashString(n), n);
66 void SetVariable(uint32, int32);
67 void SetVariable(
const char *n, int32 i) {
68 SetVariable(EngineHashString(n), i);
71 void InitVariable(uint32, int32,
const char *name = NULL);
72 void InitVariable(
const char *n, int32 i) {
73 InitVariable(EngineHashString(n), i, n);
76 int32 FindVariable(uint32);
77 int32 FindVariable(
const char *n) {
78 return FindVariable(EngineHashString(n));
81 uint32 GetNoItems() {
return (m_no_vars); }
83 const CpxVariable &operator[](uint32 n) {
return (m_vars[n]); }
Definition: noncopyable.h:39
Definition: px_globalvariables.h:41
Definition: px_globalvariables.h:47