summaryrefslogtreecommitdiff
path: root/include/global.fieldmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.fieldmap.h')
-rw-r--r--include/global.fieldmap.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index d87cd78f4..f200c0061 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -70,7 +70,7 @@ struct BackupMapData
u16 *map;
};
-struct MapObjectTemplate
+struct EventObjectTemplate
{
/*0x00*/ u8 localId;
/*0x01*/ u8 graphicsId;
@@ -79,15 +79,13 @@ struct MapObjectTemplate
/*0x06*/ s16 y;
/*0x08*/ u8 elevation;
/*0x09*/ u8 movementType;
- /*0x0A*/ u8 unkA_0:4;
- u8 unkA_4:4;
- ///*0x0B*/ u8 fillerB[1];
- /*0x0C*/ u16 unkC;
- /*0x0E*/ u16 unkE;
+ /*0x0A*/ u8 movementRangeX:4;
+ u8 movementRangeY:4;
+ /*0x0C*/ u16 trainerType;
+ /*0x0E*/ u16 trainerRange_berryTreeId;
/*0x10*/ u8 *script;
/*0x14*/ u16 flagId;
- /*0x16*/ u8 filler_16[2];
-}; /*size = 0x18*/
+};
struct WarpEvent
{
@@ -132,12 +130,12 @@ struct BgEvent
struct MapEvents
{
- u8 mapObjectCount;
+ u8 eventObjectCount;
u8 warpCount;
u8 coordEventCount;
u8 bgEventCount;
- struct MapObjectTemplate *mapObjects;
+ struct EventObjectTemplate *eventObjects;
struct WarpEvent *warps;
struct CoordEvent *coordEvents;
struct BgEvent *bgEvents;
@@ -175,16 +173,16 @@ struct MapHeader
/* 0x1B */ u8 battleType;
};
-struct MapObject
+struct EventObject
{
/*0x00*/ u32 active:1;
- u32 regularAnimActive:1;
+ u32 singleMovementActive:1;
u32 triggerGroundEffectsOnMove:1;
u32 triggerGroundEffectsOnStop:1;
u32 disableCoveringGroundEffects:1; // disables ground effects that cover parts of the object's sprite
u32 landingJump:1;
- u32 specialAnimActive:1;
- u32 specialAnimFinished:1;
+ u32 heldMovementActive:1;
+ u32 heldMovementFinished:1;
/*0x01*/ u32 frozen:1;
u32 facingDirectionLocked:1;
u32 disableAnim:1; // used to disable forced movement sliding animations (like on ice)
@@ -206,7 +204,7 @@ struct MapObject
u32 fixedPriority:1;
/*0x04*/ u8 spriteId;
/*0x05*/ u8 graphicsId;
- /*0x06*/ u8 animPattern;
+ /*0x06*/ u8 movementType;
/*0x07*/ u8 trainerType;
/*0x08*/ u8 localId;
/*0x09*/ u8 mapNum;
@@ -227,17 +225,17 @@ struct MapObject
} range;
/*0x1A*/ u8 fieldEffectSpriteId;
/*0x1B*/ u8 warpArrowSpriteId;
- /*0x1C*/ u8 animId;
+ /*0x1C*/ u8 movementActionId;
/*0x1D*/ u8 trainerRange_berryTreeId;
/*0x1E*/ u8 currentMetatileBehavior;
/*0x1F*/ u8 previousMetatileBehavior;
/*0x20*/ u8 previousMovementDirection;
/*0x21*/ u8 directionSequenceIndex;
- /*0x22*/ u8 playerAnimId;
+ /*0x22*/ u8 playerCopyableMovement; // used as an index to gCopyPlayerMovementFuncs for the "copy player" movement types
/*size = 0x24*/
};
-struct MapObjectGraphicsInfo
+struct EventObjectGraphicsInfo
{
/*0x00*/ u16 tileTag;
/*0x02*/ u16 paletteTag1;
@@ -284,6 +282,10 @@ enum
DIR_NORTH,
DIR_WEST,
DIR_EAST,
+ DIR_SOUTHWEST,
+ DIR_SOUTHEAST,
+ DIR_NORTHWEST,
+ DIR_NORTHEAST,
};
enum
@@ -314,7 +316,7 @@ struct PlayerAvatar /* 0x202E858 */
/*0x02*/ u8 runningState; // this is a static running state. 00 is not moving, 01 is turn direction, 02 is moving.
/*0x03*/ u8 tileTransitionState; // this is a transition running state: 00 is not moving, 01 is transition between tiles, 02 means you are on the frame in which you have centered on a tile but are about to keep moving, even if changing directions. 2 is also used for a ledge hop, since you are transitioning.
/*0x04*/ u8 spriteId;
- /*0x05*/ u8 mapObjectId;
+ /*0x05*/ u8 eventObjectId;
/*0x06*/ bool8 preventStep;
/*0x07*/ u8 gender;
/*0x08*/ u8 acroBikeState; // 00 is normal, 01 is turning, 02 is standing wheelie, 03 is hopping wheelie
@@ -336,8 +338,8 @@ struct Camera
s32 y;
};
-extern struct MapObject gMapObjects[];
-extern u8 gSelectedMapObject;
+extern struct EventObject gEventObjects[];
+extern u8 gSelectedEventObject;
extern struct MapHeader gMapHeader;
extern struct PlayerAvatar gPlayerAvatar;