Skip to content

Commit a995da2

Browse files
author
djevangelia
committed
z_player Ladder cutscene fix without ra manipulation
1 parent c0ce041 commit a995da2

4 files changed

Lines changed: 20 additions & 16 deletions

File tree

ASM/src/build.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ RANDO_CONTEXT:
133133
.include "en_dns.asm"
134134
.include "bg_gate_shutter.asm"
135135
.include "big_poe.asm"
136-
.include "player_ladder_cutscene.asm"
136+
.include "player_laddercutscenefix.asm"
137137

138138
.align 0x10
139139
.importobj "../build/bundle.o"

ASM/src/hacks/z_player.asm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
.headersize(0x808301c0 - 0xbcdb70)
1+
.headersize (0x808301c0 - 0xbcdb70)
22

33
;================================================================================
44
; Fixes softlock when starting cutscene while dismounting a ladder.
55
;================================================================================
6-
; Replaces lw t8,1644(s0)
7-
; lui at,0xffdf
6+
; Replaces lw t8,1644(s0)
7+
; lui at,0xffdf
8+
; ori at,at,0xffff
9+
; and t9,t8,at
810
.org 0x8084a6c4 ; in Player_Action_DismountLadder (0x803a3064)
9-
jal player_ladder_cutscene
11+
jal Player_LadderCutsceneFix
12+
lw t8,1644(s0) ; displaced
13+
bnez v0,0x8084a6e0 ; branch to load LinkAnimation argument if in CS/using CS item
1014
nop

ASM/src/player_ladder_cutscene.asm

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Player_LadderCutsceneFix:
2+
lbu t4,1693(s0) ; player->unk_6AD
3+
addi t3,t4,-3 ; Cutscene = 3, CS item = 4
4+
bltzl t3,@@Return ; If not CS/CS item, continue as usual
5+
li v0,0 ; 0 for no branching
6+
li v0,1 ; Otherwise, 1 for branching
7+
@@Return:
8+
lui at,0xffdf ; displaced
9+
ori at,at,0xffff ; displaced
10+
jr ra
11+
and t9,t8,at ; displaced

0 commit comments

Comments
 (0)