Strong Parachute (with energy) added!
and defensive (really all) weapons indexes (numbers) as constans.
This commit is contained in:
+7
-7
@@ -602,7 +602,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
|||||||
.by >price_Vert_Guidance__
|
.by >price_Vert_Guidance__
|
||||||
.by >price_Lazy_Boy_______
|
.by >price_Lazy_Boy_______
|
||||||
.by >price_Parachute______
|
.by >price_Parachute______
|
||||||
.by >price_Battery________
|
.by >price_StrongParachute
|
||||||
.by >price_Mag_Deflector__
|
.by >price_Mag_Deflector__
|
||||||
.by >price_Shield_________
|
.by >price_Shield_________
|
||||||
.by >price_Force_Shield___
|
.by >price_Force_Shield___
|
||||||
@@ -668,7 +668,7 @@ WeaponPriceL
|
|||||||
.by <price_Vert_Guidance__
|
.by <price_Vert_Guidance__
|
||||||
.by <price_Lazy_Boy_______
|
.by <price_Lazy_Boy_______
|
||||||
.by <price_Parachute______
|
.by <price_Parachute______
|
||||||
.by <price_Battery________
|
.by <price_StrongParachute
|
||||||
.by <price_Mag_Deflector__
|
.by <price_Mag_Deflector__
|
||||||
.by <price_Shield_________
|
.by <price_Shield_________
|
||||||
.by <price_Force_Shield___
|
.by <price_Force_Shield___
|
||||||
@@ -740,7 +740,7 @@ WeaponUnits
|
|||||||
.by 5 ;Vert_Guidance__
|
.by 5 ;Vert_Guidance__
|
||||||
.by 2 ;Lazy_Boy_______
|
.by 2 ;Lazy_Boy_______
|
||||||
.by 8 ;Parachute______
|
.by 8 ;Parachute______
|
||||||
.by 10 ;Battery________
|
.by 2 ;StrongParachute
|
||||||
.by 2 ;Mag_Deflector__
|
.by 2 ;Mag_Deflector__
|
||||||
.by 3 ;Shield_________
|
.by 3 ;Shield_________
|
||||||
.by 3 ;Force_Shield___
|
.by 3 ;Force_Shield___
|
||||||
@@ -811,7 +811,7 @@ WeaponSymbols
|
|||||||
.by $58,$59,$5a,$5b,$60,$7b,$7c,$7d
|
.by $58,$59,$5a,$5b,$60,$7b,$7c,$7d
|
||||||
.by $20,$00,$00,$00,$00,$00,$00,$00
|
.by $20,$00,$00,$00,$00,$00,$00,$00
|
||||||
.by $00,$00,$00,$00,$00,$00,$00,$00
|
.by $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
.by $5f,$02,$03,$06,$1d,$0a,$1b,$1c ; defensives
|
.by $5f,$02,$03,$06,$1d,$0a,$1b,$1b ; defensives
|
||||||
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$00
|
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$00
|
||||||
|
|
||||||
; Names of weapons (16 chars long)
|
; Names of weapons (16 chars long)
|
||||||
@@ -872,7 +872,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
|||||||
dta d"Vert Guidance " ; 52
|
dta d"Vert Guidance " ; 52
|
||||||
dta d"Lazy Boy " ; 53
|
dta d"Lazy Boy " ; 53
|
||||||
dta d"Parachute " ; 54 - no energy
|
dta d"Parachute " ; 54 - no energy
|
||||||
dta d"Battery " ; 55
|
dta d"Strong Parachute" ; 55 - with energy (earlier Battery)
|
||||||
dta d"Mag Deflector " ; 56 - with shield and energy
|
dta d"Mag Deflector " ; 56 - with shield and energy
|
||||||
dta d"Shield " ; 57 - shield for one shot - no energy
|
dta d"Shield " ; 57 - shield for one shot - no energy
|
||||||
dta d"Force Shield " ; 58 - shield with energy and parachute
|
dta d"Force Shield " ; 58 - shield with energy and parachute
|
||||||
@@ -889,8 +889,8 @@ DefensiveEnergy = * - 48
|
|||||||
.by 00 ; Vert Guidance
|
.by 00 ; Vert Guidance
|
||||||
.by 00 ; Lazy Boy
|
.by 00 ; Lazy Boy
|
||||||
.by 00 ; Parachute
|
.by 00 ; Parachute
|
||||||
.by 00 ; Battery
|
.by 99 ; Strong Parachute
|
||||||
.by 90 ; Mag Deflector
|
.by 99 ; Mag Deflector
|
||||||
.by 00 ; Shield
|
.by 00 ; Shield
|
||||||
.by 99 ; Force Shield
|
.by 99 ; Force Shield
|
||||||
.by 99 ; Heavy Shield
|
.by 99 ; Heavy Shield
|
||||||
|
|||||||
+66
-1
@@ -66,7 +66,7 @@ price_Horz_Guidance__ = $ffff ;_51
|
|||||||
price_Vert_Guidance__ = $ffff ;_52
|
price_Vert_Guidance__ = $ffff ;_52
|
||||||
price_Lazy_Boy_______ = $ffff ;_53
|
price_Lazy_Boy_______ = $ffff ;_53
|
||||||
price_Parachute______ = 234 ;_54
|
price_Parachute______ = 234 ;_54
|
||||||
price_Battery________ = $ffff ;_55
|
price_StrongParachute = 1000 ;_55
|
||||||
price_Mag_Deflector__ = 245 ;_56
|
price_Mag_Deflector__ = 245 ;_56
|
||||||
price_Shield_________ = 112 ;_57
|
price_Shield_________ = 112 ;_57
|
||||||
price_Force_Shield___ = 268 ;_58
|
price_Force_Shield___ = 268 ;_58
|
||||||
@@ -75,6 +75,71 @@ price_Super_Mag______ = $ffff ;_60
|
|||||||
price_Auto_Defense___ = 512 ;_61
|
price_Auto_Defense___ = 512 ;_61
|
||||||
price_Fuel_Tank______ = $ffff ;_62
|
price_Fuel_Tank______ = $ffff ;_62
|
||||||
price_Contact_Trigger = $ffff ;_63
|
price_Contact_Trigger = $ffff ;_63
|
||||||
|
;Weapon indexes (numbers)
|
||||||
|
ind_Baby_Missile___ = 0
|
||||||
|
ind_Missile________ = 1
|
||||||
|
ind_Baby_Nuke______ = 2
|
||||||
|
ind_Nuke___________ = 3
|
||||||
|
ind_LeapFrog_______ = 4
|
||||||
|
ind_Funky_Bomb_____ = 5
|
||||||
|
ind_MIRV___________ = 6
|
||||||
|
ind_Death_s_Head___ = 7
|
||||||
|
ind_Napalm_________ = 8
|
||||||
|
ind_Hot_Napalm_____ = 9
|
||||||
|
ind_Tracer_________ = 10
|
||||||
|
ind_Smoke_Tracer___ = 11
|
||||||
|
ind_Baby_Roller____ = 12
|
||||||
|
ind_Roller_________ = 13
|
||||||
|
ind_Heavy_Roller___ = 14
|
||||||
|
ind_Riot_Charge____ = 15
|
||||||
|
ind_Riot_Blast_____ = 16
|
||||||
|
ind_Riot_Bomb______ = 17
|
||||||
|
ind_Heavy_Riot_Bomb = 18
|
||||||
|
ind_Baby_Digger____ = 19
|
||||||
|
ind_Digger_________ = 20
|
||||||
|
ind_Heavy_Digger___ = 21
|
||||||
|
ind_Baby_Sandhog___ = 22
|
||||||
|
ind_Sandhog________ = 23
|
||||||
|
ind_Heavy_Sandhog__ = 24
|
||||||
|
ind_Dirt_Clod______ = 25
|
||||||
|
ind_Dirt_Ball______ = 26
|
||||||
|
ind_Ton_of_Dirt____ = 27
|
||||||
|
ind_Liquid_Dirt____ = 28
|
||||||
|
ind_Dirt_Charge____ = 29
|
||||||
|
ind_Earth_Disrupter = 30
|
||||||
|
ind_Plasma_Blast___ = 31
|
||||||
|
ind_Laser__________ = 32
|
||||||
|
ind______________33 = 0
|
||||||
|
ind______________34 = 0
|
||||||
|
ind______________35 = 0
|
||||||
|
ind______________36 = 0
|
||||||
|
ind______________37 = 0
|
||||||
|
ind______________38 = 0
|
||||||
|
ind______________39 = 0
|
||||||
|
ind______________40 = 0
|
||||||
|
ind______________41 = 0
|
||||||
|
ind______________42 = 0
|
||||||
|
ind______________43 = 0
|
||||||
|
ind______________44 = 0
|
||||||
|
ind______________45 = 0
|
||||||
|
ind______________46 = 0
|
||||||
|
ind______________47 = 0
|
||||||
|
ind_White_Flag_____ = 48
|
||||||
|
ind_Heat_Guidance__ = 49
|
||||||
|
ind_Bal_Guidance___ = 50
|
||||||
|
ind_Horz_Guidance__ = 51
|
||||||
|
ind_Vert_Guidance__ = 52
|
||||||
|
ind_Lazy_Boy_______ = 53
|
||||||
|
ind_Parachute______ = 54
|
||||||
|
ind_StrongParachute = 55
|
||||||
|
ind_Mag_Deflector__ = 56
|
||||||
|
ind_Shield_________ = 57
|
||||||
|
ind_Force_Shield___ = 58
|
||||||
|
ind_Heavy_Shield___ = 59
|
||||||
|
ind_Super_Mag______ = 60
|
||||||
|
ind_Auto_Defense___ = 61
|
||||||
|
ind_Fuel_Tank______ = 62
|
||||||
|
ind_Contact_Trigger = 63
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; names of RMT instruments (sfx)
|
; names of RMT instruments (sfx)
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|||||||
+5
-5
@@ -694,15 +694,15 @@ 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 #57 ; one shot shield activation
|
cmp #ind_Shield_________ ; one shot shield
|
||||||
beq ShieldDraw
|
beq ShieldDraw
|
||||||
cmp #58 ; shield with energy and parachute activation
|
cmp #ind_Force_Shield___ ; shield with energy and parachute
|
||||||
beq ShieldDraw
|
beq ShieldDraw
|
||||||
cmp #59 ; shield with energy activation
|
cmp #ind_Heavy_Shield___ ; shield with energy
|
||||||
beq ShieldDraw
|
beq ShieldDraw
|
||||||
cmp #61 ; Auto Defence
|
cmp #ind_Auto_Defense___ ; Auto Defence
|
||||||
beq DrawTankShieldWihHorns
|
beq DrawTankShieldWihHorns
|
||||||
cmp #56 ; Mag Deflector
|
cmp #ind_Mag_Deflector__ ; Mag Deflector
|
||||||
beq DrawTankShieldWihHorns
|
beq DrawTankShieldWihHorns
|
||||||
bne NoShieldDraw
|
bne NoShieldDraw
|
||||||
ShieldDraw
|
ShieldDraw
|
||||||
|
|||||||
-11
@@ -136,17 +136,6 @@ START
|
|||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
; activate mag deflector for all players (test)
|
|
||||||
; ldx numberOfPlayers
|
|
||||||
; dex
|
|
||||||
;@
|
|
||||||
; mva #56 ActiveDefenceWeapon,x
|
|
||||||
; tay
|
|
||||||
; lda DefensiveEnergy,y
|
|
||||||
; sta ShieldEnergy,x ; set energy of shield
|
|
||||||
; dex
|
|
||||||
; bpl @-
|
|
||||||
; mag deflector activated! (test)
|
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
jsr CallPurchaseForEveryTank
|
jsr CallPurchaseForEveryTank
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+68
-41
@@ -656,15 +656,15 @@ DistanceCheckLoop
|
|||||||
tay
|
tay
|
||||||
; check shields
|
; check shields
|
||||||
lda ActiveDefenceWeapon,x
|
lda ActiveDefenceWeapon,x
|
||||||
cmp #57 ; one hit shield
|
cmp #ind_Shield_________ ; one hit shield
|
||||||
beq UseShield
|
beq UseShield
|
||||||
cmp #58 ; shield with energy and parachute
|
cmp #ind_Force_Shield___ ; shield with energy and parachute
|
||||||
beq UseShieldWithEnergy
|
beq UseShieldWithEnergy
|
||||||
cmp #59 ; shield with energy
|
cmp #ind_Heavy_Shield___ ; shield with energy
|
||||||
beq UseShieldWithEnergy
|
beq UseShieldWithEnergy
|
||||||
cmp #61 ; Auto Defence (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
cmp #ind_Auto_Defense___ ; Auto Defence (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||||
beq UseShieldWithEnergy
|
beq UseShieldWithEnergy
|
||||||
cmp #56 ; Mag deflector (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
cmp #ind_Mag_Deflector__ ; Mag deflector (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||||
beq UseShieldWithEnergy
|
beq UseShieldWithEnergy
|
||||||
jsr DecreaseEnergyX
|
jsr DecreaseEnergyX
|
||||||
jmp EndOfDistanceCheckLoop
|
jmp EndOfDistanceCheckLoop
|
||||||
@@ -1345,9 +1345,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 #54 ; parachute
|
cmp #ind_Parachute______ ; parachute
|
||||||
beq ParachuteActive
|
beq ParachuteActive
|
||||||
cmp #58 ; scheld witch energy and parachute
|
cmp #ind_StrongParachute ; strong parachute
|
||||||
|
beq ParachuteActive
|
||||||
|
cmp #ind_Force_Shield___ ; shield witch energy and parachute
|
||||||
bne TankFallsX
|
bne TankFallsX
|
||||||
ParachuteActive
|
ParachuteActive
|
||||||
inc Parachute
|
inc Parachute
|
||||||
@@ -1417,6 +1419,44 @@ ItStillFalls
|
|||||||
FallDiagonally
|
FallDiagonally
|
||||||
NoFallingDown
|
NoFallingDown
|
||||||
ParachutePresent
|
ParachutePresent
|
||||||
|
; check parachute type
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #ind_StrongParachute ; strong parachute
|
||||||
|
bne OneTimeParachute
|
||||||
|
; decreasing energy of parachute - if the vertical fall, substract 2
|
||||||
|
; and if at an angle then substract 1
|
||||||
|
ldy #1 ; how much energy to substract
|
||||||
|
lda IfFallDown
|
||||||
|
and #1
|
||||||
|
beq NoFallingDown2
|
||||||
|
ldx TankNr
|
||||||
|
jsr DecreaseShieldEnergyX
|
||||||
|
cpy #0 ; is necessary to reduce tenk energy ?
|
||||||
|
beq @+
|
||||||
|
jsr DecreaseEnergyX
|
||||||
|
@
|
||||||
|
ldy #1
|
||||||
|
lda IfFallDown
|
||||||
|
and #6
|
||||||
|
bne FallDiagonally2
|
||||||
|
ldx TankNr
|
||||||
|
jsr DecreaseShieldEnergyX
|
||||||
|
cpy #0 ; is necessary to reduce tenk energy ?
|
||||||
|
beq @+
|
||||||
|
jsr DecreaseEnergyX
|
||||||
|
@
|
||||||
|
; check energy of parachute
|
||||||
|
|
||||||
|
lda ShieldEnergy,x
|
||||||
|
bne OneTimeParachute
|
||||||
|
mva #0 Parachute
|
||||||
|
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
|
||||||
|
; and now we must clear parachute symbol
|
||||||
|
mva #1 Erase
|
||||||
|
jsr DrawTankParachute
|
||||||
|
FallDiagonally2
|
||||||
|
NoFallingDown2
|
||||||
|
OneTimeParachute
|
||||||
; we must set flag meaning that the tank was falling down
|
; we must set flag meaning that the tank was falling down
|
||||||
; because later maybe the number of parachutes will decrease
|
; because later maybe the number of parachutes will decrease
|
||||||
; (if there were parachutes and they were ON)
|
; (if there were parachutes and they were ON)
|
||||||
@@ -1424,7 +1464,7 @@ ParachutePresent
|
|||||||
lda Parachute
|
lda Parachute
|
||||||
ora #2 ; we set bit nr 1 (nr 0 means that parachute is present)
|
ora #2 ; we set bit nr 1 (nr 0 means that parachute is present)
|
||||||
sta Parachute
|
sta Parachute
|
||||||
|
testowanie
|
||||||
; storing last direction of falling
|
; storing last direction of falling
|
||||||
; (it is not necessarily the direction from the previous
|
; (it is not necessarily the direction from the previous
|
||||||
; iteraction, so we must check directional bits before storing)
|
; iteraction, so we must check directional bits before storing)
|
||||||
@@ -1472,17 +1512,7 @@ NotRightEdge
|
|||||||
beq DoNotClearParachute
|
beq DoNotClearParachute
|
||||||
; here we clear the parachute
|
; here we clear the parachute
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda #$34
|
jsr DrawTankParachute
|
||||||
sta CharCode
|
|
||||||
lda Ytankstable,x
|
|
||||||
sec
|
|
||||||
sbc #8
|
|
||||||
sta ydraw
|
|
||||||
lda XtanksTableL,x
|
|
||||||
sta xdraw
|
|
||||||
lda XtanksTableH,x
|
|
||||||
sta xdraw+1
|
|
||||||
jsr TypeChar
|
|
||||||
DoNotClearParachute
|
DoNotClearParachute
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -1525,17 +1555,7 @@ DoesNotFallRight
|
|||||||
|
|
||||||
; here we draw parachute
|
; here we draw parachute
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda #$34
|
jsr DrawTankParachute
|
||||||
sta CharCode
|
|
||||||
lda Ytankstable,x
|
|
||||||
sec
|
|
||||||
sbc #8
|
|
||||||
sta ydraw
|
|
||||||
lda XtanksTableL,x
|
|
||||||
sta xdraw
|
|
||||||
lda XtanksTableH,x
|
|
||||||
sta xdraw+1
|
|
||||||
jsr TypeChar
|
|
||||||
DoNotDrawParachute
|
DoNotDrawParachute
|
||||||
lda EndOfTheFallFlag
|
lda EndOfTheFallFlag
|
||||||
jeq TankFallsX
|
jeq TankFallsX
|
||||||
@@ -1552,11 +1572,24 @@ EndOfFall
|
|||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda ActiveDefenceWeapon,x
|
lda ActiveDefenceWeapon,x
|
||||||
cmp #54 ; deactivate weapon only if parachute (53)
|
cmp #ind_Parachute______ ; deactivate weapon only if parachute (54)
|
||||||
bne NoParachuteWeapon
|
bne NoParachuteWeapon
|
||||||
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
|
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
|
||||||
NoParachuteWeapon
|
NoParachuteWeapon
|
||||||
lda #$34
|
jsr DrawTankParachute
|
||||||
|
mva #0 Erase
|
||||||
|
ldx TankNr
|
||||||
|
jsr DrawTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
|
||||||
|
ThereWasNoParachute
|
||||||
|
mva #sfx_silencer sfx_effect
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc DrawTankParachute
|
||||||
|
;Tank number in X
|
||||||
|
;--------------------------------------------------
|
||||||
|
lda #$34 ; parachute symbol
|
||||||
sta CharCode
|
sta CharCode
|
||||||
lda Ytankstable,x
|
lda Ytankstable,x
|
||||||
sec
|
sec
|
||||||
@@ -1567,14 +1600,8 @@ NoParachuteWeapon
|
|||||||
lda XtanksTableH,x
|
lda XtanksTableH,x
|
||||||
sta xdraw+1
|
sta xdraw+1
|
||||||
jsr TypeChar
|
jsr TypeChar
|
||||||
mva #0 Erase
|
rts
|
||||||
ldx TankNr
|
|
||||||
jsr DrawTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
|
|
||||||
ThereWasNoParachute
|
|
||||||
mva #sfx_silencer sfx_effect
|
|
||||||
rts
|
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc Flight ; Force(byte.byte), Wind(0.word)
|
.proc Flight ; Force(byte.byte), Wind(0.word)
|
||||||
; Angle(byte) 128=0, 255=maxright, 0=maxleft
|
; Angle(byte) 128=0, 255=maxright, 0=maxleft
|
||||||
@@ -1858,9 +1885,9 @@ EndOfFlight2
|
|||||||
tax
|
tax
|
||||||
dex ; index of tank in X
|
dex ; index of tank in X
|
||||||
lda ActiveDefenceWeapon,x
|
lda ActiveDefenceWeapon,x
|
||||||
cmp #61 ; Auto Defence
|
cmp #ind_Auto_Defense___ ; Auto Defence
|
||||||
beq AutoDefence
|
beq AutoDefence
|
||||||
cmp #56 ; Mag Deflector
|
cmp #ind_Mag_Deflector__ ; Mag Deflector
|
||||||
bne NoDefence
|
bne NoDefence
|
||||||
MagDeflector
|
MagDeflector
|
||||||
; now run defensive-aggressive weapon - Mag Deflector!
|
; now run defensive-aggressive weapon - Mag Deflector!
|
||||||
|
|||||||
Reference in New Issue
Block a user