embrace direction macros

This commit is contained in:
Behemoth
2020-09-01 01:21:50 +02:00
parent 662e221f89
commit 0a2c0ad456
11 changed files with 69 additions and 76 deletions
+2
View File
@@ -175,6 +175,8 @@ extern void PositionRelative(Entity*, Entity*, s32, s32);
#define DirectionIsVertical(expr) ((expr) & 0x10)
#define DirectionTurnHorizontal(expr) (DirectionRoundUp(expr) ^ 0x08)
#define DirectionTurnVertical(expr) (DirectionRoundUp(expr) ^ 0x10)
#define DirectionToAnimationState(expr) (DirectionRoundUp(expr) >> 3)
#define DirectionFromAnimationState(expr) (expr << 3)
extern Entity gUnk_03003DA0;