mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 17:30:25 +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
|
@ -470,7 +470,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
Inventory_ChangeEquipment(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP]);
|
||||
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] == 0) {
|
||||
gSaveContext.infTable[29] = 0;
|
||||
gSaveContext.infTable[INFTABLE_1DX_INDEX] = 0;
|
||||
gSaveContext.equips.buttonItems[0] = cursorItem;
|
||||
|
||||
if ((pauseCtx->cursorX[PAUSE_EQUIP] == 3) && (gSaveContext.bgsFlag != 0)) {
|
||||
|
|
|
@ -2664,7 +2664,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[1] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[11] & 4) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_B2)) {
|
||||
pauseCtx->worldMapPoints[2] = 1;
|
||||
}
|
||||
|
||||
|
@ -2688,7 +2688,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[3] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
|
||||
pauseCtx->worldMapPoints[4] = 1;
|
||||
}
|
||||
|
||||
|
@ -2700,19 +2700,19 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[4] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x400) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_6A)) {
|
||||
pauseCtx->worldMapPoints[4] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
pauseCtx->worldMapPoints[4] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
|
||||
pauseCtx->worldMapPoints[5] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
pauseCtx->worldMapPoints[5] = 1;
|
||||
}
|
||||
|
||||
|
@ -2720,7 +2720,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[5] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
pauseCtx->worldMapPoints[5] = 1;
|
||||
}
|
||||
|
||||
|
@ -2728,15 +2728,15 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[5] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
|
||||
pauseCtx->worldMapPoints[6] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
pauseCtx->worldMapPoints[7] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[2] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_25)) {
|
||||
pauseCtx->worldMapPoints[7] = 1;
|
||||
}
|
||||
|
||||
|
@ -2744,7 +2744,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[7] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_49)) {
|
||||
pauseCtx->worldMapPoints[7] = 1;
|
||||
}
|
||||
|
||||
|
@ -2760,7 +2760,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[8] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
pauseCtx->worldMapPoints[8] = 2;
|
||||
}
|
||||
|
||||
|
@ -2772,11 +2772,11 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[8] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
|
||||
pauseCtx->worldMapPoints[8] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[10] & 0x400) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_AA)) {
|
||||
pauseCtx->worldMapPoints[8] = 2;
|
||||
}
|
||||
|
||||
|
@ -2788,7 +2788,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[9] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x8000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_0F)) {
|
||||
pauseCtx->worldMapPoints[9] = 2;
|
||||
}
|
||||
|
||||
|
@ -2800,21 +2800,21 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[9] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_48)) {
|
||||
pauseCtx->worldMapPoints[9] = 1;
|
||||
}
|
||||
|
||||
pauseCtx->worldMapPoints[10] = 2;
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
|
||||
pauseCtx->worldMapPoints[10] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x4000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_6E)) {
|
||||
pauseCtx->worldMapPoints[10] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x8000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_0F)) {
|
||||
pauseCtx->worldMapPoints[10] = 1;
|
||||
}
|
||||
|
||||
|
@ -2822,11 +2822,11 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[11] = 1;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[2] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_25)) {
|
||||
pauseCtx->worldMapPoints[11] = 2;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[3] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_37)) {
|
||||
pauseCtx->worldMapPoints[11] = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue