mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +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
|
@ -118,11 +118,16 @@ void Map_InitData(GlobalContext* globalCtx, s16 room) {
|
|||
extendedMapIndex = 0x15;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT09) {
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !((gSaveContext.eventChkInf[9] & 0xF) == 0xF)) {
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) &&
|
||||
!CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK |
|
||||
EVENTCHKINF_93_MASK)) {
|
||||
extendedMapIndex = 0x16;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT12) {
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK |
|
||||
EVENTCHKINF_93_MASK)) {
|
||||
extendedMapIndex = 0x17;
|
||||
}
|
||||
}
|
||||
|
@ -455,7 +460,8 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
(LINK_AGE_IN_YEARS != YEARS_ADULT)) {
|
||||
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
||||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
||||
(gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||
(gSaveContext.infTable[INFTABLE_1AX_INDEX] &
|
||||
gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
|
@ -470,7 +476,8 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT08) && (gSaveContext.infTable[26] & gBitFlags[9])) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT08) &&
|
||||
(gSaveContext.infTable[INFTABLE_1AX_INDEX] & gBitFlags[INFTABLE_1A9_SHIFT])) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8,
|
||||
8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue