summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
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
commitae093dbdc0e90c640d22e7d3c027ce0288e8625e (patch)
tree90a2611205ea7d4deb6b1c961233036e94cd6d2e /src/map/map.c
parent2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b (diff)
downloadhercules-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/map.c')
-rw-r--r--src/map/map.c10
1 files changed, 5 insertions, 5 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;
// さすがにマップが読めないのはまずいので終了する