1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 02:44:54 +00:00

Decompile z_rcp.c (1 non matching left)

This commit is contained in:
Roman971 2020-03-29 18:43:45 +02:00
parent 51c85fe660
commit f5ffe8687d
359 changed files with 2285 additions and 3986 deletions

View file

@ -1109,8 +1109,8 @@ void Interface_SetSceneRestrictions(GlobalContext* globalCtx) {
} while (sRestrictionFlags[i].scene != 0xFF);
}
Gfx* Draw_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft,
s16 rectTop, s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
Gfx* Gfx_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft, s16 rectTop,
s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
gDPLoadTextureBlock(displayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, textureWidth, textureHeight, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
@ -1121,8 +1121,8 @@ Gfx* Draw_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16
return displayListHead;
}
Gfx* Draw_TextureI8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft, s16 rectTop,
s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
Gfx* Gfx_TextureI8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft, s16 rectTop,
s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
gDPLoadTextureBlock(displayListHead++, texture, G_IM_FMT_I, G_IM_SIZ_8b, textureWidth, textureHeight, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
@ -2601,10 +2601,10 @@ void Interface_DrawMagicBar(GlobalContext* globalCtx) {
gDPSetEnvColor(gfxCtx->overlay.p++, 0x64, 0x32, 0x32, 0xFF);
gfxCtx->overlay.p =
Draw_TextureIA8(gfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024);
Gfx_TextureIA8(gfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024);
gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY,
gSaveContext.unk_13F4, 16, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY,
gSaveContext.unk_13F4, 16, 1024, 1024);
gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_020038C0);
gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
@ -2748,8 +2748,8 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
interfaceCtx->bAlpha);
gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0xFF);
gfxCtx->overlay.p =
Draw_TextureIA8(gfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0),
R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2);
Gfx_TextureIA8(gfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), R_ITEM_BTN_WIDTH(0),
R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2);
// C-Left Button Color & Texture
gDPPipeSync(gfxCtx->overlay.p++);
@ -2876,8 +2876,8 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
}
gfxCtx->overlay.p =
Draw_TextureIA8(gfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i),
R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_DD(i) * 2, R_ITEM_BTN_DD(i) * 2);
Gfx_TextureIA8(gfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i),
R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_DD(i) * 2, R_ITEM_BTN_DD(i) * 2);
}
}
@ -2956,12 +2956,12 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) {
}
if (i != 0) {
gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button),
R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button),
R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024);
}
gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6,
R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6,
R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024);
}
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_parameter.c", 3158);
@ -3170,7 +3170,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
// Rupee Icon
gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xC8, 0xFF, 0x64, interfaceCtx->magicAlpha);
gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x50, 0x00, 0xFF);
gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024);
switch (globalCtx->sceneNum) {
case SCENE_BMORI1:
@ -3193,7 +3193,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xC8, 0xE6, 0xFF, interfaceCtx->magicAlpha);
gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x14, 0xFF);
gfxCtx->overlay.p =
Draw_TextureIA8(gfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024);
Gfx_TextureIA8(gfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024);
// Small Key Counter
gDPPipeSync(gfxCtx->overlay.p++);
@ -3212,13 +3212,13 @@ void Interface_Draw(GlobalContext* globalCtx) {
phi_s2 = 42;
if (interfaceCtx->counterDigits[2] != 0) {
gfxCtx->overlay.p =
Draw_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16,
phi_s2, 190, 8, 16, 1024, 1024);
Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16, phi_s2,
190, 8, 16, 1024, 1024);
phi_s2 = 50;
}
gfxCtx->overlay.p = Draw_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[3]],
8, 16, phi_s2, 190, 8, 16, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[3]], 8,
16, phi_s2, 190, 8, 16, 1024, 1024);
}
phi_s2 = 42;
@ -3265,8 +3265,8 @@ void Interface_Draw(GlobalContext* globalCtx) {
phi_s1 = sRupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
for (phi_s3 = 0; phi_s3 < phi_s1; phi_s3++, phi_s0++, phi_s2 += 8) {
gfxCtx->overlay.p = Draw_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8,
16, phi_s2, 206, 8, 16, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8,
16, phi_s2, 206, 8, 16, 1024, 1024);
}
Interface_DrawMagicBar(globalCtx);
@ -3532,8 +3532,8 @@ void Interface_Draw(GlobalContext* globalCtx) {
for (phi_s3 = 0; phi_s3 < 4; phi_s3++) {
if (sHBAScoreDigits[phi_s3] != 0 || (phi_s0 != 0) || (phi_s3 >= 3)) {
gfxCtx->overlay.p =
Draw_TextureI8(gfxCtx->overlay.p, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1,
ZREG(15) - 2, sDigitWidth[0], VREG(42), VREG(43) * 2, VREG(43) * 2);
Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1,
ZREG(15) - 2, sDigitWidth[0], VREG(42), VREG(43) * 2, VREG(43) * 2);
phi_s1 += 9;
phi_s0++;
}
@ -3925,8 +3925,8 @@ void Interface_Draw(GlobalContext* globalCtx) {
gDPPipeSync(gfxCtx->overlay.p++);
gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF);
gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00);
gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timer_x[sp274],
gSaveContext.timer_y[sp274] + 2, 16, 16, 1024, 1024);
gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timer_x[sp274],
gSaveContext.timer_y[sp274] + 2, 16, 16, 1024, 1024);
// Timer Counter
gDPPipeSync(gfxCtx->overlay.p++);
@ -3948,10 +3948,10 @@ void Interface_Draw(GlobalContext* globalCtx) {
}
for (phi_s3 = 0; phi_s3 < 5; phi_s3++) {
gfxCtx->overlay.p = Draw_TextureI8(gfxCtx->overlay.p, &D_02003040[sTimerDigits[phi_s3]], 8, 16,
gSaveContext.timer_x[sp274] + sTimerDigitLeftPos[phi_s3],
gSaveContext.timer_y[sp274], sDigitWidth[phi_s3], VREG(42),
VREG(43) * 2, VREG(43) * 2);
gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[sTimerDigits[phi_s3]], 8, 16,
gSaveContext.timer_x[sp274] + sTimerDigitLeftPos[phi_s3],
gSaveContext.timer_y[sp274], sDigitWidth[phi_s3], VREG(42),
VREG(43) * 2, VREG(43) * 2);
}
}
}