From 607974caebbb22587e626d2daaf0b1fb23424f57 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Fri, 23 Aug 2019 21:56:26 -0400 Subject: [PATCH] Fix bunny pallete map bug and glove color bug --- LTTP_RND_GeneralBugfixes.asm | 5 ++++- bugfixes.asm | 38 +++++++++++++++++++++++++++++++++++- hooks.asm | 10 ++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index e3a5337..3665b66 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -427,9 +427,12 @@ Dungeon_SaveRoomData_justKeys: org $02B861 Dungeon_SaveRoomQuadrantData: -org $02FD8A ; 17D8A - Bank07.asm: 3732 Note: Different bank +org $02FD8A ; 17D8A - Bank0E.asm: 3732 Note: Different bank LoadGearPalettes_bunny: +org $02FD95 ; 17D95 - Bank0E.asm: 3742 Note: Different bank +LoadGearPalettes_variable: + org $05A51D Sprite_SpawnFallingItem: diff --git a/bugfixes.asm b/bugfixes.asm index 0b28bd6..a20c769 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -147,4 +147,40 @@ WallmasterCameraFix: STZ $0618 ; something about scrolling, setting these to 0 tricks the game STZ $061A ; into thinking we're at the edge of the room so it doesn't scroll. SEP #$20 - JML Sound_SetSfx3PanLong ; what we wrote over, also this will RTL \ No newline at end of file + JML Sound_SetSfx3PanLong ; what we wrote over, also this will RTL + +;-------------------------------------------------------------------------------- +; Fix losing glove colors +LoadActualGearPalettesWithGloves: +REP #$20 +LDA $7EF359 : STA $0C +LDA $7EF35B : AND.w #$00FF +JSL LoadGearPalettes_variable +JSL SpriteSwap_Palette_ArmorAndGloves_part_two +RTL + +;-------------------------------------------------------------------------------- +; Fix Bunny Palette Map Bug +LoadGearPalette_safe_for_bunny: +LDA $10 +CMP.w #$030E : BEQ .new ; opening dungeon map +CMP.w #$070E : BEQ .new ; opening overworld map +.original +- + lda [$00] + sta $7ec300, x + sta $7ec500, x + inc $00 : inc $00 + inx #2 + dey + bpl - +RTL +.new +- + lda [$00] + sta $7ec500, x + inc $00 : inc $00 + inx #2 + dey + bpl - +RTL diff --git a/hooks.asm b/hooks.asm index 31885a4..a7af742 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2311,6 +2311,16 @@ org $0DA9C8 ; <- 06A9C8 - player_oam.asm: 1663 (AND.w #$00FF : CMP.w #$00F8 : BC ; to the link sprite). LDA $02 ; always zero! (this replaces the BCC) ADC.w #0000 ; put the carry bit into the accumulator instead of a hardcoded 1. +;------------------------------------------------------------------------------- +org $02fd6f ; <- 017d6f - bank0E.asm: 3694 (LoadActualGearPalettes:) Note: Overflow of bank02 moved to 0e in US Rom +JSL LoadActualGearPalettesWithGloves +RTL +;-------------------------------------------------------------------------------- +; Bunny Palette/Overworld Map Bugfix +;-------------------------------------------------------------------------------- +org $02fdf0 ; <- 017df0 - bank0E (LDA [$00] : STA $7EC300, X : STA $7EC500, X) +JSL LoadGearPalette_safe_for_bunny +RTS ;================================================================================ ;================================================================================