Shield witch parachute added

Only for test.
Now all players has active Shield with energy (99) and witch parachute before game.
Alo added display name of active defensive weapon on statusbar, and some fixes.
This commit is contained in:
Pecusx
2022-06-09 09:46:09 +02:00
parent eace9eb5cf
commit 91b613f166
7 changed files with 60 additions and 16 deletions
+2 -2
View File
@@ -861,7 +861,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"----------------" ; 44 dta d"----------------" ; 44
dta d"----------------" ; 45 dta d"----------------" ; 45
dta d"----------------" ; 46 dta d"----------------" ; 46
dta d"----------------" ; 47 dta d" " ; 47 ; special (no weapon) name for simplify display
dta d"Heat Guidance " ; 48 ($30) dta d"Heat Guidance " ; 48 ($30)
dta d"Bal Guidance " ; 49 dta d"Bal Guidance " ; 49
@@ -872,7 +872,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Battery " ; 54 dta d"Battery " ; 54
dta d"Mag Deflector " ; 55 dta d"Mag Deflector " ; 55
dta d"Shield " ; 56 - shield for one shot dta d"Shield " ; 56 - shield for one shot
dta d"Force Shield " ; 57 dta d"Force Shield " ; 57 - shield with energy and parachute
dta d"Heavy Shield " ; 58 - shield with energy dta d"Heavy Shield " ; 58 - shield with energy
dta d"Super Mag " ; 59 dta d"Super Mag " ; 59
dta d"Auto Defense " ; 60 dta d"Auto Defense " ; 60
+4 -2
View File
@@ -695,9 +695,11 @@ NoPlayerMissile
; draw defensive weapons like shield ( tank number in X ) ; draw defensive weapons like shield ( tank number in X )
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char ; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
cmp #56 ; check one shot shield activation cmp #56 ; one shot shield activation
beq ShieldDraw beq ShieldDraw
cmp #58 ; check shield with energy activation cmp #57 ; shield with energy and parachute activation
beq ShieldDraw
cmp #58 ; shield with energy activation
bne NoShieldDraw bne NoShieldDraw
ShieldDraw ShieldDraw
jsr DrawTankShield.DrawInPosition jsr DrawTankShield.DrawInPosition
+2 -2
View File
@@ -129,11 +129,11 @@ START
jsr RandomizeSequence jsr RandomizeSequence
; for the round #1 shooting sequence is random ; for the round #1 shooting sequence is random
; activate shield with energy for all players (test) ; activate shield with energy and parachute for all players (test)
ldx numberOfPlayers ldx numberOfPlayers
dex dex
@ @
mva #58 ActiveDefenceWeapon,x mva #57 ActiveDefenceWeapon,x
mva #99 ShieldEnergy,x ; set energy of shield mva #99 ShieldEnergy,x ; set energy of shield
dex dex
bpl @- bpl @-
BIN
View File
Binary file not shown.
+39 -8
View File
@@ -1690,8 +1690,6 @@ FinishResultDisplay
bpl @- bpl @-
adw temp #NamesOfWeapons adw temp #NamesOfWeapons
ldy #6 ; from 6th character
ldy #15 ldy #15
@ @
lda (temp),y lda (temp),y
@@ -1699,6 +1697,39 @@ FinishResultDisplay
dey dey
bpl @- bpl @-
;---------------------
;displaying name of the defence weapon (if active)
;---------------------
lda #$08 ; (
sta textbuffer+80+22
lda #$09 ; )
sta textbuffer+80+39
lda ActiveDefenceWeapon,x
bne ActiveDefence
; clear brackets
lda #$00 ; space
sta textbuffer+80+22
sta textbuffer+80+39
lda #47 ; no weapon name
ActiveDefence
sta temp ;get back number of the weapon
mva #0 temp+1
; times 16 (because this is length of weapon name)
ldy #3 ; shift left 4 times
@
aslw temp
dey
bpl @-
adw temp #NamesOfWeapons
ldy #15
@
lda (temp),y
sta textbuffer+40+40+23,y
dey
bpl @-
;--------------------- ;---------------------
;displaying the energy of a tank ;displaying the energy of a tank
;--------------------- ;---------------------
@@ -1785,9 +1816,9 @@ AngleDisplay
lda Wind+3 ; highest byte of 4 byte wind lda Wind+3 ; highest byte of 4 byte wind
bmi DisplayLeftWind bmi DisplayLeftWind
lda #$7f ; (tab) char lda #$7f ; (tab) char
sta textbuffer+80+28 sta textbuffer+80+20
lda #0 ;space lda #0 ;space
sta textbuffer+80+25 sta textbuffer+80+17
beq DisplayWindValue beq DisplayWindValue
DisplayLeftWind DisplayLeftWind
sec ; Wind = -Wind sec ; Wind = -Wind
@@ -1798,14 +1829,14 @@ DisplayLeftWind
sbc temp+1 sbc temp+1
sta temp+1 sta temp+1
lda #$7e ;(del) char lda #$7e ;(del) char
sta textbuffer+80+25 sta textbuffer+80+17
lda #0 ;space lda #0 ;space
sta textbuffer+80+28 sta textbuffer+80+20
DisplayWindValue DisplayWindValue
:4 lsrw temp ;divide by 16 to have a nice value on a screen :4 lsrw temp ;divide by 16 to have a nice value on a screen
lda temp lda temp
sta decimal sta decimal
mwa #textbuffer+80+26 displayposition mwa #textbuffer+80+18 displayposition
jsr displaybyte jsr displaybyte
;========================= ;=========================
@@ -1813,7 +1844,7 @@ DisplayWindValue
;========================= ;=========================
lda CurrentRoundNr lda CurrentRoundNr
sta decimal sta decimal
mwa #textbuffer+80+14 displayposition mwa #textbuffer+80+7 displayposition
jsr displaybyte ;decimal (byte), displayposition (word) jsr displaybyte ;decimal (byte), displayposition (word)
rts rts
+12 -1
View File
@@ -669,6 +669,8 @@ DistanceCheckLoop
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
cmp #56 ; one hit shield cmp #56 ; one hit shield
beq UseShield beq UseShield
cmp #57 ; shield with energy and parachute
beq UseShieldWithEnergy
cmp #58 ; shield with energy cmp #58 ; shield with energy
beq UseShieldWithEnergy beq UseShieldWithEnergy
jsr DecreaseEnergyX jsr DecreaseEnergyX
@@ -1321,8 +1323,11 @@ ShotUnderGround
; let's check if the given tank has got the parachute ; let's check if the given tank has got the parachute
ldx TankNr ldx TankNr
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
cmp #$35 ; parachute cmp #53 ; parachute
beq ParachuteActive
cmp #57 ; scheld witch energy and parachute
bne TankFallsX bne TankFallsX
ParachuteActive
inc Parachute inc Parachute
TankFallsX TankFallsX
; coordinates of the first pixel under the tank ; coordinates of the first pixel under the tank
@@ -1524,7 +1529,11 @@ EndOfFall
; first we clear parachute on the screen ; first we clear parachute on the screen
mva #1 Erase mva #1 Erase
ldx TankNr ldx TankNr
lda ActiveDefenceWeapon,x
cmp #53 ; deactivate weapon only if parachute (53)
bne NoParachuteWeapon
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute) mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
NoParachuteWeapon
lda #$34 lda #$34
sta CharCode sta CharCode
lda Ytankstable,x lda Ytankstable,x
@@ -1537,6 +1546,8 @@ EndOfFall
sta xdraw+1 sta xdraw+1
jsr TypeChar jsr TypeChar
mva #0 Erase mva #0 Erase
ldx TankNr
jsr DrawTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
ThereWasNoParachute ThereWasNoParachute
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
rts rts