mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
It works!
This commit is contained in:
@@ -402,7 +402,6 @@ ManualShooting
|
|||||||
lda #%00000000
|
lda #%00000000
|
||||||
sta TestFlightFlag ; set "Test Fight" off
|
sta TestFlightFlag ; set "Test Fight" off
|
||||||
jsr BeforeFire
|
jsr BeforeFire
|
||||||
mva #$00 FastKeyRead
|
|
||||||
bit escFlag
|
bit escFlag
|
||||||
spl:rts ; keys Esc or O
|
spl:rts ; keys Esc or O
|
||||||
|
|
||||||
|
|||||||
+19
-11
@@ -54,9 +54,8 @@ AdditionalZPvariables = $20
|
|||||||
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
|
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
|
||||||
|
|
||||||
|
|
||||||
FirstZpageVariable = $4f
|
FirstZpageVariable = $50
|
||||||
.zpvar DliColorBack .byte = FirstZpageVariable
|
.zpvar DliColorBack .byte = FirstZpageVariable
|
||||||
.zpvar FastKeyRead .byte ; 0 - GetKey wait for any key (and generates SFX), $ff - fast GetKey
|
|
||||||
.zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky
|
.zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky
|
||||||
.zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks
|
.zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks
|
||||||
.zpvar GradientNr .byte
|
.zpvar GradientNr .byte
|
||||||
@@ -405,7 +404,7 @@ NoRMT_PALchange
|
|||||||
sta JoystickNumber
|
sta JoystickNumber
|
||||||
.IF TARGET = 800 ; second joy button state update only on A800
|
.IF TARGET = 800 ; second joy button state update only on A800
|
||||||
jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI
|
jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI
|
||||||
jmp GetKey.Check2button ; update state second joy button
|
jmp GetKeyFast.Check2button ; update state second joy button
|
||||||
.ELSE
|
.ELSE
|
||||||
rts
|
rts
|
||||||
.ENDIF
|
.ENDIF
|
||||||
@@ -419,6 +418,21 @@ NoRMT_PALchange
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
getKeyAfterWait
|
getKeyAfterWait
|
||||||
|
jsr GetKeyFast
|
||||||
|
cmp #@kbcode._none
|
||||||
|
beq getKeyAfterWait
|
||||||
|
ldy #0
|
||||||
|
sty ATRACT ; reset atract mode
|
||||||
|
mvy #sfx_keyclick sfx_effect
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc GetKeyFast
|
||||||
|
; returns pressed value in A - no waits for press
|
||||||
|
; when [ESC] is pressed, escFlag is set
|
||||||
|
; result: A=keycode ($ff - no key pressed)
|
||||||
|
;--------------------------------------------------
|
||||||
.IF TARGET = 800
|
.IF TARGET = 800
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
@@ -471,8 +485,6 @@ checkSelectKey
|
|||||||
lda CONSOL
|
lda CONSOL
|
||||||
and #%00000100 ; Option
|
and #%00000100 ; Option
|
||||||
.ENDIF
|
.ENDIF
|
||||||
bit FastKeyRead
|
|
||||||
bpl getKeyAfterWait
|
|
||||||
lda #@kbcode._none
|
lda #@kbcode._none
|
||||||
bne getkeyend
|
bne getkeyend
|
||||||
OptionPressed
|
OptionPressed
|
||||||
@@ -485,12 +497,8 @@ SelectPressed
|
|||||||
JoyButton
|
JoyButton
|
||||||
lda #@kbcode._ret ; Return key
|
lda #@kbcode._ret ; Return key
|
||||||
getkeyend
|
getkeyend
|
||||||
ldy #0
|
rts
|
||||||
sty ATRACT ; reset atract mode
|
; ----
|
||||||
bit FastKeyRead
|
|
||||||
bmi @+
|
|
||||||
mvy #sfx_keyclick sfx_effect
|
|
||||||
@ rts
|
|
||||||
.IF TARGET = 800 ; Second joy button only on A800
|
.IF TARGET = 800 ; Second joy button only on A800
|
||||||
Check2button
|
Check2button
|
||||||
lda PADDL0
|
lda PADDL0
|
||||||
|
|||||||
BIN
Binary file not shown.
+12
-2
@@ -253,8 +253,18 @@ StartAfterSplash
|
|||||||
; result: A=keycode
|
; result: A=keycode
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
lda #0
|
jsr GetKeyFast
|
||||||
sta escFlag
|
ldy #0
|
||||||
|
sty escFlag
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc GetKeyFast
|
||||||
|
; returns pressed value in A - no wait for press
|
||||||
|
; when [ESC] is pressed, escFlag is set
|
||||||
|
; result: A=keycode
|
||||||
|
;--------------------------------------------------
|
||||||
lda #$ff
|
lda #$ff
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|||||||
Binary file not shown.
+2
-7
@@ -1220,12 +1220,9 @@ ContinueToCheckMaxForce2
|
|||||||
; $f3 - shift+key
|
; $f3 - shift+key
|
||||||
|
|
||||||
notpressed
|
notpressed
|
||||||
mva #$00 FastKeyRead
|
|
||||||
|
|
||||||
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
|
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
|
||||||
spl:rts ; exit if pressed 'Exit keys'
|
spl:rts ; exit if pressed 'Exit keys'
|
||||||
|
|
||||||
mva #$ff FastKeyRead
|
|
||||||
ldx TankNr ; for optimize
|
ldx TankNr ; for optimize
|
||||||
; Select and Option
|
; Select and Option
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
@@ -1235,7 +1232,7 @@ notpressed
|
|||||||
tya
|
tya
|
||||||
and #%00000010
|
and #%00000010
|
||||||
jeq pressedTAB ; Select key
|
jeq pressedTAB ; Select key
|
||||||
jsr GetKey.getKeyAfterWait
|
jsr GetKeyFast
|
||||||
and #%10111111 ; SHIFT elimination
|
and #%10111111 ; SHIFT elimination
|
||||||
|
|
||||||
cmp #@kbcode._A ; $3f ; A
|
cmp #@kbcode._A ; $3f ; A
|
||||||
@@ -1243,7 +1240,6 @@ notpressed
|
|||||||
callActivation
|
callActivation
|
||||||
; Hide all tanks - after inventory they may have other shapes
|
; Hide all tanks - after inventory they may have other shapes
|
||||||
jsr ClearTanks
|
jsr ClearTanks
|
||||||
mva #$00 FastKeyRead
|
|
||||||
jsr DefensivesActivate
|
jsr DefensivesActivate
|
||||||
jmp afterInventory
|
jmp afterInventory
|
||||||
|
|
||||||
@@ -1255,7 +1251,6 @@ callInventory
|
|||||||
jsr ClearTanks
|
jsr ClearTanks
|
||||||
;
|
;
|
||||||
mva #$ff isInventory
|
mva #$ff isInventory
|
||||||
mva #$00 FastKeyRead
|
|
||||||
jsr Purchase
|
jsr Purchase
|
||||||
afterInventory
|
afterInventory
|
||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
@@ -2734,7 +2729,7 @@ notpressed
|
|||||||
jsr DrawTankEngine
|
jsr DrawTankEngine
|
||||||
; enimation ends
|
; enimation ends
|
||||||
|
|
||||||
jsr GetKey.getKeyAfterWait
|
jsr GetKeyFast
|
||||||
cmp #@kbcode._left ; $6
|
cmp #@kbcode._left ; $6
|
||||||
jeq pressedLeft
|
jeq pressedLeft
|
||||||
cmp #@kbcode._right ; $7
|
cmp #@kbcode._right ; $7
|
||||||
|
|||||||
Reference in New Issue
Block a user