2016-07-09 02:18:40 +00:00
|
|
|
#ifndef STRINGBANK_H
|
|
|
|
#define STRINGBANK_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
|
2018-01-02 14:31:47 +00:00
|
|
|
// Some strings used in BBGE
|
|
|
|
enum StringBankIndexBBGE
|
|
|
|
{
|
|
|
|
SB_BBGE_NO_KEY = 2153,
|
|
|
|
SB_BBGE_INVALID_KEY_ID = 2154,
|
|
|
|
SB_BBGE_INVALID_JOY_BTN = 2155,
|
|
|
|
SB_BBGE_INVALID_MOUSE_BTN = 2156,
|
|
|
|
SB_BBGE_INVALID_JOY_AXIS_POS = 2157,
|
|
|
|
SB_BBGE_INVALID_JOY_AXIS_NEG = 2158,
|
|
|
|
};
|
|
|
|
|
2016-07-09 02:18:40 +00:00
|
|
|
class StringBank
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StringBank();
|
2018-01-02 14:31:47 +00:00
|
|
|
bool load(const std::string &file);
|
|
|
|
void clear();
|
|
|
|
bool empty() const;
|
2018-01-02 14:31:47 +00:00
|
|
|
void set(int idx, const char *str);
|
2018-01-02 14:31:47 +00:00
|
|
|
const std::string& get(int idx) const;
|
2016-07-09 02:18:40 +00:00
|
|
|
protected:
|
|
|
|
|
|
|
|
typedef std::map<int, std::string> StringMap;
|
|
|
|
StringMap stringMap;
|
|
|
|
};
|
|
|
|
|
2018-01-02 14:31:47 +00:00
|
|
|
extern StringBank stringbank;
|
|
|
|
|
2016-07-09 02:18:40 +00:00
|
|
|
#endif
|