Document fieldmap

This commit is contained in:
GriffinR
2021-04-06 16:05:43 -04:00
parent 8bad478b49
commit 86a9d94ce1
8 changed files with 66 additions and 73 deletions

View File

@@ -241,5 +241,6 @@
#define MB_UNUSED_ED 0xED
#define MB_UNUSED_EE 0xEE
#define MB_UNUSED_EF 0xEF
#define MB_INVALID 0xFF
#endif // GUARD_METATILE_BEHAVIORS

View File

@@ -20,16 +20,13 @@ void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
bool8 MapGridIsImpassableAt(int, int);
int GetMapBorderIdAt(int x, int y);
int CanCameraMoveInDirection(int direction);
bool32 CanCameraMoveInDirection(int direction);
u16 GetBehaviorByMetatileId(u16 metatileId);
void GetCameraFocusCoords(u16 *x, u16 *y);
u8 MapGridGetMetatileLayerTypeAt(int x, int y);
u8 MapGridGetZCoordAt(int x, int y);
bool8 CameraMove(int deltaX, int deltaY);
struct MapConnection *sub_8088950(u8 direction, int x, int y);
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
void save_serialize_map(void);
void SaveMapView(void);
void SetCameraFocusCoords(u16 x, u16 y);
void InitMap(void);
void InitMapFromSavedGame(void);

View File

@@ -1,6 +1,7 @@
#ifndef GUARD_GLOBAL_FIELDMAP_H
#define GUARD_GLOBAL_FIELDMAP_H
#define METATILE_BEHAVIOR_MASK 0x00FF
#define METATILE_COLLISION_MASK 0x0C00
#define METATILE_ID_MASK 0x03FF
#define METATILE_ID_UNDEFINED 0x03FF
@@ -12,7 +13,9 @@
enum
{
CONNECTION_SOUTH = 1,
CONNECTION_INVALID = -1,
CONNECTION_NONE,
CONNECTION_SOUTH,
CONNECTION_NORTH,
CONNECTION_WEST,
CONNECTION_EAST,