diff options
author | shennetsind <ind@henn.et> | 2013-09-16 11:19:51 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-16 11:19:51 -0300 |
commit | 4337e65f1dc35d244dc3abf43ed084c43d064b24 (patch) | |
tree | 598423105fe23159df0753f1def2a4af1660280f /src/map/mapreg.h | |
parent | 95e13fe4774a7c46c15c6e41ab28338cca827ecc (diff) | |
download | hercules-4337e65f1dc35d244dc3abf43ed084c43d064b24.tar.gz hercules-4337e65f1dc35d244dc3abf43ed084c43d064b24.tar.bz2 hercules-4337e65f1dc35d244dc3abf43ed084c43d064b24.tar.xz hercules-4337e65f1dc35d244dc3abf43ed084c43d064b24.zip |
HPM: Mapreg_sql.c Interface
Fully Integrated
Signed-off-by: shennetsind <ind@henn.et>
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_ */ |