1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 15:01:17 +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:
Dragorn421 2022-04-29 20:19:48 +02:00 committed by GitHub
parent 16790bc253
commit 6336df5fcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
146 changed files with 1931 additions and 1315 deletions

View file

@ -128,13 +128,13 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
if ((fabsf(player->actor.world.pos.x - (GND_BOSSROOM_CENTER_X + 0.0f)) < 100.0f) &&
(fabsf(player->actor.world.pos.z - (GND_BOSSROOM_CENTER_Z + 315.0f)) < 100.0f)) {
this->cutsceneState = INTRO_START;
if (gSaveContext.eventChkInf[7] & 4) {
if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
this->timers[0] = 57;
}
}
break;
case INTRO_START:
if (gSaveContext.eventChkInf[7] & 4) {
if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
if (this->timers[0] == 55) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_SHUTTER,
GND_BOSSROOM_CENTER_X + 0.0f, GND_BOSSROOM_CENTER_Y - 97.0f,
@ -159,7 +159,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
this->timers[0] = 60;
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
gSaveContext.eventChkInf[7] |= 4;
SET_EVENTCHKINF(EVENTCHKINF_72);
Flags_SetSwitch(globalCtx, 0x23);
case INTRO_FENCE:
player->actor.world.pos.x = GND_BOSSROOM_CENTER_X + 0.0f;