diff --git a/patches/ips/vanilla_camerafixes.ips b/patches/ips/vanilla_camerafixes.ips index ca084ade5..253f22c40 100644 Binary files a/patches/ips/vanilla_camerafixes.ips and b/patches/ips/vanilla_camerafixes.ips differ diff --git a/patches/src/vanilla_camerafixes.asm b/patches/src/vanilla_camerafixes.asm index a89c795a1..04e73884b 100644 --- a/patches/src/vanilla_camerafixes.asm +++ b/patches/src/vanilla_camerafixes.asm @@ -102,4 +102,19 @@ assert pc() <= !bank_84_free_space_end ; Fix Bomb Torizo crumbling animation (which can be very messed up if the player earlier visited a room ; that maxed out enemy projectiles) org $86A8FD - ADC $1B23, x ; was: ADC $1B23 \ No newline at end of file + ADC $1B23, x ; was: ADC $1B23 + + +;; GT: Exit fight mid-palette-change fix. + +; The door transition code assumes the palette counter/timer is 0. +; If the GT fight is exited while GT is changing color, the counter +; can be non-zero, causing the transition to start at the wrong timer +; index. If the index is high enough, this can corrupt the graphics +; during the transition. + +; Include the palette counter/timer in the door transition zero-loop +; counter so the transition starts from the correct index. + +org $82e1e1 ; (Game state Ah (door transition - setup) ;;;) + ldx #$0104