mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +00:00
Defines for SaveContext
flags (eventChkInf
, itemGetInf
, infTable
, eventInf
) (#1094)
* script-assisted `itemGetInf` flags * comment near non-trivial `itemGetInf` usage * Run formatter * Try something with the itemgetinf flags that can't use the packed value * Add defines for `eventChkInf` (direct access) * Add defines for `eventChkInf` (access through `Flags_GetEventChkInf`) * Add defines for `eventChkInf` (access through `Flags_SetEventChkInf`) * Add defines for `infTable` (direct access) * Add defines for `infTable` (used by `Flags_GetInfTable`) * Add defines for `infTable` (used by `Flags_SetInfTable`) * Add defines for `eventInf` * parenthesis cleanup near `GET_EVENTCHKINF` usage * parenthesis cleanup near `GET_ITEMGETINF` usage * parenthesis cleanup near `GET_INFTABLE` usage * fixup one `eventInf` usage * parenthesis cleanup near `GET_EVENTINF` usage * parenthesis cleanup near `Flags_GetEventChkInf` usage * slight `z64save.h` formatting improvement * Improve itemGetInf flags in z_bg_dy_yoseizo * Questionable improvement in z_en_ge2 * Questionable improvement in z_en_daiku * Questionable improvement in z_en_mu * Run formatter * Parentheses around `gSaveContext` macros arguments * Move individual flags define to the end of z64save.h, and improve comments separating the groups
This commit is contained in:
parent
16790bc253
commit
6336df5fcd
146 changed files with 1931 additions and 1315 deletions
|
@ -186,7 +186,7 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.textId == 0x2026) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x400;
|
||||
SET_ITEMGETINF(ITEMGETINF_3A);
|
||||
Rupees_ChangeBy(30);
|
||||
this->actor.textId = 0x2027;
|
||||
talkState = 2;
|
||||
|
@ -210,7 +210,7 @@ s32 EnCs_GetTextID(EnCs* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 textId = Text_GetFaceReaction(globalCtx, 15);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
if (textId == 0) {
|
||||
textId = 0x2028;
|
||||
}
|
||||
|
@ -333,14 +333,14 @@ void EnCs_Walk(EnCs* this, GlobalContext* globalCtx) {
|
|||
animIndex = this->currentAnimIndex;
|
||||
|
||||
if (this->talkState == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
rnd = Rand_ZeroOne() * 10.0f;
|
||||
} else {
|
||||
rnd = Rand_ZeroOne() * 5.0f;
|
||||
}
|
||||
|
||||
if (rnd == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
animIndex = 2.0f * Rand_ZeroOne();
|
||||
animIndex = (animIndex == 0) ? ENCS_ANIM_2 : ENCS_ANIM_1;
|
||||
} else {
|
||||
|
@ -469,7 +469,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
s32 childLinkObjectIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
// Handle attaching the Spooky Mask to the boy's face
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue