diff --git a/includes/store_file.h b/includes/store_file.h index 5b4e757..a0f8f45 100644 --- a/includes/store_file.h +++ b/includes/store_file.h @@ -25,7 +25,6 @@ extern "C" { #include "store.h" struct storage_backend *init_storage_file(const char *tile_dir); -int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z); #ifdef __cplusplus } diff --git a/includes/store_file_utils.h b/includes/store_file_utils.h index e97698d..4bcafbb 100644 --- a/includes/store_file_utils.h +++ b/includes/store_file_utils.h @@ -32,17 +32,18 @@ extern "C" { */ int mkdirp(const char *path); +/* File path hashing. Used by both mod_tile and render daemon + * The two must both agree on the file layout for meta-tiling + * to work + */ int path_to_xyz(const char *tilepath, const char *path, char *xmlconfig, int *px, int *py, int *pz); #ifdef METATILE /* New meta-tile storage functions */ /* Returns the path to the meta-tile and the offset within the meta-tile */ +int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z); int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z); #else -/* File path hashing. Used by both mod_tile and render daemon - * The two must both agree on the file layout for meta-tiling - * to work - */ void xyz_to_path(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z); #endif diff --git a/src/store_file_utils.c b/src/store_file_utils.c index 6c46efa..6882b8b 100644 --- a/src/store_file_utils.c +++ b/src/store_file_utils.c @@ -171,12 +171,6 @@ int path_to_xyz(const char *tilepath, const char *path, char *xmlconfig, int *px } #ifdef METATILE -// Returns the path to the meta-tile and the offset within the meta-tile -int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z) -{ - return xyzo_to_meta(path, len, tile_dir, xmlconfig, "", x, y, z); -} - // Returns the path to the meta-tile and the offset within the meta-tile int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z) { @@ -214,6 +208,12 @@ int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlco #endif // DIRECTORY_HASH return offset; } + +// Returns the path to the meta-tile and the offset within the meta-tile +int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z) +{ + return xyzo_to_meta(path, len, tile_dir, xmlconfig, "", x, y, z); +} #else // METATILE void xyz_to_path(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z) {