Prepare for more joysticks (test only)

This commit is contained in:
Pecusx
2022-11-18 15:45:17 +01:00
parent 7a97ff622d
commit 89b3834dc8
5 changed files with 16 additions and 7 deletions
Binary file not shown.
+2 -2
View File
@@ -29,9 +29,9 @@ OptionsScreenEnd
;-----------------------------------------------
NameScreen2
dta d" Tank 01 Name:"
dta d" Tank 1 * 1 Name:"
NameAdr
dta d" "
dta d" "
NameScreen4
dta d" "
NamesOfLevels
BIN
View File
Binary file not shown.
+12 -5
View File
@@ -1116,10 +1116,8 @@ NoArrowDown
ldx tanknr
lda skillTable,x
sta difficultyLevel
inx
stx decimal
mwa #(NameScreen2+9) displayposition
jsr displaybyte
lda digits+1,x
sta NameScreen2+7
jsr HighlightLevel ; setting choosen level of the opponent (Moron, etc)
; clear tank name editor field - not necessary
@@ -1160,6 +1158,11 @@ LastNameChar
CheckKeys
ldx TankNr
lda JoyNumber,x
tax
lda digits+1,x
sta NameScreen2+12
jsr CursorDisplay
jsr getkey
bit escFlag
@@ -1190,7 +1193,7 @@ CheckFurtherX01 ; here we check Tab, Return and Del
cmp #@kbcode._ret ; $0c ; Return
jeq EndOfNick
cmp #@kbcode._tab ; $2c ; Tab
beq ChangeOfLevelUp
beq ChangeOfJoyUp
cmp #@kbcode._right ; $7 ;cursor right
beq ChangeOfLevelUp
cmp #@kbcode._left ; $6 ;cursor left
@@ -1218,6 +1221,10 @@ FirstChar
lda #0
sta NameAdr,x
jmp CheckKeys
ChangeOfJoyUp
ldx TankNr
inc JoyNumber,x
jmp CheckKeys
ChangeOfLevelUp ; change difficulty level of computer opponent
inc:lda DifficultyLevel
cmp #9 ; 9 levels are possible
+2
View File
@@ -159,6 +159,8 @@ ytankstable ;Y positions of tanks (lower left point)
.DS MaxPlayers
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
.DS MaxPlayers
JoyNumber ; Joystick port number (from 0 to 3 or 1)
.DS MaxPlayers
;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines)
.DS 1