mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
Compare commits
38 Commits
release_139
...
141
| Author | SHA1 | Date | |
|---|---|---|---|
| 347e59d5a2 | |||
| 61ff5e47e1 | |||
| 2d8c71e9ff | |||
| fd1a61c1f9 | |||
| 571b3c137e | |||
| bd8ecad2dd | |||
| 7e24e44f1b | |||
| eb8360dcd0 | |||
| 3d8ec72da0 | |||
| 2f099897c7 | |||
| 26f82b59c1 | |||
| 9a3cf1251f | |||
| ec5838ebaf | |||
| 491dc2861c | |||
| 5e476eb742 | |||
| 661d4776c7 | |||
| 3701accfc9 | |||
| fb54230ea7 | |||
| fb86876d9f | |||
| 80bc302689 | |||
| d9645b9c37 | |||
| 620bcf5aa8 | |||
| d0a9fb0fbe | |||
| 68bf4a9541 | |||
| 7dd3ecd2bf | |||
| 08f7680563 | |||
| d9322221a3 | |||
| d766088b66 | |||
| de5bfab2a8 | |||
| 91b39e736b | |||
| 572bee982a | |||
| b37dc73f52 | |||
| 11ddf69de9 | |||
| 0ba4594712 | |||
| 8556dfe0d7 | |||
| 860d0917ad | |||
| 2de2c24373 | |||
| a6382c5dc0 |
@@ -8,14 +8,15 @@ by Tomasz 'Pecus' Pecko and Pawel 'pirx' Kalinowski
|
|||||||
Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022
|
Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
Kaz - splash screen, ideas
|
- Kaz - splash screen, ideas
|
||||||
Adam - font, ideas
|
- Miker (@mikerro) - game sfx, ideas, QA
|
||||||
Emkay - splash screen music
|
- Adam (@6502adam) - font, ideas, QA
|
||||||
Miker - game sfx, ideas
|
- Bocianu (@bocianu) - important ideas, FujiNet implementation, QA
|
||||||
Bocianu - important ideas, FujiNet implementation
|
- Emkay - splash screen music
|
||||||
|
|
||||||
|
QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert
|
||||||
|
|
||||||
You can contact us at pecus@poczta.fm or pirx@5oft.pl
|
You can contact us at pecus@poczta.fm or pirx@5oft.pl
|
||||||
home page of this project is https://github.com/pkali/scorch_src
|
|
||||||
|
|
||||||
This source code was originally compiled under [OMC65 crossassembler](https://github.com/pkali/omc65) and on 2012-06-21 translated to [mads](https://github.com/tebe6502/Mad-Assembler).
|
This source code was originally compiled under [OMC65 crossassembler](https://github.com/pkali/omc65) and on 2012-06-21 translated to [mads](https://github.com/tebe6502/Mad-Assembler).
|
||||||
|
|
||||||
@@ -31,12 +32,12 @@ Game source code is split into 5+4 parts:
|
|||||||
- display.asm - display lists and text screen definitions
|
- display.asm - display lists and text screen definitions
|
||||||
- ai.asm - artificial stupidity of computer opponents
|
- ai.asm - artificial stupidity of computer opponents
|
||||||
- weapons.asm - general arsenal of tankies
|
- weapons.asm - general arsenal of tankies
|
||||||
- definitions.asm - label definitions, moved to make it work better with Altirra debug.
|
- definitions.asm - label definitions, moved to make it work better with Altirra debug (it doesn't).
|
||||||
|
|
||||||
We were trying to use as much macros and pseudo-ops as possible.
|
We were trying to use macros, pseudo-ops and simple graphics primitives as much as possible.
|
||||||
They are defined in atari.hea and macro.hea files together with many atari constants. This way it should be relatively easy to port this code to e.g. C64
|
This way it should be relatively easy to port this code to e.g. C64
|
||||||
|
|
||||||
After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars where all you want to have y=ax+b :)
|
After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars where all you want to have y=a*x+b :)
|
||||||
|
|
||||||
Originally most variables were in Polish, comments were sparse, but we wanted to release this piece of code to public.
|
Originally most variables were in Polish, comments were sparse, but we wanted to release this piece of code to public.
|
||||||
Because of being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it.
|
Because of being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it.
|
||||||
@@ -46,10 +47,33 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
|
|||||||
|
|
||||||
## Changes:
|
## Changes:
|
||||||
|
|
||||||
###### Build 138
|
###### Build 141
|
||||||
|
2022-05-22
|
||||||
|
Debug build. Thanks to all testers for finding numerous bugs. We tried to fix some of them and we have introduced some new for your enjoyment.
|
||||||
|
- #73 Fast forward. Press [START] to speed up the game where it can be sped up. Not in many places, mind you.
|
||||||
|
- #72 Screen glitches improved
|
||||||
|
- #70 AI shoot with more force than their energy allows. We might still have to revise this one
|
||||||
|
- #69 Explosions wrapping around the screen
|
||||||
|
- #67 Screen glitches after intro
|
||||||
|
- #65 Saved ~90 bytes by removing cosinus table
|
||||||
|
- #62 Empty list of defensive weapons gets corrupted. Plunged it with a new defensive weapon - "White Flag". Honor of the tank crew prohibits them from buying it (yet)
|
||||||
|
- #61 [SHIFT] was repeating the last key
|
||||||
|
- #57 Fire too sensitive on a real machine. Switched to shadow registers. First recorded use of Atari OS :O
|
||||||
|
- #55 Glitches in the status bar. This one was surprisingly tough.
|
||||||
|
|
||||||
|
###### Build 140
|
||||||
|
2022-05-15
|
||||||
|
Huge internal changes by @Pecusx. The whole game screen has been inverted - ground is now background color, "sky" and empty areas are in fact pixels. This allowed for introducing better tank colorization, fully devised and lead by Adam. The process started and results are already promising - the colors of tanks and the status bar are closer. We might get even better ones in the next builds.
|
||||||
|
- few new sfx added (end of round, weapon change, soil eating weapons)
|
||||||
|
- added colors to tank name and level selection screen
|
||||||
|
- Bug https://github.com/pkali/scorch_src/issues/57 possibly alleviated by using TRIG0S instead of TRIG0. Please test - it did not show for me.
|
||||||
|
Other unlisted minor bugs and typos fixed.
|
||||||
|
"Nightly" version moved to `develop` branch. `master` will be updated with stablish and playablish builds only.
|
||||||
|
|
||||||
|
###### Build 139
|
||||||
2022-05-09
|
2022-05-09
|
||||||
The post midnight release with great, heavy new features:
|
The post midnight release with great, heavy new features:
|
||||||
- https://github.com/pkali/scorch_src/issues/48, https://github.com/pkali/scorch_src/issues/10 - thanks to Miker we have a bunch of fresh sound effects. Not everything is perfectly implemented, but the game definitely got nicer! Thank you again Miker!
|
- https://github.com/pkali/scorch_src/issues/48, https://github.com/pkali/scorch_src/issues/10 - thanks to @mikerro we have a bunch of fresh sound effects. Not everything is perfectly implemented, but the game definitely got nicer! Thank you again Miker!
|
||||||
- https://github.com/pkali/scorch_src/issues/42 New weapon - Liquid Dirt by Pecus. Try it from directly from the weapon store!
|
- https://github.com/pkali/scorch_src/issues/42 New weapon - Liquid Dirt by Pecus. Try it from directly from the weapon store!
|
||||||
- (fix) https://github.com/pkali/scorch_src/issues/53 - non-existing weapons are not displayed. This makes the defense menu empty when you are poor, but it is still better than the old way with "$0" prices
|
- (fix) https://github.com/pkali/scorch_src/issues/53 - non-existing weapons are not displayed. This makes the defense menu empty when you are poor, but it is still better than the old way with "$0" prices
|
||||||
- (fix) https://github.com/pkali/scorch_src/issues/49 - seppuku should always kill now
|
- (fix) https://github.com/pkali/scorch_src/issues/49 - seppuku should always kill now
|
||||||
@@ -91,7 +115,7 @@ Other small fixes:
|
|||||||
2022-04-10
|
2022-04-10
|
||||||
- https://github.com/pkali/scorch_src/issues/34 - plot pointer visible only when missile is out of the screen
|
- https://github.com/pkali/scorch_src/issues/34 - plot pointer visible only when missile is out of the screen
|
||||||
- https://github.com/pkali/scorch_src/issues/33 - Poor AIs do not purchase non-working weapons
|
- https://github.com/pkali/scorch_src/issues/33 - Poor AIs do not purchase non-working weapons
|
||||||
- https://github.com/pkali/scorch_src/issues/32 - Basic is turned off right on the beginning of loading. Dracon reported problems with running the game in Altirra, this was the best idea I had about it. Maybe next will be removing from zero page LZSS routine by @dmsc
|
- https://github.com/pkali/scorch_src/issues/32 - Basic is turned off right on the beginning of loading. Dracon reported problems with running the game in Altirra, this was the best idea I had about it. Maybe next will be removing LZSS routine by @dmsc from zero page
|
||||||
- https://github.com/pkali/scorch_src/issues/31 - STA WSYNC removed from missile flight delay
|
- https://github.com/pkali/scorch_src/issues/31 - STA WSYNC removed from missile flight delay
|
||||||
- https://github.com/pkali/scorch_src/issues/30 - player level remembered between rounds, thx @KrzysRog
|
- https://github.com/pkali/scorch_src/issues/30 - player level remembered between rounds, thx @KrzysRog
|
||||||
- https://github.com/pkali/scorch_src/issues/5 - funkybomb smoke stays on the edges of the screen
|
- https://github.com/pkali/scorch_src/issues/5 - funkybomb smoke stays on the edges of the screen
|
||||||
@@ -102,7 +126,7 @@ Other small fixes:
|
|||||||
- enhancement: https://github.com/pkali/scorch_src/issues/15 Add player colors to purchase screen. Still room to improvement!
|
- enhancement: https://github.com/pkali/scorch_src/issues/15 Add player colors to purchase screen. Still room to improvement!
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/22 Redesign information panel (top 2 lines of the game screen). Now game might make some sense for a newcomer :)
|
- enhancement: https://github.com/pkali/scorch_src/issues/22 Redesign information panel (top 2 lines of the game screen). Now game might make some sense for a newcomer :)
|
||||||
- change: https://github.com/pkali/scorch_src/issues/28 remove white lines around out-of-the-screen point tracker. Now it is visible and looks better!
|
- change: https://github.com/pkali/scorch_src/issues/28 remove white lines around out-of-the-screen point tracker. Now it is visible and looks better!
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/25 Missiles are too fast. Thanks @bocianu and @miker for the hint. Speed of the shell is configurable now, 5 speeds available.
|
- enhancement: https://github.com/pkali/scorch_src/issues/25 Missiles are too fast. Thanks @bocianu and @mikerro for the hint. Speed of the shell is configurable now, 5 speeds available.
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/27 Remember game settings between games.
|
- enhancement: https://github.com/pkali/scorch_src/issues/27 Remember game settings between games.
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/24 Remember player names between games. Thanks @bocianu
|
- enhancement: https://github.com/pkali/scorch_src/issues/24 Remember player names between games. Thanks @bocianu
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ forceNow
|
|||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|
||||||
endo
|
endo
|
||||||
ldx TankNr ;this is possibly not necessary
|
;ldx TankNr ;this is possibly not necessary
|
||||||
lda NewAngle
|
lda NewAngle
|
||||||
sta PreviousAngle,x
|
sta PreviousAngle,x
|
||||||
lda EnergyTableL,x
|
lda EnergyTableL,x
|
||||||
@@ -214,6 +214,7 @@ skipThisPlayer
|
|||||||
forceNow
|
forceNow
|
||||||
mwa #300 RandBoundaryLow
|
mwa #300 RandBoundaryLow
|
||||||
mwa #700 RandBoundaryHigh
|
mwa #700 RandBoundaryHigh
|
||||||
|
ldx TankNr
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|
||||||
endo
|
endo
|
||||||
|
|||||||
+28
-3
@@ -45,11 +45,16 @@ regX .ds 1
|
|||||||
regY .ds 1
|
regY .ds 1
|
||||||
; --- MAIN PROGRAM
|
; --- MAIN PROGRAM
|
||||||
org $2000
|
org $2000
|
||||||
ant dta $F0
|
ant dta $80
|
||||||
dta $42,a(scr),$02,$02,$02,$02,$02,$02,$02,$02,$02,$82,$02,$02,$02,$02,$82
|
dta $42,a(scr),$02,$02,$02,$02,$02,$02,$02,$02,$02,$82,$02,$02,$02,$02,$82
|
||||||
dta $02,$02,$02,$82,$82,$82,$02,$82,$02,$02,$02,$82,$70
|
dta $02,$02,$02,$82,$82,$82,$02,$82,$02,$02,$02,$82
|
||||||
|
dta $42,a(verline)
|
||||||
dta $41,a(ant)
|
dta $41,a(ant)
|
||||||
|
|
||||||
|
verline
|
||||||
|
:37 dta d" "
|
||||||
|
build
|
||||||
|
|
||||||
scr ins "HIMARS14.scr"
|
scr ins "HIMARS14.scr"
|
||||||
|
|
||||||
.ds 2*40
|
.ds 2*40
|
||||||
@@ -202,6 +207,19 @@ main
|
|||||||
|
|
||||||
lda:cmp:req $14 ;wait 1 frame
|
lda:cmp:req $14 ;wait 1 frame
|
||||||
|
|
||||||
|
; copy system font to $a000
|
||||||
|
ldx #0
|
||||||
|
@ lda $e000,x
|
||||||
|
sta $a000,x
|
||||||
|
;lda $e100,x ; i need digits only :]
|
||||||
|
;sta $a100,x
|
||||||
|
;lda $e200,x
|
||||||
|
;sta $a200,x
|
||||||
|
;lda $e300,x
|
||||||
|
;sta $a300,x
|
||||||
|
inx
|
||||||
|
bne @-
|
||||||
|
|
||||||
sei ;stop IRQ interrupts
|
sei ;stop IRQ interrupts
|
||||||
mva #$00 nmien ;stop NMI interrupts
|
mva #$00 nmien ;stop NMI interrupts
|
||||||
sta dmactl
|
sta dmactl
|
||||||
@@ -249,6 +267,11 @@ stop
|
|||||||
@ sta POKEY,x
|
@ sta POKEY,x
|
||||||
dex
|
dex
|
||||||
bpl @-
|
bpl @-
|
||||||
|
|
||||||
|
;no glitching please (issue #67)
|
||||||
|
lda #0
|
||||||
|
sta $D400 ;dmactl
|
||||||
|
sta $022F ;dmactls
|
||||||
rts ;return to ... DOS
|
rts ;return to ... DOS
|
||||||
|
|
||||||
; --- DLI PROGRAM
|
; --- DLI PROGRAM
|
||||||
@@ -339,8 +362,10 @@ dli7
|
|||||||
dli11
|
dli11
|
||||||
sta regA
|
sta regA
|
||||||
|
|
||||||
lda #$01
|
lda #>$a000 ; system font
|
||||||
sta wsync ;line=232
|
sta wsync ;line=232
|
||||||
|
sta chbase
|
||||||
|
lda #$01
|
||||||
sta gtictl
|
sta gtictl
|
||||||
|
|
||||||
lda regA
|
lda regA
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
icl '../lib/atari.hea'
|
||||||
|
|
||||||
|
org $2000
|
||||||
|
joytest
|
||||||
|
mva #0 dmactls
|
||||||
|
|
||||||
|
@
|
||||||
|
lda trig0
|
||||||
|
beq pressed
|
||||||
|
mva #0 colbak
|
||||||
|
beq @-
|
||||||
|
pressed
|
||||||
|
lda #$0f
|
||||||
|
;ora jstick0
|
||||||
|
sta colbak
|
||||||
|
jmp @-
|
||||||
|
|
||||||
|
run joytest
|
||||||
|
|
||||||
Binary file not shown.
+12
-100
@@ -5,7 +5,14 @@
|
|||||||
;===================================================================================
|
;===================================================================================
|
||||||
;==========================CONSTANT TABLES, do not erase!===========================
|
;==========================CONSTANT TABLES, do not erase!===========================
|
||||||
;===================================================================================
|
;===================================================================================
|
||||||
TankColoursTable .BYTE $52,$32,$72,$92,$B2,$02
|
TankColoursTable .BYTE $88,$cc,$38,$1c,$6a,$02
|
||||||
|
TankStatusColoursTable .BYTE $80,$c0,$30,$10,$60,$00
|
||||||
|
dliColorsBack
|
||||||
|
:10 .by $02,$00
|
||||||
|
dliColorsFore
|
||||||
|
.by $0a
|
||||||
|
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
|
||||||
|
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,<500,<800,<1000
|
||||||
CashOptionH
|
CashOptionH
|
||||||
@@ -189,99 +196,6 @@ sintable
|
|||||||
.by 255
|
.by 255
|
||||||
.by 255 ;anti self destruction byte
|
.by 255 ;anti self destruction byte
|
||||||
|
|
||||||
costable
|
|
||||||
.by 255 ;anti self destruction byte
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 254
|
|
||||||
.by 254
|
|
||||||
.by 253
|
|
||||||
.by 252
|
|
||||||
.by 252
|
|
||||||
.by 251
|
|
||||||
.by 250
|
|
||||||
.by 249
|
|
||||||
.by 248
|
|
||||||
.by 247
|
|
||||||
.by 246
|
|
||||||
.by 244
|
|
||||||
.by 243
|
|
||||||
.by 242
|
|
||||||
.by 240
|
|
||||||
.by 238
|
|
||||||
.by 237
|
|
||||||
.by 235
|
|
||||||
.by 233
|
|
||||||
.by 232
|
|
||||||
.by 230
|
|
||||||
.by 228
|
|
||||||
.by 226
|
|
||||||
.by 223
|
|
||||||
.by 221
|
|
||||||
.by 219
|
|
||||||
.by 217
|
|
||||||
.by 214
|
|
||||||
.by 212
|
|
||||||
.by 209
|
|
||||||
.by 207
|
|
||||||
.by 204
|
|
||||||
.by 201
|
|
||||||
.by 198
|
|
||||||
.by 196
|
|
||||||
.by 193
|
|
||||||
.by 190
|
|
||||||
.by 187
|
|
||||||
.by 184
|
|
||||||
.by 181
|
|
||||||
.by 177
|
|
||||||
.by 174
|
|
||||||
.by 171
|
|
||||||
.by 167
|
|
||||||
.by 164
|
|
||||||
.by 161
|
|
||||||
.by 157
|
|
||||||
.by 154
|
|
||||||
.by 150
|
|
||||||
.by 146
|
|
||||||
.by 143
|
|
||||||
.by 139
|
|
||||||
.by 135
|
|
||||||
.by 131
|
|
||||||
.by 128
|
|
||||||
.by 124
|
|
||||||
.by 120
|
|
||||||
.by 116
|
|
||||||
.by 112
|
|
||||||
.by 108
|
|
||||||
.by 104
|
|
||||||
.by 100
|
|
||||||
.by 95
|
|
||||||
.by 91
|
|
||||||
.by 87
|
|
||||||
.by 83
|
|
||||||
.by 79
|
|
||||||
.by 74
|
|
||||||
.by 70
|
|
||||||
.by 66
|
|
||||||
.by 61
|
|
||||||
.by 57
|
|
||||||
.by 53
|
|
||||||
.by 48
|
|
||||||
.by 44
|
|
||||||
.by 40
|
|
||||||
.by 35
|
|
||||||
.by 31
|
|
||||||
.by 26
|
|
||||||
.by 22
|
|
||||||
.by 17
|
|
||||||
.by 13
|
|
||||||
.by 8
|
|
||||||
.by 4
|
|
||||||
.by 0
|
|
||||||
|
|
||||||
linetableL
|
linetableL
|
||||||
:screenheight+1 .by <(display+screenBytes*#)
|
:screenheight+1 .by <(display+screenBytes*#)
|
||||||
linetableH
|
linetableH
|
||||||
@@ -698,7 +612,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
|||||||
.by >price_Auto_Defense___
|
.by >price_Auto_Defense___
|
||||||
.by >price_Fuel_Tank______
|
.by >price_Fuel_Tank______
|
||||||
.by >price_Contact_Trigger
|
.by >price_Contact_Trigger
|
||||||
.by >price______________63
|
.by >price_White_Flag_____
|
||||||
|
|
||||||
WeaponPriceL
|
WeaponPriceL
|
||||||
.by <price_Baby_Missile___
|
.by <price_Baby_Missile___
|
||||||
@@ -764,7 +678,7 @@ WeaponPriceL
|
|||||||
.by <price_Auto_Defense___
|
.by <price_Auto_Defense___
|
||||||
.by <price_Fuel_Tank______
|
.by <price_Fuel_Tank______
|
||||||
.by <price_Contact_Trigger
|
.by <price_Contact_Trigger
|
||||||
.by <price______________63
|
.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
|
||||||
@@ -836,7 +750,7 @@ WeaponUnits
|
|||||||
.by 1 ;Auto_Defense___
|
.by 1 ;Auto_Defense___
|
||||||
.by 10 ;Fuel_Tank______
|
.by 10 ;Fuel_Tank______
|
||||||
.by 25 ;Contact_Trigger
|
.by 25 ;Contact_Trigger
|
||||||
.by 0 ;_____________63
|
.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
|
||||||
@@ -968,7 +882,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
|||||||
dta d"Auto Defense " ; 60
|
dta d"Auto Defense " ; 60
|
||||||
dta d"Fuel Tank " ; 61
|
dta d"Fuel Tank " ; 61
|
||||||
dta d"Contact Trigger " ; 62
|
dta d"Contact Trigger " ; 62
|
||||||
dta d"----------------" ; 63
|
dta d"White Flag " ; 63
|
||||||
weaponsOfDeath
|
weaponsOfDeath
|
||||||
dta 0,1,2,3,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27
|
dta 0,1,2,3,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||||
joyToKeyTable
|
joyToKeyTable
|
||||||
@@ -989,7 +903,5 @@ scrcodes
|
|||||||
dta d"qrstuvwx"
|
dta d"qrstuvwx"
|
||||||
dta d"yz123456"
|
dta d"yz123456"
|
||||||
dta d"7890." ; "-"
|
dta d"7890." ; "-"
|
||||||
dliColors
|
|
||||||
:10 .by $02,$00
|
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
+29
-29
@@ -74,35 +74,35 @@ price_Super_Mag______ = $ffff ;_59
|
|||||||
price_Auto_Defense___ = $ffff ;_60
|
price_Auto_Defense___ = $ffff ;_60
|
||||||
price_Fuel_Tank______ = $ffff ;_61
|
price_Fuel_Tank______ = $ffff ;_61
|
||||||
price_Contact_Trigger = $ffff ;_62
|
price_Contact_Trigger = $ffff ;_62
|
||||||
price______________63 = $ffff
|
price_White_Flag_____ = $0 ;_63
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; names of RMT instruments (sfx)
|
; names of RMT instruments (sfx)
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
sfx_set_power_1 = $00
|
sfx_set_power_1 = $00 ;A
|
||||||
sfx_set_power_2 = $01
|
sfx_set_power_2 = $01 ;b
|
||||||
sfx_lightning = $02
|
sfx_lightning = $02 ;c
|
||||||
sfx_dunno = $03
|
sfx_dunno = $03 ;d
|
||||||
sfx_nuke = $04
|
sfx_nuke = $04 ;e
|
||||||
sfx_baby_missile= $05
|
sfx_baby_missile= $05 ;f
|
||||||
sfx_death_begin = $06
|
sfx_death_begin = $06 ;g
|
||||||
sfx_plasma_1_2 = $07
|
sfx_plasma_1_2 = $07 ;h
|
||||||
sfx_plasma_2_2 = $08
|
sfx_plasma_2_2 = $08 ;i
|
||||||
sfx_napalm = $09
|
sfx_napalm = $09 ;j
|
||||||
sfx_dirt_charge = $0a
|
sfx_dirt_charge = $0a ;k
|
||||||
sfx_missile_hit = $0b
|
sfx_missile_hit = $0b ;l
|
||||||
sfx_funky_hit = $0c
|
sfx_funky_hit = $0c ;m
|
||||||
sfx_shield_on = $0d
|
sfx_shield_on = $0d ;n
|
||||||
sfx_shield_off = $0e
|
sfx_shield_off = $0e ;o
|
||||||
sfx_parachute = $0f
|
sfx_parachute = $0f ;p
|
||||||
sfx_smoke_cloud = $10
|
sfx_smoke_cloud = $10 ;q
|
||||||
sfx_riot_blast = $11
|
sfx_riot_blast = $11 ;r
|
||||||
sfx_sandhog = $12
|
sfx_sandhog = $12 ;s
|
||||||
sfx_dirt_chrg_s = $13
|
sfx_dirt_chrg_s = $13 ;t
|
||||||
sfx_digger = $14
|
sfx_digger = $14 ;u
|
||||||
sfx_silencer = $15
|
sfx_silencer = $15 ;v
|
||||||
sfx_next_player = $16
|
sfx_next_player = $16 ;w
|
||||||
sfx_purchase = $17
|
sfx_purchase = $17 ;x
|
||||||
sfx_keyclick = $18
|
sfx_keyclick = $18 ;y
|
||||||
sfx_shoot = $19
|
sfx_shoot = $19 ;z
|
||||||
sfx_seppuku = $1a
|
sfx_seppuku = $1a ;1
|
||||||
sfx_liquid_dirt = $1b
|
sfx_liquid_dirt = $1b ;2
|
||||||
|
|||||||
+7
-7
@@ -40,8 +40,8 @@ NameDL
|
|||||||
.byte $42
|
.byte $42
|
||||||
.word NameScreen
|
.word NameScreen
|
||||||
.byte $30
|
.byte $30
|
||||||
.byte $02,$30,$2
|
.byte $02,$30+$80,$02
|
||||||
.byte $10,2,2,2,$30,2,2
|
.byte $10,$02,$02,$02,$30,$02,$02
|
||||||
.byte $41
|
.byte $41
|
||||||
.word NameDL
|
.word NameDL
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
@@ -142,7 +142,7 @@ WeaponsDescription
|
|||||||
EmptyLine
|
EmptyLine
|
||||||
dta d" "
|
dta d" "
|
||||||
LastLine
|
LastLine
|
||||||
:40 dta $ff
|
:40 dta $00
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
|
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
|
||||||
NameScreen
|
NameScreen
|
||||||
@@ -154,7 +154,7 @@ NameAdr
|
|||||||
dta d" "
|
dta d" "
|
||||||
NamesOfLevels
|
NamesOfLevels
|
||||||
dta d" HUMAN Moron Shooter "
|
dta d" HUMAN Moron Shooter "
|
||||||
dta d" Poolshark Toosser Chooser "
|
dta d" Poolshark Tosser Chooser "
|
||||||
dta d" Spoiler Cyborg Unknown "
|
dta d" Spoiler Cyborg Unknown "
|
||||||
dta d" "
|
dta d" "
|
||||||
dta d"Tab"*
|
dta d"Tab"*
|
||||||
@@ -166,10 +166,10 @@ NamesOfLevels
|
|||||||
textbuffer
|
textbuffer
|
||||||
; 0123456789012345678901234567890123456789
|
; 0123456789012345678901234567890123456789
|
||||||
dta d"Player: "
|
dta d"Player: "
|
||||||
dta d"Energy: 99 Angle: <99> Force: 9999 "
|
dta d"Energy: Angle: Force: "
|
||||||
dta d" Round: 99 Wind: <99> "
|
dta d" Round: Wind: "
|
||||||
textbuffer2
|
textbuffer2
|
||||||
dta d"Player: ******** Cash: 99990 "
|
dta d"Player: Cash: "
|
||||||
dta d"----------------------------------------"
|
dta d"----------------------------------------"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+43
-36
@@ -441,8 +441,9 @@ splot8 .proc
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
clearscreen .proc
|
clearscreen .proc
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #0
|
|
||||||
tax
|
lda #$ff
|
||||||
|
ldx #0
|
||||||
@
|
@
|
||||||
:31 sta display+($100*#),x
|
:31 sta display+($100*#),x
|
||||||
sta display+$1e50,x ; this is so no space outside of the screen is cleared
|
sta display+$1e50,x ; this is so no space outside of the screen is cleared
|
||||||
@@ -629,7 +630,7 @@ 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 offser
|
adc #$24 ; 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
|
||||||
@@ -676,13 +677,16 @@ drawmountains .proc
|
|||||||
|
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
|
mva #1 color
|
||||||
|
|
||||||
drawmountainsloop
|
drawmountainsloop
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
|
cmp #screenheight
|
||||||
|
beq NoMountain
|
||||||
sta ydraw
|
sta ydraw
|
||||||
jsr DrawLine
|
jsr DrawLine
|
||||||
|
NoMountain
|
||||||
inw modify
|
inw modify
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw #screenwidth
|
cpw xdraw #screenwidth
|
||||||
@@ -941,14 +945,14 @@ EndDrawing
|
|||||||
; ****************************************************
|
; ****************************************************
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
calculatemountains0 .proc
|
calculatemountains0 .proc
|
||||||
; Only for testing - makes ground flat (one pixel)
|
; Only for testing - makes ground flat (0 pixels)
|
||||||
; and places tanks on it
|
; and places tanks on it
|
||||||
; remember to remove in final compilation :)
|
; remember to remove in final compilation :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
nextPointDrawing
|
nextPointDrawing
|
||||||
adw xdraw #mountaintable modify
|
adw xdraw #mountaintable modify
|
||||||
lda #screenheight-1
|
lda #screenheight
|
||||||
ldy #0
|
ldy #0
|
||||||
sta (modify),y
|
sta (modify),y
|
||||||
inw xdraw
|
inw xdraw
|
||||||
@@ -957,7 +961,7 @@ nextPointDrawing
|
|||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
SetYofNextTank
|
SetYofNextTank
|
||||||
lda #screenheight-2
|
lda #screenheight-1
|
||||||
sta ytankstable,x
|
sta ytankstable,x
|
||||||
dex
|
dex
|
||||||
bpl SetYofNextTank
|
bpl SetYofNextTank
|
||||||
@@ -1021,7 +1025,7 @@ MakeUnPlot
|
|||||||
|
|
||||||
|
|
||||||
lda color
|
lda color
|
||||||
beq ClearUnPlot
|
bne ClearUnPlot
|
||||||
|
|
||||||
;plotting here
|
;plotting here
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
@@ -1033,7 +1037,7 @@ ClearUnPlot
|
|||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
sta OldOraTemp
|
sta OldOraTemp
|
||||||
and bittable2,x
|
and bittable2,x
|
||||||
; sta (xbyte),y
|
sta (xbyte),y
|
||||||
ContinueUnPlot
|
ContinueUnPlot
|
||||||
ldx WhichUnPlot
|
ldx WhichUnPlot
|
||||||
lda OldOraTemp
|
lda OldOraTemp
|
||||||
@@ -1115,7 +1119,7 @@ MakePlot
|
|||||||
|
|
||||||
ldx ybit
|
ldx ybit
|
||||||
lda color
|
lda color
|
||||||
beq ClearPlot
|
bne ClearPlot
|
||||||
|
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
ora bittable,x
|
ora bittable,x
|
||||||
@@ -1163,6 +1167,7 @@ point .proc
|
|||||||
|
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and bittable,x
|
and bittable,x
|
||||||
|
eor bittable,x
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -1174,7 +1179,7 @@ DrawLine .proc
|
|||||||
sec
|
sec
|
||||||
sbc ydraw
|
sbc ydraw
|
||||||
sta tempbyte01
|
sta tempbyte01
|
||||||
jsr plot
|
jsr plot.MakePlot
|
||||||
;rts
|
;rts
|
||||||
jmp IntoDraw ; jumps inside Draw routine
|
jmp IntoDraw ; jumps inside Draw routine
|
||||||
; because one pixel is already plotted
|
; because one pixel is already plotted
|
||||||
@@ -1183,7 +1188,7 @@ DrawLine .proc
|
|||||||
loopdraw
|
loopdraw
|
||||||
|
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
ora bittable,x
|
and bittable2,x
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
IntoDraw adw xbyte #screenBytes
|
IntoDraw adw xbyte #screenBytes
|
||||||
|
|
||||||
@@ -1214,8 +1219,9 @@ TypeChar .proc
|
|||||||
ldy #7
|
ldy #7
|
||||||
CopyChar
|
CopyChar
|
||||||
lda (fontind),y
|
lda (fontind),y
|
||||||
|
eor #$ff
|
||||||
sta char1,y
|
sta char1,y
|
||||||
lda #$00
|
lda #$ff
|
||||||
sta char2,y
|
sta char2,y
|
||||||
dey
|
dey
|
||||||
bpl CopyChar
|
bpl CopyChar
|
||||||
@@ -1224,8 +1230,9 @@ CopyChar
|
|||||||
ldy #7
|
ldy #7
|
||||||
CopyMask
|
CopyMask
|
||||||
lda (fontind),y
|
lda (fontind),y
|
||||||
|
eor #$ff
|
||||||
sta mask1,y
|
sta mask1,y
|
||||||
lda #$ff
|
lda #$00
|
||||||
sta mask2,y
|
sta mask2,y
|
||||||
dey
|
dey
|
||||||
bpl CopyMask
|
bpl CopyMask
|
||||||
@@ -1257,44 +1264,44 @@ CopyMask
|
|||||||
ldx ybit
|
ldx ybit
|
||||||
beq MaskOK00
|
beq MaskOK00
|
||||||
MakeMask00
|
MakeMask00
|
||||||
sec
|
lsr mask1
|
||||||
ror mask1
|
|
||||||
ror mask2
|
ror mask2
|
||||||
sec
|
lsr mask1+1
|
||||||
ror mask1+1
|
|
||||||
ror mask2+1
|
ror mask2+1
|
||||||
sec
|
lsr mask1+2
|
||||||
ror mask1+2
|
|
||||||
ror mask2+2
|
ror mask2+2
|
||||||
sec
|
lsr mask1+3
|
||||||
ror mask1+3
|
|
||||||
ror mask2+3
|
ror mask2+3
|
||||||
sec
|
lsr mask1+4
|
||||||
ror mask1+4
|
|
||||||
ror mask2+4
|
ror mask2+4
|
||||||
sec
|
lsr mask1+5
|
||||||
ror mask1+5
|
|
||||||
ror mask2+5
|
ror mask2+5
|
||||||
sec
|
lsr mask1+6
|
||||||
ror mask1+6
|
|
||||||
ror mask2+6
|
ror mask2+6
|
||||||
sec
|
lsr mask1+7
|
||||||
ror mask1+7
|
|
||||||
ror mask2+7
|
ror mask2+7
|
||||||
lsr char1
|
sec
|
||||||
|
ror char1
|
||||||
ror char2
|
ror char2
|
||||||
|
sec
|
||||||
ror char1+1
|
ror char1+1
|
||||||
ror char2+1
|
ror char2+1
|
||||||
|
sec
|
||||||
ror char1+2
|
ror char1+2
|
||||||
ror char2+2
|
ror char2+2
|
||||||
|
sec
|
||||||
ror char1+3
|
ror char1+3
|
||||||
ror char2+3
|
ror char2+3
|
||||||
|
sec
|
||||||
ror char1+4
|
ror char1+4
|
||||||
ror char2+4
|
ror char2+4
|
||||||
|
sec
|
||||||
ror char1+5
|
ror char1+5
|
||||||
ror char2+5
|
ror char2+5
|
||||||
|
sec
|
||||||
ror char1+6
|
ror char1+6
|
||||||
ror char2+6
|
ror char2+6
|
||||||
|
sec
|
||||||
ror char1+7
|
ror char1+7
|
||||||
ror char2+7
|
ror char2+7
|
||||||
dex
|
dex
|
||||||
@@ -1303,7 +1310,7 @@ MaskOK00
|
|||||||
; here x=0
|
; here x=0
|
||||||
lda Erase
|
lda Erase
|
||||||
beq CharLoopi ; it works, because x=0
|
beq CharLoopi ; it works, because x=0
|
||||||
lda #0
|
lda #$ff
|
||||||
ldx #7
|
ldx #7
|
||||||
EmptyChar
|
EmptyChar
|
||||||
sta char1,x
|
sta char1,x
|
||||||
@@ -1313,13 +1320,13 @@ EmptyChar
|
|||||||
ldx #0
|
ldx #0
|
||||||
CharLoopi
|
CharLoopi
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and mask1,x
|
ora mask1,x
|
||||||
ora char1,x
|
and char1,x
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
iny
|
iny
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and mask2,x
|
ora mask2,x
|
||||||
ora char2,x
|
and char2,x
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
adw xbyte #screenBytes
|
adw xbyte #screenBytes
|
||||||
|
|||||||
@@ -76,6 +76,9 @@
|
|||||||
.MACRO WAIT
|
.MACRO WAIT
|
||||||
; WAIT
|
; WAIT
|
||||||
; waits one frame (1/50 s(PAL) or 1/60s(NTSC))
|
; waits one frame (1/50 s(PAL) or 1/60s(NTSC))
|
||||||
|
lda CONSOL
|
||||||
|
cmp #6 ; START KEY
|
||||||
|
beq ?nowait
|
||||||
LDA VCOUNT
|
LDA VCOUNT
|
||||||
ldy vcount
|
ldy vcount
|
||||||
?WA cpy VCOUNT
|
?WA cpy VCOUNT
|
||||||
@@ -83,6 +86,7 @@
|
|||||||
?wframe
|
?wframe
|
||||||
cmp vcount
|
cmp vcount
|
||||||
bne ?wframe
|
bne ?wframe
|
||||||
|
?nowait
|
||||||
.ENDM
|
.ENDM
|
||||||
;-------------------------------------
|
;-------------------------------------
|
||||||
.macro negw
|
.macro negw
|
||||||
|
|||||||
+111
-97
@@ -3,7 +3,7 @@
|
|||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
|
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
|
||||||
;Warsaw 2000,2001,2002,2003,2009,2012,2013
|
;Warsaw 2000,2001,2002,2003,2009,2012,2013
|
||||||
;Miami 2022
|
;Miami&Warsaw 2022
|
||||||
;you can contact us at pecus@poczta.fm or pirx@5oft.pl
|
;you can contact us at pecus@poczta.fm or pirx@5oft.pl
|
||||||
;home page of this project is https://github.com/pkali/scorch_src
|
;home page of this project is https://github.com/pkali/scorch_src
|
||||||
|
|
||||||
@@ -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"139" ; number of this build (3 bytes)
|
dta d"141" ; number of this build (3 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
@@ -116,54 +116,35 @@ START
|
|||||||
|
|
||||||
; Startup sequence
|
; Startup sequence
|
||||||
jsr Initialize
|
jsr Initialize
|
||||||
VMAIN VBLinterrupt,6 ; jsr SetVBL
|
|
||||||
|
|
||||||
mwa #OptionsDL dlptrs
|
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$02 ; normal screen width
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
jsr Options ;startup screen
|
jsr Options ;startup screen
|
||||||
|
lda escFlag
|
||||||
|
bne START
|
||||||
|
|
||||||
;entering names of players
|
jsr EnterPlayerNames
|
||||||
mwa #NameDL dlptrs
|
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$01 ; narrow screen (32 chars)
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
mva #0 TankNr
|
|
||||||
|
|
||||||
@ jsr EnterPlayerName
|
|
||||||
inc TankNr
|
|
||||||
lda TankNr
|
|
||||||
cmp NumberOfPlayers
|
|
||||||
bne @-
|
|
||||||
|
|
||||||
mwa #dl dlptrs
|
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$02 ; normal screen width
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
VDLI DLIinterrupt ; jsr SetDLI
|
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||||
|
|
||||||
jsr CallPurchaseForEveryTank
|
jsr CallPurchaseForEveryTank
|
||||||
|
|
||||||
mwa #dl dlptrs
|
; issue #72 (glitches when switches)
|
||||||
|
mva #0 dmactl
|
||||||
lda dmactls
|
lda dmactls
|
||||||
and #$fc
|
and #$fc
|
||||||
ora #$02 ; 2=normal, 3 = wide screen width
|
;ora #$02 ; 2=normal, 3 = wide screen width, 0 = no screen
|
||||||
sta dmactls
|
sta dmactls
|
||||||
|
|
||||||
jsr GetRandomWind
|
jsr GetRandomWind
|
||||||
|
|
||||||
jsr Round
|
jsr RoundInit
|
||||||
|
|
||||||
|
jsr MainRoundLoop
|
||||||
|
mva #0 TankNr ;
|
||||||
|
|
||||||
jsr SortSequence
|
jsr SortSequence
|
||||||
|
|
||||||
@@ -180,15 +161,7 @@ MainGameLoop
|
|||||||
; Results are number of other deaths
|
; Results are number of other deaths
|
||||||
; before the player dies itself
|
; before the player dies itself
|
||||||
|
|
||||||
; add gains and substract losses
|
|
||||||
; gain is what player gets for lost energy of opponents
|
|
||||||
; energy lost by opponents is added during Round and
|
|
||||||
; little below in source, multiplied by 2 to get "dollars".
|
|
||||||
; By analogy, loss is energy that given player losses during
|
|
||||||
; each Round.
|
|
||||||
; Important! If player has 10 energy and gets a central hit
|
|
||||||
; from nuke that would take 90 energy points, his loss
|
|
||||||
; is 90, not 10
|
|
||||||
jsr DisplayResults
|
jsr DisplayResults
|
||||||
|
|
||||||
;check demo mode
|
;check demo mode
|
||||||
@@ -209,6 +182,16 @@ noKey
|
|||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
CalculateGains
|
CalculateGains
|
||||||
|
; add gains and substract losses
|
||||||
|
; gain is what player gets for lost energy of opponents
|
||||||
|
; energy lost by opponents is added during Round and
|
||||||
|
; little below in source, multiplied by 2 to get "dollars".
|
||||||
|
; By analogy, loss is energy that given player losses during
|
||||||
|
; each Round.
|
||||||
|
; Important! If player has 10 energy and gets a central hit
|
||||||
|
; from nuke that would take 90 energy points, his loss
|
||||||
|
; is 90, not 10
|
||||||
|
|
||||||
; add gain * 2
|
; add gain * 2
|
||||||
asl gainL,x
|
asl gainL,x
|
||||||
rol gainH,x
|
rol gainH,x
|
||||||
@@ -249,13 +232,14 @@ skipzeroing
|
|||||||
lda GameIsOver
|
lda GameIsOver
|
||||||
jne START
|
jne START
|
||||||
|
|
||||||
|
|
||||||
inc CurrentRoundNr
|
inc CurrentRoundNr
|
||||||
|
mva #0 dmactl ; issue #72
|
||||||
|
mva #sfx_silencer sfx_effect
|
||||||
jmp MainGameLoop
|
jmp MainGameLoop
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Round .proc ;
|
.proc RoundInit
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; at the beginning of each Round we set energy
|
; at the beginning of each Round we set energy
|
||||||
; of all players to 99
|
; of all players to 99
|
||||||
@@ -264,7 +248,7 @@ Round .proc ;
|
|||||||
; the shooting angle is randomized
|
; the shooting angle is randomized
|
||||||
; of course gains an looses are zeroed
|
; of course gains an looses are zeroed
|
||||||
|
|
||||||
jsr StatusDisplay
|
;jsr StatusDisplay
|
||||||
lda #0
|
lda #0
|
||||||
tax
|
tax
|
||||||
@
|
@
|
||||||
@@ -286,20 +270,20 @@ SettingEnergies
|
|||||||
sta LASTeXistenZ,x
|
sta LASTeXistenZ,x
|
||||||
; anything in eXistenZ table means that this tank exist
|
; anything in eXistenZ table means that this tank exist
|
||||||
; in the given round
|
; in the given round
|
||||||
lda #232
|
lda #<1000
|
||||||
sta MaxEnergyTableL,x
|
sta MaxEnergyTableL,x
|
||||||
lda #3
|
lda #>1000
|
||||||
sta MaxEnergyTableH,x
|
sta MaxEnergyTableH,x
|
||||||
lda #94
|
lda #<350
|
||||||
sta EnergyTableL,x
|
sta EnergyTableL,x
|
||||||
lda #1
|
lda #>350
|
||||||
sta EnergyTableH,x
|
sta EnergyTableH,x
|
||||||
|
|
||||||
;lda #(255-45)
|
;lda #(255-45)
|
||||||
;it does not look good when all tanks have
|
;it does not look good when all tanks have
|
||||||
;barrels pointing the same direction
|
;barrels pointing the same direction
|
||||||
;so it would be nice to have more or less random
|
;so it would be nice to have more or less random
|
||||||
;angles
|
;angles
|
||||||
|
|
||||||
jsr RandomizeAngle
|
jsr RandomizeAngle
|
||||||
sta AngleTable,x
|
sta AngleTable,x
|
||||||
|
|
||||||
@@ -313,18 +297,27 @@ SettingEnergies
|
|||||||
jsr PMoutofScreen ;let P/M disappear
|
jsr PMoutofScreen ;let P/M disappear
|
||||||
jsr clearscreen ;let the screen be clean
|
jsr clearscreen ;let the screen be clean
|
||||||
jsr placetanks ;let the tanks be evenly placed
|
jsr placetanks ;let the tanks be evenly placed
|
||||||
jsr calculatemountains ;let mountains be nice for the eye
|
jsr calculatemountains ;let mountains be easy for the eye
|
||||||
; jsr calculatemountains0 ;only fort tests - makes mountains flat and one pixel height
|
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
jsr drawmountains ;draw them
|
jsr drawmountains ;draw them
|
||||||
jsr drawtanks ;finally draw tanks
|
jsr drawtanks ;finally draw tanks
|
||||||
|
|
||||||
.endp ; not really end of the procedure, but just for now. TODO: revisit.
|
|
||||||
|
|
||||||
;--------------------round screen is ready---------
|
|
||||||
|
|
||||||
mva #0 TankSequencePointer
|
mva #0 TankSequencePointer
|
||||||
|
;--------------------round screen is ready---------
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
MainRoundLoop
|
;--------------------------------------------------
|
||||||
|
.proc MainRoundLoop
|
||||||
; here we must check if by a chance there is only one
|
; here we must check if by a chance there is only one
|
||||||
; tank with energy greater than 0 left
|
; tank with energy greater than 0 left
|
||||||
|
|
||||||
@@ -395,7 +388,7 @@ DoNotFinishTheRound
|
|||||||
|
|
||||||
mva #1 color ;to display flying point
|
mva #1 color ;to display flying point
|
||||||
|
|
||||||
lda TankColoursTable,x
|
lda TankStatusColoursTable,x
|
||||||
sta colpf2s ; set color of status line
|
sta colpf2s ; set color of status line
|
||||||
|
|
||||||
lda SkillTable,x
|
lda SkillTable,x
|
||||||
@@ -494,7 +487,6 @@ SeteXistenZ
|
|||||||
sta L1
|
sta L1
|
||||||
|
|
||||||
;DATA L1,L2
|
;DATA L1,L2
|
||||||
;RESULT WH*256+L1
|
|
||||||
;Multiplication 8bit*8bit,
|
;Multiplication 8bit*8bit,
|
||||||
;result 16bit
|
;result 16bit
|
||||||
;this algiorithm is a little longer than in Ruszczyc 6502 book
|
;this algiorithm is a little longer than in Ruszczyc 6502 book
|
||||||
@@ -508,7 +500,7 @@ LP0
|
|||||||
ROR L1
|
ROR L1
|
||||||
BCC B0
|
BCC B0
|
||||||
CLC
|
CLC
|
||||||
ADC #10 ; multiplication by 10
|
ADC #10 ; multiplication by 10 (L2)
|
||||||
B0 DEY
|
B0 DEY
|
||||||
BNE LP0
|
BNE LP0
|
||||||
ror
|
ror
|
||||||
@@ -530,10 +522,9 @@ B0 DEY
|
|||||||
inc:lda TankSequencePointer
|
inc:lda TankSequencePointer
|
||||||
cmp NumberOfPlayers
|
cmp NumberOfPlayers
|
||||||
bne PlayersAgain
|
bne PlayersAgain
|
||||||
;mva 0 TankNr
|
|
||||||
mva #0 TankSequencePointer
|
mva #0 TankSequencePointer
|
||||||
|
|
||||||
PlayersAgain .proc
|
PlayersAgain
|
||||||
|
|
||||||
; In LASTeXistenZ there are values of eXistenZ before shoot
|
; In LASTeXistenZ there are values of eXistenZ before shoot
|
||||||
; from the next tank.
|
; from the next tank.
|
||||||
@@ -564,20 +555,19 @@ NoPlayerNoDeath
|
|||||||
bpl CheckingPlayersDeath
|
bpl CheckingPlayersDeath
|
||||||
; if processor is here it means there are no more explosions
|
; if processor is here it means there are no more explosions
|
||||||
jmp MainRoundLoop
|
jmp MainRoundLoop
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
.proc Seppuku
|
.proc Seppuku
|
||||||
lda #0
|
lda #0
|
||||||
sta FallDown1
|
sta FallDown1
|
||||||
sta FallDown2
|
sta FallDown2
|
||||||
lda #1
|
lda #1 ; Missile
|
||||||
jsr ExplosionDirect
|
jsr ExplosionDirect
|
||||||
jmp continueMainRoundLoopAfterSeppuku
|
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||||
.endp
|
.endp
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
PlayerXdeath .proc
|
PlayerXdeath
|
||||||
|
|
||||||
|
|
||||||
; this tank should not explode anymore:
|
; this tank should not explode anymore:
|
||||||
; there is 0 in A, and Tank Number in X, so...
|
; there is 0 in A, and Tank Number in X, so...
|
||||||
@@ -600,11 +590,9 @@ PlayerXdeath .proc
|
|||||||
adc ResultsTable,x
|
adc ResultsTable,x
|
||||||
sta ResultsTable,x
|
sta ResultsTable,x
|
||||||
inc CurrentResult
|
inc CurrentResult
|
||||||
.endp
|
|
||||||
|
|
||||||
|
|
||||||
mva #sfx_death_begin sfx_effect
|
mva #sfx_death_begin sfx_effect
|
||||||
|
|
||||||
;RandomizeDeffensiveText
|
;RandomizeDeffensiveText
|
||||||
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
|
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
|
||||||
sta TextNumberOff
|
sta TextNumberOff
|
||||||
@@ -658,7 +646,7 @@ MetodOfDeath
|
|||||||
tay
|
tay
|
||||||
lda weaponsOfDeath,y
|
lda weaponsOfDeath,y
|
||||||
jsr ExplosionDirect
|
jsr ExplosionDirect
|
||||||
mva #$15 sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
|
|
||||||
|
|
||||||
; jump to after explosion routines (soil fallout, etc.)
|
; jump to after explosion routines (soil fallout, etc.)
|
||||||
@@ -667,10 +655,10 @@ MetodOfDeath
|
|||||||
; a deadly shot here again.
|
; a deadly shot here again.
|
||||||
|
|
||||||
|
|
||||||
jmp AfterExplode
|
jmp MainRoundLoop.AfterExplode
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
DecreaseEnergyX .proc
|
.proc DecreaseEnergyX
|
||||||
;Decreases energy of player nr X
|
;Decreases energy of player nr X
|
||||||
;increases his financial loss
|
;increases his financial loss
|
||||||
;increases gain of tank TankNr
|
;increases gain of tank TankNr
|
||||||
@@ -756,7 +744,7 @@ loop05
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Initialize .proc
|
.proc Initialize
|
||||||
;Initialization sequence
|
;Initialization sequence
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
deletePtr = temp
|
deletePtr = temp
|
||||||
@@ -765,7 +753,7 @@ deletePtr = temp
|
|||||||
sta Erase
|
sta Erase
|
||||||
sta tracerflag
|
sta tracerflag
|
||||||
sta GameIsOver
|
sta GameIsOver
|
||||||
|
sta escFlag
|
||||||
|
|
||||||
; clean variables
|
; clean variables
|
||||||
tay
|
tay
|
||||||
@@ -784,8 +772,8 @@ deletePtr = temp
|
|||||||
jsr WeaponCleanup
|
jsr WeaponCleanup
|
||||||
|
|
||||||
|
|
||||||
mva #$2 colpf2s
|
mva #TextBackgroundColor colpf2s
|
||||||
mva #12 colpf3s
|
mva #TextForegroundColor colpf3s
|
||||||
mva #>WeaponFont chbas
|
mva #>WeaponFont chbas
|
||||||
|
|
||||||
;parameter for old plot (unPlot) max 5 points
|
;parameter for old plot (unPlot) max 5 points
|
||||||
@@ -797,6 +785,7 @@ SetunPlots
|
|||||||
sta oldplotH,x
|
sta oldplotH,x
|
||||||
lda #0
|
lda #0
|
||||||
sta oldply,x
|
sta oldply,x
|
||||||
|
lda #$ff
|
||||||
sta oldora,x
|
sta oldora,x
|
||||||
dex
|
dex
|
||||||
bpl SetunPlots
|
bpl SetunPlots
|
||||||
@@ -818,16 +807,16 @@ 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 #$50 ; temporary colours of sprites under tanks
|
lda TankColoursTable ; temporary colours of sprites under tanks
|
||||||
sta $2c0
|
sta $2c0
|
||||||
lda #$30
|
lda TankColoursTable+1
|
||||||
sta $2c1
|
sta $2c1
|
||||||
lda #$70
|
lda TankColoursTable+2
|
||||||
sta $2c2
|
sta $2c2
|
||||||
lda #$90
|
lda TankColoursTable+3
|
||||||
sta $2c3
|
sta $2c3
|
||||||
LDA #$B0
|
LDA TankColoursTable+4
|
||||||
STA COLPF3S
|
STA COLPF3S ; joined missiles (5th tank)
|
||||||
mva #0 hscrol
|
mva #0 hscrol
|
||||||
|
|
||||||
|
|
||||||
@@ -862,24 +851,38 @@ ClearResults
|
|||||||
lda #0 ;starting song line 0-255 to A reg
|
lda #0 ;starting song line 0-255 to A reg
|
||||||
jsr RASTERMUSICTRACKER ;Init
|
jsr RASTERMUSICTRACKER ;Init
|
||||||
;
|
;
|
||||||
|
VMAIN VBLinterrupt,6 ;jsr SetVBL
|
||||||
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
DLIinterrupt .proc
|
DLIinterruptGraph .proc
|
||||||
pha
|
pha
|
||||||
phy
|
phy
|
||||||
ldy dliCounter
|
ldy dliCounter
|
||||||
lda dliColors,y
|
lda dliColorsBack,y
|
||||||
;lda #$02 ; color of playground
|
ldy dliColorsFore
|
||||||
sta WSYNC
|
nop
|
||||||
sta COLPF2
|
nop
|
||||||
|
nop
|
||||||
|
sta COLPF1
|
||||||
|
sty COLPF2
|
||||||
inc dliCounter
|
inc dliCounter
|
||||||
ply
|
ply
|
||||||
pla
|
pla
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
DLIinterruptText .proc
|
||||||
|
pha
|
||||||
|
sta WSYNC
|
||||||
|
mva #TextBackgroundColor colpf2
|
||||||
|
mva #TextForegroundColor colpf3
|
||||||
|
pla
|
||||||
|
DLIinterruptNone
|
||||||
|
rti
|
||||||
|
.endp
|
||||||
|
|
||||||
VBLinterrupt .proc
|
VBLinterrupt .proc
|
||||||
pha
|
pha
|
||||||
phx
|
phx
|
||||||
@@ -1020,7 +1023,7 @@ EnergyInRange
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
MoveBarrelToNewPosition .proc
|
.proc MoveBarrelToNewPosition
|
||||||
jsr DrawTankNr
|
jsr DrawTankNr
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda AngleTable,x
|
lda AngleTable,x
|
||||||
@@ -1055,7 +1058,7 @@ BarrelPositionIsFine
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
SortSequence .proc ;
|
.proc SortSequence ;
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
; here we try to get a sequence of tanks for two
|
; here we try to get a sequence of tanks for two
|
||||||
; purposes:
|
; purposes:
|
||||||
@@ -1143,18 +1146,23 @@ nextishigher
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
getkey .proc; waits for pressing a key and returns pressed value in A
|
.proc getkey ; waits for pressing a key and returns pressed value in A
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
@
|
@
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
beq checkJoyGetKey ; key not pressed, check Joy
|
beq checkJoyGetKey ; key not pressed, check Joy
|
||||||
|
cmp #$f7 ; SHIFT
|
||||||
|
beq checkJoyGetKey
|
||||||
|
|
||||||
mva #sfx_keyclick sfx_effect
|
|
||||||
lda kbcode
|
lda kbcode
|
||||||
and #$3f ;CTRL and SHIFT ellimination
|
and #$3f ;CTRL and SHIFT ellimination
|
||||||
rts
|
cmp #28 ; ESC
|
||||||
|
bne getkeyend
|
||||||
|
mvx #1 escFlag
|
||||||
|
bne getkeyend
|
||||||
|
|
||||||
checkJoyGetKey
|
checkJoyGetKey
|
||||||
;------------JOY-------------
|
;------------JOY-------------
|
||||||
;happy happy joy joy
|
;happy happy joy joy
|
||||||
@@ -1165,13 +1173,19 @@ checkJoyGetKey
|
|||||||
beq notpressedJoyGetKey
|
beq notpressedJoyGetKey
|
||||||
tay
|
tay
|
||||||
lda joyToKeyTable,y
|
lda joyToKeyTable,y
|
||||||
rts
|
bne getkeyend
|
||||||
|
|
||||||
notpressedJoyGetKey
|
notpressedJoyGetKey
|
||||||
;fire
|
;fire
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
bne @-
|
bne @-
|
||||||
lda #$0c ;Return key
|
lda #$0c ;Return key
|
||||||
|
|
||||||
|
getkeyend
|
||||||
|
mvx #sfx_keyclick sfx_effect
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
getkeynowait .proc;
|
getkeynowait .proc;
|
||||||
@@ -1188,7 +1202,7 @@ WaitForKeyRelease .proc
|
|||||||
and #$0f
|
and #$0f
|
||||||
cmp #$0f
|
cmp #$0f
|
||||||
bne WaitForKeyRelease
|
bne WaitForKeyRelease
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
beq WaitForKeyRelease
|
beq WaitForKeyRelease
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
|
|||||||
BIN
Binary file not shown.
+80
-43
@@ -16,13 +16,24 @@ Options .proc
|
|||||||
; - money each player has on the beginning of the game (moneyL i moneyH)
|
; - money each player has on the beginning of the game (moneyL i moneyH)
|
||||||
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
||||||
|
|
||||||
|
mwa #OptionsDL dlptrs
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$02 ; normal screen width
|
||||||
|
sta dmactls
|
||||||
|
|
||||||
|
VDLI DLIinterruptText.DLIinterruptNone ; jsr SetDLI for text screen without DLIs
|
||||||
|
|
||||||
mva #0 OptionsY
|
mva #0 OptionsY
|
||||||
|
|
||||||
OptionsMainLoop
|
OptionsMainLoop
|
||||||
|
|
||||||
jsr OptionsInversion
|
jsr OptionsInversion
|
||||||
jsr getkey
|
jsr getkey
|
||||||
cmp #$f ;cursor down
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
|
cmp #$f ;cursor down
|
||||||
bne OptionsNoDown
|
bne OptionsNoDown
|
||||||
inc:lda OptionsY
|
inc:lda OptionsY
|
||||||
cmp #maxoptions
|
cmp #maxoptions
|
||||||
@@ -190,6 +201,7 @@ OptionsYLoop
|
|||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
; call of the purchase screens for each tank
|
; call of the purchase screens for each tank
|
||||||
.proc CallPurchaseForEveryTank
|
.proc CallPurchaseForEveryTank
|
||||||
|
jsr PMoutofScreen
|
||||||
mwa #PurchaseDL dlptrs
|
mwa #PurchaseDL dlptrs
|
||||||
lda dmactls
|
lda dmactls
|
||||||
and #$fc
|
and #$fc
|
||||||
@@ -197,21 +209,20 @@ OptionsYLoop
|
|||||||
sta dmactls
|
sta dmactls
|
||||||
|
|
||||||
mva #0 TankNr
|
mva #0 TankNr
|
||||||
loop03
|
@
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda SkillTable,x
|
lda SkillTable,x
|
||||||
beq ManualPurchase
|
beq ManualPurchase
|
||||||
jsr PurchaseAI
|
jsr PurchaseAI
|
||||||
jmp AfterManualPurchase
|
jmp AfterManualPurchase
|
||||||
|
|
||||||
ManualPurchase
|
ManualPurchase
|
||||||
jsr Purchase
|
jsr Purchase
|
||||||
AfterManualPurchase
|
AfterManualPurchase
|
||||||
|
|
||||||
inc TankNr
|
inc:lda TankNr
|
||||||
lda TankNr
|
cmp NumberOfPlayers
|
||||||
cmp NumberOfPlayers
|
bne @-
|
||||||
bne loop03
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -223,12 +234,10 @@ AfterManualPurchase
|
|||||||
; Rest of the data is taken from appropriate tables
|
; Rest of the data is taken from appropriate tables
|
||||||
; and during the purchase these tables are modified.
|
; and during the purchase these tables are modified.
|
||||||
|
|
||||||
|
|
||||||
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
|
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
|
||||||
jsr PMoutofScreen
|
|
||||||
|
|
||||||
ldx tankNr
|
ldx tankNr
|
||||||
lda TankColoursTable,x
|
lda TankStatusColoursTable,x
|
||||||
sta colpf2s
|
sta colpf2s
|
||||||
|
|
||||||
; we are clearing list of the weapons
|
; we are clearing list of the weapons
|
||||||
@@ -238,12 +247,9 @@ AfterManualPurchase
|
|||||||
|
|
||||||
; there is a tank (player) number in tanknr
|
; there is a tank (player) number in tanknr
|
||||||
; we are displaying name of the player
|
; we are displaying name of the player
|
||||||
|
tay ; 0 to y
|
||||||
tay ; from 0 to y
|
|
||||||
lda tanknr
|
lda tanknr
|
||||||
asl
|
:3 asl ; 8 chars per name
|
||||||
asl
|
|
||||||
asl ; 8 chars per name
|
|
||||||
tax
|
tax
|
||||||
NextChar03
|
NextChar03
|
||||||
lda tanksnames,x
|
lda tanksnames,x
|
||||||
@@ -553,16 +559,17 @@ ChoosingItemForPurchase
|
|||||||
cmp #$2c ; Tab
|
cmp #$2c ; Tab
|
||||||
jeq ListChange
|
jeq ListChange
|
||||||
cmp #$0c ; Return
|
cmp #$0c ; Return
|
||||||
beq EndOfPurchase
|
sne:rts
|
||||||
cmp #$e
|
cmp #$e
|
||||||
beq PurchaseKeyUp
|
beq PurchaseKeyUp
|
||||||
cmp #$f
|
cmp #$f
|
||||||
beq PurchaseKeyDown
|
beq PurchaseKeyDown
|
||||||
cmp #$21 ; Space
|
cmp #$21 ; Space
|
||||||
|
jeq PurchaseWeaponNow
|
||||||
|
cmp #$07 ; cursor right
|
||||||
|
jeq PurchaseWeaponNow
|
||||||
bne ChoosingItemForPurchase
|
bne ChoosingItemForPurchase
|
||||||
jmp PurchaseWeaponNow
|
|
||||||
EndOfPurchase
|
|
||||||
rts
|
|
||||||
PurchaseKeyUp
|
PurchaseKeyUp
|
||||||
lda WhichList
|
lda WhichList
|
||||||
beq GoUp1
|
beq GoUp1
|
||||||
@@ -816,6 +823,29 @@ NoArrowDown
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; -----------------------------------------------------
|
; -----------------------------------------------------
|
||||||
|
.proc EnterPlayerNames
|
||||||
|
;entering names of players
|
||||||
|
mwa #NameDL dlptrs
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$01 ; narrow screen (32 chars)
|
||||||
|
sta dmactls
|
||||||
|
VDLI DLIinterruptText ; jsr SetDLI for text (names) screen
|
||||||
|
|
||||||
|
mva #0 TankNr
|
||||||
|
@ tax
|
||||||
|
lda TankStatusColoursTable,x
|
||||||
|
sta colpf2s ; set color of player name line
|
||||||
|
jsr EnterPlayerName
|
||||||
|
lda escFlag
|
||||||
|
jne START
|
||||||
|
inc TankNr
|
||||||
|
lda TankNr
|
||||||
|
cmp NumberOfPlayers
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
; -----------------------------------------------------
|
||||||
.proc EnterPlayerName
|
.proc EnterPlayerName
|
||||||
; in: TankNr
|
; in: TankNr
|
||||||
; Out: TanksNames, SkillTable
|
; Out: TanksNames, SkillTable
|
||||||
@@ -867,6 +897,9 @@ endOfTankName
|
|||||||
|
|
||||||
CheckKeys
|
CheckKeys
|
||||||
jsr getkey
|
jsr getkey
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
; is the char to be recorded?
|
; is the char to be recorded?
|
||||||
ldx #keycodesEnd-keycodes ;table was 38 chars long
|
ldx #keycodesEnd-keycodes ;table was 38 chars long
|
||||||
IsLetter
|
IsLetter
|
||||||
@@ -1393,6 +1426,8 @@ EndOfTypeLine4x4
|
|||||||
.proc DisplayResults ;
|
.proc DisplayResults ;
|
||||||
;displays results of the round
|
;displays results of the round
|
||||||
;using 4x4 font
|
;using 4x4 font
|
||||||
|
|
||||||
|
mva #sfx_smoke_cloud sfx_effect
|
||||||
|
|
||||||
;centering the result screen
|
;centering the result screen
|
||||||
mwa #((ScreenWidth/2)-(8*4)) ResultX
|
mwa #((ScreenWidth/2)-(8*4)) ResultX
|
||||||
@@ -1581,15 +1616,6 @@ FinishResultDisplay
|
|||||||
lda WeaponSymbols,y
|
lda WeaponSymbols,y
|
||||||
sta TextBuffer+18
|
sta TextBuffer+18
|
||||||
|
|
||||||
;---------------------
|
|
||||||
;displaying the energy of a tank
|
|
||||||
;---------------------
|
|
||||||
|
|
||||||
lda Energy,x
|
|
||||||
|
|
||||||
sta decimal
|
|
||||||
mwa #textbuffer+48 displayposition
|
|
||||||
jsr displaybyte
|
|
||||||
;---------------------
|
;---------------------
|
||||||
;displaying quantity of the given weapon
|
;displaying quantity of the given weapon
|
||||||
;---------------------
|
;---------------------
|
||||||
@@ -1608,20 +1634,31 @@ FinishResultDisplay
|
|||||||
sta temp ;get back number of the weapon
|
sta temp ;get back number of the weapon
|
||||||
mva #0 temp+1
|
mva #0 temp+1
|
||||||
; times 16 (because this is length of weapon name)
|
; times 16 (because this is length of weapon name)
|
||||||
ldy #3 ; rotate 4 times
|
ldy #3 ; shift left 4 times
|
||||||
RotateDISP02
|
@
|
||||||
aslw temp
|
aslw temp
|
||||||
dey
|
dey
|
||||||
bpl RotateDISP02
|
bpl @-
|
||||||
|
|
||||||
adw temp #NamesOfWeapons
|
adw temp #NamesOfWeapons
|
||||||
ldy #6 ; from 6th character
|
ldy #6 ; from 6th character
|
||||||
|
|
||||||
ldy #15
|
ldy #15
|
||||||
loop06
|
@
|
||||||
lda (temp),y
|
lda (temp),y
|
||||||
sta textbuffer+23,y
|
sta textbuffer+23,y
|
||||||
dey
|
dey
|
||||||
bpl loop06
|
bpl @-
|
||||||
|
|
||||||
|
;---------------------
|
||||||
|
;displaying the energy of a tank
|
||||||
|
;---------------------
|
||||||
|
|
||||||
|
lda Energy,x
|
||||||
|
|
||||||
|
sta decimal
|
||||||
|
mwa #textbuffer+48 displayposition
|
||||||
|
jsr displaybyte
|
||||||
|
|
||||||
;=========================
|
;=========================
|
||||||
;display Force
|
;display Force
|
||||||
|
|||||||
+4
-3
@@ -15,7 +15,7 @@ TanksNames ; DO NOT ZERO - ticket #24
|
|||||||
:6 dta d" "
|
:6 dta d" "
|
||||||
;----------------------------
|
;----------------------------
|
||||||
;Options DO NOT ZERO - ticket #27
|
;Options DO NOT ZERO - ticket #27
|
||||||
OptionsTable .by 0,0,2,2,0,1,4
|
OptionsTable .by 0,0,2,2,0,1,3
|
||||||
RoundsInTheGame .by 10 ;how many rounds in the current game
|
RoundsInTheGame .by 10 ;how many rounds in the current game
|
||||||
seppukuVal .by 75
|
seppukuVal .by 75
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -33,6 +33,7 @@ RoundNrDisplay
|
|||||||
.byte $ff
|
.byte $ff
|
||||||
|
|
||||||
variablesStart ; zeroing starts here
|
variablesStart ; zeroing starts here
|
||||||
|
escFlag .ds 1
|
||||||
;--------------
|
;--------------
|
||||||
sfx_effect .ds 1
|
sfx_effect .ds 1
|
||||||
;--------------
|
;--------------
|
||||||
@@ -43,7 +44,7 @@ flyDelay .ds 1
|
|||||||
;--------------
|
;--------------
|
||||||
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
||||||
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
||||||
GameIsOver .DS 1 ; 1 - it was the last round in the game
|
GameIsOver .DS 1 ; 1 means it was the last round in the game
|
||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
moneyH ;we place zero at the end of prices and money
|
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)
|
||||||
@@ -152,7 +153,7 @@ digtabyL .DS [8]
|
|||||||
digtabyH .DS [8]
|
digtabyH .DS [8]
|
||||||
; liquiddirt
|
; liquiddirt
|
||||||
TempXfill .ds 2
|
TempXfill .ds 2
|
||||||
FillCounter .ds 1
|
FillCounter .ds 2
|
||||||
;sandhog
|
;sandhog
|
||||||
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
||||||
;ofdirt
|
;ofdirt
|
||||||
|
|||||||
+40
-25
@@ -50,7 +50,7 @@ ExplosionRoutines
|
|||||||
.word dirtclod-1
|
.word dirtclod-1
|
||||||
.word dirtball-1
|
.word dirtball-1
|
||||||
.word tonofdirt-1
|
.word tonofdirt-1
|
||||||
.word liquiddirt-1 ;liquiddirt
|
.word liquiddirt-1
|
||||||
.word dirtcharge-1
|
.word dirtcharge-1
|
||||||
.word VOID-1 ;earthdisrupter
|
.word VOID-1 ;earthdisrupter
|
||||||
.word VOID-1 ;plasmablast
|
.word VOID-1 ;plasmablast
|
||||||
@@ -523,6 +523,12 @@ DiggerCharacter
|
|||||||
jmp cleanDirt
|
jmp cleanDirt
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
|
.proc liquiddirt
|
||||||
|
mva #sfx_liquid_dirt sfx_effect
|
||||||
|
mwa #254 FillCounter
|
||||||
|
jmp xliquiddirt
|
||||||
|
.endp
|
||||||
|
; ------------------------
|
||||||
.proc laser
|
.proc laser
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda AngleTable,x
|
lda AngleTable,x
|
||||||
@@ -686,6 +692,7 @@ dirtLoop
|
|||||||
; -----------------
|
; -----------------
|
||||||
.proc xriotbomb ;
|
.proc xriotbomb ;
|
||||||
; -----------------
|
; -----------------
|
||||||
|
mva #sfx_riot_blast sfx_effect
|
||||||
lda #0
|
lda #0
|
||||||
sta radius
|
sta radius
|
||||||
sta color
|
sta color
|
||||||
@@ -746,13 +753,13 @@ UpNotYet
|
|||||||
beq HowMuchToFallRight2
|
beq HowMuchToFallRight2
|
||||||
.nowarn dew xdraw
|
.nowarn dew xdraw
|
||||||
lda xdraw
|
lda xdraw
|
||||||
bne RollinContinues
|
jne RollinContinues ; like cpw xdraw #0
|
||||||
lda xdraw+1
|
lda xdraw+1
|
||||||
jne RollinContinues
|
jne RollinContinues
|
||||||
beq ExplodeNow
|
beq ExplodeNow
|
||||||
HowMuchToFallRight2
|
HowMuchToFallRight2
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw screenwidth
|
cpw xdraw #screenwidth
|
||||||
jne RollinContinues
|
jne RollinContinues
|
||||||
ExplodeNow
|
ExplodeNow
|
||||||
mwa xdraw xcircle ; we must store somewhere (BAD)
|
mwa xdraw xcircle ; we must store somewhere (BAD)
|
||||||
@@ -890,17 +897,15 @@ EndOfTheDirt
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ----------------
|
; ----------------
|
||||||
.proc liquiddirt ;
|
.proc xliquiddirt ;
|
||||||
mva #sfx_liquid_dirt sfx_effect
|
|
||||||
mva xdraw TempXfill
|
mva xdraw TempXfill
|
||||||
mva #254 FillCounter
|
|
||||||
RepeatFill
|
RepeatFill
|
||||||
mva TempXfill xdraw
|
mva TempXfill xdraw
|
||||||
jsr checkRollDirection
|
jsr checkRollDirection
|
||||||
; HowMuchToFall - direction
|
; HowMuchToFall - direction
|
||||||
; $FF - we are in a hole (flying in missile direction)
|
; $FF - we are in a hole (flying in missile direction)
|
||||||
; 1 - right, 2 - left
|
; 1 - right, 2 - left
|
||||||
adw xdraw #mountaintable tempXROLLER
|
adw xdraw #mountaintable tempXROLLER
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (tempXROLLER),y
|
lda (tempXROLLER),y
|
||||||
sta HeightRol ; relative point
|
sta HeightRol ; relative point
|
||||||
@@ -911,7 +916,6 @@ RollinContinuesLiquid
|
|||||||
ldy #0
|
ldy #0
|
||||||
lda (tempXROLLER),y
|
lda (tempXROLLER),y
|
||||||
sta ydraw
|
sta ydraw
|
||||||
beq FillNow
|
|
||||||
cmp HeightRol
|
cmp HeightRol
|
||||||
beq UpNotYet2
|
beq UpNotYet2
|
||||||
bcc FillNow
|
bcc FillNow
|
||||||
@@ -924,14 +928,12 @@ UpNotYet2
|
|||||||
cmp #1
|
cmp #1
|
||||||
beq HowMuchToFallRight3
|
beq HowMuchToFallRight3
|
||||||
.NOWARN dew xdraw
|
.NOWARN dew xdraw
|
||||||
lda xdraw
|
cpw xdraw #$ffff
|
||||||
bne RollinContinuesLiquid
|
|
||||||
lda xdraw+1
|
|
||||||
jne RollinContinuesLiquid
|
jne RollinContinuesLiquid
|
||||||
beq FillNow
|
beq FillNow
|
||||||
HowMuchToFallRight3
|
HowMuchToFallRight3
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw screenwidth
|
cpw xdraw #(screenwidth+1)
|
||||||
jne RollinContinuesLiquid
|
jne RollinContinuesLiquid
|
||||||
FillNow
|
FillNow
|
||||||
; finally one pixel more
|
; finally one pixel more
|
||||||
@@ -948,12 +950,15 @@ FillHole
|
|||||||
adw xdraw #mountaintable tempXROLLER
|
adw xdraw #mountaintable tempXROLLER
|
||||||
lda (tempXROLLER),y
|
lda (tempXROLLER),y
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
beq ToHighFill ; if we filled all playfield (very rare but possible)
|
||||||
dec ydraw ; one pixel up
|
dec ydraw ; one pixel up
|
||||||
|
ToHighFill
|
||||||
lda ydraw
|
lda ydraw
|
||||||
sta (tempXROLLER),y ;mountaintable update
|
sta (tempXROLLER),y ;mountaintable update
|
||||||
mva #1 color
|
mva #1 color
|
||||||
jsr plot
|
jsr plot.MakePlot
|
||||||
dec FillCounter
|
.nowarn dew FillCounter
|
||||||
|
cpw FillCounter #0
|
||||||
jne RepeatFill
|
jne RepeatFill
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
@@ -1001,12 +1006,12 @@ ContinueToCheckMaxForce2
|
|||||||
; $f3 - shift+key
|
; $f3 - shift+key
|
||||||
|
|
||||||
notpressed
|
notpressed
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
beq notpressed
|
beq notpressed
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
beq checkJoy
|
beq checkJoy
|
||||||
cmp #$f7
|
cmp #$f7 ; SHIFT
|
||||||
beq checkJoy
|
beq checkJoy
|
||||||
|
|
||||||
lda kbcode
|
lda kbcode
|
||||||
@@ -1046,7 +1051,7 @@ checkJoy
|
|||||||
jmp jumpFromStick
|
jmp jumpFromStick
|
||||||
notpressedJoy
|
notpressedJoy
|
||||||
;fire
|
;fire
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
jeq pressedSpace
|
jeq pressedSpace
|
||||||
jmp notpressed
|
jmp notpressed
|
||||||
|
|
||||||
@@ -1149,6 +1154,7 @@ NotThrough90DegreesRight
|
|||||||
jmp BeforeFire
|
jmp BeforeFire
|
||||||
|
|
||||||
pressedTAB
|
pressedTAB
|
||||||
|
mva #sfx_purchase sfx_effect
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
inc ActiveWeapon,x
|
inc ActiveWeapon,x
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
@@ -1268,7 +1274,7 @@ AfterStrongShoot
|
|||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
TankFalls .proc;
|
.proc TankFalls;
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mva #sfx_shield_off sfx_effect
|
mva #sfx_shield_off sfx_effect
|
||||||
lda #0
|
lda #0
|
||||||
@@ -1623,8 +1629,11 @@ DoNotAdd
|
|||||||
sta Result+1
|
sta Result+1
|
||||||
sta Result+2
|
sta Result+2
|
||||||
;--
|
;--
|
||||||
ldx Angle
|
lda #90
|
||||||
lda costable,x
|
sec
|
||||||
|
sbc Angle
|
||||||
|
tax
|
||||||
|
lda sintable,x
|
||||||
|
|
||||||
sta Multiplee ;cos(Angle)*Force
|
sta Multiplee ;cos(Angle)*Force
|
||||||
mwa Force Multiplier
|
mwa Force Multiplier
|
||||||
@@ -1810,17 +1819,19 @@ NoUnPlot
|
|||||||
|
|
||||||
Hit
|
Hit
|
||||||
mwa XHit xdraw
|
mwa XHit xdraw
|
||||||
mwa YHit ydraw
|
mva YHit ydraw ; one byte now
|
||||||
|
|
||||||
jsr unPlot
|
jsr unPlot
|
||||||
EndOfFlight
|
EndOfFlight
|
||||||
mwa xdraw xcircle ; we must store for a little while
|
; mwa xdraw xcircle ; we must store for a little while
|
||||||
mva ydraw ycircle ; xdraw and ydraw
|
; mva ydraw ycircle ; xdraw and ydraw .... but this values are in YHit and XHit !!!
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
mva #screenheight-1 ydraw
|
mva #screenheight-1 ydraw
|
||||||
jsr unPlot
|
jsr unPlot
|
||||||
mwa xcircle xdraw
|
; mwa xcircle xdraw
|
||||||
mva ycircle ydraw
|
; mva ycircle ydraw
|
||||||
|
mwa XHit xdraw
|
||||||
|
mva YHit ydraw
|
||||||
|
|
||||||
ldy SmokeTracerFlag
|
ldy SmokeTracerFlag
|
||||||
beq EndOfFlight2
|
beq EndOfFlight2
|
||||||
@@ -2369,6 +2380,9 @@ HowManyBullets .proc
|
|||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
ShellDelay .proc
|
ShellDelay .proc
|
||||||
|
lda CONSOL
|
||||||
|
cmp #6
|
||||||
|
beq noShellDelay
|
||||||
ldx flyDelay
|
ldx flyDelay
|
||||||
DelayLoop
|
DelayLoop
|
||||||
lda VCOUNT
|
lda VCOUNT
|
||||||
@@ -2376,6 +2390,7 @@ DelayLoop
|
|||||||
beq @-
|
beq @-
|
||||||
dex
|
dex
|
||||||
bne DelayLoop
|
bne DelayLoop
|
||||||
|
noShellDelay
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user