From c9a3dcdb448a3c5e8a91398295a899b3336663d8 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Mon, 14 Nov 2022 23:01:06 -0500 Subject: [PATCH] update lus (#1965) * update lus * rename things to fix build Co-authored-by: briaguya --- libultraship | 2 +- soh/soh/Enhancements/randomizer/draw.cpp | 30 +++++++++---------- soh/src/code/z_draw.c | 6 ++-- soh/src/code/z_play.c | 6 ++-- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 6 ++-- .../actors/ovl_End_Title/z_end_title.c | 7 +++-- .../ovl_kaleido_scope/z_kaleido_equipment.c | 24 +++++++-------- .../misc/ovl_kaleido_scope/z_kaleido_item.c | 6 ++-- 8 files changed, 44 insertions(+), 43 deletions(-) diff --git a/libultraship b/libultraship index 8a97bf444..cbbc55af1 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 8a97bf4444c647491452b8548f7b51acb123c7b4 +Subproject commit cbbc55af19cf1f78c7273a7a5c601d2fdbdd729f diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index da56620c9..33e14b5ef 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -31,12 +31,12 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); - gsDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); - gsSPGrayscale(POLY_OPA_DISP++, true); + gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); + gSPGrayscale(POLY_OPA_DISP++, true); gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiSmallKeyDL); - gsSPGrayscale(POLY_OPA_DISP++, false); + gSPGrayscale(POLY_OPA_DISP++, false); CLOSE_DISPS(play->state.gfxCtx); } @@ -62,14 +62,14 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt G_MTX_MODELVIEW | G_MTX_LOAD); if (color_slot == 5) { // Ganon's Boss Key - gsDPSetGrayscaleColor(POLY_OPA_DISP++, 80, 80, 80, 255); - gsSPGrayscale(POLY_OPA_DISP++, true); + gDPSetGrayscaleColor(POLY_OPA_DISP++, 80, 80, 80, 255); + gSPGrayscale(POLY_OPA_DISP++, true); } gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiBossKeyDL); if (color_slot == 5) { // Ganon's Boss Key - gsSPGrayscale(POLY_OPA_DISP++, false); + gSPGrayscale(POLY_OPA_DISP++, false); } func_80093D84(play->state.gfxCtx); @@ -77,13 +77,13 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); - gsDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], + gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); - gsSPGrayscale(POLY_XLU_DISP++, true); + gSPGrayscale(POLY_XLU_DISP++, true); gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gGiBossKeyGemDL); - gsSPGrayscale(POLY_XLU_DISP++, false); + gSPGrayscale(POLY_XLU_DISP++, false); CLOSE_DISPS(play->state.gfxCtx); } @@ -108,8 +108,8 @@ extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEnt func_80093D18(play->state.gfxCtx); - gsDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); - gsSPGrayscale(POLY_OPA_DISP++, true); + gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); + gSPGrayscale(POLY_OPA_DISP++, true); Matrix_Scale(0.5f, 0.5f, 0.5f, MTXMODE_APPLY); Matrix_RotateZ(0.8f, MTXMODE_APPLY); @@ -131,7 +131,7 @@ extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEnt gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiSmallKeyDL); } - gsSPGrayscale(POLY_OPA_DISP++, false); + gSPGrayscale(POLY_OPA_DISP++, false); CLOSE_DISPS(play->state.gfxCtx); } @@ -144,12 +144,12 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); - gsDPSetGrayscaleColor(POLY_XLU_DISP++, 255, 255, 255, 255); - gsSPGrayscale(POLY_XLU_DISP++, true); + gDPSetGrayscaleColor(POLY_XLU_DISP++, 255, 255, 255, 255); + gSPGrayscale(POLY_XLU_DISP++, true); gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gGiHeartBorderDL); - gsSPGrayscale(POLY_XLU_DISP++, false); + gSPGrayscale(POLY_XLU_DISP++, false); gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gGiHeartContainerDL); diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c index 041c5a0eb..bae750100 100644 --- a/soh/src/code/z_draw.c +++ b/soh/src/code/z_draw.c @@ -828,11 +828,11 @@ void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); - gsDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); - gsSPGrayscale(POLY_XLU_DISP++, true); + gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); + gSPGrayscale(POLY_XLU_DISP++, true); func_80093D18(play->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); - gsSPGrayscale(POLY_XLU_DISP++, false); + gSPGrayscale(POLY_XLU_DISP++, false); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index bf68dfe59..0203c7ca2 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1380,7 +1380,7 @@ void Play_Draw(PlayState* play) { gfxP = Graph_GfxPlusOne(sp1CC); gSPDisplayList(OVERLAY_DISP++, gfxP); - gsSPGrayscale(gfxP++, false); + gSPGrayscale(gfxP++, false); if ((play->transitionMode == 3) || (play->transitionMode == 11) || (play->transitionCtx.transitionType >= 56)) { @@ -1398,8 +1398,8 @@ void Play_Draw(PlayState* play) { TransitionFade_Draw(&play->transitionFade, &gfxP); if (D_801614B0.a > 0) { - gsDPSetGrayscaleColor(gfxP++, D_801614B0.r, D_801614B0.g, D_801614B0.b, D_801614B0.a); - gsSPGrayscale(gfxP++, true); + gDPSetGrayscaleColor(gfxP++, D_801614B0.r, D_801614B0.g, D_801614B0.b, D_801614B0.a); + gSPGrayscale(gfxP++, true); } gSPEndDisplayList(gfxP++); diff --git a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 548b3412e..a29752393 100644 --- a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -503,15 +503,15 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) { if (this->type == ENGSWITCH_TARGET_RUPEE) { GetItem_Draw(play, sRupeeTexturesNew[this->colorIdx]); } else { - gsDPSetGrayscaleColor(POLY_OPA_DISP++, 255, 255, 255, 255); - gsSPGrayscale(POLY_OPA_DISP++, true); + gDPSetGrayscaleColor(POLY_OPA_DISP++, 255, 255, 255, 255); + gSPGrayscale(POLY_OPA_DISP++, true); func_80093D18(play->state.gfxCtx); gSPDisplayList(POLY_OPA_DISP++, gGiRupeeInnerDL); gSPDisplayList(POLY_OPA_DISP++, gGiGoldRupeeInnerColorDL); func_80093D84(play->state.gfxCtx); gSPDisplayList(POLY_OPA_DISP++, gGiRupeeOuterDL); gSPDisplayList(POLY_OPA_DISP++, gGiGoldRupeeOuterColorDL); - gsSPGrayscale(POLY_OPA_DISP++, false); + gSPGrayscale(POLY_OPA_DISP++, false); } } else { gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[this->colorIdx])); diff --git a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c index 8be68b6bf..84ceccd49 100644 --- a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -85,7 +85,7 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) { OVERLAY_DISP = func_80093F34(OVERLAY_DISP); if (D_801614B0.a > 0) - gsSPGrayscale(OVERLAY_DISP++, false); + gSPGrayscale(OVERLAY_DISP++, false); gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE); gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0); gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2); @@ -110,8 +110,9 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) { G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0); gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - if (D_801614B0.a > 0) - gsSPGrayscale(OVERLAY_DISP++, true); + if (D_801614B0.a > 0) { + gSPGrayscale(OVERLAY_DISP++, true); + } CLOSE_DISPS(play->state.gfxCtx); } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 0a74e87c3..15765d80e 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -671,29 +671,29 @@ void KaleidoScope_DrawEquipment(PlayState* play) { if (drawGreyItems && ((sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1) == ITEM_GAUNTLETS_SILVER || (sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1) == ITEM_GAUNTLETS_GOLD)) { // Grey Out the Gauntlets - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); - gsSPGrayscale(POLY_KAL_DISP++, true); + gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); + gSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[sChildUpgradeItemBases[i] + point - 1], 32, 32, 0); - gsSPGrayscale(POLY_KAL_DISP++, false); + gSPGrayscale(POLY_KAL_DISP++, false); } } else { if ((i == 0) && (CUR_UPG_VALUE(sAdultUpgrades[i]) == 0)) { // If the player doesn't have the bow, load the current slingshot ammo upgrade instead. if (drawGreyItems) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); // Grey Out Slingshot Bullet Bags - gsSPGrayscale(POLY_KAL_DISP++, true); + gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); // Grey Out Slingshot Bullet Bags + gSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1], 32, 32, 0); - gsSPGrayscale(POLY_KAL_DISP++, false); + gSPGrayscale(POLY_KAL_DISP++, false); } else if (CUR_UPG_VALUE(sAdultUpgrades[i]) != 0) { if (drawGreyItems && ((sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1) == ITEM_BRACELET && !(gSaveContext.n64ddFlag))) { // Grey Out the Goron Bracelet when Not Randomized - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); - gsSPGrayscale(POLY_KAL_DISP++, true); + gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); + gSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1], 32, 32, 0); - gsSPGrayscale(POLY_KAL_DISP++, false); + gSPGrayscale(POLY_KAL_DISP++, false); } } // Draw inventory screen icons @@ -702,8 +702,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) { int itemId = ITEM_SWORD_KOKIRI + temp; bool age_restricted = !CHECK_ITEM_AGE(itemId); if (age_restricted) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); - gsSPGrayscale(POLY_KAL_DISP++, true); + gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); + gSPGrayscale(POLY_KAL_DISP++, true); } if (((u32)i == 0) && (k == 2) && (gSaveContext.bgsFlag != 0)) { KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gBiggoronSwordIconTex, 32, 32, point); @@ -712,7 +712,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) { } else if (gBitFlags[bit] & gSaveContext.inventory.equipment) { KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[itemId], 32, 32, point); } - gsSPGrayscale(POLY_KAL_DISP++, false); + gSPGrayscale(POLY_KAL_DISP++, false); } } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 80c816877..a237fc11b 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -516,12 +516,12 @@ void KaleidoScope_DrawItemSelect(PlayState* play) { int itemId = gSaveContext.inventory.items[i]; bool not_acquired = !CHECK_ITEM_AGE(itemId); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); - gsSPGrayscale(POLY_KAL_DISP++, true); + gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); + gSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[itemId], 32, 32, 0); - gsSPGrayscale(POLY_KAL_DISP++, false); + gSPGrayscale(POLY_KAL_DISP++, false); } }