source: subversion/applications/utils/mod_tile/store.h @ 28718

Last change on this file since 28718 was 28516, checked in by Dirk Stoecker, 7 years ago

finally remove hardcoded tile path and replace it by config option

File size: 1.2 KB
Line 
1#ifndef STORE_H
2#define STORE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdlib.h>
9#include "render_config.h"
10    int tile_read(const char *tilepath, const char *xmlconfig, int x, int y, int z, unsigned char *buf, int sz, unsigned char * err_msg);
11
12#define META_MAGIC "META"
13//static const char meta_magic[4] = { 'M', 'E', 'T', 'A' };
14
15struct entry {
16    int offset;
17    int size;
18};
19
20struct meta_layout {
21    char magic[4];
22    int count; // METATILE ^ 2
23    int x, y, z; // lowest x,y of this metatile, plus z
24    struct entry index[]; // count entries
25    // Followed by the tile data
26    // The index offsets are measured from the start of the file
27};
28
29
30int read_from_file(const char *tilepath, const char *xmlconfig, int x, int y, int z, unsigned char *buf, size_t sz);
31
32#ifdef METATILE
33    int read_from_meta(const char *tilepath, const char *xmlconfig, int x, int y, int z, unsigned char *buf, size_t sz, unsigned char * log_msg);
34    void process_meta(const char *tilepath, const char *xmlconfig, int x, int y, int z);
35    void process_pack(const char *tilepath, const char *name);
36    void process_unpack(const char *tilepath, const char *name);
37#endif
38
39#ifdef __cplusplus
40}
41#endif
42#endif
Note: See TracBrowser for help on using the repository browser.