diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-23 21:52:55 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-23 21:52:55 +0000 |
commit | ae093dbdc0e90c640d22e7d3c027ce0288e8625e (patch) | |
tree | 90a2611205ea7d4deb6b1c961233036e94cd6d2e /src/map | |
parent | 2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b (diff) | |
download | hercules-ae093dbdc0e90c640d22e7d3c027ce0288e8625e.tar.gz hercules-ae093dbdc0e90c640d22e7d3c027ce0288e8625e.tar.bz2 hercules-ae093dbdc0e90c640d22e7d3c027ce0288e8625e.tar.xz hercules-ae093dbdc0e90c640d22e7d3c027ce0288e8625e.zip |
Made some more changes, reverted some old ones
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@969 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.c | 10 | ||||
-rw-r--r-- | src/map/map.h | 4 | ||||
-rw-r--r-- | src/map/script.c | 10 | ||||
-rw-r--r-- | src/map/script.h | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/map/map.c b/src/map/map.c index 55d571767..f4124eab8 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1652,8 +1652,8 @@ int map_cache_read(struct map_data *m) { static int map_cache_write(struct map_data *m) { int i; - unsigned long len_new , len_old; - char *write_buf; + unsigned long len_new, len_old; + unsigned char *write_buf; if(!map_cache.fp) { return 0; } for(i = 0;i < map_cache.head.nmaps ; i++) { if(!strcmp(m->name,map_cache.map[i].fn)) { @@ -1669,7 +1669,7 @@ static int map_cache_write(struct map_data *m) { if(map_read_flag >= READ_FROM_BITMAP_COMPRESSED) { // 圧縮保存 // さすがに2倍に膨れる事はないという事で - write_buf = (char*)aMallocA(m->xs * m->ys * 2); + write_buf = (unsigned char*)aMallocA(m->xs * m->ys * 2); len_new = m->xs * m->ys * 2; encode_zip(write_buf,&len_new,m->gat,m->xs * m->ys); map_cache.map[i].compressed = 1; @@ -1706,7 +1706,7 @@ static int map_cache_write(struct map_data *m) { if(map_cache.map[i].fn[0] == 0) { // 新しい場所に登録 if(map_read_flag >= READ_FROM_BITMAP_COMPRESSED) { - write_buf = (char*)aMallocA(m->xs * m->ys * 2); + write_buf = (unsigned char*)aMallocA(m->xs * m->ys * 2); len_new = m->xs * m->ys * 2; encode_zip(write_buf,&len_new,m->gat,m->xs * m->ys); map_cache.map[i].compressed = 1; @@ -1929,7 +1929,7 @@ static int map_readmap(int m,char *fn, char *alias, int *map_cache, int maxmap) struct gat_1cell {float high[4]; int type;} *p=NULL; // read & convert fn // again, might not need to be unsigned char - gat = grfio_read(fn); + gat = (char*)grfio_read(fn); if(gat==NULL) { return -1; // さすがにマップが読めないのはまずいので終了する diff --git a/src/map/map.h b/src/map/map.h index 1b699b960..d4f673d6a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -510,7 +510,7 @@ enum { struct map_data { char name[24]; - char *gat; // NULLなら下のmap_data_other_serverとして扱う + unsigned char *gat; // NULLなら下のmap_data_other_serverとして扱う char *alias; // [MouseJstr] int *gat_fileused[MAX_CELL_TYPE+1+1]; //もしビットマップを使うならこちらを使う、 //上のgatはキャストされてgat_fileused[0]に指す @@ -563,7 +563,7 @@ struct map_data { }; struct map_data_other_server { char name[24]; - char *gat; // NULL固定にして判断 + unsigned char *gat; // NULL固定にして判断 unsigned long ip; unsigned int port; }; diff --git a/src/map/script.c b/src/map/script.c index 35645eaab..083f3cfd1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1148,7 +1148,7 @@ static void read_constdb(void) * スクリプトの解析 *------------------------------------------ */ -unsigned char* parse_script(unsigned char *src,int line) +char* parse_script(unsigned char *src,int line) { unsigned char *p,*tmpp; int i; @@ -6875,7 +6875,7 @@ int run_func(struct script_state *st) * スクリプトの実行メイン部分 *------------------------------------------ */ -int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_state *st,unsigned char *rootscript) +int run_script_main(char *script,int pos,int rid,int oid,struct script_state *st,char *rootscript) { int c,rerun_pos; int cmdcount=script_config.check_cmdcount; @@ -7009,17 +7009,17 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_ * スクリプトの実行 *------------------------------------------ */ -int run_script(unsigned char *script,int pos,int rid,int oid) +int run_script(char *script,int pos,int rid,int oid) { struct script_stack stack; struct script_state st; struct map_session_data *sd=map_id2sd(rid); - unsigned char *rootscript=script; + char *rootscript=script; if(script==NULL || pos<0) return -1; - if(sd && sd->npc_stackbuf && sd->npc_scriptroot==(char*)rootscript){ + if(sd && sd->npc_stackbuf && sd->npc_scriptroot==rootscript){ // 前回のスタックを復帰 script=sd->npc_script; stack.sp=sd->npc_stack; diff --git a/src/map/script.h b/src/map/script.h index 50aac9dd7..eecc45e8f 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -32,8 +32,8 @@ struct script_state { int defsp,new_pos,new_defsp; }; -unsigned char * parse_script(unsigned char *,int); -int run_script(unsigned char *,int,int,int); +char * parse_script(unsigned char *,int); +int run_script(char *,int,int,int); struct dbt* script_get_label_db(); struct dbt* script_get_userfunc_db(); |