pre v27 fixes

added dungeon exit hook
added 2nd option for compass mode (always on)
fixed compass mode to stop drawing outside dungeons
This commit is contained in:
Karkat
2017-11-03 20:40:45 -04:00
parent 168b5a6132
commit c04b230721
3 changed files with 22 additions and 4 deletions

View File

@@ -3,13 +3,16 @@
;--------------------------------------------------------------------------------
!GOAL_COUNTER = "$7EF460"
DrawDungeonCompassCounts:
LDA.l CompassMode : AND.w #$00FF : BNE + : RTL : + ; Item Counts
LDA $1B : AND.w #$00FF : BNE + : RTL : + ; Skip if outdoors
LDA $040C : CMP.w #$00FF : BNE + : RTL : + ; Skip if not in a dungeon
LDA.l CompassMode : AND.w #$00FF : BNE + : RTL : + ; Item Counts
PHX
LDX $040C ; Load dungeon ID to X
LDA $7EF364 : AND .item_masks, X ; Load compass values to A, mask with dungeon item masks
BNE + : BRL .done : + ; skip if we don't have compass
CMP.w #$0002 : BEQ ++ ; if CompassMode==2, we don't check for the compass
LDA $7EF364 : AND .item_masks, X ; Load compass values to A, mask with dungeon item masks
BNE + : BRL .done : + ; skip if we don't have compass
++
LDA $040C
CMP.w #$0000 : BNE + ; Sewer Passage

View File

@@ -26,6 +26,14 @@ OnDungeonEntrance:
STA $7EC172 ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
OnDungeonExit:
STA $040C : STZ $04AC ; thing we wrote over
PHA : PHP
JSL.l HUD_RebuildLong
PLP : PLA
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090"
OnFileLoad:
LDA !FRESH_FILE_MARKER : BNE +

View File

@@ -29,6 +29,13 @@ org $02D8C7 ; <- 158C7 - Bank02.asm : 10981 (STA $7EC172)
JSL.l OnDungeonEntrance
;--------------------------------------------------------------------------------
;================================================================================
; Dungeon Exit Hook
;--------------------------------------------------------------------------------
org $02E21B ; <- 1621B - Bank02.asm : 11211 (STA $040C)
JSL.l OnDungeonExit : NOP #2
;--------------------------------------------------------------------------------
;================================================================================
; Hash Key Display
;--------------------------------------------------------------------------------
@@ -888,7 +895,7 @@ JSL.l RNG_Trinexx
;--------------------------------------------------------------------------------
org $0DFC77 ; <- 6FC77 - headsup_display.asm : 845
NOP #$2D ; #45
org $0DFC77 ; <- 6FC77
org $0DFC77 ; <- 6FC77 - yes these are both the correct address - kkat
JSL.l OnDrawHud
BRA $27