mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-30 01:09:34 +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));
|
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
|
#define linkGender(obj) obj->singleMovementActive
|
||||||
// not even one can reference *byte* aligned bitfield members...
|
// not even one can reference *byte* aligned bitfield members...
|
||||||
#define linkDirection(obj) ((u8*)obj)[offsetof(typeof(*obj), fieldEffectSpriteId) - 1] // -> rangeX
|
#define linkDirection(obj) ((u8*)obj)[offsetof(typeof(*obj), fieldEffectSpriteId) - 1] // -> rangeX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user