mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-24 07:10:44 -04:00
z_parameter: Hud Visibility (#942)
* Begin interface alpha docs * More Interface Alpha * cleanup docs * Minor fixes * Apply Discord Discussions * More discussions * More suggestions from OoT * fix merge
This commit is contained in:
+14
-14
@@ -1336,7 +1336,7 @@ s32 func_800B715C(PlayState* play) {
|
||||
}
|
||||
|
||||
void Actor_SetCameraHorseSetting(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.currRoom.unk3 != 4) && (player->actor.id == ACTOR_PLAYER)) {
|
||||
if ((play->roomCtx.curRoom.unk3 != 4) && (player->actor.id == ACTOR_PLAYER)) {
|
||||
EnHorse* rideActor = (EnHorse*)player->rideActor;
|
||||
|
||||
if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) {
|
||||
@@ -2499,7 +2499,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
light = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx);
|
||||
if ((actor->flags & ACTOR_FLAG_10000000) && (play->roomCtx.currRoom.enablePosLights || (MREG(93) != 0))) {
|
||||
if ((actor->flags & ACTOR_FLAG_10000000) && (play->roomCtx.curRoom.enablePosLights || (MREG(93) != 0))) {
|
||||
light->enablePosLights = true;
|
||||
}
|
||||
|
||||
@@ -2669,7 +2669,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) {
|
||||
gDPSetPrimColor(spAC++, 0, 0, 0, 0, 0, 255);
|
||||
// temp_s1_5 = spAC;
|
||||
|
||||
if (play->roomCtx.currRoom.unk5 == 0) {
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
// temp_s1_5->words.w0 = 0xFC61E6C3;
|
||||
// temp_s1_5->words.w1 = 0x11CF9FCF;
|
||||
// phi_s1 = temp_s1_5 + 8;
|
||||
@@ -2719,7 +2719,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) {
|
||||
|
||||
// temp_a0_2 = &spAC;
|
||||
// if (sp34->unk_6E5 == 0) {
|
||||
if (play->roomCtx.currRoom.unk5 == 0) {
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
// temp_s1_10->unk_0 = 0xFC119623;
|
||||
// temp_s1_10->unk_4 = 0xFF2FFFFF;
|
||||
// phi_s1_4 = temp_s1_10 + 8;
|
||||
@@ -2882,8 +2882,8 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->isDrawn = false;
|
||||
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & actorFlags)) {
|
||||
if ((actor->flags & ACTOR_FLAG_80) &&
|
||||
((play->roomCtx.currRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.currRoom.num))) {
|
||||
((play->roomCtx.curRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.curRoom.num))) {
|
||||
if (Actor_RecordUndrawnActor(play, actor)) {}
|
||||
} else {
|
||||
Actor_Draw(play, actor);
|
||||
@@ -2960,7 +2960,7 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) {
|
||||
actor = actorCtx->actorLists[i].first;
|
||||
|
||||
while (actor != NULL) {
|
||||
if ((actor->room >= 0) && (actor->room != play->roomCtx.currRoom.num) &&
|
||||
if ((actor->room >= 0) && (actor->room != play->roomCtx.curRoom.num) &&
|
||||
(actor->room != play->roomCtx.prevRoom.num)) {
|
||||
if (!actor->isDrawn) {
|
||||
actor = Actor_Delete(actorCtx, actor, play);
|
||||
@@ -3091,9 +3091,9 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor*
|
||||
actorToRemove->next = NULL;
|
||||
actorToRemove->prev = NULL;
|
||||
|
||||
if ((actorToRemove->room == play->roomCtx.currRoom.num) && (actorToRemove->category == ACTORCAT_ENEMY) &&
|
||||
if ((actorToRemove->room == play->roomCtx.curRoom.num) && (actorToRemove->category == ACTORCAT_ENEMY) &&
|
||||
(actorCtx->actorLists[ACTORCAT_ENEMY].length == 0)) {
|
||||
Flags_SetClearTemp(play, play->roomCtx.currRoom.num);
|
||||
Flags_SetClearTemp(play, play->roomCtx.curRoom.num);
|
||||
}
|
||||
|
||||
return newHead;
|
||||
@@ -3180,8 +3180,8 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
}
|
||||
|
||||
objBankIndex = Object_GetIndex(&play->objectCtx, actorInit->objectId);
|
||||
if ((objBankIndex < 0) || ((actorInit->type == ACTORCAT_ENEMY) &&
|
||||
Flags_GetClear(play, play->roomCtx.currRoom.num) && (actorInit->id != ACTOR_BOSS_05))) {
|
||||
if ((objBankIndex < 0) || ((actorInit->type == ACTORCAT_ENEMY) && Flags_GetClear(play, play->roomCtx.curRoom.num) &&
|
||||
(actorInit->id != ACTOR_BOSS_05))) {
|
||||
Actor_FreeOverlay(&gActorOverlayTable[index]);
|
||||
return NULL;
|
||||
}
|
||||
@@ -3219,7 +3219,7 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
actor->parent = parent;
|
||||
parent->child = actor;
|
||||
} else {
|
||||
actor->room = play->roomCtx.currRoom.num;
|
||||
actor->room = play->roomCtx.curRoom.num;
|
||||
}
|
||||
|
||||
actor->home.pos.x = x;
|
||||
@@ -3267,10 +3267,10 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
for (i = 0; i < numTransitionActors; transitionActorList++, i++) {
|
||||
if (transitionActorList->id >= 0) {
|
||||
if ((transitionActorList->sides[0].room >= 0 &&
|
||||
(play->roomCtx.currRoom.num == transitionActorList->sides[0].room ||
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[0].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[0].room)) ||
|
||||
(transitionActorList->sides[1].room >= 0 &&
|
||||
(play->roomCtx.currRoom.num == transitionActorList->sides[1].room ||
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[1].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[1].room))) {
|
||||
s16 rotY = ((transitionActorList->rotY >> 7) & 0x1FF) * (0x10000 / 360.0f);
|
||||
|
||||
|
||||
@@ -4404,7 +4404,7 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
|
||||
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
|
||||
curWaterBox++) {
|
||||
room = 0x3F & (curWaterBox->properties >> 13);
|
||||
if (room == (u32)play->roomCtx.currRoom.num || room == 0x3F) {
|
||||
if (room == (u32)play->roomCtx.curRoom.num || room == 0x3F) {
|
||||
if (curWaterBox->properties & 0x80000) {
|
||||
continue;
|
||||
}
|
||||
@@ -4489,7 +4489,7 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
|
||||
waterBox = &colHeader->waterBoxes[i];
|
||||
|
||||
room = WATERBOX_ROOM(waterBox->properties);
|
||||
if (!(room == play->roomCtx.currRoom.num || room == 0x3F)) {
|
||||
if (!(room == play->roomCtx.curRoom.num || room == 0x3F)) {
|
||||
continue;
|
||||
}
|
||||
if ((waterBox->properties & 0x80000)) {
|
||||
@@ -4631,7 +4631,7 @@ s32 func_800CA6F0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32*
|
||||
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
|
||||
curWaterBox++) {
|
||||
room = WATERBOX_ROOM(curWaterBox->properties);
|
||||
if (room == (u32)play->roomCtx.currRoom.num || room == 0x3F) {
|
||||
if (room == (u32)play->roomCtx.curRoom.num || room == 0x3F) {
|
||||
if ((curWaterBox->properties & 0x80000) != 0) {
|
||||
if (curWaterBox->minPos.x < x && x < curWaterBox->minPos.x + curWaterBox->xLength) {
|
||||
if (curWaterBox->minPos.z < z && z < curWaterBox->minPos.z + curWaterBox->zLength) {
|
||||
|
||||
@@ -16,7 +16,7 @@ void SaveContext_Init(void) {
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_3F26 = 50;
|
||||
gSaveContext.prevHudVisibility = HUD_VISIBILITY_ALL;
|
||||
|
||||
gSaveContext.options.language = 1;
|
||||
gSaveContext.options.audioSetting = 0;
|
||||
|
||||
+6
-6
@@ -105,7 +105,7 @@ s32 func_800EA220(PlayState* play, CutsceneContext* csCtx, f32 target) {
|
||||
}
|
||||
|
||||
void func_800EA258(PlayState* play, CutsceneContext* csCtx) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
if (func_800EA220(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(true);
|
||||
@@ -115,7 +115,7 @@ void func_800EA258(PlayState* play, CutsceneContext* csCtx) {
|
||||
|
||||
void func_800EA2B8(PlayState* play, CutsceneContext* csCtx) {
|
||||
func_800ED980(play, csCtx);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
if (func_800EA220(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(true);
|
||||
@@ -215,7 +215,7 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
D_801F6D30.a = 255 * progress;
|
||||
break;
|
||||
case 0xC:
|
||||
play->roomCtx.currRoom.segment = NULL;
|
||||
play->roomCtx.curRoom.segment = NULL;
|
||||
break;
|
||||
case 0xD:
|
||||
if (play->state.frames & 8) {
|
||||
@@ -561,7 +561,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (csCtx->frames != cmd->startFrame)) {
|
||||
gSaveContext.unk_3F1E = 1;
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = true;
|
||||
}
|
||||
|
||||
gSaveContext.save.cutscene = 0;
|
||||
@@ -1078,7 +1078,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
}
|
||||
|
||||
if (originalCsFrames == csCtx->frames) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
D_801BB124 = 0;
|
||||
D_801BB128 = 0;
|
||||
func_80161C0C();
|
||||
@@ -1451,7 +1451,7 @@ void func_800EDA84(PlayState* play, CutsceneContext* csCtx) {
|
||||
csCtx->unk_18 = 0xFFFF;
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
ShrinkWindow_SetLetterboxMagnitude(0x20);
|
||||
csCtx->state++;
|
||||
|
||||
@@ -57,10 +57,10 @@ void GameOver_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_ENABLED;
|
||||
gSaveContext.unk_3F1E = 0;
|
||||
gSaveContext.unk_3F20 = 0;
|
||||
gSaveContext.unk_3F22 = 0;
|
||||
gSaveContext.unk_3F24 = 0;
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = false;
|
||||
gSaveContext.nextHudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibilityTimer = 0;
|
||||
Kankyo_InitGameOverLights(play);
|
||||
sGameOverTimer = 20;
|
||||
Rumble_Request(0.0f, 126, 124, 63);
|
||||
|
||||
@@ -81,7 +81,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1) &&
|
||||
!(play->actorCtx.flags & ACTORCTX_FLAG_2)) {
|
||||
if ((play->actorCtx.unk268 == 0) && CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
gSaveContext.unk_3F26 = gSaveContext.unk_3F22;
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
pauseCtx->state = 1;
|
||||
func_800F4A10(play);
|
||||
|
||||
@@ -177,7 +177,7 @@ void Map_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 dungeonIndex;
|
||||
|
||||
func_80105C40(play->roomCtx.currRoom.num);
|
||||
func_80105C40(play->roomCtx.curRoom.num);
|
||||
interfaceCtx->unk_278 = -1;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = -1;
|
||||
interfaceCtx->mapSegment = THA_AllocEndAlign16(&play->state.heap, 0x1000);
|
||||
@@ -208,7 +208,7 @@ void Map_Init(PlayState* play) {
|
||||
}
|
||||
|
||||
gSaveContext.dungeonIndex = dungeonIndex;
|
||||
Map_InitRoomData(play, play->roomCtx.currRoom.num);
|
||||
Map_InitRoomData(play, play->roomCtx.curRoom.num);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ void func_80151A68(PlayState* play, u16 textId) {
|
||||
XREG(77) = 0x3C;
|
||||
XREG(76) = 0x1C;
|
||||
msgCtx->unk11F1A[0] = msgCtx->unk11F1A[1] = msgCtx->unk11F1A[2] = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+761
-4
@@ -281,13 +281,770 @@ void func_8010EBA0(s16 timer, s16 timerId);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8010EE74.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_ChangeAlpha.s")
|
||||
void Interface_SetHudVisibility(u16 hudVisibility) {
|
||||
if (gSaveContext.hudVisibility != hudVisibility) {
|
||||
gSaveContext.hudVisibility = hudVisibility;
|
||||
gSaveContext.nextHudVisibility = hudVisibility;
|
||||
gSaveContext.hudVisibilityTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8010EF9C.s")
|
||||
/**
|
||||
* Sets the button alphas to be dimmed for disabled buttons, or to the requested alpha for non-disabled buttons
|
||||
*/
|
||||
void Interface_UpdateButtonAlphasByStatus(PlayState* play, s16 risingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8010F0D4.s")
|
||||
if ((gSaveContext.buttonStatus[EQUIP_SLOT_B] == BTN_DISABLED) || (gSaveContext.unk_1015 == ITEM_NONE)) {
|
||||
if (interfaceCtx->bAlpha != 70) {
|
||||
interfaceCtx->bAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8010F1A8.s")
|
||||
if (gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] == BTN_DISABLED) {
|
||||
if (interfaceCtx->cLeftAlpha != 70) {
|
||||
interfaceCtx->cLeftAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->cLeftAlpha != 255) {
|
||||
interfaceCtx->cLeftAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] == BTN_DISABLED) {
|
||||
if (interfaceCtx->cDownAlpha != 70) {
|
||||
interfaceCtx->cDownAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->cDownAlpha != 255) {
|
||||
interfaceCtx->cDownAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] == BTN_DISABLED) {
|
||||
if (interfaceCtx->cRightAlpha != 70) {
|
||||
interfaceCtx->cRightAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->cRightAlpha != 255) {
|
||||
interfaceCtx->cRightAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.buttonStatus[EQUIP_SLOT_A] == BTN_DISABLED) {
|
||||
if (interfaceCtx->aAlpha != 70) {
|
||||
interfaceCtx->aAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lower button alphas on the HUD to the requested value
|
||||
* If (gSaveContext.hudVisibilityForceButtonAlphasByStatus), then instead update button alphas
|
||||
* depending on button status
|
||||
*/
|
||||
void Interface_UpdateButtonAlphas(PlayState* play, s16 dimmingAlpha, s16 risingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (gSaveContext.hudVisibilityForceButtonAlphasByStatus) {
|
||||
Interface_UpdateButtonAlphasByStatus(play, risingAlpha);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s16 risingAlpha = 255 - dimmingAlpha;
|
||||
|
||||
switch (gSaveContext.nextHudVisibility) {
|
||||
case HUD_VISIBILITY_NONE:
|
||||
case HUD_VISIBILITY_NONE_ALT:
|
||||
case HUD_VISIBILITY_B:
|
||||
if (gSaveContext.nextHudVisibility == HUD_VISIBILITY_B) {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
} else {
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_WITH_OVERWRITE:
|
||||
// aAlpha is immediately overwritten in Interface_UpdateButtonAlphas
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
Interface_UpdateButtonAlphas(play, dimmingAlpha, risingAlpha + 0);
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
// aAlpha is immediately overwritten below
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_WITH_OVERWRITE:
|
||||
Interface_UpdateButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
// aAlpha overwrites the value set in Interface_UpdateButtonAlphas
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_WITH_OVERWRITE:
|
||||
Interface_UpdateButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
// aAlpha overwrites the value set in Interface_UpdateButtonAlphas
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_SPOT00) {
|
||||
if (interfaceCtx->minimapAlpha < 170) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
} else {
|
||||
interfaceCtx->minimapAlpha = 170;
|
||||
}
|
||||
} else if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_ALL_NO_MINIMAP_W_DISABLED:
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
Interface_UpdateButtonAlphasByStatus(play, risingAlpha);
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_B_ALT:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_B_MINIMAP:
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if ((gSaveContext.buttonStatus[EQUIP_SLOT_B] == BTN_DISABLED) || (gSaveContext.unk_1015 == ITEM_NONE)) {
|
||||
if (interfaceCtx->bAlpha != 70) {
|
||||
interfaceCtx->bAlpha = 70;
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC_WITH_OVERWRITE:
|
||||
Interface_UpdateButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
// aAlpha overwrites the value set in Interface_UpdateButtonAlphas
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC_C:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cLeftAlpha != 255) {
|
||||
interfaceCtx->cLeftAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cDownAlpha != 255) {
|
||||
interfaceCtx->cDownAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cRightAlpha != 255) {
|
||||
interfaceCtx->cRightAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_ALL_NO_MINIMAP:
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cLeftAlpha != 255) {
|
||||
interfaceCtx->cLeftAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cDownAlpha != 255) {
|
||||
interfaceCtx->cDownAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cRightAlpha != 255) {
|
||||
interfaceCtx->cRightAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_B_C:
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cLeftAlpha != 255) {
|
||||
interfaceCtx->cLeftAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cDownAlpha != 255) {
|
||||
interfaceCtx->cDownAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->cRightAlpha != 255) {
|
||||
interfaceCtx->cRightAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_B_MINIMAP:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC_MINIMAP:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_B_MAGIC:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_B:
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case HUD_VISIBILITY_A_B_HEARTS_MAGIC_MINIMAP:
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ((play->roomCtx.curRoom.unk3 == 1) && (interfaceCtx->minimapAlpha >= 255)) {
|
||||
interfaceCtx->minimapAlpha = 255;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80110038.s")
|
||||
|
||||
|
||||
+2
-2
@@ -377,7 +377,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams)
|
||||
|
||||
if (this->sceneNum != SCENE_KAKUSIANA) { // Grottos
|
||||
Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entrance),
|
||||
this->roomCtx.currRoom.num, playerParams, &player->actor.world.pos,
|
||||
this->roomCtx.curRoom.num, playerParams, &player->actor.world.pos,
|
||||
player->actor.shape.rot.y);
|
||||
}
|
||||
}
|
||||
@@ -427,7 +427,7 @@ void func_80169FDC(GameState* thisx) {
|
||||
s32 func_80169FFC(GameState* thisx) {
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
|
||||
return this->roomCtx.currRoom.mesh->type0.type != 1;
|
||||
return this->roomCtx.curRoom.mesh->type0.type != 1;
|
||||
}
|
||||
|
||||
s32 FrameAdvance_IsEnabled(GameState* thisx) {
|
||||
|
||||
+11
-8
@@ -389,7 +389,7 @@ void func_80123140(PlayState* play, Player* player) {
|
||||
IREG(69) = bootRegs[16];
|
||||
MREG(95) = bootRegs[17];
|
||||
|
||||
if (play->roomCtx.currRoom.unk3 == 2) {
|
||||
if (play->roomCtx.curRoom.unk3 == 2) {
|
||||
R_RUN_SPEED_LIMIT = 500;
|
||||
}
|
||||
|
||||
@@ -508,20 +508,23 @@ s32 func_8012364C(PlayState* play, Player* player, s32 arg2) {
|
||||
if (arg2 == 1) {
|
||||
return (gSaveContext.buttonStatus[1] != BTN_DISABLED)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
if (arg2 == 2) {
|
||||
return (gSaveContext.buttonStatus[2] != BTN_DISABLED)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
return (gSaveContext.buttonStatus[3] != BTN_DISABLED) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123810.s")
|
||||
@@ -865,7 +868,7 @@ s32 func_801242DC(PlayState* play) {
|
||||
TextTriggerEntry* triggerEntry;
|
||||
s32 envIndex;
|
||||
|
||||
if (play->roomCtx.currRoom.unk2 == 3) { // Room is hot
|
||||
if (play->roomCtx.curRoom.unk2 == 3) { // Room is hot
|
||||
envIndex = 0;
|
||||
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->unk_AD8 > 80)) {
|
||||
envIndex = 3;
|
||||
|
||||
+11
-11
@@ -64,8 +64,8 @@ void Room_DrawType1Mesh(PlayState* play, Room* room, u32 flags) {
|
||||
|
||||
void Room_Init(PlayState* play, RoomContext* roomCtx) {
|
||||
s32 i;
|
||||
roomCtx->currRoom.num = -1;
|
||||
roomCtx->currRoom.segment = NULL;
|
||||
roomCtx->curRoom.num = -1;
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->unk78 = 1;
|
||||
roomCtx->unk79 = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
@@ -79,9 +79,9 @@ s32 Room_StartRoomTransition(PlayState* play, RoomContext* roomCtx, s32 index) {
|
||||
if (roomCtx->unk31 == 0) {
|
||||
s32 size;
|
||||
|
||||
roomCtx->prevRoom = roomCtx->currRoom;
|
||||
roomCtx->currRoom.num = index;
|
||||
roomCtx->currRoom.segment = NULL;
|
||||
roomCtx->prevRoom = roomCtx->curRoom;
|
||||
roomCtx->curRoom.num = index;
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->unk31 = 1;
|
||||
|
||||
size = play->roomList[index].vromEnd - play->roomList[index].vromStart;
|
||||
@@ -103,15 +103,15 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) {
|
||||
if (roomCtx->unk31 == 1) {
|
||||
if (!osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK)) {
|
||||
roomCtx->unk31 = 0;
|
||||
roomCtx->currRoom.segment = roomCtx->activeRoomVram;
|
||||
roomCtx->curRoom.segment = roomCtx->activeRoomVram;
|
||||
// TODO: Segment number enum
|
||||
gSegments[0x03] = PHYSICAL_TO_VIRTUAL(roomCtx->activeRoomVram);
|
||||
|
||||
Scene_ProcessHeader(play, (SceneCmd*)roomCtx->currRoom.segment);
|
||||
Scene_ProcessHeader(play, (SceneCmd*)roomCtx->curRoom.segment);
|
||||
func_80123140(play, GET_PLAYER(play));
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
|
||||
if (((play->sceneNum != SCENE_IKANA) || (roomCtx->currRoom.num != 1)) &&
|
||||
if (((play->sceneNum != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) &&
|
||||
(play->sceneNum != SCENE_IKNINSIDE)) {
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
play->envCtx.unk_E0 = 0;
|
||||
@@ -142,9 +142,9 @@ void func_8012EBF8(PlayState* play, RoomContext* roomCtx) {
|
||||
roomCtx->prevRoom.segment = NULL;
|
||||
func_800BA798(play, &play->actorCtx);
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
if (roomCtx->currRoom.num > -1) {
|
||||
Map_InitRoomData(play, roomCtx->currRoom.num);
|
||||
if (roomCtx->curRoom.num > -1) {
|
||||
Map_InitRoomData(play, roomCtx->curRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
}
|
||||
func_801A3CD8(play->roomCtx.currRoom.echo);
|
||||
func_801A3CD8(play->roomCtx.curRoom.echo);
|
||||
}
|
||||
|
||||
+6
-6
@@ -234,17 +234,17 @@ void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x08: Room Behavior
|
||||
void Scene_HeaderCmdRoomBehavior(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.unk3 = cmd->roomBehavior.gpFlag1;
|
||||
play->roomCtx.currRoom.unk2 = cmd->roomBehavior.gpFlag2 & 0xFF;
|
||||
play->roomCtx.currRoom.unk5 = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->roomCtx.curRoom.unk3 = cmd->roomBehavior.gpFlag1;
|
||||
play->roomCtx.curRoom.unk2 = cmd->roomBehavior.gpFlag2 & 0xFF;
|
||||
play->roomCtx.curRoom.unk5 = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
|
||||
play->roomCtx.currRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->envCtx.unk_E2 = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0A: Mesh Header
|
||||
void Scene_HeaderCmdMesh(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.mesh = Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
play->roomCtx.curRoom.mesh = Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0B: Object List
|
||||
@@ -446,7 +446,7 @@ void Scene_HeaderCmdSoundSettings(PlayState* play, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x16: Echo Setting
|
||||
void Scene_HeaderCmdEchoSetting(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.echo = cmd->echoSettings.echo;
|
||||
play->roomCtx.curRoom.echo = cmd->echoSettings.echo;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x18: Alternate Header List=
|
||||
|
||||
Reference in New Issue
Block a user