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