Move xyzo_to_meta into proper header file (#456)

This commit is contained in:
Hummeltech
2024-07-02 16:34:12 -07:00
committed by GitHub
parent 3120d0b761
commit 9742572c85
3 changed files with 11 additions and 11 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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)
{