diff options
Diffstat (limited to 'src/tool/mapcache.c')
-rw-r--r-- | src/tool/mapcache.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index ec735e4e6..5eb0843aa 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -67,11 +67,6 @@ struct map_info { int32 len; }; - /************************************* - * Big-endian compatibility functions * - * Moved to utils.h * - *************************************/ - // Reads a map from GRF's GAT and RSW files int read_map(char *name, struct map_data *m) { @@ -82,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) { @@ -144,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); @@ -291,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); @@ -365,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); |