2017-09-16 19:13:06 +00:00
|
|
|
#ifndef GUARD_FIELDMAP_H
|
|
|
|
#define GUARD_FIELDMAP_H
|
2017-09-16 17:54:33 +00:00
|
|
|
|
2018-09-18 15:03:24 +00:00
|
|
|
#define NUM_TILES_IN_PRIMARY 512
|
|
|
|
#define NUM_TILES_TOTAL 1024
|
|
|
|
#define NUM_METATILES_IN_PRIMARY 512
|
|
|
|
#define NUM_METATILES_TOTAL 1024
|
|
|
|
#define NUM_PALS_IN_PRIMARY 6
|
|
|
|
#define NUM_PALS_TOTAL 13
|
2018-12-28 17:18:23 +00:00
|
|
|
#define MAX_MAP_DATA_SIZE 0x2800
|
2018-09-18 15:03:24 +00:00
|
|
|
|
2019-03-02 07:44:02 +00:00
|
|
|
#include "main.h"
|
|
|
|
|
2018-12-28 17:18:23 +00:00
|
|
|
extern struct BackupMapLayout gBackupMapLayout;
|
2017-09-16 17:54:33 +00:00
|
|
|
|
2017-10-22 22:55:07 +00:00
|
|
|
u32 MapGridGetMetatileIdAt(int, int);
|
2017-10-13 15:09:36 +00:00
|
|
|
u32 MapGridGetMetatileBehaviorAt(int, int);
|
2017-10-12 07:06:19 +00:00
|
|
|
void MapGridSetMetatileIdAt(int, int, u16);
|
2017-10-22 22:55:07 +00:00
|
|
|
void MapGridSetMetatileEntryAt(int, int, u16);
|
2017-09-13 09:16:26 +00:00
|
|
|
void GetCameraCoords(u16*, u16*);
|
2018-05-09 10:07:56 +00:00
|
|
|
bool8 MapGridIsImpassableAt(int, int);
|
|
|
|
int GetMapBorderIdAt(int x, int y);
|
2021-04-06 20:05:43 +00:00
|
|
|
bool32 CanCameraMoveInDirection(int direction);
|
2017-10-22 22:55:07 +00:00
|
|
|
u16 GetBehaviorByMetatileId(u16 metatileId);
|
2018-12-28 17:18:23 +00:00
|
|
|
void GetCameraFocusCoords(u16 *x, u16 *y);
|
2019-06-29 02:26:11 +00:00
|
|
|
u8 MapGridGetMetatileLayerTypeAt(int x, int y);
|
2018-06-11 15:23:14 +00:00
|
|
|
u8 MapGridGetZCoordAt(int x, int y);
|
2019-06-29 02:26:11 +00:00
|
|
|
bool8 CameraMove(int deltaX, int deltaY);
|
2021-04-06 20:05:43 +00:00
|
|
|
void SaveMapView(void);
|
2020-06-24 20:27:00 +00:00
|
|
|
void SetCameraFocusCoords(u16 x, u16 y);
|
2018-12-28 17:18:23 +00:00
|
|
|
void InitMap(void);
|
|
|
|
void InitMapFromSavedGame(void);
|
|
|
|
void InitTrainerHillMap(void);
|
2019-02-07 02:01:29 +00:00
|
|
|
void InitBattlePyramidMap(bool8 setPlayerPosition);
|
2020-06-19 23:58:56 +00:00
|
|
|
void CopyMapTilesetsToVram(struct MapLayout const *mapLayout);
|
|
|
|
void LoadMapTilesetPalettes(struct MapLayout const *mapLayout);
|
|
|
|
void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout);
|
|
|
|
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
|
|
|
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
|
|
|
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
2020-06-24 20:27:00 +00:00
|
|
|
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
|
2019-12-22 00:01:38 +00:00
|
|
|
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
|
2020-06-01 14:23:12 +00:00
|
|
|
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
|
2017-09-16 17:54:33 +00:00
|
|
|
|
2019-03-02 07:44:02 +00:00
|
|
|
// field_region_map.c
|
|
|
|
void FieldInitRegionMap(MainCallback callback);
|
|
|
|
|
2017-09-16 19:13:06 +00:00
|
|
|
#endif //GUARD_FIELDMAP_H
|