summaryrefslogtreecommitdiff
path: root/src/tool
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2016-03-01 08:16:37 +0200
committerHaru <haru@dotalux.com>2016-07-12 20:58:44 +0200
commitd0358265beff02fd9c094ba480f1a9583035cf64 (patch)
tree6c8433dfda39ba19a721e66f70b0f11fce45eeeb /src/tool
parentb0a4a441f582810c91aeec458fdbe7cc6cc78db9 (diff)
downloadhercules-d0358265beff02fd9c094ba480f1a9583035cf64.tar.gz
hercules-d0358265beff02fd9c094ba480f1a9583035cf64.tar.bz2
hercules-d0358265beff02fd9c094ba480f1a9583035cf64.tar.xz
hercules-d0358265beff02fd9c094ba480f1a9583035cf64.zip
Interface grfio.c
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/mapcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 41dfcf022..7bb2f4465 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -77,13 +77,13 @@ int read_map(char *name, struct map_data *m)
// Open map GAT
sprintf(filename,"data\\%s.gat", name);
- gat = (unsigned char *)grfio_read(filename);
+ gat = grfio_read(filename);
if (gat == NULL)
return 0;
// Open map RSW
sprintf(filename,"data\\%s.rsw", name);
- rsw = (unsigned char *)grfio_read(filename);
+ rsw = grfio_read(filename);
// Read water height
if (rsw) {
@@ -139,7 +139,7 @@ bool cache_map(char *name, struct map_data *m)
len = (unsigned long)m->xs*(unsigned long)m->ys*2;
write_buf = (unsigned char *)aMalloc(len);
// Compress the cells and get the compressed length
- encode_zip(write_buf, &len, m->cells, m->xs*m->ys);
+ grfio->encode_zip(write_buf, &len, m->cells, m->xs*m->ys);
// Fill the map header
safestrncpy(info.name, name, MAP_NAME_LENGTH);
@@ -286,7 +286,7 @@ int do_init(int argc, char** argv)
cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL);
ShowStatus("Initializing grfio with %s\n", grf_list_file);
- grfio_init(grf_list_file);
+ grfio->init(grf_list_file);
// Attempt to open the map cache file and force rebuild if not found
ShowStatus("Opening map cache: %s\n", map_cache_file);
@@ -360,7 +360,7 @@ int do_init(int argc, char** argv)
fclose(map_cache_fp);
ShowStatus("Finalizing grfio\n");
- grfio_final();
+ grfio->final();
ShowInfo("%d maps now in cache\n", header.map_count);