new timer mode to end the game when the timer ends

This commit is contained in:
sporchia
2018-03-21 23:05:42 -04:00
parent 72bae672e8
commit 3dfa5e7be9
2 changed files with 16 additions and 11 deletions

View File

@@ -847,7 +847,7 @@ org $308190 ; PC 0x180190 - 0x180192
TimerStyle: TimerStyle:
db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch
TimeoutBehavior: TimeoutBehavior:
db #$00 ; #$00 = DNF (Default) - #$01 = Sign Change (Requires TimerRestart == 1) - #$02 = OHKO db #$00 ; #$00 = DNF (Default) - #$01 = Sign Change (Requires TimerRestart == 1) - #$02 = OHKO - #$03 = End Game
TimerRestart: TimerRestart:
db #$00 ; #$00 = Locked (Default) - #$01 = Restart db #$00 ; #$00 = Locked (Default) - #$01 = Restart
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -75,11 +75,16 @@ CalculateTimer:
LDA.l !CLOCK_TEMPORARY+2 : EOR.w #$FFFF : ADC.w #$0000 : STA.l !CLOCK_TEMPORARY+2 LDA.l !CLOCK_TEMPORARY+2 : EOR.w #$FFFF : ADC.w #$0000 : STA.l !CLOCK_TEMPORARY+2
LDA.w #$0001 : STA.l !Status ; Set Negative Mode LDA.w #$0001 : STA.l !Status ; Set Negative Mode
BRA .prepDigits BRA .prepDigits
++ ; OHKO ++ CMP.w #$0002 : BNE ++ ; OHKO
LDA.w #$0002 : STA.l !Status ; Set DNF Mode LDA.w #$0002 : STA.l !Status ; Set DNF Mode
LDA.l !BaseTimer : STA.l !ChallengeTimer LDA.l !BaseTimer : STA.l !ChallengeTimer
LDA.l !BaseTimer+2 : STA.l !ChallengeTimer+2 LDA.l !BaseTimer+2 : STA.l !ChallengeTimer+2
RTS RTS
++ ; End Game
SEP #$30
JSL.l ActivateGoal
REP #$30
RTS
+ +
LDA.l TimerRestart : AND.w #$00FF : BEQ + LDA.l TimerRestart : AND.w #$00FF : BEQ +