summaryrefslogtreecommitdiff
path: root/include/fieldmap.h
blob: 1560a08418d7f78777cc7f63a0326deee58b5689 (plain)
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
#ifndef GUARD_FIELDMAP_H
#define GUARD_FIELDMAP_H

#include "global.h"

#define NUM_TILES_IN_PRIMARY 640
#define NUM_TILES_TOTAL 1024
#define NUM_METATILES_IN_PRIMARY 640
#define NUM_METATILES_TOTAL 1024
#define NUM_PALS_IN_PRIMARY 7
#define NUM_PALS_TOTAL 13
#define VIRTUAL_MAP_SIZE 0x2800

extern struct BackupMapLayout VMap;
extern const struct MapLayout Route1_Layout;

u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int);
u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y);
void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
bool8 MapGridIsImpassableAt(s32, s32);
s32 GetMapBorderIdAt(s32, s32);
bool32 CanCameraMoveInDirection(s32);
u32 GetBehaviorByMetatileIdAndMapLayout(struct MapLayout *mapLayout, u16 metatile, u8 attr);
const struct MapHeader * mapconnection_get_mapheader(struct MapConnection * connection);
struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y);
void sub_8059948(u8 a0, u8 a1);

void save_serialize_map(void);
u32 sub_8058F1C(u32 original, u8 bit);
u32 sub_8058F48(s16 x, s16 y, u8 z);

#endif //GUARD_FIELDMAP_H