* WIP

* WIP

* WIP func_80078190

* Do some minor documenting and cleanup in sched.c

* Restart func_80078190 and check in the WIP

* Get func_80078190 back to something looking presentable

* WIP render_texture_rectangle_scaled

* Just about matched render_texture_rectangle_scaled

* Match render_texture_rectangle_scaled

* Minor documenting and cleanup

* Minor cleanup

* Cleanup

* Some documenting

* Match func_8006ECFC

* Move some function definitions

* Match func_8006EFDC

* Minor documentation updates

* NAme some functions, and do some documneting on fade transitons

---------

Co-authored-by: Ryan Myers <foldor@gmail.com>
This commit is contained in:
Ryan Myers
2023-02-17 10:04:49 -05:00
committed by GitHub
co-authored by Ryan Myers
parent d57f879dbd
commit 98d3be1b8f
19 changed files with 366 additions and 822 deletions
-182
View File
@@ -1,182 +0,0 @@
glabel func_8006ECFC
/* 06F8FC 8006ECFC 3C028012 */ lui $v0, %hi(D_8012350C) # $v0, 0x8012
/* 06F900 8006ED00 2442350C */ addiu $v0, %lo(D_8012350C) # addiu $v0, $v0, 0x350c
/* 06F904 8006ED04 8C4E0000 */ lw $t6, ($v0)
/* 06F908 8006ED08 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 06F90C 8006ED0C AFBF001C */ sw $ra, 0x1c($sp)
/* 06F910 8006ED10 AFB10018 */ sw $s1, 0x18($sp)
/* 06F914 8006ED14 AFB00014 */ sw $s0, 0x14($sp)
/* 06F918 8006ED18 108E007D */ beq $a0, $t6, .L8006EF10
/* 06F91C 8006ED1C 00802825 */ move $a1, $a0
/* 06F920 8006ED20 AC440000 */ sw $a0, ($v0)
/* 06F924 8006ED24 00002025 */ move $a0, $zero
/* 06F928 8006ED28 0C01C42C */ jal set_free_queue_state
/* 06F92C 8006ED2C AFA50048 */ sw $a1, 0x48($sp)
/* 06F930 8006ED30 3C118012 */ lui $s1, %hi(gDisplayLists) # $s1, 0x8012
/* 06F934 8006ED34 263111F0 */ addiu $s1, %lo(gDisplayLists) # addiu $s1, $s1, 0x11f0
/* 06F938 8006ED38 8E240000 */ lw $a0, ($s1)
/* 06F93C 8006ED3C 0C01C450 */ jal free_from_memory_pool
/* 06F940 8006ED40 00000000 */ nop
/* 06F944 8006ED44 8E240004 */ lw $a0, 4($s1)
/* 06F948 8006ED48 0C01C450 */ jal free_from_memory_pool
/* 06F94C 8006ED4C 00000000 */ nop
/* 06F950 8006ED50 8FA20048 */ lw $v0, 0x48($sp)
/* 06F954 8006ED54 3C18800E */ lui $t8, %hi(gNumHudTrisPerPlayer) # $t8, 0x800e
/* 06F958 8006ED58 2718D3E0 */ addiu $t8, %lo(gNumHudTrisPerPlayer) # addiu $t8, $t8, -0x2c20
/* 06F95C 8006ED5C 3C19800E */ lui $t9, %hi(gNumF3dCmdsPerPlayer) # $t9, 0x800e
/* 06F960 8006ED60 00027880 */ sll $t7, $v0, 2
/* 06F964 8006ED64 01F84021 */ addu $t0, $t7, $t8
/* 06F968 8006ED68 2739D3B0 */ addiu $t9, %lo(gNumF3dCmdsPerPlayer) # addiu $t9, $t9, -0x2c50
/* 06F96C 8006ED6C 01F91821 */ addu $v1, $t7, $t9
/* 06F970 8006ED70 3C0C800E */ lui $t4, %hi(gNumHudMatPerPlayer) # $t4, 0x800e
/* 06F974 8006ED74 3C0D800E */ lui $t5, %hi(gNumHudVertsPerPlayer) # $t5, 0x800e
/* 06F978 8006ED78 8C780000 */ lw $t8, ($v1)
/* 06F97C 8006ED7C 8D0E0000 */ lw $t6, ($t0)
/* 06F980 8006ED80 25ADD3C0 */ addiu $t5, %lo(gNumHudVertsPerPlayer) # addiu $t5, $t5, -0x2c40
/* 06F984 8006ED84 258CD3D0 */ addiu $t4, %lo(gNumHudMatPerPlayer) # addiu $t4, $t4, -0x2c30
/* 06F988 8006ED88 01EC3821 */ addu $a3, $t7, $t4
/* 06F98C 8006ED8C 01ED4821 */ addu $t1, $t7, $t5
/* 06F990 8006ED90 0018C8C0 */ sll $t9, $t8, 3
/* 06F994 8006ED94 000E7900 */ sll $t7, $t6, 4
/* 06F998 8006ED98 01F96021 */ addu $t4, $t7, $t9
/* 06F99C 8006ED9C 8D2F0000 */ lw $t7, ($t1)
/* 06F9A0 8006EDA0 8CED0000 */ lw $t5, ($a3)
/* 06F9A4 8006EDA4 000FC880 */ sll $t9, $t7, 2
/* 06F9A8 8006EDA8 032FC821 */ addu $t9, $t9, $t7
/* 06F9AC 8006EDAC 000D7180 */ sll $t6, $t5, 6
/* 06F9B0 8006EDB0 018EC021 */ addu $t8, $t4, $t6
/* 06F9B4 8006EDB4 0019C840 */ sll $t9, $t9, 1
/* 06F9B8 8006EDB8 03198021 */ addu $s0, $t8, $t9
/* 06F9BC 8006EDBC 8E250000 */ lw $a1, ($s1)
/* 06F9C0 8006EDC0 3C06FF00 */ lui $a2, (0xFF0000FF >> 16) # lui $a2, 0xff00
/* 06F9C4 8006EDC4 34C600FF */ ori $a2, (0xFF0000FF & 0xFFFF) # ori $a2, $a2, 0xff
/* 06F9C8 8006EDC8 02002025 */ move $a0, $s0
/* 06F9CC 8006EDCC AFA90020 */ sw $t1, 0x20($sp)
/* 06F9D0 8006EDD0 AFA70028 */ sw $a3, 0x28($sp)
/* 06F9D4 8006EDD4 AFA3002C */ sw $v1, 0x2c($sp)
/* 06F9D8 8006EDD8 0C01C3BE */ jal allocate_at_address_in_main_pool
/* 06F9DC 8006EDDC AFA80024 */ sw $t0, 0x24($sp)
/* 06F9E0 8006EDE0 8E250004 */ lw $a1, 4($s1)
/* 06F9E4 8006EDE4 3C06FFFF */ lui $a2, (0xFFFF00FF >> 16) # lui $a2, 0xffff
/* 06F9E8 8006EDE8 AE220000 */ sw $v0, ($s1)
/* 06F9EC 8006EDEC 34C600FF */ ori $a2, (0xFFFF00FF & 0xFFFF) # ori $a2, $a2, 0xff
/* 06F9F0 8006EDF0 0C01C3BE */ jal allocate_at_address_in_main_pool
/* 06F9F4 8006EDF4 02002025 */ move $a0, $s0
/* 06F9F8 8006EDF8 8E300000 */ lw $s0, ($s1)
/* 06F9FC 8006EDFC AE220004 */ sw $v0, 4($s1)
/* 06FA00 8006EE00 12000003 */ beqz $s0, .L8006EE10
/* 06FA04 8006EE04 00000000 */ nop
/* 06FA08 8006EE08 14400012 */ bnez $v0, .L8006EE54
/* 06FA0C 8006EE0C 00402825 */ move $a1, $v0
.L8006EE10:
/* 06FA10 8006EE10 12000004 */ beqz $s0, .L8006EE24
/* 06FA14 8006EE14 00000000 */ nop
/* 06FA18 8006EE18 0C01C450 */ jal free_from_memory_pool
/* 06FA1C 8006EE1C 02002025 */ move $a0, $s0
/* 06FA20 8006EE20 AE200000 */ sw $zero, ($s1)
.L8006EE24:
/* 06FA24 8006EE24 8E250004 */ lw $a1, 4($s1)
/* 06FA28 8006EE28 00000000 */ nop
/* 06FA2C 8006EE2C 10A00004 */ beqz $a1, .L8006EE40
/* 06FA30 8006EE30 00000000 */ nop
/* 06FA34 8006EE34 0C01C450 */ jal free_from_memory_pool
/* 06FA38 8006EE38 00A02025 */ move $a0, $a1
/* 06FA3C 8006EE3C AE200004 */ sw $zero, 4($s1)
.L8006EE40:
/* 06FA40 8006EE40 0C01BBF7 */ jal func_8006EFDC
/* 06FA44 8006EE44 00000000 */ nop
/* 06FA48 8006EE48 8E300000 */ lw $s0, ($s1)
/* 06FA4C 8006EE4C 8E250004 */ lw $a1, 4($s1)
/* 06FA50 8006EE50 00000000 */ nop
.L8006EE54:
/* 06FA54 8006EE54 8FAD002C */ lw $t5, 0x2c($sp)
/* 06FA58 8006EE58 8FAE0028 */ lw $t6, 0x28($sp)
/* 06FA5C 8006EE5C 8DA20000 */ lw $v0, ($t5)
/* 06FA60 8006EE60 3C018012 */ lui $at, %hi(gHudMatrices) # $at, 0x8012
/* 06FA64 8006EE64 000218C0 */ sll $v1, $v0, 3
/* 06FA68 8006EE68 00706021 */ addu $t4, $v1, $s0
/* 06FA6C 8006EE6C 3C0A8012 */ lui $t2, %hi(gHudMatrices) # $t2, 0x8012
/* 06FA70 8006EE70 AC2C1200 */ sw $t4, %lo(gHudMatrices)($at)
/* 06FA74 8006EE74 8DC60000 */ lw $a2, ($t6)
/* 06FA78 8006EE78 254A1200 */ addiu $t2, %lo(gHudMatrices) # addiu $t2, $t2, 0x1200
/* 06FA7C 8006EE7C 8D4F0000 */ lw $t7, ($t2)
/* 06FA80 8006EE80 00063980 */ sll $a3, $a2, 6
/* 06FA84 8006EE84 8FB90024 */ lw $t9, 0x24($sp)
/* 06FA88 8006EE88 3C018012 */ lui $at, %hi(gHudTriangles) # $at, 0x8012
/* 06FA8C 8006EE8C 00EFC021 */ addu $t8, $a3, $t7
/* 06FA90 8006EE90 3C0B8012 */ lui $t3, %hi(gHudTriangles) # $t3, 0x8012
/* 06FA94 8006EE94 AC381220 */ sw $t8, %lo(gHudTriangles)($at)
/* 06FA98 8006EE98 8F280000 */ lw $t0, ($t9)
/* 06FA9C 8006EE9C 256B1220 */ addiu $t3, %lo(gHudTriangles) # addiu $t3, $t3, 0x1220
/* 06FAA0 8006EEA0 8D6D0000 */ lw $t5, ($t3)
/* 06FAA4 8006EEA4 00084900 */ sll $t1, $t0, 4
/* 06FAA8 8006EEA8 3C018012 */ lui $at, %hi(gHudVertices) # $at, 0x8012
/* 06FAAC 8006EEAC 012D6021 */ addu $t4, $t1, $t5
/* 06FAB0 8006EEB0 AC2C1210 */ sw $t4, %lo(gHudVertices)($at)
/* 06FAB4 8006EEB4 3C018012 */ lui $at, %hi(gHudMatrices+4) # $at, 0x8012
/* 06FAB8 8006EEB8 00657021 */ addu $t6, $v1, $a1
/* 06FABC 8006EEBC AC2E1204 */ sw $t6, %lo(gHudMatrices+4)($at)
/* 06FAC0 8006EEC0 8D4F0004 */ lw $t7, 4($t2)
/* 06FAC4 8006EEC4 3C018012 */ lui $at, %hi(gHudTriangles+4) # $at, 0x8012
/* 06FAC8 8006EEC8 00EFC021 */ addu $t8, $a3, $t7
/* 06FACC 8006EECC AC381224 */ sw $t8, %lo(gHudTriangles+4)($at)
/* 06FAD0 8006EED0 8D790004 */ lw $t9, 4($t3)
/* 06FAD4 8006EED4 3C018012 */ lui $at, %hi(gHudVertices+4) # $at, 0x8012
/* 06FAD8 8006EED8 01396821 */ addu $t5, $t1, $t9
/* 06FADC 8006EEDC AC2D1214 */ sw $t5, %lo(gHudVertices+4)($at)
/* 06FAE0 8006EEE0 3C018012 */ lui $at, %hi(gCurrNumF3dCmdsPerPlayer) # $at, 0x8012
/* 06FAE4 8006EEE4 AC223528 */ sw $v0, %lo(gCurrNumF3dCmdsPerPlayer)($at)
/* 06FAE8 8006EEE8 3C018012 */ lui $at, %hi(gCurrNumHudMatPerPlayer) # $at, 0x8012
/* 06FAEC 8006EEEC AC26352C */ sw $a2, %lo(gCurrNumHudMatPerPlayer)($at)
/* 06FAF0 8006EEF0 8FAC0020 */ lw $t4, 0x20($sp)
/* 06FAF4 8006EEF4 3C018012 */ lui $at, %hi(gCurrNumHudTrisPerPlayer) # $at, 0x8012
/* 06FAF8 8006EEF8 AC283530 */ sw $t0, %lo(gCurrNumHudTrisPerPlayer)($at)
/* 06FAFC 8006EEFC 8D8E0000 */ lw $t6, ($t4)
/* 06FB00 8006EF00 3C018012 */ lui $at, %hi(gCurrNumHudVertsPerPlayer) # $at, 0x8012
/* 06FB04 8006EF04 24040002 */ li $a0, 2
/* 06FB08 8006EF08 0C01C42C */ jal set_free_queue_state
/* 06FB0C 8006EF0C AC2E3534 */ sw $t6, %lo(gCurrNumHudVertsPerPlayer)($at)
.L8006EF10:
/* 06FB10 8006EF10 3C038012 */ lui $v1, %hi(gSPTaskNum) # $v1, 0x8012
/* 06FB14 8006EF14 8C6334E8 */ lw $v1, %lo(gSPTaskNum)($v1)
/* 06FB18 8006EF18 3C118012 */ lui $s1, %hi(gDisplayLists) # $s1, 0x8012
/* 06FB1C 8006EF1C 263111F0 */ addiu $s1, %lo(gDisplayLists) # addiu $s1, $s1, 0x11f0
/* 06FB20 8006EF20 00037880 */ sll $t7, $v1, 2
/* 06FB24 8006EF24 022FC021 */ addu $t8, $s1, $t7
/* 06FB28 8006EF28 8F190000 */ lw $t9, ($t8)
/* 06FB2C 8006EF2C 3C048012 */ lui $a0, %hi(gCurrDisplayList) # $a0, 0x8012
/* 06FB30 8006EF30 248411F8 */ addiu $a0, %lo(gCurrDisplayList) # addiu $a0, $a0, 0x11f8
/* 06FB34 8006EF34 3C0D8012 */ lui $t5, %hi(gHudMatrices) # $t5, 0x8012
/* 06FB38 8006EF38 01AF6821 */ addu $t5, $t5, $t7
/* 06FB3C 8006EF3C AC990000 */ sw $t9, ($a0)
/* 06FB40 8006EF40 8DAD1200 */ lw $t5, %lo(gHudMatrices)($t5)
/* 06FB44 8006EF44 3C0C8012 */ lui $t4, %hi(gHudTriangles) # $t4, 0x8012
/* 06FB48 8006EF48 3C018012 */ lui $at, %hi(gGameCurrMatrix) # $at, 0x8012
/* 06FB4C 8006EF4C 018F6021 */ addu $t4, $t4, $t7
/* 06FB50 8006EF50 8D8C1220 */ lw $t4, %lo(gHudTriangles)($t4)
/* 06FB54 8006EF54 3C0E8012 */ lui $t6, %hi(gHudVertices) # $t6, 0x8012
/* 06FB58 8006EF58 AC2D1208 */ sw $t5, %lo(gGameCurrMatrix)($at)
/* 06FB5C 8006EF5C 3C018012 */ lui $at, %hi(gGameCurrTriList) # $at, 0x8012
/* 06FB60 8006EF60 01CF7021 */ addu $t6, $t6, $t7
/* 06FB64 8006EF64 8DCE1210 */ lw $t6, %lo(gHudVertices)($t6)
/* 06FB68 8006EF68 AC2C1228 */ sw $t4, %lo(gGameCurrTriList)($at)
/* 06FB6C 8006EF6C 3C018012 */ lui $at, %hi(gGameCurrVertexList) # $at, 0x8012
/* 06FB70 8006EF70 AC2E1218 */ sw $t6, %lo(gGameCurrVertexList)($at)
/* 06FB74 8006EF74 8C820000 */ lw $v0, ($a0)
/* 06FB78 8006EF78 3C18E900 */ lui $t8, 0xe900
/* 06FB7C 8006EF7C 244F0008 */ addiu $t7, $v0, 8
/* 06FB80 8006EF80 AC8F0000 */ sw $t7, ($a0)
/* 06FB84 8006EF84 AC400004 */ sw $zero, 4($v0)
/* 06FB88 8006EF88 AC580000 */ sw $t8, ($v0)
/* 06FB8C 8006EF8C 8C820000 */ lw $v0, ($a0)
/* 06FB90 8006EF90 3C0DB800 */ lui $t5, 0xb800
/* 06FB94 8006EF94 24590008 */ addiu $t9, $v0, 8
/* 06FB98 8006EF98 AC990000 */ sw $t9, ($a0)
/* 06FB9C 8006EF9C AC400004 */ sw $zero, 4($v0)
/* 06FBA0 8006EFA0 AC4D0000 */ sw $t5, ($v0)
/* 06FBA4 8006EFA4 8FBF001C */ lw $ra, 0x1c($sp)
/* 06FBA8 8006EFA8 8FB10018 */ lw $s1, 0x18($sp)
/* 06FBAC 8006EFAC 8FB00014 */ lw $s0, 0x14($sp)
/* 06FBB0 8006EFB0 03E00008 */ jr $ra
/* 06FBB4 8006EFB4 27BD0048 */ addiu $sp, $sp, 0x48
-91
View File
@@ -1,91 +0,0 @@
glabel func_8006EFDC
/* 06FBDC 8006EFDC 3C0F800E */ lui $t7, %hi(gNumHudTrisPerPlayer+12) # $t7, 0x800e
/* 06FBE0 8006EFE0 3C19800E */ lui $t9, %hi(gNumF3dCmdsPerPlayer+12) # $t9, 0x800e
/* 06FBE4 8006EFE4 3C0D800E */ lui $t5, %hi(gNumHudVertsPerPlayer+12) # $t5, 0x800e
/* 06FBE8 8006EFE8 8DADD3CC */ lw $t5, %lo(gNumHudVertsPerPlayer+12)($t5)
/* 06FBEC 8006EFEC 8F39D3BC */ lw $t9, %lo(gNumF3dCmdsPerPlayer+12)($t9)
/* 06FBF0 8006EFF0 8DEFD3EC */ lw $t7, %lo(gNumHudTrisPerPlayer+12)($t7)
/* 06FBF4 8006EFF4 240E0003 */ li $t6, 3
/* 06FBF8 8006EFF8 3C018012 */ lui $at, %hi(D_8012350C) # $at, 0x8012
/* 06FBFC 8006EFFC 3C0A800E */ lui $t2, %hi(gNumHudMatPerPlayer+12) # $t2, 0x800e
/* 06FC00 8006F000 8D4AD3DC */ lw $t2, %lo(gNumHudMatPerPlayer+12)($t2)
/* 06FC04 8006F004 AC2E350C */ sw $t6, %lo(D_8012350C)($at)
/* 06FC08 8006F008 000D7080 */ sll $t6, $t5, 2
/* 06FC0C 8006F00C 001940C0 */ sll $t0, $t9, 3
/* 06FC10 8006F010 000FC100 */ sll $t8, $t7, 4
/* 06FC14 8006F014 03084821 */ addu $t1, $t8, $t0
/* 06FC18 8006F018 01CD7021 */ addu $t6, $t6, $t5
/* 06FC1C 8006F01C 000A5980 */ sll $t3, $t2, 6
/* 06FC20 8006F020 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 06FC24 8006F024 012B6021 */ addu $t4, $t1, $t3
/* 06FC28 8006F028 000E7040 */ sll $t6, $t6, 1
/* 06FC2C 8006F02C AFBF0014 */ sw $ra, 0x14($sp)
/* 06FC30 8006F030 018E2021 */ addu $a0, $t4, $t6
/* 06FC34 8006F034 3C05FF00 */ lui $a1, (0xFF0000FF >> 16) # lui $a1, 0xff00
/* 06FC38 8006F038 34A500FF */ ori $a1, (0xFF0000FF & 0xFFFF) # ori $a1, $a1, 0xff
/* 06FC3C 8006F03C 0C01C327 */ jal allocate_from_main_pool_safe
/* 06FC40 8006F040 AFA40018 */ sw $a0, 0x18($sp)
/* 06FC44 8006F044 3C038012 */ lui $v1, %hi(gDisplayLists) # $v1, 0x8012
/* 06FC48 8006F048 246311F0 */ addiu $v1, %lo(gDisplayLists) # addiu $v1, $v1, 0x11f0
/* 06FC4C 8006F04C AC620000 */ sw $v0, ($v1)
/* 06FC50 8006F050 3C0F800E */ lui $t7, %hi(gNumF3dCmdsPerPlayer+12) # $t7, 0x800e
/* 06FC54 8006F054 8DEFD3BC */ lw $t7, %lo(gNumF3dCmdsPerPlayer+12)($t7)
/* 06FC58 8006F058 3C0A800E */ lui $t2, %hi(gNumHudMatPerPlayer+12) # $t2, 0x800e
/* 06FC5C 8006F05C 3C0D800E */ lui $t5, %hi(gNumHudVertsPerPlayer+12) # $t5, 0x800e
/* 06FC60 8006F060 8D4AD3DC */ lw $t2, %lo(gNumHudMatPerPlayer+12)($t2)
/* 06FC64 8006F064 8DADD3CC */ lw $t5, %lo(gNumHudVertsPerPlayer+12)($t5)
/* 06FC68 8006F068 000FC8C0 */ sll $t9, $t7, 3
/* 06FC6C 8006F06C 03224021 */ addu $t0, $t9, $v0
/* 06FC70 8006F070 3C018012 */ lui $at, %hi(gHudMatrices) # $at, 0x8012
/* 06FC74 8006F074 AC281200 */ sw $t0, %lo(gHudMatrices)($at)
/* 06FC78 8006F078 000A4980 */ sll $t1, $t2, 6
/* 06FC7C 8006F07C 000D6080 */ sll $t4, $t5, 2
/* 06FC80 8006F080 01285821 */ addu $t3, $t1, $t0
/* 06FC84 8006F084 3C018012 */ lui $at, %hi(gHudVertices) # $at, 0x8012
/* 06FC88 8006F088 018D6021 */ addu $t4, $t4, $t5
/* 06FC8C 8006F08C AC2B1210 */ sw $t3, %lo(gHudVertices)($at)
/* 06FC90 8006F090 000C6040 */ sll $t4, $t4, 1
/* 06FC94 8006F094 8FA40018 */ lw $a0, 0x18($sp)
/* 06FC98 8006F098 018B7021 */ addu $t6, $t4, $t3
/* 06FC9C 8006F09C 3C018012 */ lui $at, %hi(gHudTriangles) # $at, 0x8012
/* 06FCA0 8006F0A0 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff
/* 06FCA4 8006F0A4 AC2E1220 */ sw $t6, %lo(gHudTriangles)($at)
/* 06FCA8 8006F0A8 0C01C327 */ jal allocate_from_main_pool_safe
/* 06FCAC 8006F0AC 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff
/* 06FCB0 8006F0B0 3C04800E */ lui $a0, %hi(gNumF3dCmdsPerPlayer+12) # $a0, 0x800e
/* 06FCB4 8006F0B4 8C84D3BC */ lw $a0, %lo(gNumF3dCmdsPerPlayer+12)($a0)
/* 06FCB8 8006F0B8 3C05800E */ lui $a1, %hi(gNumHudMatPerPlayer+12) # $a1, 0x800e
/* 06FCBC 8006F0BC 3C06800E */ lui $a2, %hi(gNumHudVertsPerPlayer+12) # $a2, 0x800e
/* 06FCC0 8006F0C0 8CC6D3CC */ lw $a2, %lo(gNumHudVertsPerPlayer+12)($a2)
/* 06FCC4 8006F0C4 8CA5D3DC */ lw $a1, %lo(gNumHudMatPerPlayer+12)($a1)
/* 06FCC8 8006F0C8 3C038012 */ lui $v1, %hi(gDisplayLists) # $v1, 0x8012
/* 06FCCC 8006F0CC 246311F0 */ addiu $v1, %lo(gDisplayLists) # addiu $v1, $v1, 0x11f0
/* 06FCD0 8006F0D0 000478C0 */ sll $t7, $a0, 3
/* 06FCD4 8006F0D4 AC620004 */ sw $v0, 4($v1)
/* 06FCD8 8006F0D8 01E2C021 */ addu $t8, $t7, $v0
/* 06FCDC 8006F0DC 3C018012 */ lui $at, %hi(gHudMatrices+4) # $at, 0x8012
/* 06FCE0 8006F0E0 AC381204 */ sw $t8, %lo(gHudMatrices+4)($at)
/* 06FCE4 8006F0E4 00064080 */ sll $t0, $a2, 2
/* 06FCE8 8006F0E8 00055180 */ sll $t2, $a1, 6
/* 06FCEC 8006F0EC 01584821 */ addu $t1, $t2, $t8
/* 06FCF0 8006F0F0 3C018012 */ lui $at, %hi(gHudVertices+4) # $at, 0x8012
/* 06FCF4 8006F0F4 01064021 */ addu $t0, $t0, $a2
/* 06FCF8 8006F0F8 AC291214 */ sw $t1, %lo(gHudVertices+4)($at)
/* 06FCFC 8006F0FC 00084040 */ sll $t0, $t0, 1
/* 06FD00 8006F100 01096821 */ addu $t5, $t0, $t1
/* 06FD04 8006F104 3C018012 */ lui $at, %hi(gHudTriangles+4) # $at, 0x8012
/* 06FD08 8006F108 AC2D1224 */ sw $t5, %lo(gHudTriangles+4)($at)
/* 06FD0C 8006F10C 3C018012 */ lui $at, %hi(gCurrNumF3dCmdsPerPlayer) # $at, 0x8012
/* 06FD10 8006F110 AC243528 */ sw $a0, %lo(gCurrNumF3dCmdsPerPlayer)($at)
/* 06FD14 8006F114 3C018012 */ lui $at, %hi(gCurrNumHudMatPerPlayer) # $at, 0x8012
/* 06FD18 8006F118 3C0C800E */ lui $t4, %hi(gNumHudTrisPerPlayer+12) # $t4, 0x800e
/* 06FD1C 8006F11C 8D8CD3EC */ lw $t4, %lo(gNumHudTrisPerPlayer+12)($t4)
/* 06FD20 8006F120 AC25352C */ sw $a1, %lo(gCurrNumHudMatPerPlayer)($at)
/* 06FD24 8006F124 3C018012 */ lui $at, %hi(gCurrNumHudTrisPerPlayer) # $at, 0x8012
/* 06FD28 8006F128 8FBF0014 */ lw $ra, 0x14($sp)
/* 06FD2C 8006F12C AC2C3530 */ sw $t4, %lo(gCurrNumHudTrisPerPlayer)($at)
/* 06FD30 8006F130 3C018012 */ lui $at, %hi(gCurrNumHudVertsPerPlayer) # $at, 0x8012
/* 06FD34 8006F134 27BD0020 */ addiu $sp, $sp, 0x20
/* 06FD38 8006F138 03E00008 */ jr $ra
/* 06FD3C 8006F13C AC263534 */ sw $a2, %lo(gCurrNumHudVertsPerPlayer)($at)
@@ -1,430 +0,0 @@
glabel render_texture_rectangle_scaled
/* 079900 80078D00 27BDFF50 */ addiu $sp, $sp, -0xb0
/* 079904 80078D04 AFBF003C */ sw $ra, 0x3c($sp)
/* 079908 80078D08 AFB20020 */ sw $s2, 0x20($sp)
/* 07990C 80078D0C AFB00018 */ sw $s0, 0x18($sp)
/* 079910 80078D10 00808025 */ move $s0, $a0
/* 079914 80078D14 00A09025 */ move $s2, $a1
/* 079918 80078D18 AFBE0038 */ sw $fp, 0x38($sp)
/* 07991C 80078D1C AFB70034 */ sw $s7, 0x34($sp)
/* 079920 80078D20 AFB60030 */ sw $s6, 0x30($sp)
/* 079924 80078D24 AFB5002C */ sw $s5, 0x2c($sp)
/* 079928 80078D28 AFB40028 */ sw $s4, 0x28($sp)
/* 07992C 80078D2C AFB30024 */ sw $s3, 0x24($sp)
/* 079930 80078D30 AFB1001C */ sw $s1, 0x1c($sp)
/* 079934 80078D34 AFA600B8 */ sw $a2, 0xb8($sp)
/* 079938 80078D38 0C01E948 */ jal get_video_width_and_height_as_s32
/* 07993C 80078D3C AFA700BC */ sw $a3, 0xbc($sp)
/* 079940 80078D40 8FA900C8 */ lw $t1, 0xc8($sp)
/* 079944 80078D44 240100FF */ li $at, 255
/* 079948 80078D48 312E00FF */ andi $t6, $t1, 0xff
/* 07994C 80078D4C 15C10009 */ bne $t6, $at, .L80078D74
/* 079950 80078D50 8FA800CC */ lw $t0, 0xcc($sp)
/* 079954 80078D54 8FA800CC */ lw $t0, 0xcc($sp)
/* 079958 80078D58 3C0E800E */ lui $t6, %hi(dTextureRectangleScaledOpa) # $t6, 0x800e
/* 07995C 80078D5C 311800FF */ andi $t8, $t0, 0xff
/* 079960 80078D60 0018C900 */ sll $t9, $t8, 4
/* 079964 80078D64 25CEE6A8 */ addiu $t6, %lo(dTextureRectangleScaledOpa) # addiu $t6, $t6, -0x1958
/* 079968 80078D68 10000007 */ b .L80078D88
/* 07996C 80078D6C 032E3821 */ addu $a3, $t9, $t6
/* 079970 80078D70 8FA800CC */ lw $t0, 0xcc($sp)
.L80078D74:
/* 079974 80078D74 3C0E800E */ lui $t6, %hi(dTextureRectangleScaledXlu) # $t6, 0x800e
/* 079978 80078D78 311800FF */ andi $t8, $t0, 0xff
/* 07997C 80078D7C 0018C900 */ sll $t9, $t8, 4
/* 079980 80078D80 25CEE6E8 */ addiu $t6, %lo(dTextureRectangleScaledXlu) # addiu $t6, $t6, -0x1918
/* 079984 80078D84 032E3821 */ addu $a3, $t9, $t6
.L80078D88:
/* 079988 80078D88 8E040000 */ lw $a0, ($s0)
/* 07998C 80078D8C C7A000C0 */ lwc1 $f0, 0xc0($sp)
/* 079990 80078D90 248F0008 */ addiu $t7, $a0, 8
/* 079994 80078D94 AE0F0000 */ sw $t7, ($s0)
/* 079998 80078D98 3C19800E */ lui $t9, %hi(D_800DE670) # $t9, 0x800e
/* 07999C 80078D9C 2739E670 */ addiu $t9, %lo(D_800DE670) # addiu $t9, $t9, -0x1990
/* 0799A0 80078DA0 3C180600 */ lui $t8, 0x600
/* 0799A4 80078DA4 AC980000 */ sw $t8, ($a0)
/* 0799A8 80078DA8 AC990004 */ sw $t9, 4($a0)
/* 0799AC 80078DAC 8E050000 */ lw $a1, ($s0)
/* 0799B0 80078DB0 3C014080 */ li $at, 0x40800000 # 4.000000
/* 0799B4 80078DB4 44816000 */ mtc1 $at, $f12
/* 0799B8 80078DB8 24AE0008 */ addiu $t6, $a1, 8
/* 0799BC 80078DBC AE0E0000 */ sw $t6, ($s0)
/* 0799C0 80078DC0 3C018000 */ lui $at, 0x8000
/* 0799C4 80078DC4 3C0F0702 */ lui $t7, (0x07020010 >> 16) # lui $t7, 0x702
/* 0799C8 80078DC8 35EF0010 */ ori $t7, (0x07020010 & 0xFFFF) # ori $t7, $t7, 0x10
/* 0799CC 80078DCC 00E1C021 */ addu $t8, $a3, $at
/* 0799D0 80078DD0 ACB80004 */ sw $t8, 4($a1)
/* 0799D4 80078DD4 ACAF0000 */ sw $t7, ($a1)
/* 0799D8 80078DD8 8E060000 */ lw $a2, ($s0)
/* 0799DC 80078DDC 3C0EFA00 */ lui $t6, 0xfa00
/* 0799E0 80078DE0 24D90008 */ addiu $t9, $a2, 8
/* 0799E4 80078DE4 AE190000 */ sw $t9, ($s0)
/* 0799E8 80078DE8 460C0002 */ mul.s $f0, $f0, $f12
/* 0799EC 80078DEC ACC90004 */ sw $t1, 4($a2)
/* 0799F0 80078DF0 ACCE0000 */ sw $t6, ($a2)
/* 0799F4 80078DF4 C7A200C4 */ lwc1 $f2, 0xc4($sp)
/* 0799F8 80078DF8 8E5F0000 */ lw $ra, ($s2)
/* 0799FC 80078DFC 460C1082 */ mul.s $f2, $f2, $f12
/* 079A00 80078E00 13E00137 */ beqz $ra, .L800792E0
/* 079A04 80078E04 3C014080 */ li $at, 0x40800000 # 4.000000
/* 079A08 80078E08 C7A400B8 */ lwc1 $f4, 0xb8($sp)
/* 079A0C 80078E0C 44813000 */ mtc1 $at, $f6
/* 079A10 80078E10 C7B000BC */ lwc1 $f16, 0xbc($sp)
/* 079A14 80078E14 46062202 */ mul.s $f8, $f4, $f6
/* 079A18 80078E18 304FFFFF */ andi $t7, $v0, 0xffff
/* 079A1C 80078E1C 02408825 */ move $s1, $s2
/* 079A20 80078E20 000FC080 */ sll $t8, $t7, 2
/* 079A24 80078E24 4459F800 */ cfc1 $t9, $31
/* 079A28 80078E28 8FB20080 */ lw $s2, 0x80($sp)
/* 079A2C 80078E2C 37210003 */ ori $at, $t9, 3
/* 079A30 80078E30 38210002 */ xori $at, $at, 2
/* 079A34 80078E34 44C1F800 */ ctc1 $at, $31
/* 079A38 80078E38 3C014080 */ li $at, 0x40800000 # 4.000000
/* 079A3C 80078E3C 460042A4 */ cvt.w.s $f10, $f8
/* 079A40 80078E40 44819000 */ mtc1 $at, $f18
/* 079A44 80078E44 44D9F800 */ ctc1 $t9, $31
/* 079A48 80078E48 44175000 */ mfc1 $s7, $f10
/* 079A4C 80078E4C 46128102 */ mul.s $f4, $f16, $f18
/* 079A50 80078E50 8FB3007C */ lw $s3, 0x7c($sp)
/* 079A54 80078E54 AFB80044 */ sw $t8, 0x44($sp)
/* 079A58 80078E58 31151000 */ andi $s5, $t0, 0x1000
/* 079A5C 80078E5C 444EF800 */ cfc1 $t6, $31
/* 079A60 80078E60 31162000 */ andi $s6, $t0, 0x2000
/* 079A64 80078E64 35C10003 */ ori $at, $t6, 3
/* 079A68 80078E68 38210002 */ xori $at, $at, 2
/* 079A6C 80078E6C 44C1F800 */ ctc1 $at, $31
/* 079A70 80078E70 00000000 */ nop
/* 079A74 80078E74 460021A4 */ cvt.w.s $f6, $f4
/* 079A78 80078E78 44CEF800 */ ctc1 $t6, $31
/* 079A7C 80078E7C 441E3000 */ mfc1 $fp, $f6
/* 079A80 80078E80 00000000 */ nop
.L80078E84:
/* 079A84 80078E84 16A00012 */ bnez $s5, .L80078ED0
/* 079A88 80078E88 00000000 */ nop
/* 079A8C 80078E8C 862F0004 */ lh $t7, 4($s1)
/* 079A90 80078E90 00000000 */ nop
/* 079A94 80078E94 448F4000 */ mtc1 $t7, $f8
/* 079A98 80078E98 00000000 */ nop
/* 079A9C 80078E9C 468042A0 */ cvt.s.w $f10, $f8
/* 079AA0 80078EA0 46005402 */ mul.s $f16, $f10, $f0
/* 079AA4 80078EA4 4458F800 */ cfc1 $t8, $31
/* 079AA8 80078EA8 00000000 */ nop
/* 079AAC 80078EAC 37010003 */ ori $at, $t8, 3
/* 079AB0 80078EB0 38210002 */ xori $at, $at, 2
/* 079AB4 80078EB4 44C1F800 */ ctc1 $at, $31
/* 079AB8 80078EB8 00000000 */ nop
/* 079ABC 80078EBC 460084A4 */ cvt.w.s $f18, $f16
/* 079AC0 80078EC0 44199000 */ mfc1 $t9, $f18
/* 079AC4 80078EC4 44D8F800 */ ctc1 $t8, $31
/* 079AC8 80078EC8 10000022 */ b .L80078F54
/* 079ACC 80078ECC 03375821 */ addu $t3, $t9, $s7
.L80078ED0:
/* 079AD0 80078ED0 862E0004 */ lh $t6, 4($s1)
/* 079AD4 80078ED4 93F90000 */ lbu $t9, ($ra)
/* 079AD8 80078ED8 448E2000 */ mtc1 $t6, $f4
/* 079ADC 80078EDC 44998000 */ mtc1 $t9, $f16
/* 079AE0 80078EE0 468021A0 */ cvt.s.w $f6, $f4
/* 079AE4 80078EE4 46003202 */ mul.s $f8, $f6, $f0
/* 079AE8 80078EE8 444FF800 */ cfc1 $t7, $31
/* 079AEC 80078EEC 00000000 */ nop
/* 079AF0 80078EF0 35E10003 */ ori $at, $t7, 3
/* 079AF4 80078EF4 38210002 */ xori $at, $at, 2
/* 079AF8 80078EF8 44C1F800 */ ctc1 $at, $31
/* 079AFC 80078EFC 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
/* 079B00 80078F00 460042A4 */ cvt.w.s $f10, $f8
/* 079B04 80078F04 44185000 */ mfc1 $t8, $f10
/* 079B08 80078F08 44CFF800 */ ctc1 $t7, $31
/* 079B0C 80078F0C 02F89023 */ subu $s2, $s7, $t8
/* 079B10 80078F10 07210004 */ bgez $t9, .L80078F24
/* 079B14 80078F14 468084A0 */ cvt.s.w $f18, $f16
/* 079B18 80078F18 44812000 */ mtc1 $at, $f4
/* 079B1C 80078F1C 00000000 */ nop
/* 079B20 80078F20 46049480 */ add.s $f18, $f18, $f4
.L80078F24:
/* 079B24 80078F24 46009182 */ mul.s $f6, $f18, $f0
/* 079B28 80078F28 444EF800 */ cfc1 $t6, $31
/* 079B2C 80078F2C 00000000 */ nop
/* 079B30 80078F30 35C10003 */ ori $at, $t6, 3
/* 079B34 80078F34 38210002 */ xori $at, $at, 2
/* 079B38 80078F38 44C1F800 */ ctc1 $at, $31
/* 079B3C 80078F3C 00000000 */ nop
/* 079B40 80078F40 46003224 */ cvt.w.s $f8, $f6
/* 079B44 80078F44 440F4000 */ mfc1 $t7, $f8
/* 079B48 80078F48 44CEF800 */ ctc1 $t6, $31
/* 079B4C 80078F4C 024F5823 */ subu $t3, $s2, $t7
/* 079B50 80078F50 00000000 */ nop
.L80078F54:
/* 079B54 80078F54 16C00012 */ bnez $s6, .L80078FA0
/* 079B58 80078F58 00000000 */ nop
/* 079B5C 80078F5C 86380006 */ lh $t8, 6($s1)
/* 079B60 80078F60 00000000 */ nop
/* 079B64 80078F64 44985000 */ mtc1 $t8, $f10
/* 079B68 80078F68 00000000 */ nop
/* 079B6C 80078F6C 46805420 */ cvt.s.w $f16, $f10
/* 079B70 80078F70 46028102 */ mul.s $f4, $f16, $f2
/* 079B74 80078F74 4459F800 */ cfc1 $t9, $31
/* 079B78 80078F78 00000000 */ nop
/* 079B7C 80078F7C 37210003 */ ori $at, $t9, 3
/* 079B80 80078F80 38210002 */ xori $at, $at, 2
/* 079B84 80078F84 44C1F800 */ ctc1 $at, $31
/* 079B88 80078F88 00000000 */ nop
/* 079B8C 80078F8C 460024A4 */ cvt.w.s $f18, $f4
/* 079B90 80078F90 440E9000 */ mfc1 $t6, $f18
/* 079B94 80078F94 44D9F800 */ ctc1 $t9, $31
/* 079B98 80078F98 10000022 */ b .L80079024
/* 079B9C 80078F9C 01DE5021 */ addu $t2, $t6, $fp
.L80078FA0:
/* 079BA0 80078FA0 862F0006 */ lh $t7, 6($s1)
/* 079BA4 80078FA4 93EE0001 */ lbu $t6, 1($ra)
/* 079BA8 80078FA8 448F3000 */ mtc1 $t7, $f6
/* 079BAC 80078FAC 448E2000 */ mtc1 $t6, $f4
/* 079BB0 80078FB0 46803220 */ cvt.s.w $f8, $f6
/* 079BB4 80078FB4 46024282 */ mul.s $f10, $f8, $f2
/* 079BB8 80078FB8 4458F800 */ cfc1 $t8, $31
/* 079BBC 80078FBC 00000000 */ nop
/* 079BC0 80078FC0 37010003 */ ori $at, $t8, 3
/* 079BC4 80078FC4 38210002 */ xori $at, $at, 2
/* 079BC8 80078FC8 44C1F800 */ ctc1 $at, $31
/* 079BCC 80078FCC 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
/* 079BD0 80078FD0 46005424 */ cvt.w.s $f16, $f10
/* 079BD4 80078FD4 44198000 */ mfc1 $t9, $f16
/* 079BD8 80078FD8 44D8F800 */ ctc1 $t8, $31
/* 079BDC 80078FDC 03D99823 */ subu $s3, $fp, $t9
/* 079BE0 80078FE0 05C10004 */ bgez $t6, .L80078FF4
/* 079BE4 80078FE4 468024A0 */ cvt.s.w $f18, $f4
/* 079BE8 80078FE8 44813000 */ mtc1 $at, $f6
/* 079BEC 80078FEC 00000000 */ nop
/* 079BF0 80078FF0 46069480 */ add.s $f18, $f18, $f6
.L80078FF4:
/* 079BF4 80078FF4 46029202 */ mul.s $f8, $f18, $f2
/* 079BF8 80078FF8 444FF800 */ cfc1 $t7, $31
/* 079BFC 80078FFC 00000000 */ nop
/* 079C00 80079000 35E10003 */ ori $at, $t7, 3
/* 079C04 80079004 38210002 */ xori $at, $at, 2
/* 079C08 80079008 44C1F800 */ ctc1 $at, $31
/* 079C0C 8007900C 00000000 */ nop
/* 079C10 80079010 460042A4 */ cvt.w.s $f10, $f8
/* 079C14 80079014 44185000 */ mfc1 $t8, $f10
/* 079C18 80079018 44CFF800 */ ctc1 $t7, $31
/* 079C1C 8007901C 02785023 */ subu $t2, $s3, $t8
/* 079C20 80079020 00000000 */ nop
.L80079024:
/* 079C24 80079024 8FB90044 */ lw $t9, 0x44($sp)
/* 079C28 80079028 00027403 */ sra $t6, $v0, 0x10
/* 079C2C 8007902C 0179082A */ slt $at, $t3, $t9
/* 079C30 80079030 102000A5 */ beqz $at, .L800792C8
/* 079C34 80079034 31CFFFFF */ andi $t7, $t6, 0xffff
/* 079C38 80079038 000FC080 */ sll $t8, $t7, 2
/* 079C3C 8007903C 0158082A */ slt $at, $t2, $t8
/* 079C40 80079040 102000A1 */ beqz $at, .L800792C8
/* 079C44 80079044 00000000 */ nop
/* 079C48 80079048 16A00015 */ bnez $s5, .L800790A0
/* 079C4C 8007904C 00000000 */ nop
/* 079C50 80079050 93F90000 */ lbu $t9, ($ra)
/* 079C54 80079054 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
/* 079C58 80079058 44998000 */ mtc1 $t9, $f16
/* 079C5C 8007905C 07210004 */ bgez $t9, .L80079070
/* 079C60 80079060 46808120 */ cvt.s.w $f4, $f16
/* 079C64 80079064 44813000 */ mtc1 $at, $f6
/* 079C68 80079068 00000000 */ nop
/* 079C6C 8007906C 46062100 */ add.s $f4, $f4, $f6
.L80079070:
/* 079C70 80079070 46002482 */ mul.s $f18, $f4, $f0
/* 079C74 80079074 444EF800 */ cfc1 $t6, $31
/* 079C78 80079078 00000000 */ nop
/* 079C7C 8007907C 35C10003 */ ori $at, $t6, 3
/* 079C80 80079080 38210002 */ xori $at, $at, 2
/* 079C84 80079084 44C1F800 */ ctc1 $at, $31
/* 079C88 80079088 00000000 */ nop
/* 079C8C 8007908C 46009224 */ cvt.w.s $f8, $f18
/* 079C90 80079090 440F4000 */ mfc1 $t7, $f8
/* 079C94 80079094 44CEF800 */ ctc1 $t6, $31
/* 079C98 80079098 01EB9021 */ addu $s2, $t7, $t3
/* 079C9C 8007909C 00000000 */ nop
.L800790A0:
/* 079CA0 800790A0 16C00015 */ bnez $s6, .L800790F8
/* 079CA4 800790A4 00000000 */ nop
/* 079CA8 800790A8 93F80001 */ lbu $t8, 1($ra)
/* 079CAC 800790AC 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
/* 079CB0 800790B0 44985000 */ mtc1 $t8, $f10
/* 079CB4 800790B4 07010004 */ bgez $t8, .L800790C8
/* 079CB8 800790B8 46805420 */ cvt.s.w $f16, $f10
/* 079CBC 800790BC 44813000 */ mtc1 $at, $f6
/* 079CC0 800790C0 00000000 */ nop
/* 079CC4 800790C4 46068400 */ add.s $f16, $f16, $f6
.L800790C8:
/* 079CC8 800790C8 46028102 */ mul.s $f4, $f16, $f2
/* 079CCC 800790CC 4459F800 */ cfc1 $t9, $31
/* 079CD0 800790D0 00000000 */ nop
/* 079CD4 800790D4 37210003 */ ori $at, $t9, 3
/* 079CD8 800790D8 38210002 */ xori $at, $at, 2
/* 079CDC 800790DC 44C1F800 */ ctc1 $at, $31
/* 079CE0 800790E0 00000000 */ nop
/* 079CE4 800790E4 460024A4 */ cvt.w.s $f18, $f4
/* 079CE8 800790E8 440E9000 */ mfc1 $t6, $f18
/* 079CEC 800790EC 44D9F800 */ ctc1 $t9, $31
/* 079CF0 800790F0 01CA9821 */ addu $s3, $t6, $t2
/* 079CF4 800790F4 00000000 */ nop
.L800790F8:
/* 079CF8 800790F8 1A400073 */ blez $s2, .L800792C8
/* 079CFC 800790FC 00000000 */ nop
/* 079D00 80079100 1A600071 */ blez $s3, .L800792C8
/* 079D04 80079104 0172082A */ slt $at, $t3, $s2
/* 079D08 80079108 1020006F */ beqz $at, .L800792C8
/* 079D0C 8007910C 0153082A */ slt $at, $t2, $s3
/* 079D10 80079110 1020006D */ beqz $at, .L800792C8
/* 079D14 80079114 00000000 */ nop
/* 079D18 80079118 93E30000 */ lbu $v1, ($ra)
/* 079D1C 8007911C 024BC023 */ subu $t8, $s2, $t3
/* 079D20 80079120 2463FFFF */ addiu $v1, $v1, -1
/* 079D24 80079124 00037B00 */ sll $t7, $v1, 0xc
/* 079D28 80079128 01F8001A */ div $zero, $t7, $t8
/* 079D2C 8007912C 32590FFF */ andi $t9, $s2, 0xfff
/* 079D30 80079130 17000002 */ bnez $t8, .L8007913C
/* 079D34 80079134 00000000 */ nop
/* 079D38 80079138 0007000D */ break 7
.L8007913C:
/* 079D3C 8007913C 2401FFFF */ li $at, -1
/* 079D40 80079140 17010004 */ bne $t8, $at, .L80079154
/* 079D44 80079144 3C018000 */ lui $at, 0x8000
/* 079D48 80079148 15E10002 */ bne $t7, $at, .L80079154
/* 079D4C 8007914C 00000000 */ nop
/* 079D50 80079150 0006000D */ break 6
.L80079154:
/* 079D54 80079154 3C01E400 */ lui $at, 0xe400
/* 079D58 80079158 00197300 */ sll $t6, $t9, 0xc
/* 079D5C 8007915C 01C17825 */ or $t7, $t6, $at
/* 079D60 80079160 32780FFF */ andi $t8, $s3, 0xfff
/* 079D64 80079164 01F8A025 */ or $s4, $t7, $t8
/* 079D68 80079168 93E40001 */ lbu $a0, 1($ra)
/* 079D6C 8007916C 00006825 */ move $t5, $zero
/* 079D70 80079170 026A7023 */ subu $t6, $s3, $t2
/* 079D74 80079174 00004025 */ move $t0, $zero
/* 079D78 80079178 000B7823 */ negu $t7, $t3
/* 079D7C 8007917C 00006012 */ mflo $t4
/* 079D80 80079180 12A00004 */ beqz $s5, .L80079194
/* 079D84 80079184 00000000 */ nop
/* 079D88 80079188 00036940 */ sll $t5, $v1, 5
/* 079D8C 8007918C 10000001 */ b .L80079194
/* 079D90 80079190 000C6023 */ negu $t4, $t4
.L80079194:
/* 079D94 80079194 2483FFFF */ addiu $v1, $a0, -1
/* 079D98 80079198 0003CB00 */ sll $t9, $v1, 0xc
/* 079D9C 8007919C 032E001A */ div $zero, $t9, $t6
/* 079DA0 800791A0 15C00002 */ bnez $t6, .L800791AC
/* 079DA4 800791A4 00000000 */ nop
/* 079DA8 800791A8 0007000D */ break 7
.L800791AC:
/* 079DAC 800791AC 2401FFFF */ li $at, -1
/* 079DB0 800791B0 15C10004 */ bne $t6, $at, .L800791C4
/* 079DB4 800791B4 3C018000 */ lui $at, 0x8000
/* 079DB8 800791B8 17210002 */ bne $t9, $at, .L800791C4
/* 079DBC 800791BC 00000000 */ nop
/* 079DC0 800791C0 0006000D */ break 6
.L800791C4:
/* 079DC4 800791C4 000A7023 */ negu $t6, $t2
/* 079DC8 800791C8 00003812 */ mflo $a3
/* 079DCC 800791CC 12C00004 */ beqz $s6, .L800791E0
/* 079DD0 800791D0 00000000 */ nop
/* 079DD4 800791D4 00034140 */ sll $t0, $v1, 5
/* 079DD8 800791D8 10000001 */ b .L800791E0
/* 079DDC 800791DC 00073823 */ negu $a3, $a3
.L800791E0:
/* 079DE0 800791E0 05610006 */ bgez $t3, .L800791FC
/* 079DE4 800791E4 00000000 */ nop
/* 079DE8 800791E8 01EC0019 */ multu $t7, $t4
/* 079DEC 800791EC 00005825 */ move $t3, $zero
/* 079DF0 800791F0 0000C012 */ mflo $t8
/* 079DF4 800791F4 0018C9C3 */ sra $t9, $t8, 7
/* 079DF8 800791F8 01B96821 */ addu $t5, $t5, $t9
.L800791FC:
/* 079DFC 800791FC 05410006 */ bgez $t2, .L80079218
/* 079E00 80079200 00000000 */ nop
/* 079E04 80079204 01C70019 */ multu $t6, $a3
/* 079E08 80079208 00005025 */ move $t2, $zero
/* 079E0C 8007920C 00007812 */ mflo $t7
/* 079E10 80079210 000FC1C3 */ sra $t8, $t7, 7
/* 079E14 80079214 01184021 */ addu $t0, $t0, $t8
.L80079218:
/* 079E18 80079218 8E030000 */ lw $v1, ($s0)
/* 079E1C 8007921C 3C010700 */ lui $at, 0x700
/* 079E20 80079220 24790008 */ addiu $t9, $v1, 8
/* 079E24 80079224 AE190000 */ sw $t9, ($s0)
/* 079E28 80079228 87E5000A */ lh $a1, 0xa($ra)
/* 079E2C 8007922C 00000000 */ nop
/* 079E30 80079230 30AE00FF */ andi $t6, $a1, 0xff
/* 079E34 80079234 000E7C00 */ sll $t7, $t6, 0x10
/* 079E38 80079238 0005C8C0 */ sll $t9, $a1, 3
/* 079E3C 8007923C 332EFFFF */ andi $t6, $t9, 0xffff
/* 079E40 80079240 01E1C025 */ or $t8, $t7, $at
/* 079E44 80079244 030E7825 */ or $t7, $t8, $t6
/* 079E48 80079248 AC6F0000 */ sw $t7, ($v1)
/* 079E4C 8007924C 8FF9000C */ lw $t9, 0xc($ra)
/* 079E50 80079250 3C018000 */ lui $at, 0x8000
/* 079E54 80079254 0321C021 */ addu $t8, $t9, $at
/* 079E58 80079258 AC780004 */ sw $t8, 4($v1)
/* 079E5C 8007925C 8E060000 */ lw $a2, ($s0)
/* 079E60 80079260 316F0FFF */ andi $t7, $t3, 0xfff
/* 079E64 80079264 24CE0008 */ addiu $t6, $a2, 8
/* 079E68 80079268 AE0E0000 */ sw $t6, ($s0)
/* 079E6C 8007926C 000FCB00 */ sll $t9, $t7, 0xc
/* 079E70 80079270 31580FFF */ andi $t8, $t2, 0xfff
/* 079E74 80079274 03387025 */ or $t6, $t9, $t8
/* 079E78 80079278 ACCE0004 */ sw $t6, 4($a2)
/* 079E7C 8007927C ACD40000 */ sw $s4, ($a2)
/* 079E80 80079280 8E090000 */ lw $t1, ($s0)
/* 079E84 80079284 3C19B300 */ lui $t9, 0xb300
/* 079E88 80079288 252F0008 */ addiu $t7, $t1, 8
/* 079E8C 8007928C AE0F0000 */ sw $t7, ($s0)
/* 079E90 80079290 310FFFFF */ andi $t7, $t0, 0xffff
/* 079E94 80079294 000D7400 */ sll $t6, $t5, 0x10
/* 079E98 80079298 AD390000 */ sw $t9, ($t1)
/* 079E9C 8007929C 01CFC825 */ or $t9, $t6, $t7
/* 079EA0 800792A0 AD390004 */ sw $t9, 4($t1)
/* 079EA4 800792A4 8E040000 */ lw $a0, ($s0)
/* 079EA8 800792A8 3C0EB200 */ lui $t6, 0xb200
/* 079EAC 800792AC 24980008 */ addiu $t8, $a0, 8
/* 079EB0 800792B0 AE180000 */ sw $t8, ($s0)
/* 079EB4 800792B4 30F8FFFF */ andi $t8, $a3, 0xffff
/* 079EB8 800792B8 000CCC00 */ sll $t9, $t4, 0x10
/* 079EBC 800792BC AC8E0000 */ sw $t6, ($a0)
/* 079EC0 800792C0 03387025 */ or $t6, $t9, $t8
/* 079EC4 800792C4 AC8E0004 */ sw $t6, 4($a0)
.L800792C8:
/* 079EC8 800792C8 8E3F0008 */ lw $ra, 8($s1)
/* 079ECC 800792CC 26310008 */ addiu $s1, $s1, 8
/* 079ED0 800792D0 17E0FEEC */ bnez $ra, .L80078E84
/* 079ED4 800792D4 00000000 */ nop
/* 079ED8 800792D8 AFB3007C */ sw $s3, 0x7c($sp)
/* 079EDC 800792DC AFB20080 */ sw $s2, 0x80($sp)
.L800792E0:
/* 079EE0 800792E0 8E030000 */ lw $v1, ($s0)
/* 079EE4 800792E4 3C19E700 */ lui $t9, 0xe700
/* 079EE8 800792E8 246F0008 */ addiu $t7, $v1, 8
/* 079EEC 800792EC AE0F0000 */ sw $t7, ($s0)
/* 079EF0 800792F0 AC600004 */ sw $zero, 4($v1)
/* 079EF4 800792F4 AC790000 */ sw $t9, ($v1)
/* 079EF8 800792F8 8E030000 */ lw $v1, ($s0)
/* 079EFC 800792FC 240FFFFF */ li $t7, -1
/* 079F00 80079300 24780008 */ addiu $t8, $v1, 8
/* 079F04 80079304 AE180000 */ sw $t8, ($s0)
/* 079F08 80079308 3C0EFA00 */ lui $t6, 0xfa00
/* 079F0C 8007930C AC6E0000 */ sw $t6, ($v1)
/* 079F10 80079310 AC6F0004 */ sw $t7, 4($v1)
/* 079F14 80079314 8FBF003C */ lw $ra, 0x3c($sp)
/* 079F18 80079318 8FBE0038 */ lw $fp, 0x38($sp)
/* 079F1C 8007931C 8FB70034 */ lw $s7, 0x34($sp)
/* 079F20 80079320 8FB60030 */ lw $s6, 0x30($sp)
/* 079F24 80079324 8FB5002C */ lw $s5, 0x2c($sp)
/* 079F28 80079328 8FB40028 */ lw $s4, 0x28($sp)
/* 079F2C 8007932C 8FB30024 */ lw $s3, 0x24($sp)
/* 079F30 80079330 8FB20020 */ lw $s2, 0x20($sp)
/* 079F34 80079334 8FB1001C */ lw $s1, 0x1c($sp)
/* 079F38 80079338 8FB00018 */ lw $s0, 0x18($sp)
/* 079F3C 8007933C 03E00008 */ jr $ra
/* 079F40 80079340 27BD00B0 */ addiu $sp, $sp, 0xb0
/* 079F44 80079344 00000000 */ nop
/* 079F48 80079348 00000000 */ nop
/* 079F4C 8007934C 00000000 */ nop
+16 -16
View File
@@ -137,33 +137,33 @@
/* IMMEDIATE commands: */
#define G_IMMFIRST -65
#define G_TRI1 (G_IMMFIRST-0)
#define G_CULLDL (G_IMMFIRST-1)
#define G_POPMTX (G_IMMFIRST-2)
#define G_MOVEWORD (G_IMMFIRST-3)
#define G_TEXTURE (G_IMMFIRST-4)
#define G_SETOTHERMODE_H (G_IMMFIRST-5)
#define G_SETOTHERMODE_L (G_IMMFIRST-6)
#define G_ENDDL (G_IMMFIRST-7)
#define G_SETGEOMETRYMODE (G_IMMFIRST-8)
#define G_CLEARGEOMETRYMODE (G_IMMFIRST-9)
#define G_LINE3D (G_IMMFIRST-10)
#define G_RDPHALF_1 (G_IMMFIRST-11)
#define G_RDPHALF_2 (G_IMMFIRST-12)
#define G_TRI1 (G_IMMFIRST-0) //0xBF
#define G_CULLDL (G_IMMFIRST-1) //0xBE
#define G_POPMTX (G_IMMFIRST-2) //0xBD
#define G_MOVEWORD (G_IMMFIRST-3) //0xBC
#define G_TEXTURE (G_IMMFIRST-4) //0xBB
#define G_SETOTHERMODE_H (G_IMMFIRST-5) //0xBA
#define G_SETOTHERMODE_L (G_IMMFIRST-6) //0xB9
#define G_ENDDL (G_IMMFIRST-7) //0xB8
#define G_SETGEOMETRYMODE (G_IMMFIRST-8) //0xB7
#define G_CLEARGEOMETRYMODE (G_IMMFIRST-9) //0xB6
#define G_LINE3D (G_IMMFIRST-10) //0xB5
#define G_RDPHALF_1 (G_IMMFIRST-11) //0xB4
#define G_RDPHALF_2 (G_IMMFIRST-12) //0xB3
#if (defined(F3DEX_GBI)||defined(F3DLP_GBI))
# define G_MODIFYVTX (G_IMMFIRST-13)
# define G_TRI2 (G_IMMFIRST-14)
# define G_BRANCH_Z (G_IMMFIRST-15)
# define G_LOAD_UCODE (G_IMMFIRST-16)
#else
# define G_RDPHALF_CONT (G_IMMFIRST-13)
# define G_RDPHALF_CONT (G_IMMFIRST-13) /*0xB2*/
#endif
/* We are overloading 2 of the immediate commands
to keep the byte alignment of dmem the same */
#define G_SPRITE2D_SCALEFLIP (G_IMMFIRST-1)
#define G_SPRITE2D_DRAW (G_IMMFIRST-2)
#define G_SPRITE2D_SCALEFLIP (G_IMMFIRST-1) //0xBE
#define G_SPRITE2D_DRAW (G_IMMFIRST-2) //0xBD
/* RDP commands: */
#define G_NOOP 0xc0 /* 0 */
+30 -32
View File
@@ -20,18 +20,18 @@
/************ .data ************/
s32 D_800DE730[] = { 0, 0 };
s32 D_800DE730[] = { OSMESG_SWAP_BUFFER, OSMESG_SWAP_BUFFER };
s32 gBootBlackoutMesg[] = { OSMESG_SWAP_BUFFER, MESG_SKIP_BUFFER_SWAP };
f32 D_800DE740 = 0;
f32 D_800DE744 = 0;
f32 D_800DE748 = 0;
f32 D_800DE74C = 0;
f32 gAudTaskTimer0 = 0;
f32 gAudTaskTimer1 = 0;
f32 gAudTaskTimer2 = 0;
f32 gAudTaskTimer3 = 0;
u32 gRetraceCounter32 = 0;
s32 gRetraceCounter32 = 0;
s32 gCurRSPTaskCounter = 0;
s32 gCurRDPTaskCounter = 0;
static u32 gUnusedVar = 0;
UNUSED s32 D_800DE75C = 0;
u64 gRetraceCounter64 = 0;
/*******************************/
@@ -63,9 +63,9 @@ const char D_800E7958[] = "\tdata_size\t\t= %u\n";
s32 gCurRSPTaskIsSet;
s32 gCurRDPTaskIsSet;
OSTime gYieldTime;
s32 D_80126120;
u32 gRSPAudTaskCount;
s32 D_80126128[18];
u32 gRSPAudTaskFlushTime;
u32 gRSPAudTaskDoneTime;
UNUSED s32 D_80126128[18];
/*******************************/
@@ -146,10 +146,10 @@ OSMesgQueue *osScGetInterruptQ(OSSched *sc) {
return &sc->interruptQ;
}
UNUSED void func_80079584(f32 *arg0, f32 *arg1, f32 *arg2) {
*arg0 = D_800DE740;
*arg1 = D_800DE748;
*arg2 = D_800DE74C;
UNUSED void scGetAudioTaskTimers(f32 *timer0, f32 *timer1, f32 *timer2) {
*timer0 = gAudTaskTimer0;
*timer1 = gAudTaskTimer2;
*timer2 = gAudTaskTimer3;
}
static void __scMain(void *arg) {
@@ -219,8 +219,8 @@ void func_80079760(OSSched *sc) {
}
}
void dummy_80079808() {}
void dummy_80079810() {}
UNUSED void dummy_80079808() {}
UNUSED void dummy_80079810() {}
void __scHandleRetrace(OSSched *sc) {
OSScTask *rspTask = NULL;
@@ -316,31 +316,29 @@ void __scHandleRetrace(OSSched *sc) {
}
}
//Keeping this defined here because it seems too specific to this function
#define OS_CPU_COUNTER_F (f32)(OS_CPU_COUNTER / 100.0f)
void __scHandleRSP(OSSched *sc) {
OSScTask *t, *sp = 0, *dp = 0;
s32 state;
s32 temp_hi;
t = sc->curRSPTask;
sc->curRSPTask = NULL;
//Rare seems to have edited this function, most specifically here.
//Still need to do better for a match, but this does work
//This should probably have all been behind a debug #ifdef as none of these values are used.
if (t->list.t.type == M_AUDTASK) {
gRSPAudTaskCount = osGetCount();
D_800DE74C = (f32) (((f32) (gRSPAudTaskCount - D_80126120) * 60.0f) / OS_CPU_COUNTER_F);
D_800DE744 = (f32) (D_800DE744 + D_800DE74C);
if (D_800DE740 < D_800DE74C) {
D_800DE740 = D_800DE74C;
gRSPAudTaskDoneTime = osGetCount();
gAudTaskTimer3 = ((gRSPAudTaskDoneTime - gRSPAudTaskFlushTime) * 60.0f) / (OS_CPU_COUNTER / 100);
gAudTaskTimer1 += gAudTaskTimer3;
if (gAudTaskTimer0 < gAudTaskTimer3) {
gAudTaskTimer0 = gAudTaskTimer3;
}
temp_hi = (s32) gRetraceCounter32 % 1000;
if ((temp_hi == 1) || (temp_hi == 2)) {
D_800DE748 = (f32) (D_800DE744 / 500.0f);
D_800DE744 = 0.0f;
D_800DE740 = 0.0f;
if ((gRetraceCounter32 % 1000 == 1) || (gRetraceCounter32 % 1000 == 2)) {
gAudTaskTimer2 = gAudTaskTimer1 / 500.0f;
gAudTaskTimer1 = 0.0f;
gAudTaskTimer0 = 0.0f;
}
}
@@ -463,7 +461,7 @@ void __scExec(OSSched *sc, OSScTask *sp, OSScTask *dp) {
if (sp) {
if (sp->list.t.type == M_AUDTASK) {
osWritebackDCacheAll(); /* flush the cache */
D_80126120 = osGetCount();
gRSPAudTaskFlushTime = osGetCount();
}
sp->state &= ~(OS_SC_YIELD | OS_SC_YIELDED);
+1 -1
View File
@@ -2,4 +2,4 @@
ASMFILE=$(find . -type f -name "*$1.s")
echo '#include "ctx.c"\n' > $1.c
python3 ../mips_to_c/m2c.py --target mips-ido-c --pointer-style right --context ctx.c -f $1 $ASMFILE >> $1.c
python3 ../m2c/m2c.py --target mips-ido-c --pointer-style right --context ctx.c -f $1 $ASMFILE >> $1.c
+2 -2
View File
@@ -250,9 +250,9 @@ s32 transition_begin(FadeTransition *transition) {
sTransitionFadeTimer = transition->duration;
D_800E31B8 = transition->duration;
sTransitionFlags = transition->unk6;
D_800E31BC = !(transition->type & 0x80);
D_800E31BC = !(transition->type & FADE_FLAG_UNK2);
gCurFadeTransition = transition->type & 0x3F;
D_800E31A8 = transition->type & 0x40;
D_800E31A8 = transition->type & FADE_FLAG_UNK1;
sLevelTransitionDelayTimer = 0;
if (!D_800E31BC && !sLevelTransitionDelayTimer) {
sLevelTransitionDelayTimer = 2;
+7 -1
View File
@@ -12,11 +12,17 @@
#define FADE_BARNDOOR_DIAGONAL 5
#define FADE_DISABLED 6
//Fade transiton flags live at the top two bits of the fade type.
#define FADE_FLAG_NONE 0
#define FADE_FLAG_UNK1 (1 << 6)
#define FADE_FLAG_UNK2 (1 << 7)
#define FADE_FLAG_BOTH (2 << 6)
#define FADE_COLOR(red, green, blue) red, green, blue
#define FADE_COLOR_BLACK FADE_COLOR(0, 0, 0)
#define FADE_COLOR_WHITE FADE_COLOR(255, 255, 255)
#define FADE_TRANSITION(type, color, duration, unk6) { type, color, duration, unk6 }
#define FADE_TRANSITION(type, flags, color, duration, unk6) { (type & 0x3F) | (flags & 0xC0), color, duration, unk6 }
enum TransitionStatus {
TRANSITION_LEVELSWAP = -1,
+85 -40
View File
@@ -106,15 +106,15 @@ s32 gNumHudVertsPerPlayer[4] = { 300, 600, 850, 900 };
s32 gNumHudMatPerPlayer[4] = { 300, 400, 550, 600 };
s32 gNumHudTrisPerPlayer[4] = { 20, 30, 40, 50 };
s8 gDrawFrameTimer = 0;
FadeTransition D_800DD3F4 = FADE_TRANSITION(128, FADE_COLOR_BLACK, 20, 0);
UNUSED FadeTransition D_800DD3FC = FADE_TRANSITION(0, FADE_COLOR_WHITE, 20, -1);
FadeTransition D_800DD3F4 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_UNK2, FADE_COLOR_BLACK, 20, 0);
UNUSED FadeTransition D_800DD3FC = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_WHITE, 20, -1);
s32 sLogicUpdateRate = LOGIC_5FPS;
FadeTransition D_800DD408 = FADE_TRANSITION(0, FADE_COLOR_WHITE, 30, -1);
FadeTransition D_800DD408 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_WHITE, 30, -1);
UNUSED char *D_800DD410[3] = {
(char *)sDebugCarString, (char *)sDebugHovercraftString, (char *)sDebugPlaneString
};
FadeTransition D_800DD41C = FADE_TRANSITION(0, FADE_COLOR_BLACK, 30, -1);
FadeTransition D_800DD424 = FADE_TRANSITION(0, FADE_COLOR_BLACK, 260, -1);
FadeTransition D_800DD41C = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 30, -1);
FadeTransition D_800DD424 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 260, -1);
/*******************************/
/************ .bss ************/
@@ -933,7 +933,7 @@ void init_game(void) {
init_particle_assets();
func_800AB1F0();
calc_and_alloc_heap_for_settings();
func_8006EFDC();
default_alloc_heap_for_hud();
load_fonts();
init_controller_paks();
func_80081218();
@@ -1088,7 +1088,7 @@ void func_8006CAE4(s32 arg0, s32 arg1, Vehicle vehicle) {
* Needs a better name!
*/
void load_level_2(s32 levelId, s32 numberOfPlayers, s32 entranceId, Vehicle vehicleId) {
func_8006ECFC(numberOfPlayers);
calc_and_alloc_heap_for_hud(numberOfPlayers);
set_free_queue_state(0);
func_80065EA0();
func_800C3048();
@@ -1512,7 +1512,7 @@ UNUSED void set_render_context(s32 changeTo) {
}
void load_menu_with_level_background(s32 menuId, s32 levelId, s32 cutsceneId) {
func_8006ECFC(0);
calc_and_alloc_heap_for_hud(0);
sRenderContext = DRAW_MENU;
D_801234F0 = 1;
set_sound_channel_volume(0, 32767);
@@ -1947,8 +1947,7 @@ void func_8006ECAC(s32 arg0) {
D_800DD37C = ((arg0 & 0x03) << 10) | 0x80;
}
/* Unused? */
void func_8006ECC4(void) {
UNUSED void func_8006ECC4(void) {
D_800DD37C |= 0x100;
}
@@ -1957,7 +1956,57 @@ void func_8006ECE0(void) {
D_800DD37C |= 0x200;
}
GLOBAL_ASM("asm/non_matchings/game/func_8006ECFC.s")
/**
* Allocates an amount of memory for the number of players passed in.
*/
void calc_and_alloc_heap_for_hud(s32 numberOfPlayers) {
s32 newVar;
s32 totalSize;
if (numberOfPlayers != D_8012350C) {
newVar = numberOfPlayers;
D_8012350C = newVar;
set_free_queue_state(0);
free_from_memory_pool(gDisplayLists[0]);
free_from_memory_pool(gDisplayLists[1]);
totalSize =
((gNumF3dCmdsPerPlayer[newVar] * sizeof(Gwords)))
+ ((gNumHudMatPerPlayer[newVar] * sizeof(Matrix)))
+ ((gNumHudVertsPerPlayer[newVar] * sizeof(Vertex)))
+ ((gNumHudTrisPerPlayer[newVar] * sizeof(Triangle)));
gDisplayLists[0] = (Gfx *) allocate_at_address_in_main_pool(totalSize, (u8 *) gDisplayLists[0], COLOUR_TAG_RED);
gDisplayLists[1] = (Gfx *) allocate_at_address_in_main_pool(totalSize, (u8 *) gDisplayLists[1], COLOUR_TAG_YELLOW);
if ((gDisplayLists[0] == NULL) || gDisplayLists[1] == NULL) {
if (gDisplayLists[0] != NULL) {
free_from_memory_pool(gDisplayLists[0]);
gDisplayLists[0] = NULL;
}
if (gDisplayLists[1] != NULL) {
free_from_memory_pool(gDisplayLists[1]);
gDisplayLists[1] = NULL;
}
default_alloc_heap_for_hud();
}
gHudMatrices[0] = (MatrixS *)((u8 *) gDisplayLists[0] + ((gNumF3dCmdsPerPlayer[newVar] * sizeof(Gwords))));
gHudTriangles[0] = (TriangleList *)((u8 *) gHudMatrices[0] + ((gNumHudMatPerPlayer[newVar] * sizeof(Matrix))));
gHudVertices[0] = (Vertex *)((u8 *) gHudTriangles[0] + ((gNumHudTrisPerPlayer[newVar] * sizeof(Triangle))));
gHudMatrices[1] = (MatrixS *)((u8 *) gDisplayLists[1] + ((gNumF3dCmdsPerPlayer[newVar] * sizeof(Gwords))));
gHudTriangles[1] = (TriangleList *)((u8 *) gHudMatrices[1] + ((gNumHudMatPerPlayer[newVar] * sizeof(Matrix))));
gHudVertices[1] = (Vertex *)((u8 *) gHudTriangles[1] + ((gNumHudTrisPerPlayer[newVar] * sizeof(Triangle))));
gCurrNumF3dCmdsPerPlayer = gNumF3dCmdsPerPlayer[newVar];
gCurrNumHudMatPerPlayer = gNumHudMatPerPlayer[newVar];
gCurrNumHudTrisPerPlayer = gNumHudTrisPerPlayer[newVar];
gCurrNumHudVertsPerPlayer = gNumHudVertsPerPlayer[newVar];
set_free_queue_state(2);
}
gCurrDisplayList = gDisplayLists[gSPTaskNum];
gGameCurrMatrix = gHudMatrices[gSPTaskNum];
gGameCurrTriList = gHudTriangles[gSPTaskNum];
gGameCurrVertexList = gHudVertices[gSPTaskNum];
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
}
/**
* Returns FALSE if dmem doesn't begin with a -1. This is checked on every main game loop iteration.
@@ -1969,38 +2018,35 @@ s32 check_dmem_validity(void) {
return TRUE;
}
#ifdef NON_EQUIVALENT
/**
* Defaults allocations for 4 players
*/
void default_alloc_heap_for_hud(void) {
s32 numberOfPlayers;
s32 totalSize;
// Not close to matching, but should be the same functionality-wise.
void func_8006EFDC(void) {
s32 size1, size2, size3, size4, totalSize;
numberOfPlayers = FOUR_PLAYERS;
D_8012350C = numberOfPlayers;
totalSize = (gNumF3dCmdsPerPlayer[numberOfPlayers] * sizeof(Gwords))
+ (gNumHudMatPerPlayer[numberOfPlayers] * sizeof(Matrix))
+ (gNumHudVertsPerPlayer[numberOfPlayers] * sizeof(Vertex))
+ (gNumHudTrisPerPlayer[numberOfPlayers] * sizeof(Triangle));
D_8012350C = 3;
gDisplayLists[0] = (Gfx *)allocate_from_main_pool_safe(totalSize, COLOUR_TAG_RED);
gHudMatrices[0] = (MatrixS *)((u8 *)gDisplayLists[0] + (gNumF3dCmdsPerPlayer[numberOfPlayers] * sizeof(Gwords)));
gHudVertices[0] = (Vertex *)((u8 *)gHudMatrices[0] + (gNumHudMatPerPlayer[numberOfPlayers] * sizeof(Matrix)));
gHudTriangles[0] = (TriangleList *)((u8 *)gHudVertices[0] + (gNumHudVertsPerPlayer[numberOfPlayers] * sizeof(Vertex)));
size1 = (gNumF3dCmdsPerPlayer[3] * sizeof(Gwords));
size2 = (gNumHudMatPerPlayer[3] * sizeof(Matrix));
size3 = (gNumHudVertsPerPlayer[3] * sizeof(Vertex));
size4 = (gNumHudTrisPerPlayer[3] * sizeof(Triangle));
totalSize = size1 + size2 + size3 + size4;
gDisplayLists[1] = (Gfx *)allocate_from_main_pool_safe(totalSize, COLOUR_TAG_YELLOW);
gHudMatrices[1] = (MatrixS *)((u8 *)gDisplayLists[1] + (gNumF3dCmdsPerPlayer[numberOfPlayers] * sizeof(Gwords)));
gHudVertices[1] = (Vertex *)((u8 *)gHudMatrices[1] + (gNumHudMatPerPlayer[numberOfPlayers] * sizeof(Matrix)));
gHudTriangles[1] = (TriangleList *)((u8 *)gHudVertices[1] + (gNumHudVertsPerPlayer[numberOfPlayers] * sizeof(Vertex)));
gDisplayLists[0] = (u8 *)allocate_from_main_pool_safe(totalSize, COLOUR_TAG_RED);
gHudMatrices[0] = (u8 *)gDisplayLists[0] + size1;
gHudVertices[0] = (u8 *)gHudMatrices[0] + size2;
gHudTriangles[0] = (u8 *)gHudVertices[0] + size3;
gDisplayLists[1] = (u8 *)allocate_from_main_pool_safe(totalSize, COLOUR_TAG_YELLOW);
gHudMatrices[1] = (u8 *)gDisplayLists[1] + size1;
gHudVertices[1] = (u8 *)gHudMatrices[1] + size2;
gHudTriangles[1] = (u8 *)gHudVertices[1] + size3;
gCurrNumF3dCmdsPerPlayer = gNumF3dCmdsPerPlayer[3];
gCurrNumHudMatPerPlayer = gNumHudMatPerPlayer[3];
gCurrNumHudTrisPerPlayer = gNumHudTrisPerPlayer[3];
gCurrNumHudVertsPerPlayer = gNumHudVertsPerPlayer[3];
gCurrNumF3dCmdsPerPlayer = gNumF3dCmdsPerPlayer[numberOfPlayers];
gCurrNumHudMatPerPlayer = gNumHudMatPerPlayer[numberOfPlayers];
gCurrNumHudTrisPerPlayer = gNumHudTrisPerPlayer[numberOfPlayers];
gCurrNumHudVertsPerPlayer = gNumHudVertsPerPlayer[numberOfPlayers];
}
#else
GLOBAL_ASM("asm/non_matchings/game/func_8006EFDC.s")
#endif
void func_8006F140(s32 arg0) {
if (gLevelLoadTimer == 0) {
@@ -2024,8 +2070,7 @@ void func_8006F140(s32 arg0) {
}
}
// Unused?
void func_8006F20C(void) {
UNUSED void func_8006F20C(void) {
if (gLevelLoadTimer == 0) {
transition_begin(&D_800DD41C);
gLevelLoadTimer = 40;
+3 -5
View File
@@ -116,12 +116,10 @@ s32 check_imem_validity(void);
void ingame_logic_loop(s32 updateRate);
void load_level(s32 levelId, s32 numberOfPlayers, s32 entranceId, Vehicle vehicleId, s32 cutsceneId);
void func_8006A6B0(void);
void calc_and_alloc_heap_for_hud(s32 numberOfPlayers);
void default_alloc_heap_for_hud(void);
//Non Matching
void func_8006ECFC(s32 numberOfPlayers);
void func_8006DCF8(s32 arg0);
void func_8006EFDC(void);
void func_8006A6B0(void);
void func_80010994(s32 updateRate);
void func_8006DCF8(s32 updateRate);
#endif
+11 -11
View File
@@ -372,11 +372,11 @@ s32 sMenuMusicVolume = 0x7F;
s32 sMenuGuiOpacity = 0xFF;
s32 D_800DF768 = 1;
FadeTransition sMenuTransitionFadeInFast = FADE_TRANSITION(0, FADE_COLOR_BLACK, 10, -1);
FadeTransition sMenuTransitionFadeIn = FADE_TRANSITION(0, FADE_COLOR_BLACK, 18, -1);
FadeTransition sMenuTransitionFadeOut = FADE_TRANSITION(0x80, FADE_COLOR_BLACK, 18, 0);
UNUSED FadeTransition sMenuTransitionFadeInWhite = FADE_TRANSITION(0, FADE_COLOR_WHITE, 18, -1);
UNUSED FadeTransition sMenuTransitionFadeOutWhite = FADE_TRANSITION(0x80, FADE_COLOR_WHITE, 18, 0);
FadeTransition sMenuTransitionFadeInFast = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 10, -1);
FadeTransition sMenuTransitionFadeIn = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 18, -1);
FadeTransition sMenuTransitionFadeOut = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_UNK2, FADE_COLOR_BLACK, 18, 0);
UNUSED FadeTransition sMenuTransitionFadeInWhite = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_WHITE, 18, -1);
UNUSED FadeTransition sMenuTransitionFadeOutWhite = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_UNK2, FADE_COLOR_WHITE, 18, 0);
s32 D_800DF794 = 4;
MenuElement *D_800DF798 = NULL;
@@ -1483,11 +1483,11 @@ s16 D_800E1DC8[16] = {
1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1
};
FadeTransition D_800E1DE8 = FADE_TRANSITION(0, FADE_COLOR_BLACK, 120, -1);
FadeTransition D_800E1DE8 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 120, -1);
char gRareCopyrightString[24] = "(C) COPYRIGHT RARE 1997";
FadeTransition D_800E1E08 = FADE_TRANSITION(0, FADE_COLOR_BLACK, 52, -1);
FadeTransition D_800E1E08 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 52, -1);
char *D_800E1E10 = " (ADV.";
@@ -2453,7 +2453,7 @@ void menu_title_screen_init(void) {
gIsInTracksMode = FALSE;
}
void func_8008377C(UNUSED s32 arg0, f32 arg1) {
void func_8008377C(UNUSED s32 updateRate, f32 arg1) {
UNUSED u32 foo[2];
s32 alpha;
f32 scale;
@@ -2509,7 +2509,7 @@ s32 menu_title_screen_loop(s32 updateRate) {
sp18 = get_active_camera_segment();
gOptionBlinkTimer = (gOptionBlinkTimer + updateRate) & 0x3F;
func_8008E4EC();
if (osTvType == 0) {
if (osTvType == TV_TYPE_PAL) {
sp1C = (f32) updateRate / 50.0f;
} else {
sp1C = (f32) updateRate / 60.0f;
@@ -7029,7 +7029,7 @@ void func_80094688(s32 arg0, s32 arg1) {
D_801263E0 = 8;
gMenuDelay = 100;
}
if (get_render_context()) {
if (get_render_context() != DRAW_GAME) {
D_801263E0 = 7;
}
reset_controller_sticks();
@@ -7056,7 +7056,7 @@ void func_80094688(s32 arg0, s32 arg1) {
D_80126BBC = 0;
}
D_80126BC0 = var_v1[2];
if (get_render_context() == 0) {
if (get_render_context() == DRAW_GAME) {
func_80078170(D_80126BB8, D_80126BBC, D_80126BC0);
}
camEnableUserView(0, 1);
+2 -2
View File
@@ -34,8 +34,8 @@
/************ .data ************/
// Unsure about the signed/unsigned with these arrays.
FadeTransition D_800DC970 = FADE_TRANSITION(0x40, FADE_COLOR_WHITE, 7, 3);
FadeTransition D_800DC978 = FADE_TRANSITION(0x00, FADE_COLOR_BLACK, 30, 0xFFFF);
FadeTransition D_800DC970 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_UNK1, FADE_COLOR_WHITE, 7, 3);
FadeTransition D_800DC978 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 30, 0xFFFF);
u16 D_800DC980[20] = {
0xFF00, 0x0100, 0x0000, 0xFFFF,
+1
View File
@@ -449,5 +449,6 @@ void func_8001E89C(void);
void func_800155B8(void);
void func_800230D0(Object*, Object_Racer*);
s32 func_8001955C(Object*, s8, u8, s16, s32, f32, f32*, f32*, f32*);
void func_80010994(s32 updateRate);
#endif
+2 -2
View File
@@ -146,7 +146,7 @@ s8 D_800DCDB0[16][2] = {
// Checksum count for obj_loop_goldenballoon
s32 gObjLoopGoldenBalloonChecksum = 0xA597;
FadeTransition gDoorFadeTransition = FADE_TRANSITION(0, FADE_COLOR_BLACK, 50, -1);
FadeTransition gDoorFadeTransition = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_NONE, FADE_COLOR_BLACK, 50, -1);
/*******************************/
@@ -2496,7 +2496,7 @@ void update_player_racer(Object *obj, s32 updateRate) {
playerIDF = -(f32) playerID;
CLAMP(tempRacer->velocity, playerIDF, playerID);
}
if (context != 1 || func_8000E148()) {
if (context != DRAW_MENU || func_8000E148()) {
func_800050D0(obj, gCurrentButtonsPressed, gCurrentRacerInput, updateRate);
}
lastCheckpointDist = tempRacer->checkpoint_distance;
+1 -1
View File
@@ -72,7 +72,7 @@ UNUSED void render_screen(Gfx **dlist, u8 *screenAddress) {
// Draw the texture.
gSPTextureRectangle((*dlist)++, 0, (y_pos << 2), SCREEN_WIDTH << 2,
((y_pos + SCREEN_HEIGHT_PART) << 2), 0, 0, 0, 1 << 12, 1 << 10);
((y_pos + SCREEN_HEIGHT_PART) << 2), G_TX_RENDERTILE, 0, 0, 1 << 12, 1 << 10);
// Advance to the next slice.
screenAddress += SCREEN_WIDTH * SCREEN_HEIGHT_PART * 2;
+201 -1
View File
@@ -504,13 +504,120 @@ void setup_gfx_mesg_queues(OSSched *sc) {
osCreateMesgQueue(&gGfxTaskMesgQueue, gGfxTaskMesgBuf, 8);
}
//Called after finishing a race. Sets values during single player races. Set to zero during trophy races.
void func_80078170(TextureHeader *arg0, TextureHeader *arg1, u32 arg2) {
D_800DE4C4 = arg0;
D_800DE4C8 = arg1;
D_800DE4C0 = arg2 << 2;
}
#ifdef NON_EQUIVALENT
//Seems to render the background screen after a race finishes while you're at the menu deciding what to do next.
//https://i.imgur.com/MHbUD2a.png is an example. The left is correct, and the right is incorrect rendering.
void func_80078190(Gfx **dlist) {
s32 texture1And2UpperHeight;
s32 videoHeight;
s32 videoWidth;
s32 upperVideoWidth;
s32 upperVideoHeight;
s32 texture1UpperWidth;
s32 texture1UpperHeight;
//s32 texture2UpperHeight;
s32 widthAndHeight;
s32 yPos;
s32 var_s3;
s32 uly; //the y-coordinate of upper-left corner of rectangle (10.2, 0.0~1023.75)
s32 ulx; //the y-coordinate of upper-left corner of rectangle (10.2, 0.0~1023.75)
s32 lry; //the y-coordinate of lower-right corner of rectangle (10.2, 0.0~1023.75)
s32 lrx; //the x-coordinate of lower-right corner of rectangle (10.2, 0.0~1023.75)
s32 t; //the texture coordinate t of upper-left corner of rectangle (s10.5)
s32 s; //the texture coordinate s of upper-left corner of rectangle (s10.5)
widthAndHeight = get_video_width_and_height_as_s32();
videoWidth = GET_VIDEO_WIDTH(widthAndHeight);
videoHeight = GET_VIDEO_HEIGHT(widthAndHeight);
gSPDisplayList((*dlist)++, D_800DE598);
if (D_800DE4C8 == NULL) {
gDkrDmaDisplayList((*dlist)++, OS_PHYSICAL_TO_K0(D_800DE4C4->cmd), D_800DE4C4->numberOfCommands);
upperVideoWidth = videoWidth << 2;
upperVideoHeight = videoHeight << 2;
texture1UpperWidth = D_800DE4C4->width << 2;
texture1UpperHeight = D_800DE4C4->height << 2;
var_s3 = 0;
for (yPos = 0; yPos < upperVideoHeight; yPos += texture1UpperHeight) {
uly = yPos;
lry = yPos + texture1UpperHeight;
ulx = -var_s3;
while (ulx < upperVideoWidth) {
lrx = ulx + texture1UpperWidth;
s = 0;
t = 0;
if (ulx < 0) {
s = -(ulx << 3);
gSPTextureRectangle((*dlist)++, 0, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
} else {
gSPTextureRectangle((*dlist)++, ulx, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
}
ulx = lrx;
}
var_s3 = (var_s3 + D_800DE4C0) & (texture1UpperWidth - 1);
}
} else {
gDkrDmaDisplayList((*dlist)++, OS_PHYSICAL_TO_K0(D_800DE4C4->cmd), D_800DE4C4->numberOfCommands);
upperVideoWidth = videoWidth << 2;
upperVideoHeight = videoHeight << 2;
texture1UpperWidth = D_800DE4C4->width << 2;
texture1UpperHeight = D_800DE4C4->height << 2;
//texture2UpperHeight = D_800DE4C8->height << 2;
texture1And2UpperHeight = (D_800DE4C8->height << 2) + texture1UpperHeight;
var_s3 = 0;
for (yPos = 0; yPos < upperVideoHeight; yPos += texture1And2UpperHeight) {
uly = yPos;
lry = yPos + texture1UpperHeight;
ulx = -var_s3;
while (ulx < upperVideoWidth) {
lrx = ulx + texture1UpperWidth;
s = 0;
t = 0;
if (ulx < 0) {
s = -(ulx << 3);
gSPTextureRectangle((*dlist)++, 0, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
} else {
gSPTextureRectangle((*dlist)++, ulx, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
}
ulx = lrx;
}
var_s3 = (var_s3 + D_800DE4C0) & (texture1UpperWidth - 1);
}
gDkrDmaDisplayList((*dlist)++, OS_PHYSICAL_TO_K0(D_800DE4C8->cmd), D_800DE4C8->numberOfCommands);
upperVideoWidth <<= 2;
upperVideoHeight <<= 2;
var_s3 = 0;
for (yPos = texture1UpperHeight; yPos < upperVideoHeight; yPos += texture1And2UpperHeight) {
uly = yPos;
lry = yPos + texture1And2UpperHeight;
ulx = -var_s3;
while (ulx < upperVideoWidth) {
lrx = ulx + texture1UpperWidth;
s = 0;
t = 0;
if (ulx < 0) {
s = -(ulx << 3);
gSPTextureRectangle((*dlist)++, 0, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
} else {
gSPTextureRectangle((*dlist)++, ulx, uly, lrx, lry, G_TX_RENDERTILE, s, t, 1024, 1024);
}
ulx = lrx;
}
var_s3 = (var_s3 + D_800DE4C0) & (texture1UpperWidth - 1);
}
}
gDPPipeSync((*dlist)++);
}
#else
GLOBAL_ASM("asm/non_matchings/unknown_078050/func_80078190.s")
#endif
/**
* Enables the chequer background and sets up its properties.
@@ -622,4 +729,97 @@ void render_textured_rectangle(Gfx **dList, DrawTexture *element, s32 xPos, s32
gDPSetPrimColor((*dList)++, 0, 0, 255, 255, 255, 255);
}
GLOBAL_ASM("asm/non_matchings/unknown_078050/render_texture_rectangle_scaled.s")
void render_texture_rectangle_scaled(Gfx **dlist, DrawTexture *element, f32 xPos, f32 yPos, f32 xScale, f32 yScale, u32 colour, s32 flags) {
TextureHeader *tex;
Gfx *dmaDlist;
s32 i;
s32 bFlipX;
s32 bFlipY;
s32 s; //the texture coordinate s of upper-left corner of rectangle (s10.5)
s32 t; //the texture coordinate t of upper-left corner of rectangle (s10.5)
s32 dsdx;//the change in s for each change in x (s5.10)
s32 dtdy;//the change in t for each change in y (s5.10)
s32 ulx; //the y-coordinate of upper-left corner of rectangle (10.2, 0.0~1023.75)
s32 uly; //the y-coordinate of upper-left corner of rectangle (10.2, 0.0~1023.75)
s32 lrx; //the x-coordinate of lower-right corner of rectangle (10.2, 0.0~1023.75)
s32 lry; //the y-coordinate of lower-right corner of rectangle (10.2, 0.0~1023.75)
s32 xPos4x;
s32 yPos4x;
s32 width;
s32 height;
height = get_video_width_and_height_as_s32();
width = GET_VIDEO_WIDTH(height) * 4;
height = (GET_VIDEO_HEIGHT(height) & 0xFFFF) * 4;
//If the colour is fully opaque
if ((colour & 0xFF) == 0xFF) {
dmaDlist = dTextureRectangleScaledOpa[(u8)flags & 0xFF];
} else {
dmaDlist = dTextureRectangleScaledXlu[(u8)flags & 0xFF];
}
gSPDisplayList((*dlist)++, D_800DE670);
gDkrDmaDisplayList((*dlist)++, OS_PHYSICAL_TO_K0(dmaDlist), numberOfGfxCommands(dTextureRectangleScaledOpa[0]));
gDPSetPrimColorRGBA((*dlist)++, colour);
bFlipX = flags & (1 << 12);
bFlipY = flags & (1 << 13);
xScale *= 4;
yScale *= 4;
xPos4x = xPos * 4;
yPos4x = yPos * 4;
for (i = 0; (tex = element[i].texture); i++) {
if (!bFlipX) {
ulx = (s32) (element[i].xOffset * xScale) + xPos4x;
} else {
lrx = xPos4x - (s32) (element[i].xOffset * xScale);
ulx = lrx - (s32) (tex->width * xScale);
}
if (!bFlipY) {
uly = (s32) (element[i].yOffset * yScale) + yPos4x;
} else {
lry = yPos4x - (s32) (element[i].yOffset * yScale);
uly = lry - (s32) (tex->height * yScale);
}
if (ulx < width && uly < height) {
if (!bFlipX) {
lrx = (s32) (tex->width * xScale) + ulx;
}
if (!bFlipY) {
lry = (s32) (tex->height * yScale) + uly;
}
if (lrx > 0 && lry > 0 && ulx < lrx && uly < lry) {
dsdx = ((tex->width - 1) << 12) / (lrx - ulx);
if (bFlipX) {
s = (tex->width - 1) << 5;
dsdx = -dsdx;
} else {
s = 0;
}
dtdy = ((tex->height - 1) << 12) / (lry - uly);
if (bFlipY) {
t = (tex->height - 1) << 5;
dtdy = -dtdy;
} else {
t = 0;
}
if (ulx < 0) {
s += (-ulx * dsdx) >> 7;
ulx = 0;
}
if (uly < 0) {
t += (-uly * dtdy) >> 7;
uly = 0;
}
gDkrDmaDisplayList((*dlist)++, OS_PHYSICAL_TO_K0(tex->cmd), tex->numberOfCommands);
gSPTextureRectangle((*dlist)++, ulx, uly, lrx, lry, G_TX_RENDERTILE, s, t, dsdx, dtdy);
}
}
}
gDPPipeSync((*dlist)++);
gDPSetPrimColor((*dlist)++, 0, 0, 255, 255, 255, 255);
}
+1 -2
View File
@@ -41,7 +41,6 @@ extern u8 sBackgroundPrimColourG;
extern u8 sBackgroundPrimColourB;
extern s32 sBackgroundFillColour;
extern u32 D_800DE4C0;
extern TextureHeader *D_800DE4C4;
extern TextureHeader *D_800DE4C8;
extern s32 gChecquerBGEnabled;
@@ -72,9 +71,9 @@ void render_textured_rectangle(Gfx **dlist, DrawTexture *img, s32 xPos, s32 yPos
void render_chequer_background(Gfx** dList);
void render_background(Gfx **dlist, Matrix *mtx, s32 drawBG);
void set_background_draw_function(void *arg0);
void render_texture_rectangle_scaled(Gfx **dlist, DrawTexture *element, f32 xPos, f32 yPos, f32 xScale, f32 yScale, u32 colour, s32 flags);
//Non Matching
void render_texture_rectangle_scaled(Gfx **dlist, DrawTexture *element, f32 x, f32 y, f32 x_scale, f32 y_scale, u32 color, s32 flip);
void func_80078190(Gfx **dlist);
#endif
+2 -2
View File
@@ -4,9 +4,9 @@
#include "types.h"
#include "structs.h"
//Takes a char pointer, the string to populate it with, and the length of that string.
//Compares two strings to check for equality
//Example:
//_bcmp(&gameName, "DKRACING-ADV", strlen("DKRACING-ADV"));
s32 _bcmp(u8 *stringToPopulate, char *string, u32 stringLen);
extern int _bcmp(const void *, const void *, int);
#endif
+1 -1
View File
@@ -140,7 +140,7 @@ s32 D_800E2C90 = 0;
s32 gWeatherSoundMask = 0;
FadeTransition D_800E2C98 = FADE_TRANSITION(0x40, FADE_COLOR_WHITE, 5, 2);
FadeTransition D_800E2C98 = FADE_TRANSITION(FADE_FULLSCREEN, FADE_FLAG_UNK1, FADE_COLOR_WHITE, 5, 2);
/*******************************/