From 5a1ebd390a21a3afc162607cc124193892d1c127 Mon Sep 17 00:00:00 2001 From: Lorenzo Carletti Date: Mon, 24 Aug 2020 19:28:28 +0200 Subject: [PATCH] Fix death scene issue --- src/m2-hack.asm | 7 +++---- src/m2-vwf-entries.asm | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/m2-hack.asm b/src/m2-hack.asm index 3281979..806dd26 100644 --- a/src/m2-hack.asm +++ b/src/m2-hack.asm @@ -1710,12 +1710,10 @@ nop .org 0x801352E :: bl printPlayerNameCredits //Repoint cast graphical data -.org 0x82DB25C :: dw m2_cast_graphics -.org 0x82DB260 :: dw m2_cast_palette -.org 0x82DB264 :: dw m2_cast_arrangements +.org m2_cast_roll_pointers :: dw m2_cast_graphics :: dw m2_cast_palette :: dw m2_cast_arrangements //Remove flavour changing the palette -.org 0x801043A :: b 0x8010500 +.org 0x8010426 :: bl prevent_cast_changed_palettes //Cast Roll VWF .org 0x800F640 :: bl writeCastText @@ -2013,6 +2011,7 @@ disclaimer_map: .definelabel m2_div ,0x80F49D8 .definelabel m2_remainder ,0x80F4A70 .definelabel cpuset ,0x80F47C0 +.definelabel m2_cast_roll_pointers ,0x82DB25C .definelabel m2_items ,0x8B1D62C .definelabel m2_default_names ,0x82B9330 .definelabel m2_psi_print_table ,0x8B2A9C0 diff --git a/src/m2-vwf-entries.asm b/src/m2-vwf-entries.asm index 59558fe..3574908 100644 --- a/src/m2-vwf-entries.asm +++ b/src/m2-vwf-entries.asm @@ -3360,6 +3360,30 @@ bl eb_cartridge_palette_change @@end: pop {pc} +//============================================================================== +//Prevents changing the palette based on the flavour for the cast roll sequence +prevent_cast_changed_palettes: +push {lr} +ldr r1,=#m2_cast_roll_pointers +cmp r0,r1 +beq @@alternate_end +bl 0x8010028 +pop {pc} + +@@alternate_end: +bl 0x8010028 +ldr r1,=#0x40000D4 +ldr r0,=#0x2010000 +str r0,[r1,#0] +ldr r3,=#0x3001B30 +str r3,[r1,#4] +ldr r0,=#0x84000080 +str r0,[r1,#8] +ldr r0,[r1,#8] +pop {r0} +ldr r0,=#0x8010501 //Go to the end of the routine +bx r0 + //============================================================================== //Prints the sick tiles and then the names sick_name: