mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Nuclear Winter added.
This commit is contained in:
+5
-5
@@ -610,7 +610,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||
.by >price_Super_Mag______
|
||||
.by >price_Auto_Defense___
|
||||
.by >price_Fuel_Tank______
|
||||
.by >price_Contact_Trigger
|
||||
.by >price_Nuclear_Winter_
|
||||
|
||||
WeaponPriceL
|
||||
.by <price_Baby_Missile___
|
||||
@@ -676,7 +676,7 @@ WeaponPriceL
|
||||
.by <price_Super_Mag______
|
||||
.by <price_Auto_Defense___
|
||||
.by <price_Fuel_Tank______
|
||||
.by <price_Contact_Trigger
|
||||
.by <price_Nuclear_Winter_
|
||||
|
||||
;-------------------------------------------------
|
||||
; how many units (bulletd) of a given weapon we get for a given price
|
||||
@@ -748,7 +748,7 @@ WeaponUnits
|
||||
.by 2 ;Super_Mag______
|
||||
.by 1 ;Auto_Defense___
|
||||
.by 10 ;Fuel_Tank______
|
||||
.by 25 ;Contact_Trigger
|
||||
.by 1 ;Nuclear_Winter_
|
||||
|
||||
PurchaseMeTable ;weapons good to be purchased by the robot
|
||||
;the comment is an index in the tables
|
||||
@@ -880,7 +880,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"Super Mag " ; 60
|
||||
dta d"Auto Defense " ; 61 - with shield and energy
|
||||
dta d"Fuel Tank " ; 62
|
||||
dta d"Contact Trigger " ; 63
|
||||
dta d"Nuclear Winter " ; 63
|
||||
DefensiveEnergy = * - 48
|
||||
.by 00 ; White Flag
|
||||
.by 00 ; Heat Guidance
|
||||
@@ -897,7 +897,7 @@ DefensiveEnergy = * - 48
|
||||
.by 00 ; Super Mag
|
||||
.by 99 ; Auto Defense
|
||||
.by 00 ; Fuel Tank
|
||||
.by 00 ; Contact Trigger
|
||||
.by 00 ; Nuclear Winter
|
||||
weaponsOfDeath
|
||||
dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
|
||||
weaponsOfDeathEnd
|
||||
|
||||
+2
-2
@@ -74,7 +74,7 @@ price_Heavy_Shield___ = 375 ;_59
|
||||
price_Super_Mag______ = $ffff ;_60
|
||||
price_Auto_Defense___ = 512 ;_61
|
||||
price_Fuel_Tank______ = $ffff ;_62
|
||||
price_Contact_Trigger = $ffff ;_63
|
||||
price_Nuclear_Winter_ = 1000 ;_63
|
||||
;Weapon indexes (numbers)
|
||||
ind_Baby_Missile___ = 0
|
||||
ind_Missile________ = 1
|
||||
@@ -139,7 +139,7 @@ ind_Heavy_Shield___ = 59
|
||||
ind_Super_Mag______ = 60
|
||||
ind_Auto_Defense___ = 61
|
||||
ind_Fuel_Tank______ = 62
|
||||
ind_Contact_Trigger = 63
|
||||
ind_Nuclear_Winter_ = 63
|
||||
;--------------------------------
|
||||
; names of RMT instruments (sfx)
|
||||
;--------------------------------
|
||||
|
||||
+10
-15
@@ -416,22 +416,17 @@ AfterManualShooting
|
||||
; White Flag handling
|
||||
ldx TankNr
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #ind_White_Flag_____ ; White Flag
|
||||
cmp #ind_White_Flag_____ ; White Flag
|
||||
beq ShootWhiteFlag
|
||||
cmp #ind_Nuclear_Winter_
|
||||
bne StandardShoot
|
||||
ShootAtomicWinter
|
||||
; --- nuclear winter ---
|
||||
jsr NuclearWinter
|
||||
jmp NextPlayerShoots ; and we skip shoot
|
||||
ShootWhiteFlag
|
||||
; --- white flag ---
|
||||
mva #sfx_death_begin sfx_effect
|
||||
jsr FlashTank ; first we flash tank
|
||||
mva #1 Erase
|
||||
jsr DrawTankNr ; and erase tank
|
||||
mva #0 Erase
|
||||
ldx TankNr
|
||||
sta Energy,x ; clear tan energy
|
||||
sta eXistenZ,x ; erase from existence
|
||||
sta LASTeXistenZ,x ; to prevent explosion
|
||||
sta ActiveDefenceWeapon,x ; deactivate White Flag
|
||||
jsr PMoutofScreen
|
||||
jsr drawtanks ; for restore PM
|
||||
; --- white flag end ---
|
||||
jsr WhiteFlag
|
||||
jmp NextPlayerShoots ; and we skip shoot
|
||||
StandardShoot
|
||||
inc noDeathCounter
|
||||
@@ -479,7 +474,7 @@ AfterExplode
|
||||
mva #0 Erase
|
||||
lda FallDown2
|
||||
beq NoFallDown2
|
||||
jsr SoilDown2;
|
||||
jsr SoilDown2
|
||||
|
||||
NoFallDown2
|
||||
;here tanks are falling down
|
||||
|
||||
BIN
Binary file not shown.
+93
@@ -2322,6 +2322,99 @@ MIRValreadyAll
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -------------------------------------------------
|
||||
.proc WhiteFlag
|
||||
; -------------------------------------------------
|
||||
; This routine is run from inside of the main loop
|
||||
; and replaces Shoot and Flight routines
|
||||
; X and TankNr - index of shooting tank
|
||||
; -------------------------------------------------
|
||||
mva #sfx_death_begin sfx_effect
|
||||
jsr FlashTank ; first we flash tank
|
||||
mva #1 Erase
|
||||
jsr DrawTankNr ; and erase tank
|
||||
mva #0 Erase
|
||||
ldx TankNr
|
||||
sta Energy,x ; clear tank energy
|
||||
sta eXistenZ,x ; erase from existence
|
||||
sta LASTeXistenZ,x ; to prevent explosion
|
||||
sta ActiveDefenceWeapon,x ; deactivate White Flag
|
||||
jsr PMoutofScreen
|
||||
jsr drawtanks ; for restore PM
|
||||
mva #sfx_silencer sfx_effect
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -------------------------------------------------
|
||||
.proc NuclearWinter
|
||||
; -------------------------------------------------
|
||||
; This routine is run from inside of the main loop
|
||||
; and replaces Shoot and Flight routines
|
||||
; X and TankNr - index of shooting tank
|
||||
; -------------------------------------------------
|
||||
; now we use xdraw and ydraw as temporary
|
||||
ldy #0 ; byte counter (from 0 to 39)
|
||||
NextColumn
|
||||
sty magic
|
||||
ldx #0 ; line counter (ftom 0 to ?? )
|
||||
; first inverse column of bytes for a while
|
||||
ldy magic
|
||||
NextLine1
|
||||
lda LineTableL,x
|
||||
sta temp
|
||||
lda LineTableH,x
|
||||
sta temp+1
|
||||
lda (temp),y
|
||||
eor #$ff
|
||||
sta (temp),y
|
||||
inx
|
||||
inx
|
||||
cpx #60
|
||||
bne NextLine1
|
||||
;
|
||||
wait ; wait uses A and Y
|
||||
; second - inverse again and randomize column of bytes
|
||||
ldx #0
|
||||
ldy magic
|
||||
mva #$55 magic+1
|
||||
NextLine2
|
||||
lda LineTableL,x
|
||||
sta temp
|
||||
lda LineTableH,x
|
||||
sta temp+1
|
||||
lda (temp),y
|
||||
eor #$ff
|
||||
sta (temp),y
|
||||
lda random
|
||||
ora magic+1
|
||||
and (temp),y
|
||||
sta (temp),y
|
||||
lda magic+1
|
||||
eor #$ff
|
||||
sta magic+1
|
||||
inx
|
||||
inx
|
||||
cpx #60
|
||||
bne NextLine2
|
||||
; and go to next column
|
||||
iny
|
||||
cpy #40
|
||||
bne NextColumn
|
||||
|
||||
ldx TankNr
|
||||
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
|
||||
|
||||
;temporary tanks removal (would fall down with soil)
|
||||
;mva #1 Erase
|
||||
;jsr drawtanks
|
||||
;mva #0 Erase
|
||||
mwa #0 RangeLeft ; whole screen in range of soil down
|
||||
mwa #screenwidth RangeRight
|
||||
jsr SoilDown2
|
||||
jsr drawtanks ; for restore PM
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -------------------------------------------------
|
||||
.proc CheckCollisionWithTank
|
||||
; -------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user