summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-08 14:08:32 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-08 14:08:32 +0000
commitb5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 (patch)
treeb7f079f5317d736e49fdf8b12f6d3f18b2a98daf /src/map/script.c
parentad2a3a12e2d603e8ef2011d1121271b7ed2f05eb (diff)
downloadhercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.gz
hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.bz2
hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.xz
hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.zip
* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.
* Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a1b0834e0..71aee9d6f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -170,17 +170,17 @@ int str_hash[SCRIPT_HASH_SIZE];
//#define SCRIPT_HASH_ELF
//#define SCRIPT_HASH_PJW
-static struct dbt *mapreg_db=NULL;
-static struct dbt *mapregstr_db=NULL;
+static DBMap* mapreg_db=NULL; // int var_id -> int value
+static DBMap* mapregstr_db=NULL; // int var_id -> char* value
static int mapreg_dirty=-1;
char mapreg_txt[256]="save/mapreg.txt";
#define MAPREG_AUTOSAVE_INTERVAL (300*1000)
-static struct dbt *scriptlabel_db=NULL;
-static struct dbt *userfunc_db=NULL;
+static DBMap* scriptlabel_db=NULL; // const char* label_name -> int script_pos
+static DBMap* userfunc_db=NULL; // const char* func_name -> struct script_code*
static int parse_options=0;
-struct dbt* script_get_label_db(){ return scriptlabel_db; }
-struct dbt* script_get_userfunc_db(){ return userfunc_db; }
+DBMap* script_get_label_db(){ return scriptlabel_db; }
+DBMap* script_get_userfunc_db(){ return userfunc_db; }
struct Script_Config script_config;
@@ -3685,10 +3685,10 @@ int do_final_script()
*------------------------------------------*/
int do_init_script()
{
- mapreg_db= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
- mapregstr_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
- userfunc_db=db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_DUP_KEY,0);
- scriptlabel_db=db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA,50);
+ mapreg_db= idb_alloc(DB_OPT_BASE);
+ mapregstr_db=idb_alloc(DB_OPT_RELEASE_DATA);
+ userfunc_db=strdb_alloc(DB_OPT_DUP_KEY,0);
+ scriptlabel_db=strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA,50);
script_load_mapreg();