-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterrain.h
56 lines (45 loc) · 1.05 KB
/
terrain.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
#ifndef H_TERRAIN
#define H_TERRAIN
#include "types.h"
typedef struct {
u16 id;
u16 flags;
union {
struct {
Rect16 edge;
Rect16 piece;
} group;
struct {
u16 overlayID;
u16 isRemaster;
u16 groupStr;
u16 unused5;
u16 doodadID;
u16 width;
u16 height;
u16 unused9;
} doodad;
};
u16 tiles[16];
} CV5;
typedef struct {
u16 tiles[16];
} VF4;
typedef struct {
u32 tiles[16];
} VX4EX;
typedef struct {
u8 bmp[64];
} VR4;
void unloadTileset();
bool loadTileset(u32 tileset);
void copyPal(RGBA* pal);
void drawTile(u8* buf, s32 bufWidth, s32 bufHeight, s32 dstX, s32 dstY, u32 tileID, RGBA shading);
void drawMiniTile(u8* buf, s32 bufWidth, s32 bufHeight, s32 dstX, s32 dstY, u32 tileID, bool flip, RGBA shading);
void drawMinimap(u8* buf, s32 bufw, s32 bufh, u32 width, u32 height, u32 scale);
// Minimap scale sizes
#define MINIMAP_64 0 // 4 pixels per tile
#define MINIMAP_128 1 // 1 pixel per tile
#define MINIMAP_256 2 // 1 pixel per 4 tiles
#define CV5_DOODAD_ID 1
#endif