1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 20:35:13 +00:00

Decompile z_play.c and Match/Document some of z_view.c (#74)

* Decompile z_play.c and Match/Document some of z_view.c

Also fix the last non matching in z_sample.c and update some game state functions.

* Suggestions from PR #74

* Fix undefined reference to Gameplay_DrawOverlay

* Suggestion from PR #74 (2)

* Fix a fake argument in func_800BC450
This commit is contained in:
Roman971 2020-04-16 23:36:12 +02:00 committed by GitHub
parent 9ac1f8130d
commit 262f6c507c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
278 changed files with 5139 additions and 5939 deletions

View file

@ -13,14 +13,16 @@
#define SQ(x) ((x)*(x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
#define CLAMP(x,min,max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define RGBA8(r, g, b, a) (((r & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | ((a & 0xFF) << 0))
#define PLAYER ((Player*)globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first)
#define YEARS_CHILD 5
#define YEARS_ADULT 17
#define LINK_IS_CHILD (gSaveContext.link_age != 0)
#define LINK_IS_ADULT (gSaveContext.link_age == 0)
#define LINK_IS_CHILD (gSaveContext.linkAge != 0)
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
#define LINK_AGE_IN_YEARS (LINK_IS_CHILD ? YEARS_CHILD : YEARS_ADULT)
#define SLOT(item) gItemSlots[item]
@ -35,6 +37,8 @@
#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
#define CUR_CAPACITY(upg) CAPACITY(upg, CUR_UPG_VALUE(upg))
#define CHECK_QUEST_ITEM(item) (gBitFlags[item] & gSaveContext.questItems)
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
(curState)->init = newInit; \
(curState)->size = sizeof(newStruct);
@ -43,8 +47,8 @@
LogUtils_LogThreadId(file, line); \
osSyncPrintf(exp " = " format "\n", value);
#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
#define LOG_STRING(string, file, line) LOG(#string, string, "%s", file, line)
#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)