mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Quick exit reaction
This commit is contained in:
+42
@@ -556,8 +556,50 @@ MakeDarkScreen
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc CheckExitKeys
|
||||||
|
;--------------------------------------------------
|
||||||
|
; Checks keyboard and sets appropriate flags for exit procedures
|
||||||
|
; If START+OPTION is pressed - exit to GameOver screen
|
||||||
|
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
|
||||||
|
; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen
|
||||||
|
; Just setting the right flags!!!
|
||||||
|
|
||||||
|
; Select and Option
|
||||||
|
lda CONSOL
|
||||||
|
and #%00000101 ; Start + Option
|
||||||
|
beq QuitToGameover
|
||||||
|
lda SKSTAT
|
||||||
|
cmp #$ff
|
||||||
|
jeq nokeys
|
||||||
|
cmp #$f7 ; SHIFT
|
||||||
|
jeq nokeys
|
||||||
|
|
||||||
|
lda kbcode
|
||||||
|
and #%10111111 ; SHIFT elimination
|
||||||
|
|
||||||
|
cmp #@kbcode._O ; $08 ; O
|
||||||
|
bne CheckEsc
|
||||||
|
jsr AreYouSure
|
||||||
|
bit escFlag
|
||||||
|
bpl nokeys
|
||||||
|
;---O pressed-quit game to game over screen---
|
||||||
|
QuitToGameover
|
||||||
|
mva #$40 escFlag
|
||||||
|
rts
|
||||||
|
CheckEsc
|
||||||
|
cmp #@kbcode._esc ; 28 ; ESC
|
||||||
|
bne nokeys
|
||||||
|
DisplayAreYouSure
|
||||||
|
jsr AreYouSure
|
||||||
|
;---esc pressed-quit game---
|
||||||
|
nokeys
|
||||||
|
rts
|
||||||
|
;
|
||||||
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc ShellDelay
|
.proc ShellDelay
|
||||||
|
;--------------------------------------------------
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
and #%00000101 ; Start + Option
|
and #%00000101 ; Start + Option
|
||||||
bne @+
|
bne @+
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -317,6 +317,18 @@ MakeDarkScreen
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc CheckExitKeys
|
||||||
|
;--------------------------------------------------
|
||||||
|
; Checks keyboard and sets appropriate flags for exit procedures
|
||||||
|
; If START+OPTION is pressed - exit to GameOver screen
|
||||||
|
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
|
||||||
|
; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen
|
||||||
|
; Just setting the right flags!!!
|
||||||
|
|
||||||
|
rts
|
||||||
|
;
|
||||||
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc ShellDelay
|
.proc ShellDelay
|
||||||
ldx flyDelay
|
ldx flyDelay
|
||||||
|
|||||||
+29
-22
@@ -1098,13 +1098,17 @@ ContinueToCheckMaxForce2
|
|||||||
; $f3 - shift+key
|
; $f3 - shift+key
|
||||||
|
|
||||||
notpressed
|
notpressed
|
||||||
|
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
|
||||||
|
bit escFlag
|
||||||
|
bmi EscPressed
|
||||||
|
bvc OnotPressed
|
||||||
|
EscPressed
|
||||||
|
rts ; exit if pressed 'Exit keys'
|
||||||
|
OnotPressed
|
||||||
ldx TankNr ; for optimize
|
ldx TankNr ; for optimize
|
||||||
; Select and Option
|
; Select and Option
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
tay
|
tay
|
||||||
and #%00000101 ; Start + Option
|
|
||||||
beq QuitToGameover
|
|
||||||
tya
|
|
||||||
and #%00000100
|
and #%00000100
|
||||||
beq callActivation ; Option key
|
beq callActivation ; Option key
|
||||||
tya
|
tya
|
||||||
@@ -1119,24 +1123,6 @@ notpressed
|
|||||||
lda kbcode
|
lda kbcode
|
||||||
and #%10111111 ; SHIFT elimination
|
and #%10111111 ; SHIFT elimination
|
||||||
|
|
||||||
cmp #@kbcode._O ; $08 ; O
|
|
||||||
bne @+
|
|
||||||
jsr AreYouSure
|
|
||||||
bit escFlag
|
|
||||||
bpl notpressed
|
|
||||||
;---O pressed-quit game to game over screen---
|
|
||||||
QuitToGameover
|
|
||||||
mva #$40 escFlag
|
|
||||||
rts
|
|
||||||
@
|
|
||||||
cmp #@kbcode._esc ; 28 ; ESC
|
|
||||||
bne @+
|
|
||||||
jsr AreYouSure
|
|
||||||
bit escFlag
|
|
||||||
bpl notpressed
|
|
||||||
;---esc pressed-quit game---
|
|
||||||
rts
|
|
||||||
@
|
|
||||||
cmp #@kbcode._A ; $3f ; A
|
cmp #@kbcode._A ; $3f ; A
|
||||||
bne @+
|
bne @+
|
||||||
callActivation
|
callActivation
|
||||||
@@ -1779,7 +1765,16 @@ nolaserwait
|
|||||||
bne nowait ; funky bomb explotes fast ( tracerflag in real is funkyflag :) )
|
bne nowait ; funky bomb explotes fast ( tracerflag in real is funkyflag :) )
|
||||||
nonowait
|
nonowait
|
||||||
jsr shellDelay
|
jsr shellDelay
|
||||||
|
;
|
||||||
|
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
|
||||||
|
bit escFlag
|
||||||
|
bmi EscPressed
|
||||||
|
bvc OnotPressed
|
||||||
|
EscPressed
|
||||||
|
rts ; exit if pressed 'Exit keys'
|
||||||
|
OnotPressed
|
||||||
|
ldx TankNr
|
||||||
|
;
|
||||||
nowait
|
nowait
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
bne Hit
|
bne Hit
|
||||||
@@ -2113,6 +2108,18 @@ mrLoopi
|
|||||||
sta vy+3
|
sta vy+3
|
||||||
|
|
||||||
jsr ShellDelay
|
jsr ShellDelay
|
||||||
|
;
|
||||||
|
phx
|
||||||
|
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
|
||||||
|
bit escFlag
|
||||||
|
bmi EscPressed
|
||||||
|
bvc OnotPressed
|
||||||
|
EscPressed
|
||||||
|
plx
|
||||||
|
rts ; exit if pressed 'Exit keys'
|
||||||
|
OnotPressed
|
||||||
|
plx
|
||||||
|
;
|
||||||
|
|
||||||
MIRVdoNotChangeY
|
MIRVdoNotChangeY
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user