Press O to Game Over and small bugfix

This commit is contained in:
Pecusx
2022-08-12 13:40:04 +02:00
parent 2820f66467
commit 710570ae8a
5 changed files with 35 additions and 24 deletions
+12 -10
View File
@@ -175,14 +175,14 @@ START
jsr Options ;startup screen
mva #0 dmactls ; dark screen
jsr WaitOneFrame
lda escFlag
bne START
bit escFlag
bmi START
jsr EnterPlayerNames
mva #0 dmactls ; dark screen
jsr WaitOneFrame
lda escFlag
bne START
bit escFlag
bmi START
jsr RandomizeSequence
; for the round #1 shooting sequence is random
@@ -199,8 +199,9 @@ MainGameLoop
jsr RoundInit
jsr MainRoundLoop
lda escFlag
bne START
bit escFlag
bmi START
jvs GoGameOver
mva #0 TankNr ;
@@ -316,6 +317,7 @@ eskipzeroing
lda GameIsOver
beq NoGameOverYet
GoGameOver
mva #0 dmactls ; dark screen
jsr WaitOneFrame
jsr GameOverScreen
@@ -514,8 +516,8 @@ RoboTanks
cmp #28 ; ESC
bne @+
jsr AreYouSure
lda escFlag
seq:rts
bit escFlag
spl:rts
@
jmp AfterManualShooting
@@ -525,7 +527,7 @@ ManualShooting
jsr WaitForKeyRelease
jsr BeforeFire
lda escFlag
seq:rts
seq:rts ; keys Esc or O
AfterManualShooting
mva #0 plot4x4color
@@ -1459,7 +1461,7 @@ nextishigher
and #$3f ;CTRL and SHIFT ellimination
cmp #28 ; ESC
bne getkeyend
mvx #1 escFlag
mvx #$80 escFlag
bne getkeyend
checkJoyGetKey
BIN
View File
Binary file not shown.
+11 -11
View File
@@ -63,8 +63,8 @@
OptionsMainLoop
jsr OptionsInversion
jsr getkey
ldx escFlag
seq:rts
bit escFlag
spl:rts
cmp #$f ;cursor down
bne OptionsNoDown
@@ -255,7 +255,7 @@ OptionsYLoop
ManualPurchase
jsr Purchase
ldx escFlag
seq:rts
spl:rts
AfterManualPurchase
inc:lda TankNr
@@ -658,8 +658,8 @@ ChoosingItemForPurchase
jsr PutLitteChar ; Places pointer at the right position
jsr getkey
ldx escFlag
seq:jmp WaitForKeyRelease ; like jsr ... : rts
bit escFlag
spl:jmp WaitForKeyRelease ; like jsr ... : rts
cmp #$2c ; Tab
jeq ListChange
cmp #$06 ; cursor left
@@ -1025,8 +1025,8 @@ NoArrowDown
lda TankStatusColoursTable,x
sta colpf2s ; set color of player name line
jsr EnterPlayerName
lda escFlag
seq:rts
bit escFlag
spl:rts
inc TankNr
lda TankNr
cmp NumberOfPlayers
@@ -1085,8 +1085,8 @@ endOfTankName
CheckKeys
jsr getkey
ldx escFlag
seq:rts
bit escFlag
spl:rts
; is the char to be recorded?
ldx #keycodesEnd-keycodes ;table was 38 chars long
@@ -1614,11 +1614,11 @@ EndOfTypeLine4x4
jsr GetKey
cmp #$2b ; "Y"
bne @+
mva #1 escFlag
mva #$80 escFlag
bne skip01
@ mva #0 escFlag
jsr WaitForKeyRelease
skip01
jsr WaitForKeyRelease
;clean
mva #3 di
+1 -1
View File
@@ -352,7 +352,7 @@ TankTempY
;----------------------------------------------------
singleRoundVars
;--------------
escFlag .ds 1
escFlag .ds 1 ; 0 - Esc or O not pressed, $80 - Esc pressed, $40 - O pressed
;--------------
CurrentResult
.DS 1
+11 -2
View File
@@ -1191,11 +1191,20 @@ notpressed
lda kbcode
and #%10111111 ; SHIFT elimination
cmp #$08 ; O
bne @+
jsr AreYouSure
bit escFlag
bpl notpressed
;---O pressed-quit game to game over screen---
mva #$40 escFlag
rts
@
cmp #28 ; ESC
bne @+
jsr AreYouSure
lda escFlag
beq notpressed
bit escFlag
bpl notpressed
;---esc pressed-quit game---
rts