1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

OnePointDemo OK (#719)

* matches

* more matches

* progress?

* it's time

* so close

* organize declarations

* docs

* more fixes

* more fixes

* fix stage 1

* more fixes

* first try

* demo ids in decimal

* final cleanup

* one more thing

* fixes

* more cleanup

* onepointcs

* OnePointCutscene

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
petrie911 2021-03-31 11:18:31 -05:00 committed by GitHub
parent 28cfd82a4f
commit 9b4482314a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 3949 additions and 7571 deletions

View file

@ -1,35 +0,0 @@
glabel func_8007C680
/* AF3820 8007C680 27BDFFD0 */ addiu $sp, $sp, -0x30
/* AF3824 8007C684 AFBF0014 */ sw $ra, 0x14($sp)
/* AF3828 8007C688 AFA40030 */ sw $a0, 0x30($sp)
/* AF382C 8007C68C 00A03825 */ move $a3, $a1
/* AF3830 8007C690 AFA70034 */ sw $a3, 0x34($sp)
/* AF3834 8007C694 00C02825 */ move $a1, $a2
/* AF3838 8007C698 0C01F097 */ jal OLib_VecSphGeoToVec3f
/* AF383C 8007C69C 27A40018 */ addiu $a0, $sp, 0x18
/* AF3840 8007C6A0 8FA70034 */ lw $a3, 0x34($sp)
/* AF3844 8007C6A4 C7A60018 */ lwc1 $f6, 0x18($sp)
/* AF3848 8007C6A8 C7B0001C */ lwc1 $f16, 0x1c($sp)
/* AF384C 8007C6AC C4E40000 */ lwc1 $f4, ($a3)
/* AF3850 8007C6B0 27AE0024 */ addiu $t6, $sp, 0x24
/* AF3854 8007C6B4 8FA20030 */ lw $v0, 0x30($sp)
/* AF3858 8007C6B8 46062200 */ add.s $f8, $f4, $f6
/* AF385C 8007C6BC C7A60020 */ lwc1 $f6, 0x20($sp)
/* AF3860 8007C6C0 E7A80024 */ swc1 $f8, 0x24($sp)
/* AF3864 8007C6C4 C4EA0004 */ lwc1 $f10, 4($a3)
/* AF3868 8007C6C8 46105480 */ add.s $f18, $f10, $f16
/* AF386C 8007C6CC E7B20028 */ swc1 $f18, 0x28($sp)
/* AF3870 8007C6D0 C4E40008 */ lwc1 $f4, 8($a3)
/* AF3874 8007C6D4 46062200 */ add.s $f8, $f4, $f6
/* AF3878 8007C6D8 E7A8002C */ swc1 $f8, 0x2c($sp)
/* AF387C 8007C6DC 8DD80000 */ lw $t8, ($t6)
/* AF3880 8007C6E0 AC580000 */ sw $t8, ($v0)
/* AF3884 8007C6E4 8DCF0004 */ lw $t7, 4($t6)
/* AF3888 8007C6E8 AC4F0004 */ sw $t7, 4($v0)
/* AF388C 8007C6EC 8DD80008 */ lw $t8, 8($t6)
/* AF3890 8007C6F0 AC580008 */ sw $t8, 8($v0)
/* AF3894 8007C6F4 8FBF0014 */ lw $ra, 0x14($sp)
/* AF3898 8007C6F8 27BD0030 */ addiu $sp, $sp, 0x30
/* AF389C 8007C6FC 03E00008 */ jr $ra
/* AF38A0 8007C700 00000000 */ nop

View file

@ -1,36 +0,0 @@
.late_rodata
glabel D_8013CE40
.float 57.295776
glabel D_8013CE44
.float 182.04167
.text
glabel func_8007C704
/* AF38A4 8007C704 27BDFFE8 */ addiu $sp, $sp, -0x18
/* AF38A8 8007C708 AFBF0014 */ sw $ra, 0x14($sp)
/* AF38AC 8007C70C C48A0008 */ lwc1 $f10, 8($a0)
/* AF38B0 8007C710 C4A80008 */ lwc1 $f8, 8($a1)
/* AF38B4 8007C714 C4860000 */ lwc1 $f6, ($a0)
/* AF38B8 8007C718 C4A40000 */ lwc1 $f4, ($a1)
/* AF38BC 8007C71C 460A4381 */ sub.s $f14, $f8, $f10
/* AF38C0 8007C720 0C03F494 */ jal Math_FAtan2F
/* AF38C4 8007C724 46062301 */ sub.s $f12, $f4, $f6
/* AF38C8 8007C728 3C018014 */ lui $at, %hi(D_8013CE40)
/* AF38CC 8007C72C C430CE40 */ lwc1 $f16, %lo(D_8013CE40)($at)
/* AF38D0 8007C730 3C018014 */ lui $at, %hi(D_8013CE44)
/* AF38D4 8007C734 C424CE44 */ lwc1 $f4, %lo(D_8013CE44)($at)
/* AF38D8 8007C738 46100482 */ mul.s $f18, $f0, $f16
/* AF38DC 8007C73C 3C013F00 */ li $at, 0x3F000000 # 0.000000
/* AF38E0 8007C740 44814000 */ mtc1 $at, $f8
/* AF38E4 8007C744 8FBF0014 */ lw $ra, 0x14($sp)
/* AF38E8 8007C748 27BD0018 */ addiu $sp, $sp, 0x18
/* AF38EC 8007C74C 46049182 */ mul.s $f6, $f18, $f4
/* AF38F0 8007C750 46083280 */ add.s $f10, $f6, $f8
/* AF38F4 8007C754 4600540D */ trunc.w.s $f16, $f10
/* AF38F8 8007C758 44028000 */ mfc1 $v0, $f16
/* AF38FC 8007C75C 00000000 */ nop
/* AF3900 8007C760 00021400 */ sll $v0, $v0, 0x10
/* AF3904 8007C764 03E00008 */ jr $ra
/* AF3908 8007C768 00021403 */ sra $v0, $v0, 0x10

View file

@ -1,22 +0,0 @@
glabel func_8007C7A8
/* AF3948 8007C7A8 27BDFFB8 */ addiu $sp, $sp, -0x48
/* AF394C 8007C7AC AFBF002C */ sw $ra, 0x2c($sp)
/* AF3950 8007C7B0 27AE0034 */ addiu $t6, $sp, 0x34
/* AF3954 8007C7B4 27A80038 */ addiu $t0, $sp, 0x38
/* AF3958 8007C7B8 240F0001 */ li $t7, 1
/* AF395C 8007C7BC 24180001 */ li $t8, 1
/* AF3960 8007C7C0 24190001 */ li $t9, 1
/* AF3964 8007C7C4 AFA00034 */ sw $zero, 0x34($sp)
/* AF3968 8007C7C8 AFB9001C */ sw $t9, 0x1c($sp)
/* AF396C 8007C7CC AFB80018 */ sw $t8, 0x18($sp)
/* AF3970 8007C7D0 AFAF0014 */ sw $t7, 0x14($sp)
/* AF3974 8007C7D4 AFA80024 */ sw $t0, 0x24($sp)
/* AF3978 8007C7D8 AFAE0010 */ sw $t6, 0x10($sp)
/* AF397C 8007C7DC 27A7003C */ addiu $a3, $sp, 0x3c
/* AF3980 8007C7E0 0C00F75B */ jal BgCheck_CameraLineTest1
/* AF3984 8007C7E4 AFA00020 */ sw $zero, 0x20($sp)
/* AF3988 8007C7E8 8FBF002C */ lw $ra, 0x2c($sp)
/* AF398C 8007C7EC 27BD0048 */ addiu $sp, $sp, 0x48
/* AF3990 8007C7F0 03E00008 */ jr $ra
/* AF3994 8007C7F4 00000000 */ nop

File diff suppressed because it is too large Load diff

View file

@ -1,19 +0,0 @@
glabel func_8007FFE0
/* AF7180 8007FFE0 AFA60008 */ sw $a2, 8($sp)
/* AF7184 8007FFE4 00063400 */ sll $a2, $a2, 0x10
/* AF7188 8007FFE8 AFA50004 */ sw $a1, 4($sp)
/* AF718C 8007FFEC 00052C00 */ sll $a1, $a1, 0x10
/* AF7190 8007FFF0 00063403 */ sra $a2, $a2, 0x10
/* AF7194 8007FFF4 00052C03 */ sra $a1, $a1, 0x10
/* AF7198 8007FFF8 00067080 */ sll $t6, $a2, 2
/* AF719C 8007FFFC 008E3821 */ addu $a3, $a0, $t6
/* AF71A0 80080000 0005C080 */ sll $t8, $a1, 2
/* AF71A4 80080004 8CEF0790 */ lw $t7, 0x790($a3)
/* AF71A8 80080008 0098C821 */ addu $t9, $a0, $t8
/* AF71AC 8008000C 8F280790 */ lw $t0, 0x790($t9)
/* AF71B0 80080010 85E2014E */ lh $v0, 0x14e($t7)
/* AF71B4 80080014 A5060162 */ sh $a2, 0x162($t0)
/* AF71B8 80080018 8CE90790 */ lw $t1, 0x790($a3)
/* AF71BC 8008001C 03E00008 */ jr $ra
/* AF71C0 80080020 A525014E */ sh $a1, 0x14e($t1)

View file

@ -1,58 +0,0 @@
glabel func_80080024
/* AF71C4 80080024 27BDFFE0 */ addiu $sp, $sp, -0x20
/* AF71C8 80080028 AFA50024 */ sw $a1, 0x24($sp)
/* AF71CC 8008002C 00052C00 */ sll $a1, $a1, 0x10
/* AF71D0 80080030 00052C03 */ sra $a1, $a1, 0x10
/* AF71D4 80080034 00057080 */ sll $t6, $a1, 2
/* AF71D8 80080038 AFBF0014 */ sw $ra, 0x14($sp)
/* AF71DC 8008003C 008E7821 */ addu $t7, $a0, $t6
/* AF71E0 80080040 8DE20790 */ lw $v0, 0x790($t7)
/* AF71E4 80080044 8458014E */ lh $t8, 0x14e($v0)
/* AF71E8 80080048 8C47008C */ lw $a3, 0x8c($v0)
/* AF71EC 8008004C 84460164 */ lh $a2, 0x164($v0)
/* AF71F0 80080050 0018C880 */ sll $t9, $t8, 2
/* AF71F4 80080054 00F94021 */ addu $t0, $a3, $t9
/* AF71F8 80080058 8D030790 */ lw $v1, 0x790($t0)
/* AF71FC 8008005C 2408FFFF */ li $t0, -1
/* AF7200 80080060 84690162 */ lh $t1, 0x162($v1)
/* AF7204 80080064 54C90006 */ bnel $a2, $t1, .L80080080
/* AF7208 80080068 844B0162 */ lh $t3, 0x162($v0)
/* AF720C 8008006C 844A0162 */ lh $t2, 0x162($v0)
/* AF7210 80080070 A46A0162 */ sh $t2, 0x162($v1)
/* AF7214 80080074 8C47008C */ lw $a3, 0x8c($v0)
/* AF7218 80080078 84460164 */ lh $a2, 0x164($v0)
/* AF721C 8008007C 844B0162 */ lh $t3, 0x162($v0)
.L80080080:
/* AF7220 80080080 000B6080 */ sll $t4, $t3, 2
/* AF7224 80080084 00EC6821 */ addu $t5, $a3, $t4
/* AF7228 80080088 8DA30790 */ lw $v1, 0x790($t5)
/* AF722C 8008008C 846E014E */ lh $t6, 0x14e($v1)
/* AF7230 80080090 54CE0006 */ bnel $a2, $t6, .L800800AC
/* AF7234 80080094 849807A0 */ lh $t8, 0x7a0($a0)
/* AF7238 80080098 844F014E */ lh $t7, 0x14e($v0)
/* AF723C 8008009C A46F014E */ sh $t7, 0x14e($v1)
/* AF7240 800800A0 8C47008C */ lw $a3, 0x8c($v0)
/* AF7244 800800A4 84460164 */ lh $a2, 0x164($v0)
/* AF7248 800800A8 849807A0 */ lh $t8, 0x7a0($a0)
.L800800AC:
/* AF724C 800800AC 2403FFFF */ li $v1, -1
/* AF7250 800800B0 00E02025 */ move $a0, $a3
/* AF7254 800800B4 14B80003 */ bne $a1, $t8, .L800800C4
/* AF7258 800800B8 00000000 */ nop
/* AF725C 800800BC 10000001 */ b .L800800C4
/* AF7260 800800C0 84430162 */ lh $v1, 0x162($v0)
.L800800C4:
/* AF7264 800800C4 A4400162 */ sh $zero, 0x162($v0)
/* AF7268 800800C8 84590162 */ lh $t9, 0x162($v0)
/* AF726C 800800CC A4480160 */ sh $t0, 0x160($v0)
/* AF7270 800800D0 00062C00 */ sll $a1, $a2, 0x10
/* AF7274 800800D4 A459014E */ sh $t9, 0x14e($v0)
/* AF7278 800800D8 AFA30018 */ sw $v1, 0x18($sp)
/* AF727C 800800DC 0C0300E1 */ jal Gameplay_ClearCamera
/* AF7280 800800E0 00052C03 */ sra $a1, $a1, 0x10
/* AF7284 800800E4 8FBF0014 */ lw $ra, 0x14($sp)
/* AF7288 800800E8 8FA20018 */ lw $v0, 0x18($sp)
/* AF728C 800800EC 27BD0020 */ addiu $sp, $sp, 0x20
/* AF7290 800800F0 03E00008 */ jr $ra
/* AF7294 800800F4 00000000 */ nop

View file

@ -1,219 +0,0 @@
.rdata
glabel D_8013CC18
.asciz "\x1b[41;37monepoint demo: error: too many cameras ... give up! type=%d\n\x1b[m"
.balign 4
glabel D_8013CC60
.asciz "\x1b[43;30monepointdemo camera[%d]: killed 'coz low priority (%d < %d)\n\x1b[m"
.balign 4
.text
glabel func_800800F8
/* AF7298 800800F8 27BDFFB8 */ addiu $sp, $sp, -0x48
/* AF729C 800800FC AFB10020 */ sw $s1, 0x20($sp)
/* AF72A0 80080100 87B1005A */ lh $s1, 0x5a($sp)
/* AF72A4 80080104 AFB70038 */ sw $s7, 0x38($sp)
/* AF72A8 80080108 AFB50030 */ sw $s5, 0x30($sp)
/* AF72AC 8008010C AFB4002C */ sw $s4, 0x2c($sp)
/* AF72B0 80080110 0005A400 */ sll $s4, $a1, 0x10
/* AF72B4 80080114 0006AC00 */ sll $s5, $a2, 0x10
/* AF72B8 80080118 2417FFFF */ li $s7, -1
/* AF72BC 8008011C AFB30028 */ sw $s3, 0x28($sp)
/* AF72C0 80080120 00809825 */ move $s3, $a0
/* AF72C4 80080124 0015AC03 */ sra $s5, $s5, 0x10
/* AF72C8 80080128 0014A403 */ sra $s4, $s4, 0x10
/* AF72CC 8008012C AFBF003C */ sw $ra, 0x3c($sp)
/* AF72D0 80080130 AFB60034 */ sw $s6, 0x34($sp)
/* AF72D4 80080134 AFB20024 */ sw $s2, 0x24($sp)
/* AF72D8 80080138 AFB0001C */ sw $s0, 0x1c($sp)
/* AF72DC 8008013C AFA5004C */ sw $a1, 0x4c($sp)
/* AF72E0 80080140 AFA60050 */ sw $a2, 0x50($sp)
/* AF72E4 80080144 16370002 */ bne $s1, $s7, .L80080150
/* AF72E8 80080148 AFA70054 */ sw $a3, 0x54($sp)
/* AF72EC 8008014C 849107A0 */ lh $s1, 0x7a0($a0)
.L80080150:
/* AF72F0 80080150 0C03008C */ jal Gameplay_CreateSubCamera
/* AF72F4 80080154 02602025 */ move $a0, $s3
/* AF72F8 80080158 14570007 */ bne $v0, $s7, .L80080178
/* AF72FC 8008015C A7A20042 */ sh $v0, 0x42($sp)
/* AF7300 80080160 3C048014 */ lui $a0, %hi(D_8013CC18) # $a0, 0x8014
/* AF7304 80080164 2484CC18 */ addiu $a0, %lo(D_8013CC18) # addiu $a0, $a0, -0x33e8
/* AF7308 80080168 0C00084C */ jal osSyncPrintf
/* AF730C 8008016C 02802825 */ move $a1, $s4
/* AF7310 80080170 10000094 */ b .L800803C4
/* AF7314 80080174 2402FFFF */ li $v0, -1
.L80080178:
/* AF7318 80080178 00117080 */ sll $t6, $s1, 2
/* AF731C 8008017C 026E7821 */ addu $t7, $s3, $t6
/* AF7320 80080180 8DF80790 */ lw $t8, 0x790($t7)
/* AF7324 80080184 24100007 */ li $s0, 7
/* AF7328 80080188 02602025 */ move $a0, $s3
/* AF732C 8008018C 8712014E */ lh $s2, 0x14e($t8)
/* AF7330 80080190 87A60042 */ lh $a2, 0x42($sp)
/* AF7334 80080194 1A400005 */ blez $s2, .L800801AC
/* AF7338 80080198 00122C00 */ sll $a1, $s2, 0x10
/* AF733C 8008019C 0C01FFF8 */ jal func_8007FFE0
/* AF7340 800801A0 00052C03 */ sra $a1, $a1, 0x10
/* AF7344 800801A4 10000003 */ b .L800801B4
/* AF7348 800801A8 24100001 */ li $s0, 1
.L800801AC:
/* AF734C 800801AC 0C020978 */ jal Interface_ChangeAlpha
/* AF7350 800801B0 24040002 */ li $a0, 2
.L800801B4:
/* AF7354 800801B4 00113400 */ sll $a2, $s1, 0x10
/* AF7358 800801B8 00063403 */ sra $a2, $a2, 0x10
/* AF735C 800801BC 02602025 */ move $a0, $s3
/* AF7360 800801C0 0C01FFF8 */ jal func_8007FFE0
/* AF7364 800801C4 87A50042 */ lh $a1, 0x42($sp)
/* AF7368 800801C8 87B90042 */ lh $t9, 0x42($sp)
/* AF736C 800801CC 00112C00 */ sll $a1, $s1, 0x10
/* AF7370 800801D0 24060003 */ li $a2, 3
/* AF7374 800801D4 00194080 */ sll $t0, $t9, 2
/* AF7378 800801D8 0268B021 */ addu $s6, $s3, $t0
/* AF737C 800801DC 8EC30790 */ lw $v1, 0x790($s6)
/* AF7380 800801E0 00052C03 */ sra $a1, $a1, 0x10
/* AF7384 800801E4 02602025 */ move $a0, $s3
/* AF7388 800801E8 A4750160 */ sh $s5, 0x160($v1)
/* AF738C 800801EC 8FA90054 */ lw $t1, 0x54($sp)
/* AF7390 800801F0 AC6900A8 */ sw $t1, 0xa8($v1)
/* AF7394 800801F4 8E6B00EC */ lw $t3, 0xec($s3)
/* AF7398 800801F8 AC6B0050 */ sw $t3, 0x50($v1)
/* AF739C 800801FC 8E6A00F0 */ lw $t2, 0xf0($s3)
/* AF73A0 80080200 AC6A0054 */ sw $t2, 0x54($v1)
/* AF73A4 80080204 8E6B00F4 */ lw $t3, 0xf4($s3)
/* AF73A8 80080208 AC6B0058 */ sw $t3, 0x58($v1)
/* AF73AC 8008020C 8E6D00E0 */ lw $t5, 0xe0($s3)
/* AF73B0 80080210 AC6D005C */ sw $t5, 0x5c($v1)
/* AF73B4 80080214 8E6C00E4 */ lw $t4, 0xe4($s3)
/* AF73B8 80080218 AC6C0060 */ sw $t4, 0x60($v1)
/* AF73BC 8008021C 8E6D00E8 */ lw $t5, 0xe8($s3)
/* AF73C0 80080220 AC6D0064 */ sw $t5, 0x64($v1)
/* AF73C4 80080224 C66400D0 */ lwc1 $f4, 0xd0($s3)
/* AF73C8 80080228 A4740168 */ sh $s4, 0x168($v1)
/* AF73CC 8008022C 16200007 */ bnez $s1, .L8008024C
/* AF73D0 80080230 E46400FC */ swc1 $f4, 0xfc($v1)
/* AF73D4 80080234 00112C00 */ sll $a1, $s1, 0x10
/* AF73D8 80080238 00052C03 */ sra $a1, $a1, 0x10
/* AF73DC 8008023C 0C0300C5 */ jal Gameplay_ChangeCameraStatus
/* AF73E0 80080240 02602025 */ move $a0, $s3
/* AF73E4 80080244 10000004 */ b .L80080258
/* AF73E8 80080248 00143400 */ sll $a2, $s4, 0x10
.L8008024C:
/* AF73EC 8008024C 0C0300C5 */ jal Gameplay_ChangeCameraStatus
/* AF73F0 80080250 24060001 */ li $a2, 1
/* AF73F4 80080254 00143400 */ sll $a2, $s4, 0x10
.L80080258:
/* AF73F8 80080258 00063403 */ sra $a2, $a2, 0x10
/* AF73FC 8008025C 02602025 */ move $a0, $s3
/* AF7400 80080260 87A50042 */ lh $a1, 0x42($sp)
/* AF7404 80080264 8FA70054 */ lw $a3, 0x54($sp)
/* AF7408 80080268 0C01F214 */ jal func_8007C850
/* AF740C 8008026C AFB50010 */ sw $s5, 0x10($sp)
/* AF7410 80080270 00103400 */ sll $a2, $s0, 0x10
/* AF7414 80080274 00063403 */ sra $a2, $a2, 0x10
/* AF7418 80080278 02602025 */ move $a0, $s3
/* AF741C 8008027C 0C0300C5 */ jal Gameplay_ChangeCameraStatus
/* AF7420 80080280 87A50042 */ lh $a1, 0x42($sp)
/* AF7424 80080284 8ECE0790 */ lw $t6, 0x790($s6)
/* AF7428 80080288 87B20042 */ lh $s2, 0x42($sp)
/* AF742C 8008028C 24151392 */ li $s5, 5010
/* AF7430 80080290 85D0014E */ lh $s0, 0x14e($t6)
/* AF7434 80080294 24140064 */ li $s4, 100
/* AF7438 80080298 1A000049 */ blez $s0, .L800803C0
/* AF743C 8008029C 00107880 */ sll $t7, $s0, 2
.L800802A0:
/* AF7440 800802A0 026F8821 */ addu $s1, $s3, $t7
/* AF7444 800802A4 8E380790 */ lw $t8, 0x790($s1)
/* AF7448 800802A8 8ED90790 */ lw $t9, 0x790($s6)
/* AF744C 800802AC 87060168 */ lh $a2, 0x168($t8)
/* AF7450 800802B0 87270168 */ lh $a3, 0x168($t9)
/* AF7454 800802B4 00D4001A */ div $zero, $a2, $s4
/* AF7458 800802B8 00004012 */ mflo $t0
/* AF745C 800802BC 16800002 */ bnez $s4, .L800802C8
/* AF7460 800802C0 00000000 */ nop
/* AF7464 800802C4 0007000D */ break 7
.L800802C8:
/* AF7468 800802C8 2401FFFF */ li $at, -1
/* AF746C 800802CC 16810004 */ bne $s4, $at, .L800802E0
/* AF7470 800802D0 3C018000 */ lui $at, 0x8000
/* AF7474 800802D4 14C10002 */ bne $a2, $at, .L800802E0
/* AF7478 800802D8 00000000 */ nop
/* AF747C 800802DC 0006000D */ break 6
.L800802E0:
/* AF7480 800802E0 00F4001A */ div $zero, $a3, $s4
/* AF7484 800802E4 16800002 */ bnez $s4, .L800802F0
/* AF7488 800802E8 00000000 */ nop
/* AF748C 800802EC 0007000D */ break 7
.L800802F0:
/* AF7490 800802F0 2401FFFF */ li $at, -1
/* AF7494 800802F4 16810004 */ bne $s4, $at, .L80080308
/* AF7498 800802F8 3C018000 */ lui $at, 0x8000
/* AF749C 800802FC 14E10002 */ bne $a3, $at, .L80080308
/* AF74A0 80080300 00000000 */ nop
/* AF74A4 80080304 0006000D */ break 6
.L80080308:
/* AF74A8 80080308 00004812 */ mflo $t1
/* AF74AC 8008030C 0109082A */ slt $at, $t0, $t1
/* AF74B0 80080310 50200024 */ beql $at, $zero, .L800803A4
/* AF74B4 80080314 00109400 */ sll $s2, $s0, 0x10
/* AF74B8 80080318 3C048014 */ lui $a0, %hi(D_8013CC60) # $a0, 0x8014
/* AF74BC 8008031C 2484CC60 */ addiu $a0, %lo(D_8013CC60) # addiu $a0, $a0, -0x33a0
/* AF74C0 80080320 0C00084C */ jal osSyncPrintf
/* AF74C4 80080324 02002825 */ move $a1, $s0
/* AF74C8 80080328 8E2A0790 */ lw $t2, 0x790($s1)
/* AF74CC 8008032C 00126080 */ sll $t4, $s2, 2
/* AF74D0 80080330 00102C00 */ sll $a1, $s0, 0x10
/* AF74D4 80080334 854B0168 */ lh $t3, 0x168($t2)
/* AF74D8 80080338 026C8821 */ addu $s1, $s3, $t4
/* AF74DC 8008033C 00052C03 */ sra $a1, $a1, 0x10
/* AF74E0 80080340 12AB0011 */ beq $s5, $t3, .L80080388
/* AF74E4 80080344 02602025 */ move $a0, $s3
/* AF74E8 80080348 00102C00 */ sll $a1, $s0, 0x10
/* AF74EC 8008034C 00052C03 */ sra $a1, $a1, 0x10
/* AF74F0 80080350 0C020009 */ jal func_80080024
/* AF74F4 80080354 02602025 */ move $a0, $s3
/* AF74F8 80080358 00026C00 */ sll $t5, $v0, 0x10
/* AF74FC 8008035C 000D7403 */ sra $t6, $t5, 0x10
/* AF7500 80080360 00028400 */ sll $s0, $v0, 0x10
/* AF7504 80080364 12EE0012 */ beq $s7, $t6, .L800803B0
/* AF7508 80080368 00108403 */ sra $s0, $s0, 0x10
/* AF750C 8008036C 00102C00 */ sll $a1, $s0, 0x10
/* AF7510 80080370 00052C03 */ sra $a1, $a1, 0x10
/* AF7514 80080374 02602025 */ move $a0, $s3
/* AF7518 80080378 0C0300C5 */ jal Gameplay_ChangeCameraStatus
/* AF751C 8008037C 24060007 */ li $a2, 7
/* AF7520 80080380 1000000C */ b .L800803B4
/* AF7524 80080384 8E390790 */ lw $t9, 0x790($s1)
.L80080388:
/* AF7528 80080388 00109400 */ sll $s2, $s0, 0x10
/* AF752C 8008038C 0C0200FC */ jal func_800803F0
/* AF7530 80080390 00129403 */ sra $s2, $s2, 0x10
/* AF7534 80080394 00127880 */ sll $t7, $s2, 2
/* AF7538 80080398 10000005 */ b .L800803B0
/* AF753C 8008039C 026F8821 */ addu $s1, $s3, $t7
/* AF7540 800803A0 00109400 */ sll $s2, $s0, 0x10
.L800803A4:
/* AF7544 800803A4 00129403 */ sra $s2, $s2, 0x10
/* AF7548 800803A8 0012C080 */ sll $t8, $s2, 2
/* AF754C 800803AC 02788821 */ addu $s1, $s3, $t8
.L800803B0:
/* AF7550 800803B0 8E390790 */ lw $t9, 0x790($s1)
.L800803B4:
/* AF7554 800803B4 8730014E */ lh $s0, 0x14e($t9)
/* AF7558 800803B8 5E00FFB9 */ bgtzl $s0, .L800802A0
/* AF755C 800803BC 00107880 */ sll $t7, $s0, 2
.L800803C0:
/* AF7560 800803C0 87A20042 */ lh $v0, 0x42($sp)
.L800803C4:
/* AF7564 800803C4 8FBF003C */ lw $ra, 0x3c($sp)
/* AF7568 800803C8 8FB0001C */ lw $s0, 0x1c($sp)
/* AF756C 800803CC 8FB10020 */ lw $s1, 0x20($sp)
/* AF7570 800803D0 8FB20024 */ lw $s2, 0x24($sp)
/* AF7574 800803D4 8FB30028 */ lw $s3, 0x28($sp)
/* AF7578 800803D8 8FB4002C */ lw $s4, 0x2c($sp)
/* AF757C 800803DC 8FB50030 */ lw $s5, 0x30($sp)
/* AF7580 800803E0 8FB60034 */ lw $s6, 0x34($sp)
/* AF7584 800803E4 8FB70038 */ lw $s7, 0x38($sp)
/* AF7588 800803E8 03E00008 */ jr $ra
/* AF758C 800803EC 27BD0048 */ addiu $sp, $sp, 0x48

View file

@ -1,47 +0,0 @@
.rdata
glabel D_8013CCA8
.asciz "onepointdemo camera[%d]: delete timer=%d next=%d\n"
.balign 4
.text
glabel func_800803F0
/* AF7590 800803F0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* AF7594 800803F4 AFA50024 */ sw $a1, 0x24($sp)
/* AF7598 800803F8 00052C00 */ sll $a1, $a1, 0x10
/* AF759C 800803FC 00052C03 */ sra $a1, $a1, 0x10
/* AF75A0 80080400 2401FFFF */ li $at, -1
/* AF75A4 80080404 14A10002 */ bne $a1, $at, .L80080410
/* AF75A8 80080408 AFBF0014 */ sw $ra, 0x14($sp)
/* AF75AC 8008040C 848507A0 */ lh $a1, 0x7a0($a0)
.L80080410:
/* AF75B0 80080410 00057080 */ sll $t6, $a1, 2
/* AF75B4 80080414 008E1821 */ addu $v1, $a0, $t6
/* AF75B8 80080418 8C620790 */ lw $v0, 0x790($v1)
/* AF75BC 8008041C 3C048014 */ lui $a0, %hi(D_8013CCA8) # $a0, 0x8014
/* AF75C0 80080420 2484CCA8 */ addiu $a0, %lo(D_8013CCA8) # addiu $a0, $a0, -0x3358
/* AF75C4 80080424 50400012 */ beql $v0, $zero, .L80080470
/* AF75C8 80080428 8FBF0014 */ lw $ra, 0x14($sp)
/* AF75CC 8008042C 84460160 */ lh $a2, 0x160($v0)
/* AF75D0 80080430 84470162 */ lh $a3, 0x162($v0)
/* AF75D4 80080434 A7A50026 */ sh $a1, 0x26($sp)
/* AF75D8 80080438 0C00084C */ jal osSyncPrintf
/* AF75DC 8008043C AFA3001C */ sw $v1, 0x1c($sp)
/* AF75E0 80080440 8FA3001C */ lw $v1, 0x1c($sp)
/* AF75E4 80080444 24011392 */ li $at, 5010
/* AF75E8 80080448 87A50026 */ lh $a1, 0x26($sp)
/* AF75EC 8008044C 8C620790 */ lw $v0, 0x790($v1)
/* AF75F0 80080450 24180005 */ li $t8, 5
/* AF75F4 80080454 844F0168 */ lh $t7, 0x168($v0)
/* AF75F8 80080458 55E10004 */ bnel $t7, $at, .L8008046C
/* AF75FC 8008045C A4400160 */ sh $zero, 0x160($v0)
/* AF7600 80080460 10000002 */ b .L8008046C
/* AF7604 80080464 A4580160 */ sh $t8, 0x160($v0)
/* AF7608 80080468 A4400160 */ sh $zero, 0x160($v0)
.L8008046C:
/* AF760C 8008046C 8FBF0014 */ lw $ra, 0x14($sp)
.L80080470:
/* AF7610 80080470 27BD0020 */ addiu $sp, $sp, 0x20
/* AF7614 80080474 00A01025 */ move $v0, $a1
/* AF7618 80080478 03E00008 */ jr $ra
/* AF761C 8008047C 00000000 */ nop

View file

@ -1,209 +0,0 @@
.rdata
glabel D_8013CCDC
.asciz "\x1b[43;30mactor attention demo camera: canceled by other camera\n\x1b[m"
.balign 4
glabel D_8013CD20
.asciz "\x1b[43;30mactor attention demo camera: change mode BOOKEEPON -> NORMAL\n\x1b[m"
.balign 4
glabel D_8013CD6C
.asciz "\x1b[43;30mactor attention demo camera: %d: unkown part of actor %d\n\x1b[m"
.balign 4
glabel D_8013CDB4
.asciz "\x1b[36m%06u:\x1b[m actor attention demo camera: request %d "
.balign 4
glabel D_8013CDEC
.asciz " \x1b[35m×\x1b[m (%d)\n"
# EUC-JP: [35m×[m (%d)
.balign 4
glabel D_8013CE00
.asciz " \x1b[34m\x1b[m (%d)\n"
# EUC-JP: [34m[m (%d)
.balign 4
glabel D_8013CE14
.asciz "\x1b[41;37mactor attention demo: give up! \n\x1b[m"
.balign 4
.late_rodata
glabel jtbl_8013D6D0
.word L800805A0
.word L800805A0
.word L800805A0
.word L800805B0
.word L800805A8
.word L800805B0
.word L800805A0
.word L800805A8
.word L800805B0
.word L800805B0
.word L800805A0
.word L800805A8
.text
glabel func_80080480
/* AF7620 80080480 3C0E8012 */ lui $t6, %hi(D_80120130) # $t6, 0x8012
/* AF7624 80080484 85CE0130 */ lh $t6, %lo(D_80120130)($t6)
/* AF7628 80080488 27BDFFC0 */ addiu $sp, $sp, -0x40
/* AF762C 8008048C AFB10020 */ sw $s1, 0x20($sp)
/* AF7630 80080490 AFB0001C */ sw $s0, 0x1c($sp)
/* AF7634 80080494 00A08025 */ move $s0, $a1
/* AF7638 80080498 00808825 */ move $s1, $a0
/* AF763C 8008049C 11C00006 */ beqz $t6, .L800804B8
/* AF7640 800804A0 AFBF0024 */ sw $ra, 0x24($sp)
/* AF7644 800804A4 3C048014 */ lui $a0, %hi(D_8013CCDC) # $a0, 0x8014
/* AF7648 800804A8 0C00084C */ jal osSyncPrintf
/* AF764C 800804AC 2484CCDC */ addiu $a0, %lo(D_8013CCDC) # addiu $a0, $a0, -0x3324
/* AF7650 800804B0 1000007D */ b .L800806A8
/* AF7654 800804B4 2402FFFF */ li $v0, -1
.L800804B8:
/* AF7658 800804B8 2408FFFF */ li $t0, -1
/* AF765C 800804BC 3C018012 */ lui $at, %hi(D_80120134) # $at, 0x8012
/* AF7660 800804C0 A4280134 */ sh $t0, %lo(D_80120134)($at)
/* AF7664 800804C4 8E260790 */ lw $a2, 0x790($s1)
/* AF7668 800804C8 24010014 */ li $at, 20
/* AF766C 800804CC 3C048014 */ lui $a0, %hi(D_8013CD20) # $a0, 0x8014
/* AF7670 800804D0 84CF0144 */ lh $t7, 0x144($a2)
/* AF7674 800804D4 2484CD20 */ addiu $a0, %lo(D_8013CD20) # addiu $a0, $a0, -0x32e0
/* AF7678 800804D8 55E10009 */ bnel $t7, $at, .L80080500
/* AF767C 800804DC 84C2014E */ lh $v0, 0x14e($a2)
/* AF7680 800804E0 0C00084C */ jal osSyncPrintf
/* AF7684 800804E4 AFA6003C */ sw $a2, 0x3c($sp)
/* AF7688 800804E8 8FA4003C */ lw $a0, 0x3c($sp)
/* AF768C 800804EC 0C016911 */ jal Camera_ChangeMode
/* AF7690 800804F0 00002825 */ move $a1, $zero
/* AF7694 800804F4 8FA6003C */ lw $a2, 0x3c($sp)
/* AF7698 800804F8 2408FFFF */ li $t0, -1
/* AF769C 800804FC 84C2014E */ lh $v0, 0x14e($a2)
.L80080500:
/* AF76A0 80080500 01003825 */ move $a3, $t0
/* AF76A4 80080504 2403002B */ li $v1, 43
/* AF76A8 80080508 10400016 */ beqz $v0, .L80080564
/* AF76AC 8008050C 0002C080 */ sll $t8, $v0, 2
.L80080510:
/* AF76B0 80080510 0238C821 */ addu $t9, $s1, $t8
/* AF76B4 80080514 8F260790 */ lw $a2, 0x790($t9)
/* AF76B8 80080518 50C00013 */ beql $a2, $zero, .L80080568
/* AF76BC 8008051C 920C0002 */ lbu $t4, 2($s0)
/* AF76C0 80080520 84C90142 */ lh $t1, 0x142($a2)
/* AF76C4 80080524 50690006 */ beql $v1, $t1, .L80080540
/* AF76C8 80080528 8CCA00A8 */ lw $t2, 0xa8($a2)
/* AF76CC 8008052C 54E8000E */ bnel $a3, $t0, .L80080568
/* AF76D0 80080530 920C0002 */ lbu $t4, 2($s0)
/* AF76D4 80080534 10000009 */ b .L8008055C
/* AF76D8 80080538 84C2014E */ lh $v0, 0x14e($a2)
/* AF76DC 8008053C 8CCA00A8 */ lw $t2, 0xa8($a2)
.L80080540:
/* AF76E0 80080540 920B0002 */ lbu $t3, 2($s0)
/* AF76E4 80080544 91420002 */ lbu $v0, 2($t2)
/* AF76E8 80080548 004B082A */ slt $at, $v0, $t3
/* AF76EC 8008054C 54200006 */ bnezl $at, .L80080568
/* AF76F0 80080550 920C0002 */ lbu $t4, 2($s0)
/* AF76F4 80080554 00403825 */ move $a3, $v0
/* AF76F8 80080558 84C2014E */ lh $v0, 0x14e($a2)
.L8008055C:
/* AF76FC 8008055C 5440FFEC */ bnezl $v0, .L80080510
/* AF7700 80080560 0002C080 */ sll $t8, $v0, 2
.L80080564:
/* AF7704 80080564 920C0002 */ lbu $t4, 2($s0)
.L80080568:
/* AF7708 80080568 AFAC0028 */ sw $t4, 0x28($sp)
/* AF770C 8008056C 14E80003 */ bne $a3, $t0, .L8008057C
/* AF7710 80080570 8FAD0028 */ lw $t5, 0x28($sp)
/* AF7714 80080574 10000002 */ b .L80080580
/* AF7718 80080578 00001025 */ move $v0, $zero
.L8008057C:
/* AF771C 8008057C 84C20164 */ lh $v0, 0x164($a2)
.L80080580:
/* AF7720 80080580 2DA1000C */ sltiu $at, $t5, 0xc
/* AF7724 80080584 1020000A */ beqz $at, .L800805B0
/* AF7728 80080588 000D6880 */ sll $t5, $t5, 2
/* AF772C 8008058C 3C018014 */ lui $at, %hi(jtbl_8013D6D0)
/* AF7730 80080590 002D0821 */ addu $at, $at, $t5
/* AF7734 80080594 8C2DD6D0 */ lw $t5, %lo(jtbl_8013D6D0)($at)
/* AF7738 80080598 01A00008 */ jr $t5
/* AF773C 8008059C 00000000 */ nop
glabel L800805A0
/* AF7740 800805A0 1000000F */ b .L800805E0
/* AF7744 800805A4 2403001E */ li $v1, 30
glabel L800805A8
/* AF7748 800805A8 1000000D */ b .L800805E0
/* AF774C 800805AC 24030064 */ li $v1, 100
.L800805B0:
glabel L800805B0
/* AF7750 800805B0 3C048014 */ lui $a0, %hi(D_8013CD6C) # $a0, 0x8014
/* AF7754 800805B4 8E25009C */ lw $a1, 0x9c($s1)
/* AF7758 800805B8 AFA70034 */ sw $a3, 0x34($sp)
/* AF775C 800805BC AFA20038 */ sw $v0, 0x38($sp)
/* AF7760 800805C0 2484CD6C */ addiu $a0, %lo(D_8013CD6C) # addiu $a0, $a0, -0x3294
/* AF7764 800805C4 0C00084C */ jal osSyncPrintf
/* AF7768 800805C8 8FA60028 */ lw $a2, 0x28($sp)
/* AF776C 800805CC 920E0002 */ lbu $t6, 2($s0)
/* AF7770 800805D0 8FA20038 */ lw $v0, 0x38($sp)
/* AF7774 800805D4 8FA70034 */ lw $a3, 0x34($sp)
/* AF7778 800805D8 2403001E */ li $v1, 30
/* AF777C 800805DC AFAE0028 */ sw $t6, 0x28($sp)
.L800805E0:
/* AF7780 800805E0 8E25009C */ lw $a1, 0x9c($s1)
/* AF7784 800805E4 3C048014 */ lui $a0, %hi(D_8013CDB4) # $a0, 0x8014
/* AF7788 800805E8 2484CDB4 */ addiu $a0, %lo(D_8013CDB4) # addiu $a0, $a0, -0x324c
/* AF778C 800805EC AFA70034 */ sw $a3, 0x34($sp)
/* AF7790 800805F0 AFA30030 */ sw $v1, 0x30($sp)
/* AF7794 800805F4 AFA20038 */ sw $v0, 0x38($sp)
/* AF7798 800805F8 0C00084C */ jal osSyncPrintf
/* AF779C 800805FC 8FA60028 */ lw $a2, 0x28($sp)
/* AF77A0 80080600 8FA70034 */ lw $a3, 0x34($sp)
/* AF77A4 80080604 920F0002 */ lbu $t7, 2($s0)
/* AF77A8 80080608 8FA20038 */ lw $v0, 0x38($sp)
/* AF77AC 8008060C 8FA30030 */ lw $v1, 0x30($sp)
/* AF77B0 80080610 14EF0007 */ bne $a3, $t7, .L80080630
/* AF77B4 80080614 3C048014 */ lui $a0, %hi(D_8013CE00)
/* AF77B8 80080618 3C048014 */ lui $a0, %hi(D_8013CDEC) # $a0, 0x8014
/* AF77BC 8008061C 2484CDEC */ addiu $a0, %lo(D_8013CDEC) # addiu $a0, $a0, -0x3214
/* AF77C0 80080620 0C00084C */ jal osSyncPrintf
/* AF77C4 80080624 86050000 */ lh $a1, ($s0)
/* AF77C8 80080628 1000001F */ b .L800806A8
/* AF77CC 8008062C 2402FFFF */ li $v0, -1
.L80080630:
/* AF77D0 80080630 86050000 */ lh $a1, ($s0)
/* AF77D4 80080634 AFA30030 */ sw $v1, 0x30($sp)
/* AF77D8 80080638 AFA20038 */ sw $v0, 0x38($sp)
/* AF77DC 8008063C 0C00084C */ jal osSyncPrintf
/* AF77E0 80080640 2484CE00 */ addiu $a0, %lo(D_8013CE00)
/* AF77E4 80080644 8FA30030 */ lw $v1, 0x30($sp)
/* AF77E8 80080648 8FA20038 */ lw $v0, 0x38($sp)
/* AF77EC 8008064C 02202025 */ move $a0, $s1
/* AF77F0 80080650 00033400 */ sll $a2, $v1, 0x10
/* AF77F4 80080654 00063403 */ sra $a2, $a2, 0x10
/* AF77F8 80080658 24051392 */ li $a1, 5010
/* AF77FC 8008065C 02003825 */ move $a3, $s0
/* AF7800 80080660 0C02003E */ jal func_800800F8
/* AF7804 80080664 AFA20010 */ sw $v0, 0x10($sp)
/* AF7808 80080668 2408FFFF */ li $t0, -1
/* AF780C 8008066C 14480007 */ bne $v0, $t0, .L8008068C
/* AF7810 80080670 00403825 */ move $a3, $v0
/* AF7814 80080674 3C048014 */ lui $a0, %hi(D_8013CE14) # $a0, 0x8014
/* AF7818 80080678 2484CE14 */ addiu $a0, %lo(D_8013CE14) # addiu $a0, $a0, -0x31ec
/* AF781C 8008067C 0C00084C */ jal osSyncPrintf
/* AF7820 80080680 86050000 */ lh $a1, ($s0)
/* AF7824 80080684 10000008 */ b .L800806A8
/* AF7828 80080688 2402FFFF */ li $v0, -1
.L8008068C:
/* AF782C 8008068C 0007C080 */ sll $t8, $a3, 2
/* AF7830 80080690 0238C821 */ addu $t9, $s1, $t8
/* AF7834 80080694 8F230790 */ lw $v1, 0x790($t9)
/* AF7838 80080698 24094802 */ li $t1, 18434
/* AF783C 8008069C 00E01025 */ move $v0, $a3
/* AF7840 800806A0 24630128 */ addiu $v1, $v1, 0x128
/* AF7844 800806A4 AC690000 */ sw $t1, ($v1)
.L800806A8:
/* AF7848 800806A8 8FBF0024 */ lw $ra, 0x24($sp)
/* AF784C 800806AC 8FB0001C */ lw $s0, 0x1c($sp)
/* AF7850 800806B0 8FB10020 */ lw $s1, 0x20($sp)
/* AF7854 800806B4 03E00008 */ jr $ra
/* AF7858 800806B8 27BD0040 */ addiu $sp, $sp, 0x40

View file

@ -1,23 +0,0 @@
glabel func_800806BC
/* AF785C 800806BC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* AF7860 800806C0 AFBF0014 */ sw $ra, 0x14($sp)
/* AF7864 800806C4 AFA40018 */ sw $a0, 0x18($sp)
/* AF7868 800806C8 0C020120 */ jal func_80080480
/* AF786C 800806CC AFA60020 */ sw $a2, 0x20($sp)
/* AF7870 800806D0 2401FFFF */ li $at, -1
/* AF7874 800806D4 10410008 */ beq $v0, $at, .L800806F8
/* AF7878 800806D8 00402025 */ move $a0, $v0
/* AF787C 800806DC 8FAE0018 */ lw $t6, 0x18($sp)
/* AF7880 800806E0 00027880 */ sll $t7, $v0, 2
/* AF7884 800806E4 8FB90020 */ lw $t9, 0x20($sp)
/* AF7888 800806E8 01CFC021 */ addu $t8, $t6, $t7
/* AF788C 800806EC 8F030790 */ lw $v1, 0x790($t8)
/* AF7890 800806F0 24630128 */ addiu $v1, $v1, 0x128
/* AF7894 800806F4 AC790000 */ sw $t9, ($v1)
.L800806F8:
/* AF7898 800806F8 8FBF0014 */ lw $ra, 0x14($sp)
/* AF789C 800806FC 27BD0018 */ addiu $sp, $sp, 0x18
/* AF78A0 80080700 00801025 */ move $v0, $a0
/* AF78A4 80080704 03E00008 */ jr $ra
/* AF78A8 80080708 00000000 */ nop

View file

@ -1,30 +0,0 @@
glabel func_80080728
/* AF78C8 80080728 8C820790 */ lw $v0, 0x790($a0)
/* AF78CC 8008072C 2406002B */ li $a2, 43
/* AF78D0 80080730 8443014E */ lh $v1, 0x14e($v0)
/* AF78D4 80080734 10600011 */ beqz $v1, .L8008077C
/* AF78D8 80080738 00037080 */ sll $t6, $v1, 2
.L8008073C:
/* AF78DC 8008073C 008E7821 */ addu $t7, $a0, $t6
/* AF78E0 80080740 8DE20790 */ lw $v0, 0x790($t7)
/* AF78E4 80080744 5040000E */ beql $v0, $zero, .L80080780
/* AF78E8 80080748 00001025 */ move $v0, $zero
/* AF78EC 8008074C 84580142 */ lh $t8, 0x142($v0)
/* AF78F0 80080750 54D8000B */ bnel $a2, $t8, .L80080780
/* AF78F4 80080754 00001025 */ move $v0, $zero
/* AF78F8 80080758 8C5900A8 */ lw $t9, 0xa8($v0)
/* AF78FC 8008075C 93280002 */ lbu $t0, 2($t9)
/* AF7900 80080760 54A80004 */ bnel $a1, $t0, .L80080774
/* AF7904 80080764 8443014E */ lh $v1, 0x14e($v0)
/* AF7908 80080768 03E00008 */ jr $ra
/* AF790C 8008076C 24020001 */ li $v0, 1
/* AF7910 80080770 8443014E */ lh $v1, 0x14e($v0)
.L80080774:
/* AF7914 80080774 5460FFF1 */ bnezl $v1, .L8008073C
/* AF7918 80080778 00037080 */ sll $t6, $v1, 2
.L8008077C:
/* AF791C 8008077C 00001025 */ move $v0, $zero
.L80080780:
/* AF7920 80080780 03E00008 */ jr $ra
/* AF7924 80080784 00000000 */ nop

View file

@ -14,7 +14,7 @@ glabel func_808ACAFC
/* 004C8 808ACB28 3C054270 */ lui $a1, 0x4270 ## $a1 = 42700000 /* 004C8 808ACB28 3C054270 */ lui $a1, 0x4270 ## $a1 = 42700000
/* 004CC 808ACB2C 8FA4001C */ lw $a0, 0x001C($sp) /* 004CC 808ACB2C 8FA4001C */ lw $a0, 0x001C($sp)
/* 004D0 808ACB30 0C020120 */ jal func_80080480 /* 004D0 808ACB30 0C020120 */ jal OnePointCutscene_Attention
/* 004D4 808ACB34 8FA50018 */ lw $a1, 0x0018($sp) /* 004D4 808ACB34 8FA50018 */ lw $a1, 0x0018($sp)
/* 004D8 808ACB38 8FB80018 */ lw $t8, 0x0018($sp) /* 004D8 808ACB38 8FB80018 */ lw $t8, 0x0018($sp)
/* 004DC 808ACB3C 3C0F808B */ lui $t7, %hi(func_808ACB58) ## $t7 = 808B0000 /* 004DC 808ACB3C 3C0F808B */ lui $t7, %hi(func_808ACB58) ## $t7 = 808B0000

View file

@ -29,7 +29,7 @@ glabel func_809999A0
/* 01284 80999A04 240525E7 */ addiu $a1, $zero, 0x25E7 ## $a1 = 000025E7 /* 01284 80999A04 240525E7 */ addiu $a1, $zero, 0x25E7 ## $a1 = 000025E7
/* 01288 80999A08 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7 /* 01288 80999A08 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7
/* 0128C 80999A0C 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000 /* 0128C 80999A0C 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
/* 01290 80999A10 0C02003E */ jal func_800800F8 /* 01290 80999A10 0C02003E */ jal OnePointCutscene_Init
/* 01294 80999A14 AFA00010 */ sw $zero, 0x0010($sp) /* 01294 80999A14 AFA00010 */ sw $zero, 0x0010($sp)
/* 01298 80999A18 8FA40034 */ lw $a0, 0x0034($sp) /* 01298 80999A18 8FA40034 */ lw $a0, 0x0034($sp)
/* 0129C 80999A1C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 0129C 80999A1C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000

View file

@ -22,7 +22,7 @@ glabel func_80999FE4
/* 018B0 8099A030 240525E9 */ addiu $a1, $zero, 0x25E9 ## $a1 = 000025E9 /* 018B0 8099A030 240525E9 */ addiu $a1, $zero, 0x25E9 ## $a1 = 000025E9
/* 018B4 8099A034 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7 /* 018B4 8099A034 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7
/* 018B8 8099A038 8FA70020 */ lw $a3, 0x0020($sp) /* 018B8 8099A038 8FA70020 */ lw $a3, 0x0020($sp)
/* 018BC 8099A03C 0C02003E */ jal func_800800F8 /* 018BC 8099A03C 0C02003E */ jal OnePointCutscene_Init
/* 018C0 8099A040 AFA00010 */ sw $zero, 0x0010($sp) /* 018C0 8099A040 AFA00010 */ sw $zero, 0x0010($sp)
/* 018C4 8099A044 3C06809A */ lui $a2, %hi(D_8099CCA2) ## $a2 = 809A0000 /* 018C4 8099A044 3C06809A */ lui $a2, %hi(D_8099CCA2) ## $a2 = 809A0000
/* 018C8 8099A048 84C6CCA2 */ lh $a2, %lo(D_8099CCA2)($a2) /* 018C8 8099A048 84C6CCA2 */ lh $a2, %lo(D_8099CCA2)($a2)

View file

@ -17,7 +17,7 @@ glabel func_8099A46C
/* 01D24 8099A4A4 240525E8 */ addiu $a1, $zero, 0x25E8 ## $a1 = 000025E8 /* 01D24 8099A4A4 240525E8 */ addiu $a1, $zero, 0x25E8 ## $a1 = 000025E8
/* 01D28 8099A4A8 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7 /* 01D28 8099A4A8 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7
/* 01D2C 8099A4AC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000 /* 01D2C 8099A4AC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
/* 01D30 8099A4B0 0C02003E */ jal func_800800F8 /* 01D30 8099A4B0 0C02003E */ jal OnePointCutscene_Init
/* 01D34 8099A4B4 AFAE002C */ sw $t6, 0x002C($sp) /* 01D34 8099A4B4 AFAE002C */ sw $t6, 0x002C($sp)
/* 01D38 8099A4B8 8FA40034 */ lw $a0, 0x0034($sp) /* 01D38 8099A4B8 8FA40034 */ lw $a0, 0x0034($sp)
/* 01D3C 8099A4BC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 01D3C 8099A4BC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000

View file

@ -37,7 +37,7 @@ glabel func_80B90158
/* 01764 80B901E4 240508A2 */ addiu $a1, $zero, 0x08A2 ## $a1 = 000008A2 /* 01764 80B901E4 240508A2 */ addiu $a1, $zero, 0x08A2 ## $a1 = 000008A2
/* 01768 80B901E8 2406FF9D */ addiu $a2, $zero, 0xFF9D ## $a2 = FFFFFF9D /* 01768 80B901E8 2406FF9D */ addiu $a2, $zero, 0xFF9D ## $a2 = FFFFFF9D
/* 0176C 80B901EC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000 /* 0176C 80B901EC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
/* 01770 80B901F0 0C02003E */ jal func_800800F8 /* 01770 80B901F0 0C02003E */ jal OnePointCutscene_Init
/* 01774 80B901F4 AFA00010 */ sw $zero, 0x0010($sp) /* 01774 80B901F4 AFA00010 */ sw $zero, 0x0010($sp)
/* 01778 80B901F8 8E080004 */ lw $t0, 0x0004($s0) ## 00000004 /* 01778 80B901F8 8E080004 */ lw $t0, 0x0004($s0) ## 00000004
/* 0177C 80B901FC 35090010 */ ori $t1, $t0, 0x0010 ## $t1 = 00000010 /* 0177C 80B901FC 35090010 */ ori $t1, $t0, 0x0010 ## $t1 = 00000010

View file

@ -1,415 +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_80120130
.incbin "baserom.z64", 0xB972D0, 0x4
glabel D_80120134
.incbin "baserom.z64", 0xB972D4, 0x4
glabel D_80120138
.incbin "baserom.z64", 0xB972D8, 0x4
glabel D_8012013C
.incbin "baserom.z64", 0xB972DC, 0xE0
glabel D_8012021C
.incbin "baserom.z64", 0xB973BC, 0xE0
glabel D_801202FC
.incbin "baserom.z64", 0xB9749C, 0x4
glabel D_80120300
.incbin "baserom.z64", 0xB974A0, 0x4
glabel D_80120304
.incbin "baserom.z64", 0xB974A4, 0x4
glabel D_80120308
.incbin "baserom.z64", 0xB974A8, 0x90
glabel D_80120398
.incbin "baserom.z64", 0xB97538, 0x94
glabel D_8012042C
.incbin "baserom.z64", 0xB975CC, 0x4
glabel D_80120430
.incbin "baserom.z64", 0xB975D0, 0x4
glabel D_80120434
.incbin "baserom.z64", 0xB975D4, 0xA0
glabel D_801204D4
.incbin "baserom.z64", 0xB97674, 0xE0
glabel D_801205B4
.incbin "baserom.z64", 0xB97754, 0xE0
glabel D_80120694
.incbin "baserom.z64", 0xB97834, 0x4
glabel D_80120698
.incbin "baserom.z64", 0xB97838, 0x4
glabel D_8012069C
.incbin "baserom.z64", 0xB9783C, 0x4
glabel D_801206A0
.incbin "baserom.z64", 0xB97840, 0xC0
glabel D_80120760
.incbin "baserom.z64", 0xB97900, 0xC0
glabel D_80120820
.incbin "baserom.z64", 0xB979C0, 0xC4
glabel D_801208E4
.incbin "baserom.z64", 0xB97A84, 0x4
glabel D_801208E8
.incbin "baserom.z64", 0xB97A88, 0x4
glabel D_801208EC
.incbin "baserom.z64", 0xB97A8C, 0x10
glabel D_801208FC
.incbin "baserom.z64", 0xB97A9C, 0xC
glabel D_80120908
.incbin "baserom.z64", 0xB97AA8, 0x1C
glabel D_80120924
.incbin "baserom.z64", 0xB97AC4, 0xC
glabel D_80120930
.incbin "baserom.z64", 0xB97AD0, 0x34
glabel D_80120964
.incbin "baserom.z64", 0xB97B04, 0x10
glabel D_80120974
.incbin "baserom.z64", 0xB97B14, 0xC
glabel D_80120980
.incbin "baserom.z64", 0xB97B20, 0x34
glabel D_801209B4
.incbin "baserom.z64", 0xB97B54, 0x10
glabel D_801209C4
.incbin "baserom.z64", 0xB97B64, 0xC
glabel D_801209D0
.incbin "baserom.z64", 0xB97B70, 0x1C
glabel D_801209EC
.incbin "baserom.z64", 0xB97B8C, 0xC
glabel D_801209F8
.incbin "baserom.z64", 0xB97B98, 0x5C
glabel D_80120A54
.incbin "baserom.z64", 0xB97BF4, 0x78
glabel D_80120ACC
.incbin "baserom.z64", 0xB97C6C, 0xC0
glabel D_80120B8C
.incbin "baserom.z64", 0xB97D2C, 0x8
glabel D_80120B94
.incbin "baserom.z64", 0xB97D34, 0x1B0
glabel D_80120D44
.incbin "baserom.z64", 0xB97EE4, 0x8
glabel D_80120D4C
.incbin "baserom.z64", 0xB97EEC, 0x118
glabel D_80120E64
.incbin "baserom.z64", 0xB98004, 0x140
glabel D_80120FA4
.incbin "baserom.z64", 0xB98144, 0xF0
glabel D_80121094
.incbin "baserom.z64", 0xB98234, 0x78
glabel D_8012110C
.incbin "baserom.z64", 0xB982AC, 0x78
glabel D_80121184
.incbin "baserom.z64", 0xB98324, 0x1C
glabel D_801211A0
.incbin "baserom.z64", 0xB98340, 0x34
glabel D_801211D4
.incbin "baserom.z64", 0xB98374, 0x50
glabel D_80121224
.incbin "baserom.z64", 0xB983C4, 0xF0
glabel D_80121314
.incbin "baserom.z64", 0xB984B4, 0x28
glabel D_8012133C
.incbin "baserom.z64", 0xB984DC, 0x1C
glabel D_80121358
.incbin "baserom.z64", 0xB984F8, 0x5C
glabel D_801213B4
.incbin "baserom.z64", 0xB98554, 0xC8
glabel D_8012147C
.incbin "baserom.z64", 0xB9861C, 0xA0
glabel D_8012151C
.incbin "baserom.z64", 0xB986BC, 0x50
glabel D_8012156C
.incbin "baserom.z64", 0xB9870C, 0x50
glabel D_801215BC
.incbin "baserom.z64", 0xB9875C, 0x28
glabel D_801215E4
.incbin "baserom.z64", 0xB98784, 0x190
glabel D_80121774
.incbin "baserom.z64", 0xB98914, 0xA0
glabel D_80121814
.incbin "baserom.z64", 0xB989B4, 0xA0
glabel D_801218B4
.incbin "baserom.z64", 0xB98A54, 0x50
glabel D_80121904
.incbin "baserom.z64", 0xB98AA4, 0x50
glabel D_80121954
.incbin "baserom.z64", 0xB98AF4, 0xF0
glabel D_80121A44
.incbin "baserom.z64", 0xB98BE4, 0x1E0
glabel D_80121C24
.incbin "baserom.z64", 0xB98DC4, 0x10
glabel D_80121C34
.incbin "baserom.z64", 0xB98DD4, 0xC
glabel D_80121C40
.incbin "baserom.z64", 0xB98DE0, 0xFC
glabel D_80121D3C
.incbin "baserom.z64", 0xB98EDC, 0x78
glabel D_80121DB4
.incbin "baserom.z64", 0xB98F54, 0x168
glabel D_80121F1C
.incbin "baserom.z64", 0xB990BC, 0x8
glabel D_80121F24
.incbin "baserom.z64", 0xB990C4, 0x8
glabel D_80121F2C
.incbin "baserom.z64", 0xB990CC, 0xC
glabel D_80121F38
.incbin "baserom.z64", 0xB990D8, 0x84
glabel D_80121FBC
.incbin "baserom.z64", 0xB9915C, 0x10
glabel D_80121FCC
.incbin "baserom.z64", 0xB9916C, 0xC
glabel D_80121FD8
.incbin "baserom.z64", 0xB99178, 0x84
glabel D_8012205C
.incbin "baserom.z64", 0xB991FC, 0x78
glabel D_801220D4
.incbin "baserom.z64", 0xB99274, 0x10
glabel D_801220E4
.incbin "baserom.z64", 0xB99284, 0xC
glabel D_801220F0
.incbin "baserom.z64", 0xB99290, 0xAC
glabel D_8012219C
.incbin "baserom.z64", 0xB9933C, 0x118
glabel D_801222B4
.incbin "baserom.z64", 0xB99454, 0xC8
glabel D_8012237C
.incbin "baserom.z64", 0xB9951C, 0x50
glabel D_801223CC
.incbin "baserom.z64", 0xB9956C, 0xF0
glabel D_801224BC
.incbin "baserom.z64", 0xB9965C, 0x118
glabel D_801225D4
.incbin "baserom.z64", 0xB99774, 0xC8
glabel D_8012269C
.incbin "baserom.z64", 0xB9983C, 0x78
glabel D_80122714
.incbin "baserom.z64", 0xB998B4, 0xA0
glabel D_801227B4
.incbin "baserom.z64", 0xB99954, 0xF0
glabel D_801228A4
.incbin "baserom.z64", 0xB99A44, 0xC8
glabel D_8012296C
.incbin "baserom.z64", 0xB99B0C, 0xA0
glabel D_80122A0C
.incbin "baserom.z64", 0xB99BAC, 0x50
glabel D_80122A5C
.incbin "baserom.z64", 0xB99BFC, 0x140
glabel D_80122B9C
.incbin "baserom.z64", 0xB99D3C, 0x78
glabel D_80122C14
.incbin "baserom.z64", 0xB99DB4, 0x28
glabel D_80122C3C
.incbin "baserom.z64", 0xB99DDC, 0x28
glabel D_80122C64
.incbin "baserom.z64", 0xB99E04, 0x28
glabel D_80122C8C
.incbin "baserom.z64", 0xB99E2C, 0x28
glabel D_80122CB4
.incbin "baserom.z64", 0xB99E54, 0x50
glabel D_80122D04
.incbin "baserom.z64", 0xB99EA4, 0x50
glabel D_80122D54
.incbin "baserom.z64", 0xB99EF4, 0x78
glabel D_80122DCC
.incbin "baserom.z64", 0xB99F6C, 0x78
glabel D_80122E44
.incbin "baserom.z64", 0xB99FE4, 0x230
glabel D_80123074
.incbin "baserom.z64", 0xB9A214, 0xC8
glabel D_8012313C
.incbin "baserom.z64", 0xB9A2DC, 0x78
glabel D_801231B4
.incbin "baserom.z64", 0xB9A354, 0x88
glabel D_8012323C
.incbin "baserom.z64", 0xB9A3DC, 0xC
glabel D_80123248
.incbin "baserom.z64", 0xB9A3E8, 0xC
glabel D_80123254
.incbin "baserom.z64", 0xB9A3F4, 0x10
glabel D_80123264
.incbin "baserom.z64", 0xB9A404, 0xC
glabel D_80123270
.incbin "baserom.z64", 0xB9A410, 0x1C
glabel D_8012328C
.incbin "baserom.z64", 0xB9A42C, 0xC
glabel D_80123298
.incbin "baserom.z64", 0xB9A438, 0xC
glabel D_801232A4
.incbin "baserom.z64", 0xB9A444, 0x10
glabel D_801232B4
.incbin "baserom.z64", 0xB9A454, 0xC
glabel D_801232C0
.incbin "baserom.z64", 0xB9A460, 0xC
glabel D_801232CC
.incbin "baserom.z64", 0xB9A46C, 0xC8
glabel D_80123394
.incbin "baserom.z64", 0xB9A534, 0xC8
glabel D_8012345C
.incbin "baserom.z64", 0xB9A5FC, 0xA0
glabel D_801234FC
.incbin "baserom.z64", 0xB9A69C, 0xC8
glabel D_801235C4
.incbin "baserom.z64", 0xB9A764, 0xC8
glabel D_8012368C
.incbin "baserom.z64", 0xB9A82C, 0xA0
glabel D_8012372C
.incbin "baserom.z64", 0xB9A8CC, 0xA0
glabel D_801237CC
.incbin "baserom.z64", 0xB9A96C, 0xC8
glabel D_80123894
.incbin "baserom.z64", 0xB9AA34, 0x10
glabel D_801238A4
.incbin "baserom.z64", 0xB9AA44, 0xC
glabel D_801238B0
.incbin "baserom.z64", 0xB9AA50, 0x5C
glabel D_8012390C
.incbin "baserom.z64", 0xB9AAAC, 0x10
glabel D_8012391C
.incbin "baserom.z64", 0xB9AABC, 0xC
glabel D_80123928
.incbin "baserom.z64", 0xB9AAC8, 0x34
glabel D_8012395C
.incbin "baserom.z64", 0xB9AAFC, 0x10
glabel D_8012396C
.incbin "baserom.z64", 0xB9AB0C, 0xC
glabel D_80123978
.incbin "baserom.z64", 0xB9AB18, 0x5C
glabel D_801239D4
.incbin "baserom.z64", 0xB9AB74, 0x7C

View file

@ -497,7 +497,7 @@ Again we have run out of action functions. The rules suggest that we now look at
Update runs every frame and updates the properties of the actor, and usually runs the action functions once per frame. As before we change the first argument to `EnJj* this` to get it to use our actor's struct. mips2c gives Update runs every frame and updates the properties of the actor, and usually runs the action functions once per frame. As before we change the first argument to `EnJj* this` to get it to use our actor's struct. mips2c gives
```C ```C
void EnJj_Update(EnJj *this, GlobalContext *globalCtx) { void EnJj_Update(EnJj *this, GlobalContext *globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->unk1D94 != 0)) { if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->unk1D94 != 0)) {
func_80A87D94(); func_80A87D94();
} else { } else {
this->actionFunc(this); this->actionFunc(this);
@ -521,7 +521,7 @@ Lastly, what is `globalCtx->unk1D94`? It is at `globalCtx->csCtx + 0x30`, or `gl
void EnJj_Update(Actor *thisx, GlobalContext *globalCtx) { void EnJj_Update(Actor *thisx, GlobalContext *globalCtx) {
EnJj* this = THIS; EnJj* this = THIS;
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[2] != NULL)) { if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL)) {
func_80A87D94(this, globalCtx); func_80A87D94(this, globalCtx);
} else { } else {
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);

View file

@ -1073,21 +1073,14 @@ VecSph* OLib_Vec3fToVecSph(VecSph* dest, Vec3f* vec);
VecSph* OLib_Vec3fToVecSphGeo(VecSph* arg0, Vec3f* arg1); VecSph* OLib_Vec3fToVecSphGeo(VecSph* arg0, Vec3f* arg1);
VecSph* OLib_Vec3fDiffToVecSphGeo(VecSph* arg0, Vec3f* a, Vec3f* b); VecSph* OLib_Vec3fDiffToVecSphGeo(VecSph* arg0, Vec3f* a, Vec3f* b);
Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b); Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b);
// ? func_8007C680(?); s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 camIdx);
// ? func_8007C704(?); s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx);
// ? func_8007C76C(?); s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor);
// ? func_8007C7A8(?); s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId);
// ? func_8007C7F8(?); void OnePointCutscene_EnableAttention(void);
// ? func_8007C820(?); void OnePointCutscene_DisableAttention(void);
// ? func_8007C850(?); s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 actorCategory);
// ? func_8007FFE0(?); void OnePointCutscene_Noop(GlobalContext* globalCtx, s32 arg1);
// ? func_80080024(?);
s16 func_800800F8(GlobalContext* globalCtx, s16 csID, s16 timer, Actor* actor, s16 camIdx);
void func_800803F0(GlobalContext* globalCtx, s16 camId);
s16 func_80080480(GlobalContext* globalCtx, Actor* actor);
void func_800806BC(GlobalContext* globalCtx, Actor* actor, u16 sfxId);
UNK_TYPE func_80080728(GlobalContext* globalCtx, u8 actorCategory);
void func_80080788(UNK_TYPE, UNK_TYPE);
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx); void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor); void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor);
void Map_InitData(GlobalContext* globalCtx, s16 room); void Map_InitData(GlobalContext* globalCtx, s16 room);

View file

@ -206,137 +206,6 @@ extern u16 D_8011FB40;
//extern ? D_8011FEC4; //extern ? D_8011FEC4;
//extern ? D_8011FED0; //extern ? D_8011FED0;
extern s32 gZeldaArenaLogSeverity; extern s32 gZeldaArenaLogSeverity;
extern s16 D_80120130;
//extern ? D_80120134;
//extern ? D_80120138;
//extern ? D_8012013C;
//extern ? D_8012021C;
//extern ? D_801202FC;
//extern ? D_80120300;
//extern ? D_80120304;
//extern ? D_80120308;
//extern ? D_80120398;
//extern ? D_8012042C;
//extern ? D_80120430;
//extern ? D_80120434;
//extern ? D_801204D4;
//extern ? D_801205B4;
//extern ? D_80120694;
//extern ? D_80120698;
//extern ? D_8012069C;
//extern ? D_801206A0;
//extern ? D_80120760;
//extern ? D_80120820;
//extern ? D_801208E4;
//extern ? D_801208E8;
//extern ? D_801208EC;
//extern ? D_801208FC;
//extern ? D_80120908;
//extern ? D_80120930;
//extern ? D_80120964;
//extern ? D_80120974;
//extern ? D_80120980;
//extern ? D_801209B4;
//extern ? D_801209C4;
//extern ? D_801209D0;
//extern ? D_801209EC;
//extern ? D_801209F8;
//extern ? D_80120A54;
//extern ? D_80120ACC;
//extern ? D_80120B94;
//extern ? D_80120D4C;
//extern ? D_80120E64;
//extern ? D_80120FA4;
//extern ? D_80121094;
//extern ? D_8012110C;
//extern ? D_80121184;
//extern ? D_801211A0;
//extern ? D_801211D4;
//extern ? D_80121224;
//extern ? D_80121314;
//extern ? D_8012133C;
//extern ? D_80121358;
//extern ? D_801213B4;
//extern ? D_8012147C;
//extern ? D_8012151C;
//extern ? D_8012156C;
//extern ? D_801215BC;
//extern ? D_801215E4;
//extern ? D_80121774;
//extern ? D_80121814;
//extern ? D_801218B4;
//extern ? D_80121904;
//extern ? D_80121954;
//extern ? D_80121A44;
//extern ? D_80121C24;
//extern ? D_80121C34;
//extern ? D_80121C40;
//extern ? D_80121D3C;
//extern ? D_80121DB4;
//extern ? D_80121F1C;
//extern ? D_80121F2C;
//extern ? D_80121F38;
//extern ? D_80121FBC;
//extern ? D_80121FCC;
//extern ? D_80121FD8;
//extern ? D_8012205C;
//extern ? D_801220D4;
//extern ? D_801220E4;
//extern ? D_801220F0;
//extern ? D_8012219C;
//extern ? D_801222B4;
//extern ? D_8012237C;
//extern ? D_801223CC;
//extern ? D_801224BC;
//extern ? D_801225D4;
//extern ? D_8012269C;
//extern ? D_80122714;
//extern ? D_801227B4;
//extern ? D_801228A4;
//extern ? D_8012296C;
//extern ? D_80122A0C;
//extern ? D_80122A5C;
//extern ? D_80122B9C;
//extern ? D_80122C14;
//extern ? D_80122C3C;
//extern ? D_80122C64;
//extern ? D_80122C8C;
//extern ? D_80122CB4;
//extern ? D_80122D04;
//extern ? D_80122D54;
//extern ? D_80122DCC;
//extern ? D_80122E44;
//extern ? D_80123074;
//extern ? D_8012313C;
//extern ? D_801231B4;
//extern ? D_8012323C;
//extern ? D_80123248;
//extern ? D_80123254;
//extern ? D_80123264;
//extern ? D_80123270;
//extern ? D_8012328C;
//extern ? D_80123298;
//extern ? D_801232A4;
//extern ? D_801232B4;
//extern ? D_801232C0;
//extern ? D_801232CC;
//extern ? D_80123394;
//extern ? D_8012345C;
//extern ? D_801234FC;
//extern ? D_801235C4;
//extern ? D_8012368C;
//extern ? D_8012372C;
//extern ? D_801237CC;
//extern ? D_80123894;
//extern ? D_801238A4;
//extern ? D_801238B0;
//extern ? D_8012390C;
//extern ? D_8012391C;
//extern ? D_80123928;
//extern ? D_8012395C;
//extern ? D_8012396C;
//extern ? D_80123978;
//extern ? D_801239D4;
extern MapData gMapDataTable; extern MapData gMapDataTable;
extern s16 gSpoilingItems[3]; extern s16 gSpoilingItems[3];
extern s16 gSpoilingItemReverts[3]; extern s16 gSpoilingItemReverts[3];

View file

@ -881,8 +881,8 @@ typedef struct GlobalContext {
/* 0x000B0 */ void* sceneSegment; /* 0x000B0 */ void* sceneSegment;
/* 0x000B8 */ View view; /* 0x000B8 */ View view;
/* 0x001E0 */ Camera mainCamera; /* 0x001E0 */ Camera mainCamera;
/* 0x0034C */ Camera subCameras[3]; /* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST];
/* 0x00790 */ Camera* cameraPtrs[4]; /* 0x00790 */ Camera* cameraPtrs[NUM_CAMS];
/* 0x007A0 */ s16 activeCamera; /* 0x007A0 */ s16 activeCamera;
/* 0x007A2 */ s16 nextCamera; /* 0x007A2 */ s16 nextCamera;
/* 0x007A4 */ SoundContext soundCtx; /* 0x007A4 */ SoundContext soundCtx;

View file

@ -10,6 +10,17 @@
#define CAM_STAT_ACTIVE 7 #define CAM_STAT_ACTIVE 7
#define CAM_STAT_UNK100 0x100 #define CAM_STAT_UNK100 0x100
#define NUM_CAMS 4
#define MAIN_CAM 0
#define SUBCAM_FIRST 1
#define SUBCAM_FREE 0
#define SUBCAM_NONE -1
#define SUBCAM_ACTIVE -1
#define ONEPOINT_CS_INFO(camera) ((Unique9OnePointCs*)camera->paramData)
#define PARENT_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->parentCamIdx])
#define CHILD_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->childCamIdx])
typedef enum { typedef enum {
/* 0x00 */ CAM_SET_NONE, /* 0x00 */ CAM_SET_NONE,
/* 0x01 */ CAM_SET_NORMAL0, /* 0x01 */ CAM_SET_NORMAL0,
@ -696,10 +707,10 @@ typedef struct {
/* 0x000C */ f32 lerpStepScale; /* 0x000C */ f32 lerpStepScale;
/* 0x0010 */ Vec3f atTargetInit; /* 0x0010 */ Vec3f atTargetInit;
/* 0x001C */ Vec3f eyeTargetInit; /* 0x001C */ Vec3f eyeTargetInit;
} OnePointDemoFull; /* size = 0x28 */ } OnePointCsFull; /* size = 0x28 */
typedef struct { typedef struct {
/* 0x0000 */ OnePointDemoFull* curKeyFrame; /* 0x0000 */ OnePointCsFull* curKeyFrame;
/* 0x0004 */ Vec3f atTarget; /* 0x0004 */ Vec3f atTarget;
/* 0x0010 */ Vec3f eyeTarget; /* 0x0010 */ Vec3f eyeTarget;
/* 0x001C */ Vec3f playerPos; /* 0x001C */ Vec3f playerPos;
@ -719,9 +730,9 @@ typedef struct {
typedef struct { typedef struct {
/* 0x0000 */ s32 keyFrameCnt; /* 0x0000 */ s32 keyFrameCnt;
/* 0x0004 */ OnePointDemoFull* keyFrames; /* 0x0004 */ OnePointCsFull* keyFrames;
/* 0x0008 */ Unique9 uniq9; /* 0x0008 */ Unique9 uniq9;
} Unique9OnePointDemo; // size = 0x48 } Unique9OnePointCs; // size = 0x48
typedef struct { typedef struct {
/* 0x0000 */ f32 curFrame; /* 0x0000 */ f32 curFrame;
@ -776,12 +787,12 @@ typedef struct {
/* 0x0004 */ CutsceneCameraPoint* eyePoints; /* 0x0004 */ CutsceneCameraPoint* eyePoints;
/* 0x0008 */ s16 actionParameters; /* 0x0008 */ s16 actionParameters;
/* 0x000A */ s16 initTimer; /* 0x000A */ s16 initTimer;
} OnePointDemoCamera; // size = 0xC } OnePointCsCamera; // size = 0xC
typedef struct { typedef struct {
/* 0x0000 */ OnePointDemoCamera onePointDemo; /* 0x0000 */ OnePointCsCamera onePointCs;
/* 0x000C */ Demo9 demo9; /* 0x000C */ Demo9 demo9;
} Demo9OnePointDemo; // size = 0x1C } Demo9OnePointCs; // size = 0x1C
typedef struct { typedef struct {
/* 0x0000 */ f32 lerpAtScale; /* 0x0000 */ f32 lerpAtScale;
@ -849,7 +860,7 @@ typedef struct {
} CamColChk; // size = 0x28 } CamColChk; // size = 0x28
typedef struct { typedef struct {
char paramData[0x50]; /* 0x0000 */ char paramData[0x50];
/* 0x0050 */ Vec3f at; /* 0x0050 */ Vec3f at;
/* 0x005C */ Vec3f eye; /* 0x005C */ Vec3f eye;
/* 0x0068 */ Vec3f up; /* 0x0068 */ Vec3f up;
@ -884,7 +895,7 @@ typedef struct {
/* 0x012C */ s16 data2; /* 0x012C */ s16 data2;
/* 0x012E */ s16 data3; /* 0x012E */ s16 data3;
/* 0x0130 */ s16 uid; /* 0x0130 */ s16 uid;
/* 0x0132 */ char unk_132[0x02]; /* 0x0132 */ char unk_132[2];
/* 0x0134 */ Vec3s inputDir; /* 0x0134 */ Vec3s inputDir;
/* 0x013A */ Vec3s camDir; /* 0x013A */ Vec3s camDir;
/* 0x0140 */ s16 status; /* 0x0140 */ s16 status;
@ -907,7 +918,7 @@ typedef struct {
/* 0x0162 */ s16 parentCamIdx; /* 0x0162 */ s16 parentCamIdx;
/* 0x0164 */ s16 thisIdx; /* 0x0164 */ s16 thisIdx;
/* 0x0166 */ s16 prevCamDataIdx; /* 0x0166 */ s16 prevCamDataIdx;
/* 0x0168 */ s16 unk_168; /* 0x0168 */ s16 csId;
/* 0x016A */ s16 unk_16A; /* 0x016A */ s16 unk_16A;
} Camera; // size = 0x16C } Camera; // size = 0x16C

View file

@ -156,8 +156,8 @@ typedef union CutsceneData {
s8 b[4]; s8 b[4];
} CutsceneData; } CutsceneData;
#define CS_CMD_CONTINUE 0x00 #define CS_CMD_CONTINUE 0
#define CS_CMD_STOP 0xFF #define CS_CMD_STOP -1
typedef enum { typedef enum {
/* 0x00 */ OCARINA_ACTION_UNK_0, /* 0x00 */ OCARINA_ACTION_UNK_0,

1
spec
View file

@ -326,7 +326,6 @@ beginseg
include "build/src/code/z_msgevent.o" include "build/src/code/z_msgevent.o"
include "build/src/code/z_olib.o" include "build/src/code/z_olib.o"
include "build/src/code/z_onepointdemo.o" include "build/src/code/z_onepointdemo.o"
include "build/data/z_onepointdemo.data.o"
include "build/src/code/z_map_exp.o" include "build/src/code/z_map_exp.o"
include "build/src/code/z_map_data.o" include "build/src/code/z_map_data.o"
include "build/src/code/z_parameter.o" include "build/src/code/z_parameter.o"

View file

@ -42,7 +42,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
Matrix_Put(&sp60); Matrix_Put(&sp60);
if (dlist != gCircleShadowDL) { if (dlist != gCircleShadowDL) {
Matrix_RotateY(actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(actor->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
} }
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale; temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
@ -407,7 +407,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f, Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f,
actor->focus.pos.z, MTXMODE_NEW); actor->focus.pos.z, MTXMODE_NEW);
Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
@ -1898,7 +1898,7 @@ void func_8002FBAC(GlobalContext* globalCtx) {
spD4 = spCC * 0.200000000000000011102230246252 + 1.0f; spD4 = spCC * 0.200000000000000011102230246252 + 1.0f;
} }
if ((globalCtx->csCtx.state == 0) && if ((globalCtx->csCtx.state == CS_STATE_IDLE) &&
(gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) && (gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) &&
(globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) { (globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19); POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19);
@ -2430,7 +2430,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
if ((HREG(64) != 1) || (HREG(72) != 0)) { if ((HREG(64) != 1) || (HREG(72) != 0)) {
if (globalCtx->actorCtx.unk_03 != 0) { if (globalCtx->actorCtx.unk_03 != 0) {
func_8003115C(globalCtx, invisibleActorCounter, invisibleActors); func_8003115C(globalCtx, invisibleActorCounter, invisibleActors);
if ((globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx)) { if ((globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx)) {
func_800304B0(globalCtx); func_800304B0(globalCtx);
} }
} }
@ -3842,7 +3842,7 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
Player* player = PLAYER; Player* player = PLAYER;
f32 var; f32 var;
if ((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) { if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f; var = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f;
} else { } else {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos); var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
@ -5488,7 +5488,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = actor->world.pos; actor->focus.pos = actor->world.pos;
actor->focus.pos.y += arg4; actor->focus.pos.y += arg4;
if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) { if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y; var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var); abs_var = ABS(var);
if (abs_var >= 0x4300) { if (abs_var >= 0x4300) {
@ -5497,7 +5497,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
} }
} }
if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) { if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
sp2C = globalCtx->view.eye; sp2C = globalCtx->view.eye;
} else { } else {
sp2C = player->actor.focus.pos; sp2C = player->actor.focus.pos;
@ -5517,7 +5517,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = arg4; actor->focus.pos = arg4;
if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) { if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y; var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var); abs_var = ABS(var);
if (abs_var >= 0x4300) { if (abs_var >= 0x4300) {
@ -5526,7 +5526,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
} }
} }
if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) { if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
sp24 = globalCtx->view.eye; sp24 = globalCtx->view.eye;
} else { } else {
sp24 = player->actor.focus.pos; sp24 = player->actor.focus.pos;

View file

@ -15,8 +15,6 @@ s32 Camera_CheckWater(Camera* camera);
#define NEXTSETTING ((values++)->val) #define NEXTSETTING ((values++)->val)
#define NEXTPCT PCT(NEXTSETTING) #define NEXTPCT PCT(NEXTSETTING)
#define ONEPOINTDEMO ((Unique9OnePointDemo*)camera->paramData)
#define BGCAM_POS(v) ((v)[0]) #define BGCAM_POS(v) ((v)[0])
#define BGCAM_ROT(v) ((v)[1]) #define BGCAM_ROT(v) ((v)[1])
#define BGCAM_FOV(v) ((v)[2].x) #define BGCAM_FOV(v) ((v)[2].x)
@ -1498,7 +1496,7 @@ s32 Camera_Normal1(Camera* camera) {
sp9C = camera->speedRatio * PCT(OREG(26)); sp9C = camera->speedRatio * PCT(OREG(26));
sp98 = anim->swing.unk_18 != 0 ? PCT(OREG(25)) : spA0; sp98 = anim->swing.unk_18 != 0 ? PCT(OREG(25)) : spA0;
sp94 = (camera->xzSpeed - anim->unk_20) * (0.3333329856395721435546875f); sp94 = (camera->xzSpeed - anim->unk_20) * (0.333333f);
if (sp94 > 1.0f) { if (sp94 > 1.0f) {
sp94 = 1.0f; sp94 = 1.0f;
} }
@ -4993,13 +4991,13 @@ s32 Camera_Unique8(Camera* camera) {
s32 Camera_Unique9(Camera* camera) { s32 Camera_Unique9(Camera* camera) {
Vec3f atTarget; Vec3f atTarget;
Vec3f eyeTarget; Vec3f eyeTarget;
Unique9* uniq9 = &ONEPOINTDEMO->uniq9; Unique9* uniq9 = &ONEPOINT_CS_INFO(camera)->uniq9;
Unique9Anim* anim = &uniq9->anim; Unique9Anim* anim = &uniq9->anim;
f32 invKeyFrameTimer; f32 invKeyFrameTimer;
VecSph eyeNextAtOffset; VecSph eyeNextAtOffset;
VecSph scratchSph; VecSph scratchSph;
VecSph playerTargetOffset; VecSph playerTargetOffset;
s16 pad; s16 action;
s16 atInitFlags; s16 atInitFlags;
s16 eyeInitFlags; s16 eyeInitFlags;
s16 pad2; s16 pad2;
@ -5008,19 +5006,17 @@ s32 Camera_Unique9(Camera* camera) {
PosRot playerPosRot; PosRot playerPosRot;
Vec3f* eyeNext = &camera->eyeNext; Vec3f* eyeNext = &camera->eyeNext;
Vec3f* at = &camera->at; Vec3f* at = &camera->at;
s16 action; Vec3f* eye = &camera->eye;
Player* player; Player* player = camera->player;
Actor* focusActor; Actor* focusActor;
f32 spB4; f32 spB4;
PosRot atFocusPosRot; PosRot atFocusPosRot;
Vec3f eyeLookAtPos; Vec3f eyeLookAtPos;
Vec3f* eye = &camera->eye; CameraModeValue* values;
PosRot eyeFocusPosRot; PosRot eyeFocusPosRot;
player = camera->player;
if (RELOAD_PARAMS) { if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
uniq9->interfaceFlags = NEXTSETTING; uniq9->interfaceFlags = NEXTSETTING;
} }
@ -5051,8 +5047,8 @@ s32 Camera_Unique9(Camera* camera) {
if (anim->keyFrameTimer == 0) { if (anim->keyFrameTimer == 0) {
anim->isNewKeyFrame = true; anim->isNewKeyFrame = true;
anim->curKeyFrameIdx++; anim->curKeyFrameIdx++;
if (anim->curKeyFrameIdx < ONEPOINTDEMO->keyFrameCnt) { if (anim->curKeyFrameIdx < ONEPOINT_CS_INFO(camera)->keyFrameCnt) {
anim->curKeyFrame = &ONEPOINTDEMO->keyFrames[anim->curKeyFrameIdx]; anim->curKeyFrame = &ONEPOINT_CS_INFO(camera)->keyFrames[anim->curKeyFrameIdx];
anim->keyFrameTimer = anim->curKeyFrame->timerInit; anim->keyFrameTimer = anim->curKeyFrame->timerInit;
if (anim->curKeyFrame->unk_01 != 0xFF) { if (anim->curKeyFrame->unk_01 != 0xFF) {
@ -5070,7 +5066,7 @@ s32 Camera_Unique9(Camera* camera) {
} }
} else { } else {
// We've gone through all the keyframes. // We've gone through all the keyframes.
if (camera->thisIdx != 0) { if (camera->thisIdx != MAIN_CAM) {
camera->timer = 0; camera->timer = 0;
} }
return true; return true;
@ -5132,13 +5128,10 @@ s32 Camera_Unique9(Camera* camera) {
if (focusActor != NULL) { if (focusActor != NULL) {
if ((atInitFlags & 0xF) == 1) { if ((atInitFlags & 0xF) == 1) {
// head
Actor_GetFocus(&atFocusPosRot, focusActor); Actor_GetFocus(&atFocusPosRot, focusActor);
} else if ((atInitFlags & 0xF) == 2) { } else if ((atInitFlags & 0xF) == 2) {
// world
Actor_GetWorld(&atFocusPosRot, focusActor); Actor_GetWorld(&atFocusPosRot, focusActor);
} else { } else {
// world, shape rot
Actor_GetWorldPosShapeRot(&atFocusPosRot, focusActor); Actor_GetWorldPosShapeRot(&atFocusPosRot, focusActor);
} }
@ -5179,19 +5172,59 @@ s32 Camera_Unique9(Camera* camera) {
anim->eyeTarget.y = camera->eyeNext.y + anim->curKeyFrame->eyeTargetInit.y; anim->eyeTarget.y = camera->eyeNext.y + anim->curKeyFrame->eyeTargetInit.y;
anim->eyeTarget.z = camera->eyeNext.z + anim->curKeyFrame->eyeTargetInit.z; anim->eyeTarget.z = camera->eyeNext.z + anim->curKeyFrame->eyeTargetInit.z;
} }
} else { } else if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 ||
if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 || eyeInitFlags == (s16)0x8500) {
eyeInitFlags == (s16)0x8500) { if (camera->target != NULL && camera->target->update != NULL) {
if (camera->target != NULL && camera->target->update != NULL) { Actor_GetFocus(&targethead, camera->target);
Actor_GetFocus(&targethead, camera->target); Actor_GetFocus(&playerhead, &camera->player->actor);
Actor_GetFocus(&playerhead, &camera->player->actor); playerhead.pos.x = playerPosRot.pos.x;
playerhead.pos.x = playerPosRot.pos.x; playerhead.pos.z = playerPosRot.pos.z;
playerhead.pos.z = playerPosRot.pos.z; OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos);
OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos); if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) {
if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) { eyeLookAtPos = targethead.pos;
eyeLookAtPos = targethead.pos; } else {
eyeLookAtPos = anim->atTarget;
}
if (eyeInitFlags & (s16)0x8080) {
scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x);
scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y);
scratchSph.r = anim->curKeyFrame->eyeTargetInit.z;
} else {
OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
}
scratchSph.yaw += playerTargetOffset.yaw;
scratchSph.pitch += playerTargetOffset.pitch;
Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph);
} else {
if (camera->target == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
}
camera->target = NULL;
anim->eyeTarget = *eyeNext;
}
} else if (eyeInitFlags & 0x6060) {
if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) {
if (eyeInitFlags & 0x2020) {
focusActor = &camera->player->actor;
} else if (camera->target != NULL && camera->target->update != NULL) {
focusActor = camera->target;
} else {
camera->target = NULL;
focusActor = NULL;
}
if (focusActor != NULL) {
if ((eyeInitFlags & 0xF00) == 0x100) {
// head
Actor_GetFocus(&eyeFocusPosRot, focusActor);
} else if ((eyeInitFlags & 0xF00) == 0x200) {
// world
Actor_GetWorld(&eyeFocusPosRot, focusActor);
} else { } else {
eyeLookAtPos = anim->atTarget; // world, shapeRot
Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor);
} }
if (eyeInitFlags & (s16)0x8080) { if (eyeInitFlags & (s16)0x8080) {
@ -5202,9 +5235,9 @@ s32 Camera_Unique9(Camera* camera) {
OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit); OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
} }
scratchSph.yaw += playerTargetOffset.yaw; scratchSph.yaw += eyeFocusPosRot.rot.y;
scratchSph.pitch += playerTargetOffset.pitch; scratchSph.pitch -= eyeFocusPosRot.rot.x;
Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph); Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph);
} else { } else {
if (camera->target == NULL) { if (camera->target == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST); osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
@ -5212,53 +5245,9 @@ s32 Camera_Unique9(Camera* camera) {
camera->target = NULL; camera->target = NULL;
anim->eyeTarget = *eyeNext; anim->eyeTarget = *eyeNext;
} }
} else {
if (eyeInitFlags & 0x6060) {
if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) {
if (eyeInitFlags & 0x2020) {
focusActor = &camera->player->actor;
} else if (camera->target != NULL && camera->target->update != NULL) {
focusActor = camera->target;
} else {
camera->target = NULL;
focusActor = NULL;
}
if (focusActor != NULL) {
if ((eyeInitFlags & 0xF00) == 0x100) {
// head
Actor_GetFocus(&eyeFocusPosRot, focusActor);
} else if ((eyeInitFlags & 0xF00) == 0x200) {
// world
Actor_GetWorld(&eyeFocusPosRot, focusActor);
} else {
// world, shapeRot
Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor);
}
if (eyeInitFlags & (s16)0x8080) {
scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x);
scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y);
scratchSph.r = anim->curKeyFrame->eyeTargetInit.z;
} else {
OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
}
scratchSph.yaw += eyeFocusPosRot.rot.y;
scratchSph.pitch -= eyeFocusPosRot.rot.x;
Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph);
} else {
if (camera->target == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
}
camera->target = NULL;
anim->eyeTarget = *eyeNext;
}
}
} else {
anim->eyeTarget = *eyeNext;
}
} }
} else {
anim->eyeTarget = *eyeNext;
} }
if (anim->curKeyFrame->initFlags == 2) { if (anim->curKeyFrame->initFlags == 2) {
@ -5413,19 +5402,22 @@ s32 Camera_Unique9(Camera* camera) {
// Set current keyframe to the roll target? // Set current keyframe to the roll target?
anim->curKeyFrameIdx = anim->rollTarget; anim->curKeyFrameIdx = anim->rollTarget;
break; break;
case 19: case 19: {
// Change the parent camera (or default)'s mode to normal // Change the parent camera (or default)'s mode to normal
Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx], s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
CAM_MODE_NORMAL, 1);
case 18: Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
}
case 18: {
// copy the current camera to the parent (or default)'s camera. // copy the current camera to the parent (or default)'s camera.
{ s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
Camera* cam = camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx]; Camera* cam = camera->globalCtx->cameraPtrs[camIdx];
*eye = *eyeNext;
Camera_Copy(cam, camera); *eye = *eyeNext;
} Camera_Copy(cam, camera);
}
default: default:
if (camera->thisIdx != 0) { if (camera->thisIdx != MAIN_CAM) {
camera->timer = 0; camera->timer = 0;
} }
} }
@ -5598,19 +5590,18 @@ s32 Camera_Demo3(Camera* camera) {
Vec3f sp5C; Vec3f sp5C;
f32 temp_f0; f32 temp_f0;
s32 pad; s32 pad;
u8 skipUpdateEye; u8 skipUpdateEye = false;
f32 yOffset; f32 yOffset = Player_GetHeight(camera->player);
s16 angle; s16 angle;
Demo3* demo3 = (Demo3*)camera->paramData; Demo3* demo3 = (Demo3*)camera->paramData;
Demo3Anim* anim = &demo3->anim; Demo3Anim* anim = &demo3->anim;
s32 pad2; s32 pad2;
skipUpdateEye = false;
yOffset = Player_GetHeight(camera->player);
camera->unk_14C &= ~0x10; camera->unk_14C &= ~0x10;
if (RELOAD_PARAMS) { if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
demo3->fov = NEXTSETTING; demo3->fov = NEXTSETTING;
demo3->unk_04 = NEXTSETTING; // unused. demo3->unk_04 = NEXTSETTING; // unused.
demo3->interfaceFlags = NEXTSETTING; demo3->interfaceFlags = NEXTSETTING;
@ -5762,7 +5753,7 @@ s32 Camera_Demo3(Camera* camera) {
} }
sCameraInterfaceFlags = 0; sCameraInterfaceFlags = 0;
skipeyeUpdate: skipeyeUpdate:
skipUpdateEye = 1; skipUpdateEye = true;
break; break;
} }
@ -5845,28 +5836,28 @@ s32 Camera_Demo5(Camera* camera) {
D_8011D6AC[1].timerInit = camera->timer - 1; D_8011D6AC[1].timerInit = camera->timer - 1;
D_8011D6AC[1].atTargetInit.z = Rand_ZeroOne() * 10.0f; D_8011D6AC[1].atTargetInit.z = Rand_ZeroOne() * 10.0f;
D_8011D6AC[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f; D_8011D6AC[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f;
ONEPOINTDEMO->keyFrames = D_8011D6AC; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D6AC;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D6AC); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D6AC);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt--; ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else { } else {
camera->timer += D_8011D6AC[2].timerInit; camera->timer += D_8011D6AC[2].timerInit;
} }
} else { } else {
D_8011D724[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f; D_8011D724[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f;
D_8011D724[1].timerInit = camera->timer - 1; D_8011D724[1].timerInit = camera->timer - 1;
ONEPOINTDEMO->keyFrames = D_8011D724; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D724;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D724); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D724);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt--; ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else { } else {
camera->timer += D_8011D724[2].timerInit; camera->timer += D_8011D724[2].timerInit;
} }
} }
} else if (playerTargetGeo.r < 30.0f) { } else if (playerTargetGeo.r < 30.0f) {
// distance between player and target is less than 30 units. // distance between player and target is less than 30 units.
ONEPOINTDEMO->keyFrames = D_8011D79C; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D79C;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D79C); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C);
if ((sp78.yaw < 0x15) || (sp78.yaw >= 0x12C) || (sp78.pitch < 0x29) || (sp78.pitch >= 0xC8)) { if ((sp78.yaw < 0x15) || (sp78.yaw >= 0x12C) || (sp78.pitch < 0x29) || (sp78.pitch >= 0xC8)) {
D_8011D79C[0].actionFlags = 0x41; D_8011D79C[0].actionFlags = 0x41;
D_8011D79C[0].atTargetInit.y = -30.0f; D_8011D79C[0].atTargetInit.y = -30.0f;
@ -5879,8 +5870,8 @@ s32 Camera_Demo5(Camera* camera) {
D_8011D79C[1].timerInit = camera->timer - 1; D_8011D79C[1].timerInit = camera->timer - 1;
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt -= 2; ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else { } else {
camera->timer += D_8011D79C[2].timerInit + D_8011D79C[3].timerInit; camera->timer += D_8011D79C[2].timerInit + D_8011D79C[3].timerInit;
} }
@ -5888,10 +5879,10 @@ s32 Camera_Demo5(Camera* camera) {
// distance from the camera's current positon and the target is less than 300 units // distance from the camera's current positon and the target is less than 300 units
// and the distance fromthe camera's current position to the player is less than 30 units // and the distance fromthe camera's current position to the player is less than 30 units
D_8011D83C[0].timerInit = camera->timer; D_8011D83C[0].timerInit = camera->timer;
ONEPOINTDEMO->keyFrames = D_8011D83C; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D83C;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D83C); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D83C);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt--; ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else { } else {
camera->timer += D_8011D83C[1].timerInit; camera->timer += D_8011D83C[1].timerInit;
} }
@ -5901,10 +5892,10 @@ s32 Camera_Demo5(Camera* camera) {
// is less than ~76.9 degrees // is less than ~76.9 degrees
if (sp78.yaw >= 0x15 && sp78.yaw < 0x12C && sp78.pitch >= 0x29 && sp78.pitch < 0xC8 && eyePlayerGeo.r > 30.0f) { if (sp78.yaw >= 0x15 && sp78.yaw < 0x12C && sp78.pitch >= 0x29 && sp78.pitch < 0xC8 && eyePlayerGeo.r > 30.0f) {
D_8011D88C[0].timerInit = camera->timer; D_8011D88C[0].timerInit = camera->timer;
ONEPOINTDEMO->keyFrames = D_8011D88C; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D88C;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D88C); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D88C);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt--; ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else { } else {
camera->timer += D_8011D88C[1].timerInit; camera->timer += D_8011D88C[1].timerInit;
} }
@ -5919,10 +5910,10 @@ s32 Camera_Demo5(Camera* camera) {
} }
D_8011D8DC[0].timerInit = camera->timer; D_8011D8DC[0].timerInit = camera->timer;
D_8011D8DC[1].timerInit = (s16)(eyeTargetDist * 0.005f) + 8; D_8011D8DC[1].timerInit = (s16)(eyeTargetDist * 0.005f) + 8;
ONEPOINTDEMO->keyFrames = D_8011D8DC; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D8DC;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D8DC); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D8DC);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt -= 2; ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else { } else {
camera->timer += D_8011D8DC[1].timerInit + D_8011D8DC[2].timerInit; camera->timer += D_8011D8DC[1].timerInit + D_8011D8DC[2].timerInit;
} }
@ -5956,10 +5947,10 @@ s32 Camera_Demo5(Camera* camera) {
} else { } else {
D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6; D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6;
} }
ONEPOINTDEMO->keyFrames = D_8011D954; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D954;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D954); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D954);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
ONEPOINTDEMO->keyFrameCnt -= 2; ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else { } else {
camera->timer += D_8011D954[2].timerInit + D_8011D954[3].timerInit; camera->timer += D_8011D954[2].timerInit + D_8011D954[3].timerInit;
} }
@ -5981,14 +5972,14 @@ s32 Camera_Demo5(Camera* camera) {
t = eyeTargetDist * 0.005f; t = eyeTargetDist * 0.005f;
D_8011D9F4[1].timerInit = t + 8; D_8011D9F4[1].timerInit = t + 8;
} }
ONEPOINTDEMO->keyFrames = D_8011D9F4; ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D9F4;
ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D9F4); ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D9F4);
if (camera->parentCamIdx != 0) { if (camera->parentCamIdx != MAIN_CAM) {
if (camera->globalCtx->state.frames & 1) { if (camera->globalCtx->state.frames & 1) {
D_8011D9F4[0].rollTargetInit = -D_8011D9F4[0].rollTargetInit; D_8011D9F4[0].rollTargetInit = -D_8011D9F4[0].rollTargetInit;
D_8011D9F4[1].rollTargetInit = -D_8011D9F4[1].rollTargetInit; D_8011D9F4[1].rollTargetInit = -D_8011D9F4[1].rollTargetInit;
} }
ONEPOINTDEMO->keyFrameCnt -= 2; ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else { } else {
camera->timer += D_8011D9F4[1].timerInit + D_8011D9F4[2].timerInit; camera->timer += D_8011D9F4[1].timerInit + D_8011D9F4[2].timerInit;
D_8011D9F4[0].rollTargetInit = D_8011D9F4[1].rollTargetInit = 0; D_8011D9F4[0].rollTargetInit = D_8011D9F4[1].rollTargetInit = 0;
@ -6035,7 +6026,7 @@ s32 Camera_Demo5(Camera* camera) {
* Fixed position, rotates to follow the target * Fixed position, rotates to follow the target
*/ */
s32 Camera_Demo6(Camera* camera) { s32 Camera_Demo6(Camera* camera) {
Camera* cam0; Camera* mainCam;
Demo6Anim* anim = (Demo6Anim*)&((Demo6*)camera->paramData)->anim; Demo6Anim* anim = (Demo6Anim*)&((Demo6*)camera->paramData)->anim;
Vec3f* eyeNext = &camera->eyeNext; Vec3f* eyeNext = &camera->eyeNext;
CameraModeValue* values; CameraModeValue* values;
@ -6045,7 +6036,7 @@ s32 Camera_Demo6(Camera* camera) {
s16 stateTimers[4]; s16 stateTimers[4];
Vec3f* at = &camera->at; Vec3f* at = &camera->at;
cam0 = Gameplay_GetCamera(camera->globalCtx, 0); mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
camFocus = camera->target; camFocus = camera->target;
stateTimers[1] = 0x37; stateTimers[1] = 0x37;
stateTimers[2] = 0x46; stateTimers[2] = 0x46;
@ -6071,7 +6062,7 @@ s32 Camera_Demo6(Camera* camera) {
camera->at.z = focusPosRot.pos.z; camera->at.z = focusPosRot.pos.z;
eyeOffset.r = 200.0f; eyeOffset.r = 200.0f;
// 0x7D0 ~10.99 degrees // 0x7D0 ~10.99 degrees
eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &cam0->playerPosRot.pos) + 0x7D0; eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &mainCam->playerPosRot.pos) + 0x7D0;
// -0x3E8 ~5.49 degrees // -0x3E8 ~5.49 degrees
eyeOffset.pitch = -0x3E8; eyeOffset.pitch = -0x3E8;
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeOffset); Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeOffset);
@ -6131,17 +6122,17 @@ s32 Camera_Demo8(Camera* camera) {
s32 Camera_Demo9(Camera* camera) { s32 Camera_Demo9(Camera* camera) {
s32 pad; s32 pad;
s32 finishAction; s32 finishAction;
s16 onePointParam; s16 onePointTimer;
Demo9OnePointDemo* demo9OnePoint = (Demo9OnePointDemo*)camera->paramData; Demo9OnePointCs* demo9OnePoint = (Demo9OnePointCs*)camera->paramData;
Vec3f csEyeUpdate; Vec3f csEyeUpdate;
Vec3f csAtUpdate; Vec3f csAtUpdate;
Vec3f newEye; Vec3f newEye;
Vec3f newAt; Vec3f newAt;
f32 newRoll; f32 newRoll;
CameraModeValue* values; CameraModeValue* values;
Camera* cam0; Camera* mainCam;
Vec3f* eye = &camera->eye; Vec3f* eye = &camera->eye;
PosRot* cam0PlayerPosRot; PosRot* mainCamPlayerPosRot;
PosRot focusPosRot; PosRot focusPosRot;
s32 pad3; s32 pad3;
Vec3f* eyeNext = &camera->eyeNext; Vec3f* eyeNext = &camera->eyeNext;
@ -6150,8 +6141,8 @@ s32 Camera_Demo9(Camera* camera) {
f32* camFOV = &camera->fov; f32* camFOV = &camera->fov;
Demo9Anim* anim = &demo9->anim; Demo9Anim* anim = &demo9->anim;
cam0 = Gameplay_GetCamera(camera->globalCtx, 0); mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
cam0PlayerPosRot = &cam0->playerPosRot; mainCamPlayerPosRot = &mainCam->playerPosRot;
if (RELOAD_PARAMS) { if (RELOAD_PARAMS) {
values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
demo9->interfaceFlags = NEXTSETTING; demo9->interfaceFlags = NEXTSETTING;
@ -6171,14 +6162,14 @@ s32 Camera_Demo9(Camera* camera) {
anim->curFrame = 0.0f; anim->curFrame = 0.0f;
camera->animState++; camera->animState++;
anim->doLERPAt = false; anim->doLERPAt = false;
finishAction = demo9OnePoint->onePointDemo.actionParameters & 0xF000; finishAction = demo9OnePoint->onePointCs.actionParameters & 0xF000;
if (finishAction != 0) { if (finishAction != 0) {
anim->finishAction = finishAction; anim->finishAction = finishAction;
// Clear finish parameters // Clear finish parameters
demo9OnePoint->onePointDemo.actionParameters &= 0xFFF; demo9OnePoint->onePointCs.actionParameters &= 0xFFF;
} }
anim->animTimer = demo9OnePoint->onePointDemo.initTimer; anim->animTimer = demo9OnePoint->onePointCs.initTimer;
case 1: case 1:
// Run the camera state // Run the camera state
if (anim->animTimer > 0) { if (anim->animTimer > 0) {
@ -6187,23 +6178,23 @@ s32 Camera_Demo9(Camera* camera) {
// Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points // Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points
// exist) change the animation state to 2 (standby) // exist) change the animation state to 2 (standby)
if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.eyePoints, if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.eyePoints,
&anim->keyframe, &anim->curFrame) != 0 || &anim->keyframe, &anim->curFrame) != 0 ||
func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.atPoints, &anim->keyframe, func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.atPoints, &anim->keyframe,
&anim->curFrame) != 0) { &anim->curFrame) != 0) {
camera->animState = 2; camera->animState = 2;
} }
if (demo9OnePoint->onePointDemo.actionParameters == 1) { if (demo9OnePoint->onePointCs.actionParameters == 1) {
// rotate around cam0's player // rotate around mainCam's player
Camera_RotateAroundPoint(cam0PlayerPosRot, &csEyeUpdate, &newEye); Camera_RotateAroundPoint(mainCamPlayerPosRot, &csEyeUpdate, &newEye);
Camera_RotateAroundPoint(cam0PlayerPosRot, &csAtUpdate, &newAt); Camera_RotateAroundPoint(mainCamPlayerPosRot, &csAtUpdate, &newAt);
} else if (demo9OnePoint->onePointDemo.actionParameters == 4) { } else if (demo9OnePoint->onePointCs.actionParameters == 4) {
// rotate around the current camera's player // rotate around the current camera's player
Actor_GetWorld(&focusPosRot, &camera->player->actor); Actor_GetWorld(&focusPosRot, &camera->player->actor);
Camera_RotateAroundPoint(&focusPosRot, &csEyeUpdate, &newEye); Camera_RotateAroundPoint(&focusPosRot, &csEyeUpdate, &newEye);
Camera_RotateAroundPoint(&focusPosRot, &csAtUpdate, &newAt); Camera_RotateAroundPoint(&focusPosRot, &csAtUpdate, &newAt);
} else if (demo9OnePoint->onePointDemo.actionParameters == 8) { } else if (demo9OnePoint->onePointCs.actionParameters == 8) {
// rotate around the current camera's target // rotate around the current camera's target
if (camera->target != NULL && camera->target->update != NULL) { if (camera->target != NULL && camera->target->update != NULL) {
Actor_GetWorld(&focusPosRot, camera->target); Actor_GetWorld(&focusPosRot, camera->target);
@ -6238,16 +6229,15 @@ s32 Camera_Demo9(Camera* camera) {
if (anim->finishAction != 0) { if (anim->finishAction != 0) {
if (anim->finishAction != 0x1000) { if (anim->finishAction != 0x1000) {
if (anim->finishAction == 0x2000) { if (anim->finishAction == 0x2000) {
// finish action = 0x2000, run OnePointDemo 0x3FC (Dramatic Return to Link) // finish action = 0x2000, run OnePointCs 0x3FC (Dramatic Return to Link)
onePointParam = demo9OnePoint->onePointDemo.initTimer < 0x32 onePointTimer =
? 5 demo9OnePoint->onePointCs.initTimer < 50 ? 5 : demo9OnePoint->onePointCs.initTimer / 5;
: demo9OnePoint->onePointDemo.initTimer / 5; OnePointCutscene_Init(camera->globalCtx, 1020, onePointTimer, NULL, camera->parentCamIdx);
func_800800F8(camera->globalCtx, 0x3FC, onePointParam, NULL, camera->parentCamIdx);
} }
} else { } else {
// finish action = 0x1000, copy the current camera's values to the // finish action = 0x1000, copy the current camera's values to the
// default camera. // default camera.
Camera_Copy(cam0, camera); Camera_Copy(mainCam, camera);
} }
} }
break; break;
@ -6804,7 +6794,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon
sNextUID++; sNextUID++;
} }
for (j = 0; j < 4; j++) { for (j = 0; j < NUM_CAMS; j++) {
camP = camera->globalCtx->cameraPtrs[j]; camP = camera->globalCtx->cameraPtrs[j];
if (camP != NULL && curUID == camP->uid) { if (camP != NULL && curUID == camP->uid) {
break; break;
@ -6835,11 +6825,11 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon
sCameraShrinkWindowVal = 0x20; sCameraShrinkWindowVal = 0x20;
sCameraInterfaceAlpha = 0; sCameraInterfaceAlpha = 0;
camera->unk_14C = 0; camera->unk_14C = 0;
camera->setting = camera->prevSetting = 0x21; camera->setting = camera->prevSetting = CAM_SET_FREE0;
camera->camDataIdx = camera->prevCamDataIdx = -1; camera->camDataIdx = camera->prevCamDataIdx = -1;
camera->mode = 0; camera->mode = 0;
camera->bgCheckId = BGCHECK_SCENE; camera->bgCheckId = BGCHECK_SCENE;
camera->unk_168 = 0x7FFF; camera->csId = 0x7FFF;
camera->timer = -1; camera->timer = -1;
camera->unk_14C |= 0x4000; camera->unk_14C |= 0x4000;
@ -6947,7 +6937,7 @@ void Camera_InitPlayerSettings(Camera* camera, Player* player) {
Camera_QRegInit(); Camera_QRegInit();
osSyncPrintf(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n"); osSyncPrintf(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n");
if (camera->thisIdx == 0) { if (camera->thisIdx == MAIN_CAM) {
Camera_CheckWater(camera); Camera_CheckWater(camera);
} }
} }
@ -6994,7 +6984,7 @@ void Camera_PrintSettings(Camera* camera) {
phi_a1 = 0; phi_a1 = 0;
phi_v1 = sp58; phi_v1 = sp58;
phi_t0 = sp48; phi_t0 = sp48;
for (; phi_v1 < sp58 + 4; phi_v1++, phi_t0++, phi_a1++) { for (; phi_v1 < sp58 + NUM_CAMS; phi_v1++, phi_t0++, phi_a1++) {
if (camera->globalCtx->cameraPtrs[phi_a1] == NULL) { if (camera->globalCtx->cameraPtrs[phi_a1] == NULL) {
*phi_v1 = '-'; *phi_v1 = '-';
*phi_t0 = ' '; *phi_t0 = ' ';
@ -7198,7 +7188,7 @@ s32 Camera_SetRoomHotFlag(Camera* camera) {
s32 Camera_DbgChangeMode(Camera* camera) { s32 Camera_DbgChangeMode(Camera* camera) {
s32 changeDir = 0; s32 changeDir = 0;
if (gDbgCamEnabled == 0 && camera->globalCtx->activeCamera == 0) { if (!gDbgCamEnabled && camera->globalCtx->activeCamera == MAIN_CAM) {
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) { if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
osSyncPrintf("attention sound URGENCY\n"); osSyncPrintf("attention sound URGENCY\n");
func_80078884(NA_SE_SY_ATTENTION_URGENCY); func_80078884(NA_SE_SY_ATTENTION_URGENCY);
@ -7318,7 +7308,7 @@ Vec3s Camera_Update(Camera* camera) {
QuakeCamCalc quake; QuakeCamCalc quake;
Player* player; Player* player;
player = camera->globalCtx->cameraPtrs[0]->player; player = camera->globalCtx->cameraPtrs[MAIN_CAM]->player;
if (R_DBG_CAM_UPDATE) { if (R_DBG_CAM_UPDATE) {
osSyncPrintf("camera: in %x\n", camera); osSyncPrintf("camera: in %x\n", camera);
@ -7424,14 +7414,14 @@ Vec3s Camera_Update(Camera* camera) {
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) { if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) {
sCameraInterfaceFlags = 0; sCameraInterfaceFlags = 0;
Camera_UpdateInterface(sCameraInterfaceFlags); Camera_UpdateInterface(sCameraInterfaceFlags);
} else if ((D_8011D3F0 != 0) && (camera->thisIdx == 0)) { } else if ((D_8011D3F0 != 0) && (camera->thisIdx == MAIN_CAM)) {
D_8011D3F0--; D_8011D3F0--;
sCameraInterfaceFlags = 0x3200; sCameraInterfaceFlags = 0x3200;
Camera_UpdateInterface(sCameraInterfaceFlags); Camera_UpdateInterface(sCameraInterfaceFlags);
} else if (camera->globalCtx->transitionMode != 0) { } else if (camera->globalCtx->transitionMode != 0) {
sCameraInterfaceFlags = 0xF200; sCameraInterfaceFlags = 0xF200;
Camera_UpdateInterface(sCameraInterfaceFlags); Camera_UpdateInterface(sCameraInterfaceFlags);
} else if (camera->globalCtx->csCtx.state != 0) { } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) {
sCameraInterfaceFlags = 0x3200; sCameraInterfaceFlags = 0x3200;
Camera_UpdateInterface(sCameraInterfaceFlags); Camera_UpdateInterface(sCameraInterfaceFlags);
} else { } else {
@ -7455,7 +7445,7 @@ Vec3s Camera_Update(Camera* camera) {
gDbgCamEnabled ^= 1; gDbgCamEnabled ^= 1;
if (gDbgCamEnabled) { if (gDbgCamEnabled) {
DbgCamera_Enable(&D_8015BD80, camera); DbgCamera_Enable(&D_8015BD80, camera);
} else if (camera->globalCtx->csCtx.state != 0) { } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) {
func_80064534(camera->globalCtx, &camera->globalCtx->csCtx); func_80064534(camera->globalCtx, &camera->globalCtx->csCtx);
} }
} }
@ -7554,13 +7544,13 @@ Vec3s Camera_Update(Camera* camera) {
* When the camera's timer is 0, change the camera to it's parent * When the camera's timer is 0, change the camera to it's parent
*/ */
void Camera_Finish(Camera* camera) { void Camera_Finish(Camera* camera) {
Camera* defaultCam = camera->globalCtx->cameraPtrs[0]; Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
Player* player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head; Player* player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head;
if (camera->timer == 0) { if (camera->timer == 0) {
Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, 7); Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, CAM_STAT_ACTIVE);
if ((camera->parentCamIdx == 0) && (camera->unk_168 != 0)) { if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) {
player->actor.freezeTimer = 0; player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000; player->stateFlags1 &= ~0x20000000;
@ -7569,23 +7559,22 @@ void Camera_Finish(Camera* camera) {
osSyncPrintf("camera: player demo end!!\n"); osSyncPrintf("camera: player demo end!!\n");
} }
defaultCam->unk_14C |= 8; mainCam->unk_14C |= 8;
} }
if (camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx == camera->thisIdx) { if (CHILD_CAM(camera)->parentCamIdx == camera->thisIdx) {
camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx = camera->parentCamIdx; CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx;
} }
if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx == camera->thisIdx) { if (PARENT_CAM(camera)->childCamIdx == camera->thisIdx) {
camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx = camera->childCamIdx; PARENT_CAM(camera)->childCamIdx = camera->childCamIdx;
} }
if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->thisIdx == 0) { if (PARENT_CAM(camera)->thisIdx == MAIN_CAM) {
camera->globalCtx->cameraPtrs[camera->parentCamIdx]->animState = 0; PARENT_CAM(camera)->animState = 0;
} }
camera->parentCamIdx = 0; camera->childCamIdx = camera->parentCamIdx = SUBCAM_FREE;
camera->childCamIdx = camera->parentCamIdx;
camera->timer = -1; camera->timer = -1;
camera->globalCtx->envCtx.unk_E1 = 0; camera->globalCtx->envCtx.unk_E1 = 0;
@ -7744,7 +7733,7 @@ s32 Camera_CheckValidMode(Camera* camera, s16 mode) {
} }
s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
if ((camera->unk_14A & 1) != 0) { if (camera->unk_14A & 1) {
if ((u32)((u32)(sCameraSettings[camera->setting].unk_00 & 0xF000000) >> 0x18) >= if ((u32)((u32)(sCameraSettings[camera->setting].unk_00 & 0xF000000) >> 0x18) >=
(u32)((u32)(sCameraSettings[setting].unk_00 & 0xF000000) >> 0x18)) { (u32)((u32)(sCameraSettings[setting].unk_00 & 0xF000000) >> 0x18)) {
camera->unk_14A |= 0x10; camera->unk_14A |= 0x10;
@ -7759,7 +7748,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) { if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) {
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting); osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting);
return -0x63; return -99;
} }
if ((setting == camera->setting) && (!(flags & 1))) { if ((setting == camera->setting) && (!(flags & 1))) {
@ -7771,7 +7760,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
} }
camera->unk_14A |= 0x10; camera->unk_14A |= 0x10;
if ((flags & 2) == 0) { if (!(flags & 2)) {
camera->unk_14A |= 1; camera->unk_14A |= 1;
} }
@ -7827,7 +7816,8 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
camera->unk_14A |= 4; camera->unk_14A |= 4;
Camera_CopyModeValuesToPREG(camera, camera->mode); Camera_CopyModeValuesToPREG(camera, camera->mode);
} else if (settingChangeSuccessful < -1) { } else if (settingChangeSuccessful < -1) {
// @bug: This condition can never happen since settingChangeSuccesful is only ever 0 or 1. // @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or
// camDataIdx would make more sense.
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx, osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx,
camera->thisIdx, 0x32, newCameraSetting); camera->thisIdx, 0x32, newCameraSetting);
} }
@ -7836,7 +7826,7 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
} }
Vec3s* Camera_GetInputDir(Vec3s* dst, Camera* camera) { Vec3s* Camera_GetInputDir(Vec3s* dst, Camera* camera) {
if (gDbgCamEnabled != 0) { if (gDbgCamEnabled) {
*dst = D_8015BD80.unk_10C6; *dst = D_8015BD80.unk_10C6;
return dst; return dst;
} else { } else {
@ -7860,7 +7850,7 @@ s16 Camera_GetInputDirYaw(Camera* camera) {
} }
Vec3s* Camera_GetCamDir(Vec3s* dst, Camera* camera) { Vec3s* Camera_GetCamDir(Vec3s* dst, Camera* camera) {
if (gDbgCamEnabled != 0) { if (gDbgCamEnabled) {
*dst = D_8015BD80.unk_10C6; *dst = D_8015BD80.unk_10C6;
return dst; return dst;
} else { } else {
@ -8124,7 +8114,7 @@ s32 func_8005B198() {
s16 func_8005B1A4(Camera* camera) { s16 func_8005B1A4(Camera* camera) {
camera->unk_14C |= 0x8; camera->unk_14C |= 0x8;
if ((camera->thisIdx == 0) && (camera->globalCtx->activeCamera != 0)) { if ((camera->thisIdx == MAIN_CAM) && (camera->globalCtx->activeCamera != MAIN_CAM)) {
camera->globalCtx->cameraPtrs[camera->globalCtx->activeCamera]->unk_14C |= 0x8; camera->globalCtx->cameraPtrs[camera->globalCtx->activeCamera]->unk_14C |= 0x8;
return camera->globalCtx->activeCamera; return camera->globalCtx->activeCamera;
} }

View file

@ -3445,7 +3445,7 @@ Vec3f D_8011D678[] = {
s32 sDemo5PrevSfxFrame = -200; s32 sDemo5PrevSfxFrame = -200;
// target is player, far from eye // target is player, far from eye
OnePointDemoFull D_8011D6AC[] = { OnePointCsFull D_8011D6AC[] = {
{ // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit { // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
// initFlags & 0xFF00 (eye): none // initFlags & 0xFF00 (eye): none
// action: 15, copy at, eye, roll, fov to camera // action: 15, copy at, eye, roll, fov to camera
@ -3487,14 +3487,14 @@ OnePointDemoFull D_8011D6AC[] = {
}; };
// target is player close to current eye // target is player close to current eye
OnePointDemoFull D_8011D724[] = { OnePointCsFull D_8011D724[] = {
{ 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } }, { 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } },
{ 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } }, { 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
}; };
// target is close to player // target is close to player
OnePointDemoFull D_8011D79C[] = { OnePointCsFull D_8011D79C[] = {
{ 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } }, { 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } },
{ {
@ -3512,7 +3512,7 @@ OnePointDemoFull D_8011D79C[] = {
}; };
// target is within 300 units of eye, and player is within 30 units of eye // target is within 300 units of eye, and player is within 30 units of eye
OnePointDemoFull D_8011D83C[] = { OnePointCsFull D_8011D83C[] = {
{ 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } }, { 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
}; };
@ -3520,20 +3520,20 @@ OnePointDemoFull D_8011D83C[] = {
// target is within 700 units of eye, angle between player/eye and target/eye is less than // target is within 700 units of eye, angle between player/eye and target/eye is less than
// 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200), // 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200),
// and the player is farther than 30 units of the eye // and the player is farther than 30 units of the eye
OnePointDemoFull D_8011D88C[] = { OnePointCsFull D_8011D88C[] = {
{ 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
}; };
// same as above, but the target is NOT within the screen area. // same as above, but the target is NOT within the screen area.
OnePointDemoFull D_8011D8DC[] = { OnePointCsFull D_8011D8DC[] = {
{ 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } }, { 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
}; };
// target is a door. // target is a door.
OnePointDemoFull D_8011D954[] = { OnePointCsFull D_8011D954[] = {
{ 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } }, { 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } },
{ 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } }, { 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
@ -3541,7 +3541,7 @@ OnePointDemoFull D_8011D954[] = {
}; };
// otherwise // otherwise
OnePointDemoFull D_8011D9F4[] = { OnePointCsFull D_8011D9F4[] = {
{ 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } }, { 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },

View file

@ -106,7 +106,7 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
} }
if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) && if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) &&
(gSaveContext.sceneSetupIndex >= 4) && (gDbgCamEnabled == 0)) { (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) {
D_8015FCC8 = 1; D_8015FCC8 = 1;
gSaveContext.cutsceneIndex = 0xFFFD; gSaveContext.cutsceneIndex = 0xFFFD;
gSaveContext.cutsceneTrigger = 1; gSaveContext.cutsceneTrigger = 1;
@ -428,8 +428,8 @@ void func_80065134(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdDayTim
s16 temp2; s16 temp2;
if (csCtx->frames == cmd->startFrame) { if (csCtx->frames == cmd->startFrame) {
temp1 = (cmd->hour * 60.0f) / 0.021972656f; temp1 = (cmd->hour * 60.0f) / (360.0f / 0x4000);
temp2 = (cmd->minute + 1) / 0.021972656f; temp2 = (cmd->minute + 1) / (360.0f / 0x4000);
gSaveContext.dayTime = temp1 + temp2; gSaveContext.dayTime = temp1 + temp2;
gSaveContext.environmentTime = temp1 + temp2; gSaveContext.environmentTime = temp1 + temp2;
@ -1301,7 +1301,7 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext*
} }
while (shouldContinue) { while (shouldContinue) {
if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) { if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) {
shouldContinue = 0; shouldContinue = 0;
} }
cmd += 0x10; cmd += 0x10;
@ -1338,7 +1338,7 @@ s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCt
} }
while (shouldContinue) { while (shouldContinue) {
if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) { if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) {
shouldContinue = 0; shouldContinue = 0;
} }
cmd += 0x10; cmd += 0x10;
@ -1369,7 +1369,7 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
if (D_8015FCC8 != 0) { if (D_8015FCC8 != 0) {
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14); sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
sp2C->player = NULL; sp2C->player = NULL;
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT); Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE); Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0); Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f; sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f;
@ -1412,7 +1412,7 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
if (D_8015FCC8 != 0) { if (D_8015FCC8 != 0) {
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14); sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
sp2C->player = NULL; sp2C->player = NULL;
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT); Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE); Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0); Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
sp3C.x = csCtx->cameraFocus->pos.x; sp3C.x = csCtx->cameraFocus->pos.x;
@ -1914,7 +1914,7 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14); Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14);
} }
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 7); Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, csCtx->unk_14); Gameplay_ClearCamera(globalCtx, csCtx->unk_14);
func_8005B1A4(globalCtx->cameraPtrs[D_8015FCC6]); func_8005B1A4(globalCtx->cameraPtrs[D_8015FCC6]);
} }

View file

@ -211,7 +211,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
f32 temp; f32 temp;
SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z); SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z);
temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) * 0.015625f; temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) / 64.0f;
SkinMatrix_SetScale(&spAC, temp, temp, 1.0f); SkinMatrix_SetScale(&spAC, temp, temp, 1.0f);
SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->mf_11DA0, &sp6C); SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->mf_11DA0, &sp6C);
SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C); SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C);

View file

@ -849,7 +849,7 @@ void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 sc
{ 0.0f, 20.0f, 20.0f }, { 0.0f, 20.0f, 20.0f },
{ 17.320474f, 20.0f, -9.999695f }, { 17.320474f, 20.0f, -9.999695f },
{ -17.320474f, 20.0f, -9.999695f }, { -17.320474f, 20.0f, -9.999695f },
}; }; // 17.320474 is approximately 10 * sqrt(3)
s32 i; s32 i;
Vec3f velocity; Vec3f velocity;
Vec3f pos; Vec3f pos;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,670 @@
#include "global.h"
static CutsceneCameraPoint D_8012013C[14] = {
{ CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } },
{ CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } },
{ CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } },
{ CS_CMD_CONTINUE, 5, 25, 60.0f, { -1817, 218, -1270 } },
{ CS_CMD_CONTINUE, 3, 20, 60.0f, { -1836, 168, -1243 } },
{ CS_CMD_CONTINUE, 0, 20, 60.0f, { -1905, 115, -1193 } },
{ CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 58, -1212 } },
{ CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 31, -1164 } },
{ CS_CMD_CONTINUE, 0, 30, 60.0f, { -1969, 54, -1209 } },
{ CS_CMD_CONTINUE, 0, 30, 60.0f, { -1973, 35, -1206 } },
{ CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
{ CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
{ CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } },
{ CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } },
};
static CutsceneCameraPoint D_8012021C[14] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 72, -1077 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 7, -1048 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 1, -1030 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1987, 17, -1076 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } },
{ CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } },
};
static s16 D_801202FC = 13;
static s16 D_80120300 = 210;
static s16 D_80120304 = 0;
static CutsceneCameraPoint D_80120308[9] = {
{ CS_CMD_CONTINUE, 0, 10, 40.0f, { 0, 4, 0 } }, { CS_CMD_CONTINUE, 0, 10, 40.000004f, { 0, 4, 0 } },
{ CS_CMD_CONTINUE, 0, 10, 50.0f, { 0, 9, 0 } }, { CS_CMD_CONTINUE, 0, 12, 55.0f, { 0, 12, 0 } },
{ CS_CMD_CONTINUE, 0, 15, 61.0f, { 0, 18, 0 } }, { CS_CMD_CONTINUE, 0, 20, 65.0f, { 0, 29, 0 } },
{ CS_CMD_CONTINUE, 0, 40, 60.0f, { 0, 34, 0 } }, { CS_CMD_STOP, 0, 40, 60.0f, { 0, 34, 0 } },
{ CS_CMD_STOP, 0, 10, 60.0f, { 0, 34, 0 } },
};
static CutsceneCameraPoint D_80120398[9] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, 45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, 50 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, 58 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, 78 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, 109 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, 118 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
{ CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
};
static s16 D_80120428 = 9;
static s16 D_8012042C = 90;
static s16 D_80120430 = 1;
static CutsceneCameraPoint D_80120434[10] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, -50 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, -58 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, -78 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, -109 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, -118 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, -119 } },
{ CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } },
};
static CutsceneCameraPoint D_801204D4[14] = {
{ CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } },
{ CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } },
{ CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } },
{ CS_CMD_CONTINUE, -18, 32, 80.600006f, { -80, 251, -8 } },
{ CS_CMD_CONTINUE, -12, 28, 80.600006f, { -64, 259, -28 } },
{ CS_CMD_CONTINUE, -8, 22, 80.600006f, { -79, 200, -342 } },
{ CS_CMD_CONTINUE, -5, 10, 65.80005f, { -110, 140, -549 } },
{ CS_CMD_CONTINUE, -2, 8, 65.2f, { -74, 109, -507 } },
{ CS_CMD_CONTINUE, 0, 10, 65.80002f, { -32, 78, -680 } },
{ CS_CMD_CONTINUE, 0, 20, 85.199936f, { 25, 127, -950 } },
{ CS_CMD_CONTINUE, 0, 30, 85.199936f, { 25, 127, -950 } },
{ CS_CMD_CONTINUE, 0, 40, 85.199936f, { 25, 127, -950 } },
{ CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } },
{ CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } },
};
static CutsceneCameraPoint D_801205B4[14] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -250, 244, -442 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -163, 21, -415 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -98, 86, -520 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -86, 31, -816 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -74, 18, -931 } },
{ CS_CMD_CONTINUE, 1, 0, 80.600006f, { -91, 80, -1220 } },
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 14, 153, -1340 } },
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 28, 125, -1340 } },
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 48, 124, -1340 } },
{ CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1502 } },
{ CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1262 } },
};
static s16 D_80120694 = 14;
static s16 D_80120698 = 190;
static s16 D_8012069C = 8;
static CutsceneCameraPoint D_801206A0[12] = {
{ CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } },
{ CS_CMD_CONTINUE, 6, 20, 70.0f, { -70, 35, 150 } }, { CS_CMD_CONTINUE, 5, 10, 60.0f, { -57, 34, 133 } },
{ CS_CMD_CONTINUE, 4, 25, 65.0f, { -22, 32, 110 } }, { CS_CMD_CONTINUE, 3, 12, 60.0f, { -9, 33, 98 } },
{ CS_CMD_CONTINUE, 3, 5, 65.0f, { -3, 29, 87 } }, { CS_CMD_CONTINUE, 2, 10, 65.0f, { -1, 15, 84 } },
{ CS_CMD_CONTINUE, 1, 200, 65.0f, { 0, 17, 82 } }, { CS_CMD_CONTINUE, 1, 500, 65.0f, { 0, 18, 82 } },
{ CS_CMD_STOP, 8, 50, 65.0f, { 0, 18, 82 } }, { CS_CMD_STOP, 11, 60, 65.0f, { 0, 18, 82 } },
};
static CutsceneCameraPoint D_80120760[12] = {
{ CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 10, 180 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 20, 180 } },
{ CS_CMD_CONTINUE, 6, 0, 70.0f, { -40, 30, 177 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 0, 35, 172 } },
{ CS_CMD_CONTINUE, 4, 0, 65.0f, { 34, 35, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 61, 32, 147 } },
{ CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 30, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
{ CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
{ CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
};
static CutsceneCameraPoint D_80120820[12] = {
{ CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 5, 170 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 10, 170 } },
{ CS_CMD_CONTINUE, 6, 0, 70.0f, { 80, 20, 167 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 74, 25, 165 } },
{ CS_CMD_CONTINUE, 4, 0, 65.0f, { 63, 30, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 66, 34, 147 } },
{ CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 34, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
{ CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
{ CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
};
static s16 D_801208E0 = 12;
static s16 D_801208E4 = 90;
static s16 D_801208E8 = 8;
static OnePointCsFull D_801208EC[3] = {
{ 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120964[2] = {
{ 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
};
static OnePointCsFull D_801209B4[4] = {
{ 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120A54[3] = {
{ 0x8F, 0xFF, 0x2525, 1, 0, 75.0f, 0.1f, { 0.0f, 20.0f, -10.0f }, { 0.0f, 10.0f, -40.0f } },
{ 0x8F, 0xFF, 0x0000, 9, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120ACC[5] = {
{ 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
{ 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
{ 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120B94[11] = {
{ 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
{ 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x8F, 0xFF, 0x4141, 1, 0, 40.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 20.0f, 50.0f } },
{ 0x84, 0xFF, 0x0404, 19, 0, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 40, 10, 50.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 70, 0, 60.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } },
{ 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } },
{ 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120D4C[7] = {
{ 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
{ 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } },
{ 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } },
{ 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120E64[8] = {
{ 0x41, 0x01, 0x2142, 20, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4F, 0xFF, 0x0000, 80, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4B, 0xFF, 0x4242, 8, 0, 60.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4B, 0xFF, 0x4242, 15, 4, 55.0f, 0.05f, { -50.0f, 20.0f, 20.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4B, 0xFF, 0x4242, 15, -4, 50.0f, 0.05f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4B, 0xFF, 0x4242, 15, 0, 50.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x4F, 0xFF, 0x0000, 40, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80120FA4[6] = {
{ 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } },
{ 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } },
{ 0x90, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121094[3] = {
{ 0x0F, 0x08, 0x2101, 20, 0, 50.0f, 1.0f, { 3840.0f, 10.0f, 950.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x01, 0x01, 0x2101, 50, 0, 55.0f, 1.0f, { 4000.0f, 50.0f, 1000.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012110C[3] = {
{ 0x4F, 0x05, 0x2142, 1, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
{ 0x41, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121184[2] = {
{ 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801211D4[2] = {
{ 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121224[6] = {
{ 0x8F, 0x01, 0x4141, 2, 0, 60.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 0.0f, 45.0f } },
{ 0x81, 0xFF, 0x4141, 18, 0, 45.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, -10.0f, 50.0f } },
{ 0x84, 0x34, 0x4104, 80, 0, 70.0f, 0.05f, { 0.0f, 0.0f, 60.0f }, { 0.0f, 250.0f, -50.0f } },
{ 0x8F, 0x01, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8F, 0xFF, 0x0421, 60, 0, 50.0f, 1.0f, { 0.0f, -30.0f, 20.0f }, { 10.0f, 5.0f, -50.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121314[1] = {
{ 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } },
};
static OnePointCsFull D_8012133C[3] = {
{ 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } },
{ 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801213B4[5] = {
{ 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
{ 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
{ 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } },
{ 0x84, 0x45, 0x4222, 30, 0, 60.0f, 0.1f, { 0.0f, 50.0f, 0.0f }, { 5.0f, 30.0f, 220.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012147C[4] = {
{ 0x8F, 0x01, 0x0101, 40, 0, 45.0f, 1.0f, { 820.0f, 1600.0f, -400.0f }, { 777.0f, 1577.0f, -577.0f } },
{ 0x8F, 0x01, 0x0142, 1, 0, 50.0f, 1.0f, { -50.0f, 80.0f, 0.0f }, { 900.0f, 1575.0f, 850.0f } },
{ 0x83, 0x08, 0x0142, 89, -4, 80.0f, 0.07f, { -50.0f, 70.0f, 0.0f }, { 975.0f, 1575.0f, 770.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012151C[2] = {
{ 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012156C[2] = {
{ 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } },
{ 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } },
};
static OnePointCsFull D_801215BC[1] = {
{ 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } },
};
static OnePointCsFull D_801215E4[10] = {
{ 0x0F, 0x08, 0x4141, 20, 0, 30.0f, 1.0f, { 0.0f, 120.0f, 0.0f }, { -10.0f, 140.0f, -90.0f } },
{ 0x0F, 0x01, 0x0101, 1, 4, 75.0f, 1.0f, { -1360.0f, -940.0f, -3343.0f }, { -1060.0f, -980.0f, -3325.0f } },
{ 0x0B, 0xFF, 0x4141, 129, 0, 75.0f, 0.5f, { 0.0f, 50.0f, 0.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x03, 0xFF, 0x0303, 30, 0, 70.0f, 0.05f, { 0.0f, 80.0f, 0.0f }, { -10.0f, 120.0f, 10.0f } },
{ 0x0F, 0x09, 0x0101, 40, -5, 70.0f, 1.0f, { -973.0f, -924.0f, -3263.0f }, { -1190.0f, -1010.0f, -3365.0f } },
{ 0x0F, 0x01, 0x0101, 1, 0, 75.0f, 1.0f, { -1355.0f, -700.0f, -3340.0f }, { -1040.0f, -940.0f, -3345.0f } },
{ 0x02, 0xFF, 0x0101, 60, 0, 45.0f, 0.8f, { -1370.0f, -875.0f, -3345.0f }, { -1230.0f, -885.0f, -3345.0f } },
{ 0x01, 0xFF, 0x0101, 10, 0, 70.0f, 1.0f, { -1370.0f, -875.0f, -3345.0f }, { -1210.0f, -900.0f, -3420.0f } },
{ 0x0F, 0xFF, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121774[4] = {
{ 0x0F, 0x08, 0x0101, 1, -2, 75.0f, 1.0f, { -1340.0f, -860.0f, -3345.0f }, { -1415.0f, -940.0f, -3520.0f } },
{ 0x01, 0x01, 0x0142, 39, 2, 70.0f, 1.0f, { 0.0f, -20.0f, 10.0f }, { -1140.0f, -1010.0f, -3560.0f } },
{ 0x01, 0x05, 0x0121, 20, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 20.0f }, { -1220.0f, -1005.0f, -3660.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121814[4] = {
{ 0x0F, 0x4C, 0x0101, 5, 0, 40.0f, 1.0f, { -1400.0f, -540.0f, -3327.0f }, { -1254.0f, -20.0f, -3357.0f } },
{ 0x01, 0xFF, 0x0101, 70, 0, 75.0f, 0.75f, { -1327.0f, 100.0f, -3342.0f }, { -1320.0f, 350.0f, -3540.0f } },
{ 0x01, 0xFF, 0x2121, 10, 0, 60.0f, 0.75f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801218B4[2] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 0.0f, 350.0f, -1520.0f }, { 0.0f, 715.0f, -885.0f } },
{ 0x03, 0xFF, 0x0101, 100, 0, 70.0f, 0.02f, { 0.0f, 75.0f, -1335.0f }, { 0.0f, 20.0f, -1190.0f } },
};
static OnePointCsFull D_80121904[2] = {
{ 0x0F, 0xFF, 0x0101, 50, 10, 65.0f, 1.0f, { 165.0f, 85.0f, -920.0f }, { 65.0f, -30.0f, -720.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121954[3][2] = {
{
{ 0x0F, 0xFF, 0x0101, 20, 5, 60.0f, 1.0f, { -700.0f, 940.0f, 300.0f }, { -765.0f, 1000.0f, 335.0f } },
{ 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.1f, { -540.0f, 875.0f, 245.0f }, { -585.0f, 900.0f, 335.0f } },
},
{
{ 0x0F, 0xFF, 0x0101, 40, -30, 70.0f, 1.0f, { -80.0f, 115.0f, -180.0f }, { -5.0f, 240.0f, -190.0f } },
{ 0x0B, 0xFF, 0x0101, 60, 20, 70.0f, 0.1f, { -100.0f, 350.0f, -175.0f }, { -5.0f, 240.0f, -190.0f } },
},
{
{ 0x03, 0xFF, 0x0101, 80, 5, 70.0f, 0.2f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } },
{ 0x0F, 0xFF, 0x0101, 20, 5, 70.0f, 1.0f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } },
},
};
static OnePointCsFull D_80121A44[12] = {
{ 0x4F, 0x05, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } },
{ 0x42, 0x01, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 45.0f, 0.0f }, { 0.0f, 45.0f, 50.0f } },
{ 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x4F, 0x05, 0x2222, 40, 5, 50.0f, 1.0f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 50.0f, 50.0f } },
{ 0x4F, 0x01, 0x4242, 40, 5, 60.0f, 1.0f, { 30.0f, 30.0f, 15.0f }, { 70.0f, 30.0f, -40.0f } },
{ 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x4F, 0xFF, 0x4242, 30, -5, 50.0f, 1.0f, { 20.0f, 30.0f, -5.0f }, { 0.0f, 70.0f, 70.0f } },
{ 0x50, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x4F, 0x01, 0x2242, 40, 0, 45.0f, 1.0f, { 0.0f, 30.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } },
{ 0x4B, 0x01, 0x22C2, 140, 0, 60.0f, 0.04f, { 0.0f, 0.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } },
{ 0x49, 0xFF, 0x2222, 20, 0, 60.0f, 0.8f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 60.0f, -60.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121C24[7] = {
{ 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } },
{ 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } },
{ 0x0F, 0xFF, 0x0101, 40, -4, 55.0f, 1.0f, { 250.0f, 375.0f, -1440.0f }, { 235.0f, 365.0f, -1315.0f } },
{ 0x0F, 0xFF, 0x0101, 100, 0, 95.0f, 1.0f, { 125.0f, 345.0f, -1500.0f }, { 125.0f, 255.0f, -1350.0f } },
{ 0x02, 0xFF, 0x0101, 100, 0, 60.0f, 1.0f, { 125.0f, 325.0f, -1500.0f }, { 125.0f, 480.0f, -1000.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121D3C[3] = {
{ 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } },
{ 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } },
{ 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121DB4[9] = {
{ 0x0F, 0xFF, 0x0101, 40, 0, 70.0f, 1.0f, { 4290.0f, -1332.0f, -1900.0f }, { 4155.0f, -1360.0f, -1840.0f } },
{ 0x02, 0xFF, 0x0101, 60, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } },
{ 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } },
{ 0x0F, 0xFF, 0x0101, 80, 8, 75.0f, 1.0f, { 4010.0f, -1152.0f, -1728.0f }, { 3997.0f, -1194.0f, -1629.0f } },
{ 0x0F, 0x39, 0x2121, 1, 8, 75.0f, 1.0f, { 20.0f, 20.0f, 0.0f }, { 50.0f, 30.0f, 200.0f } },
{ 0x04, 0xFF, 0x2121, 99, 2, 70.0f, 0.02f, { -20.0f, 0.0f, 20.0f }, { 300.0f, 50.0f, -500.0f } },
{ 0x09, 0x38, 0x2121, 149, -20, 70.0f, 0.1f, { 100.0f, 50.0f, -100.0f }, { 5000.0f, 1055.0f, -2250.0f } },
{ 0x0F, 0xFF, 0x2121, 1, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121F1C[4] = {
{ 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80121FBC[4] = {
{ 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } },
{ 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012205C[3] = {
{ 0x0F, 0xFF, 0x42C2, 1, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } },
{ 0x0F, 0xFF, 0x0080, 29, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } },
{ 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } },
};
static OnePointCsFull D_801220D4[5] = {
{ 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } },
{ 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } },
{ 0x0F, 0xFF, 0x0000, 25, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012219C[7] = {
{ 0x0F, 0xFF, 0x2121, 5, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } },
{ 0x02, 0xFF, 0x4242, 15, 0, 40.0f, 0.4f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } },
{ 0x0F, 0xFF, 0x0000, 20, 0, 40.0f, 1.0f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } },
{ 0x01, 0xFF, 0x4242, 20, 0, 60.0f, 1.0f, { 20.0f, 60.0f, 20.0f }, { 40.0f, 60.0f, -80.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0000, 90, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801222B4[5] = {
{ 0x0F, 0xFF, 0x0101, 20, 10, 45.0f, 1.0f, { -1200.0f, 730.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
{ 0x0B, 0xFF, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 480.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
{ 0x0B, 0x81, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
{ 0x0B, 0x8A, 0x0101, 5, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012237C[2] = {
{ 0x0F, 0xFF, 0x0101, 20, -2, 65.0f, 1.0f, { -625.0f, 185.0f, -685.0f }, { -692.0f, 226.0f, -515.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801223CC[6] = {
{ 0x0F, 0xFF, 0x0101, 20, 0, 55.0f, 1.0f, { 60.0f, 1130.0f, -1430.0f }, { 60.0f, 1130.0f, -1190.0f } },
{ 0x0F, 0xFF, 0x0101, 18, -13, 68.0f, 1.0f, { 60.0f, 1130.0f, -1445.0f }, { 180.0f, 1170.0f, -1240.0f } },
{ 0x0F, 0xFF, 0x0101, 16, 18, 75.0f, 1.0f, { 42.0f, 1040.0f, -1400.0f }, { -20.0f, 940.0f, -1280.0f } },
{ 0x0F, 0xFF, 0x0101, 4, 0, 60.0f, 1.0f, { 60.0f, 1100.0f, -1465.0f }, { 60.0f, 1100.0f, -1180.0f } },
{ 0x02, 0xFF, 0x0101, 32, 0, 70.0f, 1.0f, { 60.0f, 1100.0f, -1030.0f }, { 60.0f, 1150.0f, -740.0f } },
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801224BC[7] = {
{ 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 60.0f, 1800.0f, -920.0f }, { 60.0f, 1860.0f, -800.0f } },
{ 0x03, 0xFF, 0x0101, 20, 0, 70.0f, 0.1f, { 60.0f, 1720.0f, -920.0f }, { 60.0f, 1780.0f, -800.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0142, 1, 0, 75.0f, 1.0f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } },
{ 0x03, 0xFF, 0x0142, 119, 0, 75.0f, 0.05f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } },
{ 0x03, 0xFF, 0x4242, 20, 0, 60.0f, 0.1f, { 0.0f, 70.0f, 0.0f }, { 0.0f, 100.0f, 200.0f } },
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801225D4[5] = {
{ 0x0F, 0x08, 0x0101, 1, 0, 50.0f, 1.0f, { 4100.0f, 1200.0f, -1400.0f }, { 3900.0f, 1100.0f, -1400.0f } },
{ 0x01, 0x3B, 0x0101, 60, 4, 50.0f, 0.94f, { 4100.0f, 965.0f, -1385.0f }, { 3790.0f, 825.0f, -1325.0f } },
{ 0x03, 0xFF, 0x0101, 90, -5, 130.0f, 0.02f, { 4100.0f, 975.0f, -1375.0f }, { 3735.0f, 715.0f, -1325.0f } },
{ 0x0F, 0x08, 0x2323, 2, 0, 60.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { -10.0f, 15.0f, -200.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012269C[3] = {
{ 0x0F, 0xFF, 0x0101, 20, 2, 45.0f, 1.0f, { 975.0f, 225.0f, -1195.0f }, { 918.0f, 228.0f, -1228.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122714[4] = {
{ 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } },
{ 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } },
{ 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801227B4[6] = {
{ 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 1400.0f, 100.0f, -170.0f }, { 1250.0f, 100.0f, -170.0f } },
{ 0x03, 0xFF, 0x4242, 130, 0, 60.0f, 0.2f, { 0.0f, -5.0f, 0.0f }, { -150.0f, -5.0f, 0.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x02, 0xFF, 0x0303, 69, 0, 85.0f, 1.0f, { -40.0f, 0.0f, 0.0f }, { -40.0f, 0.0f, 0.0f } },
{ 0x02, 0xFF, 0x0303, 20, 0, 60.0f, 1.0f, { 10.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801228A4[5] = {
{ 0x0F, 0x01, 0x0101, 20, 5, 30.0f, 1.0f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } },
{ 0x02, 0xFF, 0x0101, 20, -2, 70.0f, 0.8f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } },
{ 0x0F, 0x08, 0x0101, 90, 2, 62.0f, 1.0f, { 1140.0f, 125.0f, 1920.0f }, { 1255.0f, 150.0f, 1785.0f } },
{ 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012296C[4] = {
{ 0x0F, 0xFF, 0x0101, 20, -10, 70.0f, 1.0f, { -930.0f, 765.0f, -3075.0f }, { -700.0f, 700.0f, -3075.0f } },
{ 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.05f, { -930.0f, 205.0f, -3075.0f }, { -700.0f, 140.0f, -3075.0f } },
{ 0x0F, 0xFF, 0x0000, 120, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122A0C[2] = {
{ 0x0F, 0xFF, 0x0101, 60, 4, 50.0f, 1.0f, { 0.0f, 400.0f, -1000.0f }, { -200.0f, 500.0f, -850.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122A5C[8] = {
{ 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -45.0f, 3650.0f, -4415.0f } },
{ 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { -120.0f, 2187.0f, -3286.0f }, { -110.0f, 2162.0f, -3262.0f } },
{ 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0101, 55, 0, 60.0f, 1.0f, { -38.0f, 1467.0f, -1102.0f }, { 64.0f, 1423.0f, -1188.0f } },
{ 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -20.0f, 3650.0f, -4400.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122B9C[3] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 1095.0f, 2890.0f, -2980.0f }, { 1166.0f, 2695.0f, -2710.0f } },
{ 0x0F, 0xFF, 0x0101, 60, 15, 65.0f, 1.0f, { 566.0f, 4654.0f, -4550.0f }, { 606.0f, 5160.0f, -4740.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122C14[1] = {
{ 0x0F, 0xFF, 0x0101, 999, 0, 85.0f, 1.0f, { -15.0f, 185.0f, 160.0f }, { -15.0f, 210.0f, 250.0f } },
};
static OnePointCsFull D_80122C3C[1] = {
{ 0x0F, 0xFF, 0x0101, 999, -2, 70.0f, 1.0f, { -62.0f, 60.0f, -315.0f }, { -115.0f, 30.0f, -445.0f } },
};
static OnePointCsFull D_80122C64[1] = {
{ 0x0F, 0xFF, 0x0101, 999, 3, 70.0f, 1.0f, { -40.0f, 80.0f, 375.0f }, { -85.0f, 45.0f, 485.0f } },
};
static OnePointCsFull D_80122C8C[1] = {
{ 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } },
};
static OnePointCsFull D_80122CB4[2] = {
{ 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
{ 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
};
static OnePointCsFull D_80122D04[2] = {
{ 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
};
static OnePointCsFull D_80122D54[3] = {
{ 0x0F, 0xFF, 0x0101, 1, -4, 50.0f, 1.0f, { 230.0f, 65.0f, 300.0f }, { 50.0f, 50.0f, 225.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122DCC[3] = {
{ 0x0F, 0xFF, 0x0101, 1, 0, 50.0f, 1.0f, { 0.0f, 5.0f, -145.0f }, { 0.0f, 55.0f, 55.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80122E44[2][7] = {
{
{ 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } },
{ 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x03, 0xFF, 0x4343, 30, -5, 50.0f, 0.2f, { -10.0f, 80.0f, 10.0f }, { 20.0f, 20.0f, 120.0f } },
{ 0x10, 0xFF, 0x0000, 1, -5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0B, 0x01, 0x4343, 160, 10, 80.0f, 0.005f, { -50.0f, 60.0f, 0.0f }, { -100.0f, 20.0f, 50.0f } },
{ 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } },
{ 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
},
{
{ 0x83, 0xFF, 0x2222, 10, -5, 90.0f, 0.2f, { -50.0f, 100.0f, 140.0f }, { 30.0f, 10.0f, -20.0f } },
{ 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x03, 0xFF, 0x4343, 30, 5, 50.0f, 0.2f, { 10.0f, 80.0f, 10.0f }, { -20.0f, 20.0f, 120.0f } },
{ 0x10, 0xFF, 0x0000, 1, 5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0B, 0x01, 0x4343, 160, -10, 80.0f, 0.005f, { 50.0f, 60.0f, 0.0f }, { 100.0f, 20.0f, 50.0f } },
{ 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } },
{ 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
},
};
static OnePointCsFull D_80123074[5] = {
{ 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { -27.0f, -96.0f, 25.0f }, { 37.0f, -5.0f, 100.0f } },
{ 0x81, 0xFF, 0xA2A2, 38, 4, 60.0f, 1.0f, { 64.0f, -109.0f, 55.0f }, { 37.0f, 150.0f, 155.0f } },
{ 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { 45.0f, 123.0f, 45.0f }, { 70.0f, 5.0f, 125.0f } },
{ 0x81, 0xFF, 0xA2A2, 58, 4, 60.0f, 0.9f, { 82.0f, 95.0f, 55.0f }, { 25.0f, -175.0f, 180.0f } },
{ 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012313C[3] = {
{ 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } },
{ 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } },
{ 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801231B4[4] = {
{ 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } },
{ 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } },
{ 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } },
{ 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80123254[2] = {
{ 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
};
static OnePointCsFull D_801232A4[1] = {
{ 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
};
static OnePointCsFull D_801232CC[5] = {
{ 0x01, 0xFF, 0x0101, 45, -3, 65.0f, 1.0f, { -52.0f, 84.0f, -846.0f }, { -159.0f, 33.0f, -729.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80123394[5] = {
{ 0x01, 0xFF, 0x0101, 45, 3, 65.0f, 1.0f, { -16.0f, 87.0f, -829.0f }, { 98.0f, 24.0f, -714.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012345C[4] = {
{ 0x01, 0x01, 0x4242, 40, 0, 40.0f, 1.0f, { 0.0f, 50.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } },
{ 0x04, 0x4D, 0x4242, 40, 0, 60.0f, 0.3f, { 0.0f, 90.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } },
{ 0x04, 0x01, 0x2121, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801234FC[5] = {
{ 0x01, 0x05, 0x0441, 10, 0, 70.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 120.0f } },
{ 0x03, 0xFF, 0x4141, 30, 0, 50.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 80.0f } },
{ 0x10, 0x01, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x82, 0xFF, 0x2121, 10, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_801235C4[5] = {
{ 0x0F, 0x01, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 60.0f } },
{ 0x83, 0xFF, 0x0441, 39, 0, 70.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 100.0f } },
{ 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x82, 0xFF, 0x2121, 15, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_8012368C[4] = {
{ 0x0F, 0xFF, 0x0101, 10, 0, 60.0f, 1.0f, { -1110.0f, -180.0f, -840.0f }, { -985.0f, -220.0f, -840.0f } },
{ 0x02, 0xFF, 0x0101, 70, -45, 75.0f, 1.0f, { -1060.0f, -160.0f, -840.0f }, { -1005.0f, -230.0f, -840.0f } },
{ 0x0F, 0xFF, 0x0000, 10, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x0F, 0xFF, 0x0101, 180, 9, 80.0f, 1.0f, { -1205.0f, -175.0f, -840.0f }, { -1305.0f, -230.0f, -828.0f } },
};
static OnePointCsFull D_8012372C[4] = {
{ 0x0F, 0xFF, 0x0142, 10, 0, 70.0f, 1.0f, { 0.0f, 80.0f, 0.0f }, { -1650.0f, 200.0f, -2920.0f } },
{ 0x02, 0xFF, 0x0142, 110, -2, 50.0f, 0.5f, { 0.0f, 150.0f, 0.0f }, { -1320.0f, 170.0f, -2900.0f } },
{ 0x0B, 0xFF, 0x4242, 100, 2, 70.0f, 0.1f, { 0.0f, 150.0f, 50.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x03, 0xFF, 0x4242, 60, 2, 45.0f, 0.01f, { 0.0f, 150.0f, 50.0f }, { 0.0f, 200.0f, -80.0f } },
};
static OnePointCsFull D_801237CC[5] = {
{ 0x8F, 0xFF, 0x4242, 20, 0, 50.0f, 1.0f, { 0.0f, 50.0f, -10.0f }, { 0.0f, 0.0f, 100.0f } },
{ 0x0A, 0xFF, 0x0101, 80, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 2800.0f, 1190.0f, 540.0f } },
{ 0x0F, 0xFF, 0x0000, 10, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x02, 0xFF, 0x0101, 55, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 1500.0f, 1415.0f, 650.0f } },
{ 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
static OnePointCsFull D_80123894[3] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } },
{ 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } },
};
static OnePointCsFull D_8012390C[2] = {
{ 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } },
};
static OnePointCsFull D_8012395C[3] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } },
{ 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } },
};
static OnePointCsFull D_801239D4[3] = {
{ 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } },
{ 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};

View file

@ -2082,7 +2082,7 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) {
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(globalCtx->csCtx.state == 0)) { (globalCtx->csCtx.state == CS_STATE_IDLE)) {
// clang-format off // clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); } &D_801333E0, &D_801333E0, &D_801333E8); }
@ -2722,7 +2722,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
} }
if (interfaceCtx->naviCalling && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && if (interfaceCtx->naviCalling && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) &&
(globalCtx->csCtx.state == 0)) { (globalCtx->csCtx.state == CS_STATE_IDLE)) {
if (!sCUpInvisible) { if (!sCUpInvisible) {
// C-Up Button Texture, Color & Label (Navi Text) // C-Up Button Texture, Color & Label (Navi Text)
gDPPipeSync(OVERLAY_DISP++); gDPPipeSync(OVERLAY_DISP++);
@ -4058,7 +4058,8 @@ void Interface_Update(GlobalContext* globalCtx) {
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (msgCtx->msgMode == 0) && if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (msgCtx->msgMode == 0) &&
(globalCtx->sceneLoadFlag == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && (globalCtx->sceneLoadFlag == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(globalCtx->transitionMode == 0) && ((globalCtx->csCtx.state == 0) || !Player_InCsMode(globalCtx))) { (globalCtx->transitionMode == 0) &&
((globalCtx->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(globalCtx))) {
if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) { if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) {
gSaveContext.magicLevel = gSaveContext.doubleMagic + 1; gSaveContext.magicLevel = gSaveContext.doubleMagic + 1;
gSaveContext.unk_13F0 = 8; gSaveContext.unk_13F0 = 8;

View file

@ -219,12 +219,12 @@ void Gameplay_Init(GameState* thisx) {
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
Camera_Init(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); Camera_Init(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
Camera_ChangeStatus(&globalCtx->subCameras[i], 0x100); Camera_ChangeStatus(&globalCtx->subCameras[i], CAM_STAT_UNK100);
} }
globalCtx->cameraPtrs[0] = &globalCtx->mainCamera; globalCtx->cameraPtrs[MAIN_CAM] = &globalCtx->mainCamera;
globalCtx->cameraPtrs[0]->uid = 0; globalCtx->cameraPtrs[MAIN_CAM]->uid = 0;
globalCtx->activeCamera = 0; globalCtx->activeCamera = MAIN_CAM;
func_8005AC48(&globalCtx->mainCamera, 0xFF); func_8005AC48(&globalCtx->mainCamera, 0xFF);
Sram_Init(globalCtx, &globalCtx->sramCtx); Sram_Init(globalCtx, &globalCtx->sramCtx);
func_80112098(globalCtx); func_80112098(globalCtx);
@ -428,7 +428,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
for (i = 0; i < gObjectTableSize; i++) { for (i = 0; i < gObjectTableSize; i++) {
s32 size = gObjectTable[i].vromEnd - gObjectTable[i].vromStart; s32 size = gObjectTable[i].vromEnd - gObjectTable[i].vromStart;
osSyncPrintf("%08x-%08x %08x(%8.3fKB)\n", gObjectTable[i].vromStart, gObjectTable[i].vromEnd, size, osSyncPrintf("%08x-%08x %08x(%8.3fKB)\n", gObjectTable[i].vromStart, gObjectTable[i].vromEnd, size,
size * 0.0009765625f); size / 1024.0f);
} }
osSyncPrintf("\n"); osSyncPrintf("\n");
} }
@ -997,7 +997,7 @@ skip:
LOG_NUM("1", 1, "../z_play.c", 3801); LOG_NUM("1", 1, "../z_play.c", 3801);
} }
if ((sp80 == 0) || (gDbgCamEnabled != 0)) { if ((sp80 == 0) || (gDbgCamEnabled)) {
s32 pad3[5]; s32 pad3[5];
s32 i; s32 i;
@ -1007,7 +1007,7 @@ skip:
LOG_NUM("1", 1, "../z_play.c", 3806); LOG_NUM("1", 1, "../z_play.c", 3806);
} }
for (i = 0; i < 4; i++) { for (i = 0; i < NUM_CAMS; i++) {
if ((i != globalCtx->nextCamera) && (globalCtx->cameraPtrs[i] != NULL)) { if ((i != globalCtx->nextCamera) && (globalCtx->cameraPtrs[i] != NULL)) {
if (1 && HREG(63)) { if (1 && HREG(63)) {
LOG_NUM("1", 1, "../z_play.c", 3809); LOG_NUM("1", 1, "../z_play.c", 3809);
@ -1104,6 +1104,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if ((HREG(80) != 10) || (HREG(92) != 0)) { if ((HREG(80) != 10) || (HREG(92) != 0)) {
Gfx* gfxP; Gfx* gfxP;
Gfx* sp1CC = POLY_OPA_DISP; Gfx* sp1CC = POLY_OPA_DISP;
gfxP = Graph_GfxPlusOne(sp1CC); gfxP = Graph_GfxPlusOne(sp1CC);
gSPDisplayList(OVERLAY_DISP++, gfxP); gSPDisplayList(OVERLAY_DISP++, gfxP);
@ -1134,6 +1135,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if (gTrnsnUnkState == 3) { if (gTrnsnUnkState == 3) {
Gfx* sp88 = POLY_OPA_DISP; Gfx* sp88 = POLY_OPA_DISP;
TransitionUnk_Draw(&sTrnsnUnk, &sp88); TransitionUnk_Draw(&sTrnsnUnk, &sp88);
POLY_OPA_DISP = sp88; POLY_OPA_DISP = sp88;
goto Gameplay_Draw_DrawOverlayElements; goto Gameplay_Draw_DrawOverlayElements;
@ -1151,23 +1153,23 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if (R_PAUSE_MENU_MODE == 3) { if (R_PAUSE_MENU_MODE == 3) {
Gfx* sp84 = POLY_OPA_DISP; Gfx* sp84 = POLY_OPA_DISP;
func_800C24BC(&globalCtx->preRenderCtx, &sp84); func_800C24BC(&globalCtx->preRenderCtx, &sp84);
POLY_OPA_DISP = sp84; POLY_OPA_DISP = sp84;
goto Gameplay_Draw_DrawOverlayElements; goto Gameplay_Draw_DrawOverlayElements;
} else { } else {
s32 sp80; s32 sp80;
if ((HREG(80) != 10) || (HREG(83) != 0)) { if ((HREG(80) != 10) || (HREG(83) != 0)) {
if (globalCtx->skyboxId) { if (globalCtx->skyboxId && (globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) {
if ((globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) { if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) {
if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) { func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx);
func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx); SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId,
SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y,
globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
globalCtx->view.eye.z); } else if (globalCtx->skyboxCtx.unk_140 == 0) {
} else if (globalCtx->skyboxCtx.unk_140 == 0) { SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
}
} }
} }
} }
@ -1207,14 +1209,13 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
} }
if ((HREG(80) != 10) || (HREG(83) != 0)) { if ((HREG(80) != 10) || (HREG(83) != 0)) {
if (globalCtx->skyboxCtx.unk_140 != 0) { if ((globalCtx->skyboxCtx.unk_140 != 0) && (ACTIVE_CAM->setting != CAM_SET_PREREND0)) {
if (ACTIVE_CAM->setting != 0x19) { Vec3f sp74;
Vec3f sp74;
Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM); Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM);
SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y, globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y,
globalCtx->view.eye.z + sp74.z); globalCtx->view.eye.z + sp74.z);
}
} }
} }
@ -1268,6 +1269,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if ((R_PAUSE_MENU_MODE == 1) || (gTrnsnUnkState == 1)) { if ((R_PAUSE_MENU_MODE == 1) || (gTrnsnUnkState == 1)) {
Gfx* sp70 = OVERLAY_DISP; Gfx* sp70 = OVERLAY_DISP;
s32 pad[4]; s32 pad[4];
globalCtx->preRenderCtx.fbuf = gfxCtx->curFrameBuffer; globalCtx->preRenderCtx.fbuf = gfxCtx->curFrameBuffer;
globalCtx->preRenderCtx.fbufSave = (u16*)gZBuffer; globalCtx->preRenderCtx.fbufSave = (u16*)gZBuffer;
func_800C1F20(&globalCtx->preRenderCtx, &sp70); func_800C1F20(&globalCtx->preRenderCtx, &sp70);
@ -1351,7 +1353,7 @@ void Gameplay_Main(GameState* thisx) {
// original name: "Game_play_demo_mode_check" // original name: "Game_play_demo_mode_check"
s32 Gameplay_InCsMode(GlobalContext* globalCtx) { s32 Gameplay_InCsMode(GlobalContext* globalCtx) {
return (globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx); return (globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx);
} }
f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) { f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
@ -1463,7 +1465,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
globalCtx->sceneNum = sceneNum; globalCtx->sceneNum = sceneNum;
globalCtx->sceneConfig = scene->config; globalCtx->sceneConfig = scene->config;
osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) * 0.0009765625f); osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f);
globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile); globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile);
scene->unk_13 = 0; scene->unk_13 = 0;
@ -1474,7 +1476,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
Gameplay_InitScene(globalCtx, spawn); Gameplay_InitScene(globalCtx, spawn);
osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) * 0.0009765625f); osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) / 1024.0f);
} }
void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) { void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
@ -1493,22 +1495,22 @@ void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) { s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) {
s16 i; s16 i;
for (i = 1; i < 4; i++) { for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] == NULL) { if (globalCtx->cameraPtrs[i] == NULL) {
break; break;
} }
} }
if (i == 4) { if (i == NUM_CAMS) {
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST); osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST);
return -1; return SUBCAM_NONE;
} }
osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL( osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL(
CYAN) " " VT_RST "\n", CYAN) " " VT_RST "\n",
i); i);
globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - 1]; globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - SUBCAM_FIRST];
Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
globalCtx->cameraPtrs[i]->thisIdx = i; globalCtx->cameraPtrs[i]->thisIdx = i;
@ -1520,9 +1522,9 @@ s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx) {
} }
s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) { s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) {
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
if (status == 7) { if (status == CAM_STAT_ACTIVE) {
globalCtx->activeCamera = camIdx; globalCtx->activeCamera = camIdx;
} }
@ -1530,14 +1532,14 @@ s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status)
} }
void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) { void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
if (camIdx == 0) { if (camIdx == MAIN_CAM) {
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: never clear camera !!\n" VT_RST); osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: never clear camera !!\n" VT_RST);
} }
if (globalCtx->cameraPtrs[camIdx] != NULL) { if (globalCtx->cameraPtrs[camIdx] != NULL) {
Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], 0x100); Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], CAM_STAT_UNK100);
globalCtx->cameraPtrs[camIdx] = NULL; globalCtx->cameraPtrs[camIdx] = NULL;
osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " clear sub camera [%d] " VT_BGCOL( osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " clear sub camera [%d] " VT_BGCOL(
CYAN) " " VT_RST "\n", CYAN) " " VT_RST "\n",
@ -1550,24 +1552,24 @@ void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx) { void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx) {
s16 i; s16 i;
for (i = 1; i < 4; i++) { for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] != NULL) { if (globalCtx->cameraPtrs[i] != NULL) {
Gameplay_ClearCamera(globalCtx, i); Gameplay_ClearCamera(globalCtx, i);
} }
} }
globalCtx->activeCamera = 0; globalCtx->activeCamera = MAIN_CAM;
} }
Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) { Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) {
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
return globalCtx->cameraPtrs[camIdx]; return globalCtx->cameraPtrs[camIdx];
} }
s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) { s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) {
s32 ret = 0; s32 ret = 0;
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
Camera* camera = globalCtx->cameraPtrs[camIdx]; Camera* camera = globalCtx->cameraPtrs[camIdx];
Player* player; Player* player;
@ -1593,7 +1595,7 @@ s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3
s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) { s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) {
s32 ret = 0; s32 ret = 0;
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
Camera* camera = globalCtx->cameraPtrs[camIdx]; Camera* camera = globalCtx->cameraPtrs[camIdx];
Player* player; Player* player;
@ -1626,25 +1628,24 @@ s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) {
} }
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) { s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) {
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
Camera* camera; Camera* camera = globalCtx->cameraPtrs[camIdx];
camera = globalCtx->cameraPtrs[camIdx];
camera->roll = roll; camera->roll = roll;
return 1; return 1;
} }
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) { void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) {
s16 camIdx2 = (camId2 == -1) ? globalCtx->activeCamera : camId2; s16 camIdx2 = (camId2 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId2;
s16 camIdx1 = (camId1 == -1) ? globalCtx->activeCamera : camId1; s16 camIdx1 = (camId1 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId1;
Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]); Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]);
} }
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) { s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) {
Camera* camera; Camera* camera;
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
camera = globalCtx->cameraPtrs[camIdx]; camera = globalCtx->cameraPtrs[camIdx];
Camera_InitPlayerSettings(camera, player); Camera_InitPlayerSettings(camera, player);
@ -1656,12 +1657,12 @@ s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 settin
} }
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) { void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
s16 i; s16 i;
Gameplay_ClearCamera(globalCtx, camIdx); Gameplay_ClearCamera(globalCtx, camIdx);
for (i = 1; i < 4; i++) { for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] != NULL) { if (globalCtx->cameraPtrs[i] != NULL) {
osSyncPrintf( osSyncPrintf(
VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST, VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST,
@ -1671,10 +1672,10 @@ void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
} }
if (arg2 <= 0) { if (arg2 <= 0) {
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE); Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
globalCtx->cameraPtrs[0]->childCamIdx = globalCtx->cameraPtrs[0]->parentCamIdx = 0; globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx = globalCtx->cameraPtrs[MAIN_CAM]->parentCamIdx = SUBCAM_FREE;
} else { } else {
func_800800F8(globalCtx, 1020, arg2, NULL, 0); OnePointCutscene_Init(globalCtx, 1020, arg2, NULL, MAIN_CAM);
} }
} }
@ -1695,7 +1696,7 @@ s16 func_800C09D8(GlobalContext* globalCtx, s16 camId, s16 arg2) {
return 0; return 0;
} else if (camera->uid != arg2) { } else if (camera->uid != arg2) {
return 0; return 0;
} else if (camera->status != 7) { } else if (camera->status != CAM_STAT_ACTIVE) {
return 2; return 2;
} else { } else {
return 1; return 1;

View file

@ -693,8 +693,8 @@ Vec3f D_80126038[] = {
}; };
f32 D_80126050[] = { 1265.0f, 826.0f }; f32 D_80126050[] = { 1265.0f, 826.0f };
f32 D_80126058[] = { 170.0415955f, 48.30249786f }; f32 D_80126058[] = { SQ(13.04f), SQ(6.95f) };
f32 D_80126060[] = { 10.019104f, -19.92510223f }; f32 D_80126060[] = { 10.019104f, -19.925102f };
f32 D_80126068[] = { 5.0f, 3.0f }; f32 D_80126068[] = { 5.0f, 3.0f };
Vec3f D_80126070 = { 0.0f, -300.0f, 0.0f }; Vec3f D_80126070 = { 0.0f, -300.0f, 0.0f };
@ -705,7 +705,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
Vec3f sp98; Vec3f sp98;
Vec3f footprintPos; Vec3f footprintPos;
CollisionPoly* sp88; CollisionPoly* sp88;
UNK_TYPE sp84; s32 sp84;
f32 sp80; f32 sp80;
f32 sp7C; f32 sp7C;
f32 sp78; f32 sp78;
@ -768,14 +768,14 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
sp50 = Math_FAtan2F(sp58, sp60); sp50 = Math_FAtan2F(sp58, sp60);
temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * 10430.378f; temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * (0x8000 / M_PI);
temp1 = temp1 - skelAnime->jointTable[shinLimbIndex].z; temp1 = temp1 - skelAnime->jointTable[shinLimbIndex].z;
if ((s16)(ABS(skelAnime->jointTable[shinLimbIndex].x) + ABS(skelAnime->jointTable[shinLimbIndex].y)) < 0) { if ((s16)(ABS(skelAnime->jointTable[shinLimbIndex].x) + ABS(skelAnime->jointTable[shinLimbIndex].y)) < 0) {
temp1 += 0x8000; temp1 += 0x8000;
} }
temp2 = (sp50 - sp54) * 10430.378f; temp2 = (sp50 - sp54) * (0x8000 / M_PI);
rot->z -= temp2; rot->z -= temp2;
skelAnime->jointTable[thighLimbIndex].z = skelAnime->jointTable[thighLimbIndex].z - temp2; skelAnime->jointTable[thighLimbIndex].z = skelAnime->jointTable[thighLimbIndex].z - temp2;
@ -815,7 +815,7 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
if (this->unk_6C2 != 0) { if (this->unk_6C2 != 0) {
Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY); Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY);
Matrix_RotateX(this->unk_6C2 * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(this->unk_6C2 * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateRPY(rot->x, rot->y, rot->z, MTXMODE_APPLY); Matrix_RotateRPY(rot->x, rot->y, rot->z, MTXMODE_APPLY);
pos->x = pos->y = pos->z = 0.0f; pos->x = pos->y = pos->z = 0.0f;
rot->x = rot->y = rot->z = 0; rot->x = rot->y = rot->z = 0;
@ -831,17 +831,17 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
rot->z += this->unk_6B6; rot->z += this->unk_6B6;
} else if (limbIndex == PLAYER_LIMB_UPPER) { } else if (limbIndex == PLAYER_LIMB_UPPER) {
if (this->unk_6B0 != 0) { if (this->unk_6B0 != 0) {
Matrix_RotateZ(0.10546118f, MTXMODE_APPLY); Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateY(this->unk_6B0 * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(this->unk_6B0 * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6BE != 0) { if (this->unk_6BE != 0) {
Matrix_RotateY(this->unk_6BE * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(this->unk_6BE * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6BC != 0) { if (this->unk_6BC != 0) {
Matrix_RotateX(this->unk_6BC * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(this->unk_6BC * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6C0 != 0) { if (this->unk_6C0 != 0) {
Matrix_RotateZ(this->unk_6C0 * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateZ(this->unk_6C0 * (M_PI / 0x8000), MTXMODE_APPLY);
} }
} else if (limbIndex == PLAYER_LIMB_L_THIGH) { } else if (limbIndex == PLAYER_LIMB_L_THIGH) {
func_8008F87C(globalCtx, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN, func_8008F87C(globalCtx, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN,

View file

@ -337,7 +337,7 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) { for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) {
req = &sQuakeRequest[idx]; req = &sQuakeRequest[idx];
if (req->callbackIdx != 0) { if (req->callbackIdx != 0) {
if (globalCtx->cameraPtrs[req->camPtrIdx] == 0) { if (globalCtx->cameraPtrs[req->camPtrIdx] == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "quake: stopped! 'coz camera [%d] killed!!\n" VT_RST, osSyncPrintf(VT_COL(YELLOW, BLACK) "quake: stopped! 'coz camera [%d] killed!!\n" VT_RST,
req->camPtrIdx); req->camPtrIdx);
Quake_Remove(req); Quake_Remove(req);

View file

@ -332,7 +332,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628);
camera = ACTIVE_CAM; camera = ACTIVE_CAM;
sp9C = (camera->setting == 25); sp9C = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1; polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
sp98 = (flags & 1) && sp9C && polygon1->single.source && !(SREG(25) & 1); sp98 = (flags & 1) && sp9C && polygon1->single.source && !(SREG(25) & 1);
@ -427,7 +427,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752);
camera = ACTIVE_CAM; camera = ACTIVE_CAM;
sp98 = (camera->setting == 25); sp98 = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1; polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
bgImage = func_80096A74(polygon1, globalCtx); bgImage = func_80096A74(polygon1, globalCtx);
@ -533,7 +533,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf(VT_FGCOL(YELLOW));
// Translates to: "ROOM BUFFER SIZE=%08x(%5.1fK)" // Translates to: "ROOM BUFFER SIZE=%08x(%5.1fK)"
osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize * 0.0009765625f); osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize / 1024.0f);
roomCtx->bufPtrs[0] = GameState_Alloc(&globalCtx->state, maxRoomSize, "../z_room.c", 946); roomCtx->bufPtrs[0] = GameState_Alloc(&globalCtx->state, maxRoomSize, "../z_room.c", 946);
// Translates to: "ROOM BUFFER INITIAL POINTER=%08x" // Translates to: "ROOM BUFFER INITIAL POINTER=%08x"
osSyncPrintf("部屋バッファ開始ポインタ=%08x\n", roomCtx->bufPtrs[0]); osSyncPrintf("部屋バッファ開始ポインタ=%08x\n", roomCtx->bufPtrs[0]);

View file

@ -364,7 +364,7 @@ void func_80098D80(GlobalContext* globalCtx, SceneCmd* cmd) {
if ((cmd->timeSettings.hour != 0xFF) && (cmd->timeSettings.min != 0xFF)) { if ((cmd->timeSettings.hour != 0xFF) && (cmd->timeSettings.min != 0xFF)) {
gSaveContext.environmentTime = gSaveContext.dayTime = gSaveContext.environmentTime = gSaveContext.dayTime =
((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / 0.021972656f; ((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / (360.0f / 0x4000);
} }
if (cmd->timeSettings.unk_06 != 0xFF) { if (cmd->timeSettings.unk_06 != 0xFF) {

View file

@ -2332,8 +2332,9 @@ void func_8009FE58(GlobalContext* globalCtx) {
D_8012A3A0 += 1820; D_8012A3A0 += 1820;
temp = 0.020000001f; temp = 0.020000001f;
func_800AA76C(&globalCtx->view, 0.00009587531f * temp * Math_CosS(D_8012A39C), func_800AA76C(&globalCtx->view, ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
0.00009587531f * temp * Math_SinS(D_8012A39C), 0.00009587531f * temp * Math_SinS(D_8012A3A0)); ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
func_800AA78C(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)), func_800AA78C(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C))); 1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C)));
func_800AA7AC(&globalCtx->view, 0.95f); func_800AA7AC(&globalCtx->view, 0.95f);

View file

@ -85,13 +85,10 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) { void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
Player* player;
s32 length;
if (this->actor.parent == NULL) { if (this->actor.parent == NULL) {
player = PLAYER; Player* player = PLAYER;
// get correct timer length for hookshot or longshot // get correct timer length for hookshot or longshot
length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26; s32 length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26;
ArmsHook_SetupAction(this, ArmsHook_Shoot); ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f); func_8002D9A4(&this->actor, 20.0f);
@ -125,6 +122,7 @@ void ArmsHook_DetachHookFromActor(ArmsHook* this) {
s32 ArmsHook_CheckForCancel(ArmsHook* this) { s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.parent; Player* player = (Player*)this->actor.parent;
if (Player_HoldsHookshot(player)) { if (Player_HoldsHookshot(player)) {
if ((player->itemActionParam != player->heldItemActionParam) || ((player->actor.flags & 0x100)) || if ((player->itemActionParam != player->heldItemActionParam) || ((player->actor.flags & 0x100)) ||
((player->stateFlags1 & 0x4000080))) { ((player->stateFlags1 & 0x4000080))) {
@ -174,40 +172,33 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
func_8002F8F0(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG); func_8002F8F0(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG);
ArmsHook_CheckForCancel(this); ArmsHook_CheckForCancel(this);
if (this->timer != 0) { if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
if ((this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) { (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
touchedActor = this->collider.base.at; touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) { if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) { if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor); ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & 0x400) == 0x400) { if ((touchedActor->flags & 0x400) == 0x400) {
func_80865044(this); func_80865044(this);
}
} }
} }
this->timer = 0;
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
return;
} }
} this->timer = 0;
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
if (DECR(this->timer) == 0) { &D_801333E8);
} else if (DECR(this->timer) == 0) {
grabbed = this->grabbed; grabbed = this->grabbed;
if (grabbed != NULL) { if (grabbed != NULL) {
if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) { if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) {
grabbed = NULL; grabbed = NULL;
this->grabbed = NULL; this->grabbed = NULL;
} else { } else if (this->actor.child != NULL) {
if (this->actor.child != NULL) { sp94 = Actor_WorldDistXYZToActor(&this->actor, grabbed);
sp94 = Actor_WorldDistXYZToActor(&this->actor, grabbed); sp90 = sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z));
sp90 = Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos);
sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z)); if (50.0f < (sp94 - sp90)) {
Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos); ArmsHook_DetachHookFromActor(this);
if (50.0f < (sp94 - sp90)) { grabbed = NULL;
ArmsHook_DetachHookFromActor(this);
grabbed = NULL;
}
} }
} }
} }
@ -219,12 +210,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
} else { } else {
if (this->actor.child != NULL) { if (this->actor.child != NULL) {
velocity = 30.0f; velocity = 30.0f;
} else if (grabbed != NULL) {
velocity = 50.0f;
} else { } else {
if (grabbed != NULL) { velocity = 200.0f;
velocity = 50.0f;
} else {
velocity = 200.0f;
}
} }
phi_f16 = bodyDistDiff - velocity; phi_f16 = bodyDistDiff - velocity;
if (bodyDistDiff <= velocity) { if (bodyDistDiff <= velocity) {
@ -260,7 +249,6 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
if (ArmsHook_AttachToPlayer(this, player)) { if (ArmsHook_AttachToPlayer(this, player)) {
Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &player->actor.velocity); Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &player->actor.velocity);
player->actor.velocity.y -= 20.0f; player->actor.velocity.y -= 20.0f;
return;
} }
} }
} }
@ -272,34 +260,32 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x); sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x);
sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y); sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y);
sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z); sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z);
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, 1, 1, 1, 1, &bgId) != 0) { if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, true, true, true, true,
if (func_8002F9EC(globalCtx, &this->actor, poly, bgId, &sp78) == false) { &bgId) &&
sp5C = COLPOLY_GET_NORMAL(poly->normal.x); !func_8002F9EC(globalCtx, &this->actor, poly, bgId, &sp78)) {
sp58 = COLPOLY_GET_NORMAL(poly->normal.z); sp5C = COLPOLY_GET_NORMAL(poly->normal.x);
Math_Vec3f_Copy(&this->actor.world.pos, &sp78); sp58 = COLPOLY_GET_NORMAL(poly->normal.z);
this->actor.world.pos.x += 10.0f * sp5C; Math_Vec3f_Copy(&this->actor.world.pos, &sp78);
this->actor.world.pos.z += 10.0f * sp58; this->actor.world.pos.x += 10.0f * sp5C;
this->timer = 0; this->actor.world.pos.z += 10.0f * sp58;
if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId) != 0) { this->timer = 0;
if (bgId != BGCHECK_SCENE) { if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId)) {
dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId); if (bgId != BGCHECK_SCENE) {
if (dynaPolyActor != NULL) { dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId);
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor); if (dynaPolyActor != NULL) {
} ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
} }
func_80865044(this);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
return;
} }
func_80865044(this);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
} else {
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.world.pos); CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.world.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0, Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8); &D_801333E0, &D_801333E8);
return;
} }
} } else if ((CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
if ((CHECK_BTN_ANY(globalCtx->state.input[0].press.button, (BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) {
(BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) {
this->timer = 0; this->timer = 0;
} }
} }
@ -313,8 +299,8 @@ void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ArmsHook* this = THIS; ArmsHook* this = THIS;
u32 pad3;
Player* player = PLAYER; Player* player = PLAYER;
Vec3f sp78; Vec3f sp78;
Vec3f sp6C; Vec3f sp6C;
@ -322,38 +308,36 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
f32 sp5C; f32 sp5C;
f32 sp58; f32 sp58;
if (player->actor.draw != NULL) { if ((player->actor.draw != NULL) && (player->rightHandType == 15)) {
if (player->rightHandType == 15) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 850);
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 850);
if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) { if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) {
Matrix_MultVec3f(&D_80865B70, &this->unk_1E8); Matrix_MultVec3f(&D_80865B70, &this->unk_1E8);
Matrix_MultVec3f(&D_80865B88, &sp6C); Matrix_MultVec3f(&D_80865B88, &sp6C);
Matrix_MultVec3f(&D_80865B94, &sp60); Matrix_MultVec3f(&D_80865B94, &sp60);
this->hookInfo.active = 0; this->hookInfo.active = 0;
} else { } else {
Matrix_MultVec3f(&D_80865B7C, &this->unk_1E8); Matrix_MultVec3f(&D_80865B7C, &this->unk_1E8);
Matrix_MultVec3f(&D_80865BA0, &sp6C); Matrix_MultVec3f(&D_80865BA0, &sp6C);
Matrix_MultVec3f(&D_80865BAC, &sp60); Matrix_MultVec3f(&D_80865BAC, &sp60);
}
func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
sp58 = SQ(sp78.x) + SQ(sp78.z);
sp5C = sqrtf(sp58);
Matrix_RotateY(Math_FAtan2F(sp78.x, sp78.z), MTXMODE_APPLY);
Matrix_RotateX(Math_FAtan2F(-sp78.y, sp5C), MTXMODE_APPLY);
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
} }
func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
sp58 = SQ(sp78.x) + SQ(sp78.z);
sp5C = sqrtf(sp58);
Matrix_RotateY(Math_FAtan2F(sp78.x, sp78.z), MTXMODE_APPLY);
Matrix_RotateX(Math_FAtan2F(-sp78.y, sp5C), MTXMODE_APPLY);
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
} }
} }

View file

@ -208,9 +208,9 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW); Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw red effect over the screen when arrow hits // Draw red effect over the screen when arrow hits

View file

@ -209,9 +209,9 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW); Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw blue effect over the screen when arrow hits // Draw blue effect over the screen when arrow hits

View file

@ -209,9 +209,9 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 598); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 598);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW); Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw yellow effect over the screen when arrow hits // Draw yellow effect over the screen when arrow hits

View file

@ -184,7 +184,7 @@ void func_8086C054(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->dyna.actor.xzDistToPlayer < 250.0f) { if (this->dyna.actor.xzDistToPlayer < 250.0f) {
BgBdanObjects_SetContactRu1(this, 1); BgBdanObjects_SetContactRu1(this, 1);
this->timer = 20; this->timer = 20;
func_800800F8(globalCtx, 0xBFE, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3070, -99, &this->dyna.actor, MAIN_CAM);
player->actor.world.pos.x = -1130.0f; player->actor.world.pos.x = -1130.0f;
player->actor.world.pos.y = -1025.0f; player->actor.world.pos.y = -1025.0f;
player->actor.world.pos.z = -3300.0f; player->actor.world.pos.z = -3300.0f;
@ -261,7 +261,7 @@ void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 140.0f; this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 140.0f;
this->actionFunc = func_8086C5BC; this->actionFunc = func_8086C5BC;
func_800800F8(globalCtx, 0xC08, -0x63, this->dyna.actor.child, 0); OnePointCutscene_Init(globalCtx, 3080, -99, this->dyna.actor.child, MAIN_CAM);
player->actor.world.pos.x = -1130.0f; player->actor.world.pos.x = -1130.0f;
player->actor.world.pos.y = -1025.0f; player->actor.world.pos.y = -1025.0f;
player->actor.world.pos.z = -3500.0f; player->actor.world.pos.z = -3500.0f;
@ -334,7 +334,7 @@ void func_8086C76C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (func_8004356C(&this->dyna)) { if (func_8004356C(&this->dyna)) {
if (this->dyna.actor.xzDistToPlayer < 120.0f) { if (this->dyna.actor.xzDistToPlayer < 120.0f) {
this->actionFunc = func_8086C7D0; this->actionFunc = func_8086C7D0;
func_800800F8(globalCtx, 0xC12, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3090, -99, &this->dyna.actor, MAIN_CAM);
} }
} }
} }
@ -358,13 +358,13 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
} }
if (this->unk_168 == 0) { if (this->unk_168 == 0) {
if (func_8004356C(&this->dyna)) { if (func_8004356C(&this->dyna)) {
this->cameraSetting = globalCtx->cameraPtrs[0]->setting; this->cameraSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
func_8005AD1C(globalCtx->cameraPtrs[0], 4); func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
this->unk_168 = 0xAU; this->unk_168 = 10;
} }
} else { } else {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
if (!func_8004356C(&this->dyna)) { if (!func_8004356C(&this->dyna)) {
if (this->unk_168 != 0) { if (this->unk_168 != 0) {
this->unk_168--; this->unk_168--;
@ -373,12 +373,12 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_168 == 0) { if (this->unk_168 == 0) {
do { do {
} while (0); } while (0);
Camera_ChangeSetting(globalCtx->cameraPtrs[0], this->cameraSetting); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], this->cameraSetting);
func_8005ACFC(globalCtx->cameraPtrs[0], 4); func_8005ACFC(globalCtx->cameraPtrs[MAIN_CAM], 4);
} }
} }
this->dyna.actor.world.pos.y = this->dyna.actor.world.pos.y =
this->dyna.actor.home.pos.y - (sinf(this->timer * (M_PI / 256.0f)) * 471.239990234375f); // pi * 150 this->dyna.actor.home.pos.y - (sinf(this->timer * (M_PI / 256.0f)) * 471.24f); // pi * 150
if (this->timer == 0) { if (this->timer == 0) {
this->timer = 512; this->timer = 512;
} }
@ -423,7 +423,7 @@ void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx) {
this->timer = 50; this->timer = 50;
this->actionFunc = func_8086CB8C; this->actionFunc = func_8086CB8C;
this->dyna.actor.home.pos.y -= 200.0f; this->dyna.actor.home.pos.y -= 200.0f;
func_800800F8(globalCtx, 0xC1C, 0x33, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3100, 51, &this->dyna.actor, MAIN_CAM);
} }
} }
@ -437,7 +437,7 @@ void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->timer == 0) { if (this->timer == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->actionFunc = BgBdanObjects_DoNothing; this->actionFunc = BgBdanObjects_DoNothing;
Gameplay_CopyCamera(globalCtx, 0, -1); Gameplay_CopyCamera(globalCtx, MAIN_CAM, SUBCAM_ACTIVE);
} else { } else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG); func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG);
} }

View file

@ -92,7 +92,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP), ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
}; };
static Vec3f D_8086E0E0 = { 0, 140.0f, 0 }; static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f };
void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) { void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
s16 pad1; s16 pad1;
@ -125,7 +125,7 @@ void func_8086D0EC(BgBdanSwitch* this) {
case BLUE: case BLUE:
case YELLOW_HEAVY: case YELLOW_HEAVY:
case YELLOW: case YELLOW:
this->unk_1D4 = ((Math_CosS(this->unk_1CC) * 0.5f) + 8.833334f) * 0.012f; this->unk_1D4 = ((Math_CosS(this->unk_1CC) * 0.5f) + (53.000004f / 6.0f)) * 0.012f;
this->unk_1D0 = ((Math_CosS(this->unk_1CC) * 0.5f) + 20.5f) * (this->unk_1C8 * 0.0050000004f); this->unk_1D0 = ((Math_CosS(this->unk_1CC) * 0.5f) + 20.5f) * (this->unk_1C8 * 0.0050000004f);
this->dyna.actor.scale.y = this->unk_1C8 * 0.1f; this->dyna.actor.scale.y = this->unk_1C8 * 0.1f;
break; break;
@ -227,9 +227,9 @@ void func_8086D4B4(BgBdanSwitch* this, GlobalContext* globalCtx) {
type = this->dyna.actor.params & 0xFF; type = this->dyna.actor.params & 0xFF;
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F); Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
if (type == BLUE || type == YELLOW_TALL_2) { if (type == BLUE || type == YELLOW_TALL_2) {
func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR); OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
} else { } else {
func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME); OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME);
} }
} }
} }
@ -238,7 +238,7 @@ void func_8086D548(BgBdanSwitch* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F); Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
if ((this->dyna.actor.params & 0xFF) == YELLOW_TALL_2) { if ((this->dyna.actor.params & 0xFF) == YELLOW_TALL_2) {
func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR); OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
} }
} }
} }

View file

@ -95,7 +95,7 @@ void BgDdanJd_Idle(BgDdanJd* this, GlobalContext* globalCtx) {
this->state = STATE_GO_MIDDLE_FROM_BOTTOM; this->state = STATE_GO_MIDDLE_FROM_BOTTOM;
this->idleTimer = 0; this->idleTimer = 0;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
func_800800F8(globalCtx, 0xBF4, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
} }
if (this->idleTimer == 0) { if (this->idleTimer == 0) {
this->idleTimer = IDLE_FRAMES; this->idleTimer = IDLE_FRAMES;
@ -164,7 +164,7 @@ void BgDdanJd_Move(BgDdanJd* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
this->idleTimer = 0; this->idleTimer = 0;
this->actionFunc = BgDdanJd_Idle; this->actionFunc = BgDdanJd_Idle;
func_800800F8(globalCtx, 0xBF4, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
} else if (Math_StepToF(&this->dyna.actor.world.pos.y, this->targetY, this->ySpeed)) { } else if (Math_StepToF(&this->dyna.actor.world.pos.y, this->targetY, this->ySpeed)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP);
this->actionFunc = BgDdanJd_Idle; this->actionFunc = BgDdanJd_Idle;

View file

@ -106,7 +106,7 @@ void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) {
if ((explosive != NULL) && (this->prevExplosive != NULL) && (explosive != this->prevExplosive) && if ((explosive != NULL) && (this->prevExplosive != NULL) && (explosive != this->prevExplosive) &&
(Math_Vec3f_DistXZ(&this->prevExplosivePos, &explosive->world.pos) > 80.0f)) { (Math_Vec3f_DistXZ(&this->prevExplosivePos, &explosive->world.pos) > 80.0f)) {
BgDdanKd_SetupAction(this, BgDdanKd_LowerStairs); BgDdanKd_SetupAction(this, BgDdanKd_LowerStairs);
func_800800F8(globalCtx, 0xBEA, 0x3E7, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3050, 999, &this->dyna.actor, MAIN_CAM);
} else { } else {
if (this->timer != 0) { if (this->timer != 0) {
this->timer -= 1; this->timer -= 1;

View file

@ -160,13 +160,13 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
this->unk_164 = 0; this->unk_164 = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
BgDodoago_SetupAction(this, func_80871FB8); BgDodoago_SetupAction(this, func_80871FB8);
func_800800F8(globalCtx, 0xD34, 0xA0, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM);
} else if (globalCtx->unk_11D30[this->unk_164] == 0) { } else if (globalCtx->unk_11D30[this->unk_164] == 0) {
func_800800F8(globalCtx, 0xBF9, 0x28, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM);
BgDodoago_SetupAction(this, func_80872288); BgDodoago_SetupAction(this, func_80872288);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
} else { } else {
func_800800F8(globalCtx, 0xBF9, 0x14, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3065, 20, &this->dyna.actor, MAIN_CAM);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
D_80872824 += 0x1E; D_80872824 += 0x1E;
return; return;

View file

@ -191,7 +191,7 @@ void BgDyYoseizo_Bob(BgDyYoseizo* this, GlobalContext* globalCtx) {
Math_ApproachF(&this->actor.world.pos.y, this->targetHeight, 0.1f, 10.0f); Math_ApproachF(&this->actor.world.pos.y, this->targetHeight, 0.1f, 10.0f);
Math_ApproachF(&this->bobOffset, 10.0f, 0.1f, 0.5f); Math_ApproachF(&this->bobOffset, 10.0f, 0.1f, 0.5f);
if (globalCtx->csCtx.state == 0) { if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->actor.velocity.y = Math_SinS(this->bobTimer); this->actor.velocity.y = Math_SinS(this->bobTimer);
} else { } else {
this->actor.velocity.y = Math_SinS(this->bobTimer) * 0.4f; this->actor.velocity.y = Math_SinS(this->bobTimer) * 0.4f;
@ -313,9 +313,9 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
globalCtx->envCtx.unk_BF = 2; globalCtx->envCtx.unk_BF = 2;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) { if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
func_800800F8(globalCtx, 0x219B, -99, NULL, 0); OnePointCutscene_Init(globalCtx, 8603, -99, NULL, MAIN_CAM);
} else { } else {
func_800800F8(globalCtx, 0x219C, -99, NULL, 0); OnePointCutscene_Init(globalCtx, 8604, -99, NULL, MAIN_CAM);
}; };
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR); Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
@ -578,7 +578,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, GlobalContext* globalCtx) {
} }
void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) { void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) { if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if ((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 2)) { if ((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 2)) {
this->actor.draw = BgDyYoseizo_Draw; this->actor.draw = BgDyYoseizo_Draw;
func_8002DF54(globalCtx, &this->actor, 1); func_8002DF54(globalCtx, &this->actor, 1);
@ -635,7 +635,7 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, GlobalContext* glob
this->animationChanged = true; this->animationChanged = true;
} }
if ((globalCtx->csCtx.state != 0) && if ((globalCtx->csCtx.state != CS_STATE_IDLE) &&
((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 3))) { ((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 3))) {
this->finishedSpinGrow = this->animationChanged = false; this->finishedSpinGrow = this->animationChanged = false;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) { if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
@ -821,7 +821,7 @@ void BgDyYoseizo_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);
if (globalCtx->csCtx.state != 0) { if (globalCtx->csCtx.state != CS_STATE_IDLE) {
phi_v1 = 0; phi_v1 = 0;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) { if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
if ((globalCtx->csCtx.frames == 32) || (globalCtx->csCtx.frames == 291) || if ((globalCtx->csCtx.frames == 32) || (globalCtx->csCtx.frames == 291) ||

View file

@ -86,7 +86,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, GlobalContext* globalCtx)
} }
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) { void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[2] != NULL) && if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL) &&
(globalCtx->csCtx.npcActions[2]->action == 2)) { (globalCtx->csCtx.npcActions[2]->action == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw; this->dyna.actor.draw = BgGjyoBridge_Draw;
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);

View file

@ -274,7 +274,7 @@ void BgHakaGate_FloorOpen(BgHakaGate* this, GlobalContext* globalCtx) {
void BgHakaGate_GateWait(BgHakaGate* this, GlobalContext* globalCtx) { void BgHakaGate_GateWait(BgHakaGate* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) { if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = BgHakaGate_GateOpen; this->actionFunc = BgHakaGate_GateOpen;
} }
} }

View file

@ -112,7 +112,7 @@ void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) && !Player_InCsMode(globalCtx)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) && !Player_InCsMode(globalCtx)) {
this->counter = 25; this->counter = 25;
this->actionFunc = BgHakaHuta_Open; this->actionFunc = BgHakaHuta_Open;
func_800800F8(globalCtx, 0x1771, 0x3E7, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 6001, 999, &this->dyna.actor, MAIN_CAM);
if (this->unk_16A == 2) { if (this->unk_16A == 2) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FIREFLY, Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FIREFLY,
(this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) + (this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) +
@ -175,7 +175,7 @@ void BgHakaHuta_SlideOpen(BgHakaHuta* this, GlobalContext* globalCtx) {
void func_8087D720(BgHakaHuta* this, GlobalContext* globalCtx) { void func_8087D720(BgHakaHuta* this, GlobalContext* globalCtx) {
static Vec3f D_8087D958 = { 30.0f, 0.0f, 0.0f }; static Vec3f D_8087D958 = { 30.0f, 0.0f, 0.0f };
static Vec3f D_8087D964 = { 0.032579999f, 0.325800001f, -0.944899976f }; static Vec3f D_8087D964 = { 0.03258f, 0.3258f, -0.9449f };
MtxF mtx; MtxF mtx;
Vec3f vec; Vec3f vec;
s32 quakeIndex; s32 quakeIndex;

View file

@ -190,7 +190,7 @@ void func_8087E258(BgHakaMeganeBG* this, GlobalContext* globalCtx) {
void func_8087E288(BgHakaMeganeBG* this, GlobalContext* globalCtx) { void func_8087E288(BgHakaMeganeBG* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168)) { if (Flags_GetSwitch(globalCtx, this->unk_168)) {
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_8087E2D8; this->actionFunc = func_8087E2D8;
} }
} }

View file

@ -101,7 +101,7 @@ void BgHakaShip_WaitForSong(BgHakaShip* this, GlobalContext* globalCtx) {
this->counter = 130; this->counter = 130;
this->actionFunc = BgHakaShip_CutsceneStationary; this->actionFunc = BgHakaShip_CutsceneStationary;
osSyncPrintf("シーン 外輪船 ... アァクション!!\n"); osSyncPrintf("シーン 外輪船 ... アァクション!!\n");
func_800800F8(globalCtx, 0xD3E, 999, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3390, 999, &this->dyna.actor, MAIN_CAM);
} }
} }
} }

View file

@ -441,7 +441,7 @@ void func_808809E4(BgHakaTrap* this, GlobalContext* globalCtx, s16 arg2) {
if ((fabsf(sp18.x) < 70.0f) && (fabsf(sp18.y) < 100.0f) && (sp18.z < 500.0f) && if ((fabsf(sp18.x) < 70.0f) && (fabsf(sp18.y) < 100.0f) && (sp18.z < 500.0f) &&
(PLAYER->currentBoots != PLAYER_BOOTS_IRON)) { (PLAYER->currentBoots != PLAYER_BOOTS_IRON)) {
player->windSpeed = ((500.0f - sp18.z) * 0.06f + 5.0f) * arg2 * (1.0f / 14848.0f) * (2.0f / 3.0f); player->windSpeed = ((500.0f - sp18.z) * 0.06f + 5.0f) * arg2 * (1.0f / 0x3A00) * (2.0f / 3.0f);
player->windDirection = this->dyna.actor.shape.rot.y; player->windDirection = this->dyna.actor.shape.rot.y;
} }
} }

View file

@ -230,7 +230,7 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z, Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z,
MTXMODE_NEW); MTXMODE_NEW);
Matrix_RotateY(this->dyna.actor.shape.rot.y * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY); Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY);
if (1) {} if (1) {}
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255);

View file

@ -77,8 +77,8 @@ extern CollisionHeader D_06006F70;
extern CollisionHeader D_06000C2C; extern CollisionHeader D_06000C2C;
void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) { void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) {
BgHakaZou* this = THIS;
s32 pad; s32 pad;
BgHakaZou* this = THIS;
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
@ -89,7 +89,7 @@ void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(thisx, (Rand_ZeroOne() * 0.005f) + 0.025f); Actor_SetScale(thisx, (Rand_ZeroOne() * 0.005f) + 0.025f);
thisx->speedXZ = Rand_ZeroOne(); thisx->speedXZ = Rand_ZeroOne();
thisx->world.rot.y = thisx->shape.rot.y * ((Rand_ZeroOne() < 0.5f) ? -1 : 1) + Rand_CenteredFloat(4096.0f); thisx->world.rot.y = thisx->shape.rot.y * ((Rand_ZeroOne() < 0.5f) ? -1 : 1) + Rand_CenteredFloat(0x1000);
this->timer = 20; this->timer = 20;
thisx->world.rot.x = Rand_S16Offset(0x100, 0x300) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1); thisx->world.rot.x = Rand_S16Offset(0x100, 0x300) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1);
thisx->world.rot.z = Rand_S16Offset(0x400, 0x800) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1); thisx->world.rot.z = Rand_S16Offset(0x400, 0x800) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1);
@ -169,38 +169,36 @@ void BgHakaZou_Wait(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->dyna.actor.params == STA_UNKNOWN) { if (this->dyna.actor.params == STA_UNKNOWN) {
this->actionFunc = func_80882BDC; this->actionFunc = func_80882BDC;
return;
}
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
colHeader = NULL;
if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
CollisionHeader_GetVirtual(&D_06006F70, &colHeader);
this->collider.dim.radius = 80;
this->collider.dim.height = 100;
this->collider.dim.yShift = -30;
this->collider.dim.pos.x -= 56;
this->collider.dim.pos.z += 56;
this->dyna.actor.uncullZoneScale = 1500.0f;
} else if (this->dyna.actor.params == STA_BOMBABLE_SKULL_WALL) {
CollisionHeader_GetVirtual(&D_06005E30, &colHeader);
this->collider.dim.yShift = -50;
} else { } else {
CollisionHeader_GetVirtual(&D_06000C2C, &colHeader); Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
this->collider.dim.radius = 55;
this->collider.dim.height = 20; colHeader = NULL;
if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
CollisionHeader_GetVirtual(&D_06006F70, &colHeader);
this->collider.dim.radius = 80;
this->collider.dim.height = 100;
this->collider.dim.yShift = -30;
this->collider.dim.pos.x -= 56;
this->collider.dim.pos.z += 56;
this->dyna.actor.uncullZoneScale = 1500.0f;
} else if (this->dyna.actor.params == STA_BOMBABLE_SKULL_WALL) {
CollisionHeader_GetVirtual(&D_06005E30, &colHeader);
this->collider.dim.yShift = -50;
} else {
CollisionHeader_GetVirtual(&D_06000C2C, &colHeader);
this->collider.dim.radius = 55;
this->collider.dim.height = 20;
}
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if ((this->dyna.actor.params == STA_GIANT_BIRD_STATUE) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->actionFunc = BgHakaZou_DoNothing;
} else {
this->actionFunc = func_80883000;
}
} }
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if ((this->dyna.actor.params == STA_GIANT_BIRD_STATUE) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->actionFunc = BgHakaZou_DoNothing;
return;
}
this->actionFunc = func_80883000;
} }
} }
void func_80882BDC(BgHakaZou* this, GlobalContext* globalCtx) { void func_80882BDC(BgHakaZou* this, GlobalContext* globalCtx) {
@ -214,7 +212,7 @@ void func_80882BDC(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->dyna.actor.bgCheckFlags & 2) { if (this->dyna.actor.bgCheckFlags & 2) {
if (this->dyna.actor.velocity.y < -8.0f) { if (this->dyna.actor.velocity.y < -8.0f) {
this->dyna.actor.velocity.y *= -0.6f; this->dyna.actor.velocity.y *= -0.6f;
this->dyna.actor.velocity.y = (this->dyna.actor.velocity.y > 10.0f) ? 10.0f : this->dyna.actor.velocity.y; this->dyna.actor.velocity.y = CLAMP_MAX(this->dyna.actor.velocity.y, 10.0f);
this->dyna.actor.bgCheckFlags &= ~3; this->dyna.actor.bgCheckFlags &= ~3;
this->dyna.actor.speedXZ = 2.0f; this->dyna.actor.speedXZ = 2.0f;
} else { } else {
@ -274,13 +272,13 @@ void func_80882E54(BgHakaZou* this, GlobalContext* globalCtx) {
} }
void func_80883000(BgHakaZou* this, GlobalContext* globalCtx) { void func_80883000(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) { if (this->collider.base.acFlags & AC_HIT) {
Flags_SetSwitch(globalCtx, this->switchFlag); Flags_SetSwitch(globalCtx, this->switchFlag);
if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) { if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
this->timer = 20; this->timer = 20;
this->actionFunc = func_80883144; this->actionFunc = func_80883144;
func_800800F8(globalCtx, 3400, 999, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3400, 999, &this->dyna.actor, MAIN_CAM);
} else if (this->dyna.actor.params == 2) { } else if (this->dyna.actor.params == 2) {
func_80882E54(this, globalCtx); func_80882E54(this, globalCtx);
this->dyna.actor.draw = NULL; this->dyna.actor.draw = NULL;
@ -342,7 +340,7 @@ void func_80883254(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->timer == 0) { if (this->timer == 0) {
this->timer = 60; this->timer = 60;
this->dyna.actor.world.rot.x = 0x0008; this->dyna.actor.world.rot.x = 8;
this->actionFunc = func_80883328; this->actionFunc = func_80883328;
} }
} else { } else {
@ -355,9 +353,9 @@ void func_80883328(BgHakaZou* this, GlobalContext* globalCtx) {
s32 i; s32 i;
s32 j; s32 j;
this->dyna.actor.world.rot.x += this->dyna.actor.world.rot.x * 0.125f; this->dyna.actor.world.rot.x += this->dyna.actor.world.rot.x / 8.0f;
if (Math_ScaledStepToS(&this->dyna.actor.shape.rot.x, -0x4000, this->dyna.actor.world.rot.x) != 0) { if (Math_ScaledStepToS(&this->dyna.actor.shape.rot.x, -0x4000, this->dyna.actor.world.rot.x)) {
effectPos.x = this->dyna.actor.world.pos.x; effectPos.x = this->dyna.actor.world.pos.x;
effectPos.y = this->dyna.actor.world.pos.y; effectPos.y = this->dyna.actor.world.pos.y;
@ -385,7 +383,7 @@ void func_808834D8(BgHakaZou* this, GlobalContext* globalCtx) {
this->timer--; this->timer--;
} }
moveDist = ((this->timer % 2) ? 15.0f : -15.0f); moveDist = (this->timer % 2) ? 15.0f : -15.0f;
this->dyna.actor.world.pos.y += ((this->timer & 0xFE) * 0.04f * moveDist); this->dyna.actor.world.pos.y += ((this->timer & 0xFE) * 0.04f * moveDist);
if (this->timer == 0) { if (this->timer == 0) {

View file

@ -321,19 +321,19 @@ void BgHeavyBlock_SpawnPieces(BgHeavyBlock* this, GlobalContext* globalCtx) {
void BgHeavyBlock_Wait(BgHeavyBlock* this, GlobalContext* globalCtx) { void BgHeavyBlock_Wait(BgHeavyBlock* this, GlobalContext* globalCtx) {
s32 quakeIndex; s32 quakeIndex;
// if block has a parent link has lifted it, start onepointdemo (cutscene) and quake // if block has a parent link has lifted it, start one point cutscene and quake
if (Actor_HasParent(&this->dyna.actor, globalCtx)) { if (Actor_HasParent(&this->dyna.actor, globalCtx)) {
this->timer = 0; this->timer = 0;
switch (this->dyna.actor.params & 0xFF) { switch (this->dyna.actor.params & 0xFF) {
case HEAVYBLOCK_BREAKABLE: case HEAVYBLOCK_BREAKABLE:
func_800800F8(globalCtx, 0xFB4, 0x10E, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4020, 270, &this->dyna.actor, MAIN_CAM);
break; break;
case HEAVYBLOCK_UNBREAKABLE: case HEAVYBLOCK_UNBREAKABLE:
func_800800F8(globalCtx, 0xFB5, 0xDC, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4021, 220, &this->dyna.actor, MAIN_CAM);
break; break;
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE: case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
func_800800F8(globalCtx, 0xFB6, 0xD2, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4022, 210, &this->dyna.actor, MAIN_CAM);
break; break;
} }

View file

@ -129,11 +129,11 @@ void BgHidanCurtain_WaitForSwitchOn(BgHidanCurtain* this, GlobalContext* globalC
if (Flags_GetSwitch(globalCtx, this->actor.params)) { if (Flags_GetSwitch(globalCtx, this->actor.params)) {
if (this->type == 1) { if (this->type == 1) {
this->actionFunc = BgHidanCurtain_WaitForCutscene; this->actionFunc = BgHidanCurtain_WaitForCutscene;
func_800800F8(globalCtx, 3350, -99, &this->actor, 0); OnePointCutscene_Init(globalCtx, 3350, -99, &this->actor, MAIN_CAM);
this->timer = 50; this->timer = 50;
} else if (this->type == 3) { } else if (this->type == 3) {
this->actionFunc = BgHidanCurtain_WaitForCutscene; this->actionFunc = BgHidanCurtain_WaitForCutscene;
func_800800F8(globalCtx, 3360, 60, &this->actor, 0); OnePointCutscene_Init(globalCtx, 3360, 60, &this->actor, MAIN_CAM);
this->timer = 30; this->timer = 30;
} else { } else {
this->actionFunc = BgHidanCurtain_TurnOff; this->actionFunc = BgHidanCurtain_TurnOff;
@ -207,7 +207,8 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) {
BgHidanCurtainParams* hcParams = &sHCParams[this->size]; BgHidanCurtainParams* hcParams = &sHCParams[this->size];
f32 riseProgress; f32 riseProgress;
if ((globalCtx->cameraPtrs[0]->setting == 0x28) || (globalCtx->cameraPtrs[0]->setting == 0x38)) { if ((globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM0) ||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM2)) {
this->collider.base.atFlags &= ~AT_HIT; this->collider.base.atFlags &= ~AT_HIT;
} else { } else {
if (this->collider.base.atFlags & AT_HIT) { if (this->collider.base.atFlags & AT_HIT) {

View file

@ -131,10 +131,10 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_16A == 0) { if (this->unk_16A == 0) {
this->unk_16A = 3; this->unk_16A = 3;
} }
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) { } else if (!func_8004356C(&this->dyna)) {
if (this->unk_16A != 0) { if (this->unk_16A != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
this->unk_16A = 0; this->unk_16A = 0;
} }

View file

@ -123,7 +123,7 @@ void BgHidanFwbig_UpdatePosition(BgHidanFwbig* this) {
void BgHidanFwbig_WaitForSwitch(BgHidanFwbig* this, GlobalContext* globalCtx) { void BgHidanFwbig_WaitForSwitch(BgHidanFwbig* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->actor.params)) { if (Flags_GetSwitch(globalCtx, this->actor.params)) {
this->actionFunc = BgHidanFwbig_WaitForCs; this->actionFunc = BgHidanFwbig_WaitForCs;
func_800800F8(globalCtx, 0xD0C, -0x63, &this->actor, 0); OnePointCutscene_Init(globalCtx, 3340, -99, &this->actor, MAIN_CAM);
this->timer = 35; this->timer = 35;
} }
} }
@ -180,7 +180,7 @@ void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, GlobalContext* globalCtx) {
if (player->actor.world.pos.x < 1150.0f) { if (player->actor.world.pos.x < 1150.0f) {
this->actionFunc = BgHidanFwbig_Rise; this->actionFunc = BgHidanFwbig_Rise;
func_800800F8(globalCtx, 0xCDA, -0x63, &this->actor, 0); OnePointCutscene_Init(globalCtx, 3290, -99, &this->actor, MAIN_CAM);
} }
} }

View file

@ -280,7 +280,7 @@ void func_80888734(BgHidanHamstep* this) {
void func_808887C4(BgHidanHamstep* this, GlobalContext* globalCtx) { void func_808887C4(BgHidanHamstep* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) { if (this->collider.base.acFlags & AC_HIT) {
func_800800F8(globalCtx, 3310, 100, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3310, 100, &this->dyna.actor, MAIN_CAM);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
this->collider.base.acFlags = AC_NONE; this->collider.base.acFlags = AC_NONE;
BgHidanHamstep_SetupAction(this, 1); BgHidanHamstep_SetupAction(this, 1);

View file

@ -108,7 +108,7 @@ void func_80889ACC(BgHidanKousi* this) {
void func_80889B5C(BgHidanKousi* this, GlobalContext* globalCtx) { void func_80889B5C(BgHidanKousi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF)) { if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF)) {
BgHidanKousi_SetupAction(this, func_80889BC0); BgHidanKousi_SetupAction(this, func_80889BC0);
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->unk_168 = 0xC8; this->unk_168 = 0xC8;
} }
} }

View file

@ -266,10 +266,10 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) { if (this->unk_169 == 0) {
this->unk_169 = 3; this->unk_169 = 3;
} }
Camera_ChangeSetting(globalCtx->cameraPtrs[0], 0x30); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) { } else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) { if (this->unk_169 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], 3); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
this->unk_169 = 0; this->unk_169 = 0;
} }
@ -277,7 +277,7 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
} }
void func_8088B90C(BgHidanRock* this, GlobalContext* globalCtx) { void func_8088B90C(BgHidanRock* this, GlobalContext* globalCtx) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f) != 0) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
this->actionFunc = func_8088B634; this->actionFunc = func_8088B634;
} }
} }
@ -319,10 +319,10 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) { if (this->unk_169 == 0) {
this->unk_169 = 3; this->unk_169 = 3;
} }
Camera_ChangeSetting(globalCtx->cameraPtrs[0], 0x30); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) { } else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) { if (this->unk_169 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], 3); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
this->unk_169 = 0; this->unk_169 = 0;
} }

View file

@ -121,7 +121,7 @@ void func_8088E518(BgHidanSima* this, GlobalContext* globalCtx) {
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f); Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f);
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & 0x6000)) { if (func_8004356C(&this->dyna) && !(player->stateFlags1 & 0x6000)) {
this->timer = 20; this->timer = 20;
this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x4000; this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4000;
if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) { if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) {
this->actionFunc = func_8088E5D0; this->actionFunc = func_8088E5D0;
} else { } else {

View file

@ -114,10 +114,10 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_168 == 0) { if (this->unk_168 == 0) {
this->unk_168 = 3; this->unk_168 = 3;
} }
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) { } else if (!func_8004356C(&this->dyna)) {
if (this->unk_168 != 0) { if (this->unk_168 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
this->unk_168 = 0; this->unk_168 = 0;
} }

View file

@ -104,7 +104,7 @@ void func_80891CF4(BgIceShutter* this, GlobalContext* globalCtx) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN); Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4; this->actionFunc = func_80891DD4;
if (this->dyna.actor.shape.rot.x == 0) { if (this->dyna.actor.shape.rot.x == 0) {
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
} }
} }
} }
@ -113,7 +113,7 @@ void func_80891D6C(BgIceShutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params)) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN); Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4; this->actionFunc = func_80891DD4;
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
} }
} }

View file

@ -194,9 +194,9 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) {
tempIsRiding = func_8004356C(&this->dyna) ? true : false; tempIsRiding = func_8004356C(&this->dyna) ? true : false;
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) { if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
if (tempIsRiding) { if (tempIsRiding) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!tempIsRiding && this->isLinkRiding) { } else if (!tempIsRiding && this->isLinkRiding) {
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
} }
this->isLinkRiding = tempIsRiding; this->isLinkRiding = tempIsRiding;

View file

@ -228,9 +228,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) {
} }
func_800D1694(this->actor.world.pos.x, this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, func_800D1694(this->actor.world.pos.x, this->actor.world.pos.y + 40.0f, this->actor.world.pos.z,
&this->actor.shape.rot); &this->actor.shape.rot);
// Second float seems to be either this or 1613/1280 + 0.13: both numerators relate to the lift height Matrix_Scale(0.1f, (this->liftHeight * -(1.0f / 1280.0f)) + (1779.4f / 1280.0f), 0.1f, MTXMODE_APPLY);
Matrix_Scale(0.1f, (this->liftHeight * -(1.0f / 1280.0f)) + (973.0f / 1280.0f + 0.63f) /* 1.3901563f */, 0.1f,
MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 457), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 457),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0600BC70); gSPDisplayList(POLY_XLU_DISP++, D_0600BC70);

View file

@ -151,7 +151,7 @@ void BgJyaBombchuiwa_SetupWaitForExplosion(BgJyaBombchuiwa* this, GlobalContext*
void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* globalCtx) { void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & AC_HIT) || (this->timer > 0)) { if ((this->collider.base.acFlags & AC_HIT) || (this->timer > 0)) {
if (this->timer == 0) { if (this->timer == 0) {
func_800800F8(globalCtx, 3410, -99, &this->actor, 0); OnePointCutscene_Init(globalCtx, 3410, -99, &this->actor, MAIN_CAM);
} }
this->timer++; this->timer++;
if (this->timer > 10) { if (this->timer > 10) {

View file

@ -99,7 +99,7 @@ Vec3f D_808973A4[] = {
{ 17.2f, 70.0f, 0.6f }, { 17.2f, 70.0f, 0.6f },
{ 8.0f, 100.0f, 7.6f }, { 8.0f, 100.0f, 7.6f },
{ 0.0f, 70.0f, -11.3f }, { 0.0f, 70.0f, -11.3f },
{ 0.0f, 44.6000023f, -2.0f }, { 0.0f, 44.600002f, -2.0f },
{ 0.0f, 15.0f, 10.6f }, { 0.0f, 15.0f, 10.6f },
{ 0.0f, 15.0f, 0.3f }, { 0.0f, 15.0f, 0.3f },
{ 0.0f, 26.0f, 11.6f }, { 0.0f, 26.0f, 11.6f },
@ -109,8 +109,8 @@ Vec3f D_808973A4[] = {
}; };
Vec3f D_808974DC[] = { Vec3f D_808974DC[] = {
{ 12.0f, 21.3000011f, -2.5f }, { 30.0f, 21.3000011f, -2.5f }, { -15.0f, 21.3000011f, -2.5f }, { 12.0f, 21.300001f, -2.5f }, { 30.0f, 21.300001f, -2.5f }, { -15.0f, 21.300001f, -2.5f },
{ -30.0f, 21.3000011f, -2.5f }, { 12.0f, 21.3000011f, -2.5f }, { -30.0f, 21.300001f, -2.5f }, { 12.0f, 21.300001f, -2.5f },
}; };
s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 }; s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
@ -250,7 +250,7 @@ void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[(params & 3)]; phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[(params & 3)];
phi_v0 = ABS(phi_v0); phi_v0 = ABS(phi_v0);
if (phi_v0 < 0x2000 && phi_v0 != -0x8000) { if (phi_v0 < 0x2000 && phi_v0 != -0x8000) {
this->unk_18C += ((phi_v0 - 0x2000) * 0.00018310547f); this->unk_18C += (phi_v0 - 0x2000) * (3.0f / 0x4000);
if (this->unk_18C < 0.0f) { if (this->unk_18C < 0.0f) {
this->unk_18C = 0.0f; this->unk_18C = 0.0f;
} }

View file

@ -144,7 +144,7 @@ void func_80897B48(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
} else { } else {
tmpf2 = 1569.0f - thisx->world.pos.x; tmpf2 = 1569.0f - thisx->world.pos.x;
tmpf1 = fabsf(tmpf2) - 103.0f; tmpf1 = fabsf(tmpf2) - 103.0f;
thisx->world.pos.y = (0.38043478f * tmpf1) - 129.5f; thisx->world.pos.y = ((35.0f / 92.0f) * tmpf1) - 129.5f;
} }
if (this->collider.base.atFlags & AT_HIT) { if (this->collider.base.atFlags & AT_HIT) {

View file

@ -84,7 +84,7 @@ void func_80899880(BgJyaKanaami* this) {
void func_80899894(BgJyaKanaami* this, GlobalContext* globalCtx) { void func_80899894(BgJyaKanaami* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || this->unk_16A > 0) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || this->unk_16A > 0) {
if (this->dyna.actor.world.pos.x > -1000.0f && this->unk_16A == 0) { if (this->dyna.actor.world.pos.x > -1000.0f && this->unk_16A == 0) {
func_800800F8(globalCtx, 0xD7A, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3450, -99, &this->dyna.actor, MAIN_CAM);
} }
this->unk_16A += 1; this->unk_16A += 1;
if (this->unk_16A >= 0xA) { if (this->unk_16A >= 0xA) {

View file

@ -102,7 +102,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || (this->moveDelay > 0)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || (this->moveDelay > 0)) {
this->moveDelay++; this->moveDelay++;
if (this->moveDelay >= 20) { if (this->moveDelay >= 20) {
func_800800F8(globalCtx, 0xD66, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3430, -99, &this->dyna.actor, MAIN_CAM);
BgJyaLift_SetupMove(this); BgJyaLift_SetupMove(this);
} }
} }
@ -143,10 +143,10 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);
} }
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) { if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_TEPPEN); Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_TEPPEN);
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) && } else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
(globalCtx2->cameraPtrs[0]->setting == 0x3F)) { (globalCtx2->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TEPPEN)) {
Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_DUNGEON0); Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
} }
this->unk_16B = this->dyna.unk_160; this->unk_16B = this->dyna.unk_160;

View file

@ -213,7 +213,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F); Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
BgJyaMegami_SetupExplode(this); BgJyaMegami_SetupExplode(this);
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION); Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
func_800800F8(globalCtx, 0xD70, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3440, -99, &this->dyna.actor, MAIN_CAM);
} else { } else {
if (this->lightTimer < 8) { if (this->lightTimer < 8) {
this->crumbleIndex = 0; this->crumbleIndex = 0;
@ -331,8 +331,8 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) {
piece = &this->pieces[i]; piece = &this->pieces[i];
Matrix_Translate(piece->pos.x + sPiecesInit[i].unk_00.x, piece->pos.y + sPiecesInit[i].unk_00.y, Matrix_Translate(piece->pos.x + sPiecesInit[i].unk_00.x, piece->pos.y + sPiecesInit[i].unk_00.y,
piece->pos.z + sPiecesInit[i].unk_00.z, MTXMODE_NEW); piece->pos.z + sPiecesInit[i].unk_00.z, MTXMODE_NEW);
Matrix_RotateY(piece->rotVelY * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateY(piece->rotVelY * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateX(piece->rotVelX * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateX(piece->rotVelX * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f, Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f,
sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY); sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY);

View file

@ -88,9 +88,9 @@ void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) {
void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) { void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) { if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) {
if (ABS(this->dyna.actor.world.rot.x) > 0x2C60) { if (ABS(this->dyna.actor.world.rot.x) > 0x2C60) {
func_800800F8(globalCtx, 0x119E, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4510, -99, &this->dyna.actor, MAIN_CAM);
} else { } else {
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
} }
this->actionFunc = BgMizuShutter_WaitForCutscene; this->actionFunc = BgMizuShutter_WaitForCutscene;
this->timer = 30; this->timer = 30;

View file

@ -176,7 +176,7 @@ void BgMizuWater_WaitForAction(BgMizuWater* this, GlobalContext* globalCtx) {
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx); waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx);
if (waterLevelActionIndex != 0) { if (waterLevelActionIndex != 0) {
if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) { if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) {
func_800800F8(globalCtx, 0xC30, -0x64 - waterLevelActionIndex, 0, 0); OnePointCutscene_Init(globalCtx, 3120, -100 - waterLevelActionIndex, NULL, MAIN_CAM);
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag; this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY; this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
} }

View file

@ -151,7 +151,7 @@ void BgMoriBigst_StalfosFight(BgMoriBigst* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.home.rot.z == 0) && ((this->dyna.actor.home.pos.y - 5.0f) <= PLAYER->actor.world.pos.y)) { if ((this->dyna.actor.home.rot.z == 0) && ((this->dyna.actor.home.pos.y - 5.0f) <= PLAYER->actor.world.pos.y)) {
BgMoriBigst_SetupFall(this, globalCtx); BgMoriBigst_SetupFall(this, globalCtx);
func_800800F8(globalCtx, 0xC94, 0x48, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3220, 72, &this->dyna.actor, MAIN_CAM);
} }
} }
@ -165,7 +165,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
BgMoriBigst_SetupLanding(this, globalCtx); BgMoriBigst_SetupLanding(this, globalCtx);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
func_800800F8(globalCtx, 0x3FC, 8, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 1020, 8, &this->dyna.actor, MAIN_CAM);
func_8002DF38(globalCtx, NULL, 0x3C); func_8002DF38(globalCtx, NULL, 0x3C);
} }
} }

View file

@ -172,8 +172,8 @@ void BgMoriElevator_MoveIntoGround(BgMoriElevator* this, GlobalContext* globalCt
void func_808A1CF4(BgMoriElevator* this, GlobalContext* globalCtx) { void func_808A1CF4(BgMoriElevator* this, GlobalContext* globalCtx) {
this->actionFunc = BgMoriElevator_MoveAboveGround; this->actionFunc = BgMoriElevator_MoveAboveGround;
func_800800F8(globalCtx, 0xC9E, 0x46, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3230, 70, &this->dyna.actor, MAIN_CAM);
func_800800F8(globalCtx, 0x3FC, 0xF, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 1020, 15, &this->dyna.actor, MAIN_CAM);
} }
void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, GlobalContext* globalCtx) { void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, GlobalContext* globalCtx) {

View file

@ -140,7 +140,7 @@ void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx) {
if (this->gateTimer > 30) { if (this->gateTimer > 30) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen); BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen);
func_800800F8(globalCtx, 0x177A, 0x14, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 6010, 20, &this->dyna.actor, MAIN_CAM);
sUnkTimer++; sUnkTimer++;
} }
} }

View file

@ -23,7 +23,7 @@ void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, GlobalContext* globalCtx
void BgMoriHineri_DoNothing(BgMoriHineri* this, GlobalContext* globalCtx); void BgMoriHineri_DoNothing(BgMoriHineri* this, GlobalContext* globalCtx);
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx); void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx);
static s16 D_808A43E0 = -1; static s16 sNextCamIdx = SUBCAM_NONE;
const ActorInit Bg_Mori_Hineri_InitVars = { const ActorInit Bg_Mori_Hineri_InitVars = {
ACTOR_BG_MORI_HINERI, ACTOR_BG_MORI_HINERI,
@ -173,14 +173,14 @@ void func_808A3C8C(BgMoriHineri* this, GlobalContext* globalCtx) {
f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z); f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z);
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f; this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
if (this->dyna.actor.params != 0) { if (this->dyna.actor.params != 0) {
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z; this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
} }
} }
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) { void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
s16 defaultCamChildIdx; s16 mainCamChildIdx;
if ((Flags_GetSwitch(globalCtx, this->switchFlag) && if ((Flags_GetSwitch(globalCtx, this->switchFlag) &&
(this->dyna.actor.params == 0 || this->dyna.actor.params == 2)) || (this->dyna.actor.params == 0 || this->dyna.actor.params == 2)) ||
@ -189,33 +189,33 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom; this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom;
this->actionFunc = func_808A3E54; this->actionFunc = func_808A3E54;
defaultCamChildIdx = globalCtx->cameraPtrs[0]->childCamIdx; mainCamChildIdx = globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx;
if ((defaultCamChildIdx != 0) && (globalCtx->cameraPtrs[defaultCamChildIdx]->setting == CAM_SET_DEMO1)) { if ((mainCamChildIdx != SUBCAM_FREE) && (globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_DEMO1)) {
func_800803F0(globalCtx, defaultCamChildIdx); OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx);
} }
func_800800F8(globalCtx, 0xCBC, 0x28, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM);
D_808A43E0 = func_800800F8(globalCtx, 0xCBD, 0x28, &this->dyna.actor, 0); sNextCamIdx = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, MAIN_CAM);
} }
} }
void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) { void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) {
s8 objBankIndex; s8 objBankIndex;
if (globalCtx->activeCamera == D_808A43E0) { if (globalCtx->activeCamera == sNextCamIdx) {
if (D_808A43E0 != 0) { if (sNextCamIdx != MAIN_CAM) {
objBankIndex = this->dyna.actor.objBankIndex; objBankIndex = this->dyna.actor.objBankIndex;
this->dyna.actor.objBankIndex = this->moriHineriObjIdx; this->dyna.actor.objBankIndex = this->moriHineriObjIdx;
this->moriHineriObjIdx = objBankIndex; this->moriHineriObjIdx = objBankIndex;
this->dyna.actor.params ^= 1; this->dyna.actor.params ^= 1;
D_808A43E0 = 0; sNextCamIdx = MAIN_CAM;
func_80078884(NA_SE_SY_TRE_BOX_APPEAR); func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
} else { } else {
this->dyna.actor.draw = NULL; this->dyna.actor.draw = NULL;
this->actionFunc = func_808A3D58; this->actionFunc = func_808A3D58;
D_808A43E0 = -1; sNextCamIdx = SUBCAM_NONE;
} }
} }
if ((D_808A43E0 > 0) && ((ACTIVE_CAM->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) { if ((sNextCamIdx >= SUBCAM_FIRST) && ((ACTIVE_CAM->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) {
func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG); func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG);
} }
} }
@ -260,7 +260,7 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, &D_80116280[2]); gSPSegment(POLY_OPA_DISP++, 0x08, &D_80116280[2]);
Matrix_Put(&mtx); Matrix_Put(&mtx);
Matrix_Translate(147.0f, -245.0f, -453.0f, MTXMODE_APPLY); Matrix_Translate(147.0f, -245.0f, -453.0f, MTXMODE_APPLY);
Matrix_RotateY(1.5707964f, MTXMODE_APPLY); Matrix_RotateY(M_PI / 2, MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -268,7 +268,7 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&mtx); Matrix_Put(&mtx);
Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY); Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY);
if (Flags_GetTreasure(globalCtx, 0xE)) { if (Flags_GetTreasure(globalCtx, 0xE)) {
Matrix_RotateZ(1.3008157f, MTXMODE_APPLY); Matrix_RotateZ(0x3500 * (M_PI / 0x8000), MTXMODE_APPLY);
} else { } else {
Matrix_RotateZ(M_PI, MTXMODE_APPLY); Matrix_RotateZ(M_PI, MTXMODE_APPLY);
} }

View file

@ -122,10 +122,10 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx) {
this->targetWaterLevel = 184.0f; this->targetWaterLevel = 184.0f;
} }
if (switchFlagSet && !this->prevSwitchFlagSet) { if (switchFlagSet && !this->prevSwitchFlagSet) {
func_800800F8(globalCtx, 0xCA8, 0x46, thisx, 0); OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
this->drainTimer = 90; this->drainTimer = 90;
} else if (!switchFlagSet && this->prevSwitchFlagSet) { } else if (!switchFlagSet && this->prevSwitchFlagSet) {
func_800800F8(globalCtx, 0xCA8, 0x46, thisx, 0); OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
this->drainTimer = 90; this->drainTimer = 90;
thisx->world.pos.y = 0.0f; thisx->world.pos.y = 0.0f;
} }

View file

@ -208,15 +208,15 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);
if (BgMoriRakkatenjo_IsLinkUnder(this, globalCtx)) { if (BgMoriRakkatenjo_IsLinkUnder(this, globalCtx)) {
if (sCamSetting == 0) { if (sCamSetting == CAM_SET_NONE) {
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n"); osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
sCamSetting = globalCtx->cameraPtrs[0]->setting; sCamSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
Camera_SetCameraData(globalCtx->cameraPtrs[0], 1, &this->dyna.actor, NULL, 0, 0, 0); Camera_SetCameraData(globalCtx->cameraPtrs[MAIN_CAM], 1, &this->dyna.actor, NULL, 0, 0, 0);
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_MORI1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_MORI1);
} }
} else if (sCamSetting != 0) { } else if (sCamSetting != CAM_SET_NONE) {
osSyncPrintf("camera changed (previous) ... \n"); osSyncPrintf("camera changed (previous) ... \n");
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1); Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
sCamSetting = 0; sCamSetting = 0;
} }
} }

View file

@ -244,7 +244,7 @@ void BgPoEvent_BlockWait(BgPoEvent* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = 833.0f; this->dyna.actor.world.pos.y = 833.0f;
if (sPuzzleState == 0x3F) { if (sPuzzleState == 0x3F) {
if (this->type == 1) { if (this->type == 1) {
func_800800F8(globalCtx, 0xC4E, 0x41, NULL, 0); OnePointCutscene_Init(globalCtx, 3150, 65, NULL, MAIN_CAM);
} }
this->timer = 45; this->timer = 45;
this->actionFunc = BgPoEvent_BlockShake; this->actionFunc = BgPoEvent_BlockShake;
@ -348,7 +348,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0, this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0,
this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300); this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300);
if (amy != NULL) { if (amy != NULL) {
func_800800F8(globalCtx, 0xC62, 0x1E, amy, 0); OnePointCutscene_Init(globalCtx, 3170, 30, amy, MAIN_CAM);
} }
func_80078884(NA_SE_SY_CORRECT_CHIME); func_80078884(NA_SE_SY_CORRECT_CHIME);
gSaveContext.timer1State = 0xA; gSaveContext.timer1State = 0xA;
@ -544,12 +544,12 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_PO_SISTERS, thisx->world.pos.x,
thisx->world.pos.y - 40.0f, thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->world.pos.y - 40.0f, thisx->world.pos.z, 0, thisx->shape.rot.y, 0,
thisx->params + ((this->type - 1) << 8)); thisx->params + ((this->type - 1) << 8));
func_800800F8(globalCtx, 0xC58, 0x50, thisx, 0); OnePointCutscene_Init(globalCtx, 3160, 80, thisx, MAIN_CAM);
func_80078884(NA_SE_SY_CORRECT_CHIME); func_80078884(NA_SE_SY_CORRECT_CHIME);
} else { } else {
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2); Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2);
func_800800F8(globalCtx, 0xC58, 0x23, thisx, 0); OnePointCutscene_Init(globalCtx, 3160, 35, thisx, MAIN_CAM);
} }
if (thisx->parent != NULL) { if (thisx->parent != NULL) {
thisx->parent->child = NULL; thisx->parent->child = NULL;

View file

@ -150,7 +150,7 @@ void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
s32 BgSpot01Idohashira_NotInCsMode(GlobalContext* globalCtx) { s32 BgSpot01Idohashira_NotInCsMode(GlobalContext* globalCtx) {
if (globalCtx->csCtx.state == 0) { if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return true; return true;
} }
return false; return false;

View file

@ -80,7 +80,7 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) { if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->state = WATERFALL_OPENING_ANIMATED; this->state = WATERFALL_OPENING_ANIMATED;
this->timer = 40; this->timer = 40;
func_800800F8(globalCtx, 0x1004, -0x63, NULL, 0); OnePointCutscene_Init(globalCtx, 4100, -99, NULL, MAIN_CAM);
} }
} else if (this->state == WATERFALL_OPENING_IDLE) { } else if (this->state == WATERFALL_OPENING_IDLE) {
this->timer--; this->timer--;

View file

@ -84,7 +84,7 @@ void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) { if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE); Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
Actor_SetFocus(&this->dyna.actor, 50.0f); Actor_SetFocus(&this->dyna.actor, 50.0f);
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_808AE630; this->actionFunc = func_808AE630;
this->dyna.actor.speedXZ = 0.5f; this->dyna.actor.speedXZ = 0.5f;
} }

View file

@ -323,7 +323,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, GlobalContext* globalCtx) {
this->actionFunc = BgSpot06Objects_LockPullOutward; this->actionFunc = BgSpot06Objects_LockPullOutward;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Flags_SetSwitch(globalCtx, this->switchFlag); Flags_SetSwitch(globalCtx, this->switchFlag);
func_800800F8(globalCtx, 0x1018, 170, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4120, 170, &this->dyna.actor, MAIN_CAM);
} else { } else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
} }

View file

@ -128,7 +128,7 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) {
temp1 = (Rand_ZeroOne() - 0.5f) * 440.0f; temp1 = (Rand_ZeroOne() - 0.5f) * 440.0f;
temp2 = (Rand_ZeroOne() - 0.5f) * 20.0f; temp2 = (Rand_ZeroOne() - 0.5f) * 20.0f;
burstDepthY.x = this->dyna.actor.world.pos.x + temp2 * sinY + (temp1 * cosY); burstDepthY.x = this->dyna.actor.world.pos.x + temp2 * sinY + (temp1 * cosY);
burstDepthY.y = (this->dyna.actor.world.pos.y + 20.0f) + (i * 5.4166665f); burstDepthY.y = (this->dyna.actor.world.pos.y + 20.0f) + (i * (65.0f / 12.0f));
burstDepthY.z = this->dyna.actor.world.pos.z + temp2 * cosY - (temp1 * sinY); burstDepthY.z = this->dyna.actor.world.pos.z + temp2 * cosY - (temp1 * sinY);
burstDepthX.y = (Rand_ZeroOne() - 0.2f) * 12.0f; burstDepthX.y = (Rand_ZeroOne() - 0.2f) * 12.0f;

View file

@ -251,7 +251,7 @@ void BgSpot08Iceblock_Roll(BgSpot08Iceblock* this, GlobalContext* globalCtx) {
// Rotation by the angle between surfaceNormal and the vertical about rotationAxis // Rotation by the angle between surfaceNormal and the vertical about rotationAxis
func_800D23FC(Math_FAcosF(Math3D_Cos(&sVerticalVector, &this->surfaceNormal)), &this->rotationAxis, MTXMODE_NEW); func_800D23FC(Math_FAcosF(Math3D_Cos(&sVerticalVector, &this->surfaceNormal)), &this->rotationAxis, MTXMODE_NEW);
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Get(&mtx); Matrix_Get(&mtx);
func_800D20CC(&mtx, &this->dyna.actor.shape.rot, MTXMODE_NEW); func_800D20CC(&mtx, &this->dyna.actor.shape.rot, MTXMODE_NEW);
} }

View file

@ -97,7 +97,7 @@ void func_808B2970(BgSpot11Oasis* this) {
void func_808B2980(BgSpot11Oasis* this, GlobalContext* globalCtx) { void func_808B2980(BgSpot11Oasis* this, GlobalContext* globalCtx) {
if (Flags_GetEnv(globalCtx, 5) && func_808B280C(globalCtx)) { if (Flags_GetEnv(globalCtx, 5) && func_808B280C(globalCtx)) {
func_800800F8(globalCtx, 0x1036, -99, &this->actor, 0); OnePointCutscene_Init(globalCtx, 4150, -99, &this->actor, MAIN_CAM);
func_808B29E0(this); func_808B29E0(this);
} }
} }

View file

@ -88,7 +88,7 @@ void func_808B30C0(BgSpot12Gate* this) {
void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) { void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
func_808B3134(this); func_808B3134(this);
func_800800F8(globalCtx, 0x1040, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4160, -99, &this->dyna.actor, MAIN_CAM);
} }
} }

View file

@ -87,7 +87,7 @@ void func_808B357C(BgSpot12Saku* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
func_808B35E4(this); func_808B35E4(this);
this->timer = 20; this->timer = 20;
func_800800F8(globalCtx, 0x104A, -0x63, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4170, -99, &this->dyna.actor, MAIN_CAM);
} }
} }

View file

@ -415,7 +415,7 @@ void func_808B57E0(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
currentBomb = sPlayerBomb; currentBomb = sPlayerBomb;
if (currentBomb->timer > 0) { if (currentBomb->timer > 0) {
sTimer = currentBomb->timer + 20; sTimer = currentBomb->timer + 20;
func_800800F8(globalCtx, 0x1054, sTimer, NULL, 0); OnePointCutscene_Init(globalCtx, 4180, sTimer, NULL, MAIN_CAM);
} }
} }
} else if (player->stateFlags1 & 0x800) { } else if (player->stateFlags1 & 0x800) {
@ -445,7 +445,7 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
func_808B561C(this, globalCtx); func_808B561C(this, globalCtx);
func_800800F8(globalCtx, 0x1054, 0x32, NULL, 0); OnePointCutscene_Init(globalCtx, 4180, 50, NULL, MAIN_CAM);
Flags_SetSwitch(globalCtx, this->switchFlag); Flags_SetSwitch(globalCtx, this->switchFlag);
gSaveContext.eventChkInf[2] |= 8; gSaveContext.eventChkInf[2] |= 8;

View file

@ -96,7 +96,7 @@ void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx) {
} else { } else {
this->envColorAlpha = 255; this->envColorAlpha = 255;
} }
} else if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[2] != NULL && } else if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[2] != NULL &&
globalCtx->csCtx.npcActions[2]->action == 2) { globalCtx->csCtx.npcActions[2]->action == 2) {
if (this->envColorAlpha >= 6) { if (this->envColorAlpha >= 6) {
this->envColorAlpha -= 5; this->envColorAlpha -= 5;

View file

@ -180,7 +180,7 @@ void func_808B7AEC(BgSpot18Basket* this) {
void func_808B7AFC(BgSpot18Basket* this, GlobalContext* globalCtx) { void func_808B7AFC(BgSpot18Basket* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
func_800800F8(globalCtx, 4220, 80, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4220, 80, &this->dyna.actor, MAIN_CAM);
func_808B7B58(this); func_808B7B58(this);
} }
} }
@ -228,7 +228,7 @@ void func_808B7BCC(BgSpot18Basket* this, GlobalContext* globalCtx) {
if (positionDiff > 120.0f && positionDiff < 200.0f) { if (positionDiff > 120.0f && positionDiff < 200.0f) {
if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x, if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x,
this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) { this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) {
func_800800F8(globalCtx, 4210, 240, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4210, 240, &this->dyna.actor, MAIN_CAM);
func_808B7D38(this); func_808B7D38(this);
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
} }

View file

@ -91,7 +91,7 @@ void func_808B95AC(BgSpot18Shutter* this, GlobalContext* globalCtx) {
void func_808B95B8(BgSpot18Shutter* this, GlobalContext* globalCtx) { void func_808B95B8(BgSpot18Shutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
Actor_SetFocus(&this->dyna.actor, 70.0f); Actor_SetFocus(&this->dyna.actor, 70.0f);
func_80080480(globalCtx, &this->dyna.actor); OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_808B9698; this->actionFunc = func_808B9698;
} }
} }
@ -103,7 +103,7 @@ void func_808B9618(BgSpot18Shutter* this, GlobalContext* globalCtx) {
this->actionFunc = func_808B9698; this->actionFunc = func_808B9698;
} else { } else {
this->actionFunc = func_808B971C; this->actionFunc = func_808B971C;
func_800800F8(globalCtx, 0x107D, 0x8C, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 4221, 140, &this->dyna.actor, MAIN_CAM);
} }
} }
} }

View file

@ -93,7 +93,7 @@ void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_808BC65C(BgTreemouth* this, GlobalContext* globalCtx) { void func_808BC65C(BgTreemouth* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction; CsCmdActorAction* npcAction;
if ((globalCtx->csCtx.state != 0)) { if ((globalCtx->csCtx.state != CS_STATE_IDLE)) {
npcAction = globalCtx->csCtx.npcActions[0]; npcAction = globalCtx->csCtx.npcActions[0];
if (npcAction != NULL) { if (npcAction != NULL) {
if (npcAction->action == 2) { if (npcAction->action == 2) {
@ -166,7 +166,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) { void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
Player* player = PLAYER; Player* player = PLAYER;
if (globalCtx->csCtx.state == 3) { if (globalCtx->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) {
if (func_8002E12C(&this->dyna.actor, 350.0f, 0x7530)) { if (func_8002E12C(&this->dyna.actor, 350.0f, 0x7530)) {
player->actor.world.pos.x = 3827.0f; player->actor.world.pos.x = 3827.0f;
player->actor.world.pos.y = -161.0f; player->actor.world.pos.y = -161.0f;
@ -180,7 +180,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
D_8015FCC4 = 0xFFFF; D_8015FCC4 = 0xFFFF;
globalCtx->csCtx.unk_1A = 0; globalCtx->csCtx.unk_1A = 0;
globalCtx->csCtx.unk_1B = 0; globalCtx->csCtx.unk_1B = 0;
globalCtx->csCtx.state = 2; globalCtx->csCtx.state = CS_STATE_SKIPPABLE_EXEC;
if (globalCtx->msgCtx.choiceIndex == 0) { if (globalCtx->msgCtx.choiceIndex == 0) {
globalCtx->csCtx.segment = D_808BD520; globalCtx->csCtx.segment = D_808BD520;
@ -197,7 +197,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
void func_808BCAF0(BgTreemouth* this, GlobalContext* globalCtx) { void func_808BCAF0(BgTreemouth* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction; CsCmdActorAction* npcAction;
if (globalCtx->csCtx.state != 0) { if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[0]; npcAction = globalCtx->csCtx.npcActions[0];
if (npcAction != NULL) { if (npcAction != NULL) {
if (npcAction->action == 2) { if (npcAction->action == 2) {

View file

@ -7,40 +7,40 @@ CutsceneData D_808BCE20[] = {
CS_UNK_DATA_LIST(0x00000015, 1), CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000), CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
CS_PLAYER_ACTION_LIST(2), CS_PLAYER_ACTION_LIST(2),
CS_PLAYER_ACTION(0x0002, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878787994384766f, 0.0f, -5.878787994384766f), CS_PLAYER_ACTION(0x0002, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878788f, 0.0f, -5.878788f),
CS_PLAYER_ACTION(0x0004, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.44444465637207f, 0.0f, -5.44444465637207f), CS_PLAYER_ACTION(0x0004, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.4444447f, 0.0f, -5.4444447f),
CS_CAM_POS_LIST(0, 1091), CS_CAM_POS_LIST(0, 1091),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x59A8), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x59A8),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x20B8), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x20B8),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x0000), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x0000),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x6430), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x6430),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x0000), CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199955f, 2753, 46, -354, 0x0000),
CS_CAM_POS_LIST(60, 1271), CS_CAM_POS_LIST(60, 1271),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x20BA), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x20BA),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x44B8), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x44B8),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x8080), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x8080),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2705, 67, -302, 0x2D9A), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2705, 67, -302, 0x2D9A),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x005E), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x005E),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0xFFFF), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0xFFFF),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x0000), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x0000),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x5B80), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x5B80),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x7805), CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199955f, 2596, 127, -195, 0x7805),
CS_CAM_FOCUS_POINT_LIST(0, 1120), CS_CAM_FOCUS_POINT_LIST(0, 1120),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2788, 23, -453, 0x20BA), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2788, 23, -453, 0x20BA),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x44B8), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x44B8),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199954986572266f, 2787, 23, -453, 0x8080), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199955f, 2787, 23, -453, 0x8080),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x2D9A), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x2D9A),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x005E), CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199955f, 2787, 23, -453, 0x005E),
CS_CAM_FOCUS_POINT_LIST(60, 1300), CS_CAM_FOCUS_POINT_LIST(60, 1300),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2788, 23, -453, 0x20BA), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2788, 23, -453, 0x20BA),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x44B8), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x44B8),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x8080), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x8080),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2777, 72, -378, 0x2D9A), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2777, 72, -378, 0x2D9A),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x005E), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0x005E),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0xFFFF), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0xFFFF),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199954986572266f, 2673, 127, -267, 0x0000), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199955f, 2673, 127, -267, 0x0000),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x5B80), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0x5B80),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x7805), CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199955f, 2673, 127, -267, 0x7805),
CS_TEXT_LIST(4), CS_TEXT_LIST(4),
CS_TEXT_NONE(0, 40), CS_TEXT_NONE(0, 40),
CS_TEXT_DISPLAY_TEXTBOX(0x107D, 40, 60, 0x0000, 0xFFFF, 0xFFFF), CS_TEXT_DISPLAY_TEXTBOX(0x107D, 40, 60, 0x0000, 0xFFFF, 0xFFFF),
@ -52,8 +52,8 @@ CutsceneData D_808BCE20[] = {
CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -41, -28, 0, -41, -28, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -41, -28, 0, -41, -28, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION_LIST(62, 4), CS_NPC_ACTION_LIST(62, 4),
CS_NPC_ACTION(0x0001, 0, 1, 0x0000, 0x0000, 0x0000, 2668, 46, -490, 2668, 46, -490, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0001, 0, 1, 0x0000, 0x0000, 0x0000, 2668, 46, -490, 2668, 46, -490, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0004, 1, 50, 0x5479, 0x0000, 0x0000, 2668, 46, -490, 2890, 43, -612, 4.530612468719482f, -0.06122449040412903f, -4.530612468719482f), CS_NPC_ACTION(0x0004, 1, 50, 0x5479, 0x0000, 0x0000, 2668, 46, -490, 2890, 43, -612, 4.5306125f, -0.06122449f, -4.5306125f),
CS_NPC_ACTION(0x0004, 50, 100, 0x505C, 0x0000, 0x0000, 2890, 43, -612, 3109, 121, -705, 4.380000114440918f, 1.559999942779541f, -4.380000114440918f), CS_NPC_ACTION(0x0004, 50, 100, 0x505C, 0x0000, 0x0000, 2890, 43, -612, 3109, 121, -705, 4.38f, 1.56f, -4.38f),
CS_NPC_ACTION(0x0001, 100, 2084, 0x0000, 0x0000, 0x0000, 3109, 121, -705, 3109, 121, -705, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0001, 100, 2084, 0x0000, 0x0000, 0x0000, 3109, 121, -705, 3109, 121, -705, 0.0f, 0.0f, 0.0f),
CS_PLAY_BGM_LIST(1), CS_PLAY_BGM_LIST(1),
CS_PLAY_BGM(0x004C, 140, 141, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFBA, 0x00000094, 0x00000000, 0xFFFFFFBA, 0x00000094), CS_PLAY_BGM(0x004C, 140, 141, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFBA, 0x00000094, 0x00000000, 0xFFFFFFBA, 0x00000094),
@ -72,10 +72,10 @@ CutsceneData D_808BD2A0[] = {
CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -27, 26, 0, -27, 26, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -27, 26, 0, -27, 26, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1091), CS_CAM_POS_LIST(0, 1091),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x7065), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x7065),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x6167), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x6167),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x6D5D), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x6D5D),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0xF348), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0xF348),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x9D94), CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.999928f, 3740, -141, -530, 0x9D94),
CS_CAM_POS_PLAYER_LIST(60, 1151), CS_CAM_POS_PLAYER_LIST(60, 1151),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x7065), CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x7065),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x6167), CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x6167),
@ -83,11 +83,11 @@ CutsceneData D_808BD2A0[] = {
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0xF348), CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0xF348),
CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.0f, -4, 5, 49, 0x9D94), CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.0f, -4, 5, 49, 0x9D94),
CS_CAM_FOCUS_POINT_LIST(0, 1120), CS_CAM_FOCUS_POINT_LIST(0, 1120),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x7065), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x7065),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x6167), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x6167),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.99992752075195f, 3776, -89, -605, 0x6D5D), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.999928f, 3776, -89, -605, 0x6D5D),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3776, -89, -605, 0xF348), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3776, -89, -605, 0xF348),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99992752075195f, 3776, -89, -604, 0x9D94), CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.999928f, 3776, -89, -604, 0x9D94),
CS_CAM_FOCUS_POINT_PLAYER_LIST(60, 1180), CS_CAM_FOCUS_POINT_PLAYER_LIST(60, 1180),
CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x7065), CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x7065),
CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x6167), CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x6167),
@ -111,20 +111,20 @@ CutsceneData D_808BD520[] = {
CS_NPC_ACTION(0x0003, 20, 357, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0003, 20, 357, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1151), CS_CAM_POS_LIST(0, 1151),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x00EA), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x00EA),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x00FB), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x00FB),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x010C), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x010C),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x0198), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x0198),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x019A), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x019A),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x01AB), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x01AB),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99992752075195f, 3739, -141, -530, 0x01BC), CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.999928f, 3739, -141, -530, 0x01BC),
CS_CAM_FOCUS_POINT_LIST(0, 1180), CS_CAM_FOCUS_POINT_LIST(0, 1180),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x00EA), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x00EA),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x00FB), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x00FB),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x010C), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x010C),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3763, -126, -621, 0x0198), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3763, -126, -621, 0x0198),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.99992752075195f, 3763, -126, -621, 0x019A), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.999928f, 3763, -126, -621, 0x019A),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3763, -126, -621, 0x01AB), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3763, -126, -621, 0x01AB),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99992752075195f, 3765, -118, -617, 0x01BC), CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.999928f, 3765, -118, -617, 0x01BC),
CS_TEXT_LIST(2), CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20), CS_TEXT_NONE(0, 20),
CS_TEXT_DISPLAY_TEXTBOX(0x1017, 20, 60, 0x0000, 0xFFFF, 0xFFFF), CS_TEXT_DISPLAY_TEXTBOX(0x1017, 20, 60, 0x0000, 0xFFFF, 0xFFFF),
@ -144,17 +144,17 @@ CutsceneData D_808BD790[] = {
CS_NPC_ACTION_LIST(46, 1), CS_NPC_ACTION_LIST(46, 1),
CS_NPC_ACTION(0x0001, 0, 119, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f), CS_NPC_ACTION(0x0001, 0, 119, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1091), CS_CAM_POS_LIST(0, 1091),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x54EC), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x54EC),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x555C), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x555C),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x55CC), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x55CC),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x563C), CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x563C),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x56AC), CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x56AC),
CS_CAM_FOCUS_POINT_LIST(0, 1120), CS_CAM_FOCUS_POINT_LIST(0, 1120),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x54EC), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x54EC),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x555C), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x555C),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 75.59983825683594f, 3769, 718, -1186, 0x55CC), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 75.59984f, 3769, 718, -1186, 0x55CC),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x563C), CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x563C),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x56AC), CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x56AC),
CS_TEXT_LIST(2), CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20), CS_TEXT_NONE(0, 20),
CS_TEXT_DISPLAY_TEXTBOX(0x1018, 20, 60, 0x0000, 0xFFFF, 0xFFFF), CS_TEXT_DISPLAY_TEXTBOX(0x1018, 20, 60, 0x0000, 0xFFFF, 0xFFFF),

View file

@ -19,7 +19,7 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx);
void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx);
WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx);
@ -40,23 +40,19 @@ static InitChainEntry sInitChain[] = {
}; };
void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) { void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad1; s32 pad;
BgYdanHasi* this = THIS; BgYdanHasi* this = THIS;
CollisionHeader* colHeader; CollisionHeader* colHeader = NULL;
WaterBox* waterBox; WaterBox* waterBox;
s32 pad2;
colHeader = NULL;
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
this->unk_168 = ((thisx->params >> 8) & 0x3F); this->unk_168 = ((thisx->params >> 8) & 0x3F);
thisx->params = thisx->params & 0xFF; thisx->params = thisx->params & 0xFF;
waterBox = globalCtx->colCtx.colHeader->waterBoxes + 0x1; waterBox = &globalCtx->colCtx.colHeader->waterBoxes[1];
DynaPolyActor_Init(&this->dyna, DPM_PLAYER); DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
if (thisx->params == 1) { if (thisx->params == 1) {
// Water the moving platform floats on in B1. Never runs in Master Quest // Water the moving platform floats on in B1. Never runs in Master Quest
thisx->home.pos.y = (thisx->home.pos.y + -5.0f); waterBox->ySurface = thisx->world.pos.y = thisx->home.pos.y += -5.0f;
thisx->world.pos.y = thisx->home.pos.y;
waterBox->ySurface = thisx->home.pos.y;
this->actionFunc = BgYdanHasi_InitWater; this->actionFunc = BgYdanHasi_InitWater;
} else { } else {
if (thisx->params == 0) { if (thisx->params == 0) {
@ -85,12 +81,10 @@ void BgYdanHasi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx) {
s32 pad;
f32 framesAfterMath;
f32 posOffset;
WaterBox* waterBox; WaterBox* waterBox;
f32 framesAfterMath;
framesAfterMath = sinf((globalCtx->gameplayFrames & 0xFF) * 0.024543693f) * 165.0f; framesAfterMath = sinf((globalCtx->gameplayFrames & 0xFF) * (M_PI / 128)) * 165.0f;
this->dyna.actor.world.pos.x = this->dyna.actor.world.pos.x =
((Math_SinS(this->dyna.actor.world.rot.y) * framesAfterMath) + this->dyna.actor.home.pos.x); ((Math_SinS(this->dyna.actor.world.rot.y) * framesAfterMath) + this->dyna.actor.home.pos.x);
this->dyna.actor.world.pos.z = this->dyna.actor.world.pos.z =
@ -103,8 +97,7 @@ void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx)
if (this->timer == 0) { if (this->timer == 0) {
this->timer = 50; this->timer = 50;
} }
posOffset = sinf(this->timer * 0.12566371f); this->dyna.actor.world.pos.y += 2.0f * sinf(this->timer * (M_PI / 25));
this->dyna.actor.world.pos.y = (this->dyna.actor.world.pos.y + (posOffset + posOffset));
} }
void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) {
@ -114,11 +107,11 @@ void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) {
} }
} }
WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
WaterBox* waterBox; WaterBox* waterBox;
if (this->timer == 0) { if (this->timer == 0) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f) != 0) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
Flags_UnsetSwitch(globalCtx, this->unk_168); Flags_UnsetSwitch(globalCtx, this->unk_168);
this->actionFunc = BgYdanHasi_InitWater; this->actionFunc = BgYdanHasi_InitWater;
} }
@ -129,10 +122,8 @@ WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
} }
func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
} }
waterBox = globalCtx->colCtx.colHeader->waterBoxes; waterBox = &globalCtx->colCtx.colHeader->waterBoxes[1];
globalCtx->colCtx.colHeader->waterBoxes[1].ySurface = this->dyna.actor.world.pos.y; waterBox->ySurface = this->dyna.actor.world.pos.y;
if (1) {}
return waterBox + 0x1;
} }
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) {
@ -146,17 +137,15 @@ void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) {
} }
void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168) != 0) { if (Flags_GetSwitch(globalCtx, this->unk_168)) {
this->timer = 260; this->timer = 260;
this->dyna.actor.draw = BgYdanHasi_Draw; this->dyna.actor.draw = BgYdanHasi_Draw;
this->actionFunc = BgYdanHasi_UpdateThreeBlocks; this->actionFunc = BgYdanHasi_UpdateThreeBlocks;
func_800800F8(globalCtx, 0xBE0, 0x1E, &this->dyna.actor, 0); OnePointCutscene_Init(globalCtx, 3040, 30, &this->dyna.actor, MAIN_CAM);
} }
} }
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) { void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
s32 pad;
if (this->timer != 0) { if (this->timer != 0) {
this->timer--; this->timer--;
} }
@ -165,16 +154,16 @@ void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
Flags_UnsetSwitch(globalCtx, this->unk_168); Flags_UnsetSwitch(globalCtx, this->unk_168);
this->dyna.actor.draw = NULL; this->dyna.actor.draw = NULL;
this->actionFunc = BgYdanHasi_SetupThreeBlocks; this->actionFunc = BgYdanHasi_SetupThreeBlocks;
return; } else {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
}
} else {
if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f)) {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
} else {
func_8002F994(&this->dyna.actor, this->timer);
} }
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
return;
} }
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f) == 0) {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
return;
}
func_8002F994(&this->dyna.actor, this->timer);
} }
void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) { void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) {
@ -189,19 +178,18 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) { if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) {
Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]); Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]);
return; } else {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames % 128,
globalCtx->gameplayFrames % 128, 0x20, 0x20, 1, globalCtx->gameplayFrames % 128,
globalCtx->gameplayFrames % 128, 0x20, 0x20));
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597);
} }
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames & 0x7F,
globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1, globalCtx->gameplayFrames & 0x7F,
globalCtx->gameplayFrames & 0x7F, 0x20, 0x20));
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597);
} }

Some files were not shown because too many files have changed in this diff Show more