mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Misc Cleanup 2 (#1007)
* Cleanup `UNK_TYPE`, `UNK_PTR` usage * Add some missing empty lines after declarations * Remove some legacy comments from non-matching times * Fix some grammar (mostly "it's"/"its") * Use proper names for two symbols after ZAPD bugfix * Cleanup `place_title_cards.xml` * Use `NULL` to check against `D_8012D260` pointer * Parentheses around some macro arguments * wip proofread headers up to z64animation.h
This commit is contained in:
parent
04a9d51e90
commit
669732abbe
104 changed files with 217 additions and 92 deletions
|
@ -21,9 +21,11 @@
|
|||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
|
||||
#define MEDIAN3(a1, a2, a3) ((a2 >= a1) ? ((a3 >= a2) ? a2 : ((a1 >= a3) ? a1 : a3)) : ((a2 >= a3) ? a2 : ((a3 >= a1) ? a1 : a3)))
|
||||
#define MEDIAN3(a1, a2, a3) \
|
||||
(((a2) >= (a1)) ? (((a3) >= (a2)) ? (a2) : (((a1) >= (a3)) ? (a1) : (a3))) \
|
||||
: (((a2) >= (a3)) ? (a2) : (((a3) >= (a1)) ? (a1) : (a3))))
|
||||
|
||||
#define RGBA8(r, g, b, a) (((r & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | ((a & 0xFF) << 0))
|
||||
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
|
||||
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorLists[ACTORCAT_PLAYER].head)
|
||||
|
||||
|
@ -68,8 +70,8 @@
|
|||
? ITEM_SWORD_BGS \
|
||||
: gSaveContext.equips.buttonItems[0])
|
||||
|
||||
#define C_BTN_ITEM(button) ((gSaveContext.buttonStatus[button + 1] != BTN_DISABLED) \
|
||||
? gSaveContext.equips.buttonItems[button + 1] \
|
||||
#define C_BTN_ITEM(button) ((gSaveContext.buttonStatus[(button) + 1] != BTN_DISABLED) \
|
||||
? gSaveContext.equips.buttonItems[(button) + 1] \
|
||||
: ITEM_NONE)
|
||||
|
||||
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue