From bc79312d48781a35597705bf6663ac2a39598873 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 7 Jan 2019 08:54:56 -0500 Subject: Start decomping fieldmap --- include/global.fieldmap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/global.fieldmap.h') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index ed5054b7d..3b3648121 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -67,8 +67,8 @@ struct MapData struct BackupMapData { - s32 width; - s32 height; + s32 Xsize; + s32 Ysize; u16 *map; }; @@ -149,9 +149,9 @@ struct MapEvents struct MapConnection { /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; + /*0x04*/ u32 offset; + /*0x08*/ u8 mapGroup; + /*0x09*/ u8 mapNum; }; struct MapConnections -- cgit v1.2.3 From 9aab26afa5315c32f83ae7f40e19c9053d602089 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 7 Jan 2019 14:39:28 -0500 Subject: through MapGridGetMetatileIdAt --- include/global.fieldmap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/global.fieldmap.h') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 3b3648121..c7a55fd02 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -63,6 +63,8 @@ struct MapData /*0x0c*/ u16 *map; /*0x10*/ struct Tileset *primaryTileset; /*0x14*/ struct Tileset *secondaryTileset; + /*0x18*/ u8 unk18; + /*0x19*/ u8 unk19; }; struct BackupMapData -- cgit v1.2.3 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/global.fieldmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.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 -- cgit v1.2.3 From e08f10fd417ef2f6839de19e042ed3284752cb37 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 12 May 2019 15:51:22 -0400 Subject: through sub_815A5E8 --- include/global.fieldmap.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'include/global.fieldmap.h') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index b602741a6..801606d50 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -74,6 +74,14 @@ struct BackupMapData u16 *map; }; +union __attribute__((packed)) MapObjectRange { + u8 as_byte; + struct __attribute__((packed)) { + u8 x:4; + u8 y:4; + } __attribute__((aligned (1))) as_nybbles; +} __attribute__((aligned (1))); + struct MapObjectTemplate { /*0x00*/ u8 localId; @@ -83,8 +91,7 @@ struct MapObjectTemplate /*0x06*/ s16 y; /*0x08*/ u8 elevation; /*0x09*/ u8 movementType; - /*0x0A*/ u8 unkA_0:4; - u8 unkA_4:4; + /*0x0A*/ union MapObjectRange range; ///*0x0B*/ u8 fillerB[1]; /*0x0C*/ u16 unkC; /*0x0E*/ u16 unkE; @@ -228,13 +235,7 @@ struct MapObject /*0x14*/ struct Coords16 coords3; /*0x18*/ u8 mapobj_unk_18:4; //current direction? /*0x18*/ u8 placeholder18:4; - /*0x19*/ union __attribute__((packed)) { - u8 as_byte; - struct __attribute__((packed)) { - u8 x:4; - u8 y:4; - } __attribute__((aligned (1))) as_nybbles; - } __attribute__((aligned (1))) range; + /*0x19*/ union MapObjectRange range; /*0x1A*/ u8 mapobj_unk_1A; /*0x1B*/ u8 mapobj_unk_1B; /*0x1C*/ u8 mapobj_unk_1C; -- cgit v1.2.3 From 12de501f36841eb22ea41fa1c3c98663a0aa210b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 19 May 2019 13:02:57 -0400 Subject: map_obj_lock --- include/global.fieldmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.fieldmap.h') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 801606d50..a14905cc2 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -331,7 +331,7 @@ struct Camera }; extern struct MapObject gMapObjects[NUM_FIELD_OBJECTS]; -extern u8 gSelectedMapObject; +extern u8 gSelectedEventObject; extern struct MapHeader gMapHeader; extern struct PlayerAvatar gPlayerAvatar; extern struct Camera gCamera; -- cgit v1.2.3 From b6a166c45960e1963bf508f83b9da1a8d6a71df4 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Tue, 4 Jun 2019 00:00:21 +0800 Subject: more symbol name fixes --- include/global.fieldmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.fieldmap.h') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index a14905cc2..3623737ea 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; - /*0x14*/ TilesetCB callback; - /*0x10*/ void *metatileAttributes; + /*0x10*/ TilesetCB callback; + /*0x14*/ void *metatileAttributes; }; struct MapData -- cgit v1.2.3