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

Last change on this file since 25781 was 12964, checked in by jonb, 11 years ago

Declare xmlconfig as a const char * in many APIs

File size: 1006 bytes
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"
10int tile_read(const char *xmlconfig, int x, int y, int z, unsigned char *buf, int sz);
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 *xmlconfig, int x, int y, int z, unsigned char *buf, size_t sz);
31
32#ifdef METATILE
33int read_from_meta(const char *xmlconfig, int x, int y, int z, unsigned char *buf, size_t sz);
34void process_meta(const char *xmlconfig, int x, int y, int z);
35void process_pack(const char *name);
36void process_unpack(const char *name);
37#endif
38
39#ifdef __cplusplus
40}
41#endif
42#endif
Note: See TracBrowser for help on using the repository browser.