document reuse of variables in link mode
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user