fix CheckIfNight logic, now activates between 6pm-6am instead of 0-6am

This commit is contained in:
scawful
2024-06-28 16:50:03 -04:00
parent 45f564b233
commit 054d6dee4c

View File

@@ -408,12 +408,12 @@ GlovesFix:
CheckIfNight: CheckIfNight:
{ {
LDA.l $7EF3C5 : CMP.b #$02 : BCC .day_time LDA.l $7EF3C5 : CMP.b #$02 : BCC .day_time
LDA $7EE000 : CMP.b #$12 : BCS .night_time
LDA $7EE000 : CMP.b #$06 : BCC .night_time LDA $7EE000 : CMP.b #$06 : BCC .night_time
.day_time .day_time
LDA.l $7EF3C5 LDA.l $7EF3C5
RTL RTL
.night_time .night_time
LDA $7EE000 : CMP.b #$12 : BCS .day_time
LDA.b #$03 LDA.b #$03
RTL RTL
} }
@@ -487,17 +487,17 @@ CheckIfNight16Bit:
{ {
; Don't change the spriteset during the intro sequence ; Don't change the spriteset during the intro sequence
LDA.l $7EF3C5 : AND.w #$00FF : CMP.w #$0002 : BCC .day_time LDA.l $7EF3C5 : AND.w #$00FF : CMP.w #$0002 : BCC .day_time
; If it's less than 6 am, jump to night time ; 0x12 = 18 hours or 6 pm
LDA $7EE000 : AND.w #$00FF : CMP.w #$0006 : BCC .night_time LDA $7EE000 : AND.w #$00FF : CMP.w #$0012 : BCS .night_time
; If it's less than 6 am, jump to night time
LDA $7EE000 : AND.w #$00FF : CMP.w #$0006 : BCC .night_time
.day_time .day_time
LDA.l $7EF3C5 LDA.l $7EF3C5
RTL RTL
.night_time .night_time
; 0x12 = 18 hours or 6 pm ; Load the gamestate 03 spritesets, but don't change the save ram
LDA $7EE000 : AND.w #$00FF : CMP.w #$0012 : BCS .day_time LDA.l $7EF3C5 : CLC : ADC #$0001
; Load the gamestate 03 spritesets, but don't change the save ram RTL
LDA.l $7EF3C5 : CLC : ADC #$0001
RTL
} }
FixSaveAndQuit: FixSaveAndQuit: