diff options
author | yenatch <yenatch@gmail.com> | 2017-03-22 18:34:29 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-03-22 18:34:29 -0400 |
commit | 7acbfe40778bfbd03b0e2d357efef9ee9b0a34e9 (patch) | |
tree | 90c0b95146f3d768b536658eac6a63ff9adcaaec /include/global.fieldmap.h | |
parent | c0a27d5455014bfe54f7ea73e8a38ce0ed8da6da (diff) | |
parent | e3c26e52ae6ab881ade913ca1fad2cd9629bbcb1 (diff) |
Merge remote-tracking branch 'origin/master'
Conflicts:
Makefile
Diffstat (limited to 'include/global.fieldmap.h')
-rw-r--r-- | include/global.fieldmap.h | 144 |
1 files changed, 102 insertions, 42 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 95ccf2614..508d7e4ed 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -14,16 +14,16 @@ enum // map types enum { - MAP_TYPE_0, - MAP_TYPE_TOWN, - MAP_TYPE_CITY, - MAP_TYPE_ROUTE, - MAP_TYPE_UNDERGROUND, - MAP_TYPE_UNDERWATER, - MAP_TYPE_6, - MAP_TYPE_7, - MAP_TYPE_INDOOR, - MAP_TYPE_SECRET_BASE + MAP_TYPE_0, + MAP_TYPE_TOWN, + MAP_TYPE_CITY, + MAP_TYPE_ROUTE, + MAP_TYPE_UNDERGROUND, + MAP_TYPE_UNDERWATER, + MAP_TYPE_6, + MAP_TYPE_7, + MAP_TYPE_INDOOR, + MAP_TYPE_SECRET_BASE }; // map battle scenes @@ -66,28 +66,35 @@ struct MapData struct MapObjectTemplate { /*0x00*/ u8 localId; - /*0x01*/ u8 filler_1[0x3]; + /*0x01*/ u8 graphicsId; + /*0x02*/ u8 unk2; /*0x04*/ s16 x; /*0x06*/ s16 y; /*0x08*/ u8 elevation; /*0x09*/ u8 movementType; - /*0x0A*/ u8 filler_A[0x6]; + /*0x0A*/ u8 unkA_0:4; + u8 unkA_4:4; + ///*0x0B*/ u8 fillerB[1]; + /*0x0C*/ u16 unkC; + /*0x0E*/ u16 unkE; /*0x10*/ u8 *script; - /*0x14*/ u8 filler_14[0x4]; + /*0x14*/ u16 flagId; + /*0x16*/ u8 filler_16[2]; }; /*size = 0x18*/ struct WarpEvent { s16 x, y; s8 warpId; - s8 mapGroup; - s8 mapNum; + u8 mapGroup; + u8 mapNum; + u8 unk7; }; struct CoordEvent { s16 x, y; - u8 filler_4; + u8 unk4; u8 filler_5; u16 trigger; u16 index; @@ -98,10 +105,23 @@ struct CoordEvent struct BgEvent { s16 x, y; - u8 filler_4; + u8 unk4; u8 kind; - s16 filler_6; - u8 *script; + // 0x2 padding for the union beginning. + union { // carried over from diego's FR/LG work, seems to be the same struct + // in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union. + u8 *script; + + // hidden item type probably + struct { + u8 filler6[0x2]; + u16 hiddenItemId; // flag offset to determine flag lookup + } hiddenItem; + + // secret base type + u16 secretBaseId; + + } bgUnion; }; struct MapEvents @@ -119,10 +139,10 @@ struct MapEvents struct MapConnection { - u8 direction; - u32 offset; - u8 mapGroup; - u8 mapNum; + /*0x00*/ u8 direction; + /*0x01*/ u32 offset; + /*0x05*/ u8 mapGroup; + /*0x06*/ u8 mapNum; }; struct MapConnections @@ -195,7 +215,7 @@ struct MapObject /*0x0C*/ struct Coords16 coords1; /*0x10*/ struct Coords16 coords2; /*0x14*/ struct Coords16 coords3; - /*0x18*/ u8 mapobj_unk_18:4; + /*0x18*/ u8 mapobj_unk_18:4; //current direction? /*0x18*/ u8 placeholder18:4; /*0x19*/ u8 mapobj_unk_19; /*0x1A*/ u8 mapobj_unk_1A; @@ -206,7 +226,7 @@ struct MapObject /*0x1F*/ u8 mapobj_unk_1F; /*0x20*/ u8 mapobj_unk_20; /*0x21*/ u8 mapobj_unk_21; - /*0x22*/ u8 mapobj_unk_22; + /*0x22*/ u8 animId; /*size = 0x24*/ }; @@ -274,22 +294,22 @@ struct MapObject2 struct MapObjectGraphicsInfo { - u16 tileTag; - u16 paletteTag1; - u16 paletteTag2; - u16 size; - s16 width; - s16 height; - u8 paletteSlot:4; - u8 shadowSize:2; - u8 inanimate:1; - u8 disableReflectionPaletteLoad:1; - u8 tracks; - struct OamData *oam; - struct SubspriteTable *subspriteTables; - union AnimCmd **anims; - struct SpriteFrameImage *images; - union AffineAnimCmd **affineAnims; + /*0x00*/ u16 tileTag; + /*0x02*/ u16 paletteTag1; + /*0x04*/ u16 paletteTag2; + /*0x06*/ u16 size; + /*0x08*/ s16 width; + /*0x0A*/ s16 height; + /*0x0C*/ u8 paletteSlot:4; + u8 shadowSize:2; + u8 inanimate:1; + u8 disableReflectionPaletteLoad:1; + /*0x0D*/ u8 tracks; + /*0x10*/ struct OamData *oam; + /*0x14*/ struct SubspriteTable *subspriteTables; + /*0x18*/ const union AnimCmd *const *anims; + /*0x1C*/ struct SpriteFrameImage *images; + /*0x20*/ const union AffineAnimCmd *const *affineAnims; }; #define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) @@ -301,7 +321,32 @@ struct MapObjectGraphicsInfo #define PLAYER_AVATAR_FLAG_6 (1 << 6) #define PLAYER_AVATAR_FLAG_DASH (1 << 7) -struct PlayerAvatar +enum +{ + ACRO_BIKE_NORMAL, + ACRO_BIKE_TURNING, + ACRO_BIKE_WHEELIE_STANDING, + ACRO_BIKE_BUNNY_HOP, + ACRO_BIKE_WHEELIE_MOVING, + ACRO_BIKE_STATE5, + ACRO_BIKE_STATE6, +}; + +enum +{ + DIR_NONE, + DIR_SOUTH, + DIR_NORTH, + DIR_WEST, + DIR_EAST, +}; + +enum +{ + COLLISION_LEDGE_JUMP = 6 +}; + +struct PlayerAvatar /* 0x202E858 */ { /*0x00*/ u8 flags; /*0x01*/ u8 bike; @@ -311,9 +356,24 @@ struct PlayerAvatar /*0x05*/ u8 mapObjectId; /*0x06*/ u8 unk6; /*0x07*/ u8 gender; + u8 acroBikeState; + u8 unk9; + u8 bikeFrameCounter; + u8 unkB; + u32 unkC; + u32 unk10; + u8 unk14[8]; + u8 unk1C[8]; // TODO: rest of struct }; +struct Camera +{ + bool8 field_0:1; + s32 x; + s32 y; +}; + extern struct MapObject gMapObjects[]; extern u8 gSelectedMapObject; extern struct MapHeader gMapHeader; |