31 #ifndef CRAB_GAMEPARAM_H 32 #define CRAB_GAMEPARAM_H 34 #include "common/hashmap.h" 35 #include "common/hash-str.h" 36 #include "common/list.h" 37 #include "common/rect.h" 38 #include "common/str.h" 39 #include "crab/loaders.h" 40 #include "crab/rapidxml/rapidxml.hpp" 54 void load(rapidxml::xml_node<char> *node) {
55 loadStr(_name,
"name", node);
56 loadPath(_layout,
"layout", node);
57 loadPath(_asset,
"res", node);
131 const char *
get(
const int &num) {
133 poolI[num] = numberToString<int>(num);
135 return poolI.
getVal(num).c_str();
138 const char *fGet(
const float &num) {
139 for (
auto &i : poolF)
141 return i._str.c_str();
145 fs._str = numberToString<float>(num);
148 auto ret = poolF.back();
149 return ret._str.c_str();
176 extern bool GameDebug;
180 #endif // CRAB_GAMEPARAM_H Definition: GameParam.h:45
void clear(bool shrinkArray=0)
Definition: hashmap.h:427
Val & getVal(const Key &key)
Definition: hashmap.h:631
Definition: GameParam.h:62
void clear()
Definition: list.h:206
bool contains(const Key &key) const
Definition: hashmap.h:592
Definition: moveeffect.h:37
Definition: GameParam.h:153
Definition: GameParam.h:107