1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-14 04:07:06 +00:00

Decompile Bg Jya Cobra (#588)

* Start work on Jya Cobra

* Match two functions

* Work on func_80896ABC

* func_80896CB4 and most of func_80896D78

* Fix func_80895BEC, clean up func_80896ABC

* Work on func_80896EE4

* Match func_80896EE4

* Nearly match func_80895A70, finish BgJyaCobra_Draw

* Match func_808969F8, start on func_80895C74

* Work on func_80895C74 and func_80895EF0, data move
Also ran permuter

* Some cleanup

* Almost match func_80895C74, tiny bit of work on func_80895EF0

* Remove variables in func_80895EF0

* Make init match nicer

* Work on func_80896518

* Progress in func_80896518

* Figured something out in func_80896518
Going to experiment with stack stuff

* func_80896518 has tiny stack and regalloc issues

* Work on func_80895EF0

* Some work on func_80895EF0

* Update diff script

* Work on func_90995EF0
Use 2d array indexing in func_80895EF0
Small regalloc improvement in func_80896518
Change not equal to to less than where possible

* match func_80896ABC and func_80896D78

* Improve func_80895EF0 a bit

* Do some cleanup

* Change commented out functions to ifdefs

* Another bit of cleanup

* Run formatter

* Remove now unused include

* Another another bit of cleanup

* Revert update to diff script

* PR suggestions

* PR comments

* PR comments, a bit of documentation

* Run formatter

* Apply suggestions from code review

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* More PR comments

* actor fixes

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
Blackop778 2021-01-21 08:55:11 -06:00 committed by GitHub
parent 70a3acf111
commit 3f669bea1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 689 additions and 1065 deletions

View file

@ -1,14 +0,0 @@
glabel BgJyaCobra_Destroy
/* 00FF8 808968E8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00FFC 808968EC AFA40018 */ sw $a0, 0x0018($sp)
/* 01000 808968F0 8FAE0018 */ lw $t6, 0x0018($sp)
/* 01004 808968F4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 01008 808968F8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 0100C 808968FC 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 01010 80896900 0C00FB56 */ jal DynaPoly_DeleteBgActor
## DynaPoly_DeleteBgActor
/* 01014 80896904 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
/* 01018 80896908 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0101C 8089690C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 01020 80896910 03E00008 */ jr $ra
/* 01024 80896914 00000000 */ nop

View file

@ -1,56 +0,0 @@
glabel BgJyaCobra_Draw
/* 018B8 808971A8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 018BC 808971AC AFB00014 */ sw $s0, 0x0014($sp)
/* 018C0 808971B0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 018C4 808971B4 AFBF001C */ sw $ra, 0x001C($sp)
/* 018C8 808971B8 AFB10018 */ sw $s1, 0x0018($sp)
/* 018CC 808971BC 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 018D0 808971C0 0C225B2D */ jal func_80896CB4
/* 018D4 808971C4 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 018D8 808971C8 3C050601 */ lui $a1, %hi(D_06010790) ## $a1 = 06010000
/* 018DC 808971CC 24A50790 */ addiu $a1, $a1, %lo(D_06010790) ## $a1 = 06010790
/* 018E0 808971D0 0C00D498 */ jal Gfx_DrawDListOpa
/* 018E4 808971D4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 018E8 808971D8 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 018EC 808971DC C606018C */ lwc1 $f6, 0x018C($s0) ## 0000018C
/* 018F0 808971E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 018F4 808971E4 4606203C */ c.lt.s $f4, $f6
/* 018F8 808971E8 00000000 */ nop
/* 018FC 808971EC 45020004 */ bc1fl .L80897200
/* 01900 808971F0 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 01904 808971F4 0C225B5E */ jal func_80896D78
/* 01908 808971F8 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 0190C 808971FC 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
.L80897200:
/* 01910 80897200 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 01914 80897204 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01918 80897208 31CF0003 */ andi $t7, $t6, 0x0003 ## $t7 = 00000000
/* 0191C 8089720C 15E1000E */ bne $t7, $at, .L80897248
/* 01920 80897210 00000000 */ nop
/* 01924 80897214 8E020118 */ lw $v0, 0x0118($s0) ## 00000118
/* 01928 80897218 5040000E */ beql $v0, $zero, .L80897254
/* 0192C 8089721C 8FBF001C */ lw $ra, 0x001C($sp)
/* 01930 80897220 9043015C */ lbu $v1, 0x015C($v0) ## 0000015C
/* 01934 80897224 30780004 */ andi $t8, $v1, 0x0004 ## $t8 = 00000000
/* 01938 80897228 13000009 */ beq $t8, $zero, .L80897250
/* 0193C 8089722C 30790001 */ andi $t9, $v1, 0x0001 ## $t9 = 00000000
/* 01940 80897230 13200007 */ beq $t9, $zero, .L80897250
/* 01944 80897234 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01948 80897238 0C225BB9 */ jal func_80896EE4
/* 0194C 8089723C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 01950 80897240 10000004 */ beq $zero, $zero, .L80897254
/* 01954 80897244 8FBF001C */ lw $ra, 0x001C($sp)
.L80897248:
/* 01958 80897248 0C225BB9 */ jal func_80896EE4
/* 0195C 8089724C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
.L80897250:
/* 01960 80897250 8FBF001C */ lw $ra, 0x001C($sp)
.L80897254:
/* 01964 80897254 8FB00014 */ lw $s0, 0x0014($sp)
/* 01968 80897258 8FB10018 */ lw $s1, 0x0018($sp)
/* 0196C 8089725C 03E00008 */ jr $ra
/* 01970 80897260 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 01974 80897264 00000000 */ nop
/* 01978 80897268 00000000 */ nop
/* 0197C 8089726C 00000000 */ nop

View file

@ -1,85 +0,0 @@
.rdata
glabel D_8089760C
.asciz "(jya )(arg_data 0x%04x)(act %x)(txt %x)(txt16 %x)\n"
.balign 4
.text
glabel BgJyaCobra_Init
/* 00EE4 808967D4 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00EE8 808967D8 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00EEC 808967DC AFB0001C */ sw $s0, 0x001C($sp)
/* 00EF0 808967E0 3C060601 */ lui $a2, %hi(D_0601167C) ## $a2 = 06010000
/* 00EF4 808967E4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00EF8 808967E8 AFB10020 */ sw $s1, 0x0020($sp)
/* 00EFC 808967EC AFA5002C */ sw $a1, 0x002C($sp)
/* 00F00 808967F0 24C6167C */ addiu $a2, $a2, %lo(D_0601167C) ## $a2 = 0601167C
/* 00F04 808967F4 0C22564F */ jal func_8089593C
/* 00F08 808967F8 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 00F0C 808967FC 3C058089 */ lui $a1, %hi(D_80897528) ## $a1 = 80890000
/* 00F10 80896800 24A57528 */ addiu $a1, $a1, %lo(D_80897528) ## $a1 = 80897528
/* 00F14 80896804 0C01E037 */ jal Actor_ProcessInitChain
/* 00F18 80896808 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00F1C 8089680C 8611001C */ lh $s1, 0x001C($s0) ## 0000001C
/* 00F20 80896810 8FA4002C */ lw $a0, 0x002C($sp)
/* 00F24 80896814 322E0003 */ andi $t6, $s1, 0x0003 ## $t6 = 00000000
/* 00F28 80896818 15C00009 */ bne $t6, $zero, .L80896840
/* 00F2C 8089681C 00112A03 */ sra $a1, $s1, 8
/* 00F30 80896820 0C00B2D0 */ jal Flags_GetSwitch
/* 00F34 80896824 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00F38 80896828 50400006 */ beql $v0, $zero, .L80896844
/* 00F3C 8089682C 860F001C */ lh $t7, 0x001C($s0) ## 0000001C
/* 00F40 80896830 A60000B6 */ sh $zero, 0x00B6($s0) ## 000000B6
/* 00F44 80896834 860200B6 */ lh $v0, 0x00B6($s0) ## 000000B6
/* 00F48 80896838 A6020016 */ sh $v0, 0x0016($s0) ## 00000016
/* 00F4C 8089683C A6020032 */ sh $v0, 0x0032($s0) ## 00000032
.L80896840:
/* 00F50 80896840 860F001C */ lh $t7, 0x001C($s0) ## 0000001C
.L80896844:
/* 00F54 80896844 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00F58 80896848 31F80003 */ andi $t8, $t7, 0x0003 ## $t8 = 00000000
/* 00F5C 8089684C 57000004 */ bnel $t8, $zero, .L80896860
/* 00F60 80896850 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00F64 80896854 0C225671 */ jal func_808959C4
/* 00F68 80896858 8FA5002C */ lw $a1, 0x002C($sp)
/* 00F6C 8089685C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80896860:
/* 00F70 80896860 0C225A46 */ jal func_80896918
/* 00F74 80896864 8FA5002C */ lw $a1, 0x002C($sp)
/* 00F78 80896868 8611001C */ lh $s1, 0x001C($s0) ## 0000001C
/* 00F7C 8089686C 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001
/* 00F80 80896870 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 00F84 80896874 32220003 */ andi $v0, $s1, 0x0003 ## $v0 = 00000000
/* 00F88 80896878 50620004 */ beql $v1, $v0, .L8089688C
/* 00F8C 8089687C 8611001C */ lh $s1, 0x001C($s0) ## 0000001C
/* 00F90 80896880 14410005 */ bne $v0, $at, .L80896898
/* 00F94 80896884 00000000 */ nop
/* 00F98 80896888 8611001C */ lh $s1, 0x001C($s0) ## 0000001C
.L8089688C:
/* 00F9C 8089688C 2419FFFF */ addiu $t9, $zero, 0xFFFF ## $t9 = FFFFFFFF
/* 00FA0 80896890 A2190003 */ sb $t9, 0x0003($s0) ## 00000003
/* 00FA4 80896894 32220003 */ andi $v0, $s1, 0x0003 ## $v0 = 00000000
.L80896898:
/* 00FA8 80896898 54620005 */ bnel $v1, $v0, .L808968B0
/* 00FAC 8089689C 260801A3 */ addiu $t0, $s0, 0x01A3 ## $t0 = 000001A3
/* 00FB0 808968A0 0C225946 */ jal func_80896518
/* 00FB4 808968A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00FB8 808968A8 8611001C */ lh $s1, 0x001C($s0) ## 0000001C
/* 00FBC 808968AC 260801A3 */ addiu $t0, $s0, 0x01A3 ## $t0 = 000001A3
.L808968B0:
/* 00FC0 808968B0 2401FFF0 */ addiu $at, $zero, 0xFFF0 ## $at = FFFFFFF0
/* 00FC4 808968B4 01014824 */ and $t1, $t0, $at
/* 00FC8 808968B8 3C048089 */ lui $a0, %hi(D_8089760C) ## $a0 = 80890000
/* 00FCC 808968BC 2484760C */ addiu $a0, $a0, %lo(D_8089760C) ## $a0 = 8089760C
/* 00FD0 808968C0 AFA90010 */ sw $t1, 0x0010($sp)
/* 00FD4 808968C4 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 00FD8 808968C8 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00FDC 808968CC 0C00084C */ jal osSyncPrintf
/* 00FE0 808968D0 26070194 */ addiu $a3, $s0, 0x0194 ## $a3 = 00000194
/* 00FE4 808968D4 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00FE8 808968D8 8FB0001C */ lw $s0, 0x001C($sp)
/* 00FEC 808968DC 8FB10020 */ lw $s1, 0x0020($sp)
/* 00FF0 808968E0 03E00008 */ jr $ra
/* 00FF4 808968E4 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000

View file

@ -1,30 +0,0 @@
glabel BgJyaCobra_Update
/* 01358 80896C48 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 0135C 80896C4C AFB00018 */ sw $s0, 0x0018($sp)
/* 01360 80896C50 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 01364 80896C54 AFBF001C */ sw $ra, 0x001C($sp)
/* 01368 80896C58 AFA50024 */ sw $a1, 0x0024($sp)
/* 0136C 80896C5C 8E190164 */ lw $t9, 0x0164($s0) ## 00000164
/* 01370 80896C60 0320F809 */ jalr $ra, $t9
/* 01374 80896C64 00000000 */ nop
/* 01378 80896C68 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0137C 80896C6C 0C22571D */ jal func_80895C74
/* 01380 80896C70 8FA50024 */ lw $a1, 0x0024($sp)
/* 01384 80896C74 0C22569C */ jal func_80895A70
/* 01388 80896C78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0138C 80896C7C 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 01390 80896C80 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 01394 80896C84 30420003 */ andi $v0, $v0, 0x0003 ## $v0 = 00000000
/* 01398 80896C88 10400003 */ beq $v0, $zero, .L80896C98
/* 0139C 80896C8C 00000000 */ nop
/* 013A0 80896C90 54410004 */ bnel $v0, $at, .L80896CA4
/* 013A4 80896C94 8FBF001C */ lw $ra, 0x001C($sp)
.L80896C98:
/* 013A8 80896C98 0C2257BC */ jal func_80895EF0
/* 013AC 80896C9C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 013B0 80896CA0 8FBF001C */ lw $ra, 0x001C($sp)
.L80896CA4:
/* 013B4 80896CA4 8FB00018 */ lw $s0, 0x0018($sp)
/* 013B8 80896CA8 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 013BC 80896CAC 03E00008 */ jr $ra
/* 013C0 80896CB0 00000000 */ nop

View file

@ -13,7 +13,7 @@ glabel D_80897730
.float 0.2
.text
glabel func_80895EF0
glabel BgJyaCobra_UpdateShadowFromSide
/* 00600 80895EF0 27BDFF20 */ addiu $sp, $sp, 0xFF20 ## $sp = FFFFFF20
/* 00604 80895EF4 AFB20048 */ sw $s2, 0x0048($sp)
/* 00608 80895EF8 AFB00040 */ sw $s0, 0x0040($sp)
@ -82,10 +82,10 @@ glabel func_80895EF0
/* 006F8 80895FE8 4481B000 */ mtc1 $at, $f22 ## $f22 = 0.50
/* 006FC 80895FEC 3C018089 */ lui $at, %hi(D_8089772C) ## $at = 80890000
/* 00700 80895FF0 3C148089 */ lui $s4, %hi(D_808973A4) ## $s4 = 80890000
/* 00704 80895FF4 3C178089 */ lui $s7, %hi(D_808973B0) ## $s7 = 80890000
/* 00704 80895FF4 3C178089 */ lui $s7, %hi(D_808973A4 + 0xC) ## $s7 = 80890000
/* 00708 80895FF8 3C108089 */ lui $s0, %hi(D_8089731C) ## $s0 = 80890000
/* 0070C 80895FFC 2610731C */ addiu $s0, $s0, %lo(D_8089731C) ## $s0 = 8089731C
/* 00710 80896000 26F773B0 */ addiu $s7, $s7, %lo(D_808973B0) ## $s7 = 808973B0
/* 00710 80896000 26F773B0 */ addiu $s7, $s7, %lo(D_808973A4 + 0xC) ## $s7 = 808973B0
/* 00714 80896004 269473A4 */ addiu $s4, $s4, %lo(D_808973A4) ## $s4 = 808973A4
/* 00718 80896008 C434772C */ lwc1 $f20, %lo(D_8089772C)($at)
/* 0071C 8089600C 27BE00C8 */ addiu $s8, $sp, 0x00C8 ## $s8 = FFFFFFE8
@ -283,14 +283,14 @@ glabel func_80895EF0
/* 009E8 808962D8 1420FF50 */ bne $at, $zero, .L8089601C
/* 009EC 808962DC 2694000C */ addiu $s4, $s4, 0x000C ## $s4 = 808973B0
/* 009F0 808962E0 3C158089 */ lui $s5, %hi(D_808974DC) ## $s5 = 80890000
/* 009F4 808962E4 3C148089 */ lui $s4, %hi(D_808974E8) ## $s4 = 80890000
/* 009F4 808962E4 3C148089 */ lui $s4, %hi(D_808974DC + 0xC) ## $s4 = 80890000
/* 009F8 808962E8 3C018089 */ lui $at, %hi(D_80897730) ## $at = 80890000
/* 009FC 808962EC 3C178089 */ lui $s7, %hi(D_80897518) ## $s7 = 80890000
/* 00A00 808962F0 3C138089 */ lui $s3, %hi(D_80897398) ## $s3 = 80890000
/* 00A04 808962F4 26737398 */ addiu $s3, $s3, %lo(D_80897398) ## $s3 = 80897398
/* 00A08 808962F8 26F77518 */ addiu $s7, $s7, %lo(D_80897518) ## $s7 = 80897518
/* 00A0C 808962FC C43C7730 */ lwc1 $f28, %lo(D_80897730)($at)
/* 00A10 80896300 269474E8 */ addiu $s4, $s4, %lo(D_808974E8) ## $s4 = 808974E8
/* 00A10 80896300 269474E8 */ addiu $s4, $s4, %lo(D_808974DC + 0xC) ## $s4 = 808974E8
/* 00A14 80896304 26B574DC */ addiu $s5, $s5, %lo(D_808974DC) ## $s5 = 808974DC
/* 00A18 80896308 24100003 */ addiu $s0, $zero, 0x0003 ## $s0 = 00000003
.L8089630C:

View file

@ -1,4 +1,4 @@
glabel func_80896518
glabel BgJyaCobra_UpdateShadowFromTop
/* 00C28 80896518 27BDFEA8 */ addiu $sp, $sp, 0xFEA8 ## $sp = FFFFFEA8
/* 00C2C 8089651C 3C0141FC */ lui $at, 0x41FC ## $at = 41FC0000
/* 00C30 80896520 44811000 */ mtc1 $at, $f2 ## $f2 = 31.50

View file

@ -1,20 +0,0 @@
glabel func_808958F0
/* 00000 808958F0 44866000 */ mtc1 $a2, $f12 ## $f12 = 0.00
/* 00004 808958F4 C4A40008 */ lwc1 $f4, 0x0008($a1) ## 00000008
/* 00008 808958F8 44877000 */ mtc1 $a3, $f14 ## $f14 = 0.00
/* 0000C 808958FC C4A80000 */ lwc1 $f8, 0x0000($a1) ## 00000000
/* 00010 80895900 460C2182 */ mul.s $f6, $f4, $f12
/* 00014 80895904 00000000 */ nop
/* 00018 80895908 460E4282 */ mul.s $f10, $f8, $f14
/* 0001C 8089590C 460A3400 */ add.s $f16, $f6, $f10
/* 00020 80895910 E4900000 */ swc1 $f16, 0x0000($a0) ## 00000000
/* 00024 80895914 C4B20004 */ lwc1 $f18, 0x0004($a1) ## 00000004
/* 00028 80895918 E4920004 */ swc1 $f18, 0x0004($a0) ## 00000004
/* 0002C 8089591C C4A40008 */ lwc1 $f4, 0x0008($a1) ## 00000008
/* 00030 80895920 C4A60000 */ lwc1 $f6, 0x0000($a1) ## 00000000
/* 00034 80895924 460E2202 */ mul.s $f8, $f4, $f14
/* 00038 80895928 00000000 */ nop
/* 0003C 8089592C 460C3282 */ mul.s $f10, $f6, $f12
/* 00040 80895930 460A4401 */ sub.s $f16, $f8, $f10
/* 00044 80895934 03E00008 */ jr $ra
/* 00048 80895938 E4900008 */ swc1 $f16, 0x0008($a0) ## 00000008

View file

@ -1,50 +0,0 @@
.rdata
glabel D_80897570
.asciz "Warning : move BG (%s %d)(name %d)(arg_data 0x%04x)\n"
.balign 4
glabel D_808975B0
.asciz "../z_bg_jya_cobra.c"
.balign 4
.text
glabel func_8089593C
/* 0004C 8089593C 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00050 80895940 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00054 80895944 AFB00020 */ sw $s0, 0x0020($sp)
/* 00058 80895948 AFA5003C */ sw $a1, 0x003C($sp)
/* 0005C 8089594C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00060 80895950 AFA60040 */ sw $a2, 0x0040($sp)
/* 00064 80895954 AFA00030 */ sw $zero, 0x0030($sp)
/* 00068 80895958 0C010D20 */ jal DynaPolyActor_Init
/* 0006C 8089595C 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
/* 00070 80895960 8FA40040 */ lw $a0, 0x0040($sp)
/* 00074 80895964 0C010620 */ jal CollisionHeader_GetVirtual
/* 00078 80895968 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF8
/* 0007C 8089596C 8FA4003C */ lw $a0, 0x003C($sp)
/* 00080 80895970 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00084 80895974 8FA70030 */ lw $a3, 0x0030($sp)
/* 00088 80895978 0C00FA9D */ jal DynaPoly_SetBgActor
## DynaPoly_SetBgActor
/* 0008C 8089597C 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 00090 80895980 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032
/* 00094 80895984 1441000A */ bne $v0, $at, .L808959B0
/* 00098 80895988 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 0009C 8089598C 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 000A0 80895990 3C048089 */ lui $a0, %hi(D_80897570) ## $a0 = 80890000
/* 000A4 80895994 3C058089 */ lui $a1, %hi(D_808975B0) ## $a1 = 80890000
/* 000A8 80895998 86070000 */ lh $a3, 0x0000($s0) ## 00000000
/* 000AC 8089599C 24A575B0 */ addiu $a1, $a1, %lo(D_808975B0) ## $a1 = 808975B0
/* 000B0 808959A0 24847570 */ addiu $a0, $a0, %lo(D_80897570) ## $a0 = 80897570
/* 000B4 808959A4 240600F7 */ addiu $a2, $zero, 0x00F7 ## $a2 = 000000F7
/* 000B8 808959A8 0C00084C */ jal osSyncPrintf
/* 000BC 808959AC AFAE0010 */ sw $t6, 0x0010($sp)
.L808959B0:
/* 000C0 808959B0 8FBF0024 */ lw $ra, 0x0024($sp)
/* 000C4 808959B4 8FB00020 */ lw $s0, 0x0020($sp)
/* 000C8 808959B8 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 000CC 808959BC 03E00008 */ jr $ra
/* 000D0 808959C0 00000000 */ nop

View file

@ -1,67 +0,0 @@
.rdata
glabel D_808975C4
.asciz "\x1b[31m"
.balign 4
glabel D_808975CC
.asciz " : Mir Ray (%s %d)\n"
.balign 4
glabel D_808975F4
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_80897608
.asciz "\x1b[m"
.balign 4
.text
glabel func_808959C4
/* 000D4 808959C4 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 000D8 808959C8 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000
/* 000DC 808959CC 00802825 */ or $a1, $a0, $zero ## $a1 = 00000000
/* 000E0 808959D0 AFBF0034 */ sw $ra, 0x0034($sp)
/* 000E4 808959D4 AFA40038 */ sw $a0, 0x0038($sp)
/* 000E8 808959D8 C4A40024 */ lwc1 $f4, 0x0024($a1) ## 00000024
/* 000EC 808959DC 3C014264 */ lui $at, 0x4264 ## $at = 42640000
/* 000F0 808959E0 44814000 */ mtc1 $at, $f8 ## $f8 = 57.00
/* 000F4 808959E4 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 000F8 808959E8 C4A60028 */ lwc1 $f6, 0x0028($a1) ## 00000028
/* 000FC 808959EC 240E0006 */ addiu $t6, $zero, 0x0006 ## $t6 = 00000006
/* 00100 808959F0 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24
/* 00104 808959F4 46083280 */ add.s $f10, $f6, $f8
/* 00108 808959F8 240700B7 */ addiu $a3, $zero, 0x00B7 ## $a3 = 000000B7
/* 0010C 808959FC E7AA0014 */ swc1 $f10, 0x0014($sp)
/* 00110 80895A00 C4B0002C */ lwc1 $f16, 0x002C($a1) ## 0000002C
/* 00114 80895A04 AFA50038 */ sw $a1, 0x0038($sp)
/* 00118 80895A08 AFAE0028 */ sw $t6, 0x0028($sp)
/* 0011C 80895A0C AFA00024 */ sw $zero, 0x0024($sp)
/* 00120 80895A10 AFA00020 */ sw $zero, 0x0020($sp)
/* 00124 80895A14 AFA0001C */ sw $zero, 0x001C($sp)
/* 00128 80895A18 0C00C916 */ jal Actor_SpawnAsChild
/* 0012C 80895A1C E7B00018 */ swc1 $f16, 0x0018($sp)
/* 00130 80895A20 8FA50038 */ lw $a1, 0x0038($sp)
/* 00134 80895A24 3C048089 */ lui $a0, %hi(D_808975C4) ## $a0 = 80890000
/* 00138 80895A28 8CAF011C */ lw $t7, 0x011C($a1) ## 0000011C
/* 0013C 80895A2C 55E0000D */ bnel $t7, $zero, .L80895A64
/* 00140 80895A30 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00144 80895A34 0C00084C */ jal osSyncPrintf
/* 00148 80895A38 248475C4 */ addiu $a0, $a0, %lo(D_808975C4) ## $a0 = 808975C4
/* 0014C 80895A3C 3C048089 */ lui $a0, %hi(D_808975CC) ## $a0 = 80890000
/* 00150 80895A40 3C058089 */ lui $a1, %hi(D_808975F4) ## $a1 = 80890000
/* 00154 80895A44 24A575F4 */ addiu $a1, $a1, %lo(D_808975F4) ## $a1 = 808975F4
/* 00158 80895A48 248475CC */ addiu $a0, $a0, %lo(D_808975CC) ## $a0 = 808975CC
/* 0015C 80895A4C 0C00084C */ jal osSyncPrintf
/* 00160 80895A50 2406010E */ addiu $a2, $zero, 0x010E ## $a2 = 0000010E
/* 00164 80895A54 3C048089 */ lui $a0, %hi(D_80897608) ## $a0 = 80890000
/* 00168 80895A58 0C00084C */ jal osSyncPrintf
/* 0016C 80895A5C 24847608 */ addiu $a0, $a0, %lo(D_80897608) ## $a0 = 80897608
/* 00170 80895A60 8FBF0034 */ lw $ra, 0x0034($sp)
.L80895A64:
/* 00174 80895A64 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 00178 80895A68 03E00008 */ jr $ra
/* 0017C 80895A6C 00000000 */ nop

View file

@ -1,37 +0,0 @@
glabel func_80895BEC
/* 002FC 80895BEC 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 00300 80895BF0 AFBF001C */ sw $ra, 0x001C($sp)
/* 00304 80895BF4 AFB00018 */ sw $s0, 0x0018($sp)
/* 00308 80895BF8 8CAE1C44 */ lw $t6, 0x1C44($a1) ## 00001C44
/* 0030C 80895BFC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00310 80895C00 AFAE003C */ sw $t6, 0x003C($sp)
/* 00314 80895C04 0C01DE1C */ jal Math_SinS
## sins?
/* 00318 80895C08 84840170 */ lh $a0, 0x0170($a0) ## 00000170
/* 0031C 80895C0C E7A00024 */ swc1 $f0, 0x0024($sp)
/* 00320 80895C10 0C01DE0D */ jal Math_CosS
## coss?
/* 00324 80895C14 86040170 */ lh $a0, 0x0170($s0) ## 00000170
/* 00328 80895C18 44070000 */ mfc1 $a3, $f0
/* 0032C 80895C1C 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
/* 00330 80895C20 26050174 */ addiu $a1, $s0, 0x0174 ## $a1 = 00000174
/* 00334 80895C24 0C22563C */ jal func_808958F0
/* 00338 80895C28 8FA60024 */ lw $a2, 0x0024($sp)
/* 0033C 80895C2C C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 00340 80895C30 C7A6002C */ lwc1 $f6, 0x002C($sp)
/* 00344 80895C34 8FA2003C */ lw $v0, 0x003C($sp)
/* 00348 80895C38 46062200 */ add.s $f8, $f4, $f6
/* 0034C 80895C3C E4480024 */ swc1 $f8, 0x0024($v0) ## 00000024
/* 00350 80895C40 C7B00030 */ lwc1 $f16, 0x0030($sp)
/* 00354 80895C44 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
/* 00358 80895C48 46105480 */ add.s $f18, $f10, $f16
/* 0035C 80895C4C E4520028 */ swc1 $f18, 0x0028($v0) ## 00000028
/* 00360 80895C50 C7A60034 */ lwc1 $f6, 0x0034($sp)
/* 00364 80895C54 C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C
/* 00368 80895C58 46062200 */ add.s $f8, $f4, $f6
/* 0036C 80895C5C E448002C */ swc1 $f8, 0x002C($v0) ## 0000002C
/* 00370 80895C60 8FBF001C */ lw $ra, 0x001C($sp)
/* 00374 80895C64 8FB00018 */ lw $s0, 0x0018($sp)
/* 00378 80895C68 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 0037C 80895C6C 03E00008 */ jr $ra
/* 00380 80895C70 00000000 */ nop

View file

@ -1,15 +0,0 @@
glabel func_80896918
/* 01028 80896918 AFA50004 */ sw $a1, 0x0004($sp)
/* 0102C 8089691C 848F016C */ lh $t7, 0x016C($a0) ## 0000016C
/* 01030 80896920 84990016 */ lh $t9, 0x0016($a0) ## 00000016
/* 01034 80896924 3C0E8089 */ lui $t6, %hi(func_80896950) ## $t6 = 80890000
/* 01038 80896928 000FC340 */ sll $t8, $t7, 13
/* 0103C 8089692C 03191021 */ addu $v0, $t8, $t9
/* 01040 80896930 00021400 */ sll $v0, $v0, 16
/* 01044 80896934 25CE6950 */ addiu $t6, $t6, %lo(func_80896950) ## $t6 = 80896950
/* 01048 80896938 00021403 */ sra $v0, $v0, 16
/* 0104C 8089693C AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164
/* 01050 80896940 A4800168 */ sh $zero, 0x0168($a0) ## 00000168
/* 01054 80896944 A4820032 */ sh $v0, 0x0032($a0) ## 00000032
/* 01058 80896948 03E00008 */ jr $ra
/* 0105C 8089694C A48200B6 */ sh $v0, 0x00B6($a0) ## 000000B6

View file

@ -1,54 +0,0 @@
.late_rodata
glabel D_80897734
.float 0.001
glabel D_80897738
.float 0.001
.text
glabel func_80896950
/* 01060 80896950 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 01064 80896954 AFBF0014 */ sw $ra, 0x0014($sp)
/* 01068 80896958 3C018089 */ lui $at, %hi(D_80897734) ## $at = 80890000
/* 0106C 8089695C C4247734 */ lwc1 $f4, %lo(D_80897734)($at)
/* 01070 80896960 C4860150 */ lwc1 $f6, 0x0150($a0) ## 00000150
/* 01074 80896964 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 01078 80896968 4606203C */ c.lt.s $f4, $f6
/* 0107C 8089696C 00000000 */ nop
/* 01080 80896970 4502000F */ bc1fl .L808969B0
/* 01084 80896974 A4800168 */ sh $zero, 0x0168($a0) ## 00000168
/* 01088 80896978 848E0168 */ lh $t6, 0x0168($a0) ## 00000168
/* 0108C 8089697C 25CF0001 */ addiu $t7, $t6, 0x0001 ## $t7 = 00000001
/* 01090 80896980 A48F0168 */ sh $t7, 0x0168($a0) ## 00000168
/* 01094 80896984 84980168 */ lh $t8, 0x0168($a0) ## 00000168
/* 01098 80896988 2B01000F */ slti $at, $t8, 0x000F
/* 0109C 8089698C 54200009 */ bnel $at, $zero, .L808969B4
/* 010A0 80896990 C4800150 */ lwc1 $f0, 0x0150($a0) ## 00000150
/* 010A4 80896994 AFA2001C */ sw $v0, 0x001C($sp)
/* 010A8 80896998 0C225A7E */ jal func_808969F8
/* 010AC 8089699C AFA40020 */ sw $a0, 0x0020($sp)
/* 010B0 808969A0 8FA2001C */ lw $v0, 0x001C($sp)
/* 010B4 808969A4 10000002 */ beq $zero, $zero, .L808969B0
/* 010B8 808969A8 8FA40020 */ lw $a0, 0x0020($sp)
/* 010BC 808969AC A4800168 */ sh $zero, 0x0168($a0) ## 00000168
.L808969B0:
/* 010C0 808969B0 C4800150 */ lwc1 $f0, 0x0150($a0) ## 00000150
.L808969B4:
/* 010C4 808969B4 3C018089 */ lui $at, %hi(D_80897738) ## $at = 80890000
/* 010C8 808969B8 C4287738 */ lwc1 $f8, %lo(D_80897738)($at)
/* 010CC 808969BC 46000005 */ abs.s $f0, $f0
/* 010D0 808969C0 4600403C */ c.lt.s $f8, $f0
/* 010D4 808969C4 00000000 */ nop
/* 010D8 808969C8 45020008 */ bc1fl .L808969EC
/* 010DC 808969CC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 010E0 808969D0 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00
/* 010E4 808969D4 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF
/* 010E8 808969D8 E48A0150 */ swc1 $f10, 0x0150($a0) ## 00000150
/* 010EC 808969DC 8C590680 */ lw $t9, 0x0680($v0) ## 00000680
/* 010F0 808969E0 03214024 */ and $t0, $t9, $at
/* 010F4 808969E4 AC480680 */ sw $t0, 0x0680($v0) ## 00000680
/* 010F8 808969E8 8FBF0014 */ lw $ra, 0x0014($sp)
.L808969EC:
/* 010FC 808969EC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 01100 808969F0 03E00008 */ jr $ra
/* 01104 808969F4 00000000 */ nop

View file

@ -1,55 +0,0 @@
glabel func_808969F8
/* 01108 808969F8 848600B6 */ lh $a2, 0x00B6($a0) ## 000000B6
/* 0110C 808969FC 84980158 */ lh $t8, 0x0158($a0) ## 00000158
/* 01110 80896A00 848F008A */ lh $t7, 0x008A($a0) ## 0000008A
/* 01114 80896A04 3C0E8089 */ lui $t6, %hi(func_80896ABC) ## $t6 = 80890000
/* 01118 80896A08 00D83823 */ subu $a3, $a2, $t8
/* 0111C 80896A0C 00073C00 */ sll $a3, $a3, 16
/* 01120 80896A10 01E61823 */ subu $v1, $t7, $a2
/* 01124 80896A14 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 01128 80896A18 25CE6ABC */ addiu $t6, $t6, %lo(func_80896ABC) ## $t6 = 80896ABC
/* 0112C 80896A1C 00031C00 */ sll $v1, $v1, 16
/* 01130 80896A20 00073C03 */ sra $a3, $a3, 16
/* 01134 80896A24 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164
/* 01138 80896A28 04E10002 */ bgez $a3, .L80896A34
/* 0113C 80896A2C 00031C03 */ sra $v1, $v1, 16
/* 01140 80896A30 00073823 */ subu $a3, $zero, $a3
.L80896A34:
/* 01144 80896A34 18600009 */ blez $v1, .L80896A5C
/* 01148 80896A38 28E14001 */ slti $at, $a3, 0x4001
/* 0114C 80896A3C 28E14001 */ slti $at, $a3, 0x4001
/* 01150 80896A40 14200004 */ bne $at, $zero, .L80896A54
/* 01154 80896A44 2408FFFF */ addiu $t0, $zero, 0xFFFF ## $t0 = FFFFFFFF
/* 01158 80896A48 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001
/* 0115C 80896A4C 10000009 */ beq $zero, $zero, .L80896A74
/* 01160 80896A50 A499016A */ sh $t9, 0x016A($a0) ## 0000016A
.L80896A54:
/* 01164 80896A54 10000007 */ beq $zero, $zero, .L80896A74
/* 01168 80896A58 A488016A */ sh $t0, 0x016A($a0) ## 0000016A
.L80896A5C:
/* 0116C 80896A5C 14200004 */ bne $at, $zero, .L80896A70
/* 01170 80896A60 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 01174 80896A64 2409FFFF */ addiu $t1, $zero, 0xFFFF ## $t1 = FFFFFFFF
/* 01178 80896A68 10000002 */ beq $zero, $zero, .L80896A74
/* 0117C 80896A6C A489016A */ sh $t1, 0x016A($a0) ## 0000016A
.L80896A70:
/* 01180 80896A70 A48A016A */ sh $t2, 0x016A($a0) ## 0000016A
.L80896A74:
/* 01184 80896A74 C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024
/* 01188 80896A78 C4860024 */ lwc1 $f6, 0x0024($a0) ## 00000024
/* 0118C 80896A7C C4900028 */ lwc1 $f16, 0x0028($a0) ## 00000028
/* 01190 80896A80 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001
/* 01194 80896A84 46062201 */ sub.s $f8, $f4, $f6
/* 01198 80896A88 C486002C */ lwc1 $f6, 0x002C($a0) ## 0000002C
/* 0119C 80896A8C E4880174 */ swc1 $f8, 0x0174($a0) ## 00000174
/* 011A0 80896A90 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028
/* 011A4 80896A94 46105481 */ sub.s $f18, $f10, $f16
/* 011A8 80896A98 E4920178 */ swc1 $f18, 0x0178($a0) ## 00000178
/* 011AC 80896A9C C444002C */ lwc1 $f4, 0x002C($v0) ## 0000002C
/* 011B0 80896AA0 A480016E */ sh $zero, 0x016E($a0) ## 0000016E
/* 011B4 80896AA4 848B016E */ lh $t3, 0x016E($a0) ## 0000016E
/* 011B8 80896AA8 46062201 */ sub.s $f8, $f4, $f6
/* 011BC 80896AAC A08C0172 */ sb $t4, 0x0172($a0) ## 00000172
/* 011C0 80896AB0 A48B0170 */ sh $t3, 0x0170($a0) ## 00000170
/* 011C4 80896AB4 03E00008 */ jr $ra
/* 011C8 80896AB8 E488017C */ swc1 $f8, 0x017C($a0) ## 0000017C

View file

@ -1,115 +0,0 @@
.late_rodata
glabel D_8089773C
.float 0.001
.text
glabel func_80896ABC
/* 011CC 80896ABC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 011D0 80896AC0 AFBF001C */ sw $ra, 0x001C($sp)
/* 011D4 80896AC4 AFB00018 */ sw $s0, 0x0018($sp)
/* 011D8 80896AC8 AFA5002C */ sw $a1, 0x002C($sp)
/* 011DC 80896ACC 8CAF1C44 */ lw $t7, 0x1C44($a1) ## 00001C44
/* 011E0 80896AD0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 011E4 80896AD4 24050015 */ addiu $a1, $zero, 0x0015 ## $a1 = 00000015
/* 011E8 80896AD8 AFAF0020 */ sw $t7, 0x0020($sp)
/* 011EC 80896ADC 8498016C */ lh $t8, 0x016C($a0) ## 0000016C
/* 011F0 80896AE0 84880016 */ lh $t0, 0x0016($a0) ## 00000016
/* 011F4 80896AE4 848C0032 */ lh $t4, 0x0032($a0) ## 00000032
/* 011F8 80896AE8 0018CB40 */ sll $t9, $t8, 13
/* 011FC 80896AEC 03285821 */ addu $t3, $t9, $t0
/* 01200 80896AF0 016C1023 */ subu $v0, $t3, $t4
/* 01204 80896AF4 00021400 */ sll $v0, $v0, 16
/* 01208 80896AF8 00021403 */ sra $v0, $v0, 16
/* 0120C 80896AFC 04400003 */ bltz $v0, .L80896B0C
/* 01210 80896B00 00021823 */ subu $v1, $zero, $v0
/* 01214 80896B04 10000001 */ beq $zero, $zero, .L80896B0C
/* 01218 80896B08 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
.L80896B0C:
/* 0121C 80896B0C 28611D00 */ slti $at, $v1, 0x1D00
/* 01220 80896B10 10200007 */ beq $at, $zero, .L80896B30
/* 01224 80896B14 2604016E */ addiu $a0, $s0, 0x016E ## $a0 = 0000016E
/* 01228 80896B18 2604016E */ addiu $a0, $s0, 0x016E ## $a0 = 0000016E
/* 0122C 80896B1C 2405006A */ addiu $a1, $zero, 0x006A ## $a1 = 0000006A
/* 01230 80896B20 0C01DE5F */ jal Math_StepToS
/* 01234 80896B24 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
/* 01238 80896B28 10000004 */ beq $zero, $zero, .L80896B3C
/* 0123C 80896B2C 8605016A */ lh $a1, 0x016A($s0) ## 0000016A
.L80896B30:
/* 01240 80896B30 0C01DE5F */ jal Math_StepToS
/* 01244 80896B34 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A
/* 01248 80896B38 8605016A */ lh $a1, 0x016A($s0) ## 0000016A
.L80896B3C:
/* 0124C 80896B3C 26040170 */ addiu $a0, $s0, 0x0170 ## $a0 = 00000170
/* 01250 80896B40 8606016E */ lh $a2, 0x016E($s0) ## 0000016E
/* 01254 80896B44 00052B40 */ sll $a1, $a1, 13
/* 01258 80896B48 00052C00 */ sll $a1, $a1, 16
/* 0125C 80896B4C 0C01DE2B */ jal Math_ScaledStepToS
/* 01260 80896B50 00052C03 */ sra $a1, $a1, 16
/* 01264 80896B54 50400013 */ beql $v0, $zero, .L80896BA4
/* 01268 80896B58 8609016C */ lh $t1, 0x016C($s0) ## 0000016C
/* 0126C 80896B5C 860D016C */ lh $t5, 0x016C($s0) ## 0000016C
/* 01270 80896B60 860E016A */ lh $t6, 0x016A($s0) ## 0000016A
/* 01274 80896B64 8FA20020 */ lw $v0, 0x0020($sp)
/* 01278 80896B68 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 0127C 80896B6C 01AE7821 */ addu $t7, $t5, $t6
/* 01280 80896B70 31F80007 */ andi $t8, $t7, 0x0007 ## $t8 = 00000000
/* 01284 80896B74 A618016C */ sh $t8, 0x016C($s0) ## 0000016C
/* 01288 80896B78 8C590680 */ lw $t9, 0x0680($v0) ## 00000680
/* 0128C 80896B7C 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF
/* 01290 80896B80 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01294 80896B84 03214024 */ and $t0, $t9, $at
/* 01298 80896B88 AC480680 */ sw $t0, 0x0680($v0) ## 00000680
/* 0129C 80896B8C E6040150 */ swc1 $f4, 0x0150($s0) ## 00000150
/* 012A0 80896B90 0C225A46 */ jal func_80896918
/* 012A4 80896B94 8FA5002C */ lw $a1, 0x002C($sp)
/* 012A8 80896B98 1000000C */ beq $zero, $zero, .L80896BCC
/* 012AC 80896B9C 8FAE0020 */ lw $t6, 0x0020($sp)
/* 012B0 80896BA0 8609016C */ lh $t1, 0x016C($s0) ## 0000016C
.L80896BA4:
/* 012B4 80896BA4 860B0016 */ lh $t3, 0x0016($s0) ## 00000016
/* 012B8 80896BA8 860D0170 */ lh $t5, 0x0170($s0) ## 00000170
/* 012BC 80896BAC 00095340 */ sll $t2, $t1, 13
/* 012C0 80896BB0 014B6021 */ addu $t4, $t2, $t3
/* 012C4 80896BB4 018D1021 */ addu $v0, $t4, $t5
/* 012C8 80896BB8 00021400 */ sll $v0, $v0, 16
/* 012CC 80896BBC 00021403 */ sra $v0, $v0, 16
/* 012D0 80896BC0 A6020032 */ sh $v0, 0x0032($s0) ## 00000032
/* 012D4 80896BC4 A60200B6 */ sh $v0, 0x00B6($s0) ## 000000B6
/* 012D8 80896BC8 8FAE0020 */ lw $t6, 0x0020($sp)
.L80896BCC:
/* 012DC 80896BCC 8DCF0680 */ lw $t7, 0x0680($t6) ## 00000680
/* 012E0 80896BD0 31F80010 */ andi $t8, $t7, 0x0010 ## $t8 = 00000000
/* 012E4 80896BD4 5300000A */ beql $t8, $zero, .L80896C00
/* 012E8 80896BD8 C6000150 */ lwc1 $f0, 0x0150($s0) ## 00000150
/* 012EC 80896BDC 92190172 */ lbu $t9, 0x0172($s0) ## 00000172
/* 012F0 80896BE0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 012F4 80896BE4 5320000F */ beql $t9, $zero, .L80896C24
/* 012F8 80896BE8 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 012FC 80896BEC 0C2256FB */ jal func_80895BEC
/* 01300 80896BF0 8FA5002C */ lw $a1, 0x002C($sp)
/* 01304 80896BF4 1000000B */ beq $zero, $zero, .L80896C24
/* 01308 80896BF8 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 0130C 80896BFC C6000150 */ lwc1 $f0, 0x0150($s0) ## 00000150
.L80896C00:
/* 01310 80896C00 3C018089 */ lui $at, %hi(D_8089773C) ## $at = 80890000
/* 01314 80896C04 C426773C */ lwc1 $f6, %lo(D_8089773C)($at)
/* 01318 80896C08 46000005 */ abs.s $f0, $f0
/* 0131C 80896C0C 4606003C */ c.lt.s $f0, $f6
/* 01320 80896C10 00000000 */ nop
/* 01324 80896C14 45020003 */ bc1fl .L80896C24
/* 01328 80896C18 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 0132C 80896C1C A2000172 */ sb $zero, 0x0172($s0) ## 00000172
/* 01330 80896C20 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
.L80896C24:
/* 01334 80896C24 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01338 80896C28 2405200A */ addiu $a1, $zero, 0x200A ## $a1 = 0000200A
/* 0133C 80896C2C 0C00BE5D */ jal func_8002F974
/* 01340 80896C30 E6080150 */ swc1 $f8, 0x0150($s0) ## 00000150
/* 01344 80896C34 8FBF001C */ lw $ra, 0x001C($sp)
/* 01348 80896C38 8FB00018 */ lw $s0, 0x0018($sp)
/* 0134C 80896C3C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 01350 80896C40 03E00008 */ jr $ra
/* 01354 80896C44 00000000 */ nop

View file

@ -1,64 +0,0 @@
.rdata
glabel D_80897648
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_8089765C
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_80897670
.asciz "../z_bg_jya_cobra.c"
.balign 4
.text
glabel func_80896CB4
/* 013C4 80896CB4 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 013C8 80896CB8 AFBF001C */ sw $ra, 0x001C($sp)
/* 013CC 80896CBC AFB00018 */ sw $s0, 0x0018($sp)
/* 013D0 80896CC0 AFA40040 */ sw $a0, 0x0040($sp)
/* 013D4 80896CC4 8C850000 */ lw $a1, 0x0000($a0) ## 00000000
/* 013D8 80896CC8 3C068089 */ lui $a2, %hi(D_80897648) ## $a2 = 80890000
/* 013DC 80896CCC 24C67648 */ addiu $a2, $a2, %lo(D_80897648) ## $a2 = 80897648
/* 013E0 80896CD0 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
/* 013E4 80896CD4 24070360 */ addiu $a3, $zero, 0x0360 ## $a3 = 00000360
/* 013E8 80896CD8 0C031AB1 */ jal Graph_OpenDisps
/* 013EC 80896CDC 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 013F0 80896CE0 8FAF0040 */ lw $t7, 0x0040($sp)
/* 013F4 80896CE4 0C024F61 */ jal func_80093D84
/* 013F8 80896CE8 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000
/* 013FC 80896CEC 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 01400 80896CF0 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000
/* 01404 80896CF4 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003
/* 01408 80896CF8 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 0140C 80896CFC AE1802D0 */ sw $t8, 0x02D0($s0) ## 000002D0
/* 01410 80896D00 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 01414 80896D04 8FA80040 */ lw $t0, 0x0040($sp)
/* 01418 80896D08 3C058089 */ lui $a1, %hi(D_8089765C) ## $a1 = 80890000
/* 0141C 80896D0C 24A5765C */ addiu $a1, $a1, %lo(D_8089765C) ## $a1 = 8089765C
/* 01420 80896D10 8D040000 */ lw $a0, 0x0000($t0) ## 00000000
/* 01424 80896D14 24060363 */ addiu $a2, $zero, 0x0363 ## $a2 = 00000363
/* 01428 80896D18 0C0346A2 */ jal Matrix_NewMtx
/* 0142C 80896D1C AFA20028 */ sw $v0, 0x0028($sp)
/* 01430 80896D20 8FA30028 */ lw $v1, 0x0028($sp)
/* 01434 80896D24 3C0B0601 */ lui $t3, %hi(D_06010C20) ## $t3 = 06010000
/* 01438 80896D28 256B0C20 */ addiu $t3, $t3, %lo(D_06010C20) ## $t3 = 06010C20
/* 0143C 80896D2C AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 01440 80896D30 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 01444 80896D34 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
/* 01448 80896D38 3C068089 */ lui $a2, %hi(D_80897670) ## $a2 = 80890000
/* 0144C 80896D3C 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
/* 01450 80896D40 AE0902D0 */ sw $t1, 0x02D0($s0) ## 000002D0
/* 01454 80896D44 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004
/* 01458 80896D48 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
/* 0145C 80896D4C 8FAC0040 */ lw $t4, 0x0040($sp)
/* 01460 80896D50 24C67670 */ addiu $a2, $a2, %lo(D_80897670) ## $a2 = 80897670
/* 01464 80896D54 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
/* 01468 80896D58 24070368 */ addiu $a3, $zero, 0x0368 ## $a3 = 00000368
/* 0146C 80896D5C 0C031AD5 */ jal Graph_CloseDisps
/* 01470 80896D60 8D850000 */ lw $a1, 0x0000($t4) ## 00000000
/* 01474 80896D64 8FBF001C */ lw $ra, 0x001C($sp)
/* 01478 80896D68 8FB00018 */ lw $s0, 0x0018($sp)
/* 0147C 80896D6C 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 01480 80896D70 03E00008 */ jr $ra
/* 01484 80896D74 00000000 */ nop

View file

@ -1,110 +0,0 @@
.rdata
glabel D_80897684
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_80897698
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_808976AC
.asciz "../z_bg_jya_cobra.c"
.balign 4
.late_rodata
glabel D_80897740
.float 0.1
.text
glabel func_80896D78
/* 01488 80896D78 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 0148C 80896D7C AFBF001C */ sw $ra, 0x001C($sp)
/* 01490 80896D80 AFB10018 */ sw $s1, 0x0018($sp)
/* 01494 80896D84 AFB00014 */ sw $s0, 0x0014($sp)
/* 01498 80896D88 AFA50054 */ sw $a1, 0x0054($sp)
/* 0149C 80896D8C 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 014A0 80896D90 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 014A4 80896D94 3C068089 */ lui $a2, %hi(D_80897684) ## $a2 = 80890000
/* 014A8 80896D98 24C67684 */ addiu $a2, $a2, %lo(D_80897684) ## $a2 = 80897684
/* 014AC 80896D9C 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE0
/* 014B0 80896DA0 2407039C */ addiu $a3, $zero, 0x039C ## $a3 = 0000039C
/* 014B4 80896DA4 0C031AB1 */ jal Graph_OpenDisps
/* 014B8 80896DA8 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 014BC 80896DAC 8FAF0054 */ lw $t7, 0x0054($sp)
/* 014C0 80896DB0 0C024F61 */ jal func_80093D84
/* 014C4 80896DB4 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000
/* 014C8 80896DB8 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
/* 014CC 80896DBC 3C098089 */ lui $t1, %hi(D_80897308) ## $t1 = 80890000
/* 014D0 80896DC0 860A00B4 */ lh $t2, 0x00B4($s0) ## 000000B4
/* 014D4 80896DC4 33190003 */ andi $t9, $t8, 0x0003 ## $t9 = 00000000
/* 014D8 80896DC8 00194040 */ sll $t0, $t9, 1
/* 014DC 80896DCC 01284821 */ addu $t1, $t1, $t0
/* 014E0 80896DD0 85297308 */ lh $t1, %lo(D_80897308)($t1)
/* 014E4 80896DD4 27A70044 */ addiu $a3, $sp, 0x0044 ## $a3 = FFFFFFF4
/* 014E8 80896DD8 012A5821 */ addu $t3, $t1, $t2
/* 014EC 80896DDC A7AB0044 */ sh $t3, 0x0044($sp)
/* 014F0 80896DE0 860C00B6 */ lh $t4, 0x00B6($s0) ## 000000B6
/* 014F4 80896DE4 A7AC0046 */ sh $t4, 0x0046($sp)
/* 014F8 80896DE8 860D00B8 */ lh $t5, 0x00B8($s0) ## 000000B8
/* 014FC 80896DEC A7AD0048 */ sh $t5, 0x0048($sp)
/* 01500 80896DF0 8E060188 */ lw $a2, 0x0188($s0) ## 00000188
/* 01504 80896DF4 C60E0184 */ lwc1 $f14, 0x0184($s0) ## 00000184
/* 01508 80896DF8 0C0345A5 */ jal func_800D1694
/* 0150C 80896DFC C60C0180 */ lwc1 $f12, 0x0180($s0) ## 00000180
/* 01510 80896E00 3C018089 */ lui $at, %hi(D_80897740) ## $at = 80890000
/* 01514 80896E04 C42C7740 */ lwc1 $f12, %lo(D_80897740)($at)
/* 01518 80896E08 8E060190 */ lw $a2, 0x0190($s0) ## 00000190
/* 0151C 80896E0C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01520 80896E10 0C0342A3 */ jal Matrix_Scale
/* 01524 80896E14 46006386 */ mov.s $f14, $f12
/* 01528 80896E18 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 0152C 80896E1C 3C0FDA38 */ lui $t7, 0xDA38 ## $t7 = DA380000
/* 01530 80896E20 35EF0003 */ ori $t7, $t7, 0x0003 ## $t7 = DA380003
/* 01534 80896E24 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 01538 80896E28 AE2E02D0 */ sw $t6, 0x02D0($s1) ## 000002D0
/* 0153C 80896E2C AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 01540 80896E30 8FB80054 */ lw $t8, 0x0054($sp)
/* 01544 80896E34 3C058089 */ lui $a1, %hi(D_80897698) ## $a1 = 80890000
/* 01548 80896E38 24A57698 */ addiu $a1, $a1, %lo(D_80897698) ## $a1 = 80897698
/* 0154C 80896E3C 8F040000 */ lw $a0, 0x0000($t8) ## 00000000
/* 01550 80896E40 240603AB */ addiu $a2, $zero, 0x03AB ## $a2 = 000003AB
/* 01554 80896E44 0C0346A2 */ jal Matrix_NewMtx
/* 01558 80896E48 AFA2002C */ sw $v0, 0x002C($sp)
/* 0155C 80896E4C 8FA3002C */ lw $v1, 0x002C($sp)
/* 01560 80896E50 3C08FA00 */ lui $t0, 0xFA00 ## $t0 = FA000000
/* 01564 80896E54 3C01430C */ lui $at, 0x430C ## $at = 430C0000
/* 01568 80896E58 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 0156C 80896E5C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 01570 80896E60 44813000 */ mtc1 $at, $f6 ## $f6 = 140.00
/* 01574 80896E64 2401FF00 */ addiu $at, $zero, 0xFF00 ## $at = FFFFFF00
/* 01578 80896E68 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
/* 0157C 80896E6C AE3902D0 */ sw $t9, 0x02D0($s1) ## 000002D0
/* 01580 80896E70 AC480000 */ sw $t0, 0x0000($v0) ## 00000000
/* 01584 80896E74 C604018C */ lwc1 $f4, 0x018C($s0) ## 0000018C
/* 01588 80896E78 3C0F0601 */ lui $t7, %hi(D_060117D0) ## $t7 = 06010000
/* 0158C 80896E7C 25EF17D0 */ addiu $t7, $t7, %lo(D_060117D0) ## $t7 = 060117D0
/* 01590 80896E80 46062202 */ mul.s $f8, $f4, $f6
/* 01594 80896E84 3C0EDE00 */ lui $t6, 0xDE00 ## $t6 = DE000000
/* 01598 80896E88 3C068089 */ lui $a2, %hi(D_808976AC) ## $a2 = 80890000
/* 0159C 80896E8C 24C676AC */ addiu $a2, $a2, %lo(D_808976AC) ## $a2 = 808976AC
/* 015A0 80896E90 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE0
/* 015A4 80896E94 240703B3 */ addiu $a3, $zero, 0x03B3 ## $a3 = 000003B3
/* 015A8 80896E98 4600428D */ trunc.w.s $f10, $f8
/* 015AC 80896E9C 440A5000 */ mfc1 $t2, $f10
/* 015B0 80896EA0 00000000 */ nop
/* 015B4 80896EA4 314B00FF */ andi $t3, $t2, 0x00FF ## $t3 = 00000000
/* 015B8 80896EA8 01616025 */ or $t4, $t3, $at ## $t4 = FFFFFF00
/* 015BC 80896EAC AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004
/* 015C0 80896EB0 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 015C4 80896EB4 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008
/* 015C8 80896EB8 AE2D02D0 */ sw $t5, 0x02D0($s1) ## 000002D0
/* 015CC 80896EBC AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 015D0 80896EC0 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
/* 015D4 80896EC4 8FB80054 */ lw $t8, 0x0054($sp)
/* 015D8 80896EC8 0C031AD5 */ jal Graph_CloseDisps
/* 015DC 80896ECC 8F050000 */ lw $a1, 0x0000($t8) ## 00000000
/* 015E0 80896ED0 8FBF001C */ lw $ra, 0x001C($sp)
/* 015E4 80896ED4 8FB00014 */ lw $s0, 0x0014($sp)
/* 015E8 80896ED8 8FB10018 */ lw $s1, 0x0018($sp)
/* 015EC 80896EDC 03E00008 */ jr $ra
/* 015F0 80896EE0 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000

View file

@ -1,196 +0,0 @@
.rdata
glabel D_808976C0
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_808976D4
.asciz "../z_bg_jya_cobra.c"
.balign 4
glabel D_808976E8
.asciz "../z_bg_jya_cobra.c"
.balign 4
.text
glabel func_80896EE4
/* 015F4 80896EE4 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88
/* 015F8 80896EE8 AFBF001C */ sw $ra, 0x001C($sp)
/* 015FC 80896EEC AFB00018 */ sw $s0, 0x0018($sp)
/* 01600 80896EF0 AFA5007C */ sw $a1, 0x007C($sp)
/* 01604 80896EF4 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 01608 80896EF8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0160C 80896EFC 3C068089 */ lui $a2, %hi(D_808976C0) ## $a2 = 80890000
/* 01610 80896F00 31CF0003 */ andi $t7, $t6, 0x0003 ## $t7 = 00000000
/* 01614 80896F04 A7AF0072 */ sh $t7, 0x0072($sp)
/* 01618 80896F08 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 0161C 80896F0C 24C676C0 */ addiu $a2, $a2, %lo(D_808976C0) ## $a2 = 808976C0
/* 01620 80896F10 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4
/* 01624 80896F14 240703C6 */ addiu $a3, $zero, 0x03C6 ## $a3 = 000003C6
/* 01628 80896F18 0C031AB1 */ jal Graph_OpenDisps
/* 0162C 80896F1C AFA5005C */ sw $a1, 0x005C($sp)
/* 01630 80896F20 8FB9007C */ lw $t9, 0x007C($sp)
/* 01634 80896F24 0C025011 */ jal func_80094044
/* 01638 80896F28 8F240000 */ lw $a0, 0x0000($t9) ## 00000000
/* 0163C 80896F2C 87A90072 */ lh $t1, 0x0072($sp)
/* 01640 80896F30 8FA8005C */ lw $t0, 0x005C($sp)
/* 01644 80896F34 87AA0072 */ lh $t2, 0x0072($sp)
/* 01648 80896F38 1520000D */ bne $t1, $zero, .L80896F70
/* 0164C 80896F3C 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 01650 80896F40 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 01654 80896F44 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00
/* 01658 80896F48 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 0165C 80896F4C 3C078089 */ lui $a3, %hi(D_80897538) ## $a3 = 80890000
/* 01660 80896F50 24E77538 */ addiu $a3, $a3, %lo(D_80897538) ## $a3 = 80897538
/* 01664 80896F54 46062201 */ sub.s $f8, $f4, $f6
/* 01668 80896F58 E7A80064 */ swc1 $f8, 0x0064($sp)
/* 0166C 80896F5C C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
/* 01670 80896F60 E7AA0068 */ swc1 $f10, 0x0068($sp)
/* 01674 80896F64 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 01678 80896F68 10000016 */ beq $zero, $zero, .L80896FC4
/* 0167C 80896F6C E7B0006C */ swc1 $f16, 0x006C($sp)
.L80896F70:
/* 01680 80896F70 1541000D */ bne $t2, $at, .L80896FA8
/* 01684 80896F74 260700B4 */ addiu $a3, $s0, 0x00B4 ## $a3 = 000000B4
/* 01688 80896F78 3C01428C */ lui $at, 0x428C ## $at = 428C0000
/* 0168C 80896F7C 44812000 */ mtc1 $at, $f4 ## $f4 = 70.00
/* 01690 80896F80 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024
/* 01694 80896F84 3C078089 */ lui $a3, %hi(D_80897540) ## $a3 = 80890000
/* 01698 80896F88 24E77540 */ addiu $a3, $a3, %lo(D_80897540) ## $a3 = 80897540
/* 0169C 80896F8C 46049180 */ add.s $f6, $f18, $f4
/* 016A0 80896F90 E7A60064 */ swc1 $f6, 0x0064($sp)
/* 016A4 80896F94 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028
/* 016A8 80896F98 E7A80068 */ swc1 $f8, 0x0068($sp)
/* 016AC 80896F9C C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C
/* 016B0 80896FA0 10000008 */ beq $zero, $zero, .L80896FC4
/* 016B4 80896FA4 E7AA006C */ swc1 $f10, 0x006C($sp)
.L80896FA8:
/* 016B8 80896FA8 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFEC
/* 016BC 80896FAC 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 016C0 80896FB0 AFA70060 */ sw $a3, 0x0060($sp)
/* 016C4 80896FB4 0C01DF90 */ jal Math_Vec3f_Copy
## Vec3f_Copy
/* 016C8 80896FB8 AFA8005C */ sw $t0, 0x005C($sp)
/* 016CC 80896FBC 8FA70060 */ lw $a3, 0x0060($sp)
/* 016D0 80896FC0 8FA8005C */ lw $t0, 0x005C($sp)
.L80896FC4:
/* 016D4 80896FC4 C7AC0064 */ lwc1 $f12, 0x0064($sp)
/* 016D8 80896FC8 C7AE0068 */ lwc1 $f14, 0x0068($sp)
/* 016DC 80896FCC 8FA6006C */ lw $a2, 0x006C($sp)
/* 016E0 80896FD0 0C0345A5 */ jal func_800D1694
/* 016E4 80896FD4 AFA8005C */ sw $t0, 0x005C($sp)
/* 016E8 80896FD8 87AB0072 */ lh $t3, 0x0072($sp)
/* 016EC 80896FDC 3C0D8089 */ lui $t5, %hi(D_80897548) ## $t5 = 80890000
/* 016F0 80896FE0 25AD7548 */ addiu $t5, $t5, %lo(D_80897548) ## $t5 = 80897548
/* 016F4 80896FE4 000B6080 */ sll $t4, $t3, 2
/* 016F8 80896FE8 018B6023 */ subu $t4, $t4, $t3
/* 016FC 80896FEC 000C6080 */ sll $t4, $t4, 2
/* 01700 80896FF0 018D1021 */ addu $v0, $t4, $t5
/* 01704 80896FF4 C44C0000 */ lwc1 $f12, 0x0000($v0) ## 00000000
/* 01708 80896FF8 C44E0004 */ lwc1 $f14, 0x0004($v0) ## 00000004
/* 0170C 80896FFC 8C460008 */ lw $a2, 0x0008($v0) ## 00000008
/* 01710 80897000 0C0342A3 */ jal Matrix_Scale
/* 01714 80897004 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01718 80897008 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 0171C 8089700C 3C064220 */ lui $a2, 0x4220 ## $a2 = 42200000
/* 01720 80897010 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01724 80897014 0C034261 */ jal Matrix_Translate
/* 01728 80897018 46006386 */ mov.s $f14, $f12
/* 0172C 8089701C 8FA8005C */ lw $t0, 0x005C($sp)
/* 01730 80897020 3C0FFA00 */ lui $t7, 0xFA00 ## $t7 = FA000000
/* 01734 80897024 24180078 */ addiu $t8, $zero, 0x0078 ## $t8 = 00000078
/* 01738 80897028 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 0173C 8089702C 3C09DA38 */ lui $t1, 0xDA38 ## $t1 = DA380000
/* 01740 80897030 35290003 */ ori $t1, $t1, 0x0003 ## $t1 = DA380003
/* 01744 80897034 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 01748 80897038 AD0E02D0 */ sw $t6, 0x02D0($t0) ## 000002D0
/* 0174C 8089703C AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 01750 80897040 AC580004 */ sw $t8, 0x0004($v0) ## 00000004
/* 01754 80897044 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 01758 80897048 3C058089 */ lui $a1, %hi(D_808976D4) ## $a1 = 80890000
/* 0175C 8089704C 24A576D4 */ addiu $a1, $a1, %lo(D_808976D4) ## $a1 = 808976D4
/* 01760 80897050 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
/* 01764 80897054 AD1902D0 */ sw $t9, 0x02D0($t0) ## 000002D0
/* 01768 80897058 AC490000 */ sw $t1, 0x0000($v0) ## 00000000
/* 0176C 8089705C 8FAA007C */ lw $t2, 0x007C($sp)
/* 01770 80897060 240603E2 */ addiu $a2, $zero, 0x03E2 ## $a2 = 000003E2
/* 01774 80897064 8D440000 */ lw $a0, 0x0000($t2) ## 00000000
/* 01778 80897068 AFA8005C */ sw $t0, 0x005C($sp)
/* 0177C 8089706C 0C0346A2 */ jal Matrix_NewMtx
/* 01780 80897070 AFA20044 */ sw $v0, 0x0044($sp)
/* 01784 80897074 8FA30044 */ lw $v1, 0x0044($sp)
/* 01788 80897078 8FA8005C */ lw $t0, 0x005C($sp)
/* 0178C 8089707C 260D01A3 */ addiu $t5, $s0, 0x01A3 ## $t5 = 000001A3
/* 01790 80897080 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 01794 80897084 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 01798 80897088 2401FFF0 */ addiu $at, $zero, 0xFFF0 ## $at = FFFFFFF0
/* 0179C 8089708C 01A17024 */ and $t6, $t5, $at
/* 017A0 80897090 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 017A4 80897094 AD0B02D0 */ sw $t3, 0x02D0($t0) ## 000002D0
/* 017A8 80897098 3C0CFD90 */ lui $t4, 0xFD90 ## $t4 = FD900000
/* 017AC 8089709C AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 017B0 808970A0 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004
/* 017B4 808970A4 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 017B8 808970A8 3C190708 */ lui $t9, 0x0708 ## $t9 = 07080000
/* 017BC 808970AC 37390200 */ ori $t9, $t9, 0x0200 ## $t9 = 07080200
/* 017C0 808970B0 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008
/* 017C4 808970B4 AD0F02D0 */ sw $t7, 0x02D0($t0) ## 000002D0
/* 017C8 808970B8 3C18F590 */ lui $t8, 0xF590 ## $t8 = F5900000
/* 017CC 808970BC AC580000 */ sw $t8, 0x0000($v0) ## 00000000
/* 017D0 808970C0 AC590004 */ sw $t9, 0x0004($v0) ## 00000004
/* 017D4 808970C4 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 017D8 808970C8 3C0AE600 */ lui $t2, 0xE600 ## $t2 = E6000000
/* 017DC 808970CC 3C0D077F */ lui $t5, 0x077F ## $t5 = 077F0000
/* 017E0 808970D0 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
/* 017E4 808970D4 AD0902D0 */ sw $t1, 0x02D0($t0) ## 000002D0
/* 017E8 808970D8 AC400004 */ sw $zero, 0x0004($v0) ## 00000004
/* 017EC 808970DC AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
/* 017F0 808970E0 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 017F4 808970E4 35ADF100 */ ori $t5, $t5, 0xF100 ## $t5 = 077FF100
/* 017F8 808970E8 3C0CF300 */ lui $t4, 0xF300 ## $t4 = F3000000
/* 017FC 808970EC 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 01800 808970F0 AD0B02D0 */ sw $t3, 0x02D0($t0) ## 000002D0
/* 01804 808970F4 AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004
/* 01808 808970F8 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 0180C 808970FC 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 01810 80897100 3C0FE700 */ lui $t7, 0xE700 ## $t7 = E7000000
/* 01814 80897104 3C090008 */ lui $t1, 0x0008 ## $t1 = 00080000
/* 01818 80897108 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 0181C 8089710C AD0E02D0 */ sw $t6, 0x02D0($t0) ## 000002D0
/* 01820 80897110 AC400004 */ sw $zero, 0x0004($v0) ## 00000004
/* 01824 80897114 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 01828 80897118 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 0182C 8089711C 3C19F588 */ lui $t9, 0xF588 ## $t9 = F5880000
/* 01830 80897120 37391000 */ ori $t9, $t9, 0x1000 ## $t9 = F5881000
/* 01834 80897124 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 01838 80897128 AD1802D0 */ sw $t8, 0x02D0($t0) ## 000002D0
/* 0183C 8089712C 35290200 */ ori $t1, $t1, 0x0200 ## $t1 = 00080200
/* 01840 80897130 AC490004 */ sw $t1, 0x0004($v0) ## 00000004
/* 01844 80897134 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 01848 80897138 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 0184C 8089713C 3C0C000F */ lui $t4, 0x000F ## $t4 = 000F0000
/* 01850 80897140 358CC0FC */ ori $t4, $t4, 0xC0FC ## $t4 = 000FC0FC
/* 01854 80897144 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008
/* 01858 80897148 AD0A02D0 */ sw $t2, 0x02D0($t0) ## 000002D0
/* 0185C 8089714C 3C0BF200 */ lui $t3, 0xF200 ## $t3 = F2000000
/* 01860 80897150 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000
/* 01864 80897154 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004
/* 01868 80897158 8D0202D0 */ lw $v0, 0x02D0($t0) ## 000002D0
/* 0186C 8089715C 3C0F8089 */ lui $t7, %hi(D_808972B0) ## $t7 = 80890000
/* 01870 80897160 25EF72B0 */ addiu $t7, $t7, %lo(D_808972B0) ## $t7 = 808972B0
/* 01874 80897164 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008
/* 01878 80897168 AD0D02D0 */ sw $t5, 0x02D0($t0) ## 000002D0
/* 0187C 8089716C 3C0EDE00 */ lui $t6, 0xDE00 ## $t6 = DE000000
/* 01880 80897170 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
/* 01884 80897174 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 01888 80897178 8FB8007C */ lw $t8, 0x007C($sp)
/* 0188C 8089717C 3C068089 */ lui $a2, %hi(D_808976E8) ## $a2 = 80890000
/* 01890 80897180 24C676E8 */ addiu $a2, $a2, %lo(D_808976E8) ## $a2 = 808976E8
/* 01894 80897184 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4
/* 01898 80897188 240703EE */ addiu $a3, $zero, 0x03EE ## $a3 = 000003EE
/* 0189C 8089718C 0C031AD5 */ jal Graph_CloseDisps
/* 018A0 80897190 8F050000 */ lw $a1, 0x0000($t8) ## 00000008
/* 018A4 80897194 8FBF001C */ lw $ra, 0x001C($sp)
/* 018A8 80897198 8FB00018 */ lw $s0, 0x0018($sp)
/* 018AC 8089719C 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000
/* 018B0 808971A0 03E00008 */ jr $ra
/* 018B4 808971A4 00000000 */ nop

View file

@ -1,52 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel D_80897270
.word 0xFCE00000, 0xFCE00000, 0x00000800, 0xFFFFFFFF, 0x03200000, 0xFCE00000, 0x08000800, 0xFFFFFFFF, 0x03200000, 0x03200000, 0x08000000, 0xFFFFFFFF, 0xFCE00000, 0x03200000, 0x00000000, 0xFFFFFFFF
glabel D_808972B0
.word 0xE7000000, 0x00000000, 0xFC3097FF, 0xFFFFFE38, 0xE200001C, 0x0C184DD8, 0xD9F0FBFF, 0x00000000, 0x01004008
.word D_80897270
.word 0x06000204, 0x00000406, 0xDF000000, 0x00000000
glabel Bg_Jya_Cobra_InitVars
.word 0x00FC0600, 0x00000010, 0x00F10000, 0x000011A4
.word BgJyaCobra_Init
.word BgJyaCobra_Destroy
.word BgJyaCobra_Update
.word BgJyaCobra_Draw
glabel D_80897308
.word 0x00000000, 0x00000000
glabel D_80897310
.word 0x01000100
glabel D_80897314
.word 0xC0000000, 0x40000000
glabel D_8089731C
.word 0x00002080, 0x80808080, 0x20000000, 0x2080A0A3, 0xA3A3A080, 0x20002080, 0xA0A5A6A6, 0xA6A5A080, 0x2080A0A5, 0xA6A6A6A6, 0xA6A5A080, 0x80A3A6A6, 0xA6A6A6A6, 0xA6A38080, 0xA3A6A6A6, 0xA6A6A6A6, 0xA38080A3, 0xA6A6A6A6, 0xA6A6A6A3, 0x8080A0A5, 0xA6A6A6A6, 0xA6A5A080, 0x2080A0A5, 0xA6A6A6A5, 0xA0802000, 0x2080A0A3, 0xA3A3A080, 0x20000000, 0x20808080, 0x80802000, 0x00000000
glabel D_80897398
.word 0x20802080, 0xA0802080, 0x20000000
glabel D_808973A4
.word 0xC0C00000, 0x42C80000, 0x40F33333
glabel D_808973B0
.word 0xC149999A, 0x428A6667, 0xC1200000, 0xC1100000, 0x422C0000, 0xBF800000, 0xC0400000, 0x41700000, 0x4109999A, 0xC109999A, 0x41700000, 0x41580000, 0xC0D33333, 0x41D00000, 0x4139999A, 0xC1480000, 0x422C0000, 0x41000000, 0xC189999A, 0x428C0000, 0x3F19999A, 0xC1000000, 0x42C80000, 0x40F33333, 0x40C00000, 0x42C80000, 0x40F33333, 0x4149999A, 0x428A6667, 0xC1200000, 0x41100000, 0x422C0000, 0xBF800000, 0x40400000, 0x41700000, 0x4109999A, 0x4109999A, 0x41700000, 0x41580000, 0x40D33333, 0x41D00000, 0x4139999A, 0x41480000, 0x422C0000, 0x41000000, 0x4189999A, 0x428C0000, 0x3F19999A, 0x41000000, 0x42C80000, 0x40F33333, 0x00000000, 0x428C0000, 0xC134CCCD, 0x00000000, 0x42326667, 0xC0000000, 0x00000000, 0x41700000, 0x4129999A, 0x00000000, 0x41700000, 0x3E99999A, 0x00000000, 0x41D00000, 0x4139999A, 0x00000000, 0x42B0CCCD, 0xBFB33333, 0x00000000, 0x42BF6667, 0x416E6667, 0x00000000, 0x42CACCCD, 0x40A00000
glabel D_808974DC
.word 0x41400000, 0x41AA6667, 0xC0200000
glabel D_808974E8
.word 0x41F00000, 0x41AA6667, 0xC0200000, 0xC1700000, 0x41AA6667, 0xC0200000, 0xC1F00000, 0x41AA6667, 0xC0200000, 0x41400000, 0x41AA6667, 0xC0200000
glabel D_80897518
.word 0x00000080, 0x000000A0, 0x000000A0, 0x00000080
glabel D_80897528
.word 0xC8500064, 0xB0F403E8, 0xB0F80320, 0x30FC03E8
glabel D_80897538
.word 0x0000C000, 0x00000000
glabel D_80897540
.word 0x00004000, 0x00000000
glabel D_80897548
.word 0x3DCCCCCD, 0x3DCCCCCD, 0x3DCCCCCD, 0x3D9374BC, 0x3D9374BC, 0x3D9374BC, 0x3DCCCCCD, 0x3DCCCCCD, 0x3E072B02, 0x00000000

5
spec
View file

@ -952,8 +952,11 @@ endseg
beginseg
name "ovl_Bg_Jya_Cobra"
include "build/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.o"
include "build/data/overlays/actors/z_bg_jya_cobra.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra_reloc.o"
#else
include "build/data/overlays/actors/z_bg_jya_cobra.reloc.o"
#endif
endseg
beginseg

View file

@ -10,13 +10,6 @@
#define THIS ((BgJyaBigmirror*)thisx)
#define BIGMIR_PUZZLE_COBRA1_SOLVED 1 << 0
#define BIGMIR_PUZZLE_COBRA2_SOLVED 1 << 1
#define BIGMIR_PUZZLE_BOMBIWA_DESTROYED 1 << 2
#define BIGMIR_PUZZLE_IN_STATUE_ROOM 1 << 3
#define BIGMIR_PUZZLE_IN_1ST_TOP_ROOM 1 << 4
#define BIGMIR_PUZZLE_IN_2ND_TOP_ROOM 1 << 5
void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBigmirror_Update(Actor* thisx, GlobalContext* globalCtx);
@ -81,7 +74,7 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) {
curCobraInfo = &this->cobraInfo[i];
if (curCobraInfo->cobra != NULL) {
curCobraInfo->rotY = curCobraInfo->cobra->actor.shape.rot.y;
curCobraInfo->rotY = curCobraInfo->cobra->dyna.actor.shape.rot.y;
if (curCobraInfo->rotY == curSpawnData->solvedRotY) {
this->puzzleFlags |= cobraPuzzleFlags[i];
@ -89,7 +82,7 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) {
this->puzzleFlags &= ~cobraPuzzleFlags[i];
}
if (curCobraInfo->cobra->actor.update == NULL) {
if (curCobraInfo->cobra->dyna.actor.update == NULL) {
// Cobra deleted
osSyncPrintf("Error : コブラ削除された (%s %d)\n", "../z_bg_jya_bigmirror.c", 203);
}
@ -99,7 +92,7 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) {
curSpawnData->pos.y, curSpawnData->pos.z, 0, curCobraInfo->rotY, 0, curSpawnData->params);
this->actor.child = NULL;
if (&curCobraInfo->cobra->actor == NULL) {
if (&curCobraInfo->cobra->dyna.actor == NULL) {
// Cobra generation failed
osSyncPrintf("Error : コブラ発生失敗 (%s %d)\n", "../z_bg_jya_bigmirror.c", 221);
}
@ -110,11 +103,11 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < 2; i++) {
curCobraInfo = &this->cobraInfo[i];
if (curCobraInfo->cobra != NULL) {
if (curCobraInfo->cobra->actor.child != NULL) {
Actor_Kill(curCobraInfo->cobra->actor.child);
curCobraInfo->cobra->actor.child = NULL;
if (curCobraInfo->cobra->dyna.actor.child != NULL) {
Actor_Kill(curCobraInfo->cobra->dyna.actor.child);
curCobraInfo->cobra->dyna.actor.child = NULL;
}
Actor_Kill(&curCobraInfo->cobra->actor);
Actor_Kill(&curCobraInfo->cobra->dyna.actor);
curCobraInfo->cobra = NULL;
}
}

View file

@ -5,6 +5,13 @@
#include "global.h"
#include "overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h"
#define BIGMIR_PUZZLE_COBRA1_SOLVED (1 << 0)
#define BIGMIR_PUZZLE_COBRA2_SOLVED (1 << 1)
#define BIGMIR_PUZZLE_BOMBIWA_DESTROYED (1 << 2)
#define BIGMIR_PUZZLE_IN_STATUE_ROOM (1 << 3)
#define BIGMIR_PUZZLE_IN_1ST_TOP_ROOM (1 << 4)
#define BIGMIR_PUZZLE_IN_2ND_TOP_ROOM (1 << 5)
struct BgJyaBigmirror;
typedef struct {

View file

@ -1,4 +1,7 @@
#include "z_bg_jya_cobra.h"
#include "overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h"
#include "overlays/actors/ovl_Mir_Ray/z_mir_ray.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -9,12 +12,35 @@ void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJyaCobra_Update(Actor* thisx, GlobalContext* globalCtx);
void BgJyaCobra_Draw(Actor* thisx, GlobalContext* globalCtx);
extern UNK_TYPE D_06010790;
extern UNK_TYPE D_06010C20;
void func_80896918(BgJyaCobra* this, GlobalContext* globalCtx);
void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx);
void func_808969F8(BgJyaCobra* this, GlobalContext* globalCtx);
void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx);
extern Gfx D_06010790[];
extern Gfx D_06010C20[];
extern UNK_TYPE D_0601167C;
extern UNK_TYPE D_060117D0;
extern Gfx D_060117D0[];
Vtx D_80897270[] = {
VTX(-800, 0, -800, 0, 2048, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(800, 0, -800, 2048, 2048, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(800, 0, 800, 2048, 0, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(-800, 0, 800, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF),
};
Gfx D_808972B0[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
gsDPSetRenderMode(AA_EN | Z_CMP | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_DEC | FORCE_BL |
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1),
G_RM_AA_ZB_XLU_DECAL2),
gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR),
gsSPVertex(D_80897270, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
};
/*
const ActorInit Bg_Jya_Cobra_InitVars = {
ACTOR_BG_JYA_COBRA,
ACTORCAT_PROP,
@ -26,41 +52,637 @@ const ActorInit Bg_Jya_Cobra_InitVars = {
(ActorFunc)BgJyaCobra_Update,
(ActorFunc)BgJyaCobra_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808958F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_8089593C.s")
s16 D_80897308[] = { 0, 0, 0, 0 };
u8 D_80897310[] = { 1, 0, 1, 0 };
s16 D_80897314[] = { -0x4000, 0000, 0x4000, 0000 };
u8 D_8089731C[11][11] = {
{ 0x00, 0x00, 0x20, 0x80, 0x80, 0x80, 0x80, 0x80, 0x20, 0x00, 0x00 },
{ 0x00, 0x20, 0x80, 0xA0, 0xA3, 0xA3, 0xA3, 0xA0, 0x80, 0x20, 0x00 },
{ 0x20, 0x80, 0xA0, 0xA5, 0xA6, 0xA6, 0xA6, 0xA5, 0xA0, 0x80, 0x20 },
{ 0x80, 0xA0, 0xA5, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA5, 0xA0, 0x80 },
{ 0x80, 0xA3, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA3, 0x80 },
{ 0x80, 0xA3, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA3, 0x80 },
{ 0x80, 0xA3, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA3, 0x80 },
{ 0x80, 0xA0, 0xA5, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA5, 0xA0, 0x80 },
{ 0x20, 0x80, 0xA0, 0xA5, 0xA6, 0xA6, 0xA6, 0xA5, 0xA0, 0x80, 0x20 },
{ 0x00, 0x20, 0x80, 0xA0, 0xA3, 0xA3, 0xA3, 0xA0, 0x80, 0x20, 0x00 },
{ 0x00, 0x00, 0x20, 0x80, 0x80, 0x80, 0x80, 0x80, 0x20, 0x00, 0x00 },
};
u8 D_80897398[3][3] = {
{ 0x20, 0x80, 0x20 },
{ 0x80, 0xA0, 0x80 },
{ 0x20, 0x80, 0x20 },
};
Vec3f D_808973A4[] = {
{ -6.0f, 100.0f, 7.6f },
{ -12.6f, 69.200005f, -10.0f },
{ -9.0f, 43.0f, -1.0f },
{ -3.0f, 15.0f, 8.6f },
{ -8.6f, 15.0f, 13.5f },
{ -6.6f, 26.0f, 11.6f },
{ -12.5f, 43.0f, 8.0f },
{ -17.2f, 70.0f, 0.6f },
{ -8.0f, 100.0f, 7.6f },
{ 6.0f, 100.0f, 7.6f },
{ 12.6f, 69.200005f, -10.0f },
{ 9.0f, 43.0f, -1.0f },
{ 3.0f, 15.0f, 8.6f },
{ 8.6f, 15.0f, 13.5f },
{ 6.6f, 26.0f, 11.6f },
{ 12.5f, 43.0f, 8.0f },
{ 17.2f, 70.0f, 0.6f },
{ 8.0f, 100.0f, 7.6f },
{ 0.0f, 70.0f, -11.3f },
{ 0.0f, 44.6000023f, -2.0f },
{ 0.0f, 15.0f, 10.6f },
{ 0.0f, 15.0f, 0.3f },
{ 0.0f, 26.0f, 11.6f },
{ 0.0f, 88.4f, -1.4f },
{ 0.0f, 95.700005f, 14.900001f },
{ 0.0f, 101.4f, 5.0f },
};
Vec3f D_808974DC[] = {
{ 12.0f, 21.3000011f, -2.5f }, { 30.0f, 21.3000011f, -2.5f }, { -15.0f, 21.3000011f, -2.5f },
{ -30.0f, 21.3000011f, -2.5f }, { 12.0f, 21.3000011f, -2.5f },
};
s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808959C4.s")
InitChainEntry D_80897528[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
Vec3s D_80897538 = { 0, -0x4000, 0 };
Vec3s D_80897540 = { 0, 0x4000, 0 };
Vec3f D_80897548[] = {
{ 0.1f, 0.1f, 0.1f },
{ 0.072f, 0.072f, 0.072f },
{ 0.1f, 0.1f, 0.132f },
};
void func_808958F0(Vec3f* dest, Vec3f* src, f32 arg2, f32 arg3) {
dest->x = (src->z * arg2) + (src->x * arg3);
dest->y = src->y;
dest->z = (src->z * arg3) - (src->x * arg2);
}
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, void* arg2, DynaPolyMoveFlag flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(arg2, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
// Warning : move BG Registration Failure
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_cobra.c", 247,
this->dyna.actor.id, this->dyna.actor.params);
}
}
void BgJyaCobra_SpawnRay(BgJyaCobra* this, GlobalContext* globalCtx) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_MIR_RAY, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y + 57.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 6);
if (this->dyna.actor.child == NULL) {
osSyncPrintf(VT_FGCOL(RED));
// : Mir Ray occurrence failure
osSyncPrintf(" : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270);
osSyncPrintf(VT_RST);
}
}
#ifdef NON_MATCHING
// minor register and stack diffs
void func_80895A70(BgJyaCobra* this) {
s32 pad;
BgJyaBigmirror* temp_v1;
MirRay* phi_v0;
Vec3f sp28;
MirRay* temp;
temp_v1 = (BgJyaBigmirror*)this->dyna.actor.parent;
switch (this->dyna.actor.params & 3) {
case 0:
temp = (MirRay*)this->dyna.actor.child;
if (this->dyna.actor.child != NULL) {
phi_v0 = temp;
if (phi_v0->actor.update == NULL) {
this->dyna.actor.child = NULL;
return;
}
} else {
return;
}
break;
case 1:
phi_v0 = temp_v1->lightBeams[1];
if (phi_v0 == NULL) {
return;
}
break;
case 2:
phi_v0 = temp_v1->lightBeams[2];
if (phi_v0 == NULL) {
return;
}
break;
}
if (this->unk_18C <= 0.0f) {
phi_v0->unLit = 1;
return;
}
phi_v0->unLit = 0;
Math_Vec3f_Copy(&phi_v0->sourcePt, &this->unk_180);
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
Matrix_RotateX(D_80897308[this->dyna.actor.params & 3] * (M_PI / 0x8000), MTXMODE_APPLY);
sp28.x = 0.0f;
sp28.y = 0.0;
sp28.z = this->unk_190 * 2800.0f;
Matrix_MultVec3f(&sp28, &phi_v0->poolPt);
Math_Vec3f_Sum(&phi_v0->sourcePt, &phi_v0->poolPt, &phi_v0->poolPt);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895A70.s")
#endif
void func_80895BEC(BgJyaCobra* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 pad;
Vec3f sp2C;
func_808958F0(&sp2C, &this->unk_174, Math_SinS(this->unk_170), Math_CosS(this->unk_170));
player->actor.world.pos.x = this->dyna.actor.world.pos.x + sp2C.x;
player->actor.world.pos.y = this->dyna.actor.world.pos.y + sp2C.y;
player->actor.world.pos.z = this->dyna.actor.world.pos.z + sp2C.z;
}
#ifdef NON_MATCHING
// Small stack diffs
void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
s16 phi_v0;
s32 params = this->dyna.actor.params;
BgJyaBigmirror* parent = (BgJyaBigmirror*)this->dyna.actor.parent;
f32 phi_f0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895BEC.s")
if ((params & 3) == 2 && parent != NULL &&
(!(parent->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED) ||
!(parent->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED))) {
Math_StepToF(&this->unk_18C, 0.0f, 0.05f);
} else {
this->unk_18C = 1.0f;
if (D_80897310[(params & 3)] != 0) {
phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[(params & 3)];
phi_v0 = ABS(phi_v0);
if (phi_v0 < 0x2000 && phi_v0 != -0x8000) {
this->unk_18C += ((phi_v0 - 0x2000) * 0.00018310547f);
if (this->unk_18C < 0.0f) {
this->unk_18C = 0.0f;
}
}
}
}
this->unk_180.x = this->dyna.actor.world.pos.x;
this->unk_180.y = this->dyna.actor.world.pos.y + 57.0f;
this->unk_180.z = this->dyna.actor.world.pos.z;
if (!(params & 3)) {
this->unk_190 = 0.1f;
} else if ((params & 3) == 1) {
phi_f0 = 0.1f;
phi_v0 = this->dyna.actor.shape.rot.y - 0x8000;
if (phi_v0 < 0x500 && phi_v0 > -0x500) {
phi_f0 = 0.34f;
} else {
phi_v0 = this->dyna.actor.shape.rot.y - 0x4000;
if (phi_v0 < 0x500 && phi_v0 > -0x500 && parent != NULL &&
(parent->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED)) {
phi_f0 = 0.34f;
}
}
Math_StepToF(&this->unk_190, phi_f0, 0.04f);
} else if ((params & 3) == 2) {
phi_f0 = 0.1f;
phi_v0 = this->dyna.actor.shape.rot.y - 0x8000;
if (phi_v0 < 0x500 && phi_v0 > -0x500) {
phi_f0 = 0.34f;
} else {
phi_v0 = this->dyna.actor.shape.rot.y + 0xFFFF4000;
if (phi_v0 < 0x500 && phi_v0 > -0x500) {
phi_f0 = 0.34f;
}
}
Math_StepToF(&this->unk_190, phi_f0, 0.04f);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895C74.s")
#endif
#ifdef NON_MATCHING
// Repeatedly calculates temp_z * 0x40 for temp_s2[temp_z] rather than calculating it once when temp_z is assigned.
// Making temp_z volatile or accessing through a pointer variable in if (!(temp_z & ~0x3F)) fix the above issue but are
// obviously wrong.
/*
* Updates the shadow with light coming from the side of the mirror
*/
void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
Vec3f spD4;
Vec3f spC8;
Vec3f spBC;
u8(*temp_s2)[0x40];
s32 temp_x;
s32 temp_z;
s32 x;
s32 z;
s32 i;
s32 j;
s32 k;
s32 l;
temp_s2 = (u8(*)[0x40])ALIGN16((s32)(&this->shadowTexture));
Lib_MemSet((u8*)temp_s2, 0x1000, 0);
Matrix_RotateX((M_PI / 4), MTXMODE_NEW);
Matrix_RotateY((!(this->dyna.actor.params & 3) ? (s16)(this->dyna.actor.shape.rot.y + 0x4000)
: (s16)(this->dyna.actor.shape.rot.y - 0x4000)) *
(M_PI / 0x8000),
MTXMODE_APPLY);
Matrix_Scale(0.9f, 0.9f, 0.9f, MTXMODE_APPLY);
for (i = 0; i < 25; i++) {
Math_Vec3f_Diff(&D_808973A4[i + 1], &D_808973A4[i], &spD4);
spD4.x *= 0.5f;
spD4.y *= 0.5f;
spD4.z *= 0.5f;
for (j = 0; j < 2; j++) {
spC8.x = D_808973A4[i].x + (spD4.x * j);
spC8.y = D_808973A4[i].y + (spD4.y * j);
spC8.z = D_808973A4[i].z + (spD4.z * j);
Matrix_MultVec3f(&spC8, &spBC);
x = (s32)(((spBC.x + 50.0f) * 0.64f) + 0.5f);
z = (s32)(((88.0f - spBC.z) * 0.64f) + 0.5f);
for (k = 0; k < 11; k++) {
temp_z = z - 5 + k;
if (!(temp_z & ~0x3F)) {
for (l = 0; l < 11; l++) {
temp_x = (x - 5 + l);
if (!(temp_x & ~0x3F)) {
temp_s2[temp_z][temp_x] |= D_8089731C[k][l];
}
}
}
}
}
}
for (i = 0; i < 4; i++) {
Math_Vec3f_Diff(&D_808974DC[i + 1], &D_808974DC[i], &spD4);
spD4.x = spD4.x * 0.2f;
spD4.y = spD4.y * 0.2f;
spD4.z = spD4.z * 0.2f;
for (j = 0; j < 5; j++) {
spC8.x = D_808974DC[i].x + (spD4.x * j);
spC8.y = D_808974DC[i].y + (spD4.y * j);
spC8.z = D_808974DC[i].z + (spD4.z * j);
Matrix_MultVec3f(&spC8, &spBC);
x = (s32)(((spBC.x + 50.0f) * 0.64f) + 0.5f);
z = (s32)(((88.0f - spBC.z) * 0.64f) + 0.5f);
for (k = 0; k < 3; k++) {
temp_z = z - 1 + k;
if (!(temp_z & ~0x3F)) {
for (l = 0; l < 3; l++) {
temp_x = x - 1 + l;
if (!(temp_x & ~0x3F)) {
temp_s2[temp_z][temp_x] |= D_80897398[k][l];
}
}
}
}
}
}
for (i = 0; i < 0x40; i++) {
temp_s2[0][i] = 0;
temp_s2[0x3F][i] = 0;
}
for (j = 1; j < 0x3F; j++) {
temp_s2[j][0] = 0;
temp_s2[j][0x3F] = 0;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_UpdateShadowFromSide.s")
#endif
#ifdef NON_MATCHING
// minor register and stack diffs
/*
* Updates the shadow with light coming from above the mirror
*/
void BgJyaCobra_UpdateShadowFromTop(BgJyaCobra* this) {
f32 sp58[0x40];
f32 temp_f12;
f32 temp_f2;
u8* temp_s0;
s32 i_copy;
u8* phi_a3;
s32 counter;
s32 i;
s32 j;
for (i = 0; i < 0x40; i++) {
sp58[i] = SQ(i - 31.5f);
}
temp_s0 = (u8*)ALIGN16((s32)(&this->shadowTexture));
phi_a3 = temp_s0;
Lib_MemSet(temp_s0, 0x1000, 0);
for (i = 0; i != 0x40; i++) {
temp_f12 = sp58[i];
for (j = 0; j < 0x40; j++) {
temp_f2 = (sp58[j] * 0.5f) + temp_f12;
if (temp_f2 < 300.0f) {
*phi_a3 |= CLAMP_MAX(640 - (s32)(temp_f2 * 2.0f), 166);
}
phi_a3++;
}
}
for (counter = 0, i = 0x780; counter < 4; counter++, i += 0x40) {
i_copy = i;
for (j = 4; j < 0x3C; j++) {
if (temp_s0[i + j] < D_80897518[counter]) {
temp_s0[i + j] = D_80897518[counter];
}
}
temp_s0[i_copy + 0x3C] = 0x20;
temp_s0[i_copy + 0x3] = 0x20;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_UpdateShadowFromTop.s")
#endif
void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
BgJyaCobra_InitDynapoly(this, globalCtx, &D_0601167C, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, D_80897528);
if (!(this->dyna.actor.params & 3) && Flags_GetSwitch(globalCtx, ((s32)this->dyna.actor.params >> 8) & 0x3F)) {
this->dyna.actor.world.rot.y = this->dyna.actor.home.rot.y = this->dyna.actor.shape.rot.y = 0;
}
if (!(this->dyna.actor.params & 3)) {
BgJyaCobra_SpawnRay(this, globalCtx);
}
func_80896918(this, globalCtx);
if ((this->dyna.actor.params & 3) == 1 || (this->dyna.actor.params & 3) == 2) {
this->dyna.actor.room = -1;
}
if ((this->dyna.actor.params & 3) == 1) {
BgJyaCobra_UpdateShadowFromTop(this);
}
// (jya cobra)
osSyncPrintf("(jya コブラ)(arg_data 0x%04x)(act %x)(txt %x)(txt16 %x)\n", this->dyna.actor.params, this,
&this->shadowTexture, ALIGN16((s32)(&this->shadowTexture)));
}
void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void func_80896918(BgJyaCobra* this, GlobalContext* globalCtx) {
this->actionFunc = &func_80896950;
this->unk_168 = 0;
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y =
(s16)((this->unk_16C << 0xD) + this->dyna.actor.home.rot.y);
}
void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (this->dyna.unk_150 > 0.001f) {
this->unk_168++;
if (this->unk_168 >= 15) {
func_808969F8(this, globalCtx);
}
} else {
this->unk_168 = 0;
}
if (fabsf(this->dyna.unk_150) > 0.001f) {
this->dyna.unk_150 = 0.0f;
player->stateFlags2 &= ~0x10;
}
}
void func_808969F8(BgJyaCobra* this, GlobalContext* globalCtx) {
Player* player;
s32 phi_a3;
s16 temp2;
player = PLAYER;
this->actionFunc = func_80896ABC;
temp2 = this->dyna.actor.yawTowardsPlayer - this->dyna.actor.shape.rot.y;
phi_a3 = (s16)(this->dyna.actor.shape.rot.y - this->dyna.unk_158);
phi_a3 = ABS(phi_a3);
if (temp2 > 0) {
if (phi_a3 > 0x4000) {
this->unk_16A = 1;
} else {
this->unk_16A = -1;
}
} else {
if (phi_a3 > 0x4000) {
this->unk_16A = -1;
} else {
this->unk_16A = 1;
}
}
this->unk_174.x = player->actor.world.pos.x - this->dyna.actor.world.pos.x;
this->unk_174.y = player->actor.world.pos.y - this->dyna.actor.world.pos.y;
this->unk_174.z = player->actor.world.pos.z - this->dyna.actor.world.pos.z;
this->unk_170 = this->unk_16E = 0;
this->unk_172 = 1;
}
void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) {
s16 temp_v0;
Player* player;
player = PLAYER;
temp_v0 = (s16)((this->unk_16C << 0xD) + this->dyna.actor.home.rot.y) - this->dyna.actor.world.rot.y;
if (ABS(temp_v0) < 7424) {
Math_StepToS(&this->unk_16E, 106, 4);
} else {
Math_StepToS(&this->unk_16E, 21, 10);
}
if (Math_ScaledStepToS(&this->unk_170, (s16)(this->unk_16A << 0xd), this->unk_16E) != 0) {
this->unk_16C = (this->unk_16C + this->unk_16A) & 7;
player->stateFlags2 &= ~0x10;
this->dyna.unk_150 = 0.0f;
func_80896918(this, globalCtx);
} else {
temp_v0 = (this->unk_16C << 0xD) + this->dyna.actor.home.rot.y + this->unk_170;
this->dyna.actor.world.rot.y = temp_v0;
this->dyna.actor.shape.rot.y = temp_v0;
}
if (player->stateFlags2 & 0x10) {
if (this->unk_172 != 0) {
func_80895BEC(this, globalCtx);
}
} else if (fabsf(this->dyna.unk_150) < 0.001f) {
this->unk_172 = 0;
}
this->dyna.unk_150 = 0.0f;
func_8002F974(&this->dyna.actor, 0x200A);
}
void BgJyaCobra_Update(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
s32 params;
this->actionFunc(this, globalCtx);
func_80895C74(this, globalCtx);
func_80895A70(this);
params = this->dyna.actor.params & 3;
if (params == 0 || params == 2) {
BgJyaCobra_UpdateShadowFromSide(this);
}
}
void func_80896CB4(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 864);
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 867),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_06010C20);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 872);
}
void func_80896D78(BgJyaCobra* this, GlobalContext* globalCtx) {
s32 pad;
Vec3s sp44;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 924);
func_80093D84(globalCtx->state.gfxCtx);
sp44.x = D_80897308[this->dyna.actor.params & 3] + this->dyna.actor.shape.rot.x;
sp44.y = this->dyna.actor.shape.rot.y;
sp44.z = this->dyna.actor.shape.rot.z;
func_800D1694(this->unk_180.x, this->unk_180.y, this->unk_180.z, &sp44);
Matrix_Scale(0.1f, 0.1f, this->unk_190, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 939),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s32)(this->unk_18C * 140.0f));
gSPDisplayList(POLY_XLU_DISP++, D_060117D0);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 947);
}
void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
u32 pad;
s16 params;
Vec3f sp64;
Vec3s* phi_a3;
if (1) {}
params = this->dyna.actor.params & 3;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895EF0.s")
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 966);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896518.s")
func_80094044(globalCtx->state.gfxCtx);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_Init.s")
if (params == 0) {
sp64.x = this->dyna.actor.world.pos.x - 50.0f;
sp64.y = this->dyna.actor.world.pos.y;
sp64.z = this->dyna.actor.world.pos.z;
phi_a3 = &D_80897538;
} else {
phi_a3 = &this->dyna.actor.shape.rot;
if (params == 2) {
sp64.x = this->dyna.actor.world.pos.x + 70.0f;
sp64.y = this->dyna.actor.world.pos.y;
sp64.z = this->dyna.actor.world.pos.z;
phi_a3 = &D_80897540;
// params == 1
} else {
Math_Vec3f_Copy(&sp64, &this->dyna.actor.world.pos);
}
}
func_800D1694(sp64.x, sp64.y, sp64.z, phi_a3);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_Destroy.s")
Matrix_Scale(D_80897548[params].x, D_80897548[params].y, D_80897548[params].z, MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, 40.0f, MTXMODE_APPLY);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896918.s")
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 120);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 994),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896950.s")
gDPLoadTextureBlock(POLY_XLU_DISP++, ALIGN16((s32)(&this->shadowTexture)), G_IM_FMT_I, G_IM_SIZ_8b, 0x40, 0x40, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808969F8.s")
gSPDisplayList(POLY_XLU_DISP++, D_808972B0);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896ABC.s")
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 1006);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_Update.s")
void BgJyaCobra_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896CB4.s")
func_80896CB4(globalCtx);
Gfx_DrawDListOpa(globalCtx, D_06010790);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896D78.s")
if (this->unk_18C > 0.0f) {
func_80896D78(this, globalCtx);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80896EE4.s")
if ((this->dyna.actor.params & 3) == 2) {
BgJyaBigmirror* mirror = (BgJyaBigmirror*)this->dyna.actor.parent;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_Draw.s")
if (mirror != NULL && (mirror->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED) &&
(mirror->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED)) {
BgJyaCobra_DrawShadow(this, globalCtx);
}
} else {
BgJyaCobra_DrawShadow(this, globalCtx);
}
}

