Fix problems with mystery hidden item total

Upgrade blue enemy drop indicator to work with caves
This commit is contained in:
aerinon
2023-09-26 13:31:34 -06:00
parent 3f0082a771
commit f3768ea0ad
3 changed files with 9 additions and 6 deletions

View File

@@ -24,10 +24,11 @@ DrHudOverride:
DRHUD_DrawItemCounter: DRHUD_DrawItemCounter:
; hides total for mystery seeds ; hides total for mystery seeds
LDA.l ItemCounterHUD : BEQ DRHUD_DrawIndicators
LDA.l DRFlags+1 : LSR : BCC DRHUD_DrawIndicators LDA.l DRFlags+1 : LSR : BCC DRHUD_DrawIndicators
REP #$30 REP #$30
LDY.w #!HyphenTile : STA.w HUDGoalIndicator+$0A : STA.w HUDGoalIndicator+$0C LDY.w #!HyphenTile : STY.w HUDGoalIndicator+$0A : STY.w HUDGoalIndicator+$0C
STA.w HUDGoalIndicator+$0E : STA.w HUDGoalIndicator+$10 STY.w HUDGoalIndicator+$0E : STY.w HUDGoalIndicator+$10
SEP #$30 SEP #$30
DRHUD_DrawIndicators: DRHUD_DrawIndicators:

View File

@@ -13,8 +13,8 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnDrawHud: OnDrawHud:
JSL.l DrawChallengeTimer ; this has to come before NewDrawHud because the timer overwrites the compass counter JSL.l DrawChallengeTimer ; this has to come before NewDrawHud because the timer overwrites the compass counter
JSL.l DrHudOverride
JSL.l NewDrawHud JSL.l NewDrawHud
JSL.l DrHudOverride
JSL.l SwapSpriteIfNecessary JSL.l SwapSpriteIfNecessary
JSL.l CuccoStorm JSL.l CuccoStorm
JSL.l PollService JSL.l PollService

View File

@@ -361,7 +361,7 @@ SetupEnemyDropIndicator:
; compass checks ; compass checks
; does compass for dungeon exist? ; does compass for dungeon exist?
LSR : TAX : LDA.l ExistsTransfer, X : TAX : LDA.l CompassExists, X : BEQ .skipCompassChecks LSR : TAX : LDA.l ExistsTransfer, X : TAX : LDA.l CompassExists, X : BEQ .skipCompassChecks
; doe we have the compass ; do we have the compass
; todo: sewers? ; todo: sewers?
LDA.l CompassField : LDX.w $040C : AND.l DungeonMask, X : BEQ .done LDA.l CompassField : LDX.w $040C : AND.l DungeonMask, X : BEQ .done
@@ -519,13 +519,15 @@ RTS
; output - A the correct bitmask ; output - A the correct bitmask
FetchBitmaskForSpecialCase: FetchBitmaskForSpecialCase:
ASL : TAX ASL : TAX
LDA.w $040C : BNE + ; could check if we are in a cave here and branch to different function? LDA.w $040C : BNE + ; here and branch to different function?
INC #2 ; move sewers to HC INC #2 ; move sewers to HC
+ CMP.w #$00FF : BNE + ; check if we are in a cave
LDA.l PreviousOverworldDoor : AND.w #$00FF ; use this instead of dungeon id
+ STA.b $02 + STA.b $02
- LDA.l UWSpecialFlag, X : AND.w #$00FF - LDA.l UWSpecialFlag, X : AND.w #$00FF
CMP.w #$00FF : BNE + ; if the value is FF we are done, use 0 as bitmask CMP.w #$00FF : BNE + ; if the value is FF we are done, use 0 as bitmask
LDA.w #$0000 : RTS LDA.w #$0000 : RTS
+ CMP.b $02 : BNE + ; if the value matches the dungeon, use next 2 bytes as bitmasl + CMP.b $02 : BNE + ; if the value matches the dungeon, use next 2 bytes as bitmask
INX : LDA.l UWSpecialFlag, X : RTS INX : LDA.l UWSpecialFlag, X : RTS
+ INX #3 : BRA - ; else move to the next row + INX #3 : BRA - ; else move to the next row