[XCX] Apply cutscene fix to prerendered cutscenes

This commit is contained in:
Crementif 2022-08-12 15:17:02 +02:00
parent 20ab154d2c
commit 1495a2d811
2 changed files with 21 additions and 4 deletions

View file

@ -7,15 +7,29 @@ forceCutsceneLimit:
.int 0
_useCutsceneLimit:
li r10, 1
li r10, 5
lis r9, forceCutsceneLimit@ha
stw r10, forceCutsceneLimit@l(r9)
lfs f11, -0x303C(r8)
blr
_usePrerenderedCutsceneLimit:
li r4, 5
lis r3, forceCutsceneLimit@ha
stw r4, forceCutsceneLimit@l(r3)
lwz r3, 0x0(r30)
blr
_resetCutsceneLimit:
li r10, 0
lis r9, forceCutsceneLimit@ha
lwz r10, forceCutsceneLimit@l(r9)
cmpwi r10, 0
ble _restoreRegisters
li r9, -1
add r10, r10, r9
lis r9, forceCutsceneLimit@ha
stw r10, forceCutsceneLimit@l(r9)
b _restoreRegisters
@ -34,8 +48,8 @@ cmpwi r10, 1
bne _calculateFPS
lis r10, forceCutsceneLimit@ha
lwz r10, forceCutsceneLimit@l(r10)
cmpwi r10, 1
bne _calculateFPS
cmpwi r10, 0
ble _calculateFPS
; If a cutscene FPS limit is set, lower FPS
_lowerCutsceneFPS:

View file

@ -282,6 +282,7 @@ moduleMatches = 0xF882D5CF
0x02FD5AB4 = bla _calculateGamespeed
0x027685B0 = bla _useCutsceneLimit
0x03AC2810 = bla _usePrerenderedCutsceneLimit
# These patches are replaced by lowering the framerate to prevent side-effects
# 0x027398B4 = lis r11, averageFPS1@ha ; Double updateEventParam cutscenes
@ -324,6 +325,7 @@ moduleMatches = 0x7672271D
0x02FD0F7C = bla _calculateGamespeed
0x02766D28 = bla _useCutsceneLimit
0x03ABDBA8 = bla _usePrerenderedCutsceneLimit
# These patches are replaced by lowering the framerate to prevent side-effects
# 0x0273802C = lis r11, averageFPS1@ha ; Double updateEventParam cutscenes
@ -366,6 +368,7 @@ moduleMatches = 0x30B6E091
0x02FD5A54 = bla _calculateGamespeed
0x027685B0 = bla _useCutsceneLimit
0x03AC2790 = bla _usePrerenderedCutsceneLimit
# These patches are replaced by lowering the framerate to prevent side-effects
# 0x027398B4 = lis r11, averageFPS1@ha ; Double updateEventParam cutscenes