View file

@ -6,9 +6,22 @@
struct BgJyaCobra;
typedef void (*BgJyaCobraActionFunc)(struct BgJyaCobra*, GlobalContext*);
typedef struct BgJyaCobra {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x1058];
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgJyaCobraActionFunc actionFunc;
/* 0x0168 */ s16 unk_168;
/* 0x016A */ s16 unk_16A;
/* 0x016C */ s16 unk_16C;
/* 0x016E */ s16 unk_16E;
/* 0x0170 */ s16 unk_170;
/* 0x0172 */ u8 unk_172;
/* 0x0174 */ Vec3f unk_174;
/* 0x0180 */ Vec3f unk_180;
/* 0x018C */ f32 unk_18C;
/* 0x0190 */ f32 unk_190;
/* 0x0194 */ u8 shadowTexture[0x1010];
} BgJyaCobra; // size = 0x11A4
extern const ActorInit Bg_Jya_Cobra_InitVars;

View file

@ -567,6 +567,12 @@ D_060014E0 = 0x060014E0;
D_060053D0 = 0x060053D0;
D_06007564 = 0x06007564;
// z_bg_jya_cobra
D_0601167C = 0x0601167C;
D_06010790 = 0x06010790;
D_06010C20 = 0x06010C20;
D_060117D0 = 0x060117D0;
// z_en_lightbox
D_06001F10 = 0x06001F10;
D_06000B70 = 0x06000B70;