summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2024-02-01 21:01:18 -0500
committerGitHub <noreply@github.com>2024-02-01 20:01:18 -0600
commit4bdb5098b0827b341e2ef2ad18b781bb1eae3f87 (patch)
tree1ac4c0079287901eb955ce7ba6b6ec117aa5b23c
parent695ab6c6ee2d7df46096679ab440f8cc0817f045 (diff)
Colors 1 (#3463)
-rw-r--r--soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp40
-rw-r--r--soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c215
2 files changed, 192 insertions, 63 deletions
diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
index 50b5c5b27..629f4b0cd 100644
--- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
+++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
@@ -67,6 +67,7 @@ typedef enum {
GROUP_EQUIPMENT,
GROUP_CONSUMABLE,
GROUP_HUD,
+ GROUP_KALEIDO,
GROUP_TITLE,
GROUP_NPC,
GROUP_WORLD,
@@ -85,6 +86,7 @@ std::map<CosmeticGroup, const char*> groupLabels = {
{ GROUP_EQUIPMENT, "Equipment" },
{ GROUP_CONSUMABLE, "Consumables" },
{ GROUP_HUD, "HUD" },
+ { GROUP_KALEIDO, "Pause Menu" },
{ GROUP_TITLE, "Title Screen" },
{ GROUP_NPC, "NPCs" },
{ GROUP_WORLD, "World" },
@@ -265,6 +267,38 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
COSMETIC_OPTION("Hud_NameTagActorText", "Nametag Text", GROUP_HUD, ImVec4(255, 255, 255, 255), true, true, false),
COSMETIC_OPTION("Hud_NameTagActorBackground", "Nametag Background", GROUP_HUD, ImVec4(0, 0, 0, 80), true, false, true),
+ COSMETIC_OPTION("Kal_ItemSelA", "Item Select Color A", GROUP_KALEIDO, ImVec4(10, 50, 80, 255), false, true, false),
+ COSMETIC_OPTION("Kal_ItemSelB", "Item Select Color B", GROUP_KALEIDO, ImVec4(70, 100, 130, 255), false, true, false),
+ COSMETIC_OPTION("Kal_ItemSelC", "Item Select Color C", GROUP_KALEIDO, ImVec4(70, 100, 130, 255), false, true, false),
+ COSMETIC_OPTION("Kal_ItemSelD", "Item Select Color D", GROUP_KALEIDO, ImVec4(10, 50, 80, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_EquipSelA", "Equip Select Color A", GROUP_KALEIDO, ImVec4(10, 50, 40, 255), false, true, false),
+ COSMETIC_OPTION("Kal_EquipSelB", "Equip Select Color B", GROUP_KALEIDO, ImVec4(90, 100, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_EquipSelC", "Equip Select Color C", GROUP_KALEIDO, ImVec4(90, 100, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_EquipSelD", "Equip Select Color D", GROUP_KALEIDO, ImVec4(10, 50, 80, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_MapSelDunA", "Map Dungeon Color A", GROUP_KALEIDO, ImVec4(80, 40, 30, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelDunB", "Map Dungeon Color B", GROUP_KALEIDO, ImVec4(140, 60, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelDunC", "Map Dungeon Color C", GROUP_KALEIDO, ImVec4(140, 60, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelDunD", "Map Dungeon Color D", GROUP_KALEIDO, ImVec4(80, 40, 30, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_QuestStatusA", "Quest StatusColor A", GROUP_KALEIDO, ImVec4(80, 80, 50, 255), false, true, false),
+ COSMETIC_OPTION("Kal_QuestStatusB", "Quest StatusColor B", GROUP_KALEIDO, ImVec4(120, 120, 70, 255), false, true, false),
+ COSMETIC_OPTION("Kal_QuestStatusC", "Quest StatusColor C", GROUP_KALEIDO, ImVec4(120, 120, 70, 255), false, true, false),
+ COSMETIC_OPTION("Kal_QuestStatusD", "Quest StatusColor D", GROUP_KALEIDO, ImVec4(80, 80, 50, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_MapSelectA", "Map Color A", GROUP_KALEIDO, ImVec4(80, 40, 30, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelectB", "Map Color B", GROUP_KALEIDO, ImVec4(140, 60, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelectC", "Map Color C", GROUP_KALEIDO, ImVec4(140, 60, 60, 255), false, true, false),
+ COSMETIC_OPTION("Kal_MapSelectD", "Map Color D", GROUP_KALEIDO, ImVec4(80, 40, 30, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_SaveA", "Save A", GROUP_KALEIDO, ImVec4(50, 50, 50, 255), false, true, false),
+ COSMETIC_OPTION("Kal_SaveB", "Save B", GROUP_KALEIDO, ImVec4(110, 110, 110, 255), false, true, false),
+ COSMETIC_OPTION("Kal_SaveC", "Save C", GROUP_KALEIDO, ImVec4(110, 110, 110, 255), false, true, false),
+ COSMETIC_OPTION("Kal_SaveD", "Save D", GROUP_KALEIDO, ImVec4(50, 50, 50, 255), false, true, false),
+
+ COSMETIC_OPTION("Kal_NamePanel", "Name Panel", GROUP_KALEIDO, ImVec4(90,100,130,255), true, true, false),
+
COSMETIC_OPTION("Title_FileChoose", "File Choose", GROUP_TITLE, ImVec4(100, 150, 255, 255), false, true, false),
COSMETIC_OPTION("Title_NintendoLogo", "Nintendo Logo", GROUP_TITLE, ImVec4( 0, 0, 255, 255), false, true, true),
COSMETIC_OPTION("Title_N64LogoRed", "N64 Red", GROUP_TITLE, ImVec4(150, 0, 0, 255), false, true, true),
@@ -1873,10 +1907,16 @@ void CosmeticsEditorWindow::DrawElement() {
DrawCosmeticGroup(GROUP_TITLE);
ImGui::EndTabItem();
}
+
if (ImGui::BeginTabItem("HUD Placement")) {
Draw_Placements();
ImGui::EndTabItem();
}
+
+ if (ImGui::BeginTabItem("Pause Menu")) {
+ DrawCosmeticGroup(GROUP_KALEIDO);
+ ImGui::EndTabItem();
+ }
ImGui::EndTabBar();
}
ImGui::End();
diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
index 2da5d5b25..5f8da1b70 100644
--- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
+++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
@@ -1883,11 +1883,17 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gSPMatrix(POLY_KAL_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 90, 100, 130, 255);
+ const Color_RGBA8 namePanelColor = CVarGetColor("gCosmetics.Kal_NamePanel.Value", (Color_RGBA8){90,100,130,255});
+
+ gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, namePanelColor.r, namePanelColor.g, namePanelColor.b, namePanelColor.a);
gSPVertex(POLY_KAL_DISP++, &pauseCtx->infoPanelVtx[0], 16, 0);
gSPDisplayList(POLY_KAL_DISP++, gItemNamePanelDL);
+ if (CVarGetInteger("gUniformLR", 0) == 0) { // Restore the misplace gDPSetPrimColor
+ gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 90, 100, 130, 255);
+ }
+
if ((pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) && (pauseCtx->unk_1E4 == 0)) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6);
} else {
@@ -1895,6 +1901,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255);
}
}
+
gSPDisplayList(POLY_KAL_DISP++, gLButtonIconDL);
@@ -2305,15 +2312,15 @@ void KaleidoScope_SetView(PauseContext* pauseCtx, f32 x, f32 y, f32 z) {
func_800AAA50(&pauseCtx->view, 127);
}
-static u8 D_8082AE48[][4] = {
+static u8 sPageVtxColorR[][4] = {
{ 10, 70, 70, 10 }, { 10, 90, 90, 10 }, { 80, 140, 140, 80 },
{ 80, 120, 120, 80 }, { 80, 140, 140, 80 }, { 50, 110, 110, 50 },
};
-static u8 D_8082AE60[][4] = {
+static u8 sPageVtxColorG[][4] = {
{ 50, 100, 100, 50 }, { 50, 100, 100, 50 }, { 40, 60, 60, 40 },
{ 80, 120, 120, 80 }, { 40, 60, 60, 40 }, { 50, 110, 110, 50 },
};
-static u8 D_8082AE78[][4] = {
+static u8 sPageVtxColorB[][4] = {
{ 80, 130, 130, 80 }, { 40, 60, 60, 40 }, { 30, 60, 60, 30 },
{ 50, 70, 70, 50 }, { 30, 60, 60, 30 }, { 50, 110, 110, 50 },
};
@@ -2441,10 +2448,87 @@ static s16 D_8082B0E4[] = {
0x0019, 0x000D, 0x0001, 0x0001, 0x000D, 0x0015, 0x000F, 0x000D, 0x000C, 0x0001, 0x0000,
};
-s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
+static const char* gPageVtxColorCvars[][4] = {
+ {
+ "gCosmetics.Kal_ItemSelA.Value",
+ "gCosmetics.Kal_ItemSelB.Value",
+ "gCosmetics.Kal_ItemSelC.Value",
+ "gCosmetics.Kal_ItemSelD.Value",
+ },
+ {
+ "gCosmetics.Kal_EquipSelA.Value",
+ "gCosmetics.Kal_EquipSelB.Value",
+ "gCosmetics.Kal_EquipSelC.Value",
+ "gCosmetics.Kal_EquipSelD.Value",
+ },
+ {
+ "gCosmetics.Kal_MapSelDunA.Value",
+ "gCosmetics.Kal_MapSelDunB.Value",
+ "gCosmetics.Kal_MapSelDunC.Value",
+ "gCosmetics.Kal_MapSelDunD.Value",
+ },
+ {
+ "gCosmetics.Kal_QuestStatusA.Value",
+ "gCosmetics.Kal_QuestStatusB.Value",
+ "gCosmetics.Kal_QuestStatusC.Value",
+ "gCosmetics.Kal_QuestStatusD.Value",
+ },
+ {
+ "gCosmetics.Kal_MapSelectA.Value",
+ "gCosmetics.Kal_MapSelectB.Value",
+ "gCosmetics.Kal_MapSelectC.Value",
+ "gCosmetics.Kal_MapSelectD.Value",
+ },
+ {
+ "gCosmetics.Kal_SaveA.Value",
+ "gCosmetics.Kal_SaveB.Value",
+ "gCosmetics.Kal_SaveC.Value",
+ "gCosmetics.Kal_SaveD.Value",
+ },
+};
+
+s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 pageIndex, s16 arg3) {
static s16 D_8082B110 = 0;
static s16 D_8082B114 = 1;
static s16 D_8082B118 = 0;
+ static const Color_RGBA8 pageColors[][4] = {
+ {
+ { 10, 50, 80, 255 },
+ { 70, 100, 130, 255 },
+ { 70, 100, 130, 255 },
+ { 10, 50, 80, 255 },
+ },
+ {
+ { 10, 50, 40, 255 },
+ { 90, 100, 60, 255 },
+ { 90, 100, 60, 255 },
+ { 10, 50, 40, 255 },
+ },
+ {
+ { 80,40,30, 255},
+ { 140,60,60,255 },
+ { 140,60,60,255 },
+ { 80, 40, 30, 255 },
+ },
+ {
+ { 80,80,50,255 },
+ { 120,120,70,255 },
+ { 120,120,70,255 },
+ { 80, 80, 50, 255 },
+ },
+ {
+ { 80, 40, 30, 255 },
+ { 140,60,60,255 },
+ { 140,60,60,255 },
+ { 80, 40, 30, 255 },
+ },
+ {
+ { 50,50,50,255 },
+ { 110,110,110,255 },
+ { 110,110,110,255 },
+ { 50,50,50,255 },
+ },
+ };
PauseContext* pauseCtx = &play->pauseCtx;
s16* ptr1;
s16* ptr2;
@@ -2454,109 +2538,114 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
s16 phi_t0;
s16 phi_a1;
s16 phi_a2;
- s16 phi_t3;
- s16 phi_t1;
+ s16 colorIndex; // Also used for other things.
+ s16 vtxIndex;
phi_t0 = -200;
- for (phi_t1 = 0, phi_t3 = 0; phi_t3 < 3; phi_t3++) {
+ for (vtxIndex = 0, colorIndex = 0; colorIndex < 3; colorIndex++) {
phi_t0 += 80;
- for (phi_a1 = 80, phi_a2 = 0; phi_a2 < 5; phi_a2++, phi_t1 += 4, phi_a1 -= 32) {
- vtx[phi_t1 + 0].v.ob[0] = vtx[phi_t1 + 2].v.ob[0] = phi_t0;
+ for (phi_a1 = 80, phi_a2 = 0; phi_a2 < 5; phi_a2++, vtxIndex += 4, phi_a1 -= 32) {
+ vtx[vtxIndex + 0].v.ob[0] = vtx[vtxIndex + 2].v.ob[0] = phi_t0;
- vtx[phi_t1 + 1].v.ob[0] = vtx[phi_t1 + 3].v.ob[0] = vtx[phi_t1 + 0].v.ob[0] + 80;
+ vtx[vtxIndex + 1].v.ob[0] = vtx[vtxIndex + 3].v.ob[0] = vtx[vtxIndex + 0].v.ob[0] + 80;
- vtx[phi_t1 + 0].v.ob[1] = vtx[phi_t1 + 1].v.ob[1] = phi_a1 + pauseCtx->offsetY;
+ vtx[vtxIndex + 0].v.ob[1] = vtx[vtxIndex + 1].v.ob[1] = phi_a1 + pauseCtx->offsetY;
- vtx[phi_t1 + 2].v.ob[1] = vtx[phi_t1 + 3].v.ob[1] = vtx[phi_t1 + 0].v.ob[1] - 32;
+ vtx[vtxIndex + 2].v.ob[1] = vtx[vtxIndex + 3].v.ob[1] = vtx[vtxIndex + 0].v.ob[1] - 32;
- vtx[phi_t1 + 0].v.ob[2] = vtx[phi_t1 + 1].v.ob[2] = vtx[phi_t1 + 2].v.ob[2] = vtx[phi_t1 + 3].v.ob[2] = 0;
+ vtx[vtxIndex + 0].v.ob[2] = vtx[vtxIndex + 1].v.ob[2] = vtx[vtxIndex + 2].v.ob[2] = vtx[vtxIndex + 3].v.ob[2] = 0;
- vtx[phi_t1 + 0].v.flag = 0;
- vtx[phi_t1 + 1].v.flag = 0;
- vtx[phi_t1 + 2].v.flag = 0;
- vtx[phi_t1 + 3].v.flag = 0;
+ vtx[vtxIndex + 0].v.flag = 0;
+ vtx[vtxIndex + 1].v.flag = 0;
+ vtx[vtxIndex + 2].v.flag = 0;
+ vtx[vtxIndex + 3].v.flag = 0;
- vtx[phi_t1 + 0].v.tc[0] = vtx[phi_t1 + 0].v.tc[1] = vtx[phi_t1 + 1].v.tc[1] = vtx[phi_t1 + 2].v.tc[0] = 0;
+ vtx[vtxIndex + 0].v.tc[0] = vtx[vtxIndex + 0].v.tc[1] = vtx[vtxIndex + 1].v.tc[1] = vtx[vtxIndex + 2].v.tc[0] = 0;
- vtx[phi_t1 + 1].v.tc[0] = vtx[phi_t1 + 3].v.tc[0] = 0xA00;
+ vtx[vtxIndex + 1].v.tc[0] = vtx[vtxIndex + 3].v.tc[0] = 0xA00;
- vtx[phi_t1 + 2].v.tc[1] = vtx[phi_t1 + 3].v.tc[1] = 0x400;
+ vtx[vtxIndex + 2].v.tc[1] = vtx[vtxIndex + 3].v.tc[1] = 0x400;
- vtx[phi_t1 + 0].v.cn[0] = vtx[phi_t1 + 2].v.cn[0] = D_8082AE48[arg2][phi_t3 + 0];
+ //Color in the pages. Pages are drawn in groups. Each group is faded to the next. There are 4 total colors, 1/4 and 2/3 are the same creating a mirrored color set.
+ // TODO, go from 0,1,2,3 to 0,1,1,0 to only use two colors instead of 4.
+ Color_RGBA8 color = CVarGetColor(gPageVtxColorCvars[pageIndex][colorIndex], pageColors[pageIndex][colorIndex]);
+ Color_RGBA8 colorb =
+ CVarGetColor(gPageVtxColorCvars[pageIndex][colorIndex + 1], pageColors[pageIndex][colorIndex+1]);
+ vtx[vtxIndex + 0].v.cn[0] = vtx[vtxIndex + 2].v.cn[0] = color.r; // sPageVtxColorR[pageIndex][colorIndex + 0];
- vtx[phi_t1 + 0].v.cn[1] = vtx[phi_t1 + 2].v.cn[1] = D_8082AE60[arg2][phi_t3 + 0];
+ vtx[vtxIndex + 0].v.cn[1] = vtx[vtxIndex + 2].v.cn[1] = color.g;// sPageVtxColorG[pageIndex][colorIndex + 0];
- vtx[phi_t1 + 0].v.cn[2] = vtx[phi_t1 + 2].v.cn[2] = D_8082AE78[arg2][phi_t3 + 0];
+ vtx[vtxIndex + 0].v.cn[2] = vtx[vtxIndex + 2].v.cn[2] = color.b; // sPageVtxColorB[pageIndex][colorIndex + 0];
- vtx[phi_t1 + 1].v.cn[0] = vtx[phi_t1 + 3].v.cn[0] = D_8082AE48[arg2][phi_t3 + 1];
+ vtx[vtxIndex + 1].v.cn[0] = vtx[vtxIndex + 3].v.cn[0] = colorb.r;//sPageVtxColorR[pageIndex][colorIndex + 1];
- vtx[phi_t1 + 1].v.cn[1] = vtx[phi_t1 + 3].v.cn[1] = D_8082AE60[arg2][phi_t3 + 1];
+ vtx[vtxIndex + 1].v.cn[1] = vtx[vtxIndex + 3].v.cn[1] = colorb.g; // sPageVtxColorG[pageIndex][colorIndex + 1];
- vtx[phi_t1 + 1].v.cn[2] = vtx[phi_t1 + 3].v.cn[2] = D_8082AE78[arg2][phi_t3 + 1];
+ vtx[vtxIndex + 1].v.cn[2] = vtx[vtxIndex + 3].v.cn[2] = colorb.b; // sPageVtxColorB[pageIndex][colorIndex + 1];
- vtx[phi_t1 + 0].v.cn[3] = vtx[phi_t1 + 2].v.cn[3] = vtx[phi_t1 + 1].v.cn[3] = vtx[phi_t1 + 3].v.cn[3] =
+ vtx[vtxIndex + 0].v.cn[3] = vtx[vtxIndex + 2].v.cn[3] = vtx[vtxIndex + 1].v.cn[3] = vtx[vtxIndex + 3].v.cn[3] =
pauseCtx->alpha;
}
}
- phi_s2 = phi_t1;
+ phi_s2 = vtxIndex;
if (arg3 != 0) {
- ptr1 = D_8082B000[arg2];
- ptr2 = D_8082B018[arg2];
- ptr3 = D_8082B030[arg2];
- ptr4 = D_8082B048[arg2];
+ ptr1 = D_8082B000[pageIndex];
+ ptr2 = D_8082B018[pageIndex];
+ ptr3 = D_8082B030[pageIndex];
+ ptr4 = D_8082B048[pageIndex];
- for (phi_t3 = 0; phi_t3 < arg3; phi_t3++, phi_t1 += 4) {
- vtx[phi_t1 + 2].v.ob[0] = vtx[phi_t1 + 0].v.ob[0] = ptr1[phi_t3];
+ for (colorIndex = 0; colorIndex < arg3; colorIndex++, vtxIndex += 4) {
+ vtx[vtxIndex + 2].v.ob[0] = vtx[vtxIndex + 0].v.ob[0] = ptr1[colorIndex];
- vtx[phi_t1 + 1].v.ob[0] = vtx[phi_t1 + 3].v.ob[0] = vtx[phi_t1 + 0].v.ob[0] + ptr2[phi_t3];
+ vtx[vtxIndex + 1].v.ob[0] = vtx[vtxIndex + 3].v.ob[0] = vtx[vtxIndex + 0].v.ob[0] + ptr2[colorIndex];
if (!((pauseCtx->state >= 8) && (pauseCtx->state <= 0x11))) {
- vtx[phi_t1 + 0].v.ob[1] = vtx[phi_t1 + 1].v.ob[1] = ptr3[phi_t3] + pauseCtx->offsetY;
+ vtx[vtxIndex + 0].v.ob[1] = vtx[vtxIndex + 1].v.ob[1] = ptr3[colorIndex] + pauseCtx->offsetY;
} else {
- vtx[phi_t1 + 0].v.ob[1] = vtx[phi_t1 + 1].v.ob[1] = YREG(60 + phi_t3) + pauseCtx->offsetY;
+ vtx[vtxIndex + 0].v.ob[1] = vtx[vtxIndex + 1].v.ob[1] = YREG(60 + colorIndex) + pauseCtx->offsetY;
}
- vtx[phi_t1 + 2].v.ob[1] = vtx[phi_t1 + 3].v.ob[1] = vtx[phi_t1 + 0].v.ob[1] - ptr4[phi_t3];
+ vtx[vtxIndex + 2].v.ob[1] = vtx[vtxIndex + 3].v.ob[1] = vtx[vtxIndex + 0].v.ob[1] - ptr4[colorIndex];
- vtx[phi_t1 + 0].v.ob[2] = vtx[phi_t1 + 1].v.ob[2] = vtx[phi_t1 + 2].v.ob[2] = vtx[phi_t1 + 3].v.ob[2] = 0;
+ vtx[vtxIndex + 0].v.ob[2] = vtx[vtxIndex + 1].v.ob[2] = vtx[vtxIndex + 2].v.ob[2] = vtx[vtxIndex + 3].v.ob[2] = 0;
- vtx[phi_t1 + 0].v.flag = vtx[phi_t1 + 1].v.flag = vtx[phi_t1 + 2].v.flag = vtx[phi_t1 + 3].v.flag = 0;
+ vtx[vtxIndex + 0].v.flag = vtx[vtxIndex + 1].v.flag = vtx[vtxIndex + 2].v.flag = vtx[vtxIndex + 3].v.flag = 0;
- vtx[phi_t1 + 0].v.tc[0] = vtx[phi_t1 + 0].v.tc[1] = vtx[phi_t1 + 1].v.tc[1] = vtx[phi_t1 + 2].v.tc[0] = 0;
+ vtx[vtxIndex + 0].v.tc[0] = vtx[vtxIndex + 0].v.tc[1] = vtx[vtxIndex + 1].v.tc[1] = vtx[vtxIndex + 2].v.tc[0] = 0;
- vtx[phi_t1 + 1].v.tc[0] = vtx[phi_t1 + 3].v.tc[0] = ptr2[phi_t3] << 5;
+ vtx[vtxIndex + 1].v.tc[0] = vtx[vtxIndex + 3].v.tc[0] = ptr2[colorIndex] << 5;
- vtx[phi_t1 + 2].v.tc[1] = vtx[phi_t1 + 3].v.tc[1] = ptr4[phi_t3] << 5;
+ vtx[vtxIndex + 2].v.tc[1] = vtx[vtxIndex + 3].v.tc[1] = ptr4[colorIndex] << 5;
- vtx[phi_t1 + 0].v.cn[0] = vtx[phi_t1 + 2].v.cn[0] = vtx[phi_t1 + 0].v.cn[1] = vtx[phi_t1 + 2].v.cn[1] =
- vtx[phi_t1 + 0].v.cn[2] = vtx[phi_t1 + 2].v.cn[2] = vtx[phi_t1 + 1].v.cn[0] = vtx[phi_t1 + 3].v.cn[0] =
- vtx[phi_t1 + 1].v.cn[1] = vtx[phi_t1 + 3].v.cn[1] = vtx[phi_t1 + 1].v.cn[2] =
- vtx[phi_t1 + 3].v.cn[2] = 255;
+ vtx[vtxIndex + 0].v.cn[0] = vtx[vtxIndex + 2].v.cn[0] = vtx[vtxIndex + 0].v.cn[1] = vtx[vtxIndex + 2].v.cn[1] =
+ vtx[vtxIndex + 0].v.cn[2] = vtx[vtxIndex + 2].v.cn[2] = vtx[vtxIndex + 1].v.cn[0] = vtx[vtxIndex + 3].v.cn[0] =
+ vtx[vtxIndex + 1].v.cn[1] = vtx[vtxIndex + 3].v.cn[1] = vtx[vtxIndex + 1].v.cn[2] =
+ vtx[vtxIndex + 3].v.cn[2] = 255;
- vtx[phi_t1 + 0].v.cn[3] = vtx[phi_t1 + 2].v.cn[3] = vtx[phi_t1 + 1].v.cn[3] = vtx[phi_t1 + 3].v.cn[3] =
+ vtx[vtxIndex + 0].v.cn[3] = vtx[vtxIndex + 2].v.cn[3] = vtx[vtxIndex + 1].v.cn[3] = vtx[vtxIndex + 3].v.cn[3] =
pauseCtx->alpha;
}
- if (arg2 == 4) {
- phi_t1 -= 12;
+ if (pageIndex == 4) {
+ vtxIndex -= 12;
- phi_t3 = gSaveContext.worldMapArea;
+ colorIndex = gSaveContext.worldMapArea;
- vtx[phi_t1 + 0].v.ob[0] = vtx[phi_t1 + 2].v.ob[0] = D_8082B060[phi_t3];
+ vtx[vtxIndex + 0].v.ob[0] = vtx[vtxIndex + 2].v.ob[0] = D_8082B060[colorIndex];
- if (phi_t3) {}
+ if (colorIndex) {}
- vtx[phi_t1 + 1].v.ob[0] = vtx[phi_t1 + 3].v.ob[0] = vtx[phi_t1 + 0].v.ob[0] + D_8082B08C[phi_t3];
+ vtx[vtxIndex + 1].v.ob[0] = vtx[vtxIndex + 3].v.ob[0] = vtx[vtxIndex + 0].v.ob[0] + D_8082B08C[colorIndex];
- vtx[phi_t1 + 0].v.ob[1] = vtx[phi_t1 + 1].v.ob[1] = D_8082B0B8[phi_t3] + pauseCtx->offsetY;
+ vtx[vtxIndex + 0].v.ob[1] = vtx[vtxIndex + 1].v.ob[1] = D_8082B0B8[colorIndex] + pauseCtx->offsetY;
- vtx[phi_t1 + 2].v.ob[1] = vtx[phi_t1 + 3].v.ob[1] = vtx[phi_t1 + 0].v.ob[1] - D_8082B0E4[phi_t3];
+ vtx[vtxIndex + 2].v.ob[1] = vtx[vtxIndex + 3].v.ob[1] = vtx[vtxIndex + 0].v.ob[1] - D_8082B0E4[colorIndex];
- phi_t1 += 12;
+ vtxIndex += 12;
if (pauseCtx->tradeQuestLocation != 0xFF) {
if (D_8082B114 == 0) {
@@ -2576,14 +2665,14 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
D_8082B114--;
}
- phi_t3 = phi_s2 + (pauseCtx->tradeQuestLocation * 4) + 64;
+ colorIndex = phi_s2 + (pauseCtx->tradeQuestLocation * 4) + 64;
phi_a2 = phi_s2 + 116;
- vtx[phi_a2 + 0].v.ob[0] = vtx[phi_a2 + 2].v.ob[0] = vtx[phi_t3 + 0].v.ob[0];
+ vtx[phi_a2 + 0].v.ob[0] = vtx[phi_a2 + 2].v.ob[0] = vtx[colorIndex + 0].v.ob[0];
vtx[phi_a2 + 1].v.ob[0] = vtx[phi_a2 + 3].v.ob[0] = vtx[phi_a2 + 0].v.ob[0] + 8;
- vtx[phi_a2 + 0].v.ob[1] = vtx[phi_a2 + 1].v.ob[1] = vtx[phi_t3 + 0].v.ob[1] - D_8082B110 + 10;
+ vtx[phi_a2 + 0].v.ob[1] = vtx[phi_a2 + 1].v.ob[1] = vtx[colorIndex + 0].v.ob[1] - D_8082B110 + 10;
vtx[phi_a2 + 0].v.ob[2] = vtx[phi_a2 + 1].v.ob[2] = vtx[phi_a2 + 2].v.ob[2] = vtx[phi_a2 + 3].v.ob[2] =
0;
@@ -2592,7 +2681,7 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
vtx[phi_a2 + 0].v.flag = vtx[phi_a2 + 1].v.flag = vtx[phi_a2 + 2].v.flag = vtx[phi_a2 + 3].v.flag = 0;
- vtx[phi_t1].v.tc[0] = vtx[phi_t1].v.tc[1] = vtx[phi_a2 + 1].v.tc[1] = vtx[phi_a2 + 2].v.tc[0] = 0;
+ vtx[vtxIndex].v.tc[0] = vtx[vtxIndex].v.tc[1] = vtx[phi_a2 + 1].v.tc[1] = vtx[phi_a2 + 2].v.tc[0] = 0;
vtx[phi_a2 + 1].v.tc[0] = vtx[phi_a2 + 3].v.tc[0] = 0x100;
@@ -2609,7 +2698,7 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
}
}
- return phi_t1;
+ return vtxIndex;
}
static s16 D_8082B11C[] = { 0, 4, 8, 12, 24, 32, 56 };