forked from spoutn1k/mcmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.h
66 lines (51 loc) · 1.83 KB
/
globals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#define VERSION "2.3b"
#include <stdint.h>
#include <cstdlib>
#define UNDEFINED 0x7FFFFFFF
#define MAX_MARKERS 200
enum Orientation {
North,
East,
South,
West
};
struct Marker {
int chunkX, chunkZ, offsetX, offsetZ;
uint8_t color;
};
// Global area of world being rendered
extern int g_TotalFromChunkX, g_TotalFromChunkZ, g_TotalToChunkX, g_TotalToChunkZ;
// Current area of world being rendered
extern int g_FromChunkX, g_FromChunkZ, g_ToChunkX, g_ToChunkZ;
// size of that area in blocks (no offset)
extern size_t g_MapsizeZ, g_MapsizeX;
extern int g_MapminY, g_MapsizeY;
extern int g_OffsetY; // y pixel offset in the final image for one y step in 3d array (2 or 3)
extern int g_WorldFormat;
extern Orientation g_Orientation; // North, West, South, East
extern bool g_Nightmode;
extern bool g_Underground;
extern bool g_BlendUnderground;
extern bool g_Skylight;
extern int g_Noise;
extern bool g_BlendAll; // If set, do not assume certain blocks (like grass) are always opaque
extern bool g_Hell, g_ServerHell; // rendering the nether
// For rendering biome colors properly, external png files are used
extern bool g_UseBiomes;
extern uint64_t g_BiomeMapSize;
extern uint8_t *g_Grasscolor, *g_Leafcolor, *g_TallGrasscolor;
extern uint16_t *g_BiomeMap;
extern int g_GrasscolorDepth, g_FoliageDepth;
extern int g_MarkerCount;
extern Marker g_Markers[MAX_MARKERS];
// 3D arrays holding terrain/lightmap
extern uint8_t *g_Terrain, *g_Light;
// 2D array to store min and max block height per X/Z - it's 2 bytes per index, upper for highest, lower for lowest (don't ask!)
extern uint16_t *g_HeightMap;
// If output is to be split up (for google maps etc) this contains the path to output to, NULL otherwise
extern char *g_TilePath;
extern int8_t g_SectionMin, g_SectionMax;
extern uint8_t g_MystCraftAge;
#endif