mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 14:49:46 +02:00
Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fe360d63c | |||
| c9ceb58117 | |||
| e10514debd | |||
| 2907fe7a91 | |||
| a0d5d22e74 | |||
| 1ea62798c8 | |||
| 42facad64e | |||
| 2c98d73877 | |||
| 4ae4403448 | |||
| 242bc4586c | |||
| eda0e65189 | |||
| 8613854f80 | |||
| 1c277b0e6f | |||
| 623c9c9583 | |||
| ce55bf0d97 | |||
| 537f88e4c6 | |||
| 9aaa4fec69 | |||
| 67b5dfb110 | |||
| 4200e60d47 | |||
| 7324203925 | |||
| 634c2f83e9 | |||
| 18f88705e5 | |||
| fe6bd17a66 | |||
| 1d8f26d562 | |||
| 2bb8a743e1 | |||
| 708a7b4aa9 | |||
| 8153670711 | |||
| ab140ed5ca | |||
| cc3e2d1845 | |||
| 98e866abdd | |||
| ffa748fb68 | |||
| de047779ce | |||
| 3c685b2811 | |||
| c86dcd7c59 | |||
| f924868459 | |||
| 2992bd40b3 | |||
| b19d218670 | |||
| 8ab450ff48 | |||
| 5e2ab7f206 | |||
| cd69bf22db | |||
| ff8c4d9329 | |||
| 83e128a1b5 | |||
| cc8688263a | |||
| b5bf6ecc30 | |||
| e2c85c98c2 | |||
| c47a22a833 | |||
| cd4275226a | |||
| cb270be865 | |||
| 7df1d5eff9 | |||
| c3f6e2399d | |||
| 598860b7d0 | |||
| c1aa177767 | |||
| eb7f6369de | |||
| 41900d7671 | |||
| 6a6689b9b7 | |||
| 836c67afcf | |||
| 1b983b8d92 | |||
| 53e9f89012 | |||
| cf40bf905d | |||
| 91b613f166 | |||
| eace9eb5cf | |||
| 4c6b56a1e2 | |||
| 7b86fc98cd | |||
| 186cacf5ba | |||
| 031416b8e6 | |||
| 1394524a26 |
@@ -47,6 +47,35 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
|
|||||||
|
|
||||||
## Changes:
|
## Changes:
|
||||||
|
|
||||||
|
###### Build 145
|
||||||
|
2022-06-26
|
||||||
|
Possibly last round of weapon additions!
|
||||||
|
@Pecusx added
|
||||||
|
- working White Flag -- it is a way to give up while not making opponents richer!
|
||||||
|
- Battery - a must for every tank with low energy.
|
||||||
|
- Strong Parachute - like a normal parachute, but stronger (it has energy and can work more than once)
|
||||||
|
- Nuclear Winter - a quick and efficient solution to global worming, err, warning, WARMING!
|
||||||
|
@mikerro added new SFX and in-game-tunes.
|
||||||
|
- Pressing [S] turns on/off SFX (when aiming). Pressing [M] turns on/off in-game tunes.
|
||||||
|
Tickets closed:
|
||||||
|
- https://github.com/pkali/scorch_src/issues/54 - holding joystick up or down longer speeds up force change. It makes playing with joystick much nicer.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/76 - a beginning of visual tweaks by Adam
|
||||||
|
- infinite defensive weapons purchase bug fixed, to chagrin of some...
|
||||||
|
|
||||||
|
###### Build 144
|
||||||
|
2022-06-19
|
||||||
|
Father's day release comes with the most anticipated new feature: defensive weapons. Thanks to @Pecus we have 5 completely new weapons and a more reasonably working parachute. The stub of the instruction manual describing these weapons is available here: https://github.com/pkali/scorch_src/wiki/Instruction-manual.
|
||||||
|
|
||||||
|
The new inventory system has been added. Call it by pressing the "I" key or short-pressing fire. Select the weapon to use by moving the joystick or cursor keys right. Switch between offensive and defensive weapons by moving the joystick left. Fire/escape to quit inventory.
|
||||||
|
|
||||||
|
Another significant playability change is #54 - it is not finished yet, but keeping the joystick up or down makes force increase/decrease faster. Also - short press of fire calls Inventory, long press fires the shell. The timings are experimental, please let me know if this needs a modification/improvement.
|
||||||
|
|
||||||
|
Tickets closed:
|
||||||
|
* https://github.com/pkali/scorch_src/issues/92 - less unnecessary cleaning of the offensive texts
|
||||||
|
* https://github.com/pkali/scorch_src/issues/89 - improved collisions with tank
|
||||||
|
* https://github.com/pkali/scorch_src/issues/71 - ditto
|
||||||
|
* https://github.com/pkali/scorch_src/issues/11, https://github.com/pkali/scorch_src/issues/26, https://github.com/pkali/scorch_src/issues/8, https://github.com/pkali/scorch_src/issues/20 - new inventory system
|
||||||
|
|
||||||
###### Build 143
|
###### Build 143
|
||||||
2022-06-05
|
2022-06-05
|
||||||
Rewrite build. We redone several important parts of the game to allow for bug fixes and requested features. Generally it was a great success, but some new bugs appeared. This build is nice for the eye, but beware, no mercy for testers again :)
|
Rewrite build. We redone several important parts of the game to allow for bug fixes and requested features. Generally it was a great success, but some new bugs appeared. This build is nice for the eye, but beware, no mercy for testers again :)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ pmg .ds $0300
|
|||||||
eif
|
eif
|
||||||
|
|
||||||
song_data
|
song_data
|
||||||
ins 'mmm_16.lzs'
|
ins 'mmm_16.lzs'
|
||||||
song_end
|
song_end
|
||||||
|
|
||||||
POKEY = $D200
|
POKEY = $D200
|
||||||
@@ -456,7 +456,7 @@ quit
|
|||||||
ini main
|
ini main
|
||||||
; ---
|
; ---
|
||||||
|
|
||||||
opt l-
|
;opt l-
|
||||||
|
|
||||||
.MACRO SPRITES
|
.MACRO SPRITES
|
||||||
missiles
|
missiles
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+60
-36
@@ -14,9 +14,9 @@ dliColorsFore
|
|||||||
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
|
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
|
||||||
TextForegroundColor = $0c
|
TextForegroundColor = $0c
|
||||||
CashOptionL ;(one zero less than on the screen)
|
CashOptionL ;(one zero less than on the screen)
|
||||||
.by 0,<200,<500,<800,<1000
|
.by 0,<200,<800,<1200,<2000
|
||||||
CashOptionH
|
CashOptionH
|
||||||
.by 0,>200,>500,>800,>1000
|
.by 0,>200,>800,>1200,>2000
|
||||||
GravityTable .by 10,20,25,30,40
|
GravityTable .by 10,20,25,30,40
|
||||||
MaxWindTable .by 5,20,40,70,99
|
MaxWindTable .by 5,20,40,70,99
|
||||||
RoundsTable .by 10,20,30,40,50
|
RoundsTable .by 10,20,30,40,50
|
||||||
@@ -514,7 +514,8 @@ EndOfTheBarrelY
|
|||||||
.by 6,6,6,6,6,6,6,6,6
|
.by 6,6,6,6,6,6,6,6,6
|
||||||
.by 5,5,5,5,5,5,5,5,5,5
|
.by 5,5,5,5,5,5,5,5,5,5
|
||||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check
|
||||||
|
; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||||
|
|
||||||
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
@@ -526,7 +527,8 @@ EndOfTheBarrelY
|
|||||||
.by 0,0,0,0 ; not used
|
.by 0,0,0,0 ; not used
|
||||||
|
|
||||||
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
||||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||||
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check
|
||||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||||
.by 5,5,5,5,5,5,5,5,5,5
|
.by 5,5,5,5,5,5,5,5,5,5
|
||||||
.by 6,6,6,6,6,6,6,6,6
|
.by 6,6,6,6,6,6,6,6,6
|
||||||
@@ -593,13 +595,14 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
|||||||
.by >price______________45
|
.by >price______________45
|
||||||
.by >price______________46
|
.by >price______________46
|
||||||
.by >price______________47
|
.by >price______________47
|
||||||
.by >price_Heat_Guidance__
|
.by >price_White_Flag_____
|
||||||
|
.by >price_Battery________
|
||||||
.by >price_Bal_Guidance___
|
.by >price_Bal_Guidance___
|
||||||
.by >price_Horz_Guidance__
|
.by >price_Horz_Guidance__
|
||||||
.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___
|
||||||
@@ -607,8 +610,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
|||||||
.by >price_Super_Mag______
|
.by >price_Super_Mag______
|
||||||
.by >price_Auto_Defense___
|
.by >price_Auto_Defense___
|
||||||
.by >price_Fuel_Tank______
|
.by >price_Fuel_Tank______
|
||||||
.by >price_Contact_Trigger
|
.by >price_Nuclear_Winter_
|
||||||
.by >price_White_Flag_____
|
|
||||||
|
|
||||||
WeaponPriceL
|
WeaponPriceL
|
||||||
.by <price_Baby_Missile___
|
.by <price_Baby_Missile___
|
||||||
@@ -659,13 +661,14 @@ WeaponPriceL
|
|||||||
.by <price______________45
|
.by <price______________45
|
||||||
.by <price______________46
|
.by <price______________46
|
||||||
.by <price______________47
|
.by <price______________47
|
||||||
.by <price_Heat_Guidance__
|
.by <price_White_Flag_____
|
||||||
|
.by <price_Battery________
|
||||||
.by <price_Bal_Guidance___
|
.by <price_Bal_Guidance___
|
||||||
.by <price_Horz_Guidance__
|
.by <price_Horz_Guidance__
|
||||||
.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___
|
||||||
@@ -673,8 +676,7 @@ WeaponPriceL
|
|||||||
.by <price_Super_Mag______
|
.by <price_Super_Mag______
|
||||||
.by <price_Auto_Defense___
|
.by <price_Auto_Defense___
|
||||||
.by <price_Fuel_Tank______
|
.by <price_Fuel_Tank______
|
||||||
.by <price_Contact_Trigger
|
.by <price_Nuclear_Winter_
|
||||||
.by <price_White_Flag_____
|
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
; how many units (bulletd) of a given weapon we get for a given price
|
; how many units (bulletd) of a given weapon we get for a given price
|
||||||
@@ -731,13 +733,14 @@ WeaponUnits
|
|||||||
.by 0 ;_____________45
|
.by 0 ;_____________45
|
||||||
.by 0 ;_____________46
|
.by 0 ;_____________46
|
||||||
.by 0 ;_____________47
|
.by 0 ;_____________47
|
||||||
.by 6 ;Heat_Guidance__
|
.by 1 ;White_Flag___48
|
||||||
|
.by 3 ;Battery________
|
||||||
.by 2 ;Bal_Guidance___
|
.by 2 ;Bal_Guidance___
|
||||||
.by 5 ;Horz_Guidance__
|
.by 5 ;Horz_Guidance__
|
||||||
.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___
|
||||||
@@ -745,8 +748,7 @@ WeaponUnits
|
|||||||
.by 2 ;Super_Mag______
|
.by 2 ;Super_Mag______
|
||||||
.by 1 ;Auto_Defense___
|
.by 1 ;Auto_Defense___
|
||||||
.by 10 ;Fuel_Tank______
|
.by 10 ;Fuel_Tank______
|
||||||
.by 25 ;Contact_Trigger
|
.by 1 ;Nuclear_Winter_
|
||||||
.by 1 ;_____________63
|
|
||||||
|
|
||||||
PurchaseMeTable ;weapons good to be purchased by the robot
|
PurchaseMeTable ;weapons good to be purchased by the robot
|
||||||
;the comment is an index in the tables
|
;the comment is an index in the tables
|
||||||
@@ -809,8 +811,8 @@ 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 $02,$03,$06,$1d,$0a,$1b,$1c,$1e
|
.by $5f,$1c,$03,$06,$1d,$0a,$1b,$1b ; defensives
|
||||||
.by $3b,$3c,$3d,$3e,$3f,$5e,$5f,$00
|
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$7d
|
||||||
|
|
||||||
; Names of weapons (16 chars long)
|
; Names of weapons (16 chars long)
|
||||||
NamesOfWeapons ;the comment is an index in the tables
|
NamesOfWeapons ;the comment is an index in the tables
|
||||||
@@ -861,26 +863,43 @@ 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 to simplify display
|
||||||
|
|
||||||
dta d"Heat Guidance " ; 48 ($30)
|
dta d"White Flag " ; 48 ($30)
|
||||||
dta d"Bal Guidance " ; 49
|
dta d"Battery " ; 49
|
||||||
dta d"Horz Guidance " ; 50
|
dta d"Bal Guidance " ; 50
|
||||||
dta d"Vert Guidance " ; 51
|
dta d"Horz Guidance " ; 51
|
||||||
dta d"Lazy Boy " ; 52
|
dta d"Vert Guidance " ; 52
|
||||||
dta d"Parachute " ; 53
|
dta d"Lazy Boy " ; 53
|
||||||
dta d"Battery " ; 54
|
dta d"Parachute " ; 54 - no energy
|
||||||
dta d"Mag Deflector " ; 55
|
dta d"Strong Parachute" ; 55 - with energy (earlier Battery)
|
||||||
dta d"Shield " ; 56
|
dta d"Mag Deflector " ; 56 - with shield and energy
|
||||||
dta d"Force Shield " ; 57
|
dta d"Shield " ; 57 - shield for one shot - no energy
|
||||||
dta d"Heavy Shield " ; 58
|
dta d"Force Shield " ; 58 - shield with energy and parachute
|
||||||
dta d"Super Mag " ; 59
|
dta d"Heavy Shield " ; 59 - shield with energy
|
||||||
dta d"Auto Defense " ; 60
|
dta d"Super Mag " ; 60
|
||||||
dta d"Fuel Tank " ; 61
|
dta d"Auto Defense " ; 61 - with shield and energy
|
||||||
dta d"Contact Trigger " ; 62
|
dta d"Fuel Tank " ; 62
|
||||||
dta d"White Flag " ; 63
|
dta d"Nuclear Winter " ; 63
|
||||||
|
DefensiveEnergy = * - 48
|
||||||
|
.by 00 ; White Flag
|
||||||
|
.by 00 ; Heat Guidance
|
||||||
|
.by 00 ; Bal Guidance
|
||||||
|
.by 00 ; Horz Guidance
|
||||||
|
.by 00 ; Vert Guidance
|
||||||
|
.by 00 ; Lazy Boy
|
||||||
|
.by 00 ; Parachute
|
||||||
|
.by 99 ; Strong Parachute
|
||||||
|
.by 99 ; Mag Deflector
|
||||||
|
.by 00 ; Shield
|
||||||
|
.by 99 ; Force Shield
|
||||||
|
.by 99 ; Heavy Shield
|
||||||
|
.by 00 ; Super Mag
|
||||||
|
.by 99 ; Auto Defense
|
||||||
|
.by 00 ; Fuel Tank
|
||||||
|
.by 00 ; Nuclear Winter
|
||||||
weaponsOfDeath
|
weaponsOfDeath
|
||||||
dta 1,2,3,7,15,16,17,18,19,20,21,22,23,24,25,26,27
|
dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
|
||||||
weaponsOfDeathEnd
|
weaponsOfDeathEnd
|
||||||
joyToKeyTable
|
joyToKeyTable
|
||||||
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
|
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
|
||||||
@@ -900,5 +919,10 @@ scrcodes
|
|||||||
dta d"qrstuvwx"
|
dta d"qrstuvwx"
|
||||||
dta d"yz123456"
|
dta d"yz123456"
|
||||||
dta d"7890." ; "-"
|
dta d"7890." ; "-"
|
||||||
|
;-----------------------------------
|
||||||
|
gameOverSpritesTop
|
||||||
|
; end of the Gover sprites by number of players
|
||||||
|
; 1 2 3 4 5 6
|
||||||
|
.by 130,130,136,142,148,154
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
+90
-16
@@ -59,22 +59,87 @@ price______________44 = 0
|
|||||||
price______________45 = 0
|
price______________45 = 0
|
||||||
price______________46 = 0
|
price______________46 = 0
|
||||||
price______________47 = 0
|
price______________47 = 0
|
||||||
price_Heat_Guidance__ = $ffff ;_48_($30)
|
price_White_Flag_____ = $0 ;_48_($30)
|
||||||
price_Bal_Guidance___ = $ffff ;_49
|
price_Battery________ = 300 ;_49
|
||||||
price_Horz_Guidance__ = $ffff ;_50
|
price_Bal_Guidance___ = $ffff ;_50
|
||||||
price_Vert_Guidance__ = $ffff ;_51
|
price_Horz_Guidance__ = $ffff ;_51
|
||||||
price_Lazy_Boy_______ = $ffff ;_52
|
price_Vert_Guidance__ = $ffff ;_52
|
||||||
price_Parachute______ = 1100 ;_53
|
price_Lazy_Boy_______ = $ffff ;_53
|
||||||
price_Battery________ = $ffff ;_54
|
price_Parachute______ = 234 ;_54
|
||||||
price_Mag_Deflector__ = $ffff ;_55
|
price_StrongParachute = 1000 ;_55
|
||||||
price_Shield_________ = $ffff ;_56
|
price_Mag_Deflector__ = 245 ;_56
|
||||||
price_Force_Shield___ = $ffff ;_57
|
price_Shield_________ = 112 ;_57
|
||||||
price_Heavy_Shield___ = $ffff ;_58
|
price_Force_Shield___ = 268 ;_58
|
||||||
price_Super_Mag______ = $ffff ;_59
|
price_Heavy_Shield___ = 375 ;_59
|
||||||
price_Auto_Defense___ = $ffff ;_60
|
price_Super_Mag______ = $ffff ;_60
|
||||||
price_Fuel_Tank______ = $ffff ;_61
|
price_Auto_Defense___ = 512 ;_61
|
||||||
price_Contact_Trigger = $ffff ;_62
|
price_Fuel_Tank______ = $ffff ;_62
|
||||||
price_White_Flag_____ = $0 ;_63
|
price_Nuclear_Winter_ = 1000 ;_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_Battery________ = 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_Nuclear_Winter_ = 63
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; names of RMT instruments (sfx)
|
; names of RMT instruments (sfx)
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
@@ -106,3 +171,12 @@ sfx_keyclick = $18 ;y
|
|||||||
sfx_shoot = $19 ;z
|
sfx_shoot = $19 ;z
|
||||||
sfx_seppuku = $1a ;1
|
sfx_seppuku = $1a ;1
|
||||||
sfx_liquid_dirt = $1b ;2
|
sfx_liquid_dirt = $1b ;2
|
||||||
|
sfx_battery = $1c ;3
|
||||||
|
sfx_white_flag = $1d ;4
|
||||||
|
;--------------------------------
|
||||||
|
; RMT songs (lines)
|
||||||
|
;--------------------------------
|
||||||
|
song_silencio = $00
|
||||||
|
song_end_round = $02
|
||||||
|
song_ingame = $06
|
||||||
|
song_game_over = $0b
|
||||||
|
|||||||
+14
-6
@@ -104,7 +104,7 @@ OptionsScreen
|
|||||||
OptionsHere
|
OptionsHere
|
||||||
; 0123456789012345678901234567890123456789
|
; 0123456789012345678901234567890123456789
|
||||||
dta d"Players : 2 3 4 5 6 "
|
dta d"Players : 2 3 4 5 6 "
|
||||||
dta d"Cash : none 2K 5K 8K 10K "
|
dta d"Cash : none 2K 8K 12K 20K "
|
||||||
dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
|
dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
|
||||||
dta d"Wind : 1B 3B 5B 7B 9B "
|
dta d"Wind : 1B 3B 5B 7B 9B "
|
||||||
dta d"Rounds : 10 20 30 40 50 "
|
dta d"Rounds : 10 20 30 40 50 "
|
||||||
@@ -136,7 +136,9 @@ WeaponsDescription
|
|||||||
dta d" - Defensive/Offensive weapon "
|
dta d" - Defensive/Offensive weapon "
|
||||||
dta d" "
|
dta d" "
|
||||||
dta d"Space"*
|
dta d"Space"*
|
||||||
dta d" - Purchase "
|
dta d" - "
|
||||||
|
purchaseActivate
|
||||||
|
dta d"Purchase "
|
||||||
dta d"Return"*
|
dta d"Return"*
|
||||||
dta d" - Finish "
|
dta d" - Finish "
|
||||||
EmptyLine
|
EmptyLine
|
||||||
@@ -166,11 +168,17 @@ NamesOfLevels
|
|||||||
textbuffer
|
textbuffer
|
||||||
; 0123456789012345678901234567890123456789
|
; 0123456789012345678901234567890123456789
|
||||||
dta d"Player: "
|
dta d"Player: "
|
||||||
dta d"Energy: Angle: Force: "
|
dta d"Energy: Angle: Force: "
|
||||||
dta d" Round: Wind: "
|
dta d"Round: Wind: "
|
||||||
textbuffer2
|
textbuffer2
|
||||||
dta d"Player: Cash: "
|
dta d"Player: Cash: 0 " ; ZERO TO MAKE YOU RICHER ON THE SCREEN
|
||||||
dta d"----------------------------------------"
|
dta d"----------------------------------------"
|
||||||
|
;---------------------------------------------------
|
||||||
|
activateText
|
||||||
|
dta d"Activate"
|
||||||
|
activateTextEnd
|
||||||
|
purchaseText
|
||||||
|
dta d"Purchase"
|
||||||
|
purchaseTextEnd
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
+144
-16
@@ -262,8 +262,7 @@ CheckCollisionDraw
|
|||||||
sbc #1
|
sbc #1
|
||||||
sta YHit
|
sta YHit
|
||||||
sty YHit+1
|
sty YHit+1
|
||||||
;mwa ydraw YHit
|
mva #$ff HitFlag
|
||||||
mva #1 HitFlag
|
|
||||||
StopHitChecking
|
StopHitChecking
|
||||||
jmp ContinueDraw
|
jmp ContinueDraw
|
||||||
@
|
@
|
||||||
@@ -364,7 +363,7 @@ endcircleloop
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----
|
;----
|
||||||
splot8 .proc
|
.proc splot8
|
||||||
; plot xcircle+XC,ycircle+YC
|
; plot xcircle+XC,ycircle+YC
|
||||||
; plot xcircle+XC,ycircle-YC
|
; plot xcircle+XC,ycircle-YC
|
||||||
; plot xcircle-XC,ycircle-YC
|
; plot xcircle-XC,ycircle-YC
|
||||||
@@ -463,7 +462,7 @@ splot8 .proc
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
clearscreen .proc
|
.proc clearscreen
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
lda #$ff
|
lda #$ff
|
||||||
@@ -477,7 +476,7 @@ clearscreen .proc
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-------------------------------*------------------
|
;-------------------------------*------------------
|
||||||
placetanks .proc
|
.proc placetanks
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
|
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
|
||||||
lda #0
|
lda #0
|
||||||
@@ -588,20 +587,20 @@ UnequalTanks
|
|||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
.proc drawtanks
|
.proc drawtanks
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
lda tanknr
|
lda TankNr
|
||||||
pha
|
pha
|
||||||
ldx #$00
|
ldx #$00
|
||||||
stx tanknr
|
stx TankNr
|
||||||
|
|
||||||
DrawNextTank
|
DrawNextTank
|
||||||
jsr drawtanknr
|
jsr drawtanknr
|
||||||
inc tanknr
|
inc TankNr
|
||||||
ldx tanknr
|
ldx TankNr
|
||||||
Cpx NumberOfPlayers
|
Cpx NumberOfPlayers
|
||||||
bne DrawNextTank
|
bne DrawNextTank
|
||||||
|
|
||||||
pla
|
pla
|
||||||
sta tankNr
|
sta TankNr
|
||||||
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
@@ -642,6 +641,7 @@ DrawTankNrX
|
|||||||
sta xdraw+1
|
sta xdraw+1
|
||||||
lda ytankstable,x
|
lda ytankstable,x
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
mva #0 ydraw+1
|
||||||
|
|
||||||
jsr TypeChar
|
jsr TypeChar
|
||||||
|
|
||||||
@@ -654,11 +654,11 @@ DrawTankNrX
|
|||||||
rorw xbyte ; divide by 2 (carry does not matter)
|
rorw xbyte ; divide by 2 (carry does not matter)
|
||||||
lda xbyte
|
lda xbyte
|
||||||
clc
|
clc
|
||||||
adc #$24 ; P/M to graphics offset
|
adc #PMOffset+1 ; P/M to graphics offset
|
||||||
cpx #$4 ; 5th tank are joined missiles and offset is defferent
|
cpx #$4 ; 5th tank are joined missiles and offset is defferent
|
||||||
bne NoMissile
|
bne NoMissile
|
||||||
clc
|
clc
|
||||||
adc #$0C
|
adc #$0C ; missile offset offset
|
||||||
NoMissile
|
NoMissile
|
||||||
sta hposp0,x
|
sta hposp0,x
|
||||||
; vertical position
|
; vertical position
|
||||||
@@ -690,10 +690,45 @@ ZeroesToGo
|
|||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
bne ClearPM
|
bne ClearPM
|
||||||
|
|
||||||
NoPlayerMissile
|
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 #ind_Shield_________ ; one shot shield
|
||||||
|
beq ShieldDraw
|
||||||
|
cmp #ind_Force_Shield___ ; shield with energy and parachute
|
||||||
|
beq ShieldDraw
|
||||||
|
cmp #ind_Heavy_Shield___ ; shield with energy
|
||||||
|
beq ShieldDraw
|
||||||
|
cmp #ind_Auto_Defense___ ; Auto Defence
|
||||||
|
beq DrawTankShieldWihHorns
|
||||||
|
cmp #ind_Mag_Deflector__ ; Mag Deflector
|
||||||
|
beq DrawTankShieldWihHorns
|
||||||
|
cmp #ind_White_Flag_____ ; White Flag
|
||||||
|
beq DrawTankFlag
|
||||||
|
bne NoShieldDraw
|
||||||
|
ShieldDraw
|
||||||
|
jsr DrawTankShield.DrawInPosition
|
||||||
|
NoShieldDraw
|
||||||
DoNotDrawTankNr
|
DoNotDrawTankNr
|
||||||
rts
|
rts
|
||||||
|
DrawTankShieldWihHorns
|
||||||
|
jsr DrawTankShield.DrawInPosition
|
||||||
|
jsr DrawTankShieldHorns
|
||||||
|
rts
|
||||||
|
DrawTankFlag
|
||||||
|
lda #$5E ; flag symbol
|
||||||
|
sta CharCode
|
||||||
|
lda Ytankstable,x
|
||||||
|
sec
|
||||||
|
sbc #8
|
||||||
|
sta ydraw
|
||||||
|
lda XtanksTableL,x
|
||||||
|
sta xdraw
|
||||||
|
lda XtanksTableH,x
|
||||||
|
sta xdraw+1
|
||||||
|
jsr TypeChar
|
||||||
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
@@ -718,6 +753,88 @@ tankflash_loop
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc DrawTankShield
|
||||||
|
; X - tank number
|
||||||
|
; if use DrawInPosition entry point then:
|
||||||
|
; xdraw, ydraw - coordinates left LOWER corner of Tank char
|
||||||
|
; values remain there after a DrawTankNr proc.
|
||||||
|
;
|
||||||
|
; this proc change xdraw, ydraw and temp!
|
||||||
|
;--------------------------------------------------
|
||||||
|
lda xtankstableL,x
|
||||||
|
sta xdraw
|
||||||
|
lda xtankstableH,x
|
||||||
|
sta xdraw+1
|
||||||
|
lda ytankstable,x
|
||||||
|
sta ydraw
|
||||||
|
mva #0 ydraw+1
|
||||||
|
DrawInPosition
|
||||||
|
mva #1 color
|
||||||
|
lda erase
|
||||||
|
beq ShieldVisible
|
||||||
|
dec color
|
||||||
|
ShieldVisible
|
||||||
|
sbw xdraw #$03 ; 3 pixels to left
|
||||||
|
; draw left vertical line of shield ( | )
|
||||||
|
mva #6 temp ; strange !!!
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
.nowarn dew ydraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw left oblique line of shield ( / )
|
||||||
|
mva #4 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
.nowarn dew ydraw
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw top horizontal line of shield ( _ )
|
||||||
|
mva #5 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw right oblique line of shield ( \ )
|
||||||
|
mva #4 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw ydraw
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw right vertical line of shield ( | )
|
||||||
|
mva #7 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw ydraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc DrawTankShieldHorns
|
||||||
|
; use only directly after DrawTankShield
|
||||||
|
; this proc draws a little "horns" on shield.
|
||||||
|
; Symbol of defensive but aggressive :) weapon
|
||||||
|
;--------------------------------------------------
|
||||||
|
.nowarn dew xdraw ; 1 pixel left
|
||||||
|
sbw ydraw #$0a ; 10 pixels up
|
||||||
|
jsr plot
|
||||||
|
.nowarn dew ydraw
|
||||||
|
inw xdraw
|
||||||
|
jsr plot
|
||||||
|
sbw xdraw #$0d ; 13 pixels left
|
||||||
|
jsr plot
|
||||||
|
inw xdraw
|
||||||
|
inw ydraw
|
||||||
|
jsr plot
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc drawmountains
|
.proc drawmountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -1349,7 +1466,7 @@ EndPutChar
|
|||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
.proc PutChar4x4
|
.proc PutChar4x4
|
||||||
; puts 4x4 pixels char on the graphics screen
|
; puts 4x4 pixels char on the graphics screen
|
||||||
; in: xdraw, ydraw (LOWER left corner of the char)
|
; in: dx, dy (LOWER left corner of the char)
|
||||||
; in: CharCode4x4 (.sbyte)
|
; in: CharCode4x4 (.sbyte)
|
||||||
; in: plot4x4color (0/1)
|
; in: plot4x4color (0/1)
|
||||||
; all pixels are being drawn
|
; all pixels are being drawn
|
||||||
@@ -1403,7 +1520,7 @@ GetUpper4bits
|
|||||||
bpl CopyChar
|
bpl CopyChar
|
||||||
|
|
||||||
; calculating coordinates from xdraw and ydraw
|
; calculating coordinates from xdraw and ydraw
|
||||||
mwa xdraw xbyte
|
mwa dx xbyte
|
||||||
|
|
||||||
lda xbyte
|
lda xbyte
|
||||||
and #$7
|
and #$7
|
||||||
@@ -1414,7 +1531,7 @@ GetUpper4bits
|
|||||||
rorw xbyte
|
rorw xbyte
|
||||||
;---
|
;---
|
||||||
ldy xbyte
|
ldy xbyte
|
||||||
lda ydraw ; y = y - 3 because left lower.
|
lda dy ; y = y - 3 because left lower.
|
||||||
sec
|
sec
|
||||||
sbc #3
|
sbc #3
|
||||||
tax
|
tax
|
||||||
@@ -1465,4 +1582,15 @@ EndPut4x4
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
.proc SetMainScreen
|
||||||
|
mva #0 dmactl
|
||||||
|
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
|
||||||
|
mwa #dl dlptrs ; issue #72 (glitches when switches)
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$02 ; 2=normal, 3 = wide screen width
|
||||||
|
sta dmactls
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
+165
-82
@@ -36,7 +36,7 @@
|
|||||||
;we decided it must go in 'English' to let other people work on it
|
;we decided it must go in 'English' to let other people work on it
|
||||||
|
|
||||||
.macro build
|
.macro build
|
||||||
dta d"143" ; number of this build (3 bytes)
|
dta d"145" ; number of this build (3 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
@@ -55,26 +55,33 @@
|
|||||||
.zpvar xc .word
|
.zpvar xc .word
|
||||||
.zpvar temp .word ;temporary word for the most embeded loops only
|
.zpvar temp .word ;temporary word for the most embeded loops only
|
||||||
.zpvar temp2 .word ;same as above
|
.zpvar temp2 .word ;same as above
|
||||||
|
.zpvar modify .word ;origially used to replace self-modyfying code
|
||||||
.zpvar tempXROLLER .word ;same as above for XROLLER routine (used also in result display routine)
|
.zpvar tempXROLLER .word ;same as above for XROLLER routine (used also in result display routine)
|
||||||
.zpvar xtempDRAW .word ;same as above for XDRAW routine
|
.zpvar xtempDRAW .word ;same as above for XDRAW routine
|
||||||
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
||||||
|
.zpvar tempor2 .byte
|
||||||
;--------------temps used in circle routine
|
;--------------temps used in circle routine
|
||||||
.zpvar xi .word ;X (word) in draw routine
|
.zpvar xi .word ;X (word) in draw routine
|
||||||
.zpvar fx .byte ;circle drawing variables
|
.zpvar fx .byte
|
||||||
.zpvar yi .word ;Y (word) in draw routine
|
.zpvar yi .word ;Y (word) in draw routine
|
||||||
.zpvar fy .byte
|
.zpvar fy .byte
|
||||||
.zpvar xk .word
|
.zpvar xk .word
|
||||||
.zpvar fs .byte
|
.zpvar fs .byte
|
||||||
.zpvar yc .byte ;ycircle - temporary for circle
|
.zpvar yc .byte ;ycircle - temporary for circle
|
||||||
.zpvar dx .word
|
.zpvar dx .word
|
||||||
.zpvar tempor2 .byte
|
|
||||||
.zpvar dy .word
|
.zpvar dy .word
|
||||||
.zpvar dd .word
|
.zpvar dd .word
|
||||||
.zpvar di .word
|
.zpvar di .word
|
||||||
.zpvar dp .word
|
.zpvar dp .word
|
||||||
.zpvar modify .word
|
;----------------------------
|
||||||
.zpvar weaponPointer .word
|
.zpvar weaponPointer .word
|
||||||
.zpvar dliCounter .byte
|
.zpvar dliCounter .byte
|
||||||
|
.zpvar pressTimer .byte
|
||||||
|
.zpvar NTSCcounter .byte
|
||||||
|
;.zpvar dliA .byte
|
||||||
|
;.zpvar dliX .byte
|
||||||
|
;.zpvar dliY .byte
|
||||||
|
|
||||||
;* RMT ZeroPage addresses
|
;* RMT ZeroPage addresses
|
||||||
.zpvar p_tis .word
|
.zpvar p_tis .word
|
||||||
.zpvar p_trackslbstable .word
|
.zpvar p_trackslbstable .word
|
||||||
@@ -103,7 +110,7 @@
|
|||||||
;Game loading address
|
;Game loading address
|
||||||
ORG $3000
|
ORG $3000
|
||||||
WeaponFont
|
WeaponFont
|
||||||
ins 'artwork/weapons_AW5.fnt' ; 'artwork/weapons.fnt'
|
ins 'artwork/weapons_AW5_mod.fnt' ; 'artwork/weapons.fnt'
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
;Screen displays go here to avoid crossing 4kb barrier
|
;Screen displays go here to avoid crossing 4kb barrier
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
@@ -128,19 +135,13 @@ START
|
|||||||
|
|
||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
|
||||||
|
|
||||||
jsr CallPurchaseForEveryTank
|
jsr CallPurchaseForEveryTank
|
||||||
|
|
||||||
; issue #72 (glitches when switches)
|
; issue #72 (glitches when switches)
|
||||||
mva #0 dmactl
|
mva #0 dmactl
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
;ora #$02 ; 2=normal, 3 = wide screen width, 0 = no screen
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
jsr GetRandomWind
|
jsr GetRandomWind
|
||||||
|
|
||||||
jsr RoundInit
|
jsr RoundInit
|
||||||
@@ -166,7 +167,8 @@ MainGameLoop
|
|||||||
; Results are number of other deaths
|
; Results are number of other deaths
|
||||||
; before the player dies itself
|
; before the player dies itself
|
||||||
|
|
||||||
|
lda #song_end_round
|
||||||
|
jsr RmtSongSelect
|
||||||
jsr DisplayResults
|
jsr DisplayResults
|
||||||
|
|
||||||
;check demo mode
|
;check demo mode
|
||||||
@@ -239,6 +241,7 @@ skipzeroing
|
|||||||
|
|
||||||
inc CurrentRoundNr
|
inc CurrentRoundNr
|
||||||
mva #0 dmactl ; issue #72
|
mva #0 dmactl ; issue #72
|
||||||
|
jsr RmtSongSelect
|
||||||
mva #sfx_silencer sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
jmp MainGameLoop
|
jmp MainGameLoop
|
||||||
|
|
||||||
@@ -253,6 +256,9 @@ skipzeroing
|
|||||||
; the shooting angle is randomized
|
; the shooting angle is randomized
|
||||||
; of course gains an looses are zeroed
|
; of course gains an looses are zeroed
|
||||||
|
|
||||||
|
lda #song_ingame
|
||||||
|
jsr RmtSongSelect
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
tax
|
tax
|
||||||
@ sta singleRoundVars,x
|
@ sta singleRoundVars,x
|
||||||
@@ -300,19 +306,14 @@ SettingEnergies
|
|||||||
jsr calculatemountains ;let mountains be easy for the eye
|
jsr calculatemountains ;let mountains be easy for the eye
|
||||||
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
||||||
|
|
||||||
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
|
jsr SetMainScreen
|
||||||
mwa #dl dlptrs ; issue #72 (glitches when switches)
|
jsr ColorsOfSprites
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$02 ; 2=normal, 3 = wide screen width
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
|
|
||||||
jsr drawmountains ;draw them
|
jsr drawmountains ;draw them
|
||||||
jsr drawtanks ;finally draw tanks
|
jsr drawtanks ;finally draw tanks
|
||||||
|
|
||||||
mva #0 TankSequencePointer
|
mva #0 TankSequencePointer
|
||||||
;--------------------round screen is ready---------
|
;---------round screen is ready---------
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -418,6 +419,22 @@ ManualShooting
|
|||||||
seq:rts
|
seq:rts
|
||||||
|
|
||||||
AfterManualShooting
|
AfterManualShooting
|
||||||
|
; defensive weapons without flight handling
|
||||||
|
ldx TankNr
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
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 ---
|
||||||
|
jsr WhiteFlag
|
||||||
|
jmp NextPlayerShoots ; and we skip shoot
|
||||||
|
StandardShoot
|
||||||
inc noDeathCounter
|
inc noDeathCounter
|
||||||
|
|
||||||
jsr DecreaseWeaponBeforeShoot
|
jsr DecreaseWeaponBeforeShoot
|
||||||
@@ -428,6 +445,10 @@ AfterManualShooting
|
|||||||
|
|
||||||
ShootNow
|
ShootNow
|
||||||
jsr Shoot
|
jsr Shoot
|
||||||
|
;here we clear offensive text (after a shoot)
|
||||||
|
ldy TankNr
|
||||||
|
mva #0 plot4x4color
|
||||||
|
jsr DisplayOffensiveTextNr
|
||||||
|
|
||||||
lda HitFlag ;0 if missed
|
lda HitFlag ;0 if missed
|
||||||
beq missed
|
beq missed
|
||||||
@@ -439,9 +460,9 @@ ShootNow
|
|||||||
|
|
||||||
continueMainRoundLoopAfterSeppuku
|
continueMainRoundLoopAfterSeppuku
|
||||||
;here we clear offensive text (after a shoot)
|
;here we clear offensive text (after a shoot)
|
||||||
ldy TankNr
|
;ldy TankNr
|
||||||
mva #0 plot4x4color
|
;mva #0 plot4x4color
|
||||||
jsr DisplayOffensiveTextNr
|
;jsr DisplayOffensiveTextNr
|
||||||
|
|
||||||
|
|
||||||
AfterExplode
|
AfterExplode
|
||||||
@@ -454,14 +475,12 @@ AfterExplode
|
|||||||
@
|
@
|
||||||
|
|
||||||
;temporary tanks removal (would fall down with soil)
|
;temporary tanks removal (would fall down with soil)
|
||||||
mva TankNr tempor2
|
|
||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
jsr drawtanks
|
jsr drawtanks
|
||||||
mva tempor2 TankNr
|
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
lda FallDown2
|
lda FallDown2
|
||||||
beq NoFallDown2
|
beq NoFallDown2
|
||||||
jsr SoilDown2;
|
jsr SoilDown2
|
||||||
|
|
||||||
NoFallDown2
|
NoFallDown2
|
||||||
;here tanks are falling down
|
;here tanks are falling down
|
||||||
@@ -649,7 +668,7 @@ MetodOfDeath
|
|||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc DecreaseEnergyX
|
.proc DecreaseEnergyX
|
||||||
;Decreases energy of player nr X
|
;Decreases energy of player nr X by the value Y
|
||||||
;increases his financial loss
|
;increases his financial loss
|
||||||
;increases gain of tank TankNr
|
;increases gain of tank TankNr
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -687,6 +706,33 @@ NotNegativeEnergy
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc DecreaseShieldEnergyX
|
||||||
|
; Decreases energy of shield player nr X by the value Y
|
||||||
|
; if shield energy is 0 after decrease then in Y we have
|
||||||
|
; rest of the energy - to decrease tank energy
|
||||||
|
;--------------------------------------------------
|
||||||
|
sty EnergyDecrease
|
||||||
|
ldy #0 ; if Shield survive then no decrease tank anergy
|
||||||
|
; Energy cannot be less than 0
|
||||||
|
lda ShieldEnergy,x
|
||||||
|
cmp EnergyDecrease
|
||||||
|
bcc UseAllShieldEnergy
|
||||||
|
;sec
|
||||||
|
sbc EnergyDecrease
|
||||||
|
bpl NotNegativeShieldEnergy ; jump allways
|
||||||
|
UseAllShieldEnergy
|
||||||
|
; now calculate rest of energy for future tank energy decrease
|
||||||
|
sec
|
||||||
|
lda EnergyDecrease
|
||||||
|
sbc ShieldEnergy,x
|
||||||
|
tay
|
||||||
|
lda #0
|
||||||
|
NotNegativeShieldEnergy
|
||||||
|
sta ShieldEnergy,x
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
.proc Seppuku
|
.proc Seppuku
|
||||||
lda #0
|
lda #0
|
||||||
@@ -707,7 +753,7 @@ NotNegativeEnergy
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
GetRandomWind .proc
|
.proc GetRandomWind
|
||||||
;in: MaxWind (byte)
|
;in: MaxWind (byte)
|
||||||
;out: Wind (word)
|
;out: Wind (word)
|
||||||
;uses: _
|
;uses: _
|
||||||
@@ -736,31 +782,50 @@ GetRandomWind .proc
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
PMoutofScreen .proc
|
.proc PMoutofScreen
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #$00 ; let all P/M disappear
|
lda #$00 ; let all P/M disappear
|
||||||
:8 sta hposp0+#
|
:8 sta hposp0+#
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc ColorsOfSprites
|
||||||
|
lda TankColoursTable ; colours of sprites under tanks
|
||||||
|
sta COLPM0S
|
||||||
|
lda TankColoursTable+1
|
||||||
|
sta COLPM1S
|
||||||
|
lda TankColoursTable+2
|
||||||
|
sta COLPM2S
|
||||||
|
lda TankColoursTable+3
|
||||||
|
sta COLPM3S
|
||||||
|
LDA TankColoursTable+4
|
||||||
|
STA COLPF3S ; joined missiles (5th tank)
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc WeaponCleanup;
|
.proc WeaponCleanup;
|
||||||
; cleaning of the weapon possesion tables
|
; cleaning of the weapon possesion tables
|
||||||
; (99 of Baby Missles, all other weapons=0)
|
; 99 of Baby Missles(index==0), all other weapons=0)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
ldx #$3f
|
ldx #$3f ; TODO: maxweapons
|
||||||
lda #$0
|
@ lda #$0
|
||||||
@
|
cpx #48 ; White Flag
|
||||||
sta TanksWeapon1,x
|
bne @+
|
||||||
|
lda #99
|
||||||
|
@ sta TanksWeapon1,x
|
||||||
sta TanksWeapon2,x
|
sta TanksWeapon2,x
|
||||||
sta TanksWeapon3,x
|
sta TanksWeapon3,x
|
||||||
sta TanksWeapon4,x
|
sta TanksWeapon4,x
|
||||||
sta TanksWeapon5,x
|
sta TanksWeapon5,x
|
||||||
sta TanksWeapon6,x
|
sta TanksWeapon6,x
|
||||||
dex
|
dex
|
||||||
sne:lda #99
|
beq setBmissile
|
||||||
bpl @-
|
bpl @-1
|
||||||
rts
|
rts
|
||||||
|
setBmissile
|
||||||
|
lda #99
|
||||||
|
bne @-
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -823,18 +888,6 @@ SetunPlots
|
|||||||
lda #$10 ; P/M priorities (bit 4 joins missiles)
|
lda #$10 ; P/M priorities (bit 4 joins missiles)
|
||||||
sta gtictls
|
sta gtictls
|
||||||
jsr PMoutofScreen
|
jsr PMoutofScreen
|
||||||
lda TankColoursTable ; temporary colours of sprites under tanks
|
|
||||||
sta COLPM0S
|
|
||||||
lda TankColoursTable+1
|
|
||||||
sta COLPM1S
|
|
||||||
lda TankColoursTable+2
|
|
||||||
sta COLPM2S
|
|
||||||
lda TankColoursTable+3
|
|
||||||
sta COLPM3S
|
|
||||||
LDA TankColoursTable+4
|
|
||||||
STA COLPF3S ; joined missiles (5th tank)
|
|
||||||
mva #0 hscrol
|
|
||||||
|
|
||||||
|
|
||||||
;let the tanks be visible!
|
;let the tanks be visible!
|
||||||
ldx #(maxPlayers-1)
|
ldx #(maxPlayers-1)
|
||||||
@@ -854,7 +907,8 @@ ClearResults
|
|||||||
bne ClearResults
|
bne ClearResults
|
||||||
|
|
||||||
mva #1 CurrentRoundNr ;we start from round 1
|
mva #1 CurrentRoundNr ;we start from round 1
|
||||||
|
mva #6 NTSCcounter
|
||||||
|
|
||||||
; RMT INIT
|
; RMT INIT
|
||||||
lda #$f0 ;initial value
|
lda #$f0 ;initial value
|
||||||
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
|
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
|
||||||
@@ -862,18 +916,18 @@ ClearResults
|
|||||||
lda #$ff ;initial value
|
lda #$ff ;initial value
|
||||||
sta sfx_effect
|
sta sfx_effect
|
||||||
;
|
;
|
||||||
ldx #<MODUL ;low byte of RMT module to X reg
|
lda #0
|
||||||
ldy #>MODUL ;hi byte of RMT module to Y reg
|
jsr RmtSongSelect
|
||||||
lda #0 ;starting song line 0-255 to A reg
|
|
||||||
jsr RASTERMUSICTRACKER ;Init
|
|
||||||
;
|
;
|
||||||
VMAIN VBLinterrupt,6 ;jsr SetVBL
|
VMAIN VBLinterrupt,6 ;jsr SetVBL
|
||||||
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
DLIinterruptGraph .proc
|
.proc DLIinterruptGraph
|
||||||
pha
|
;sta dliA
|
||||||
|
;sty dliY
|
||||||
|
pha
|
||||||
phy
|
phy
|
||||||
ldy dliCounter
|
ldy dliCounter
|
||||||
lda dliColorsBack,y
|
lda dliColorsBack,y
|
||||||
@@ -884,41 +938,63 @@ DLIinterruptGraph .proc
|
|||||||
sta COLPF1
|
sta COLPF1
|
||||||
sty COLPF2
|
sty COLPF2
|
||||||
inc dliCounter
|
inc dliCounter
|
||||||
ply
|
;ldy dliY
|
||||||
|
;lda dliA
|
||||||
|
ply
|
||||||
pla
|
pla
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
DLIinterruptText .proc
|
.proc DLIinterruptText
|
||||||
pha
|
;sta dliA
|
||||||
|
pha
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
mva #TextBackgroundColor colpf2
|
mva #TextBackgroundColor colpf2
|
||||||
mva #TextForegroundColor colpf3
|
mva #TextForegroundColor colpf3
|
||||||
pla
|
;lda dliA
|
||||||
|
pla
|
||||||
DLIinterruptNone
|
DLIinterruptNone
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
VBLinterrupt .proc
|
.proc VBLinterrupt
|
||||||
pha
|
pha
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
mva #0 dliCounter
|
mva #0 dliCounter
|
||||||
|
|
||||||
|
lda PAL
|
||||||
|
and #%00001110
|
||||||
|
beq itsPAL
|
||||||
|
;it is NTSC here
|
||||||
|
dec NTSCcounter
|
||||||
|
bne itsPAL
|
||||||
|
mva #6 NTSCcounter
|
||||||
|
bne exitVBL ; skip doing VBL things each 6 frames in Amerika, Amerika
|
||||||
|
; We're all living in Amerika, Coca Cola, Wonderbra
|
||||||
|
|
||||||
|
itsPAL
|
||||||
|
; pressTimer is trigger tick counter. always 50 ticks / s
|
||||||
|
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
|
||||||
|
|
||||||
|
|
||||||
|
; ------- RMT -------
|
||||||
lda sfx_effect
|
lda sfx_effect
|
||||||
bmi lab2
|
bmi lab2
|
||||||
asl @ ; * 2
|
asl @ ; * 2
|
||||||
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
|
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
|
||||||
ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module)
|
ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module)
|
||||||
lda #0 ;A = 12 note (0..60)
|
lda #0 ;A = 0 note (0..60)
|
||||||
jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
|
bit noSfx
|
||||||
;
|
smi:jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
|
||||||
|
|
||||||
lda #$ff
|
lda #$ff
|
||||||
sta sfx_effect ;reinit value
|
sta sfx_effect ;reinit value
|
||||||
;
|
|
||||||
lab2
|
lab2
|
||||||
jsr RASTERMUSICTRACKER+3 ;1 play
|
jsr RASTERMUSICTRACKER+3 ;1 play
|
||||||
|
; ------- RMT -------
|
||||||
|
|
||||||
|
exitVBL
|
||||||
ply
|
ply
|
||||||
plx
|
plx
|
||||||
pla
|
pla
|
||||||
@@ -934,9 +1010,7 @@ lab2
|
|||||||
bne @-
|
bne @-
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
.proc RandomizeSequence
|
.proc RandomizeSequence
|
||||||
; in: NumberOfPlayers
|
; in: NumberOfPlayers
|
||||||
; out: TankSequence
|
; out: TankSequence
|
||||||
@@ -986,7 +1060,7 @@ UsageLoop
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
RandomizeAngle .proc ;
|
.proc RandomizeAngle
|
||||||
; routine returns in A
|
; routine returns in A
|
||||||
; a valid angle for the tank's barrel.
|
; a valid angle for the tank's barrel.
|
||||||
; X is not changed
|
; X is not changed
|
||||||
@@ -1009,7 +1083,7 @@ RandomizeAngle .proc ;
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
RandomizeForce .proc
|
.proc RandomizeForce
|
||||||
; routine returns in ForceTable/L/H
|
; routine returns in ForceTable/L/H
|
||||||
; valid force of shooting for TankNr
|
; valid force of shooting for TankNr
|
||||||
; in X must be TankNr
|
; in X must be TankNr
|
||||||
@@ -1054,7 +1128,6 @@ LimitForce
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
.proc MoveBarrelToNewPosition
|
.proc MoveBarrelToNewPosition
|
||||||
jsr DrawTankNr
|
jsr DrawTankNr
|
||||||
@@ -1088,7 +1161,7 @@ rotateLeft
|
|||||||
BarrelPositionIsFine
|
BarrelPositionIsFine
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
.proc SortSequence ;
|
.proc SortSequence ;
|
||||||
@@ -1218,19 +1291,19 @@ notpressedJoyGetKey
|
|||||||
getkeyend
|
getkeyend
|
||||||
mvx #sfx_keyclick sfx_effect
|
mvx #sfx_keyclick sfx_effect
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
getkeynowait .proc;
|
.proc getkeynowait
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
lda kbcode
|
lda kbcode
|
||||||
and #$3f ;CTRL and SHIFT ellimination
|
and #$3f ;CTRL and SHIFT ellimination
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
WaitForKeyRelease .proc
|
.proc WaitForKeyRelease
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda JSTICK0
|
lda JSTICK0
|
||||||
and #$0f
|
and #$0f
|
||||||
@@ -1244,7 +1317,16 @@ WaitForKeyRelease .proc
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc RmtSongSelect
|
||||||
|
;--------------------------------------------------
|
||||||
|
; starting song line 0-255 to A reg
|
||||||
|
bit noMusic
|
||||||
|
spl:lda #song_silencio
|
||||||
|
ldx #<MODUL ;low byte of RMT module to X reg
|
||||||
|
ldy #>MODUL ;hi byte of RMT module to Y reg
|
||||||
|
jmp RASTERMUSICTRACKER ;Init, :RTS
|
||||||
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
icl 'weapons.asm'
|
icl 'weapons.asm'
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
@@ -1266,6 +1348,7 @@ TankFont
|
|||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
icl 'variables.asm'
|
icl 'variables.asm'
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
|
|
||||||
; reserved space for RMT player
|
; reserved space for RMT player
|
||||||
.ds $0320
|
.ds $0320
|
||||||
.align $100
|
.align $100
|
||||||
@@ -1274,7 +1357,7 @@ TankFont
|
|||||||
|
|
||||||
MODUL equ $b000 ;address of RMT module
|
MODUL equ $b000 ;address of RMT module
|
||||||
opt h- ;RMT module is standard Atari binary file already
|
opt h- ;RMT module is standard Atari binary file already
|
||||||
ins "artwork/sfx/scorch_trial0e_stripped.rmt" ;include music RMT module
|
ins "artwork/sfx/scorch_trial0f_stripped.rmt" ;include music RMT module
|
||||||
opt h+
|
opt h+
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
|
|||||||
BIN
Binary file not shown.
+404
-194
File diff suppressed because it is too large
Load Diff
+17
-11
@@ -19,6 +19,8 @@ seppukuVal .by 75
|
|||||||
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
|
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
noMusic .by 0 ; 0 - play music, $ff - do not play music
|
||||||
|
noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX
|
||||||
; 4x4 text buffer
|
; 4x4 text buffer
|
||||||
ResultLineBuffer
|
ResultLineBuffer
|
||||||
dta d" ", $ff
|
dta d" ", $ff
|
||||||
@@ -30,6 +32,8 @@ RoundNrDisplay
|
|||||||
;=====================================================
|
;=====================================================
|
||||||
variablesStart ; zeroing starts here
|
variablesStart ; zeroing starts here
|
||||||
;=====================================================
|
;=====================================================
|
||||||
|
isInventory .ds 1 ; 0 - purchase, $ff - inventory
|
||||||
|
;--------------
|
||||||
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
;--------------
|
;--------------
|
||||||
sfx_effect .ds 1
|
sfx_effect .ds 1
|
||||||
@@ -47,7 +51,7 @@ moneyH ;we place zero at the end of prices and money
|
|||||||
;and have range from 0 to 99990 (not too much)
|
;and have range from 0 to 99990 (not too much)
|
||||||
;money players have (maybe one more byte is needed?)
|
;money players have (maybe one more byte is needed?)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
moneyL
|
moneyL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
gainH ;how much money player gets after the round
|
gainH ;how much money player gets after the round
|
||||||
@@ -66,6 +70,8 @@ looseL
|
|||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
Energy
|
Energy
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
|
ShieldEnergy
|
||||||
|
.DS [MaxPlayers]
|
||||||
EnergyDecrease .DS 1
|
EnergyDecrease .DS 1
|
||||||
eXistenZ
|
eXistenZ
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
@@ -95,6 +101,8 @@ NewAngle .DS 1
|
|||||||
|
|
||||||
ActiveWeapon ;number of the selected weapon
|
ActiveWeapon ;number of the selected weapon
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
|
ActiveDefenceWeapon ;number of the activated defence weapon - 0
|
||||||
|
.DS [MaxPlayers]
|
||||||
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
@@ -114,7 +122,7 @@ MaxWind .ds 1 ;
|
|||||||
WindOrientation .DS 1 ;(0-right,1-left)
|
WindOrientation .DS 1 ;(0-right,1-left)
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
Counter .DS 1 ;temporary Counter for outside loops
|
Counter .DS 1 ;temporary Counter for outside loops
|
||||||
HitFlag .DS 1 ;1 when missile hit anything
|
HitFlag .DS 1 ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
xtankstableL ;X positions of tanks (lower left point)
|
xtankstableL ;X positions of tanks (lower left point)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
@@ -239,22 +247,20 @@ temptankNr .DS 1
|
|||||||
|
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Variables from textproc.s65
|
;Variables from textproc.s65
|
||||||
; tables with numbers of weapons on the right lists
|
; tables with indexes of weapons on the right lists
|
||||||
; to be honest - I do not know at the moment what the above
|
|
||||||
; comment was supposed to mean...
|
|
||||||
; OK (2022) so, L1 is list of offensive weapons, L2 - defensive
|
; OK (2022) so, L1 is list of offensive weapons, L2 - defensive
|
||||||
NubersOfWeaponsL1
|
IndexesOfWeaponsL1
|
||||||
.ds 8*5 ; :(8*5) .by $ff
|
.ds 8*5 ; max 40 offensive weapons. this is wrong, should be 48, still only 32 defined.
|
||||||
NubersOfWeaponsL2
|
IndexesOfWeaponsL2
|
||||||
.ds 8*2 ; :(8*2) .by $ff
|
.ds 8*2 ; max 16 defensive weapons.
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
; variables storing amount of weapons on the first and second
|
; variables storing amount of weapons on the first and second
|
||||||
; list and pointer position
|
; list and pointer position
|
||||||
|
|
||||||
HowManyOnTheList1
|
HowManyOnTheListOff
|
||||||
.DS 1
|
.DS 1
|
||||||
HowManyOnTheList2
|
HowManyOnTheListDef
|
||||||
.DS 1
|
.DS 1
|
||||||
PositionOnTheList ; pointer position on the list being displayed
|
PositionOnTheList ; pointer position on the list being displayed
|
||||||
.DS 1
|
.DS 1
|
||||||
|
|||||||
+382
-79
@@ -33,7 +33,7 @@ ExplosionRoutines
|
|||||||
.word VOID-1 ;napalm
|
.word VOID-1 ;napalm
|
||||||
.word VOID-1 ;hotnapalm
|
.word VOID-1 ;hotnapalm
|
||||||
.word tracer-1
|
.word tracer-1
|
||||||
.word VOID-1 ;smoketracer
|
.word tracer-1 ;smoketracer
|
||||||
.word babyroller-1
|
.word babyroller-1
|
||||||
.word roller-1
|
.word roller-1
|
||||||
.word heavyroller-1
|
.word heavyroller-1
|
||||||
@@ -57,6 +57,7 @@ ExplosionRoutines
|
|||||||
.word laser-1
|
.word laser-1
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
tracer
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
@@ -102,14 +103,7 @@ VOID
|
|||||||
jsr xmissile
|
jsr xmissile
|
||||||
|
|
||||||
; soil must fall down now! there is no other way...
|
; soil must fall down now! there is no other way...
|
||||||
|
|
||||||
;first clean the offensive text...
|
|
||||||
ldy TankNr
|
|
||||||
mva #0 plot4x4color
|
|
||||||
jsr DisplayOffensiveTextNr
|
|
||||||
|
|
||||||
; hide tanks or they fall down with soil
|
; hide tanks or they fall down with soil
|
||||||
|
|
||||||
lda TankNr
|
lda TankNr
|
||||||
pha
|
pha
|
||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
@@ -130,6 +124,7 @@ VOID
|
|||||||
mva LeapFrogAngle Angle
|
mva LeapFrogAngle Angle
|
||||||
|
|
||||||
mva #sfx_funky_hit sfx_effect
|
mva #sfx_funky_hit sfx_effect
|
||||||
|
sbw ytraj+1 #$05 ; next missiles start point goes 5 pixel UP to prevent multiple explosion at one point if tank is hit (4 pixels tank height + 1)
|
||||||
jsr Flight
|
jsr Flight
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq EndOfLeapping
|
beq EndOfLeapping
|
||||||
@@ -159,6 +154,7 @@ VOID
|
|||||||
ror Force
|
ror Force
|
||||||
mva LeapFrogAngle Angle
|
mva LeapFrogAngle Angle
|
||||||
mva #sfx_funky_hit sfx_effect
|
mva #sfx_funky_hit sfx_effect
|
||||||
|
sbw ytraj+1 #$05 ; next missiles start point goes 5 pixel UP to prevent multiple explosion at one point if tank is hit (4 pixels tank height + 1)
|
||||||
jsr Flight
|
jsr Flight
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq EndOfLeapping
|
beq EndOfLeapping
|
||||||
@@ -178,16 +174,12 @@ EndOfLeapping
|
|||||||
.proc funkybomb ;
|
.proc funkybomb ;
|
||||||
mva #sfx_baby_missile sfx_effect
|
mva #sfx_baby_missile sfx_effect
|
||||||
mwa xtraj+1 xtrajfb
|
mwa xtraj+1 xtrajfb
|
||||||
mwa ytraj+1 ytrajfb
|
sbw ytraj+1 #$05 ytrajfb ; funky missiles start point goes 5 pixel UP to prevent multiple explosion at one point if tank is hit (4 pixels tank height + 1)
|
||||||
inc FallDown2
|
inc FallDown2
|
||||||
;central Explosion
|
;central Explosion
|
||||||
mva #21 ExplosionRadius
|
mva #21 ExplosionRadius
|
||||||
jsr CalculateExplosionRange0
|
jsr CalculateExplosionRange0
|
||||||
jsr xmissile
|
jsr xmissile
|
||||||
|
|
||||||
ldy TankNr
|
|
||||||
mva #0 plot4x4color
|
|
||||||
jsr DisplayOffensiveTextNr
|
|
||||||
|
|
||||||
lda TankNr
|
lda TankNr
|
||||||
pha
|
pha
|
||||||
@@ -273,10 +265,6 @@ NoLowerCircle
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc tracer
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
; ------------------------
|
|
||||||
.proc babyroller
|
.proc babyroller
|
||||||
inc FallDown2
|
inc FallDown2
|
||||||
mva #11 ExplosionRadius
|
mva #11 ExplosionRadius
|
||||||
@@ -663,12 +651,39 @@ DistanceCheckLoop
|
|||||||
adc #1
|
adc #1
|
||||||
:3 asl
|
:3 asl
|
||||||
tay
|
tay
|
||||||
|
; check shields
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #ind_Shield_________ ; one hit shield
|
||||||
|
beq UseShield
|
||||||
|
cmp #ind_Force_Shield___ ; shield with energy and parachute
|
||||||
|
beq UseShieldWithEnergy
|
||||||
|
cmp #ind_Heavy_Shield___ ; shield with energy
|
||||||
|
beq UseShieldWithEnergy
|
||||||
|
cmp #ind_Auto_Defense___ ; Auto Defence (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||||
|
beq UseShieldWithEnergy
|
||||||
|
cmp #ind_Mag_Deflector__ ; Mag deflector (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||||
|
beq UseShieldWithEnergy
|
||||||
jsr DecreaseEnergyX
|
jsr DecreaseEnergyX
|
||||||
|
jmp EndOfDistanceCheckLoop
|
||||||
|
UseShieldWithEnergy
|
||||||
|
jsr DecreaseShieldEnergyX
|
||||||
|
cpy #0 ; is necessary to reduce tenk energy ?
|
||||||
|
beq ShieldCoveredTank
|
||||||
|
jsr DecreaseEnergyX
|
||||||
|
ShieldCoveredTank
|
||||||
|
lda ShieldEnergy,x
|
||||||
|
jne EndOfDistanceCheckLoop
|
||||||
|
ShieldEnergy0 ; deactivate if no energy. it's like use one hit shield :)
|
||||||
|
UseShield
|
||||||
|
mva #1 Erase
|
||||||
|
phx
|
||||||
|
jsr DrawTankShield
|
||||||
|
plx
|
||||||
|
mva #0 ActiveDefenceWeapon,x ; deactivate defense weapons
|
||||||
TankIsNotWithinTheRange
|
TankIsNotWithinTheRange
|
||||||
EndOfDistanceCheckLoop
|
EndOfDistanceCheckLoop
|
||||||
txa
|
txa
|
||||||
bne DistanceCheckLoop
|
jne DistanceCheckLoop
|
||||||
mva #sfx_silencer sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
@@ -740,7 +755,7 @@ UpNotYet
|
|||||||
sbc #1
|
sbc #1
|
||||||
sta ydraw
|
sta ydraw
|
||||||
;check tank collision prior to PLOT
|
;check tank collision prior to PLOT
|
||||||
sty HitFlag
|
sty HitFlag ; set to 0
|
||||||
|
|
||||||
jsr CheckCollisionWithTank
|
jsr CheckCollisionWithTank
|
||||||
|
|
||||||
@@ -1007,13 +1022,11 @@ ContinueToCheckMaxForce2
|
|||||||
; $f3 - shift+key
|
; $f3 - shift+key
|
||||||
|
|
||||||
notpressed
|
notpressed
|
||||||
lda TRIG0S
|
|
||||||
beq notpressed
|
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
beq checkJoy
|
jeq checkJoy
|
||||||
cmp #$f7 ; SHIFT
|
cmp #$f7 ; SHIFT
|
||||||
beq checkJoy
|
jeq checkJoy
|
||||||
|
|
||||||
lda kbcode
|
lda kbcode
|
||||||
and #%10111111 ; SHIFT elimination
|
and #%10111111 ; SHIFT elimination
|
||||||
@@ -1026,6 +1039,23 @@ notpressed
|
|||||||
;---esc pressed-quit game---
|
;---esc pressed-quit game---
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@
|
||||||
|
cmp #$0d ; I
|
||||||
|
bne @+
|
||||||
|
callInventory
|
||||||
|
; Hide all tanks - after inventory they may have other shapes
|
||||||
|
mva #1 Erase
|
||||||
|
jsr DrawTanks
|
||||||
|
mva #0 Erase
|
||||||
|
;
|
||||||
|
mva #$ff isInventory
|
||||||
|
jsr Purchase
|
||||||
|
mva #0 escFlag
|
||||||
|
jsr DisplayStatus
|
||||||
|
jsr SetMainScreen
|
||||||
|
jsr DrawTanks
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
jmp BeforeFire
|
||||||
@
|
@
|
||||||
cmp #$8e
|
cmp #$8e
|
||||||
jeq CTRLPressedUp
|
jeq CTRLPressedUp
|
||||||
@@ -1048,6 +1078,10 @@ jumpFromStick
|
|||||||
jeq pressedSpace
|
jeq pressedSpace
|
||||||
cmp #$2c
|
cmp #$2c
|
||||||
jeq pressedTAB
|
jeq pressedTAB
|
||||||
|
cmp #$25 ; M
|
||||||
|
jeq pressedM
|
||||||
|
cmp #$3e ; S
|
||||||
|
jeq pressedS
|
||||||
jmp notpressed
|
jmp notpressed
|
||||||
checkJoy
|
checkJoy
|
||||||
;------------JOY-------------
|
;------------JOY-------------
|
||||||
@@ -1064,10 +1098,17 @@ notpressedJoy
|
|||||||
;fire
|
;fire
|
||||||
lda TRIG0S
|
lda TRIG0S
|
||||||
jeq pressedSpace
|
jeq pressedSpace
|
||||||
|
mva #$ff pressTimer ; stop counting frames
|
||||||
jmp notpressed
|
jmp notpressed
|
||||||
|
|
||||||
;
|
;
|
||||||
pressedUp
|
pressedUp
|
||||||
|
lda pressTimer
|
||||||
|
spl:mva #0 pressTimer ; if >128 then reset to 0
|
||||||
|
cmp #25 ; 1/2s
|
||||||
|
bcs CTRLPressedUp
|
||||||
|
|
||||||
|
|
||||||
;force increaseeee!
|
;force increaseeee!
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
inc ForceTableL,x
|
inc ForceTableL,x
|
||||||
@@ -1104,6 +1145,11 @@ CTRLPressedUp
|
|||||||
|
|
||||||
|
|
||||||
pressedDown
|
pressedDown
|
||||||
|
lda pressTimer
|
||||||
|
spl:mva #0 pressTimer ; if >128 then reset to 0
|
||||||
|
cmp #25 ; 1/2s
|
||||||
|
bcs CTRLPressedDown
|
||||||
|
|
||||||
mva #sfx_set_power_1 sfx_effect
|
mva #sfx_set_power_1 sfx_effect
|
||||||
|
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -1193,10 +1239,33 @@ CTRLpressedTAB
|
|||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
jmp BeforeFire
|
jmp BeforeFire
|
||||||
|
|
||||||
|
pressedM
|
||||||
|
; have you tried turning the music off and on again?
|
||||||
|
lda #$ff
|
||||||
|
eor:sta noMusic
|
||||||
|
lda #song_ingame
|
||||||
|
jsr RmtSongSelect
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
jmp BeforeFire
|
||||||
|
|
||||||
|
pressedS
|
||||||
|
; have you tried turning sfx off and on again?
|
||||||
|
lda #$ff
|
||||||
|
eor:sta noSfx
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
jmp BeforeFire
|
||||||
|
|
||||||
|
|
||||||
pressedSpace
|
pressedSpace
|
||||||
;=================================
|
;=================================
|
||||||
;we shoot here!!!
|
;we shoot here!!!
|
||||||
|
mva #0 pressTimer ; reset
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
lda pressTimer
|
||||||
|
cmp #25 ; 1/2s
|
||||||
|
bcc fire
|
||||||
|
jmp callInventory
|
||||||
|
fire
|
||||||
RTS
|
RTS
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -1225,7 +1294,7 @@ RandomizeOffensiveText
|
|||||||
|
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
cmp #$20 ; laser
|
cmp #ind_Laser__________ ; laser
|
||||||
bne NotStrongShoot
|
bne NotStrongShoot
|
||||||
mva #0 color
|
mva #0 color
|
||||||
lda #7
|
lda #7
|
||||||
@@ -1269,9 +1338,20 @@ AfterStrongShoot
|
|||||||
sbc #$00
|
sbc #$00
|
||||||
sta ytraj+2
|
sta ytraj+2
|
||||||
|
|
||||||
|
; checking if the shot is underground (no Flight but Hit :) )
|
||||||
|
ldy #0
|
||||||
|
adw xtraj+1 #mountaintable temp
|
||||||
|
lda ytraj+1
|
||||||
|
cmp (temp),y ; check collision witch mountains
|
||||||
|
bcs ShotUnderGround
|
||||||
jsr Flight
|
jsr Flight
|
||||||
mva #1 color
|
mva #1 color
|
||||||
rts
|
rts
|
||||||
|
ShotUnderGround
|
||||||
|
mwa xtraj+1 xdraw ; but why not XHit and YHit !!!???
|
||||||
|
mwa ytraj+1 ydraw
|
||||||
|
mva #$ff HitFlag
|
||||||
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|
||||||
@@ -1285,9 +1365,15 @@ AfterStrongShoot
|
|||||||
sta Parachute
|
sta Parachute
|
||||||
|
|
||||||
; let's check if the given tank has got the parachute
|
; let's check if the given tank has got the parachute
|
||||||
lda #$35 ; parachute
|
ldx TankNr
|
||||||
jsr HowManyBullets
|
lda ActiveDefenceWeapon,x
|
||||||
beq TankFallsX
|
cmp #ind_Parachute______ ; parachute
|
||||||
|
beq ParachuteActive
|
||||||
|
cmp #ind_StrongParachute ; strong parachute
|
||||||
|
beq ParachuteActive
|
||||||
|
cmp #ind_Force_Shield___ ; shield witch energy and parachute
|
||||||
|
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
|
||||||
@@ -1355,6 +1441,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)
|
||||||
@@ -1362,7 +1486,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)
|
||||||
@@ -1410,17 +1534,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
|
||||||
@@ -1463,17 +1577,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
|
||||||
@@ -1489,7 +1593,25 @@ 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 #$34
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #ind_Parachute______ ; deactivate weapon only if parachute (54)
|
||||||
|
bne NoParachuteWeapon
|
||||||
|
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
|
||||||
|
NoParachuteWeapon
|
||||||
|
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
|
||||||
@@ -1500,16 +1622,8 @@ EndOfFall
|
|||||||
lda XtanksTableH,x
|
lda XtanksTableH,x
|
||||||
sta xdraw+1
|
sta xdraw+1
|
||||||
jsr TypeChar
|
jsr TypeChar
|
||||||
mva #0 Erase
|
rts
|
||||||
; now we can deduct one parachute from the list of weapons
|
|
||||||
|
|
||||||
lda #$35 ; parachute
|
|
||||||
jsr DecreaseWeapon
|
|
||||||
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
|
||||||
@@ -1536,7 +1650,8 @@ ThereWasNoParachute
|
|||||||
noSmokeTracer
|
noSmokeTracer
|
||||||
sty SmokeTracerFlag
|
sty SmokeTracerFlag
|
||||||
|
|
||||||
RepeatIfSmokeTracer
|
RepeatIfSmokeTracer
|
||||||
|
RepeatFlight
|
||||||
mwa ytraj+1 Ytrajold+1
|
mwa ytraj+1 Ytrajold+1
|
||||||
mwa xtraj+1 Xtrajold+1
|
mwa xtraj+1 Xtrajold+1
|
||||||
mva #%01000000 drawFunction
|
mva #%01000000 drawFunction
|
||||||
@@ -1775,8 +1890,6 @@ EndOfFlight
|
|||||||
jsr unPlot
|
jsr unPlot
|
||||||
mwa xcircle xdraw
|
mwa xcircle xdraw
|
||||||
mwa ycircle ydraw
|
mwa ycircle ydraw
|
||||||
; mwa XHit xdraw
|
|
||||||
; mva YHit ydraw
|
|
||||||
|
|
||||||
ldy SmokeTracerFlag
|
ldy SmokeTracerFlag
|
||||||
beq EndOfFlight2
|
beq EndOfFlight2
|
||||||
@@ -1785,7 +1898,71 @@ EndOfFlight
|
|||||||
jmp SecondFlight
|
jmp SecondFlight
|
||||||
EndOfFlight2
|
EndOfFlight2
|
||||||
mva #0 tracerflag ; don't know why
|
mva #0 tracerflag ; don't know why
|
||||||
rts
|
|
||||||
|
; and now check for defensive-aggressive weapon
|
||||||
|
lda HitFlag
|
||||||
|
jeq NoHitAtEndOfFight ; RTS only !!!
|
||||||
|
jmi NoTankHitAtEndOfFight
|
||||||
|
; tank hit - check defensive weapon of this tank
|
||||||
|
tax
|
||||||
|
dex ; index of tank in X
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #ind_Auto_Defense___ ; Auto Defence
|
||||||
|
beq AutoDefence
|
||||||
|
cmp #ind_Mag_Deflector__ ; Mag Deflector
|
||||||
|
bne NoDefence
|
||||||
|
MagDeflector
|
||||||
|
; now run defensive-aggressive weapon - Mag Deflector!
|
||||||
|
; get tank position
|
||||||
|
clc
|
||||||
|
lda xtankstableL,x
|
||||||
|
adc #$04 ; almost in tak center :)
|
||||||
|
sta XHit
|
||||||
|
lda xtankstableH,x
|
||||||
|
adc #$00
|
||||||
|
sta XHit+1
|
||||||
|
lda #$ff ; change to ground hit (we hope)
|
||||||
|
sta HitFlag
|
||||||
|
bit random ; left or right deflection ?
|
||||||
|
bpl RightDeflection
|
||||||
|
LeftDeflection
|
||||||
|
sbw XHit #18 ; 18 pixels to right and explode...
|
||||||
|
bit XHit+1 ; if off-screen ...
|
||||||
|
bpl EndOfMagDeflector ; hit of course but we need RTS
|
||||||
|
adw XHit #36 ; change to right :)
|
||||||
|
jmp EndOfMagDeflector
|
||||||
|
RightDeflection
|
||||||
|
adw XHit #18 ; 18 pixels to right and explode...
|
||||||
|
cpw XHit screenwidth ; if off-screen ...
|
||||||
|
bcs EndOfMagDeflector ; hit of course but we need RTS
|
||||||
|
sbw XHit #36 ; change to left
|
||||||
|
EndOfMagDeflector
|
||||||
|
mwa XHit xdraw ; why? !!!
|
||||||
|
NoTankHitAtEndOfFight
|
||||||
|
NoHitAtEndOfFight
|
||||||
|
NoDefence
|
||||||
|
rts ; END !!!
|
||||||
|
AutoDefence
|
||||||
|
; now run defensive-aggressive weapon - Auto Defence!
|
||||||
|
sbb #255 LeapFrogAngle Angle ; swap angle (LeapFrogAngle - because we have strored angle in this variable)
|
||||||
|
lsrw Force ; Force = Force / 2 - becouse earlier we multiplied by 2
|
||||||
|
mva #1 Erase ; now erase shield
|
||||||
|
phx
|
||||||
|
jsr DrawTankShield
|
||||||
|
jsr DrawTankShieldHorns
|
||||||
|
plx
|
||||||
|
lda #$00
|
||||||
|
sta Erase
|
||||||
|
sta ActiveDefenceWeapon,x ; deactivate used Auto Defence
|
||||||
|
sta ShieldEnergy,x
|
||||||
|
sta xtraj ; prepare coordinates
|
||||||
|
sta ytraj
|
||||||
|
sta xtraj+2
|
||||||
|
sta ytraj+2
|
||||||
|
mwa XHit xtraj+1
|
||||||
|
sbw YHit #5 ytraj+1
|
||||||
|
mva #1 color
|
||||||
|
jmp RepeatFlight ; and repeat Fight
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
.proc SecondFlight
|
.proc SecondFlight
|
||||||
@@ -2157,18 +2334,108 @@ MIRValreadyAll
|
|||||||
mva tempor2 TankNr
|
mva tempor2 TankNr
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
jsr SoilDown2
|
jsr SoilDown2
|
||||||
mva #1 HitFlag
|
mva #$ff HitFlag ; but why ??
|
||||||
;jsr drawtanks
|
;jsr drawtanks
|
||||||
rts
|
rts
|
||||||
.endp
|
.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
|
||||||
|
; -------------------------------------------------
|
||||||
|
mva #sfx_sandhog sfx_effect
|
||||||
|
ldy #0 ; byte counter (from 0 to 39)
|
||||||
|
NextColumn
|
||||||
|
; big loop - we repat internal loops for each column of bytes
|
||||||
|
sty magic
|
||||||
|
ldx #120 ; line counter (from 0 to 60 )
|
||||||
|
; first loop - inverse column of bytes for a while
|
||||||
|
ldy magic
|
||||||
|
NextLine1
|
||||||
|
jsr InverseScreenByte
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
bpl NextLine1
|
||||||
|
;
|
||||||
|
wait ; wait uses A and Y
|
||||||
|
; second loop - inverse again and put random "snow" to column of bytes
|
||||||
|
ldx #120
|
||||||
|
ldy magic
|
||||||
|
mva #$55 magic+1
|
||||||
|
NextLine2
|
||||||
|
jsr InverseScreenByte
|
||||||
|
lda random
|
||||||
|
ora magic+1
|
||||||
|
and (temp),y
|
||||||
|
sta (temp),y
|
||||||
|
lda magic+1
|
||||||
|
eor #$ff
|
||||||
|
sta magic+1
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
bpl NextLine2
|
||||||
|
; and go to next column
|
||||||
|
iny
|
||||||
|
cpy #40
|
||||||
|
bne NextColumn
|
||||||
|
; and we have "snow" :)
|
||||||
|
lda #0
|
||||||
|
ldx TankNr
|
||||||
|
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
|
||||||
|
|
||||||
|
sta RangeLeft ; whole screen in range of soil down
|
||||||
|
sta RangeLeft+1
|
||||||
|
mwa #screenwidth RangeRight
|
||||||
|
jsr SoilDown2
|
||||||
|
jsr drawtanks ; for restore PM
|
||||||
|
rts
|
||||||
|
|
||||||
|
; in order to optimize the fragment repeated in both internal loops
|
||||||
|
; we save 15 bytes :)
|
||||||
|
InverseScreenByte
|
||||||
|
lda LineTableL,x
|
||||||
|
sta temp
|
||||||
|
lda LineTableH,x
|
||||||
|
sta temp+1
|
||||||
|
lda (temp),y
|
||||||
|
eor #$ff
|
||||||
|
sta (temp),y
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
.proc CheckCollisionWithTank
|
.proc CheckCollisionWithTank
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
; Check collision with Tank :)
|
; Check collision with Tank :)
|
||||||
; xdraw , ydraw - coordinates of the checked point
|
; xdraw , ydraw - coordinates of the checked point
|
||||||
; results:
|
; results:
|
||||||
; HitFlag - 1 - hit, 0 - no hit
|
; HitFlag - $ff - hit ground, 0 - no hit, 1-6 - hit tank (index+1)
|
||||||
; XHit , YHit - coordinates of hit
|
; XHit , YHit - coordinates of hit
|
||||||
; X - index of the hit tank
|
; X - index of the hit tank
|
||||||
|
|
||||||
@@ -2176,31 +2443,40 @@ MIRValreadyAll
|
|||||||
CheckCollisionWithTankLoop
|
CheckCollisionWithTankLoop
|
||||||
lda eXistenZ,x
|
lda eXistenZ,x
|
||||||
beq DeadTank
|
beq DeadTank
|
||||||
|
; first we test top and bottom (same with and without shield!)
|
||||||
|
lda ytankstable,x
|
||||||
|
cmp ydraw ; check range
|
||||||
|
bcc BelowTheTank ;(ytankstable,ytankstable+3)
|
||||||
|
sbc #4 ; we must rewrite EndOfTheBarrelY table or remove Y correction completely to "bold" tank !!!
|
||||||
|
cmp ydraw
|
||||||
|
bcs OverTheTank
|
||||||
|
; with or without shield ?
|
||||||
|
lda ShieldEnergy,x
|
||||||
|
bne CheckCollisionWithShieldedTank ; tank with shield is bigger :)
|
||||||
|
|
||||||
lda xtankstableH,x
|
lda xtankstableH,x
|
||||||
cmp xdraw+1
|
cmp xdraw+1
|
||||||
bne Condition01
|
bne @+
|
||||||
lda xtankstableL,x
|
lda xtankstableL,x
|
||||||
cmp xdraw
|
cmp xdraw
|
||||||
Condition01
|
@
|
||||||
bcs LeftFromTheTank ;add 8 double byte
|
bcs LeftFromTheTank ;add 8 double byte
|
||||||
|
; now we use Y as low byte and A as high byte of checked position (right edge of tank)
|
||||||
|
; it is tricky but fast and much shorter
|
||||||
clc
|
clc
|
||||||
adc #8
|
adc #8
|
||||||
tay
|
tay
|
||||||
lda xtankstableH,x
|
lda xtankstableH,x
|
||||||
adc #0
|
adc #0
|
||||||
cmp xdraw+1
|
cmp xdraw+1
|
||||||
bne Condition02
|
bne @+
|
||||||
cpy xdraw
|
cpy xdraw
|
||||||
Condition02
|
@
|
||||||
bcc RightFromTheTank
|
bcc RightFromTheTank
|
||||||
|
TankHit
|
||||||
lda ytankstable,x
|
inx
|
||||||
cmp ydraw ; check range
|
stx HitFlag ; index of hit tank+1
|
||||||
bcc BelowTheTank ;(ytankstable,ytankstable+3)
|
dex
|
||||||
sbc #4
|
|
||||||
cmp ydraw
|
|
||||||
bcs OverTheTank
|
|
||||||
mva #1 HitFlag
|
|
||||||
mwa xdraw XHit
|
mwa xdraw XHit
|
||||||
mwa ydraw YHit
|
mwa ydraw YHit
|
||||||
rts ; in X there is an index of the hit tank
|
rts ; in X there is an index of the hit tank
|
||||||
@@ -2213,6 +2489,33 @@ DeadTank
|
|||||||
cpx NumberOfPlayers
|
cpx NumberOfPlayers
|
||||||
bne CheckCollisionWithTankLoop
|
bne CheckCollisionWithTankLoop
|
||||||
rts
|
rts
|
||||||
|
CheckCollisionWithShieldedTank
|
||||||
|
; now we use Y as low byte and A as high byte of checked position (left right edgs of shield)
|
||||||
|
; it is tricky but fast and much shorter
|
||||||
|
lda xtankstableL,x
|
||||||
|
sec
|
||||||
|
sbc #4 ; 5 pixels more on left side
|
||||||
|
tay
|
||||||
|
lda xtankstableH,x
|
||||||
|
sbc #0
|
||||||
|
; bmi ShieldOverLeftEdge ; I do not know whether to check it. Probably not :) !!!
|
||||||
|
cmp xdraw+1
|
||||||
|
bne @+
|
||||||
|
cpy xdraw
|
||||||
|
@
|
||||||
|
bcs LeftFromTheTank
|
||||||
|
tya ;add 16 double byte
|
||||||
|
clc
|
||||||
|
adc #16
|
||||||
|
tay
|
||||||
|
lda xtankstableH,x
|
||||||
|
adc #0
|
||||||
|
cmp xdraw+1
|
||||||
|
bne @+
|
||||||
|
cpy xdraw
|
||||||
|
@
|
||||||
|
bcc RightFromTheTank
|
||||||
|
bcs TankHit
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
CalculateExplosionRange0
|
CalculateExplosionRange0
|
||||||
|
|||||||
Reference in New Issue
Block a user