housekeeping

This commit is contained in:
scawful
2022-12-19 19:14:28 -05:00
parent 0a7e3ebc54
commit 73e87c628b
4 changed files with 22 additions and 50 deletions

View File

@@ -11,6 +11,7 @@
; Significant thanks to Kan for helping me craft this menu! ; Significant thanks to Kan for helping me craft this menu!
; ;
; ============================================================================= ; =============================================================================
incsrc "Util/ram.asm"
pushpc pushpc
; update in game hud colors ; update in game hud colors
@@ -263,6 +264,7 @@ Menu_ScrollTo:
; ============================================================================= ; =============================================================================
; 06 MENU STATS SCREEN ; 06 MENU STATS SCREEN
incsrc "menu_scroll.asm" incsrc "menu_scroll.asm"
Menu_StatsScreen: Menu_StatsScreen:

View File

@@ -767,72 +767,44 @@ FloorIndicatorNumberLow:
org $0AFD0C org $0AFD0C
FloorIndicator: FloorIndicator:
{ {
; Handles display of the Floor indicator on BG3 (1F, B1, etc)
REP #$30 REP #$30
LDA $04A0 : AND.w #$00FF : BEQ .hideIndicator LDA $04A0 : AND.w #$00FF : BEQ .hideIndicator
INC A : CMP.w #$00C0 : BNE .dontDisable INC A : CMP.w #$00C0 : BNE .dontDisable
; if the count up timer reaches 0x00BF frames, disable the floor indicator during the next frame. ; if the count up timer reaches 0x00BF frames, disable the floor indicator during the next frame.
LDA.w #$0000 LDA.w #$0000
.dontDisable .dontDisable
STA $04A0 STA $04A0
PHB : PHK : PLB PHB : PHK : PLB
LDA.w #$251E : STA $7EC7F0 LDA.w #$251E : STA $7EC7F0
INC A : STA $7EC832 INC A : STA $7EC832
INC A : STA $7EC830 INC A : STA $7EC830
LDA.w #$250F : STA $7EC7F2 LDA.w #$250F : STA $7EC7F2
LDX.w #$0000 LDX.w #$0000
; this confused me at first, but it's actually looking at whether $A4[1] ; this confused me at first, but it's actually looking at whether $A4[1]
; has a negative value $A3 has nothing to do with $A4 ; has a negative value $A3 has nothing to do with $A4
LDA $A3 : BMI .basementFloor LDA $A3 : BMI .basementFloor
; check which floor Link is on. ; check which floor Link is on.
LDA $A4 : BNE .notFloor1F LDA $A4 : BNE .notFloor1F
LDA $A0 : CMP.w #$0002 : BEQ .sanctuaryRatRoom LDA $A0 : CMP.w #$0002 : BEQ .sanctuaryRatRoom
SEP #$20 SEP #$20
; Check the world state ; Check the world state
LDA $7EF3C5 : CMP.b #$02 : BCS .noRainSound LDA $7EF3C5 : CMP.b #$02 : BCS .noRainSound
; cause the ambient rain sound to occur (indoor version) ; cause the ambient rain sound to occur (indoor version)
LDA.b #$03 : STA $012D LDA.b #$03 : STA $012D
.noRainSound .noRainSound
REP #$20 REP #$20
.notFloor1F .notFloor1F
.sanctuaryRatRoom .sanctuaryRatRoom
LDA $A4 : AND.w #$00FF LDA $A4 : AND.w #$00FF
BRA .setFloorIndicatorNumber BRA .setFloorIndicatorNumber
.basementFloor .basementFloor
SEP #$20 SEP #$20
; turn off any ambient sound effects ; turn off any ambient sound effects
LDA.b #$05 : STA $012D LDA.b #$05 : STA $012D
REP #$20 REP #$20
INX #2 INX #2
LDA $A4 : ORA.w #$FF00 : EOR.w #$FFFF LDA $A4 : ORA.w #$FF00 : EOR.w #$FFFF
.setFloorIndicatorNumber .setFloorIndicatorNumber
ASL A : TAY ASL A : TAY

View File

@@ -1,7 +1,5 @@
; ============================== ; ==============================
; RAM in Use ; RAM in Use
StoryState = $7C
org $008000 org $008000
base $7E0730 base $7E0730