Initial support for tank shapes selection.

This commit is contained in:
Pecusx
2022-11-25 20:48:20 +01:00
parent 8013246d3b
commit 9c912d4cc7
7 changed files with 36 additions and 6 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ OptionsScreenEnd
;-----------------------------------------------
NameScreen2
dta d" Tank 1 * 1 Name:"
dta d" Tank 1 * 1/1 Name:"
NameAdr
dta d" "
NameScreen4
+3 -1
View File
@@ -638,8 +638,10 @@ No6thTankHide
jmp DoNotDrawTankNr
SkipHidingPM
lda TankShape,x
tax
ldy TankShapesTable,x
ldx TankNr
lda AngleTable,x
cmp #91 ; left or right tank shape
bcs LeftTank
+9
View File
@@ -1109,6 +1109,15 @@ deletePtr = temp
cpw deletePtr #variablesEnd
bne @-
; ser initial shapes for each tank (tanks 0-5 has shape 0 now)
ldy #1
sty TankShape+1
sty TankShape+4
iny
sty TankShape+2
sty TankShape+5
mwa #1024 RandBoundaryHigh
mva #$ff LastWeapon
sta HowMuchToFall
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+20 -3
View File
@@ -1162,9 +1162,13 @@ LastNameChar
CheckKeys
ldx TankNr
lda JoyNumber,x
tax
lda digits+1,x
sta NameScreen2+12
tay
lda digits+1,y
sta NameScreen2+12 ; display joystick port number
lda TankShape,x
tay
lda digits+1,y
sta NameScreen2+14 ; display tank shape number
jsr CursorDisplay
jsr getkey
bit escFlag
@@ -1223,13 +1227,16 @@ FirstChar
lda #0
sta NameAdr,x
jmp CheckKeys
;----
ChangeOfJoyUp
ldx TankNr
inc JoyNumber,x
lda JoyNumber,x
and #%00000011 ; max 4 joysticks
sta JoyNumber,x
beq ChangeOfShapeUp ; change tank shape
jmp CheckKeys
;----
ChangeOfLevelUp ; change difficulty level of computer opponent
inc:lda DifficultyLevel
cmp #9 ; 9 levels are possible
@@ -1267,6 +1274,16 @@ ChangeOfLevel3Down
jsr HighlightLevel
jmp CheckKeys
;----
ChangeOfShapeUp
ldx TankNr
inc TankShape,x
lda TankShape,x
cmp #$03
bne @+
lda #$00
sta TankShape,x
@ jmp CheckKeys
;----
EndOfNick
; now check long press joy button (or Return...)
mva #0 pressTimer ; reset
+3 -1
View File
@@ -159,7 +159,9 @@ 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)
JoyNumber ; Joystick port number (from 0 to 3)
.DS MaxPlayers
TankShape ; Tank shape number (from 0 to 2)
.DS MaxPlayers
;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines)