Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea6c621d79 | |||
| afd81c08c3 | |||
| a9703609b6 | |||
| d8bfda28a0 | |||
| 743114fd0d | |||
| 079abc062f | |||
| 853a597daf | |||
| 1eadc7f63e | |||
| 081cf282c8 | |||
| 4c3203854c | |||
| bf11a9967f | |||
| 0d7403d1c0 | |||
| 777f5c341a | |||
| 8f0bd8ca81 | |||
| c12049d0d7 | |||
| 6013986e51 | |||
| 0fbe3de569 | |||
| 9569b3365a | |||
| 6d9b2907c5 | |||
| 94e6caebed | |||
| 532ee7dc88 | |||
| 17e653b37d | |||
| bef3c0f080 | |||
| 7ff3858433 | |||
| eae8cb08d8 | |||
| f13d7ac801 | |||
| 0ddbe41005 | |||
| 7cd31450c7 | |||
| a556e50e53 | |||
| 9f1720e970 | |||
| 2df28af79c | |||
| defbde5b87 | |||
| 0820124f9f | |||
| aa74cf133b | |||
| 2c640c370a | |||
| 636e121bf7 | |||
| 3c1b0a02aa | |||
| be5652074a | |||
| a425500d4e | |||
| a721b82944 | |||
| 762b56567b | |||
| b11d22d1bb | |||
| c68ba09103 | |||
| e399754e0c | |||
| 381495fb5a | |||
| 17b57d1ed2 | |||
| 2fb04cabff | |||
| 457af6d6b9 | |||
| bdf0f10cc0 |
@@ -0,0 +1,2 @@
|
||||
|
||||
*.bak
|
||||
@@ -47,19 +47,38 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
|
||||
|
||||
## Changes:
|
||||
|
||||
###### Build 143
|
||||
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 :)
|
||||
Only visible changes listed, because you are possibly not as excited as we are for the new Flight routine and ground collisions by @Pecusx.
|
||||
- https://github.com/pkali/scorch_src/issues/84, https://github.com/pkali/scorch_src/issues/63 - tanks now say good bye properly!
|
||||
- https://github.com/pkali/scorch_src/issues/74 - Press [ESC] to quit the game at any point, with a confirmation when the round has already started. Please note the keyboard is not checked all the time, so press it for a while, especially when AI tanks are ru(i/n)ning the show.
|
||||
- https://github.com/pkali/scorch_src/issues/56 - there should be no occurrences of frivolous weapon purchases. Please report all tanks getting their munitions from uncertified sources!
|
||||
- https://github.com/pkali/scorch_src/issues/47 - It seems that the bad sequence of turns has been ameliorated. Fix is trivial, finding the culprit - far from it. Please pay special attention to fairness of shooting in case the fix is still longing for the fjords.
|
||||
- ATTRACT mode works how it should - screensaver saves screen only when HUMAN should input something.
|
||||
|
||||
###### Build 142
|
||||
2022-05-30
|
||||
Late build. The bugs we tried to squelch turned out to be more difficult than usual. Some progress has been made though even if it is not yet visible.
|
||||
- 4x4 font rewritten by @Pecusx as a prep for Y standarization. It makes the messages to appear faster. This is a good change.
|
||||
- https://github.com/pkali/scorch_src/issues/5 and #80 fixed (again) - no funkybomb traces staying on the screen
|
||||
- https://github.com/pkali/scorch_src/issues/70 too strong Shooters fixed
|
||||
- https://github.com/pkali/scorch_src/issues/63 - tank say goodbye when (mostly) visible
|
||||
- several other small changes and improvements that will pay off in the following releases.
|
||||
|
||||
###### 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.
|
||||
- https://github.com/pkali/scorch_src/issues/73 Fast forward. Press [START] to speed up the game where it can be sped up. Not in many places, mind you.
|
||||
- https://github.com/pkali/scorch_src/issues/72 Screen glitches improved
|
||||
- https://github.com/pkali/scorch_src/issues/70 AI shoot with more force than their energy allows. We might still have to revise this one
|
||||
- https://github.com/pkali/scorch_src/issues/69 Explosions wrapping around the screen
|
||||
- https://github.com/pkali/scorch_src/issues/67 Screen glitches after intro
|
||||
- https://github.com/pkali/scorch_src/issues/65 Saved ~90 bytes by removing cosinus table
|
||||
- https://github.com/pkali/scorch_src/issues/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)
|
||||
- https://github.com/pkali/scorch_src/issues/61 [SHIFT] was repeating the last key
|
||||
- https://github.com/pkali/scorch_src/issues/57 Fire too sensitive on a real machine. Switched to shadow registers. First recorded use of Atari OS :O
|
||||
- https://github.com/pkali/scorch_src/issues/55 Glitches in the status bar. This one was surprisingly tough.
|
||||
|
||||
###### Build 140
|
||||
2022-05-15
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
MOVED TO: https://github.com/pkali/scorch_src/issues
|
||||
|
||||
TODO and BUGS file
|
||||
|
||||
---------------------------------------------------------
|
||||
Known bugs (+ means bug is fixed)
|
||||
004. when parachute is on and the tank dies (e.g. hit by a powerful
|
||||
weapon) the dead (invisible) tank falls on parachute
|
||||
(and uses one parachute more than necessary)
|
||||
005. tank stands still on a one pixel spike - it should fall
|
||||
(possibly all that is necessary is adjust of WhereToSlideTable)
|
||||
017: Observed MIRV loops - it shoots and shoots MIRV all over the screen. Very rare.
|
||||
020: sometimes leftmost or rightmost remains of the funkybomb smoke do not get cleared
|
||||
I think it happens when one of the bombs goes out of the screen
|
||||
023: NEW BUG. After the last change (bug 007) now the last shell of any weapon gets removed and
|
||||
the game switches to Baby missile.
|
||||
|
||||
Fixed:
|
||||
+001. when bullet goes straight down very fast it misses the tank
|
||||
it happens only when tank is standing on the bottom of
|
||||
the screen (no ground below)
|
||||
+002. points after the round are not calculated correctly
|
||||
+003. if death's head explodes low, the lowest explosion wraps
|
||||
and appears on the top of the screen
|
||||
+006. After some attacks (like MIRV and leapfrog the OffensiveText
|
||||
stays on the screen (and becomes a static decoration)
|
||||
It possibly happens when a tank kills itself with mirv or leapfrog.
|
||||
+008. After a round the last tank sprite stays on the screen.
|
||||
This hurts only when the last tank is under the table with results!
|
||||
+010. Even MORONS shoot their feet too often - increase min. randomised energy.
|
||||
+011. High flying bullets sometimes cause brief screen garbage - like a DL damaged
|
||||
for a fraction of a frame.
|
||||
Update - these are NOT high flying bullets - it just happens during bullet flight
|
||||
+012. (newly introduced) Death explosions are offset right and possibly up.
|
||||
+013. sometimes demo mode does not work (it stops on results display)
|
||||
+014: FunkyBomb shoots with too high angle
|
||||
+015: Only first shoot of FunkyBomb is correct (with smoke and fast),
|
||||
the next are like missiles
|
||||
+016: Additional explosions after Frogger do not have falling soil (?)
|
||||
-018: MINOR: ydraw, yhit, ybyte variable is sometimes treated as WORD, sometimes as BYTE.
|
||||
Making it consistent would save both time and space (not much)
|
||||
REJECTED: too much work - different routines depend on checking high byte.
|
||||
+019: AI menu does not recognize keyboard up (prints "-" in tank name)
|
||||
+021: check MWA, ADW, SBW macros - bad modifications of bytes found!!!
|
||||
+009. When result in points is >99 then only 2 first digits are displayed
|
||||
-022: shooting funkybomb decreases number of bombs too much! (2 instead of 1?)
|
||||
+007. Decreasing of number of bullets after a shoot does not work correctly
|
||||
(e.g. 2 bullets are deducted instead of 1) FUNKYBOMB!!!
|
||||
it looks like it is fixed, although what I did was moving decreasing before jsr shoot
|
||||
+000, Game crashes from time to time, code and/or screen gets corrupted
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
To do
|
||||
*004. The game has no end!!! Add ending!!!
|
||||
A good idea for an ending - a TIP pic - Red Army taking Berlin :)
|
||||
Another - vector tanks like in BattleZone
|
||||
Another - stickman tankmen
|
||||
006. Add sound effects (maybe sampled? or mp0 (sound based on fft))
|
||||
007. There is no defensive weapon handling (only parachute works,
|
||||
but also provisionally
|
||||
009. Make AI in the existing framework (ongoing)
|
||||
010. It is impossible to look up a number of parachutes left.
|
||||
018. Speed up soil down after soil eating weapons - correctly calculate
|
||||
ranges as now range is very broad even when very little soil is eaten.
|
||||
019. Purchase impossible with joystick only. Add buy on e.g. joystick right.
|
||||
020. Not a bug per se, but ydraw variable is word, possibly it can be switched to byte
|
||||
021. Add player colors to purchase screen
|
||||
022. Make colors more contrasting
|
||||
024. no visual indication of using defensive weapons
|
||||
|
||||
Done:
|
||||
|
||||
+001. Start each round with a)worst tank or b)random tank
|
||||
(Worst tank starts first)
|
||||
+002. Start each round with random angles (not always 45 degrees left)
|
||||
+003. Add colour of the given tank to the screen
|
||||
E.g. when a given tank is shooting it's colour could be behind
|
||||
tank name on the text screen
|
||||
+005. Add number of rounds to the options menu
|
||||
+008. No computer operated opponents - make a framework for AI!!!
|
||||
+011. Colouring the top status lines in a colour of the active tank.
|
||||
+014. Demo mode - when all tanks are CPUs let them play non-stop!
|
||||
(replace waiting for a key-press after a round with a small delay)
|
||||
+015. Switch to mads for easier development (mads speeds it up, no doubt)
|
||||
+016. Speed up death's head (e.g.: draw each second circle)
|
||||
-017. Wide screen mode (with scroll?)
|
||||
+012. Decreased number of bullets should be displayed just after the shoot.
|
||||
+013. Check LineTable - possibly it is unnecessarily long. Checked. It is OK
|
||||
+023. Make not implemented weapons raise NotImplementedError :] Done by making it impossible to purchase free weapons (price == $0)
|
||||
@@ -33,7 +33,7 @@ loop
|
||||
ArtificialIntelligence .proc ;
|
||||
; A - skill of the TankNr
|
||||
; returns shoot energy and angle in
|
||||
; EnergyTable/L/H and AngleTable
|
||||
; ForceTable/L/H and AngleTable
|
||||
;----------------------------------------------
|
||||
asl
|
||||
tax
|
||||
@@ -77,24 +77,22 @@ Shooter .proc
|
||||
lda PreviousAngle,x
|
||||
clc
|
||||
adc #5
|
||||
bmi leftQuadrant
|
||||
bmi @+
|
||||
cmp #90
|
||||
bcc continue
|
||||
bcc @+
|
||||
lda #(-90)
|
||||
bne continue
|
||||
leftQuadrant
|
||||
|
||||
|
||||
|
||||
continue
|
||||
@
|
||||
sta NewAngle
|
||||
|
||||
|
||||
sec
|
||||
lda PreviousEnergyL,x
|
||||
sta EnergyTableL,x
|
||||
lda PreviousEnergyH,x
|
||||
sta EnergyTableH,x
|
||||
|
||||
sbc #5
|
||||
sta ForceTableL,x
|
||||
lda PreviousEnergyH,x
|
||||
sbc #0
|
||||
sta ForceTableH,x
|
||||
jmp endo
|
||||
|
||||
firstShoot
|
||||
; compare the x position with the middle of the screen
|
||||
lda xTanksTableL,x
|
||||
@@ -108,7 +106,6 @@ firstShoot
|
||||
and #$1F
|
||||
clc
|
||||
adc #5
|
||||
;lda #45
|
||||
|
||||
sta NewAngle
|
||||
jmp forceNow
|
||||
@@ -123,15 +120,17 @@ tankIsOnTheRight
|
||||
forceNow
|
||||
mwa #100 RandBoundaryLow
|
||||
mwa #800 RandBoundaryHigh
|
||||
ldx TankNr ;this is possibly not necessary
|
||||
jsr RandomizeForce
|
||||
|
||||
endo
|
||||
;ldx TankNr ;this is possibly not necessary
|
||||
ldx TankNr ;this is possibly not necessary
|
||||
jsr RandomizeForce.LimitForce
|
||||
lda NewAngle
|
||||
sta PreviousAngle,x
|
||||
lda EnergyTableL,x
|
||||
lda ForceTableL,x
|
||||
sta PreviousEnergyL,x
|
||||
lda EnergyTableH,x
|
||||
lda ForceTableH,x
|
||||
sta PreviousEnergyH,x
|
||||
|
||||
; choose the best weapon
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+34
-37
@@ -18,12 +18,11 @@ CashOptionL ;(one zero less than on the screen)
|
||||
CashOptionH
|
||||
.by 0,>200,>500,>800,>1000
|
||||
GravityTable .by 10,20,25,30,40
|
||||
MaxWindTable .by 5,20,40,60,80
|
||||
MaxWindTable .by 5,20,40,70,99
|
||||
RoundsTable .by 10,20,30,40,50
|
||||
flyDelayTable .by 255,150,75,35,1
|
||||
seppukuTable .by 255, 45,25,15,9
|
||||
;------------------------------------------------
|
||||
|
||||
LevelNameBeginL ; begins of level names
|
||||
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
|
||||
.by <(NamesOfLevels+32),<(NamesOfLevels+42),<(NamesOfLevels+52)
|
||||
@@ -37,31 +36,25 @@ TanksWeaponsTableL
|
||||
.by <TanksWeapon1,<TanksWeapon2,<TanksWeapon3,<TanksWeapon4,<TanksWeapon5,<TanksWeapon6
|
||||
TanksWeaponsTableH
|
||||
.by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6
|
||||
;-----4x4 texts-----
|
||||
|
||||
;-----4x4 texts-----
|
||||
LineTop
|
||||
dta d"(%%%%%%%%%%%%)"
|
||||
.byte $ff
|
||||
dta d"(%%%%%%%%%%%%)", $ff
|
||||
;# - vertical, () * +, % - horizontal
|
||||
LineBottom
|
||||
dta d"*%%%%%%%%%%%%+"
|
||||
.byte $ff
|
||||
dta d"*%%%%%%%%%%%%+", $ff
|
||||
LineEmpty
|
||||
dta d"# #"
|
||||
.byte $ff
|
||||
dta d"# #", $ff
|
||||
LineHeader2
|
||||
dta d"# RESULTS #"
|
||||
.byte $ff
|
||||
dta d"# RESULTS #", $ff
|
||||
LineGameOver
|
||||
dta d"# GAME OVER #"
|
||||
.byte $ff
|
||||
dta d"# GAME OVER #", $ff
|
||||
seppukuText
|
||||
dta d"# SEPPUKU! #"
|
||||
.byte $ff
|
||||
dta d"# SEPPUKU! #", $ff
|
||||
areYouSureText
|
||||
dta d"# SURE? Y/N #", $ff
|
||||
lineClear
|
||||
dta d" "
|
||||
.byte $ff
|
||||
|
||||
dta d" ", $ff
|
||||
|
||||
;-----------
|
||||
pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background)
|
||||
@@ -483,6 +476,7 @@ WhereToSlideTable
|
||||
.BY %000 ; 11111111
|
||||
|
||||
EndOfTheBarrelX
|
||||
; right angles from 0 (vertically up) to 90 (horizontally to the right)
|
||||
.by 4,4,4,4,4,4,4,4,4,4,4
|
||||
.by 5,5,5,5,5,5,5,5,5,5
|
||||
.by 6,6,6,6,6,6,6,6,6
|
||||
@@ -492,15 +486,16 @@ EndOfTheBarrelX
|
||||
.by 7,7,7,7,7,7,7,7,7,7,7,7,7
|
||||
.by 7,7,7,7,7,7,7,7,7,7,7,7,7,7
|
||||
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0
|
||||
.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
|
||||
.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 ; not used
|
||||
|
||||
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
||||
.by 0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
@@ -511,6 +506,7 @@ EndOfTheBarrelX
|
||||
.by 3,3,3,3,3,3,3,3,3,3,3
|
||||
|
||||
EndOfTheBarrelY
|
||||
; right angles from 0 (vertically up) to 90 (horizontally to the right)
|
||||
.by 7,7,7,7,7,7,7,7,7,7,7
|
||||
.by 7,7,7,7,7,7,7,7,7,7
|
||||
.by 7,7,7,7,7,7,7,7,7
|
||||
@@ -520,15 +516,16 @@ EndOfTheBarrelY
|
||||
.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 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0,0,0,0,0,0,0
|
||||
.by 0,0,0,0
|
||||
.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
|
||||
.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 ; not used
|
||||
|
||||
; 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 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||
.by 5,5,5,5,5,5,5,5,5,5
|
||||
@@ -537,8 +534,8 @@ EndOfTheBarrelY
|
||||
.by 7,7,7,7,7,7,7,7,7
|
||||
.by 7,7,7,7,7,7,7,7,7,7
|
||||
.by 7,7,7,7,7,7,7,7,7,7,7
|
||||
|
||||
;-------------------------------------------------
|
||||
|
||||
TanksNamesDefault
|
||||
dta d"1st.Tank"
|
||||
dta d"2nd.Tank"
|
||||
@@ -547,7 +544,6 @@ TanksNamesDefault
|
||||
dta d"5th.Tank"
|
||||
dta d"6th.Tank"
|
||||
|
||||
|
||||
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||
.by >price_Baby_Missile___
|
||||
.by >price_Missile________
|
||||
@@ -884,7 +880,8 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"Contact Trigger " ; 62
|
||||
dta d"White Flag " ; 63
|
||||
weaponsOfDeath
|
||||
dta 0,1,2,3,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||
dta 1,2,3,7,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||
weaponsOfDeathEnd
|
||||
joyToKeyTable
|
||||
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
|
||||
.by $ff,$ff,$ff,$ff,$ff,$ff,$ff,$07,$ff,$ff,$ff,$06,$ff,$0f,$0e,$ff
|
||||
|
||||
Executable → Regular
Executable → Regular
+251
-248
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
;--------------------------------------------------
|
||||
draw .proc ;;fuxxing good draw :)
|
||||
.proc draw ;;fuxxing good draw :)
|
||||
;--------------------------------------------------
|
||||
;creditz to Dr Jankowski / MIM U.W.
|
||||
; (xi,yi)-----(xk,yk)
|
||||
@@ -43,9 +43,9 @@ draw .proc ;;fuxxing good draw :)
|
||||
;cpw ybyte #screenheight
|
||||
;bcc DrawOnTheScreen
|
||||
lda ydraw+1
|
||||
bne DrawOutOfTheScreen
|
||||
bmi DrawOutOfTheScreen
|
||||
lda ybyte+1
|
||||
beq DrawOnTheScreen
|
||||
bpl DrawOnTheScreen
|
||||
DrawOutOfTheScreen
|
||||
;jsr DrawJumpPad
|
||||
rts
|
||||
@@ -214,9 +214,62 @@ LineGoesLeft
|
||||
; line goes left - we are reversing X
|
||||
sbw xtempDRAW temp xdraw ; XI
|
||||
PutPixelinDraw
|
||||
jsr DrawJumpPad
|
||||
; end of the special PLOT for DRAW
|
||||
|
||||
; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||
bit drawFunction
|
||||
bpl @+
|
||||
inw LineLength
|
||||
bne ContinueDraw ; ==jmp
|
||||
@
|
||||
bvc @+
|
||||
DrawCheck
|
||||
lda tracerflag
|
||||
ora SmokeTracerFlag
|
||||
yestrace
|
||||
beq notrace
|
||||
jsr plot
|
||||
notrace
|
||||
;aftertrace
|
||||
;key
|
||||
lda HitFlag
|
||||
bne StopHitChecking
|
||||
|
||||
CheckCollisionDraw
|
||||
; checking collision!
|
||||
lda ydraw+1
|
||||
bmi StopHitChecking
|
||||
|
||||
jsr CheckCollisionWithTank
|
||||
lda HitFlag
|
||||
bne StopHitChecking
|
||||
|
||||
clc
|
||||
lda xdraw
|
||||
adc #<mountaintable
|
||||
sta temp
|
||||
lda xdraw+1
|
||||
adc #>mountaintable
|
||||
sta temp+1
|
||||
|
||||
ldy #0
|
||||
lda ydraw
|
||||
cmp (temp),y
|
||||
bcc StopHitChecking
|
||||
|
||||
mwa xdraw XHit
|
||||
lda (temp),y
|
||||
sec
|
||||
sbc #1
|
||||
sta YHit
|
||||
sty YHit+1
|
||||
;mwa ydraw YHit
|
||||
mva #1 HitFlag
|
||||
StopHitChecking
|
||||
jmp ContinueDraw
|
||||
@
|
||||
jsr plot
|
||||
|
||||
ContinueDraw
|
||||
; XI=XI+1
|
||||
; UNTIL XI=XK
|
||||
inw XI
|
||||
@@ -225,59 +278,12 @@ PutPixelinDraw
|
||||
|
||||
EndOfDraw
|
||||
mwa xtempDRAW xdraw
|
||||
mva ytempDRAW ydraw
|
||||
mwa ytempDRAW ydraw
|
||||
rts
|
||||
.endp
|
||||
|
||||
;-------------JumpPad-------------
|
||||
DrawJumpPad
|
||||
jmp (DrawJumpAddr)
|
||||
Drawplot
|
||||
jmp plot
|
||||
DrawLen
|
||||
inw LineLength
|
||||
rts
|
||||
;-------------JumpPad-------------
|
||||
|
||||
DrawCheck .proc
|
||||
lda tracerflag
|
||||
ora SmokeTracerFlag
|
||||
yestrace
|
||||
beq notrace
|
||||
jsr plot
|
||||
notrace
|
||||
;aftertrace
|
||||
lda HitFlag
|
||||
bne StopHitChecking
|
||||
|
||||
CheckCollisionDraw
|
||||
; checking collision!
|
||||
lda ydraw+1
|
||||
bne StopHitChecking
|
||||
|
||||
jsr CheckCollisionWithTank
|
||||
lda HitFlag
|
||||
bne StopHitChecking
|
||||
|
||||
mwa xdraw temp
|
||||
adw temp #mountaintable
|
||||
|
||||
ldy #0
|
||||
lda ydraw
|
||||
cmp (temp),y
|
||||
bcc StopHitChecking
|
||||
|
||||
mva #1 HitFlag
|
||||
mwa xdraw XHit
|
||||
mwa ydraw YHit
|
||||
|
||||
|
||||
StopHitChecking
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
circle .proc ;fxxxing good circle drawing :)
|
||||
.proc circle ;fxxxing good circle drawing :)
|
||||
;--------------------------------------------------
|
||||
;Turbo Basic source
|
||||
; R=30
|
||||
@@ -298,7 +304,7 @@ circle .proc ;fxxxing good circle drawing :)
|
||||
; splot8
|
||||
|
||||
mwa xdraw xcircle
|
||||
mva ydraw ycircle
|
||||
mwa ydraw ycircle
|
||||
|
||||
mwa #0 xc
|
||||
mva radius yc
|
||||
@@ -354,7 +360,7 @@ endcircleloop
|
||||
jsr splot8
|
||||
|
||||
mwa xcircle xdraw
|
||||
mva ycircle ydraw
|
||||
mwa ycircle ydraw
|
||||
rts
|
||||
.endp
|
||||
;----
|
||||
@@ -381,12 +387,19 @@ splot8 .proc
|
||||
adc YC
|
||||
sta ydraw
|
||||
sta tempcir
|
||||
lda ycircle+1
|
||||
adc #$00
|
||||
sta ydraw+1
|
||||
sta tempcir+1
|
||||
jsr plot
|
||||
|
||||
sec
|
||||
lda ycircle
|
||||
sbc YC
|
||||
sta ydraw
|
||||
lda ycircle+1
|
||||
sbc #$00
|
||||
sta ydraw+1
|
||||
jsr plot
|
||||
|
||||
sec
|
||||
@@ -400,6 +413,8 @@ splot8 .proc
|
||||
|
||||
lda tempcir
|
||||
sta ydraw
|
||||
lda tempcir+1
|
||||
sta ydraw+1
|
||||
jsr plot
|
||||
;---
|
||||
clc
|
||||
@@ -414,12 +429,19 @@ splot8 .proc
|
||||
adc xC
|
||||
sta ydraw
|
||||
sta tempcir
|
||||
lda ycircle+1
|
||||
adc #$00
|
||||
sta ydraw+1
|
||||
sta tempcir+1
|
||||
jsr plot
|
||||
|
||||
sec
|
||||
lda ycircle
|
||||
sbc xC
|
||||
sta ydraw
|
||||
lda ycircle+1
|
||||
sbc #$00
|
||||
sta ydraw+1
|
||||
jsr plot
|
||||
|
||||
sec
|
||||
@@ -433,6 +455,8 @@ splot8 .proc
|
||||
|
||||
lda tempcir
|
||||
sta ydraw
|
||||
lda tempcir+1
|
||||
sta ydraw+1
|
||||
jsr plot
|
||||
|
||||
RTS
|
||||
@@ -560,11 +584,10 @@ UnequalTanks
|
||||
bpl CheckNextTank
|
||||
rts
|
||||
.endp
|
||||
;-------------------------------------------------
|
||||
drawtanks
|
||||
;-------------------------------------------------
|
||||
|
||||
|
||||
;-------------------------------------------------
|
||||
.proc drawtanks
|
||||
;-------------------------------------------------
|
||||
lda tanknr
|
||||
pha
|
||||
ldx #$00
|
||||
@@ -581,9 +604,10 @@ DrawNextTank
|
||||
sta tankNr
|
||||
|
||||
rts
|
||||
.endp
|
||||
;---------
|
||||
drawtanknr
|
||||
ldx tanknr
|
||||
.proc DrawTankNr
|
||||
ldx tankNr
|
||||
; let's check the energy
|
||||
lda eXistenZ,x
|
||||
bne SkipRemovigPM ; if energy=0 then no tank
|
||||
@@ -670,11 +694,33 @@ ZeroesToGo
|
||||
NoPlayerMissile
|
||||
DoNotDrawTankNr
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -------------------------------------
|
||||
.proc FlashTank
|
||||
; -------------------------------------
|
||||
; number of blinking tank in TankNr
|
||||
mva #18 fs ; temp, how many times flash the tank
|
||||
tankflash_loop
|
||||
lda CONSOL ; turbo mode
|
||||
cmp #6 ; START
|
||||
sne:mva #1 fs ; finish it
|
||||
mva #1 Erase
|
||||
ldx TankNr
|
||||
jsr DrawTankNr.SkipRemovigPM ; it's necessary becouse DrawTankNr skips tanks with no energy !
|
||||
PAUSE 2
|
||||
mva #0 Erase
|
||||
ldx TankNr
|
||||
jsr DrawTankNr.SkipRemovigPM
|
||||
PAUSE 2
|
||||
dec fs
|
||||
jne tankflash_loop
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
drawmountains .proc
|
||||
.proc drawmountains
|
||||
;--------------------------------------------------
|
||||
|
||||
mwa #0 xdraw
|
||||
mwa #mountaintable modify
|
||||
mva #1 color
|
||||
@@ -685,13 +731,13 @@ drawmountainsloop
|
||||
cmp #screenheight
|
||||
beq NoMountain
|
||||
sta ydraw
|
||||
sty ydraw+1
|
||||
jsr DrawLine
|
||||
NoMountain
|
||||
inw modify
|
||||
inw xdraw
|
||||
cpw xdraw #screenwidth
|
||||
bne drawmountainsloop
|
||||
|
||||
rts
|
||||
;--------------------------------------------------
|
||||
drawmountainspixel
|
||||
@@ -704,6 +750,7 @@ drawmountainspixelloop
|
||||
ldy #0
|
||||
lda (modify),y
|
||||
sta ydraw
|
||||
sty ydraw+1
|
||||
jsr plot
|
||||
inw modify
|
||||
inw xdraw
|
||||
@@ -713,7 +760,7 @@ drawmountainspixelloop
|
||||
rts
|
||||
.endp
|
||||
;--------------------------------------------------
|
||||
SoilDown2 .proc
|
||||
.proc SoilDown2
|
||||
;--------------------------------------------------
|
||||
|
||||
; how it is supposed to work:
|
||||
@@ -750,7 +797,7 @@ SoilDown2 .proc
|
||||
adw RangeLeft #mountaintable2 tempor2
|
||||
|
||||
NextColumn1
|
||||
mva #0 ydraw
|
||||
mwa #0 ydraw
|
||||
NextPoint1
|
||||
jsr point
|
||||
beq StillNothing
|
||||
@@ -841,8 +888,9 @@ ColumnIsReady
|
||||
mva #sfx_silencer sfx_effect
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
calculatemountains .proc
|
||||
.proc calculatemountains
|
||||
;--------------------------------------------------
|
||||
mwa #0 xdraw
|
||||
|
||||
@@ -944,7 +992,7 @@ EndDrawing
|
||||
.endp
|
||||
; ****************************************************
|
||||
;--------------------------------------------------
|
||||
calculatemountains0 .proc
|
||||
.proc calculatemountains0
|
||||
; Only for testing - makes ground flat (0 pixels)
|
||||
; and places tanks on it
|
||||
; remember to remove in final compilation :)
|
||||
@@ -968,8 +1016,9 @@ SetYofNextTank
|
||||
rts
|
||||
.endp
|
||||
; ****************************************************
|
||||
|
||||
; -----------------------------------------
|
||||
unPlot .proc
|
||||
.proc unPlot
|
||||
; plots a point and saves the plotted byte, reverts the previous plot.
|
||||
; -----------------------------------------
|
||||
ldx #0 ; only one pixel
|
||||
@@ -1072,8 +1121,9 @@ SkipThisPlot
|
||||
EndOfUnPlot
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -----------------------------------------
|
||||
plot .proc ;plot (xdraw, ydraw, color)
|
||||
.proc plot ;plot (xdraw, ydraw, color)
|
||||
; color == 1 --> put pixel
|
||||
; color == 0 --> erase pixel
|
||||
; this is one of the most important routines in the whole
|
||||
@@ -1106,11 +1156,7 @@ MakePlot
|
||||
lsr
|
||||
lsr
|
||||
tay ;save
|
||||
;---
|
||||
|
||||
|
||||
|
||||
|
||||
;---
|
||||
ldx ydraw
|
||||
lda linetableL,x
|
||||
sta xbyte
|
||||
@@ -1132,17 +1178,16 @@ ClearPlot
|
||||
sta (xbyte),y
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -----------------------------------------
|
||||
point .proc
|
||||
.proc point
|
||||
; -----------------------------------------
|
||||
; checks state of the pixel (coordinates in xdraw and ydraw)
|
||||
; result is in A (zero or appropriate bit is set)
|
||||
|
||||
|
||||
; let's calculate coordinates from xdraw and ydraw
|
||||
mwa xdraw xbyte
|
||||
|
||||
|
||||
lda xbyte
|
||||
and #$7
|
||||
sta ybit
|
||||
@@ -1154,9 +1199,7 @@ point .proc
|
||||
lsr
|
||||
lsr
|
||||
tay ;save
|
||||
|
||||
;---
|
||||
|
||||
;---
|
||||
ldx ydraw
|
||||
lda linetableL,x
|
||||
sta xbyte
|
||||
@@ -1172,7 +1215,7 @@ point .proc
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
DrawLine .proc
|
||||
.proc DrawLine
|
||||
;--------------------------------------------------
|
||||
mva #0 ydraw+1
|
||||
lda #screenheight
|
||||
@@ -1182,23 +1225,21 @@ DrawLine .proc
|
||||
jsr plot.MakePlot
|
||||
;rts
|
||||
jmp IntoDraw ; jumps inside Draw routine
|
||||
; because one pixel is already plotted
|
||||
; because one pixel is already plotted
|
||||
|
||||
|
||||
loopdraw
|
||||
|
||||
lda (xbyte),y
|
||||
and bittable2,x
|
||||
sta (xbyte),y
|
||||
IntoDraw adw xbyte #screenBytes
|
||||
|
||||
dec tempbyte01
|
||||
bne loopdraw
|
||||
@
|
||||
lda (xbyte),y
|
||||
and bittable2,x
|
||||
sta (xbyte),y
|
||||
IntoDraw
|
||||
adw xbyte #screenBytes
|
||||
dec tempbyte01
|
||||
bne @-
|
||||
rts
|
||||
.endp
|
||||
;
|
||||
|
||||
; ------------------------------------------
|
||||
TypeChar .proc
|
||||
.proc TypeChar
|
||||
; puts char on the graphics screen
|
||||
; in: CharCode
|
||||
; in: left LOWER corner of the char coordinates (xdraw, ydraw)
|
||||
@@ -1247,7 +1288,6 @@ CopyMask
|
||||
lsrw xbyte ; div 8
|
||||
rorw xbyte
|
||||
rorw xbyte
|
||||
|
||||
;---
|
||||
ldy xbyte
|
||||
|
||||
@@ -1264,46 +1304,15 @@ CopyMask
|
||||
ldx ybit
|
||||
beq MaskOK00
|
||||
MakeMask00
|
||||
lsr mask1
|
||||
ror mask2
|
||||
lsr mask1+1
|
||||
ror mask2+1
|
||||
lsr mask1+2
|
||||
ror mask2+2
|
||||
lsr mask1+3
|
||||
ror mask2+3
|
||||
lsr mask1+4
|
||||
ror mask2+4
|
||||
lsr mask1+5
|
||||
ror mask2+5
|
||||
lsr mask1+6
|
||||
ror mask2+6
|
||||
lsr mask1+7
|
||||
ror mask2+7
|
||||
sec
|
||||
ror char1
|
||||
ror char2
|
||||
sec
|
||||
ror char1+1
|
||||
ror char2+1
|
||||
sec
|
||||
ror char1+2
|
||||
ror char2+2
|
||||
sec
|
||||
ror char1+3
|
||||
ror char2+3
|
||||
sec
|
||||
ror char1+4
|
||||
ror char2+4
|
||||
sec
|
||||
ror char1+5
|
||||
ror char2+5
|
||||
sec
|
||||
ror char1+6
|
||||
ror char2+6
|
||||
sec
|
||||
ror char1+7
|
||||
ror char2+7
|
||||
.rept 8
|
||||
lsr mask1+#
|
||||
ror mask2+#
|
||||
.endr
|
||||
sec
|
||||
.rept 8
|
||||
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
|
||||
ror char2+#
|
||||
.endr
|
||||
dex
|
||||
bne MakeMask00
|
||||
MaskOK00
|
||||
@@ -1333,132 +1342,126 @@ CharLoopi
|
||||
inx
|
||||
cpx #8
|
||||
bne CharLoopi
|
||||
EndPutChar
|
||||
rts
|
||||
.endp
|
||||
|
||||
; ------------------------------------------
|
||||
PutChar4x4 .proc ;puts 4x4 pixels char on the graphics screen
|
||||
; in: xdraw, ydraw (upper left corner of the char)
|
||||
.proc PutChar4x4
|
||||
; puts 4x4 pixels char on the graphics screen
|
||||
; in: xdraw, ydraw (LOWER left corner of the char)
|
||||
; in: CharCode4x4 (.sbyte)
|
||||
; in: plot4x4color (0/1)
|
||||
; all pixels are being drawn
|
||||
; (empty and not empty)
|
||||
;--------------------------------------------------
|
||||
lda plot4x4color
|
||||
sta color
|
||||
|
||||
|
||||
; calculating address of the first byte
|
||||
mva #4 LoopCounter4x4
|
||||
; cpw ydraw #(screenheight-4)
|
||||
; jcs TypeChar.EndPutChar ;nearest RTS
|
||||
; cpw xdraw #(screenwidth-4)
|
||||
; jcs TypeChar.EndPutChar ;nearest RTS
|
||||
; checks ommited.
|
||||
lda plot4x4color
|
||||
beq FontColor0
|
||||
lda #$ff ; better option to check (plot4x4color = $00 or $ff)
|
||||
sta plot4x4color
|
||||
FontColor0
|
||||
; char to the table
|
||||
lda CharCode4x4
|
||||
and #1
|
||||
beq Upper4bits
|
||||
lda #$ff ; better option to check (nibbler4x4 = $00 or $ff)
|
||||
Upper4bits
|
||||
sta nibbler4x4
|
||||
lda CharCode4x4
|
||||
ror
|
||||
; in carry there is which nibble of the byte is to be taken
|
||||
clc
|
||||
adc #(3*32)
|
||||
sta y4x4
|
||||
nextline4x4
|
||||
mva #4 Xcounter4x4
|
||||
ldy y4x4
|
||||
lda font4x4,y ;there was a problem with OMC here, but it works now
|
||||
lsr
|
||||
sta fontind
|
||||
lda #$00
|
||||
sta fontind+1
|
||||
|
||||
adw fontind #font4x4
|
||||
|
||||
ldx nibbler4x4
|
||||
beq uppernibble
|
||||
; and 4 bytes to the table
|
||||
ldy #0
|
||||
ldx #3
|
||||
CopyChar
|
||||
lda (fontind),y ; Y must be 0 !!!!
|
||||
bit nibbler4x4
|
||||
bpl GetUpper4bits
|
||||
:4 rol
|
||||
GetUpper4bits
|
||||
ora #$0f
|
||||
sta char1,x
|
||||
lda #$ff
|
||||
sta char2,x
|
||||
; and 4 bytes as a mask
|
||||
lda #$f0
|
||||
sta mask1,x
|
||||
lda #$00
|
||||
sta mask2,x
|
||||
adw fontind #32 ; next byte of 4x4 font
|
||||
dex
|
||||
bpl CopyChar
|
||||
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
uppernibble
|
||||
rol
|
||||
sta StoreA4x4
|
||||
bcs EmptyPixel ; the font I drawn is in inverse ...
|
||||
;lda plot4x4color ;these lines are not necessary
|
||||
;sta color ;if a plots are one color only
|
||||
jsr plot
|
||||
;jmp Loop4x4Continued
|
||||
EmptyPixel
|
||||
;lda #1 ;reverse color (color==1-color)
|
||||
;sec
|
||||
;sbc plot4x4color
|
||||
;sta color
|
||||
;jsr plot
|
||||
;this is turned off for speed
|
||||
;anyway we assume the text is being drawn
|
||||
;over an empty space
|
||||
Loop4x4Continued
|
||||
inw xdraw
|
||||
lda StoreA4x4
|
||||
dec Xcounter4x4
|
||||
ldx Xcounter4x4
|
||||
bne uppernibble
|
||||
; here we have on screen one line of the char
|
||||
inw ydraw
|
||||
sbw xdraw #4
|
||||
sbw y4x4 #32
|
||||
dec:lda LoopCounter4x4
|
||||
bne nextline4x4
|
||||
; calculating coordinates from xdraw and ydraw
|
||||
mwa xdraw xbyte
|
||||
|
||||
rts
|
||||
.endp
|
||||
; ------------------------------------------
|
||||
PutChar4x4FULL .proc;
|
||||
;this routine works just like PutChar4x4,
|
||||
;but this time all pixels are being drawn
|
||||
;(empty and not empty)
|
||||
;--------------------------------------------------
|
||||
lda xbyte
|
||||
and #$7
|
||||
sta ybit
|
||||
|
||||
; calculating address of the first byte
|
||||
mva #4 LoopCounter4x4
|
||||
lda CharCode4x4
|
||||
and #1
|
||||
sta nibbler4x4
|
||||
lda CharCode4x4
|
||||
ror
|
||||
; in carry there is which nibble of the byte is to be taken clc
|
||||
clc
|
||||
adc #(3*32)
|
||||
sta y4x4
|
||||
nextline4x4FULL
|
||||
mva #4 Xcounter4x4
|
||||
ldy y4x4
|
||||
lda font4x4,y
|
||||
|
||||
ldx nibbler4x4
|
||||
beq uppernibbleFULL
|
||||
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
uppernibbleFULL
|
||||
rol
|
||||
sta StoreA4x4
|
||||
bcs EmptyPixelFULL
|
||||
lda plot4x4color ;these lines are not necessary
|
||||
sta color ;if a plots are one color only
|
||||
jsr plot
|
||||
jmp Loop4x4ContinuedFULL
|
||||
EmptyPixelFULL
|
||||
lda #1 ;reverse color (color==1-color)
|
||||
lsrw xbyte ; div 8
|
||||
rorw xbyte
|
||||
rorw xbyte
|
||||
;---
|
||||
ldy xbyte
|
||||
lda ydraw ; y = y - 3 because left lower.
|
||||
sec
|
||||
sbc plot4x4color
|
||||
sta color
|
||||
jsr plot
|
||||
;this is turned on now
|
||||
;of course it is slower
|
||||
|
||||
Loop4x4ContinuedFULL
|
||||
inw xdraw
|
||||
lda StoreA4x4
|
||||
dec Xcounter4x4
|
||||
ldx Xcounter4x4
|
||||
bne uppernibbleFULL
|
||||
; here we have on screen one line of the char
|
||||
inw ydraw
|
||||
sbw xdraw #4
|
||||
sbw y4x4 #32 ; why? possibly because of width of the 4x4 font
|
||||
dec:lda LoopCounter4x4
|
||||
bne nextline4x4FULL
|
||||
sbc #3
|
||||
tax
|
||||
|
||||
lda linetableL,x
|
||||
sta xbyte
|
||||
lda linetableH,x
|
||||
sta xbyte+1
|
||||
; mask preparation and character shifting
|
||||
ldx ybit
|
||||
beq MaskOK01
|
||||
MakeMask01
|
||||
.rept 4
|
||||
lsr mask1+#
|
||||
ror mask2+#
|
||||
.endr
|
||||
sec
|
||||
.rept 4
|
||||
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
|
||||
ror char2+#
|
||||
.endr
|
||||
dex
|
||||
bne MakeMask01
|
||||
MaskOK01
|
||||
ldx #0
|
||||
CharLoopi4x4
|
||||
lda (xbyte),y
|
||||
ora mask1,x
|
||||
bit plot4x4color
|
||||
bpl PutInColor0_1 ; only mask - no char
|
||||
and char1,x
|
||||
PutInColor0_1
|
||||
sta (xbyte),y
|
||||
iny
|
||||
lda (xbyte),y
|
||||
ora mask2,x
|
||||
bit plot4x4color
|
||||
bpl PutInColor0_2 ; only mask - no char
|
||||
and char2,x
|
||||
PutInColor0_2
|
||||
sta (xbyte),y
|
||||
dey
|
||||
adw xbyte #screenBytes
|
||||
inx
|
||||
cpx #4
|
||||
bne CharLoopi4x4
|
||||
EndPut4x4
|
||||
rts
|
||||
.endp
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ NMIST = $D40F ; rejestr statusu przerwa� NMI
|
||||
;-------------------------------------
|
||||
;additional system variables
|
||||
;-------------------------------------
|
||||
ATRACT = $004D
|
||||
COLPM0S = $02C0 ;- - shadow register COLPM0
|
||||
COLPM1S = $02C1 ;- - shadow register COLPM1
|
||||
COLPM2S = $02C2 ;- - shadow register COLPM2
|
||||
|
||||
+172
-138
@@ -36,7 +36,7 @@
|
||||
;we decided it must go in 'English' to let other people work on it
|
||||
|
||||
.macro build
|
||||
dta d"141" ; number of this build (3 bytes)
|
||||
dta d"143" ; number of this build (3 bytes)
|
||||
.endm
|
||||
|
||||
icl 'definitions.asm'
|
||||
@@ -98,6 +98,7 @@
|
||||
icl 'lib/atari.hea'
|
||||
icl 'lib/macro.hea'
|
||||
|
||||
;splash screen and musix
|
||||
icl 'artwork/HIMARS14.asm'
|
||||
;Game loading address
|
||||
ORG $3000
|
||||
@@ -117,13 +118,14 @@ START
|
||||
; Startup sequence
|
||||
jsr Initialize
|
||||
|
||||
|
||||
|
||||
jsr Options ;startup screen
|
||||
lda escFlag
|
||||
bne START
|
||||
|
||||
jsr EnterPlayerNames
|
||||
lda escFlag
|
||||
bne START
|
||||
|
||||
jsr RandomizeSequence
|
||||
; for the round #1 shooting sequence is random
|
||||
|
||||
@@ -144,6 +146,9 @@ MainGameLoop
|
||||
jsr RoundInit
|
||||
|
||||
jsr MainRoundLoop
|
||||
lda escFlag
|
||||
bne START
|
||||
|
||||
mva #0 TankNr ;
|
||||
|
||||
jsr SortSequence
|
||||
@@ -248,51 +253,46 @@ skipzeroing
|
||||
; the shooting angle is randomized
|
||||
; of course gains an looses are zeroed
|
||||
|
||||
;jsr StatusDisplay
|
||||
lda #0
|
||||
tax
|
||||
@
|
||||
sta previousAngle,x
|
||||
inx
|
||||
cpx #(singleRoundVarsEnd-PreviousAngle)
|
||||
@ sta singleRoundVars,x
|
||||
inx
|
||||
cpx #(singleRoundVarsEnd-singleRoundVars)
|
||||
bne @-
|
||||
|
||||
ldx #5
|
||||
ldx #(MaxPlayers-1)
|
||||
SettingEnergies
|
||||
lda #$00
|
||||
sta gainL,x
|
||||
sta gainH,x
|
||||
sta looseL,x
|
||||
sta looseH,x
|
||||
lda #99
|
||||
sta Energy,x
|
||||
sta eXistenZ,x
|
||||
sta LASTeXistenZ,x
|
||||
; anything in eXistenZ table means that this tank exist
|
||||
; in the given round
|
||||
lda #<1000
|
||||
sta MaxEnergyTableL,x
|
||||
lda #>1000
|
||||
sta MaxEnergyTableH,x
|
||||
lda #<350
|
||||
sta EnergyTableL,x
|
||||
lda #>350
|
||||
sta EnergyTableH,x
|
||||
|
||||
;lda #(255-45)
|
||||
;it does not look good when all tanks have
|
||||
;barrels pointing the same direction
|
||||
;so it would be nice to have more or less random
|
||||
;angles
|
||||
jsr RandomizeAngle
|
||||
sta AngleTable,x
|
||||
|
||||
|
||||
dex
|
||||
lda #$00
|
||||
sta gainL,x
|
||||
sta gainH,x
|
||||
sta looseL,x
|
||||
sta looseH,x
|
||||
lda #99
|
||||
sta Energy,x
|
||||
sta eXistenZ,x
|
||||
sta LASTeXistenZ,x
|
||||
; anything in eXistenZ table means that this tank exist
|
||||
; in the given round
|
||||
lda #<1000
|
||||
sta MaxForceTableL,x
|
||||
lda #>1000
|
||||
sta MaxForceTableH,x
|
||||
lda #<350
|
||||
sta ForceTableL,x
|
||||
lda #>350
|
||||
sta ForceTableH,x
|
||||
|
||||
;lda #(255-45)
|
||||
;it does not look good when all tanks have
|
||||
;barrels pointing the same direction
|
||||
;so it would be nice to have more or less random
|
||||
;angles
|
||||
jsr RandomizeAngle
|
||||
sta AngleTable,x
|
||||
|
||||
dex
|
||||
bpl SettingEnergies
|
||||
|
||||
mva #0 CurrentResult
|
||||
|
||||
;generating the new landscape
|
||||
jsr PMoutofScreen ;let P/M disappear
|
||||
jsr clearscreen ;let the screen be clean
|
||||
@@ -322,6 +322,7 @@ SettingEnergies
|
||||
; tank with energy greater than 0 left
|
||||
|
||||
ldy #0 ; in Y - number of tanks with energy greater than zero
|
||||
sty ATRACT ; reset atract mode
|
||||
ldx NumberOfPlayers
|
||||
dex
|
||||
CheckingIfRoundIsFinished
|
||||
@@ -343,8 +344,7 @@ WhichTankWonLoop
|
||||
bne ThisOneWon
|
||||
dex
|
||||
bpl WhichTankWonLoop
|
||||
;error here!!!
|
||||
;stop
|
||||
;error was here!!!
|
||||
; somehow I believed program will be never here
|
||||
; but it was a bad assumption
|
||||
; god knows when there is such a situation
|
||||
@@ -354,7 +354,6 @@ WhichTankWonLoop
|
||||
; second tank explodes and kills the first one.
|
||||
; and code lands here...
|
||||
; looks like no one won!
|
||||
|
||||
rts
|
||||
|
||||
ThisOneWon
|
||||
@@ -376,7 +375,6 @@ DoNotFinishTheRound
|
||||
jsr DisplaySeppuku
|
||||
jmp Seppuku
|
||||
|
||||
;ldx TankNr
|
||||
@
|
||||
ldx TankSequencePointer
|
||||
lda TankSequence,x
|
||||
@@ -394,12 +392,20 @@ DoNotFinishTheRound
|
||||
lda SkillTable,x
|
||||
beq ManualShooting
|
||||
|
||||
RoboTanks
|
||||
RoboTanks
|
||||
; robotanks shoot here
|
||||
jsr ArtificialIntelligence
|
||||
jsr MoveBarrelToNewPosition
|
||||
jsr StatusDisplay ;all digital values like force, angle, wind, etc.
|
||||
jsr DisplayStatus ;all digital values like force, angle, wind, etc.
|
||||
jsr PutTankNameOnScreen
|
||||
lda kbcode
|
||||
cmp #28 ; ESC
|
||||
bne @+
|
||||
jsr AreYouSure
|
||||
lda escFlag
|
||||
seq:rts
|
||||
@
|
||||
|
||||
; let's move the tank's barrel so it points the right
|
||||
; direction
|
||||
jmp AfterManualShooting
|
||||
@@ -408,12 +414,14 @@ ManualShooting
|
||||
|
||||
jsr WaitForKeyRelease
|
||||
jsr BeforeFire
|
||||
lda escFlag
|
||||
seq:rts
|
||||
|
||||
AfterManualShooting
|
||||
inc noDeathCounter
|
||||
|
||||
jsr DecreaseWeaponBeforeShoot
|
||||
jsr StatusDisplay
|
||||
jsr DisplayStatus
|
||||
|
||||
ldx TankNr
|
||||
dec Energy,x ; lower energy to eventually let tanks commit suicide
|
||||
@@ -437,6 +445,7 @@ continueMainRoundLoopAfterSeppuku
|
||||
|
||||
|
||||
AfterExplode
|
||||
; TODO: IS IT OK??? possibly a fix here needed for #56
|
||||
ldy WeaponDepleted
|
||||
bne @+
|
||||
ldx TankNr
|
||||
@@ -474,13 +483,10 @@ missed
|
||||
jsr DisplayOffensiveTextNr
|
||||
|
||||
NextPlayerShoots
|
||||
mva #1 Erase
|
||||
jsr drawtanks
|
||||
;before it shoots, the eXistenZ table must be updated
|
||||
;accordingly to actual energy (was forgotten, sorry to ourselves)
|
||||
|
||||
;before it shoots, the eXistenZ table must be
|
||||
;updated accordingly to actual energy (was forgotten, sorry to ourselves)
|
||||
|
||||
ldx #5
|
||||
ldx #(MaxPlayers-1)
|
||||
SeteXistenZ
|
||||
lda Energy,x
|
||||
sta eXistenZ,x
|
||||
@@ -489,7 +495,7 @@ SeteXistenZ
|
||||
;DATA L1,L2
|
||||
;Multiplication 8bit*8bit,
|
||||
;result 16bit
|
||||
;this algiorithm is a little longer than in Ruszczyc 6502 book
|
||||
;this algiorithm is a little longer than one in Ruszczyc 6502 book
|
||||
;but it is faster
|
||||
|
||||
LDy #8
|
||||
@@ -500,29 +506,20 @@ LP0
|
||||
ROR L1
|
||||
BCC B0
|
||||
CLC
|
||||
ADC #10 ; multiplication by 10 (L2)
|
||||
ADC #10 ; (L2) multiplication by 10
|
||||
B0 DEY
|
||||
BNE LP0
|
||||
ror
|
||||
ROR L1
|
||||
STA MaxEnergyTableH,x
|
||||
STA MaxForceTableH,x
|
||||
lda L1
|
||||
sta MaxEnergyTableL,x
|
||||
sta MaxForceTableL,x
|
||||
|
||||
dex
|
||||
bpl SeteXistenZ
|
||||
|
||||
;was setup of maximum energy for players
|
||||
|
||||
mva #0 Erase
|
||||
jsr drawtanks
|
||||
|
||||
;inc TankNr
|
||||
;lda TankNr
|
||||
inc:lda TankSequencePointer
|
||||
cmp NumberOfPlayers
|
||||
bne PlayersAgain
|
||||
mva #0 TankSequencePointer
|
||||
|
||||
PlayersAgain
|
||||
|
||||
@@ -554,20 +551,16 @@ NoPlayerNoDeath
|
||||
dex
|
||||
bpl CheckingPlayersDeath
|
||||
; if processor is here it means there are no more explosions
|
||||
|
||||
inc:lda TankSequencePointer
|
||||
cmp NumberOfPlayers
|
||||
sne:mva #0 TankSequencePointer
|
||||
|
||||
jmp MainRoundLoop
|
||||
.endp
|
||||
|
||||
;---------------------------------
|
||||
.proc Seppuku
|
||||
lda #0
|
||||
sta FallDown1
|
||||
sta FallDown2
|
||||
lda #1 ; Missile
|
||||
jsr ExplosionDirect
|
||||
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||
.endp
|
||||
;---------------------------------
|
||||
PlayerXdeath
|
||||
.proc PlayerXdeath
|
||||
|
||||
; this tank should not explode anymore:
|
||||
; there is 0 in A, and Tank Number in X, so...
|
||||
@@ -591,7 +584,6 @@ PlayerXdeath
|
||||
sta ResultsTable,x
|
||||
inc CurrentResult
|
||||
|
||||
|
||||
mva #sfx_death_begin sfx_effect
|
||||
;RandomizeDeffensiveText
|
||||
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
|
||||
@@ -599,16 +591,19 @@ PlayerXdeath
|
||||
ldy TankTempY
|
||||
mva #1 plot4x4color
|
||||
jsr DisplayOffensiveTextNr
|
||||
; tank flash
|
||||
ldy TankTempY
|
||||
mva TankNr temp2 ; not elegant, and probably unnecessary
|
||||
sty TankNr
|
||||
jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) )
|
||||
mva temp2 TankNr
|
||||
|
||||
PAUSE 75
|
||||
;Deffensive text cleanup
|
||||
;here we clear Deffensive text (after a shoot)
|
||||
ldy TankTempY
|
||||
mva #0 plot4x4color
|
||||
jsr DisplayOffensiveTextNr
|
||||
|
||||
|
||||
|
||||
; calculate position of the explosion (the post-death one)
|
||||
ldx TankTempY
|
||||
clc
|
||||
@@ -623,7 +618,7 @@ PlayerXdeath
|
||||
sbc #4
|
||||
sta ydraw
|
||||
lda #0
|
||||
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit when transitioning ydraw to byte
|
||||
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit
|
||||
|
||||
;cleanup of the soil fall down ranges (left and right)
|
||||
sta RangeRight
|
||||
@@ -632,30 +627,25 @@ PlayerXdeath
|
||||
sta FallDown2
|
||||
mwa #screenwidth RangeLeft
|
||||
|
||||
|
||||
|
||||
; We are randomizing the weapon now.
|
||||
; jumping into the middle of the explosion
|
||||
; routine
|
||||
|
||||
MetodOfDeath
|
||||
lda random
|
||||
and #%00011111 ; range 0-31
|
||||
cmp #20 ; we have 20 weapons in table (from 0 to 19)
|
||||
cmp #(weaponsOfDeathEnd-weaponsOfDeath) ; we have 20 weapons in table (from 0 to 19)
|
||||
bcs MetodOfDeath
|
||||
tay
|
||||
lda weaponsOfDeath,y
|
||||
jsr ExplosionDirect
|
||||
mva #sfx_silencer sfx_effect
|
||||
|
||||
|
||||
; jump to after explosion routines (soil fallout, etc.)
|
||||
; After going through these routines we are back
|
||||
; to checking if a tank exploded and maybe we have
|
||||
; a deadly shot here again.
|
||||
|
||||
|
||||
jmp MainRoundLoop.AfterExplode
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc DecreaseEnergyX
|
||||
@@ -697,20 +687,52 @@ NotNegativeEnergy
|
||||
rts
|
||||
.endp
|
||||
|
||||
;---------------------------------
|
||||
.proc Seppuku
|
||||
lda #0
|
||||
sta FallDown1
|
||||
sta FallDown2
|
||||
sta ydraw+1
|
||||
; get position of the tank
|
||||
ldx TankNr
|
||||
lda xtankstableL,x
|
||||
sta xdraw
|
||||
lda xtankstableH,x
|
||||
sta xdraw+1
|
||||
lda yTanksTable,x
|
||||
sta ydraw
|
||||
lda #1 ; Missile
|
||||
jsr ExplosionDirect
|
||||
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
GetRandomWind .proc
|
||||
;in: MaxWind (byte)
|
||||
;out: Wind (word)
|
||||
;uses: _
|
||||
;--------------------------------------------------
|
||||
lda random
|
||||
cmp MaxWind
|
||||
bcs GetRandomWind ; if more than MaxWind then randomize again
|
||||
sta Wind
|
||||
mva #$00 Wind+1
|
||||
; multiply Wind by 16 and take it as a decimal part (0.Wind)
|
||||
sta Wind+2
|
||||
sta Wind+3
|
||||
; multiply Wind by 16
|
||||
; two bytes of Wind are treated as a decimal part of vx variable
|
||||
:4 aslw Wind
|
||||
; decide the direction
|
||||
lda random
|
||||
and #$01
|
||||
sta WindOrientation
|
||||
rts
|
||||
beq @+
|
||||
sec ; Wind = -Wind
|
||||
.rept 4
|
||||
lda #$00
|
||||
sbc Wind+#
|
||||
sta Wind+#
|
||||
.endr
|
||||
@ rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
@@ -728,34 +750,28 @@ PMoutofScreen .proc
|
||||
;--------------------------------------------------
|
||||
ldx #$3f
|
||||
lda #$0
|
||||
loop05
|
||||
sta TanksWeapon1,x
|
||||
sta TanksWeapon2,x
|
||||
sta TanksWeapon3,x
|
||||
sta TanksWeapon4,x
|
||||
sta TanksWeapon5,x
|
||||
sta TanksWeapon6,x
|
||||
dex
|
||||
bne @+
|
||||
lda #99
|
||||
bne loop05
|
||||
@ bpl loop05
|
||||
@
|
||||
sta TanksWeapon1,x
|
||||
sta TanksWeapon2,x
|
||||
sta TanksWeapon3,x
|
||||
sta TanksWeapon4,x
|
||||
sta TanksWeapon5,x
|
||||
sta TanksWeapon6,x
|
||||
dex
|
||||
sne:lda #99
|
||||
bpl @-
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc Initialize
|
||||
;Initialization sequence
|
||||
;uses: temp, ...
|
||||
;--------------------------------------------------
|
||||
deletePtr = temp
|
||||
|
||||
lda #0
|
||||
sta Erase
|
||||
sta tracerflag
|
||||
sta GameIsOver
|
||||
sta escFlag
|
||||
|
||||
; clean variables
|
||||
lda #0
|
||||
tay
|
||||
mwa #variablesStart deletePtr
|
||||
@ tya
|
||||
@@ -808,20 +824,20 @@ SetunPlots
|
||||
sta gtictls
|
||||
jsr PMoutofScreen
|
||||
lda TankColoursTable ; temporary colours of sprites under tanks
|
||||
sta $2c0
|
||||
sta COLPM0S
|
||||
lda TankColoursTable+1
|
||||
sta $2c1
|
||||
sta COLPM1S
|
||||
lda TankColoursTable+2
|
||||
sta $2c2
|
||||
sta COLPM2S
|
||||
lda TankColoursTable+3
|
||||
sta $2c3
|
||||
sta COLPM3S
|
||||
LDA TankColoursTable+4
|
||||
STA COLPF3S ; joined missiles (5th tank)
|
||||
mva #0 hscrol
|
||||
|
||||
|
||||
;let the tanks be visible!
|
||||
ldx #5
|
||||
ldx #(maxPlayers-1)
|
||||
lda #1 ; tank is visible
|
||||
MakeTanksVisible
|
||||
sta eXistenZ,x
|
||||
@@ -909,7 +925,19 @@ lab2
|
||||
jmp SYSVBV
|
||||
.endp
|
||||
;----------------------------------------------
|
||||
RandomizeSequence .proc
|
||||
.proc RandomizeSequence0
|
||||
ldx #0
|
||||
@ txa
|
||||
sta TankSequence,x
|
||||
inx
|
||||
cpx #MaxPlayers
|
||||
bne @-
|
||||
rts
|
||||
.endp
|
||||
|
||||
|
||||
|
||||
.proc RandomizeSequence
|
||||
; in: NumberOfPlayers
|
||||
; out: TankSequence
|
||||
; how: get random number lower than NumberOfPlayers
|
||||
@@ -982,7 +1010,7 @@ RandomizeAngle .proc ;
|
||||
.endp
|
||||
;----------------------------------------------
|
||||
RandomizeForce .proc
|
||||
; routine returns in EnergyTable/L/H
|
||||
; routine returns in ForceTable/L/H
|
||||
; valid force of shooting for TankNr
|
||||
; in X must be TankNr
|
||||
; low and high randomize boundary passed as word value
|
||||
@@ -990,36 +1018,41 @@ RandomizeForce .proc
|
||||
; RandBoundaryHigh
|
||||
;----------------------------------------------
|
||||
|
||||
lda MaxEnergyTableL,x
|
||||
sta temp
|
||||
lda MaxEnergyTableH,x
|
||||
sta temp+1
|
||||
GetRandomAgain
|
||||
lda RANDOM
|
||||
; gets values in range(256,765)
|
||||
sta temp2
|
||||
lda RANDOM ; :)
|
||||
lda RANDOM
|
||||
and #%00000011 ;(0..1023)
|
||||
sta temp2+1
|
||||
|
||||
cpw RandBoundaryLow temp2
|
||||
bcs GetRandomAgain
|
||||
bcs RandomizeForce
|
||||
|
||||
cpw RandBoundaryHigh temp2
|
||||
bcc GetRandomAgain
|
||||
bcc RandomizeForce
|
||||
|
||||
cpw temp temp2
|
||||
bcs EnergyInRange
|
||||
|
||||
mwa temp temp2
|
||||
|
||||
EnergyInRange
|
||||
lda temp2
|
||||
sta EnergyTableL,x
|
||||
sta ForceTableL,x
|
||||
lda temp2+1
|
||||
sta EnergyTableH,x
|
||||
|
||||
sta ForceTableH,x
|
||||
|
||||
;---------
|
||||
LimitForce
|
||||
; in X must be TankNr
|
||||
; cuts force to MaxForceTable
|
||||
lda MaxForceTableH,x
|
||||
cmp ForceTableH,x
|
||||
bne @+
|
||||
lda MaxForceTableL,x
|
||||
cmp ForceTableL,x
|
||||
@ bcs @+
|
||||
|
||||
lda MaxForceTableL,x
|
||||
sta ForceTableL,x
|
||||
lda MaxForceTableH,x
|
||||
sta ForceTableH,x
|
||||
@
|
||||
rts
|
||||
|
||||
.endp
|
||||
|
||||
;----------------------------------------------
|
||||
@@ -1041,14 +1074,14 @@ rotateRight;older is lower
|
||||
bne MoveBarrelToNewPosition
|
||||
|
||||
mva #$30 CharCode ; if angle goes through 0 we clear the barrel
|
||||
jsr drawtankNrX
|
||||
jsr DrawTankNr.drawtankNrX
|
||||
|
||||
jmp MoveBarrelToNewPosition
|
||||
rotateLeft
|
||||
dec angleTable,x
|
||||
bpl MoveBarrelToNewPosition
|
||||
mva #$2e CharCode
|
||||
jsr drawtankNrX
|
||||
jsr DrawTankNr.drawtankNrX
|
||||
|
||||
jmp MoveBarrelToNewPosition
|
||||
|
||||
@@ -1146,7 +1179,8 @@ nextishigher
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc getkey ; waits for pressing a key and returns pressed value in A
|
||||
.proc GetKey ; waits for pressing a key and returns pressed value in A
|
||||
; when [ESC] is pressed, escFlag is set to 1
|
||||
;--------------------------------------------------
|
||||
jsr WaitForKeyRelease
|
||||
@
|
||||
|
||||
BIN
Binary file not shown.
Executable → Regular
+127
-74
@@ -218,6 +218,8 @@ OptionsYLoop
|
||||
|
||||
ManualPurchase
|
||||
jsr Purchase
|
||||
ldx escFlag
|
||||
seq:rts
|
||||
AfterManualPurchase
|
||||
|
||||
inc:lda TankNr
|
||||
@@ -556,6 +558,8 @@ ChoosingItemForPurchase
|
||||
;--------------------------------------------------
|
||||
jsr PutLitteChar ; Places pointer at the right position
|
||||
jsr getkey
|
||||
ldx escFlag
|
||||
seq:rts
|
||||
cmp #$2c ; Tab
|
||||
jeq ListChange
|
||||
cmp #$0c ; Return
|
||||
@@ -838,7 +842,7 @@ NoArrowDown
|
||||
sta colpf2s ; set color of player name line
|
||||
jsr EnterPlayerName
|
||||
lda escFlag
|
||||
jne START
|
||||
seq:rts
|
||||
inc TankNr
|
||||
lda TankNr
|
||||
cmp NumberOfPlayers
|
||||
@@ -1342,11 +1346,9 @@ DOTNcharloop
|
||||
ldy #0
|
||||
sty LineCharNr
|
||||
|
||||
|
||||
TypeLine4x4Loop
|
||||
ldy LineCharNr
|
||||
|
||||
|
||||
mwa LineAddress4x4 temp
|
||||
lda (temp),y
|
||||
cmp #$ff
|
||||
@@ -1355,7 +1357,8 @@ TypeLine4x4Loop
|
||||
sta CharCode4x4
|
||||
mwa LineXdraw Xdraw
|
||||
mva LineYdraw Ydraw
|
||||
jsr PutChar4x4FULL ;type empty pixels as well!
|
||||
mva #1 plot4x4color
|
||||
jsr PutChar4x4 ;type empty pixels as well!
|
||||
adw LineXdraw #4
|
||||
inc LineCharNr
|
||||
jmp TypeLine4x4Loop
|
||||
@@ -1365,6 +1368,63 @@ EndOfTypeLine4x4
|
||||
.endp
|
||||
|
||||
|
||||
;--------------------------------
|
||||
.proc AreYouSure
|
||||
;using 4x4 font
|
||||
|
||||
;save vars (messed in TypeLine4x4)
|
||||
mwa Xdraw xk
|
||||
mva Ydraw yc
|
||||
|
||||
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
||||
|
||||
;top frame
|
||||
mva ResultY LineYdraw
|
||||
jsr TL4x4_top
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;seppuku
|
||||
mwa #areYouSureText LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||
mva ResultY LineYdraw
|
||||
jsr TypeLine4x4
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;bottom frame
|
||||
mva ResultY LineYdraw
|
||||
jsr TL4x4_bottom
|
||||
|
||||
|
||||
jsr GetKey
|
||||
cmp #$2b ; "Y"
|
||||
bne @+
|
||||
mva #1 escFlag
|
||||
bne skip01
|
||||
@ mva #0 escFlag
|
||||
jsr WaitForKeyRelease
|
||||
skip01
|
||||
|
||||
;clean
|
||||
mva #3 dx
|
||||
mva #4 ResultY
|
||||
@
|
||||
mva #1 plot4x4color
|
||||
mwa #lineClear LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||
mva ResultY LineYdraw
|
||||
jsr TypeLine4x4
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
dec dx
|
||||
bne @-
|
||||
|
||||
|
||||
quit_areyousure
|
||||
;restore vars
|
||||
mva yc Ydraw
|
||||
mwa xk Xdraw
|
||||
rts
|
||||
.endp
|
||||
;--------------------------------
|
||||
.proc DisplaySeppuku
|
||||
;using 4x4 font
|
||||
@@ -1373,18 +1433,17 @@ EndOfTypeLine4x4
|
||||
mwa Xdraw xk
|
||||
mva Ydraw yc
|
||||
|
||||
mva #15 fs ; temp, how many times blink the billboard
|
||||
@
|
||||
lda fs
|
||||
and #$01
|
||||
sta plot4x4color
|
||||
mva #20 fs ; temp, how many times blink the billboard
|
||||
seppuku_loop
|
||||
lda CONSOL ; turbo mode
|
||||
cmp #6 ; START
|
||||
sne:mva #1 fs ; finish it
|
||||
|
||||
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
||||
|
||||
;top frame
|
||||
mwa #LineTop LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||
mva ResultY LineYdraw
|
||||
jsr TypeLine4x4
|
||||
jsr TL4x4_top
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;seppuku
|
||||
@@ -1395,28 +1454,27 @@ EndOfTypeLine4x4
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;bottom frame
|
||||
mwa #LineBottom LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||
mva ResultY LineYdraw
|
||||
jsr TypeLine4x4
|
||||
|
||||
dec fs
|
||||
bne @-
|
||||
|
||||
jsr TL4x4_bottom ; just go
|
||||
|
||||
;clean seppuku
|
||||
mva #3 fs
|
||||
|
||||
mva #3 dx
|
||||
mva #4 ResultY
|
||||
@
|
||||
mva #1 plot4x4color
|
||||
mwa #lineClear LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||
mva ResultY LineYdraw
|
||||
jsr TypeLine4x4
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
dec fs
|
||||
bne @-
|
||||
dec dx
|
||||
bne @-
|
||||
|
||||
dec fs
|
||||
jne seppuku_loop
|
||||
|
||||
quit_seppuku
|
||||
;restore vars
|
||||
mva yc Ydraw
|
||||
mwa xk Xdraw
|
||||
@@ -1428,18 +1486,15 @@ EndOfTypeLine4x4
|
||||
;using 4x4 font
|
||||
|
||||
mva #sfx_smoke_cloud sfx_effect
|
||||
|
||||
mva #1 plot4x4color
|
||||
|
||||
;centering the result screen
|
||||
mwa #((ScreenWidth/2)-(8*4)) ResultX
|
||||
mva #((ScreenHeight/2)-(8*4)) ResultY
|
||||
|
||||
|
||||
;upper frame
|
||||
mwa #LineTop LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
jsr TL4x4_top
|
||||
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
@@ -1454,17 +1509,15 @@ EndOfTypeLine4x4
|
||||
jsr displaybyte ;decimal (byte), displayposition (word)
|
||||
|
||||
mwa #LineHeader1 LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
beq @+ ;unconditional jump, because TypeLine4x4 ends with beq
|
||||
|
||||
GameOver4x4
|
||||
mwa #LineGameOver LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
mva #1 GameIsOver
|
||||
|
||||
@@ -1472,30 +1525,23 @@ GameOver4x4
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;Empty line
|
||||
mwa #LineEmpty LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
jsr TL4x4_empty
|
||||
|
||||
adb ResultY #2 ;next line
|
||||
|
||||
|
||||
;Header2
|
||||
mwa #LineHeader2 LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;Empty line
|
||||
mwa #LineEmpty LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
jsr TL4x4_empty
|
||||
|
||||
sbb ResultY #2 ;next line (was empty)
|
||||
|
||||
@@ -1560,24 +1606,17 @@ TankNameCopyLoop
|
||||
|
||||
;result line display
|
||||
mwa #ResultLineBuffer LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
|
||||
adb ResultY #4 ;next line
|
||||
|
||||
;Empty line
|
||||
mwa #LineEmpty LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
|
||||
|
||||
jsr TL4x4_empty
|
||||
|
||||
dec ResultOfTankNr
|
||||
|
||||
bmi FinishResultDisplay
|
||||
|
||||
sbb ResultY #2 ;distance between lines is smaller
|
||||
@@ -1585,25 +1624,35 @@ TankNameCopyLoop
|
||||
jmp ResultOfTheNextPlayer
|
||||
|
||||
FinishResultDisplay
|
||||
mva ResultY LineYdraw
|
||||
;jmp TL4x4_bottom ; just go
|
||||
.endp
|
||||
|
||||
.proc TL4x4_bottom
|
||||
;bottom of the frame
|
||||
mwa #LineBottom LineAddress4x4
|
||||
mwa ResultX LineXdraw
|
||||
mva ResultY LineYdraw
|
||||
mva #1 plot4x4color
|
||||
jsr TypeLine4x4
|
||||
rts
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
jmp TypeLine4x4 ; jsr:rts
|
||||
.endp
|
||||
|
||||
.proc TL4x4_top
|
||||
;bottom of the frame
|
||||
mwa #LineTop LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
jmp TypeLine4x4 ; jsr:rts
|
||||
.endp
|
||||
|
||||
.proc TL4x4_empty
|
||||
;empty frame
|
||||
mwa #LineEmpty LineAddress4x4
|
||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||
jmp TypeLine4x4 ; jsr:rts
|
||||
.endp
|
||||
|
||||
;-------------------------------------------------
|
||||
.proc StatusDisplay
|
||||
.proc DisplayStatus
|
||||
;-------------------------------------------------
|
||||
|
||||
;lda noDeathCounter
|
||||
;sta decimal
|
||||
;mwa #textbuffer+80+37 displayposition
|
||||
;jsr displaybyte
|
||||
|
||||
;---------------------
|
||||
;displaying symbol of the weapon
|
||||
;---------------------
|
||||
@@ -1664,9 +1713,9 @@ FinishResultDisplay
|
||||
;display Force
|
||||
;=========================
|
||||
ldx TankNr
|
||||
lda EnergyTableL,x
|
||||
lda ForceTableL,x
|
||||
sta decimal
|
||||
lda EnergyTableH,x
|
||||
lda ForceTableH,x
|
||||
sta decimal+1
|
||||
mwa #textbuffer+40+34 displayposition
|
||||
jsr displaydec
|
||||
@@ -1707,35 +1756,39 @@ AngleDisplay
|
||||
mwa #textbuffer+40+21 displayposition
|
||||
jsr displaybyte
|
||||
|
||||
|
||||
;=========================
|
||||
;display Wind
|
||||
;=========================
|
||||
lda WindOrientation
|
||||
bne DisplayLeftWind
|
||||
mwa Wind temp
|
||||
lda Wind+3 ; highest byte of 4 byte wind
|
||||
bmi DisplayLeftWind
|
||||
lda #$7f ; (tab) char
|
||||
sta textbuffer+80+28
|
||||
lda #0 ;space
|
||||
sta textbuffer+80+25
|
||||
beq DisplayWindValue
|
||||
DisplayLeftWind
|
||||
sec ; Wind = -Wind
|
||||
lda #$00
|
||||
sbc temp
|
||||
sta temp
|
||||
lda #$00
|
||||
sbc temp+1
|
||||
sta temp+1
|
||||
lda #$7e ;(del) char
|
||||
sta textbuffer+80+25
|
||||
lda #0 ;space
|
||||
sta textbuffer+80+28
|
||||
DisplayWindValue
|
||||
mwa Wind temp
|
||||
lsrw temp ;divide by 16 to have
|
||||
lsrw temp ;a nice view on a screen
|
||||
lsrw temp
|
||||
lsrw temp
|
||||
:4 lsrw temp ;divide by 16 to have a nice value on a screen
|
||||
lda temp
|
||||
sta decimal
|
||||
mwa #textbuffer+80+26 displayposition
|
||||
jsr displaybyte
|
||||
|
||||
|
||||
;=========================
|
||||
;display round number
|
||||
;=========================
|
||||
lda CurrentRoundNr
|
||||
sta decimal
|
||||
mwa #textbuffer+80+14 displayposition
|
||||
|
||||
Executable → Regular
+62
-56
@@ -8,32 +8,29 @@
|
||||
; compilation to e.g. cartridge
|
||||
; zero page variables are declared in program.s65 module
|
||||
;=====================================================
|
||||
;--------------------------------------------------
|
||||
;Variables
|
||||
;--------------
|
||||
TanksNames ; DO NOT ZERO - ticket #24
|
||||
:6 dta d" "
|
||||
;----------------------------
|
||||
;----------------------------------------------------
|
||||
;Options DO NOT ZERO - ticket #27
|
||||
OptionsTable .by 0,0,2,2,0,1,3
|
||||
RoundsInTheGame .by 10 ;how many rounds in the current game
|
||||
seppukuVal .by 75
|
||||
;--------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
; 4x4 text buffer
|
||||
ResultLineBuffer
|
||||
dta d" "
|
||||
.byte $ff
|
||||
dta d" ", $ff
|
||||
LineHeader1
|
||||
dta d"# ROUND: "
|
||||
RoundNrDisplay
|
||||
dta d" #"
|
||||
.byte $ff
|
||||
dta d" #", $ff
|
||||
|
||||
;=====================================================
|
||||
variablesStart ; zeroing starts here
|
||||
escFlag .ds 1
|
||||
;=====================================================
|
||||
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||
;--------------
|
||||
sfx_effect .ds 1
|
||||
;--------------
|
||||
@@ -45,28 +42,28 @@ flyDelay .ds 1
|
||||
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
||||
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
||||
GameIsOver .DS 1 ; 1 means it was the last round in the game
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
moneyH ;we place zero at the end of prices and money
|
||||
;and have range from 0 to 99990 (not too much)
|
||||
;money players have (maybe one more byte is needed?)
|
||||
.DS [MaxPlayers]
|
||||
moneyL
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
gainH ;how much money player gets after the round
|
||||
;it is gathered during the round basing on energy
|
||||
;opponents loose after player's shoots
|
||||
.DS [MaxPlayers]
|
||||
gainL
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
looseH ;how much player looses after the round
|
||||
;calculated from REAL energy loss
|
||||
;(not only to zero energy)
|
||||
.DS [MaxPlayers]
|
||||
looseL
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
Energy
|
||||
.DS [MaxPlayers]
|
||||
EnergyDecrease .DS 1
|
||||
@@ -79,66 +76,65 @@ ResultsTable ;the results in the gameeeeee
|
||||
.DS [MaxPlayers]
|
||||
TempResults
|
||||
.DS [MaxPlayers]
|
||||
CurrentResult
|
||||
.DS 1
|
||||
;-----------------------------------
|
||||
EnergyTableL ;shooting Force of the tank during the round
|
||||
;----------------------------------------------------
|
||||
ForceTableL ;shooting Force of the tank during the round
|
||||
.DS [MaxPlayers]
|
||||
EnergyTableH
|
||||
ForceTableH
|
||||
.DS [MaxPlayers] ;maxplayers=6
|
||||
MaxEnergyTableL ;Energy of the tank during the round
|
||||
MaxForceTableL ;Energy of the tank during the round
|
||||
;(limes superior force of the Shoot)
|
||||
.DS [MaxPlayers] ;1000 is the default
|
||||
MaxEnergyTableH
|
||||
MaxForceTableH
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
AngleTable ;Angle of the barrel of each tank during the round
|
||||
.DS [MaxPlayers]
|
||||
NewAngle .DS 1
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
ActiveWeapon ;number of the selected weapon
|
||||
.DS [MaxPlayers]
|
||||
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
;format of the 3-byte static point number used in the game
|
||||
; 20203.5 => 128 : <20203 : >20203
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
L1 .DS 1 ; variable used in multiplications (by 10:)
|
||||
gravity .DS 1 ;only the decimal part (1/10 = 25)
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
Wind .ds 2 ;walue displayed on the screen
|
||||
;multiplied by 16 (decimal part only)
|
||||
;-----------------------------------
|
||||
Wind .ds 4 ;format: 0000.hhll
|
||||
;walue displayed on the screen is
|
||||
;decimal portion divided by 16 (>>4)
|
||||
;----------------------------------------------------
|
||||
MaxWind .ds 1 ;
|
||||
WindOrientation .DS 1 ;(0-right,1-left)
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
Counter .DS 1 ;temporary Counter for outside loops
|
||||
HitFlag .DS 1 ;1 when missile hit anything
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
xtankstableL ;X positions of tanks (lower left point)
|
||||
.DS [MaxPlayers]
|
||||
xtankstableH
|
||||
.DS [MaxPlayers]
|
||||
ytankstable ;Y positions of tanks (lower left point)
|
||||
.DS [MaxPlayers]
|
||||
LowResDistances ; coarse stank positions divided by 4 (to be in just one byte)
|
||||
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
|
||||
.DS [MaxPlayers]
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
Erase .DS 1 ; if 1 only mask of the character is printed
|
||||
; on the graphics screen. if 0 character is printed normally
|
||||
; on the graphics screen. if 0 character is printed normally
|
||||
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
RangeLeft .DS 2 ;range of the soil to be fallen down
|
||||
RangeRight .DS 2 ;it is being set by all Explosions
|
||||
;-----------------------------------
|
||||
;----------------------------------------------------
|
||||
WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon
|
||||
WeaponRangeRight .DS 2
|
||||
;--------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;xroller
|
||||
HowMuchToFall .ds 1
|
||||
HeightRol .DS 1
|
||||
@@ -159,7 +155,6 @@ sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
||||
;ofdirt
|
||||
magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65)
|
||||
;draw
|
||||
DrawJumpAddr .DS 2
|
||||
HowToDraw .DS 1
|
||||
; bits here mean
|
||||
; 0 - negative X (go up)
|
||||
@@ -172,14 +167,14 @@ LineLength .DS 2
|
||||
;circle
|
||||
radius .DS 1
|
||||
xcircle .DS 2
|
||||
ycircle .DS 1
|
||||
ycircle .DS 2
|
||||
tempcir .DS 2
|
||||
;TankFalls
|
||||
IfFallDown .DS 1
|
||||
PreviousFall .DS 1
|
||||
EndOfTheFallFlag .DS 1 ; in case of the infinite fall
|
||||
Parachute .DS 1 ; are you insured with parachute?
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;Flight
|
||||
;variables for 5 missiles (used for mirv)
|
||||
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
|
||||
@@ -192,7 +187,9 @@ vx03 .DS [5]
|
||||
MirvDown .DS [5] ; is given missile down?
|
||||
MirvMissileCounter .DS 1 ; missile Counter (mainly for X)
|
||||
SmokeTracerFlag .DS 1 ; if Smoketracer
|
||||
; -------------------------------------------------
|
||||
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
|
||||
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
|
||||
;----------------------------------------------------
|
||||
;CheckCollisionWithTank
|
||||
vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA)
|
||||
vy .ds 4 ;0,0,0,0
|
||||
@@ -204,12 +201,11 @@ Angle .DS 1
|
||||
Force .ds 3 ; 0,0,0
|
||||
Multiplier .ds 3 ; 0,0,0
|
||||
Multiplee .ds 2 ; 0,0
|
||||
Result .ds 3 ; 0,0,0
|
||||
goleft .DS 1 ;if 1 then flights left
|
||||
;--------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;SoilDown2
|
||||
IsEndOfTheFallFlag .DS 1
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;unPlot
|
||||
WhichUnPlot .DS 1
|
||||
; max 5 concurrent unPlots
|
||||
@@ -223,7 +219,7 @@ xtrajfb .DS 2
|
||||
ytrajfb .DS 2
|
||||
;
|
||||
tracerflag .DS 1
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;TypeChar
|
||||
mask1 .DS [8]
|
||||
mask2 .DS [8]
|
||||
@@ -241,7 +237,7 @@ UpNdown .DS 1
|
||||
temptankX .DS 2
|
||||
temptankNr .DS 1
|
||||
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;Variables from textproc.s65
|
||||
; tables with numbers of weapons on the right lists
|
||||
; to be honest - I do not know at the moment what the above
|
||||
@@ -251,7 +247,7 @@ NubersOfWeaponsL1
|
||||
.ds 8*5 ; :(8*5) .by $ff
|
||||
NubersOfWeaponsL2
|
||||
.ds 8*2 ; :(8*2) .by $ff
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
; variables storing amount of weapons on the first and second
|
||||
; list and pointer position
|
||||
@@ -274,14 +270,14 @@ WhichList ; list currently on the screen
|
||||
OffsetDL1 ; offset of the list screen (how many lines)....
|
||||
.DS 1
|
||||
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
;mark the level
|
||||
PositionInName ; cursor position in name of the player when name input
|
||||
.DS 1
|
||||
DifficultyLevel ; Difficulty Level (human/cpu)
|
||||
.DS 1
|
||||
;-------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
;displaydecimal
|
||||
decimal .DS 2
|
||||
decimalresult .DS 4
|
||||
@@ -296,7 +292,7 @@ FallDown2 .DS 1
|
||||
LeapFrogAngle .DS 1
|
||||
;laser
|
||||
LaserCoordinate .DS 8 ; 2,2,2,2
|
||||
; -------------------------------------------------
|
||||
;----------------------------------------------------
|
||||
; Here go tables with weapons possesed by a given tank
|
||||
; Index in the table means weapon type
|
||||
; number entered means ammo for given weapon possessed (max 99)
|
||||
@@ -323,7 +319,7 @@ mountaintable2 ;table of mountains (size=screenwidth)
|
||||
.DS [screenwidth]
|
||||
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
|
||||
MountaintableEnd ;good for table clearing
|
||||
;----------------------------------------------
|
||||
;----------------------------------------------------
|
||||
TextPositionX .DS 2
|
||||
TextPositionY .DS 1
|
||||
TextAddress .DS 2
|
||||
@@ -332,7 +328,16 @@ TextNumberOff .DS 1
|
||||
;--------------
|
||||
TankTempY
|
||||
.DS 1
|
||||
;----------------------------------------------------
|
||||
;-------------- single round variables --------------
|
||||
;----------------------------------------------------
|
||||
singleRoundVars
|
||||
;--------------
|
||||
escFlag .ds 1
|
||||
;--------------
|
||||
CurrentResult
|
||||
.DS 1
|
||||
;--------------
|
||||
previousAngle
|
||||
.DS [MaxPlayers]
|
||||
previousEnergyL
|
||||
@@ -350,9 +355,9 @@ RandBoundaryHigh
|
||||
AngleTablePointer
|
||||
.DS 1
|
||||
singleRoundVarsEnd
|
||||
;----------------------------------------------
|
||||
;----------------------------------------------------
|
||||
; 4x4 texts
|
||||
;----------------------------------------------
|
||||
;----------------------------------------------------
|
||||
LineAddress4x4
|
||||
.DS 2
|
||||
LineCharNr
|
||||
@@ -370,8 +375,9 @@ ResultY
|
||||
ResultOfTankNr
|
||||
.DS 1
|
||||
|
||||
;----------------------------
|
||||
;----------------------------------------------------
|
||||
;PutChar4x4
|
||||
;----------------------------------------------------
|
||||
LoopCounter4x4 .DS 1
|
||||
y4x4 .DS 1
|
||||
StoreA4x4 .DS 1
|
||||
@@ -383,6 +389,6 @@ plot4x4color .DS 1 ;1-white, 0-background
|
||||
|
||||
|
||||
variablesEnd
|
||||
;----------------------------
|
||||
;----------------------------------------------------
|
||||
|
||||
.endif
|
||||
|
||||
Executable → Regular
+261
-323
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user