mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Decompiled some display lists.
This commit is contained in:
-262
@@ -549,269 +549,7 @@ void func_80066C80(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) {
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_80066CDC.s")
|
||||
#else
|
||||
// Work in progress!
|
||||
|
||||
void func_80066CDC(Gfx **dlist, s32 *arg1) {
|
||||
u32 sp58;
|
||||
u32 sp54;
|
||||
u32 sp50;
|
||||
u32 sp4C;
|
||||
s32 sp34;
|
||||
s32 sp2C;
|
||||
u32 temp_a0;
|
||||
u32 temp_a0_3;
|
||||
u32 temp_a0_4;
|
||||
u32 temp_a2;
|
||||
u32 temp_a3;
|
||||
u32 temp_a3_2;
|
||||
u32 temp_t0;
|
||||
u32 temp_t1_2;
|
||||
u32 temp_v0;
|
||||
u32 temp_v0_3;
|
||||
u32 temp_v0_4;
|
||||
u32 temp_v1_10;
|
||||
u32 temp_v1_3;
|
||||
u32 temp_v1_4;
|
||||
s32 phi_t1;
|
||||
s32 phi_v1;
|
||||
f32 phi_f6;
|
||||
f32 phi_f18;
|
||||
f32 phi_f16;
|
||||
f32 phi_f8;
|
||||
f32 phi_f6_2;
|
||||
f32 phi_f18_2;
|
||||
f32 phi_f8_2;
|
||||
f32 phi_f16_2;
|
||||
u32 phi_a1;
|
||||
f32 phi_f8_3;
|
||||
f32 phi_f16_3;
|
||||
f32 phi_f16_4;
|
||||
u32 phi_t3;
|
||||
u32 phi_a3_2;
|
||||
u32 phi_t5;
|
||||
u32 phi_t4;
|
||||
|
||||
sp34 = D_80120CE4;
|
||||
phi_t1 = D_80120CE4;
|
||||
if (func_8000E184() && D_80120CE0 == 0) {
|
||||
D_80120CE4 = 1;
|
||||
phi_t1 = 0;
|
||||
}
|
||||
temp_v0 = func_8007A520();
|
||||
temp_t0 = temp_v0 >> 0x10;
|
||||
temp_a3 = temp_t0 >> 1;
|
||||
|
||||
if (gScreenViewports[phi_t1].flags & 1) {
|
||||
sp2C = D_80120CE4;
|
||||
D_80120CE4 = phi_t1;
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
((((s32)(gScreenViewports[D_80120CE4].unk24 * 4.0f)) & 0xFFF) | 0xED000000) | (((s32)(gScreenViewports[D_80120CE4].unk20 * 4.0f)) & 0xFFF) << 0xC,
|
||||
(((s32)(gScreenViewports[D_80120CE4].unk2C * 4.0f)) & 0xFFF) | (((s32)(gScreenViewports[D_80120CE4].unk28 * 4.0f)) & 0xFFF) << 0xC
|
||||
)
|
||||
func_80068158(dlist, 0, 0, 0, 0);
|
||||
D_80120CE4 = sp2C;
|
||||
if (arg1 != 0) {
|
||||
func_80067D3C(dlist, arg1);
|
||||
}
|
||||
D_80120CE4 = sp34;
|
||||
return;
|
||||
}
|
||||
temp_t1_2 = temp_v0 & 0xFFFF;
|
||||
phi_v1 = D_80120CE0;
|
||||
if (D_80120CE0 == 2) {
|
||||
phi_v1 = 3;
|
||||
}
|
||||
temp_a2 = temp_t1_2 >> 1;
|
||||
sp54 = temp_a2;
|
||||
sp58 = temp_a3;
|
||||
if (osTvType == 0) {
|
||||
sp58 = 0x91;
|
||||
}
|
||||
|
||||
switch(phi_v1) {
|
||||
case 0:
|
||||
phi_t3 = sp58;
|
||||
if (osTvType == 0) {
|
||||
phi_t3 = sp58 - 0x12;
|
||||
}
|
||||
phi_f16_4 = temp_t0;
|
||||
if (temp_t0 < 0) {
|
||||
phi_f16_4 = temp_t0 + 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
0xED000000,
|
||||
((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_4 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
sp4C = temp_a2;
|
||||
phi_a3_2 = temp_a2;
|
||||
break;
|
||||
case 1:
|
||||
if (D_80120CE4 == 0) {
|
||||
temp_v0_4 = temp_t0 >> 2;
|
||||
phi_t3 = temp_v0_4;
|
||||
if (osTvType == 0) {
|
||||
phi_t3 = temp_v0_4 - 0xC;
|
||||
}
|
||||
phi_f8_3 = temp_a3 - (temp_t0 >> 7);
|
||||
if (phi_f8_3 < 0) {
|
||||
phi_f8_3 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
0xED000000,
|
||||
((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_3 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
} else {
|
||||
temp_v1_10 = temp_t0 >> 7;
|
||||
phi_f16_3 = temp_t0 - temp_v1_10;
|
||||
if (phi_f16_3 < 0) {
|
||||
phi_f16_3 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
(((s32)((temp_a3 + temp_v1_10) * 4.0f)) & 0xFFF) | 0xED000000,
|
||||
((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_3 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_t3 = temp_a3 + (temp_t0 >> 2);
|
||||
}
|
||||
sp4C = temp_a2;
|
||||
phi_a3_2 = temp_a2;
|
||||
break;
|
||||
case 2:
|
||||
if (D_80120CE4 == 0) {
|
||||
phi_f8_2 = temp_t0;
|
||||
if (temp_t0 < 0) {
|
||||
phi_f8_2 = temp_t0 + 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
0xED000000,
|
||||
((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_2 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_a1 = temp_t1_2 >> 2;
|
||||
} else {
|
||||
temp_a0_4 = temp_t1_2 >> 8;
|
||||
phi_f16_2 = temp_t0;
|
||||
if (temp_t0 < 0) {
|
||||
phi_f16_2 = temp_t0 + 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
(((s32)((temp_a2 + temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | 0xED000000,
|
||||
(((s32)((temp_t1_2 - temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f16_2 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_a1 = temp_a2 + (temp_t1_2 >> 2);
|
||||
}
|
||||
sp4C = phi_a1;
|
||||
phi_t3 = sp58;
|
||||
phi_a3_2 = phi_a1;
|
||||
break;
|
||||
case 3:
|
||||
switch(D_80120CE4) {
|
||||
case 0:
|
||||
phi_f6_2 = temp_a2 - (temp_t1_2 >> 8);
|
||||
if (phi_f6_2 < 0) {
|
||||
phi_f6_2 += 4294967296.0f;
|
||||
}
|
||||
phi_f18_2 = temp_a3 - (temp_t0 >> 7);
|
||||
if (phi_f18_2 < 0) {
|
||||
phi_f18_2 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
((((s32)(0U * 4.0f) & 0xFFF) << 0xC) | 0xED000000) | (((s32)(0U * 4.0f)) & 0xFFF),
|
||||
(((s32)(phi_f6_2 * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f18_2 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_t5 = 0U;
|
||||
phi_t4 = 0U;
|
||||
break;
|
||||
case 1:
|
||||
temp_a0_3 = temp_t1_2 >> 8;
|
||||
phi_f8 = temp_a3 - (temp_t0 >> 7);
|
||||
if (phi_f8 < 0) {
|
||||
phi_f8 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
((((s32)((temp_a2 + temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000,
|
||||
((((s32)(((temp_a2 * 2) - temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_t5 = 0U;
|
||||
phi_t4 = temp_a2;
|
||||
break;
|
||||
case 2:
|
||||
temp_v1_4 = temp_t0 >> 7;
|
||||
phi_f16 = (temp_a3 * 2) - temp_v1_4;
|
||||
if (phi_f16 < 0) {
|
||||
phi_f16 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
(((s32)((temp_a3 + temp_v1_4) * 4.0f)) & 0xFFF) | 0xED000000,
|
||||
((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_t5 = temp_a3;
|
||||
phi_t4 = 0U;
|
||||
break;
|
||||
case 3:
|
||||
temp_a0 = temp_t1_2 >> 8;
|
||||
temp_v1_3 = temp_t0 >> 7;
|
||||
phi_f6 = (temp_a2 * 2) - temp_a0;
|
||||
if (phi_f6 < 0) {
|
||||
phi_f6 += 4294967296.0f;
|
||||
}
|
||||
phi_f18 = (temp_a3 * 2) - temp_v1_3;
|
||||
if (phi_f18 < 0) {
|
||||
phi_f18 += 4294967296.0f;
|
||||
}
|
||||
fast3d_cmd(
|
||||
(*dlist)++,
|
||||
(((((s32)((temp_a2 + temp_a0) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000) | (((s32)((temp_a3 + temp_v1_3) * 4.0f)) & 0xFFF),
|
||||
((((s32)(phi_f6 * 4.0f) & 0xFFF)) << 0xC) | (((s32)(phi_f18 * 4.0f)) & 0xFFF)
|
||||
)
|
||||
phi_t5 = temp_a3;
|
||||
phi_t4 = temp_a2;
|
||||
break;
|
||||
default:
|
||||
phi_t5 = 0;
|
||||
phi_t4 = 0;
|
||||
break;
|
||||
}
|
||||
temp_v0_3 = phi_t5 + sp58;
|
||||
temp_a3_2 = phi_t4 + sp54;
|
||||
phi_t3 = temp_v0_3;
|
||||
phi_a3_2 = temp_a3_2;
|
||||
if (osTvType == 0) {
|
||||
phi_t3 = temp_v0_3 - 6;
|
||||
phi_a3_2 = temp_a3_2;
|
||||
if (D_80120CE4 < 2) {
|
||||
phi_t3 = temp_v0_3 - 0x14;
|
||||
phi_a3_2 = temp_a3_2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
phi_t3 = sp50;
|
||||
phi_a3_2 = sp4C;
|
||||
break;
|
||||
}
|
||||
|
||||
if (osTvType == 0) {
|
||||
phi_a3_2 -= 4;
|
||||
}
|
||||
func_80068158(dlist, sp54, sp58, phi_a3_2, phi_t3);
|
||||
if (arg1 != 0) {
|
||||
func_80067D3C(dlist, arg1);
|
||||
}
|
||||
D_80120CE4 = sp34;
|
||||
}
|
||||
#endif
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_80067A3C.s")
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_80067D3C.s")
|
||||
|
||||
|
||||
+1
-1
@@ -3333,7 +3333,7 @@ s32 menu_track_select_loop(s32 arg0) {
|
||||
}
|
||||
func_8008E4EC();
|
||||
|
||||
fast3d_cmd(D_801263A0++, 0xB6000000, 0x00001000) // gSPClearGeometryMode(D_801263A0++, G_CULL_FRONT)
|
||||
gSPClearGeometryMode(D_801263A0++, G_CULL_FRONT)
|
||||
|
||||
switch(D_801267D0) {
|
||||
case 0:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "structs.h"
|
||||
#include "fast3d.h"
|
||||
#include "f3ddkr.h"
|
||||
#include "asset_sections.h"
|
||||
|
||||
/************ .data ************/
|
||||
@@ -922,21 +922,21 @@ void func_80012C3C(Gfx** dlist){
|
||||
s32 i;
|
||||
Gfx *tmp;
|
||||
for(i = 0; i<D_8011ADA4; i++){
|
||||
fast3d_cmd((*dlist)++, 0x06000000, D_8011AD78[i]);
|
||||
gSPDisplayList((*dlist)++, D_8011AD78[i])
|
||||
}
|
||||
}
|
||||
|
||||
void func_80012C98(Gfx **dlist) {
|
||||
if (D_8011ADA4 < 9) {
|
||||
fast3d_cmd((*dlist)++, 0x00000000, 0x00000000); // Fast3D NOP
|
||||
gSPNoOp((*dlist)++) // Placeholder instruction?
|
||||
D_8011AD78[D_8011ADA4] = *dlist;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80012CE8(Gfx **dlist) {
|
||||
if (D_8011ADA4 < 9) {
|
||||
fast3d_cmd((*dlist)++, 0xB8000000, 0x00000000); // End display list
|
||||
fast3d_cmd(D_8011AD78[D_8011ADA4] - 1, 0x6010000, (u32)*dlist); // Jump to display list
|
||||
gSPEndDisplayList((*dlist)++)
|
||||
gSPBranchList(D_8011AD78[D_8011ADA4] - 1, (u32)*dlist)
|
||||
D_8011ADA4++;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -7,7 +7,7 @@
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "structs.h"
|
||||
#include "fast3d.h"
|
||||
#include "f3ddkr.h"
|
||||
#include "asset_sections.h"
|
||||
#include "menu.h"
|
||||
|
||||
@@ -711,9 +711,7 @@ void thread3_main(s32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006C3E0.s")
|
||||
#else
|
||||
#if 0
|
||||
extern Gfx *D_801211F0;
|
||||
extern u8 D_800DD374;
|
||||
extern u8 D_800DD3A0;
|
||||
@@ -779,11 +777,13 @@ void func_8006C3E0(void) {
|
||||
|
||||
// ???
|
||||
D_801211F8 = D_801211F0;
|
||||
fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000)
|
||||
fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000)
|
||||
gDPFullSync(D_801211F8++)
|
||||
gSPEndDisplayList(D_801211F8++)
|
||||
|
||||
osSetTime(0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006C3E0.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
@@ -864,8 +864,8 @@ void render(void) {
|
||||
func_800829F8(&D_801211F8, D_800DD404);
|
||||
}
|
||||
|
||||
fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000)
|
||||
fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000)
|
||||
gDPFullSync(D_801211F8++)
|
||||
gSPEndDisplayList(D_801211F8++)
|
||||
|
||||
func_80066610();
|
||||
if (D_800DD3F0 != 1) {
|
||||
@@ -942,8 +942,8 @@ void func_8006CC14(void) {
|
||||
func_800A003C();
|
||||
func_800C30CC();
|
||||
D_801211F8 = D_801211F0[D_801234E8];
|
||||
fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000)
|
||||
fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000)
|
||||
gDPFullSync(D_801211F8++)
|
||||
gSPEndDisplayList(D_801211F8++)
|
||||
set_free_queue_state(2);
|
||||
}
|
||||
|
||||
@@ -1092,8 +1092,8 @@ void func_8006E2E8(s32 arg0, s32 arg1, s32 arg2) {
|
||||
func_8006DBE4();
|
||||
if (func_800C73E0() == 0) {
|
||||
D_801211F8 = D_801211F0[D_801234E8];
|
||||
fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000)
|
||||
fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000)
|
||||
gDPFullSync(D_801211F8++)
|
||||
gSPEndDisplayList(D_801211F8++)
|
||||
}
|
||||
}
|
||||
if (arg0 != -1) {
|
||||
|
||||
Reference in New Issue
Block a user