let's dev 6/28/17

fixed fake flipper kill (again except on the screen you entered)
fixed stats bonk key
fixed stats progressive sword probably
fixed several byrna bugs
added OnEnterWater event hook
This commit is contained in:
Karkat
2017-06-28 01:08:03 -04:00
parent 4d89eac92b
commit ebc0791cc4
8 changed files with 44 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $1FFFF8 ; timestamp rom
dl #$20170626
dl #$20170628
;================================================================================

View File

@@ -54,6 +54,7 @@ GiveBonkItem:
JSR LoadBonkItem
CMP #$24 : BNE .notKey
.key
JSL.l AddInventory_incrementKeyLong
LDA $7EF36F : INC A : STA $7EF36F
LDA.b #$2F : JSL.l Sound_SetSfx3PanLong
RTL

View File

@@ -36,6 +36,7 @@ OnFileLoad:
JSL.l MasterSwordFollowerClear
JSL.l InitOpenMode
LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
LDA #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090"
@@ -53,10 +54,17 @@ OnNewFile:
RTL
;--------------------------------------------------------------------------------
OnLinkDamaged:
;JSL.l FlipperKill
JSL.l FlipperKill
JSL.l OHKOTimer
RTL
;--------------------------------------------------------------------------------
OnEnterWater:
JSL.l RegisterWaterEntryScreen
JSL.l MysteryWaterFunction
LDX.b #$04
RTL
;--------------------------------------------------------------------------------
OnLinkDamagedFromPit:
JSL.l OHKOTimer
LDA.b #$14 : STA $11 ; thing we wrote over

View File

@@ -6,6 +6,7 @@ FlipperKill:
LDA $5D : CMP #$04 : BNE .done ; skip if we're not swimming
LDA $7EF356 : BNE .done ; skip if we have the flippers
LDA $7F5001 : BEQ .done ; skip if we're not marked in danger for softlock
LDA $8A : CMP $7F5098 : BEQ .done ; skip if we're on the same screen we entered the water on
JSL.l KillFairies ; take away fairies
LDA.b #$00 : STA $7EF36D ; kill link
LDA.b #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
@@ -42,3 +43,16 @@ FlipperFlag:
.done
RTL
;--------------------------------------------------------------------------------
RegisterWaterEntryScreen:
PHA
LDA $8A : STA $7F5098 ; store ow index
PLA
RTL
;--------------------------------------------------------------------------------
MysteryWaterFunction: ; *$3AE54 ALTERNATE ENTRY POINT
LDA.b #$20 : STA $02E2
STZ $037B
STZ $55
STZ $0360
RTL
;--------------------------------------------------------------------------------

View File

@@ -514,6 +514,10 @@ JSL.l DialogUncle
;org $1FB8E4 ; <- 0FB8E4
;db $00
;--------------------------------------------------------------------------------
;0xFE465 -> 0x1E
org $1FE465
db #$1E
;--------------------------------------------------------------------------------
;================================================================================
; Bomb & Arrow Capacity Updates
@@ -1665,15 +1669,25 @@ NOP #6
;================================================================================
; Fake Flippers Softlock Fix + General Damage Hooks
;--------------------------------------------------------------------------------
org $078091 ; <- 38091 - Bank07.asm:138 (LDA $037B : BNE .linkNotDamaged)
LDA $0373 : STA $00 : STZ $0373 ; store and zero damage
LDA $037B : BNE LinkDamaged_linkNotDamaged ; skip if immune
;--------------------------------------------------------------------------------
org $0780C6 ; <- 380C6 - Bank07.asm:174 (LDA $7EF36D)
JSL.l OnLinkDamaged
;--------------------------------------------------------------------------------
org $0780FB ; <- 380FB - Bank07.asm:207 (.linkNotDamaged)
LinkDamaged_linkNotDamaged:
;--------------------------------------------------------------------------------
org $0794FB ; <- 394FB - Bank07.asm:3336 (LDA.b #$14 : STA $11)
JSL.l OnLinkDamagedFromPit
;--------------------------------------------------------------------------------
org $078F27 ; <- 38F27
JSL.l FlipperReset
;--------------------------------------------------------------------------------
org $078F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
JSL.l OnEnterWater : NOP
;--------------------------------------------------------------------------------
;================================================================================
; Floodgate Softlock Fix

View File

@@ -231,10 +231,7 @@ AddInventory:
CPY.b #$50 : BEQ .isSword
BRA +
.isSword
LDA $7EF42A : AND #$40 : BNE ++ ; skip additional processing if we have the fairy sword flag yet
BRL .dungeonCounts
++
BRL .itemCounts
+
CPY.b #$3B : BNE + : BRL .dungeonCounts : + ; Silver Arrow Bow - Skip Shop/Fairy Check for Silver Arrow Bow
@@ -522,15 +519,7 @@ RTL
PLA
+
LDA $00 : PHA
LDA.l FairySword : STA $00
CPY $00 : BNE + ; increment if not the fairy sword
LDA $7EF42A : BIT #$40 : BNE ++ ; skip if we have the fairy sword flag yet
ORA.b #$40 : STA $7EF42A ; set fairy sword flag
+
LDA $7EF422 : !ADD #$20 : STA $7EF422 ; increment sword counter
++
PLA : STA $00
RTS
.incrementShield

View File

@@ -38,9 +38,8 @@
; b - heart containers
; p - pendant upgrades
;--------------------------------------------------------------------------------
; $7EF42A bfsccccc
; $7EF42A b-sccccc
; b - bomb acquired
; f - fairy sword acquired
; s - silver arrow bow acquired
; c - chests before gtower big key
;--------------------------------------------------------------------------------

View File

@@ -1104,6 +1104,7 @@ dw #9999 ; Rupee Limit
; $7F5095 - Dialog Offset Pointer (High)
; $7F5096 - Dialog Offset Pointer Return (Low)
; $7F5097 - Dialog Offset Pointer Return (High)
; $7F5098 - Water Entry Index
; $7F50D0 - $7F50FF - Block Cypher Parameters
; $7F5100 - $7F51FF - Block Cypher Buffer
; $7F5200 - $7F52FF - RNG Pointer Block