diff options
Diffstat (limited to 'src/map/mapreg.h')
-rw-r--r-- | src/map/mapreg.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/map/mapreg.h b/src/map/mapreg.h index e83f9e053..3c1d0ba0e 100644 --- a/src/map/mapreg.h +++ b/src/map/mapreg.h @@ -5,6 +5,9 @@ #ifndef _MAPREG_H_ #define _MAPREG_H_ +#include "../common/cbasetypes.h" +#include "../common/db.h" + struct mapreg_save { int uid; union { @@ -14,14 +17,30 @@ struct mapreg_save { bool save; }; -void mapreg_reload(void); -void mapreg_final(void); -void mapreg_init(void); -bool mapreg_config_read(const char* w1, const char* w2); +struct mapreg_interface { + DBMap *db; // int var_id -> int value + DBMap *str_db; // int var_id -> char* value + struct eri *ers; //[Ind/Hercules] + char table[32]; + bool i_dirty; + bool str_dirty; + /* */ + void (*init) (void); + void (*final) (void); + /* */ + int (*readreg) (int uid); + char* (*readregstr) (int uid); + bool (*setreg) (int uid, int val); + bool (*setregstr) (int uid, const char *str); + void (*load) (void); + void (*save) (void); + int (*save_timer) (int tid, unsigned int tick, int id, intptr_t data); + void (*reload) (void); + bool (*config_read) (const char *w1, const char *w2); +}; + +struct mapreg_interface *mapreg; -int mapreg_readreg(int uid); -char* mapreg_readregstr(int uid); -bool mapreg_setreg(int uid, int val); -bool mapreg_setregstr(int uid, const char* str); +void mapreg_defaults(void); #endif /* _MAPREG_H_ */ |