From e1bd043bf3049b8a91b718ca1e4416711f0b8646 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 7 Jan 2019 15:32:11 -0500 Subject: through sub_8059250 --- include/fieldmap.h | 8 +++++++- include/global.fieldmap.h | 2 +- include/global.h | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/fieldmap.h b/include/fieldmap.h index e6a1e944a..38f1d30d0 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -3,6 +3,12 @@ #include "global.h" +#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 #define VIRTUAL_MAP_SIZE 0x2800 extern struct MapCoords { @@ -18,6 +24,6 @@ void GetCameraCoords(u16*, u16*); bool8 MapGridIsImpassableAt(s32, s32); s32 GetMapBorderIdAt(s16, s16); bool32 CanCameraMoveInDirection(u8); -u16 GetBehaviorByMetatileId(u16 metatileId); +u32 GetBehaviorByMetatileIdAndMapData(struct MapData *mapData, u16 metatile, u8 attr); #endif //GUARD_FIELDMAP_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index c7a55fd02..b602741a6 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -51,8 +51,8 @@ struct Tileset /*0x04*/ void *tiles; /*0x08*/ void *palettes; /*0x0c*/ void *metatiles; - /*0x10*/ void *metatileAttributes; /*0x14*/ TilesetCB callback; + /*0x10*/ void *metatileAttributes; }; struct MapData diff --git a/include/global.h b/include/global.h index f418ff757..26ce4a8cc 100644 --- a/include/global.h +++ b/include/global.h @@ -328,7 +328,8 @@ struct SaveBlock2 /*0x0AC*/ u8 filler_AC[0x3F4]; /*0x4A0*/ u32 unk_4A0[0x2F]; /*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C; - /*0x574*/ u8 filler_574[0x524]; + /*0x574*/ u8 filler_574[0x324]; + /*0x898*/ u16 mapView[0x100]; /*0xA98*/ struct LinkBattleRecords linkBattleRecords; /*0xAF0*/ struct BerryCrush berryCrush; /*0xB00*/ u8 filler_B00[0x420]; -- cgit v1.2.3