mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Merge pull request #125 from DavidSM64/doc
Renamed some render functions, decompiled 2 functions, and a slight improvement to the extractor.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
glabel func_80011C94
|
||||
glabel render_3d_billboard
|
||||
/* 012894 80011C94 27BDFF70 */ addiu $sp, $sp, -0x90
|
||||
/* 012898 80011C98 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 01289C 80011C9C AFB00020 */ sw $s0, 0x20($sp)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
glabel func_800120C8
|
||||
glabel render_3d_model
|
||||
/* 012CC8 800120C8 27BDFF40 */ addiu $sp, $sp, -0xc0
|
||||
/* 012CCC 800120CC AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 012CD0 800120D0 AFB30028 */ sw $s3, 0x28($sp)
|
||||
@@ -287,7 +287,7 @@ glabel func_80024D54
|
||||
/* 025D84 80025184 10000010 */ b .L800251C8
|
||||
/* 025D88 80025188 8E220000 */ lw $v0, ($s1)
|
||||
.L8002518C:
|
||||
/* 025D8C 8002518C 0C00A304 */ jal func_80028C10
|
||||
/* 025D8C 8002518C 0C00A304 */ jal render_skydome
|
||||
/* 025D90 80025190 00000000 */ nop
|
||||
/* 025D94 80025194 1000000C */ b .L800251C8
|
||||
/* 025D98 80025198 8E220000 */ lw $v0, ($s1)
|
||||
|
||||
@@ -179,7 +179,7 @@ glabel func_80028CD0
|
||||
/* 029B7C 80028F7C 0C01AF6C */ jal get_current_level_header
|
||||
/* 029B80 80028F80 00000000 */ nop
|
||||
/* 029B84 80028F84 240A0001 */ li $t2, 1
|
||||
/* 029B88 80028F88 0C00A3EB */ jal func_80028FAC
|
||||
/* 029B88 80028F88 0C00A3EB */ jal render_level_geometry_and_objects
|
||||
/* 029B8C 80028F8C A04A0003 */ sb $t2, 3($v0)
|
||||
/* 029B90 80028F90 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 029B94 80028F94 27BD0048 */ addiu $sp, $sp, 0x48
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
glabel func_8002D384
|
||||
glabel render_floor_decal
|
||||
/* 02DF84 8002D384 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 02DF88 8002D388 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 02DF8C 8002D38C AFBE0038 */ sw $fp, 0x38($sp)
|
||||
+6
-6
@@ -3,7 +3,7 @@ glabel D_800E5EA0
|
||||
.double 1000.0
|
||||
|
||||
.text
|
||||
glabel func_80028FAC
|
||||
glabel render_level_geometry_and_objects
|
||||
/* 029BAC 80028FAC 27BDFE90 */ addiu $sp, $sp, -0x170
|
||||
/* 029BB0 80028FB0 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 029BB4 80028FB4 AFB60038 */ sw $s6, 0x38($sp)
|
||||
@@ -76,7 +76,7 @@ glabel func_80028FAC
|
||||
/* 029CAC 800290AC 24110001 */ li $s1, 1
|
||||
.L800290B0:
|
||||
/* 029CB0 800290B0 92040000 */ lbu $a0, ($s0)
|
||||
/* 029CB4 800290B4 0C00A596 */ jal func_80029658
|
||||
/* 029CB4 800290B4 0C00A596 */ jal render_level_segment
|
||||
/* 029CB8 800290B8 00002825 */ move $a1, $zero
|
||||
/* 029CBC 800290BC 920E0000 */ lbu $t6, ($s0)
|
||||
/* 029CC0 800290C0 26520001 */ addiu $s2, $s2, 1
|
||||
@@ -183,7 +183,7 @@ glabel func_80028FAC
|
||||
/* 029E30 80029230 00000000 */ nop
|
||||
/* 029E34 80029234 10A00004 */ beqz $a1, .L80029248
|
||||
/* 029E38 80029238 02602025 */ move $a0, $s3
|
||||
/* 029E3C 8002923C 0C00B4E1 */ jal func_8002D384
|
||||
/* 029E3C 8002923C 0C00B4E1 */ jal render_floor_decal
|
||||
/* 029E40 80029240 02202025 */ move $a0, $s1
|
||||
/* 029E44 80029244 02602025 */ move $a0, $s3
|
||||
.L80029248:
|
||||
@@ -265,7 +265,7 @@ glabel func_80028FAC
|
||||
/* 029F60 80029360 00000000 */ nop
|
||||
/* 029F64 80029364 10A00004 */ beqz $a1, .L80029378
|
||||
/* 029F68 80029368 02602025 */ move $a0, $s3
|
||||
/* 029F6C 8002936C 0C00B4E1 */ jal func_8002D384
|
||||
/* 029F6C 8002936C 0C00B4E1 */ jal render_floor_decal
|
||||
/* 029F70 80029370 02202025 */ move $a0, $s1
|
||||
/* 029F74 80029374 02602025 */ move $a0, $s3
|
||||
.L80029378:
|
||||
@@ -304,7 +304,7 @@ glabel func_80028FAC
|
||||
/* 029FEC 800293EC 27B100D8 */ addiu $s1, $sp, 0xd8
|
||||
.L800293F0:
|
||||
/* 029FF0 800293F0 92040000 */ lbu $a0, ($s0)
|
||||
/* 029FF4 800293F4 0C00A596 */ jal func_80029658
|
||||
/* 029FF4 800293F4 0C00A596 */ jal render_level_segment
|
||||
/* 029FF8 800293F8 24050001 */ li $a1, 1
|
||||
/* 029FFC 800293FC 2610FFFF */ addiu $s0, $s0, -1
|
||||
/* 02A000 80029400 0211082B */ sltu $at, $s0, $s1
|
||||
@@ -402,7 +402,7 @@ glabel func_80028FAC
|
||||
/* 02A14C 8002954C 00000000 */ nop
|
||||
/* 02A150 80029550 10A00004 */ beqz $a1, .L80029564
|
||||
/* 02A154 80029554 02602025 */ move $a0, $s3
|
||||
/* 02A158 80029558 0C00B4E1 */ jal func_8002D384
|
||||
/* 02A158 80029558 0C00B4E1 */ jal render_floor_decal
|
||||
/* 02A15C 8002955C 02202025 */ move $a0, $s1
|
||||
/* 02A160 80029560 02602025 */ move $a0, $s3
|
||||
.L80029564:
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
glabel func_80029658
|
||||
glabel render_level_segment
|
||||
/* 02A258 80029658 27BDFF50 */ addiu $sp, $sp, -0xb0
|
||||
/* 02A25C 8002965C 3C0E800E */ lui $t6, %hi(D_800DC918) # $t6, 0x800e
|
||||
/* 02A260 80029660 8DCEC918 */ lw $t6, %lo(D_800DC918)($t6)
|
||||
@@ -54,7 +54,7 @@ glabel L8007A5D0
|
||||
.L8007A5F8:
|
||||
/* 07B1F8 8007A5F8 3C058012 */ lui $a1, %hi(D_80126260) # $a1, 0x8012
|
||||
/* 07B1FC 8007A5FC 24A56260 */ addiu $a1, %lo(D_80126260) # addiu $a1, $a1, 0x6260
|
||||
/* 07B200 8007A600 0C01EAFF */ jal func_8007ABFC
|
||||
/* 07B200 8007A600 0C01EAFF */ jal memory_copy
|
||||
/* 07B204 8007A604 24060050 */ li $a2, 80
|
||||
/* 07B208 8007A608 3C088000 */ lui $t0, %hi(osTvType) # $t0, 0x8000
|
||||
/* 07B20C 8007A60C 8D080300 */ lw $t0, %lo(osTvType)($t0)
|
||||
@@ -92,7 +92,7 @@ glabel L8007A658
|
||||
.L8007A680:
|
||||
/* 07B280 8007A680 3C058012 */ lui $a1, %hi(D_80126260) # $a1, 0x8012
|
||||
/* 07B284 8007A684 24A56260 */ addiu $a1, %lo(D_80126260) # addiu $a1, $a1, 0x6260
|
||||
/* 07B288 8007A688 0C01EAFF */ jal func_8007ABFC
|
||||
/* 07B288 8007A688 0C01EAFF */ jal memory_copy
|
||||
/* 07B28C 8007A68C 24060050 */ li $a2, 80
|
||||
/* 07B290 8007A690 3C058012 */ lui $a1, %hi(D_80126260) # $a1, 0x8012
|
||||
/* 07B294 8007A694 24A46260 */ addiu $a0, $a1, %lo(D_80126260)
|
||||
@@ -121,7 +121,7 @@ glabel L8007A6C0
|
||||
.L8007A6E8:
|
||||
/* 07B2E8 8007A6E8 3C058012 */ lui $a1, %hi(D_80126260) # $a1, 0x8012
|
||||
/* 07B2EC 8007A6EC 24A56260 */ addiu $a1, %lo(D_80126260) # addiu $a1, $a1, 0x6260
|
||||
/* 07B2F0 8007A6F0 0C01EAFF */ jal func_8007ABFC
|
||||
/* 07B2F0 8007A6F0 0C01EAFF */ jal memory_copy
|
||||
/* 07B2F4 8007A6F4 24060050 */ li $a2, 80
|
||||
/* 07B2F8 8007A6F8 3C058012 */ lui $a1, %hi(D_80126260) # $a1, 0x8012
|
||||
/* 07B2FC 8007A6FC 24A46260 */ addiu $a0, $a1, %lo(D_80126260)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
glabel func_8007AB24
|
||||
/* 07B724 8007AB24 3C018012 */ lui $at, %hi(D_801262E4) # $at, 0x8012
|
||||
/* 07B728 8007AB28 AFA40000 */ sw $a0, ($sp)
|
||||
/* 07B72C 8007AB2C 03E00008 */ jr $ra
|
||||
/* 07B730 8007AB30 A02462E4 */ sb $a0, %lo(D_801262E4)($at)
|
||||
|
||||
/* 07B734 8007AB34 3C0E8012 */ lui $t6, %hi(D_80126170) # $t6, 0x8012
|
||||
/* 07B738 8007AB38 8DCE6170 */ lw $t6, %lo(D_80126170)($t6)
|
||||
/* 07B73C 8007AB3C 3C0F8012 */ lui $t7, %hi(D_80126309) # $t7, 0x8012
|
||||
/* 07B740 8007AB40 448E9000 */ mtc1 $t6, $f18
|
||||
/* 07B744 8007AB44 91EF6309 */ lbu $t7, %lo(D_80126309)($t7)
|
||||
/* 07B748 8007AB48 468091A0 */ cvt.s.w $f6, $f18
|
||||
/* 07B74C 8007AB4C 448F9000 */ mtc1 $t7, $f18
|
||||
/* 07B750 8007AB50 05E10005 */ bgez $t7, .L8007AB68
|
||||
/* 07B754 8007AB54 468092A0 */ cvt.s.w $f10, $f18
|
||||
/* 07B758 8007AB58 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 07B75C 8007AB5C 44818000 */ mtc1 $at, $f16
|
||||
/* 07B760 8007AB60 00000000 */ nop
|
||||
/* 07B764 8007AB64 46105280 */ add.s $f10, $f10, $f16
|
||||
.L8007AB68:
|
||||
/* 07B768 8007AB68 00000000 */ nop
|
||||
/* 07B76C 8007AB6C 460A3483 */ div.s $f18, $f6, $f10
|
||||
/* 07B770 8007AB70 4458F800 */ cfc1 $t8, $31
|
||||
/* 07B774 8007AB74 00000000 */ nop
|
||||
/* 07B778 8007AB78 37010003 */ ori $at, $t8, 3
|
||||
/* 07B77C 8007AB7C 38210002 */ xori $at, $at, 2
|
||||
/* 07B780 8007AB80 44C1F800 */ ctc1 $at, $31
|
||||
/* 07B784 8007AB84 00000000 */ nop
|
||||
/* 07B788 8007AB88 46009124 */ cvt.w.s $f4, $f18
|
||||
/* 07B78C 8007AB8C 44022000 */ mfc1 $v0, $f4
|
||||
/* 07B790 8007AB90 44D8F800 */ ctc1 $t8, $31
|
||||
/* 07B794 8007AB94 03E00008 */ jr $ra
|
||||
/* 07B798 8007AB98 00000000 */ nop
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
glabel func_8007ABFC
|
||||
glabel memory_copy
|
||||
/* 07B7FC 8007ABFC 18C00018 */ blez $a2, .L8007AC60
|
||||
/* 07B800 8007AC00 00001025 */ move $v0, $zero
|
||||
/* 07B804 8007AC04 30C70003 */ andi $a3, $a2, 3
|
||||
+7
-108
@@ -911,109 +911,8 @@ void func_80011AD0(Object* this){
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80011C94.s")
|
||||
#else
|
||||
void func_80011C94(Object* this){
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800120C8.s")
|
||||
#else
|
||||
|
||||
extern f32 D_8011AD30;
|
||||
|
||||
void func_800120C8(Object* this){
|
||||
u32 sp_b8;
|
||||
u32 sp_a8;
|
||||
u32 sp_a4;
|
||||
u32 sp_78;
|
||||
|
||||
u32 *s0;
|
||||
f32 tmp_f_1;
|
||||
f32 *tmp_fp_s1;
|
||||
Object_64* tmp_s3;
|
||||
|
||||
s0 = ((u32*) this->unk68)[this->unk3A];
|
||||
if(s0){
|
||||
/*
|
||||
sp_a8 = 0;
|
||||
sp_a4 = 0;
|
||||
sp_b8 = 255;
|
||||
sp_78 = *s0;
|
||||
|
||||
if(this->unk54){
|
||||
tmp_f_1 = *((f32*) this->unk54) * 255.0f * D_8011AD30;
|
||||
sp_a8 = 1;
|
||||
sp_a4 = 1;
|
||||
sp_b8 = tmp_f_1;
|
||||
}
|
||||
|
||||
|
||||
tmp_fp_s1 = &D_8011AD30;
|
||||
if(this->unk48 == 1){
|
||||
tmp_s3 = this->unk64;
|
||||
func_80012E28(this);
|
||||
|
||||
}else{
|
||||
tmp_s3 = NULL;
|
||||
}
|
||||
if(s0->unk20 < 0){
|
||||
this->s0->unk1f
|
||||
}
|
||||
//L800122Fc
|
||||
*/
|
||||
//L800129A0
|
||||
{
|
||||
$t6 = this->unk3A;
|
||||
|
||||
|
||||
//f64 $f8;
|
||||
$f12 = (f32) $t9;
|
||||
$f8 = ( (f64) $f16) + (((f64) $f8)* 0.25f);
|
||||
$f4 = (((f32) $v0->unk2) - this->y_position);
|
||||
this->x_position = (f32) $f8;
|
||||
this->y_position = (f32) (((f64)$f18) + (((f64) $f4) * $f14));
|
||||
$sp_38 = this->z_position;
|
||||
$f8 = ( (f64) $f10) + (((f64) ($f12 - $f6)) * $f14);
|
||||
$s0->0x14 = (f32) $f8;
|
||||
if(this->descriptor_ptr->unk53 == 1){
|
||||
|
||||
func_80068514( $s1, &D_8011AE90, &D_8011AE94, this, $t4, 266);
|
||||
}
|
||||
}
|
||||
//L80012AF8
|
||||
if($sp_9c != -1){
|
||||
if(this->descriptor_ptr->unk71){
|
||||
fast3d_cmd($v0++, 0xFA000000,
|
||||
($v1->unk18 << 0x18) | ($v1->unk19 << 0x10) | ($v1->unk1a << 0x08) | ($sp_b4 & 0xff));
|
||||
//G_SETPRIMCOLOR
|
||||
|
||||
func_8007B43C();
|
||||
}
|
||||
//L80012B6C
|
||||
func_800143A8($sp_78, this, $sp_9c, 4, $sp_b0);
|
||||
if(this->descriptor_ptr->unk71){
|
||||
func_8007B54();
|
||||
}
|
||||
}
|
||||
//L80012BA8
|
||||
if( $sp_a8 || this->descriptor_ptr->unk71){
|
||||
fast3d_cmd($v0++, 0xFA000000, 0xFFFFFFFF); //G_SETPRIMCOLOR
|
||||
}
|
||||
//L80012BE8
|
||||
if($sp_a4){
|
||||
fast3d_cmd($v0++, 0xFB000000, 0xFFFFFDA9); //G_SETENVCOLOR
|
||||
}
|
||||
//L80012C0C
|
||||
func_80069A40($s1);
|
||||
}
|
||||
//L80012C14
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_00BC20/render_3d_billboard.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_00BC20/render_3d_model.s")
|
||||
|
||||
void func_80012C30(void) {
|
||||
D_8011ADA4 = 0;
|
||||
@@ -1042,7 +941,7 @@ void func_80012CE8(Gfx **dlist) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8001348C(Object *);
|
||||
void render_object(Object *);
|
||||
|
||||
func_80012D5C(u32 *arg0, u32 *arg1, u32 *arg2, Object *object){
|
||||
f32 scale;
|
||||
@@ -1055,7 +954,7 @@ func_80012D5C(u32 *arg0, u32 *arg1, u32 *arg2, Object *object){
|
||||
D_8011AE90 = *arg1;
|
||||
D_8011AE94 = *arg2;
|
||||
scale = object->scale;
|
||||
func_8001348C(object);
|
||||
render_object(object);
|
||||
object->scale = scale;
|
||||
*arg0 = D_8011AE8C;
|
||||
*arg1 = D_8011AE90;
|
||||
@@ -1117,16 +1016,16 @@ GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012F94.s")
|
||||
|
||||
void func_80013548(Object *arg0);
|
||||
|
||||
void func_8001348C(Object *this){
|
||||
void render_object(Object *this){
|
||||
func_80012F94(this);
|
||||
if(this->unk6 & 0x8000){
|
||||
func_800B3740(this, &D_8011AE8C, &D_8011AE90, &D_8011AE94, 32768);
|
||||
}
|
||||
else{
|
||||
if(this->descriptor_ptr->unk53 == 0)
|
||||
func_800120C8(this);
|
||||
render_3d_model(this);
|
||||
else if(this->descriptor_ptr->unk53 == 1)
|
||||
func_80011C94(this);
|
||||
render_3d_billboard(this);
|
||||
else if(this->descriptor_ptr->unk53 == 4)
|
||||
func_80011AD0(this);
|
||||
}
|
||||
|
||||
+4
-55
@@ -375,7 +375,7 @@ void func_800289B8(void){
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_80028C10(void){
|
||||
void render_skydome(void){
|
||||
unk80120AC0 * v0_some_struct;
|
||||
if(D_8011B0B8 == NULL)
|
||||
return;
|
||||
@@ -403,59 +403,8 @@ void func_80028FA0(s32 arg0) {
|
||||
D_8011B0FC = arg0;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80028FAC.s")
|
||||
|
||||
#if 1
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80029658.s")
|
||||
#else
|
||||
|
||||
extern s32 D_8011D384;
|
||||
|
||||
func_80029658(s32 arg0, s32 arg1){
|
||||
unk800DC918_04 *sp_ac;
|
||||
void *sp_78;
|
||||
u32 sp_70;
|
||||
u8 v0;
|
||||
|
||||
sp_ac = D_800DC918->unk04 + arg0;
|
||||
if(D_8011D384){
|
||||
sp_78 = func_800B9228(sp_ac);
|
||||
}
|
||||
else{
|
||||
sp_78 = NULL;
|
||||
}
|
||||
|
||||
if(arg1){
|
||||
v0 = sp_ac->unk40;
|
||||
sp_70 = sp_ac->unk20;
|
||||
}
|
||||
else{
|
||||
v0 = 0;
|
||||
sp_70 = sp_ac->unk20;
|
||||
}
|
||||
|
||||
if(v0 > sp_70)
|
||||
return;
|
||||
|
||||
for(i = v0; i <= sp_70; i++){
|
||||
if(sp_ac->unk0C[i].unk08 & 0x100)
|
||||
break;
|
||||
|
||||
if(sp_ac->unk0C[i].unk00 == 255){
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
|
||||
if((sp_ac->unk0C[i].unk08 | 0xa) & 0x10 == 0
|
||||
|| (sp_ac->unk0C[i].unk08 | 0xa) & 0x800 == 0
|
||||
){
|
||||
//$s1 = (sp_ac->unk0C[i].unk08 | 0xa) | D_8011B0FC;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/render_level_geometry_and_objects.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/render_level_segment.s")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80029AF8.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80029D14.s")
|
||||
@@ -592,7 +541,7 @@ void func_8002D30C(unk8002D30C_a0* arg0, u32 arg1){
|
||||
}
|
||||
#endif
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_8002D384.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/render_floor_decal.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_8002D670.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_8002D8DC.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_8002DE30.s")
|
||||
|
||||
+123
-4
@@ -59,10 +59,10 @@ s32 D_801262D4;
|
||||
s32 D_801262D8;
|
||||
s32 D_801262DC;
|
||||
s32 D_801262E0;
|
||||
s32 D_801262E4;
|
||||
s8 D_801262E4;
|
||||
s32 D_801262E8[8];
|
||||
s8 D_80126308;
|
||||
s8 D_80126309;
|
||||
u8 D_80126309;
|
||||
s32 D_8012630C;
|
||||
s32 D_80126310;
|
||||
|
||||
@@ -89,7 +89,103 @@ s32 func_8007A520(void) {
|
||||
return (D_801262B8[D_801262C8] << 16) | D_801262B0[D_801262C8];
|
||||
}
|
||||
|
||||
#if 0
|
||||
void func_8007A550(void) {
|
||||
s32 temp_t2;
|
||||
s32 temp_t4;
|
||||
s32 phi_v1;
|
||||
? *phi_a0;
|
||||
? *phi_a0_2;
|
||||
? *phi_a0_3;
|
||||
|
||||
if (osTvType == 0) {
|
||||
phi_v1 = 0xE;
|
||||
} else {
|
||||
phi_v1 = 0;
|
||||
if (osTvType == 2) {
|
||||
phi_v1 = 0x1C;
|
||||
}
|
||||
}
|
||||
switch(D_801262CC & 7) {
|
||||
case 0:
|
||||
osViSetMode((phi_v1 * 0x50) + &D_800E3900, 2);
|
||||
break;
|
||||
case 1:
|
||||
if (osTvType == 0) {
|
||||
phi_a0 = &D_800E4670;
|
||||
} else {
|
||||
phi_a0 = &D_800E4620;
|
||||
if (2 == osTvType) {
|
||||
phi_a0 = &D_800E46C0;
|
||||
}
|
||||
}
|
||||
memory_copy(phi_a0, &D_80126260, 0x50);
|
||||
if (osTvType == 0) {
|
||||
temp_t2 = D_80126260.unk30 - 0x180000;
|
||||
temp_t4 = D_80126260.unk44 - 0x180000;
|
||||
D_80126260.unk30 = temp_t2;
|
||||
D_80126260.unk44 = temp_t4;
|
||||
D_80126260.unk30 = temp_t2 + 0x18;
|
||||
D_80126260.unk44 = temp_t4 + 0x18;
|
||||
}
|
||||
osViSetMode(&D_80126260, &D_80126260);
|
||||
break;
|
||||
case 2:
|
||||
if (osTvType == 0) {
|
||||
phi_a0_2 = &D_800E4670;
|
||||
} else {
|
||||
phi_a0_2 = &D_800E4620;
|
||||
if (2 == osTvType) {
|
||||
phi_a0_2 = &D_800E46C0;
|
||||
}
|
||||
}
|
||||
memory_copy(phi_a0_2, &D_80126260, 0x50);
|
||||
D_80126260.unk8 = 0x280;
|
||||
D_80126260.unk20 = 0x400;
|
||||
D_80126260.unk28 = 0x500;
|
||||
D_80126260.unk3C = 0x500;
|
||||
osViSetMode(&D_80126260, &D_80126260);
|
||||
break;
|
||||
case 3:
|
||||
if (osTvType == 0) {
|
||||
phi_a0_3 = &D_800E4760;
|
||||
} else {
|
||||
phi_a0_3 = &D_800E4710;
|
||||
if (2 == osTvType) {
|
||||
phi_a0_3 = &D_800E47B0;
|
||||
}
|
||||
}
|
||||
memory_copy(phi_a0_3, &D_80126260, 0x50);
|
||||
D_80126260.unk8 = 0x280;
|
||||
D_80126260.unk20 = 0x400;
|
||||
D_80126260.unk28 = 0x500;
|
||||
D_80126260.unk3C = 0x500;
|
||||
osViSetMode(&D_80126260, &D_80126260);
|
||||
break;
|
||||
case 4:
|
||||
osViSetMode((phi_v1 * 0x50) + 0x280 + &D_800E3900, 2);
|
||||
break;
|
||||
case 5:
|
||||
osViSetMode((phi_v1 * 0x50) + 0x320 + &D_800E3900, 2);
|
||||
break;
|
||||
case 6:
|
||||
osViSetMode((phi_v1 * 0x50) + 0x2D0 + &D_800E3900, 2);
|
||||
break;
|
||||
case 7:
|
||||
osViSetMode((phi_v1 * 0x50) + 0x370 + &D_800E3900, 2);
|
||||
break;
|
||||
}
|
||||
osViSetSpecialFeatures(0x10);
|
||||
osViSetSpecialFeatures(0x40);
|
||||
osViSetSpecialFeatures(2);
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007A550.s")
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007A7E8.s")
|
||||
|
||||
void func_8007A974(void) {
|
||||
@@ -98,6 +194,29 @@ void func_8007A974(void) {
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007A98C.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007AB24.s")
|
||||
|
||||
void func_8007AB24(s8 arg0) {
|
||||
D_801262E4 = arg0;
|
||||
}
|
||||
|
||||
// Unused?
|
||||
s32 func_8007AB34(void) {
|
||||
return (s32)((f32)D_80126170 / (f32)D_80126309);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007AB9C.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007ABFC.s")
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc issues
|
||||
// They made their own worse version of memcpy, despite the fact that they already had bcopy?
|
||||
void memory_copy(u8 *src, u8 *dst, s32 numBytes) {
|
||||
s32 i;
|
||||
for(i = 0; i < numBytes; i++){
|
||||
dst[i] = src[i];
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_07AF10/memory_copy.s")
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
for (const auto & entry : fs::directory_iterator(baseromsDirectory)){
|
||||
std::string filename = entry.path().string();
|
||||
if(ends_with_rom_extension(filename)) {
|
||||
//if(ends_with_rom_extension(filename)) {
|
||||
roms.push_back(ROM(filename));
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
bool completedAnExtraction = false;
|
||||
|
||||
Reference in New Issue
Block a user