document reuse of variables in link mode
This commit is contained in:
parent
58976ebaa8
commit
6faa63347a
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue