Preparing to enter name of tank with joystick.
This commit is contained in:
BIN
Binary file not shown.
+36
-3
@@ -1110,10 +1110,14 @@ LastNameChar
|
|||||||
|
|
||||||
lda #$80 ; place cursor on the end
|
lda #$80 ; place cursor on the end
|
||||||
sta NameAdr,y
|
sta NameAdr,y
|
||||||
|
cpy #8
|
||||||
|
bne @+
|
||||||
dey
|
dey
|
||||||
bpl @+
|
@ sty PositionInName
|
||||||
iny ; if old name is empty or first time entering
|
; dey
|
||||||
@ sty PositionInName
|
; bpl @+
|
||||||
|
; iny ; if old name is empty or first time entering
|
||||||
|
;@ sty PositionInName
|
||||||
|
|
||||||
|
|
||||||
CheckKeys
|
CheckKeys
|
||||||
@@ -1213,6 +1217,15 @@ ChangeOfLevel3Down
|
|||||||
jmp CheckKeys
|
jmp CheckKeys
|
||||||
;----
|
;----
|
||||||
EndOfNick
|
EndOfNick
|
||||||
|
; now check long press joy button (or Return...)
|
||||||
|
mva #0 pressTimer ; reset
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
lda pressTimer
|
||||||
|
cmp #25 ; 1/2s
|
||||||
|
bcc NotLongPress
|
||||||
|
jsr EnterNameByJoy
|
||||||
|
jmp CheckKeys
|
||||||
|
NotLongPress
|
||||||
; storing name of the player and its level
|
; storing name of the player and its level
|
||||||
|
|
||||||
; level of the computer opponent goes to
|
; level of the computer opponent goes to
|
||||||
@@ -1263,6 +1276,26 @@ nextchar05
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
.proc EnterNameByJoy
|
||||||
|
checkjoy
|
||||||
|
lda STICK0
|
||||||
|
and #$0f
|
||||||
|
cmp #$0f
|
||||||
|
bne JoyNotCentered
|
||||||
|
|
||||||
|
notpressedJoy
|
||||||
|
;fire
|
||||||
|
lda STRIG0
|
||||||
|
beq checkjoy ; fire still pressed
|
||||||
|
rts
|
||||||
|
|
||||||
|
JoyNotCentered
|
||||||
|
; this is a place for code :)
|
||||||
|
|
||||||
|
|
||||||
|
jmp checkjoy
|
||||||
|
|
||||||
|
.endp
|
||||||
|
|
||||||
.proc HighlightLevel
|
.proc HighlightLevel
|
||||||
; this routine highlights the choosen
|
; this routine highlights the choosen
|
||||||
|
|||||||
Reference in New Issue
Block a user