This commit is contained in:
louist103 2024-02-01 21:01:18 -05:00 committed by GitHub
parent 695ab6c6ee
commit 4bdb5098b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 192 additions and 63 deletions

View File

@ -67,6 +67,7 @@ typedef enum {
GROUP_EQUIPMENT, GROUP_EQUIPMENT,
GROUP_CONSUMABLE, GROUP_CONSUMABLE,
GROUP_HUD, GROUP_HUD,
GROUP_KALEIDO,
GROUP_TITLE, GROUP_TITLE,
GROUP_NPC, GROUP_NPC,
GROUP_WORLD, GROUP_WORLD,
@ -85,6 +86,7 @@ std::map<CosmeticGroup, const char*> groupLabels = {
{ GROUP_EQUIPMENT, "Equipment" }, { GROUP_EQUIPMENT, "Equipment" },
{ GROUP_CONSUMABLE, "Consumables" }, { GROUP_CONSUMABLE, "Consumables" },
{ GROUP_HUD, "HUD" }, { GROUP_HUD, "HUD" },
{ GROUP_KALEIDO, "Pause Menu" },
{ GROUP_TITLE, "Title Screen" }, { GROUP_TITLE, "Title Screen" },
{ GROUP_NPC, "NPCs" }, { GROUP_NPC, "NPCs" },
{ GROUP_WORLD, "World" }, { 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_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("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_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_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), 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); DrawCosmeticGroup(GROUP_TITLE);
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("HUD Placement")) { if (ImGui::BeginTabItem("HUD Placement")) {
Draw_Placements(); Draw_Placements();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Pause Menu")) {
DrawCosmeticGroup(GROUP_KALEIDO);
ImGui::EndTabItem();
}
ImGui::EndTabBar(); ImGui::EndTabBar();
} }
ImGui::End(); ImGui::End();

View File

@ -1883,11 +1883,17 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gSPMatrix(POLY_KAL_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_KAL_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); 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); gSPVertex(POLY_KAL_DISP++, &pauseCtx->infoPanelVtx[0], 16, 0);
gSPDisplayList(POLY_KAL_DISP++, gItemNamePanelDL); 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)) { 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); gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6);
} else { } else {
@ -1895,6 +1901,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255);
} }
} }
gSPDisplayList(POLY_KAL_DISP++, gLButtonIconDL); 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); 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 }, { 10, 70, 70, 10 }, { 10, 90, 90, 10 }, { 80, 140, 140, 80 },
{ 80, 120, 120, 80 }, { 80, 140, 140, 80 }, { 50, 110, 110, 50 }, { 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 }, { 50, 100, 100, 50 }, { 50, 100, 100, 50 }, { 40, 60, 60, 40 },
{ 80, 120, 120, 80 }, { 40, 60, 60, 40 }, { 50, 110, 110, 50 }, { 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 }, { 80, 130, 130, 80 }, { 40, 60, 60, 40 }, { 30, 60, 60, 30 },
{ 50, 70, 70, 50 }, { 30, 60, 60, 30 }, { 50, 110, 110, 50 }, { 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, 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_8082B110 = 0;
static s16 D_8082B114 = 1; static s16 D_8082B114 = 1;
static s16 D_8082B118 = 0; 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; PauseContext* pauseCtx = &play->pauseCtx;
s16* ptr1; s16* ptr1;
s16* ptr2; s16* ptr2;
@ -2454,109 +2538,114 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
s16 phi_t0; s16 phi_t0;
s16 phi_a1; s16 phi_a1;
s16 phi_a2; s16 phi_a2;
s16 phi_t3; s16 colorIndex; // Also used for other things.
s16 phi_t1; s16 vtxIndex;
phi_t0 = -200; 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; phi_t0 += 80;
for (phi_a1 = 80, phi_a2 = 0; phi_a2 < 5; phi_a2++, phi_t1 += 4, phi_a1 -= 32) { for (phi_a1 = 80, phi_a2 = 0; phi_a2 < 5; phi_a2++, vtxIndex += 4, phi_a1 -= 32) {
vtx[phi_t1 + 0].v.ob[0] = vtx[phi_t1 + 2].v.ob[0] = phi_t0; 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[vtxIndex + 0].v.flag = 0;
vtx[phi_t1 + 1].v.flag = 0; vtx[vtxIndex + 1].v.flag = 0;
vtx[phi_t1 + 2].v.flag = 0; vtx[vtxIndex + 2].v.flag = 0;
vtx[phi_t1 + 3].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; pauseCtx->alpha;
} }
} }
phi_s2 = phi_t1; phi_s2 = vtxIndex;
if (arg3 != 0) { if (arg3 != 0) {
ptr1 = D_8082B000[arg2]; ptr1 = D_8082B000[pageIndex];
ptr2 = D_8082B018[arg2]; ptr2 = D_8082B018[pageIndex];
ptr3 = D_8082B030[arg2]; ptr3 = D_8082B030[pageIndex];
ptr4 = D_8082B048[arg2]; ptr4 = D_8082B048[pageIndex];
for (phi_t3 = 0; phi_t3 < arg3; phi_t3++, phi_t1 += 4) { for (colorIndex = 0; colorIndex < arg3; colorIndex++, vtxIndex += 4) {
vtx[phi_t1 + 2].v.ob[0] = vtx[phi_t1 + 0].v.ob[0] = ptr1[phi_t3]; 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))) { 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 { } 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[vtxIndex + 0].v.cn[0] = vtx[vtxIndex + 2].v.cn[0] = vtx[vtxIndex + 0].v.cn[1] = vtx[vtxIndex + 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[vtxIndex + 0].v.cn[2] = vtx[vtxIndex + 2].v.cn[2] = vtx[vtxIndex + 1].v.cn[0] = vtx[vtxIndex + 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[vtxIndex + 1].v.cn[1] = vtx[vtxIndex + 3].v.cn[1] = vtx[vtxIndex + 1].v.cn[2] =
vtx[phi_t1 + 3].v.cn[2] = 255; 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; pauseCtx->alpha;
} }
if (arg2 == 4) { if (pageIndex == 4) {
phi_t1 -= 12; 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 (pauseCtx->tradeQuestLocation != 0xFF) {
if (D_8082B114 == 0) { if (D_8082B114 == 0) {
@ -2576,14 +2665,14 @@ s16 func_80823A0C(PlayState* play, Vtx* vtx, s16 arg2, s16 arg3) {
D_8082B114--; D_8082B114--;
} }
phi_t3 = phi_s2 + (pauseCtx->tradeQuestLocation * 4) + 64; colorIndex = phi_s2 + (pauseCtx->tradeQuestLocation * 4) + 64;
phi_a2 = phi_s2 + 116; 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 + 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] = 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; 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_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; 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 }; static s16 D_8082B11C[] = { 0, 4, 8, 12, 24, 32, 56 };