From ec138f4f987c4e1a712bebf7abedbf585bc2ed5a Mon Sep 17 00:00:00 2001 From: Myramong Date: Fri, 1 Feb 2019 01:05:08 -0400 Subject: [PATCH] events.asm: optimized a loop & fixed a bug icepalacegraphics.asm: commented out a debug sta retro.asm: check for arrows by checking arrows instead of bow tables.asm: change default retro arrow price to match the price set by the randomizer site --- events.asm | 16 ++++++++-------- icepalacegraphics.asm | 2 +- retro.asm | 4 +--- tables.asm | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/events.asm b/events.asm index b10a022..cdbdf43 100644 --- a/events.asm +++ b/events.asm @@ -120,17 +120,17 @@ OnNewFile: LDA.l StartingTime : STA $7EF454 LDA.l StartingTime+2 : STA $7EF454+2 - LDX.w #$00 : - ; copy over starting equipment + LDX.w #$004E : - ; copy over starting equipment LDA StartingEquipment, X : STA $7EF340, X - INX : INX - CPX.w #$004F : !BLT - - - LDA ArrowMode : BEQ .continue ; Customizer Rupee Bow Fix - LDA $7EF38E : BEQ .continue ; Anything but zero is good - LDA #$01, X : STA $7EF377, X ; Set Arrows to 1 - .continue + DEX : DEX + BPL - SEP #$20 ; set 8-bit accumulator + LDA.l ArrowMode : BEQ + ; Customizer Rupee Bow Fix + LDA.l !INVENTORY_SWAP_2 : AND.b #$C0 : BEQ + ; check if we're starting with bow and/or silvers + LDA.b #$01 : STA.l $7EF377 ; Set arrows to 1 so we can shoot + + + ;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in LDA.l PreopenCurtains : BEQ + LDA.b #$80 : STA $7EF061 ; open aga tower curtain diff --git a/icepalacegraphics.asm b/icepalacegraphics.asm index f685a6b..8d2677f 100644 --- a/icepalacegraphics.asm +++ b/icepalacegraphics.asm @@ -25,7 +25,7 @@ BgGraphicsLoading: ; We're loading the floor tiles in Ice Palace. Instead of the normal file, ; load another one that replaces the bridge tiles with the Bombos medallion - LDA $FFFFFF + ;LDA $FFFFFF LDA.b #IcePalaceFloorGfx>>16 STA $02 diff --git a/retro.asm b/retro.asm index a6633e0..c96e1b7 100644 --- a/retro.asm +++ b/retro.asm @@ -38,9 +38,7 @@ DecrementArrows: DEC : STA $7EF377 : INC BRA .done .rupees - LDA $7EF340 : CMP.b #$01 : BNE .has_arrow - LDA.b #$00 : RTL - .has_arrow: + LDA $7EF377 : BEQ .done ; don't have arrows, we're done LDA $7EF340 : AND.b #$01 : BEQ + LDA.b $0B99 : BNE + ; Arrow Game active and has credits left LDA.b $0B9A : BNE + ; Arrow Game active and on last arrow diff --git a/tables.asm b/tables.asm index 1387dbf..a547b26 100644 --- a/tables.asm +++ b/tables.asm @@ -795,11 +795,11 @@ db #$01 ; #00 = Fix Off (Default) - #$01 = Fix On ;================================================================================ org $308175 ; PC 0x180175 - 0x180179 ArrowMode: -db #$00 ; #00 = Normal (Default) - #$01 = Rupees +db #$01 ; #00 = Normal (Default) - #$01 = Rupees ArrowModeWoodArrowCost: ; keep these together -dw #$0005 ; #$0005 = 5 (Default) -ArrowModeSilverArrowCost: ; keep these together dw #$000A ; #$000A = 10 (Default) +ArrowModeSilverArrowCost: ; keep these together +dw #$0032 ; #$0032 = 50 (Default) ;================================================================================ org $30817A ; PC 0x18017A ; #$2000 for Eastern Palace MapReveal_Sahasrahla: