mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
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:
+2
-2
@@ -861,7 +861,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"----------------" ; 44
|
||||
dta d"----------------" ; 45
|
||||
dta d"----------------" ; 46
|
||||
dta d"----------------" ; 47
|
||||
dta d" " ; 47 ; special (no weapon) name for simplify display
|
||||
|
||||
dta d"Heat Guidance " ; 48 ($30)
|
||||
dta d"Bal Guidance " ; 49
|
||||
@@ -872,7 +872,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"Battery " ; 54
|
||||
dta d"Mag Deflector " ; 55
|
||||
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"Super Mag " ; 59
|
||||
dta d"Auto Defense " ; 60
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ textbuffer
|
||||
; 0123456789012345678901234567890123456789
|
||||
dta d"Player: "
|
||||
dta d"Energy: Angle: Force: "
|
||||
dta d" Round: Wind: "
|
||||
dta d"Round: Wind: "
|
||||
textbuffer2
|
||||
dta d"Player: Cash: "
|
||||
dta d"----------------------------------------"
|
||||
|
||||
+4
-2
@@ -695,9 +695,11 @@ NoPlayerMissile
|
||||
; draw defensive weapons like shield ( tank number in X )
|
||||
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #56 ; check one shot shield activation
|
||||
cmp #56 ; one shot shield activation
|
||||
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
|
||||
ShieldDraw
|
||||
jsr DrawTankShield.DrawInPosition
|
||||
|
||||
+2
-2
@@ -129,11 +129,11 @@ START
|
||||
jsr RandomizeSequence
|
||||
; 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
|
||||
dex
|
||||
@
|
||||
mva #58 ActiveDefenceWeapon,x
|
||||
mva #57 ActiveDefenceWeapon,x
|
||||
mva #99 ShieldEnergy,x ; set energy of shield
|
||||
dex
|
||||
bpl @-
|
||||
|
||||
BIN
Binary file not shown.
+39
-8
@@ -1690,8 +1690,6 @@ FinishResultDisplay
|
||||
bpl @-
|
||||
|
||||
adw temp #NamesOfWeapons
|
||||
ldy #6 ; from 6th character
|
||||
|
||||
ldy #15
|
||||
@
|
||||
lda (temp),y
|
||||
@@ -1699,6 +1697,39 @@ FinishResultDisplay
|
||||
dey
|
||||
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
|
||||
;---------------------
|
||||
@@ -1785,9 +1816,9 @@ AngleDisplay
|
||||
lda Wind+3 ; highest byte of 4 byte wind
|
||||
bmi DisplayLeftWind
|
||||
lda #$7f ; (tab) char
|
||||
sta textbuffer+80+28
|
||||
sta textbuffer+80+20
|
||||
lda #0 ;space
|
||||
sta textbuffer+80+25
|
||||
sta textbuffer+80+17
|
||||
beq DisplayWindValue
|
||||
DisplayLeftWind
|
||||
sec ; Wind = -Wind
|
||||
@@ -1798,14 +1829,14 @@ DisplayLeftWind
|
||||
sbc temp+1
|
||||
sta temp+1
|
||||
lda #$7e ;(del) char
|
||||
sta textbuffer+80+25
|
||||
sta textbuffer+80+17
|
||||
lda #0 ;space
|
||||
sta textbuffer+80+28
|
||||
sta textbuffer+80+20
|
||||
DisplayWindValue
|
||||
:4 lsrw temp ;divide by 16 to have a nice value on a screen
|
||||
lda temp
|
||||
sta decimal
|
||||
mwa #textbuffer+80+26 displayposition
|
||||
mwa #textbuffer+80+18 displayposition
|
||||
jsr displaybyte
|
||||
|
||||
;=========================
|
||||
@@ -1813,7 +1844,7 @@ DisplayWindValue
|
||||
;=========================
|
||||
lda CurrentRoundNr
|
||||
sta decimal
|
||||
mwa #textbuffer+80+14 displayposition
|
||||
mwa #textbuffer+80+7 displayposition
|
||||
jsr displaybyte ;decimal (byte), displayposition (word)
|
||||
|
||||
rts
|
||||
|
||||
+12
-1
@@ -669,6 +669,8 @@ DistanceCheckLoop
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #56 ; one hit shield
|
||||
beq UseShield
|
||||
cmp #57 ; shield with energy and parachute
|
||||
beq UseShieldWithEnergy
|
||||
cmp #58 ; shield with energy
|
||||
beq UseShieldWithEnergy
|
||||
jsr DecreaseEnergyX
|
||||
@@ -1321,8 +1323,11 @@ ShotUnderGround
|
||||
; let's check if the given tank has got the parachute
|
||||
ldx TankNr
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #$35 ; parachute
|
||||
cmp #53 ; parachute
|
||||
beq ParachuteActive
|
||||
cmp #57 ; scheld witch energy and parachute
|
||||
bne TankFallsX
|
||||
ParachuteActive
|
||||
inc Parachute
|
||||
TankFallsX
|
||||
; coordinates of the first pixel under the tank
|
||||
@@ -1524,7 +1529,11 @@ EndOfFall
|
||||
; first we clear parachute on the screen
|
||||
mva #1 Erase
|
||||
ldx TankNr
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #53 ; deactivate weapon only if parachute (53)
|
||||
bne NoParachuteWeapon
|
||||
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
|
||||
NoParachuteWeapon
|
||||
lda #$34
|
||||
sta CharCode
|
||||
lda Ytankstable,x
|
||||
@@ -1537,6 +1546,8 @@ EndOfFall
|
||||
sta xdraw+1
|
||||
jsr TypeChar
|
||||
mva #0 Erase
|
||||
ldx TankNr
|
||||
jsr DrawTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
|
||||
ThereWasNoParachute
|
||||
mva #sfx_silencer sfx_effect
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user