mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
document reuse of variables in link mode
This commit is contained in:
parent
58976ebaa8
commit
6faa63347a
@ -2908,6 +2908,9 @@ static void ZeroObjectEvent(struct ObjectEvent *objEvent)
|
||||
memset(objEvent, 0, sizeof(struct ObjectEvent));
|
||||
}
|
||||
|
||||
// Note: Emerald reuses the direction and range variables during Link mode
|
||||
// as special gender and direction values. The types and placement
|
||||
// conflict with the usual Event Object struct, thus the definitions.
|
||||
#define linkGender(obj) obj->singleMovementActive
|
||||
// not even one can reference *byte* aligned bitfield members...
|
||||
#define linkDirection(obj) ((u8*)obj)[offsetof(typeof(*obj), fieldEffectSpriteId) - 1] // -> rangeX
|
||||
|
Loading…
Reference in New Issue
Block a user