make linkDirection more robust to member reordering

This commit is contained in:
cawtds
2025-04-09 13:40:39 +02:00
parent a3075325a0
commit 1672d99060
4 changed files with 24 additions and 21 deletions

View File

@@ -210,8 +210,11 @@ struct ObjectEvent
/*0x14*/ struct Coords16 previousCoords;
/*0x18*/ u16 facingDirection:4; // current direction?
u16 movementDirection:4;
u16 rangeX:4;
u16 rangeY:4;
struct __attribute__((packed))
{
u16 rangeX:4;
u16 rangeY:4;
} range;
/*0x1A*/ u8 fieldEffectSpriteId;
/*0x1B*/ u8 warpArrowSpriteId;
/*0x1C*/ u8 movementActionId;