2017-09-16 21:13:06 +02:00
|
|
|
#ifndef GUARD_FIELDMAP_H
|
|
|
|
#define GUARD_FIELDMAP_H
|
2017-09-16 19:54:33 +02:00
|
|
|
|
2018-09-18 17:03:24 +02: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 18:18:23 +01:00
|
|
|
#define MAX_MAP_DATA_SIZE 0x2800
|
2018-09-18 17:03:24 +02:00
|
|
|
|
2019-03-02 08:44:02 +01:00
|
|
|
#include "main.h"
|
|
|
|
|
2018-12-28 18:18:23 +01:00
|
|
|
extern struct BackupMapLayout gBackupMapLayout;
|
2017-09-16 19:54:33 +02:00
|
|
|
|
2017-10-23 00:55:07 +02:00
|
|
|
u32 MapGridGetMetatileIdAt(int, int);
|
2017-10-13 17:09:36 +02:00
|
|
|
u32 MapGridGetMetatileBehaviorAt(int, int);
|
2017-10-12 09:06:19 +02:00
|
|
|
void MapGridSetMetatileIdAt(int, int, u16);
|
2017-10-23 00:55:07 +02:00
|
|
|
void MapGridSetMetatileEntryAt(int, int, u16);
|
2017-09-13 11:16:26 +02:00
|
|
|
void GetCameraCoords(u16*, u16*);
|
2018-05-09 12:07:56 +02:00
|
|
|
bool8 MapGridIsImpassableAt(int, int);
|
|
|
|
int GetMapBorderIdAt(int x, int y);
|
|
|
|
int CanCameraMoveInDirection(int direction);
|
2017-10-23 00:55:07 +02:00
|
|
|
u16 GetBehaviorByMetatileId(u16 metatileId);
|
2018-12-28 18:18:23 +01:00
|
|
|
void GetCameraFocusCoords(u16 *x, u16 *y);
|
2019-06-29 04:26:11 +02:00
|
|
|
u8 MapGridGetMetatileLayerTypeAt(int x, int y);
|
2018-06-11 17:23:14 +02:00
|
|
|
u8 MapGridGetZCoordAt(int x, int y);
|
2019-06-29 04:26:11 +02:00
|
|
|
bool8 CameraMove(int deltaX, int deltaY);
|
2018-05-09 12:07:56 +02:00
|
|
|
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);
|
2018-11-12 00:46:02 +01:00
|
|
|
void save_serialize_map(void);
|
2018-12-28 18:18:23 +01:00
|
|
|
void sub_8088B3C(u16 x, u16 y);
|
|
|
|
void InitMap(void);
|
|
|
|
void InitMapFromSavedGame(void);
|
|
|
|
void InitTrainerHillMap(void);
|
2019-02-07 03:01:29 +01:00
|
|
|
void InitBattlePyramidMap(bool8 setPlayerPosition);
|
2019-02-08 18:48:51 +01:00
|
|
|
void copy_map_tileset1_tileset2_to_vram(struct MapLayout const *mapLayout);
|
|
|
|
void apply_map_tileset1_tileset2_palette(struct MapLayout const *mapLayout);
|
|
|
|
void apply_map_tileset2_palette(struct MapLayout const *mapLayout);
|
|
|
|
void copy_map_tileset2_to_vram_2(struct MapLayout const *mapLayout);
|
2019-03-02 04:32:50 +01:00
|
|
|
void copy_map_tileset1_to_vram(const struct MapLayout *);
|
|
|
|
void copy_map_tileset2_to_vram(const struct MapLayout *);
|
2019-03-02 08:44:02 +01:00
|
|
|
struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection);
|
2019-12-22 01:01:38 +01:00
|
|
|
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
|
2017-09-16 19:54:33 +02:00
|
|
|
|
2018-05-11 01:36:57 +02:00
|
|
|
void SpriteCB_PokeballGlow(struct Sprite *);
|
|
|
|
void SpriteCB_PokecenterMonitor(struct Sprite *);
|
|
|
|
void SpriteCB_HallOfFameMonitor(struct Sprite *);
|
|
|
|
|
2019-03-02 08:44:02 +01:00
|
|
|
// field_region_map.c
|
|
|
|
void FieldInitRegionMap(MainCallback callback);
|
2019-04-01 18:05:58 +02:00
|
|
|
void sub_8088B94(int x, int y, int a2);
|
2019-03-02 08:44:02 +01:00
|
|
|
|
2017-09-16 21:13:06 +02:00
|
|
|
#endif //GUARD_FIELDMAP_H
|