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();
176extern bool GameDebug;
void clear()
Definition: list.h:245
Definition: GameParam.h:107
bool contains(const Key &key) const
Definition: hashmap.h:598
Val & getVal(const Key &key)
Definition: hashmap.h:637
void clear(bool shrinkArray=0)
Definition: hashmap.h:431
Definition: GameParam.h:62
Definition: GameParam.h:45
Definition: GameParam.h:153