mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
build 131
This commit is contained in:
@@ -40,6 +40,13 @@ with the advent of fujinet (https://fujinet.online/) we are thinking about makin
|
|||||||
|
|
||||||
## Changes:
|
## Changes:
|
||||||
|
|
||||||
|
###### Build 131
|
||||||
|
2022-03-20
|
||||||
|
- fixed bug: https://github.com/pkali/scorch_src/issues/4 It was really hard one, because I had to unspaghetti our own lousy code :]
|
||||||
|
- it is now impossible to purchase non-existing weapons.
|
||||||
|
- numerous edits / optimizations during debugging process
|
||||||
|
- bug tracker moved to https://github.com/pkali/scorch_src/issues
|
||||||
|
|
||||||
###### Build 130
|
###### Build 130
|
||||||
2022-03-13
|
2022-03-13
|
||||||
- fixed bug: Decreasing of number of bullets after a shoot does not work correctly. It does look like it is fixed, although all I did was moving decreasing before shooting. Displaying number of bullets immediately after shoot.
|
- fixed bug: Decreasing of number of bullets after a shoot does not work correctly. It does look like it is fixed, although all I did was moving decreasing before shooting. Displaying number of bullets immediately after shoot.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
MOVED TO: https://github.com/pkali/scorch_src/issues
|
||||||
|
|
||||||
TODO and BUGS file
|
TODO and BUGS file
|
||||||
rev. 2013-11-17
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
Known bugs (+ means bug is fixed)
|
Known bugs (+ means bug is fixed)
|
||||||
@@ -11,11 +12,13 @@ Known bugs (+ means bug is fixed)
|
|||||||
017: Observed MIRV loops - it shoots and shoots MIRV all over the screen. Very rare.
|
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
|
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
|
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:
|
Fixed:
|
||||||
+001. when bullet goes straight down very fast it misses the tank
|
+001. when bullet goes straight down very fast it misses the tank
|
||||||
it happens only when tank is standing on the bottom of
|
it happens only when tank is standing on the bottom of
|
||||||
the screen (no groud below)
|
the screen (no ground below)
|
||||||
+002. points after the round are not calculated correctly
|
+002. points after the round are not calculated correctly
|
||||||
+003. if death's head explodes low, the lowest explosion wraps
|
+003. if death's head explodes low, the lowest explosion wraps
|
||||||
and appears on the top of the screen
|
and appears on the top of the screen
|
||||||
@@ -56,17 +59,15 @@ To do
|
|||||||
006. Add sound effects (maybe sampled? or mp0 (sound based on fft))
|
006. Add sound effects (maybe sampled? or mp0 (sound based on fft))
|
||||||
007. There is no defensive weapon handling (only parachute works,
|
007. There is no defensive weapon handling (only parachute works,
|
||||||
but also provisionally
|
but also provisionally
|
||||||
009. Make AI in the existing frame
|
009. Make AI in the existing framework (ongoing)
|
||||||
010. It is impossible to look up a number of parachutes left.
|
010. It is impossible to look up a number of parachutes left.
|
||||||
012. Decreased number of bullets should be displayed just after the shoot.
|
|
||||||
013. Check LineTable - possibly it is unnecessarily long
|
|
||||||
018. Speed up soil down after soil eating weapons - correctly calculate
|
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.
|
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.
|
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
|
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
|
021. Add player colors to purchase screen
|
||||||
022. Make colors more contrasting
|
022. Make colors more contrasting
|
||||||
023. Make not implemented weapons raise NotImplementedError :]
|
024. no visual indication of using defensive weapons
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
|
||||||
@@ -77,10 +78,13 @@ Done:
|
|||||||
E.g. when a given tank is shooting it's colour could be behind
|
E.g. when a given tank is shooting it's colour could be behind
|
||||||
tank name on the text screen
|
tank name on the text screen
|
||||||
+005. Add number of rounds to the options menu
|
+005. Add number of rounds to the options menu
|
||||||
+008. No computer operated opponents - make a frame for AI!!!
|
+008. No computer operated opponents - make a framework for AI!!!
|
||||||
+011. Colouring the top status lines in a colour of the active tank.
|
+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!
|
+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)
|
(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)
|
+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)
|
+016. Speed up death's head (e.g.: draw each second circle)
|
||||||
-017. Wide screen mode (with scroll?)
|
-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)
|
||||||
+1
-1
@@ -77,7 +77,7 @@ PlotLine = display + screenHeight*screenBytes ; the last line is plot pointer
|
|||||||
;Screen displays go first to avoid crossing 4kb barrier
|
;Screen displays go first to avoid crossing 4kb barrier
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
OptionsScreen
|
OptionsScreen
|
||||||
dta d"Welcome to Scorch ver. 130 (un)2000-2022"
|
dta d"Welcome to Scorch ver. 131 (un)2000-2022"
|
||||||
dta d" Please select option with cursor keys "
|
dta d" Please select option with cursor keys "
|
||||||
dta d" and press (Return) to proceed "
|
dta d" and press (Return) to proceed "
|
||||||
OptionsHere
|
OptionsHere
|
||||||
|
|||||||
+38
-43
@@ -229,6 +229,7 @@ EndOfDraw
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;-------------JumpPad-------------
|
||||||
DrawJumpPad
|
DrawJumpPad
|
||||||
jmp (DrawJumpAddr)
|
jmp (DrawJumpAddr)
|
||||||
Drawplot
|
Drawplot
|
||||||
@@ -236,10 +237,9 @@ Drawplot
|
|||||||
DrawLen
|
DrawLen
|
||||||
inw LineLength
|
inw LineLength
|
||||||
rts
|
rts
|
||||||
|
;-------------JumpPad-------------
|
||||||
|
|
||||||
DrawCheck .proc
|
DrawCheck .proc
|
||||||
; lda SmokeTracerFlag
|
|
||||||
; bne yestrace ; jakie to g�upie....
|
|
||||||
lda tracerflag
|
lda tracerflag
|
||||||
ora SmokeTracerFlag
|
ora SmokeTracerFlag
|
||||||
yestrace
|
yestrace
|
||||||
@@ -260,14 +260,7 @@ CheckCollisionDraw
|
|||||||
bne StopHitChecking
|
bne StopHitChecking
|
||||||
|
|
||||||
mwa xdraw temp
|
mwa xdraw temp
|
||||||
;adw temp --- it does not work!!!!!!!! and should? OMC ??? #mountaintable
|
adw temp #mountaintable
|
||||||
clc
|
|
||||||
lda temp
|
|
||||||
adc #<mountaintable
|
|
||||||
sta temp
|
|
||||||
lda temp+1
|
|
||||||
adc #>mountaintable
|
|
||||||
sta temp+1
|
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
lda ydraw
|
lda ydraw
|
||||||
@@ -504,20 +497,20 @@ placetanks .proc
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
|
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
|
||||||
lda #0
|
lda #0
|
||||||
skip09
|
@
|
||||||
; clearing the tables with coordinates of the tank
|
; clearing the tables with coordinates of the tank
|
||||||
; it is necessary, because randomizing checks
|
; it is necessary, because randomizing checks
|
||||||
; if the given tank is already placed
|
; if the given tank is already placed
|
||||||
; after check if its position is not (0,0)
|
; after check if its position is not (0,0)
|
||||||
|
|
||||||
; I will be honest with you - I have no idea
|
; I will be honest with you - I have no idea
|
||||||
; what the above comment was intending to mean :)
|
; what the above comment was intending to mean :)
|
||||||
|
|
||||||
sta XtankstableL,x
|
sta XtankstableL,x
|
||||||
sta XtankstableH,x
|
sta XtankstableH,x
|
||||||
sta Ytankstable,x
|
sta Ytankstable,x
|
||||||
dex
|
dex
|
||||||
bpl skip09
|
bpl @-
|
||||||
|
|
||||||
|
|
||||||
mwa #0 temptankX
|
mwa #0 temptankX
|
||||||
@@ -635,10 +628,10 @@ drawtanknr
|
|||||||
lda eXistenZ,x
|
lda eXistenZ,x
|
||||||
bne SkipRemovigPM ; if energy=0 then no tank
|
bne SkipRemovigPM ; if energy=0 then no tank
|
||||||
|
|
||||||
; hide P/M
|
; hide P/M
|
||||||
lda #0
|
lda #0
|
||||||
sta hposp0,x
|
sta hposp0,x
|
||||||
jmp DoNotDrawTankNr
|
jmp DoNotDrawTankNr
|
||||||
SkipRemovigPM
|
SkipRemovigPM
|
||||||
|
|
||||||
|
|
||||||
@@ -964,21 +957,21 @@ ToTop ;it means substracting
|
|||||||
sbw yfloat delta
|
sbw yfloat delta
|
||||||
lda yfloat+1
|
lda yfloat+1
|
||||||
cmp #margin
|
cmp #margin
|
||||||
bcs Skip01
|
bcs @+
|
||||||
; if smaller than 10
|
; if smaller than 10
|
||||||
ldx #$00
|
ldx #$00
|
||||||
stx UpNdown
|
stx UpNdown
|
||||||
jmp Skip01
|
jmp @+
|
||||||
|
|
||||||
ToBottom
|
ToBottom
|
||||||
adw yfloat delta
|
adw yfloat delta
|
||||||
lda yfloat+1
|
lda yfloat+1
|
||||||
cmp #screenheight-margin
|
cmp #screenheight-margin
|
||||||
bcc Skip01
|
bcc @+
|
||||||
; if higher than screen
|
; if higher than screen
|
||||||
ldx #$01
|
ldx #$01
|
||||||
stx UpNdown
|
stx UpNdown
|
||||||
Skip01
|
@
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
|
||||||
inw xdraw
|
inw xdraw
|
||||||
@@ -1096,7 +1089,9 @@ EndOfUnPlot
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
plot .proc ;plot (xdraw, ydraw)
|
plot .proc ;plot (xdraw, ydraw, color)
|
||||||
|
; color == 1 --> put pixel
|
||||||
|
; color == 0 --> erase pixel
|
||||||
; this is one of the most important routines in the whole
|
; this is one of the most important routines in the whole
|
||||||
; game. If you are going to speed up the game, start with
|
; game. If you are going to speed up the game, start with
|
||||||
; plot - it is used by every single effect starting from explosions
|
; plot - it is used by every single effect starting from explosions
|
||||||
@@ -1123,7 +1118,7 @@ MakePlot
|
|||||||
;xbyte = xbyte/8
|
;xbyte = xbyte/8
|
||||||
lda xbyte
|
lda xbyte
|
||||||
lsr xbyte+1
|
lsr xbyte+1
|
||||||
ror ;just one bit over 256. Max screenwidht = 512!!!
|
ror ;just one bit over 256. Max screenwidth = 512!!!
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
tay ;save
|
tay ;save
|
||||||
|
|||||||
+17
-9
@@ -53,7 +53,7 @@
|
|||||||
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
||||||
;--------------temps used in circle routine
|
;--------------temps used in circle routine
|
||||||
.zpvar xi .word ;X (word) in draw routine
|
.zpvar xi .word ;X (word) in draw routine
|
||||||
.zpvar fx .byte ;circle drawing variables
|
.zpvar fx .byte ;circle drawing variables
|
||||||
.zpvar yi .word ;Y (word) in draw routine
|
.zpvar yi .word ;Y (word) in draw routine
|
||||||
.zpvar fy .byte
|
.zpvar fy .byte
|
||||||
.zpvar xk .word
|
.zpvar xk .word
|
||||||
@@ -75,7 +75,7 @@ displayposition = modify
|
|||||||
FlyDelay = 150
|
FlyDelay = 150
|
||||||
screenheight = 200
|
screenheight = 200
|
||||||
screenBytes = 40
|
screenBytes = 40
|
||||||
screenwidth = screenBytes*8
|
screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
|
||||||
margin = 48 ;mountain drawing Y variable margin
|
margin = 48 ;mountain drawing Y variable margin
|
||||||
display = $1010 ;kill dos with the casette recorder!
|
display = $1010 ;kill dos with the casette recorder!
|
||||||
MaxPlayers = 6
|
MaxPlayers = 6
|
||||||
@@ -272,7 +272,6 @@ loop
|
|||||||
inx
|
inx
|
||||||
cpx #(clearEnd-PreviousAngle)
|
cpx #(clearEnd-PreviousAngle)
|
||||||
bne loop
|
bne loop
|
||||||
.endp
|
|
||||||
|
|
||||||
ldx #5
|
ldx #5
|
||||||
SettingEnergies
|
SettingEnergies
|
||||||
@@ -318,6 +317,8 @@ SettingEnergies
|
|||||||
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. revisit.
|
||||||
|
|
||||||
;--------------------round screen is ready---------
|
;--------------------round screen is ready---------
|
||||||
|
|
||||||
;mva #0 TankNr
|
;mva #0 TankNr
|
||||||
@@ -408,12 +409,12 @@ AfterManualShooting
|
|||||||
jsr DecreaseWeaponBeforeShoot
|
jsr DecreaseWeaponBeforeShoot
|
||||||
jsr DisplayingSymbols
|
jsr DisplayingSymbols
|
||||||
|
|
||||||
; lower energy to eventually let tanks commit suicide
|
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
dec Energy,x
|
dec Energy,x ; lower energy to eventually let tanks commit suicide
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
|
|
||||||
jsr Shoot
|
jsr Shoot
|
||||||
|
|
||||||
lda HitFlag ;0 if missed
|
lda HitFlag ;0 if missed
|
||||||
beq missed
|
beq missed
|
||||||
lda #0
|
lda #0
|
||||||
@@ -428,6 +429,13 @@ AfterManualShooting
|
|||||||
|
|
||||||
|
|
||||||
AfterExplode
|
AfterExplode
|
||||||
|
ldy WeaponDepleted
|
||||||
|
bne @+
|
||||||
|
ldx TankNr
|
||||||
|
tya
|
||||||
|
sta ActiveWeapon,x
|
||||||
|
@
|
||||||
|
|
||||||
;temporary tanks removal (would fall down with soil)
|
;temporary tanks removal (would fall down with soil)
|
||||||
mva TankNr tempor2
|
mva TankNr tempor2
|
||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
@@ -773,10 +781,10 @@ loop05
|
|||||||
sta TanksWeapon5,x
|
sta TanksWeapon5,x
|
||||||
sta TanksWeapon6,x
|
sta TanksWeapon6,x
|
||||||
dex
|
dex
|
||||||
bne skip13
|
bne @+
|
||||||
lda #99
|
lda #99
|
||||||
bne loop05
|
bne loop05
|
||||||
skip13 bpl loop05
|
@ bpl loop05
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+65
-55
@@ -134,14 +134,14 @@ OptionsFinished
|
|||||||
|
|
||||||
ldy OptionsTable+1
|
ldy OptionsTable+1
|
||||||
ldx #0
|
ldx #0
|
||||||
skip10
|
@
|
||||||
lda CashOptionL,y
|
lda CashOptionL,y
|
||||||
sta moneyL,x
|
sta moneyL,x
|
||||||
lda CashOptionH,y
|
lda CashOptionH,y
|
||||||
sta moneyH,x
|
sta moneyH,x
|
||||||
inx
|
inx
|
||||||
cpx NumberOfPlayers
|
cpx NumberOfPlayers
|
||||||
bne skip10
|
bne @-
|
||||||
|
|
||||||
;third option (gravity)
|
;third option (gravity)
|
||||||
ldy OptionsTable+2
|
ldy OptionsTable+2
|
||||||
@@ -234,7 +234,7 @@ OptionsYLoop
|
|||||||
|
|
||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
; call of the purchase screens for each tank
|
; call of the purchase screens for each tank
|
||||||
CallPurchaseForEveryTank
|
.proc CallPurchaseForEveryTank
|
||||||
mva #$2 colpf2s ; set normal color
|
mva #$2 colpf2s ; set normal color
|
||||||
mwa #PurchaseDL dlptrs
|
mwa #PurchaseDL dlptrs
|
||||||
lda dmactls
|
lda dmactls
|
||||||
@@ -259,9 +259,10 @@ AfterManualPurchase
|
|||||||
cmp NumberOfPlayers
|
cmp NumberOfPlayers
|
||||||
bne loop03
|
bne loop03
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Purchase ;
|
.proc Purchase ;
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; In tanknr there is a number of the tank (player)
|
; In tanknr there is a number of the tank (player)
|
||||||
; that is buying weapons now (from 0).
|
; that is buying weapons now (from 0).
|
||||||
@@ -359,7 +360,7 @@ CheckWeapon01
|
|||||||
ldy #$4 ; 4 chars from the beginning of the line
|
ldy #$4 ; 4 chars from the beginning of the line
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
|
|
||||||
;now number of purchased units (bullets)
|
;now number of purchased units (shells)
|
||||||
clc
|
clc
|
||||||
lda xbyte
|
lda xbyte
|
||||||
adc #23 ; 23 chars from the beginning of the line
|
adc #23 ; 23 chars from the beginning of the line
|
||||||
@@ -409,24 +410,22 @@ CheckWeapon01
|
|||||||
mva #0 temp+1 ; this number is only in X
|
mva #0 temp+1 ; this number is only in X
|
||||||
; times 16 (it's length of the names of weapons)
|
; times 16 (it's length of the names of weapons)
|
||||||
ldy #3 ; Rotate 4 times
|
ldy #3 ; Rotate 4 times
|
||||||
Rotate02
|
@
|
||||||
asl temp
|
asl temp
|
||||||
rol temp+1
|
rol temp+1
|
||||||
dey
|
dey
|
||||||
bpl Rotate02
|
bpl @-
|
||||||
; Hmmm..... Interesting why there is no CLC here?
|
|
||||||
|
|
||||||
adw temp #NamesOfWeapons modify
|
adw temp #NamesOfWeapons-6 modify
|
||||||
sbw modify #6 ; from 6th char
|
|
||||||
|
|
||||||
ldy #6 ; from 6th char
|
ldy #6 ; from 6th char
|
||||||
|
|
||||||
modyf1
|
@
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
iny
|
iny
|
||||||
cpy #(16+6)
|
cpy #(16+6)
|
||||||
bne modyf1
|
bne @-
|
||||||
|
|
||||||
|
|
||||||
; in X there is what we need
|
; in X there is what we need
|
||||||
@@ -506,8 +505,8 @@ WeHaveOffset
|
|||||||
Rotate04
|
Rotate04
|
||||||
lsr xbyte+1
|
lsr xbyte+1
|
||||||
bcc DoNotAddX01
|
bcc DoNotAddX01
|
||||||
clc
|
clc
|
||||||
adc #40
|
adc #40
|
||||||
DoNotAddX01
|
DoNotAddX01
|
||||||
ror
|
ror
|
||||||
ror xbyte
|
ror xbyte
|
||||||
@@ -668,20 +667,23 @@ ListChange
|
|||||||
sta WhichList
|
sta WhichList
|
||||||
bne SecondSelected
|
bne SecondSelected
|
||||||
mwa #ListOfWeapons WeaponsListDL
|
mwa #ListOfWeapons WeaponsListDL
|
||||||
jmp dalejx01
|
jmp @+
|
||||||
SecondSelected
|
SecondSelected
|
||||||
mwa #ListOfDefensiveWeapons WeaponsListDL
|
mwa #ListOfDefensiveWeapons WeaponsListDL
|
||||||
dalejx01
|
@
|
||||||
lda #$00
|
lda #$00
|
||||||
sta PositionOnTheList
|
sta PositionOnTheList
|
||||||
sta OffsetDL1
|
sta OffsetDL1
|
||||||
jmp ChoosingItemForPurchase
|
jmp ChoosingItemForPurchase
|
||||||
|
|
||||||
|
.endp
|
||||||
; weapon purchase routne increases number of possessed bullets
|
; weapon purchase routne increases number of possessed bullets
|
||||||
; decreases cash and jumps to screen refresh
|
; decreases cash and jumps to screen refresh
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
PurchaseWeaponNow
|
.proc PurchaseWeaponNow
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
isPriceZero = tempXRoller
|
||||||
|
|
||||||
lda WhichList
|
lda WhichList
|
||||||
bne PurchaseDeffensive
|
bne PurchaseDeffensive
|
||||||
|
|
||||||
@@ -696,6 +698,7 @@ PurchaseAll
|
|||||||
; after getting weapon number the routine is common for all
|
; after getting weapon number the routine is common for all
|
||||||
ldx tanknr
|
ldx tanknr
|
||||||
tay ; weapon number is in Y
|
tay ; weapon number is in Y
|
||||||
|
beq @+
|
||||||
sec
|
sec
|
||||||
lda moneyL,x ; substracting from posessed money
|
lda moneyL,x ; substracting from posessed money
|
||||||
sbc WeaponPriceL,y ; of price of the given weapon
|
sbc WeaponPriceL,y ; of price of the given weapon
|
||||||
@@ -703,25 +706,20 @@ PurchaseAll
|
|||||||
lda moneyH,x
|
lda moneyH,x
|
||||||
sbc WeaponPriceH,y
|
sbc WeaponPriceH,y
|
||||||
sta moneyH,x
|
sta moneyH,x
|
||||||
; now we have get address of
|
|
||||||
|
; save info about price == 0
|
||||||
|
lda WeaponPriceL,y
|
||||||
|
ora WeaponPriceH,y
|
||||||
|
sta isPriceZero
|
||||||
|
|
||||||
|
|
||||||
|
; now we have to get address of
|
||||||
; the table of the weapon of the tank
|
; the table of the weapon of the tank
|
||||||
; and add appropriate number of bullets
|
; and add appropriate number of shells
|
||||||
stx temp ;we will multiply by 64
|
|
||||||
mva #0 temp+1
|
lda TanksWeaponsTableL,x
|
||||||
; times 64
|
|
||||||
; (because it is the lenght of one record in weapon table)
|
|
||||||
ldx #5 ; Rotate 6 times
|
|
||||||
; (in Y there is a weapon number, we do not touch it!!!)
|
|
||||||
Rotate03
|
|
||||||
asl temp
|
|
||||||
rol temp+1
|
|
||||||
dex
|
|
||||||
bpl Rotate03
|
|
||||||
lda #<TanksWeapon1
|
|
||||||
adc temp
|
|
||||||
sta temp
|
sta temp
|
||||||
lda #>TanksWeapon1
|
lda TanksWeaponsTableH,x
|
||||||
adc temp+1
|
|
||||||
sta temp+1
|
sta temp+1
|
||||||
|
|
||||||
lda (temp),y ; and we have number of posessed bullets of the weapon
|
lda (temp),y ; and we have number of posessed bullets of the weapon
|
||||||
@@ -729,15 +727,24 @@ Rotate03
|
|||||||
sta (temp),y ; and we added appropriate number of bullets
|
sta (temp),y ; and we added appropriate number of bullets
|
||||||
cmp #100 ; but there should be no more than 99 bullets
|
cmp #100 ; but there should be no more than 99 bullets
|
||||||
bcc LessThan100
|
bcc LessThan100
|
||||||
lda #99
|
lda #99
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
LessThan100
|
LessThan100
|
||||||
sty LastWeapon ; store last purchased weapon
|
sty LastWeapon ; store last purchased weapon
|
||||||
; because we must put screen pointer next to it
|
; because we must put screen pointer next to it
|
||||||
jmp AfterPurchase
|
|
||||||
|
|
||||||
|
; additional check for unfinished game
|
||||||
|
; if weapon was free (price == $0)
|
||||||
|
; then have nothing...
|
||||||
|
lda isPriceZero
|
||||||
|
bne @+
|
||||||
|
lda #0
|
||||||
|
sta (temp),y
|
||||||
|
@
|
||||||
|
jmp Purchase.AfterPurchase
|
||||||
|
.endp
|
||||||
|
|
||||||
PutLitteChar
|
.proc PutLitteChar
|
||||||
; first let's cleat both lists from little chars
|
; first let's cleat both lists from little chars
|
||||||
mwa #ListOfWeapons xbyte
|
mwa #ListOfWeapons xbyte
|
||||||
ldx #52 ; there are 52 lines total
|
ldx #52 ; there are 52 lines total
|
||||||
@@ -846,9 +853,9 @@ NoArrowDown
|
|||||||
stx MoreDowndl
|
stx MoreDowndl
|
||||||
sty MoreDowndl+1
|
sty MoreDowndl+1
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
; -----------------------------------------------------
|
; -----------------------------------------------------
|
||||||
EnterPlayerName
|
.proc EnterPlayerName
|
||||||
; in: TankNr
|
; in: TankNr
|
||||||
; Out: TanksNames, SkillTable
|
; Out: TanksNames, SkillTable
|
||||||
|
|
||||||
@@ -1008,11 +1015,10 @@ nextchar05
|
|||||||
cpy #$08
|
cpy #$08
|
||||||
bne nextchar05
|
bne nextchar05
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
|
||||||
|
.proc SelectLevel
|
||||||
|
|
||||||
SelectLevel
|
|
||||||
; this routine highlights the choosen
|
; this routine highlights the choosen
|
||||||
; level of the computer opponent
|
; level of the computer opponent
|
||||||
ldx #$9 ; 9 possible levels
|
ldx #$9 ; 9 possible levels
|
||||||
@@ -1042,8 +1048,10 @@ CheckNextLevel
|
|||||||
dex
|
dex
|
||||||
bpl CheckNextLevel01
|
bpl CheckNextLevel01
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
displaydec ;decimal (word), displayposition (word)
|
.proc displaydec ;decimal (word), displayposition (word)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; displays decimal number as in parameters (in text mode)
|
; displays decimal number as in parameters (in text mode)
|
||||||
; leading zeores are removed
|
; leading zeores are removed
|
||||||
@@ -1104,10 +1112,10 @@ displayloop
|
|||||||
bpl displayloop
|
bpl displayloop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
displaybyte ;decimal (byte), displayposition (word)
|
.proc displaybyte ;decimal (byte), displayposition (word)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; displays decimal number as in parameters (in text mode)
|
; displays decimal number as in parameters (in text mode)
|
||||||
; leading zeores are removed
|
; leading zeores are removed
|
||||||
@@ -1153,6 +1161,7 @@ displayloop1
|
|||||||
bpl displayloop1
|
bpl displayloop1
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
;-------decimal constans
|
;-------decimal constans
|
||||||
zero
|
zero
|
||||||
digits dta d"0123456789"
|
digits dta d"0123456789"
|
||||||
@@ -1160,7 +1169,7 @@ nineplus dta d"9"+1
|
|||||||
space dta d" "
|
space dta d" "
|
||||||
|
|
||||||
;--------------------------------------------------------
|
;--------------------------------------------------------
|
||||||
DisplayOffensiveTextNr ;
|
.proc DisplayOffensiveTextNr ;
|
||||||
;This routine displays texts using PutChar4x4
|
;This routine displays texts using PutChar4x4
|
||||||
;pretty cool, eh
|
;pretty cool, eh
|
||||||
;parameters are:
|
;parameters are:
|
||||||
@@ -1306,9 +1315,9 @@ DOTNcharloop
|
|||||||
bne DOTNcharloop
|
bne DOTNcharloop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
TypeLine4x4 ;
|
.proc TypeLine4x4 ;
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
;this routine prints line ending with $ff
|
;this routine prints line ending with $ff
|
||||||
;address in LineAddress4x4
|
;address in LineAddress4x4
|
||||||
@@ -1337,6 +1346,7 @@ TypeLine4x4Loop
|
|||||||
|
|
||||||
EndOfTypeLine4x4
|
EndOfTypeLine4x4
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
.proc DisplayResults ;
|
.proc DisplayResults ;
|
||||||
|
|||||||
+263
-18
@@ -68,10 +68,11 @@ NewAngle
|
|||||||
|
|
||||||
ActiveWeapon ;number of the selected weapon
|
ActiveWeapon ;number of the selected weapon
|
||||||
:MaxPlayers .by 0
|
:MaxPlayers .by 0
|
||||||
|
WeaponDepleted .by 0 ; if 0 deactivate the weapon and switch to Baby Missile
|
||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
|
|
||||||
;format of the static point number used in the game
|
;format of the 3-byte static point number used in the game
|
||||||
; 20203.5 = 128 : <20203 : >20203
|
; 20203.5 => 128 : <20203 : >20203
|
||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
|
|
||||||
L1 .by 0 ; variable used in multiplications (by 10:)
|
L1 .by 0 ; variable used in multiplications (by 10:)
|
||||||
@@ -772,20 +773,204 @@ TanksNamesDefault
|
|||||||
dta d"5th Tank"
|
dta d"5th Tank"
|
||||||
dta d"6th Tank"
|
dta d"6th Tank"
|
||||||
|
|
||||||
|
;Weapon prices (*10 on screen)
|
||||||
|
price_Baby_Missile___ = 0 ;_0
|
||||||
|
price_Missile________ = 96 ;_1
|
||||||
|
price_Baby_Nuke______ = 111 ;_2
|
||||||
|
price_Nuke___________ = 144 ;_3
|
||||||
|
price_LeapFrog_______ = 192 ;_4
|
||||||
|
price_Funky_Bomb_____ = 293 ;_5
|
||||||
|
price_MIRV___________ = 456 ;_6
|
||||||
|
price_Death_s_Head___ = 337 ;_7
|
||||||
|
price_Napalm_________ = 0 ;496 ;_8
|
||||||
|
price_Hot_Napalm_____ = 0 ;511 ;_9
|
||||||
|
price_Tracer_________ = 102 ;_10
|
||||||
|
price_Smoke_Tracer___ = 291 ;_11
|
||||||
|
price_Baby_Roller____ = 689 ;_12
|
||||||
|
price_Roller_________ = 600 ;_13
|
||||||
|
price_Heavy_Roller___ = 592 ;_14
|
||||||
|
price_Riot_Charge____ = 0 ;330 ;_15
|
||||||
|
price_Riot_Blast_____ = 0 ;341 ;_16
|
||||||
|
price_Riot_Bomb______ = 369 ;_17
|
||||||
|
price_Heavy_Riot_Bomb = 322 ;_18
|
||||||
|
price_Baby_Digger____ = 336 ;_19
|
||||||
|
price_Digger_________ = 276 ;_20
|
||||||
|
price_Heavy_Digger___ = 253 ;_21
|
||||||
|
price_Baby_Sandhog___ = 218 ;_22
|
||||||
|
price_Sandhog________ = 191 ;_23
|
||||||
|
price_Heavy_Sandhog__ = 305 ;_24
|
||||||
|
price_Dirt_Clod______ = 104 ;_25
|
||||||
|
price_Dirt_Ball______ = 130 ;_26
|
||||||
|
price_Ton_of_Dirt____ = 171 ;_27
|
||||||
|
price_Liquid_Dirt____ = 0 ;530 ;_28
|
||||||
|
price_Dirt_Charge____ = 581 ;_29
|
||||||
|
price_Earth_Disrupter = 0 ;430 ;_30
|
||||||
|
price_Plasma_Blast___ = 0 ;274 ;_31
|
||||||
|
price_Laser__________ = 577 ;_32
|
||||||
|
price______________33 = 0
|
||||||
|
price______________34 = 0
|
||||||
|
price______________35 = 0
|
||||||
|
price______________36 = 0
|
||||||
|
price______________37 = 0
|
||||||
|
price______________38 = 0
|
||||||
|
price______________39 = 0
|
||||||
|
price______________40 = 0
|
||||||
|
price______________41 = 0
|
||||||
|
price______________42 = 0
|
||||||
|
price______________43 = 0
|
||||||
|
price______________44 = 0
|
||||||
|
price______________45 = 0
|
||||||
|
price______________46 = 0
|
||||||
|
price______________47 = 0
|
||||||
|
price_Heat_Guidance__ = 0 ;_48_($30)
|
||||||
|
price_Bal_Guidance___ = 0 ;_49
|
||||||
|
price_Horz_Guidance__ = 0 ;_50
|
||||||
|
price_Vert_Guidance__ = 0 ;_51
|
||||||
|
price_Lazy_Boy_______ = 0 ;_52
|
||||||
|
price_Parachute______ = 1100 ;_53
|
||||||
|
price_Battery________ = 0 ;_54
|
||||||
|
price_Mag_Deflector__ = 0 ;_55
|
||||||
|
price_Shield_________ = 0 ;_56
|
||||||
|
price_Force_Shield___ = 0 ;_57
|
||||||
|
price_Heavy_Shield___ = 0 ;_58
|
||||||
|
price_Super_Mag______ = 0 ;_59
|
||||||
|
price_Auto_Defense___ = 0 ;_60
|
||||||
|
price_Fuel_Tank______ = 0 ;_61
|
||||||
|
price_Contact_Trigger = 0 ;_62
|
||||||
|
price______________63 = 0
|
||||||
|
|
||||||
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||||
.byte $00,$00,$00,$00,$00,$01,$01,$01
|
.by >price_Baby_Missile___
|
||||||
.byte $01,$01,$00,$01,$02,$02,$02,$01
|
.by >price_Missile________
|
||||||
.byte $01,$01,$01,$01,$01,$00,$00,$00
|
.by >price_Baby_Nuke______
|
||||||
.byte $01,$00,$00,$00,$02,$02,$01,$01
|
.by >price_Nuke___________
|
||||||
.byte $02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.by >price_LeapFrog_______
|
||||||
.byte 0,0,0,0,0,$04,0,0,0,0,0,0,0,0,0,0
|
.by >price_Funky_Bomb_____
|
||||||
|
.by >price_MIRV___________
|
||||||
|
.by >price_Death_s_Head___
|
||||||
|
.by >price_Napalm_________
|
||||||
|
.by >price_Hot_Napalm_____
|
||||||
|
.by >price_Tracer_________
|
||||||
|
.by >price_Smoke_Tracer___
|
||||||
|
.by >price_Baby_Roller____
|
||||||
|
.by >price_Roller_________
|
||||||
|
.by >price_Heavy_Roller___
|
||||||
|
.by >price_Riot_Charge____
|
||||||
|
.by >price_Riot_Blast_____
|
||||||
|
.by >price_Riot_Bomb______
|
||||||
|
.by >price_Heavy_Riot_Bomb
|
||||||
|
.by >price_Baby_Digger____
|
||||||
|
.by >price_Digger_________
|
||||||
|
.by >price_Heavy_Digger___
|
||||||
|
.by >price_Baby_Sandhog___
|
||||||
|
.by >price_Sandhog________
|
||||||
|
.by >price_Heavy_Sandhog__
|
||||||
|
.by >price_Dirt_Clod______
|
||||||
|
.by >price_Dirt_Ball______
|
||||||
|
.by >price_Ton_of_Dirt____
|
||||||
|
.by >price_Liquid_Dirt____
|
||||||
|
.by >price_Dirt_Charge____
|
||||||
|
.by >price_Earth_Disrupter
|
||||||
|
.by >price_Plasma_Blast___
|
||||||
|
.by >price_Laser__________
|
||||||
|
.by >price______________33
|
||||||
|
.by >price______________34
|
||||||
|
.by >price______________35
|
||||||
|
.by >price______________36
|
||||||
|
.by >price______________37
|
||||||
|
.by >price______________38
|
||||||
|
.by >price______________39
|
||||||
|
.by >price______________40
|
||||||
|
.by >price______________41
|
||||||
|
.by >price______________42
|
||||||
|
.by >price______________43
|
||||||
|
.by >price______________44
|
||||||
|
.by >price______________45
|
||||||
|
.by >price______________46
|
||||||
|
.by >price______________47
|
||||||
|
.by >price_Heat_Guidance__
|
||||||
|
.by >price_Bal_Guidance___
|
||||||
|
.by >price_Horz_Guidance__
|
||||||
|
.by >price_Vert_Guidance__
|
||||||
|
.by >price_Lazy_Boy_______
|
||||||
|
.by >price_Parachute______
|
||||||
|
.by >price_Battery________
|
||||||
|
.by >price_Mag_Deflector__
|
||||||
|
.by >price_Shield_________
|
||||||
|
.by >price_Force_Shield___
|
||||||
|
.by >price_Heavy_Shield___
|
||||||
|
.by >price_Super_Mag______
|
||||||
|
.by >price_Auto_Defense___
|
||||||
|
.by >price_Fuel_Tank______
|
||||||
|
.by >price_Contact_Trigger
|
||||||
|
.by >price______________63
|
||||||
|
|
||||||
WeaponPriceL
|
WeaponPriceL
|
||||||
.byte $00,$60,$6F,$90,$c0,$25,$c8,$51
|
.by <price_Baby_Missile___
|
||||||
.byte $f0,$ff,$66,$23,$b1,$58,$50,$4A
|
.by <price_Missile________
|
||||||
.byte $55,$71,$42,$50,$14,$fd,$da,$bf
|
.by <price_Baby_Nuke______
|
||||||
.byte $31,$68,$82,$ab,$12,$45,$ae,$12
|
.by <price_Nuke___________
|
||||||
.byte $41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.by <price_LeapFrog_______
|
||||||
.byte 0,0,0,0,0,$4c,0,0,0,0,0,0,0,0,0,0
|
.by <price_Funky_Bomb_____
|
||||||
|
.by <price_MIRV___________
|
||||||
|
.by <price_Death_s_Head___
|
||||||
|
.by <price_Napalm_________
|
||||||
|
.by <price_Hot_Napalm_____
|
||||||
|
.by <price_Tracer_________
|
||||||
|
.by <price_Smoke_Tracer___
|
||||||
|
.by <price_Baby_Roller____
|
||||||
|
.by <price_Roller_________
|
||||||
|
.by <price_Heavy_Roller___
|
||||||
|
.by <price_Riot_Charge____
|
||||||
|
.by <price_Riot_Blast_____
|
||||||
|
.by <price_Riot_Bomb______
|
||||||
|
.by <price_Heavy_Riot_Bomb
|
||||||
|
.by <price_Baby_Digger____
|
||||||
|
.by <price_Digger_________
|
||||||
|
.by <price_Heavy_Digger___
|
||||||
|
.by <price_Baby_Sandhog___
|
||||||
|
.by <price_Sandhog________
|
||||||
|
.by <price_Heavy_Sandhog__
|
||||||
|
.by <price_Dirt_Clod______
|
||||||
|
.by <price_Dirt_Ball______
|
||||||
|
.by <price_Ton_of_Dirt____
|
||||||
|
.by <price_Liquid_Dirt____
|
||||||
|
.by <price_Dirt_Charge____
|
||||||
|
.by <price_Earth_Disrupter
|
||||||
|
.by <price_Plasma_Blast___
|
||||||
|
.by <price_Laser__________
|
||||||
|
.by <price______________33
|
||||||
|
.by <price______________34
|
||||||
|
.by <price______________35
|
||||||
|
.by <price______________36
|
||||||
|
.by <price______________37
|
||||||
|
.by <price______________38
|
||||||
|
.by <price______________39
|
||||||
|
.by <price______________40
|
||||||
|
.by <price______________41
|
||||||
|
.by <price______________42
|
||||||
|
.by <price______________43
|
||||||
|
.by <price______________44
|
||||||
|
.by <price______________45
|
||||||
|
.by <price______________46
|
||||||
|
.by <price______________47
|
||||||
|
.by <price_Heat_Guidance__
|
||||||
|
.by <price_Bal_Guidance___
|
||||||
|
.by <price_Horz_Guidance__
|
||||||
|
.by <price_Vert_Guidance__
|
||||||
|
.by <price_Lazy_Boy_______
|
||||||
|
.by <price_Parachute______
|
||||||
|
.by <price_Battery________
|
||||||
|
.by <price_Mag_Deflector__
|
||||||
|
.by <price_Shield_________
|
||||||
|
.by <price_Force_Shield___
|
||||||
|
.by <price_Heavy_Shield___
|
||||||
|
.by <price_Super_Mag______
|
||||||
|
.by <price_Auto_Defense___
|
||||||
|
.by <price_Fuel_Tank______
|
||||||
|
.by <price_Contact_Trigger
|
||||||
|
.by <price______________63
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
; 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
|
||||||
; This is a table of constans.
|
; This is a table of constans.
|
||||||
@@ -793,10 +978,70 @@ WeaponPriceL
|
|||||||
; is not present in the game.
|
; is not present in the game.
|
||||||
; This is the slot for adding new weapons.
|
; This is the slot for adding new weapons.
|
||||||
WeaponUnits
|
WeaponUnits
|
||||||
.byte 10,5,3,1,2,2,3,1,10,2,20,10,10,5,2,10
|
.by 10 ;Baby_Missile___
|
||||||
.byte 5,5,2,10,5,2,10,5,2,10,5,2,2,10,10,5
|
.by 5 ;Missile________
|
||||||
.byte 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.by 3 ;Baby_Nuke______
|
||||||
.byte 6,2,5,5,2,8,10,2,3,3,2,2,1,10,25,0
|
.by 1 ;Nuke___________
|
||||||
|
.by 2 ;LeapFrog_______
|
||||||
|
.by 2 ;Funky_Bomb_____
|
||||||
|
.by 3 ;MIRV___________
|
||||||
|
.by 1 ;Death_s_Head___
|
||||||
|
.by 10 ;Napalm_________
|
||||||
|
.by 2 ;Hot_Napalm_____
|
||||||
|
.by 20 ;Tracer_________
|
||||||
|
.by 10 ;Smoke_Tracer___
|
||||||
|
.by 10 ;Baby_Roller____
|
||||||
|
.by 5 ;Roller_________
|
||||||
|
.by 2 ;Heavy_Roller___
|
||||||
|
.by 1 ;Riot_Charge____
|
||||||
|
.by 5 ;Riot_Blast_____
|
||||||
|
.by 5 ;Riot_Bomb______
|
||||||
|
.by 2 ;Heavy_Riot_Bomb
|
||||||
|
.by 10 ;Baby_Digger____
|
||||||
|
.by 5 ;Digger_________
|
||||||
|
.by 2 ;Heavy_Digger___
|
||||||
|
.by 10 ;Baby_Sandhog___
|
||||||
|
.by 5 ;Sandhog________
|
||||||
|
.by 2 ;Heavy_Sandhog__
|
||||||
|
.by 10 ;Dirt_Clod______
|
||||||
|
.by 5 ;Dirt_Ball______
|
||||||
|
.by 2 ;Ton_of_Dirt____
|
||||||
|
.by 2 ;Liquid_Dirt____
|
||||||
|
.by 10 ;Dirt_Charge____
|
||||||
|
.by 10 ;Earth_Disrupter
|
||||||
|
.by 5 ;Plasma_Blast___
|
||||||
|
.by 5 ;Laser__________
|
||||||
|
.by 0 ;_____________33
|
||||||
|
.by 0 ;_____________34
|
||||||
|
.by 0 ;_____________35
|
||||||
|
.by 0 ;_____________36
|
||||||
|
.by 0 ;_____________37
|
||||||
|
.by 0 ;_____________38
|
||||||
|
.by 0 ;_____________39
|
||||||
|
.by 0 ;_____________40
|
||||||
|
.by 0 ;_____________41
|
||||||
|
.by 0 ;_____________42
|
||||||
|
.by 0 ;_____________43
|
||||||
|
.by 0 ;_____________44
|
||||||
|
.by 0 ;_____________45
|
||||||
|
.by 0 ;_____________46
|
||||||
|
.by 0 ;_____________47
|
||||||
|
.by 6 ;Heat_Guidance__
|
||||||
|
.by 2 ;Bal_Guidance___
|
||||||
|
.by 5 ;Horz_Guidance__
|
||||||
|
.by 5 ;Vert_Guidance__
|
||||||
|
.by 2 ;Lazy_Boy_______
|
||||||
|
.by 8 ;Parachute______
|
||||||
|
.by 10 ;Battery________
|
||||||
|
.by 2 ;Mag_Deflector__
|
||||||
|
.by 3 ;Shield_________
|
||||||
|
.by 3 ;Force_Shield___
|
||||||
|
.by 2 ;Heavy_Shield___
|
||||||
|
.by 2 ;Super_Mag______
|
||||||
|
.by 1 ;Auto_Defense___
|
||||||
|
.by 10 ;Fuel_Tank______
|
||||||
|
.by 25 ;Contact_Trigger
|
||||||
|
.by 0 ;_____________63
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
; Screen codes of icons (chars) representing a given weapon
|
; Screen codes of icons (chars) representing a given weapon
|
||||||
|
|||||||
+80
-80
@@ -777,6 +777,7 @@ EndOfTheDirt
|
|||||||
mva ycircle ydraw
|
mva ycircle ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
BeforeFire .proc ;TankNr (byte)
|
BeforeFire .proc ;TankNr (byte)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -798,14 +799,12 @@ BeforeFire .proc ;TankNr (byte)
|
|||||||
lda MaxEnergyTableL,x
|
lda MaxEnergyTableL,x
|
||||||
cmp EnergyTableL,x
|
cmp EnergyTableL,x
|
||||||
ContinueToCheckMaxForce2
|
ContinueToCheckMaxForce2
|
||||||
bcs skip15
|
bcs @+
|
||||||
|
lda MaxEnergyTableH,x
|
||||||
lda MaxEnergyTableH,x
|
sta EnergyTableH,x
|
||||||
sta EnergyTableH,x
|
lda MaxEnergyTableL,x
|
||||||
lda MaxEnergyTableL,x
|
sta EnergyTableL,x
|
||||||
sta EnergyTableL,x
|
@
|
||||||
|
|
||||||
skip15
|
|
||||||
jsr DisplayingSymbols ;all digital values like force, angle, wind, etc.
|
jsr DisplayingSymbols ;all digital values like force, angle, wind, etc.
|
||||||
jsr PutTankNameOnScreen
|
jsr PutTankNameOnScreen
|
||||||
|
|
||||||
@@ -911,14 +910,14 @@ pressedDown
|
|||||||
dec EnergyTableL,x
|
dec EnergyTableL,x
|
||||||
lda EnergyTableL,x
|
lda EnergyTableL,x
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
bne skip04
|
bne @+
|
||||||
dec EnergyTableH,x
|
dec EnergyTableH,x
|
||||||
bpl skip04
|
bpl @+
|
||||||
ForceGoesZero
|
ForceGoesZero
|
||||||
lda #0
|
lda #0
|
||||||
sta EnergyTableH,x
|
sta EnergyTableH,x
|
||||||
sta EnergyTableL,x
|
sta EnergyTableL,x
|
||||||
skip04
|
@
|
||||||
jmp BeforeFire
|
jmp BeforeFire
|
||||||
|
|
||||||
CTRLPressedDown
|
CTRLPressedDown
|
||||||
@@ -966,10 +965,10 @@ pressedTAB
|
|||||||
inc ActiveWeapon,x
|
inc ActiveWeapon,x
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
cmp #$30 ; number of offensive weapons
|
cmp #$30 ; number of offensive weapons
|
||||||
bne skip14
|
bne @+
|
||||||
lda #0
|
lda #0
|
||||||
sta ActiveWeapon,x
|
sta ActiveWeapon,x
|
||||||
skip14
|
@
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
||||||
beq pressedTAB
|
beq pressedTAB
|
||||||
@@ -979,10 +978,10 @@ skip14
|
|||||||
CTRLpressedTAB
|
CTRLpressedTAB
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
dec ActiveWeapon,x
|
dec ActiveWeapon,x
|
||||||
bpl skip14CT
|
bpl @+
|
||||||
lda #$2f ; the last possible offensive weapon
|
lda #$2f ; the last possible offensive weapon
|
||||||
sta ActiveWeapon,x
|
sta ActiveWeapon,x
|
||||||
skip14CT
|
@
|
||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
||||||
beq CTRLpressedTAB
|
beq CTRLpressedTAB
|
||||||
@@ -1023,11 +1022,11 @@ RandomizeOffensiveText
|
|||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
cmp #$20 ; laser
|
cmp #$20 ; laser
|
||||||
bne NotStrongShoot
|
bne NotStrongShoot
|
||||||
mva #0 color
|
mva #0 color
|
||||||
lda #7
|
lda #7
|
||||||
sta Force
|
sta Force
|
||||||
sta Force+1
|
sta Force+1
|
||||||
bne AfterStrongShoot
|
bne AfterStrongShoot
|
||||||
NotStrongShoot
|
NotStrongShoot
|
||||||
lda EnergyTableL,x
|
lda EnergyTableL,x
|
||||||
sta Force
|
sta Force
|
||||||
@@ -1316,10 +1315,10 @@ EndOfFall
|
|||||||
ThereWasNoParachute
|
ThereWasNoParachute
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Flight .proc ;Force(byte.byte), Angle(byte), Wind(.byte) 128=0, 255=maxright, 0=maxleft
|
Flight .proc ;Force(byte.byte), Angle(byte), Wind(.byte) 128=0, 255=maxright, 0=maxleft
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
;g=-0.1
|
;g=-0.1
|
||||||
;vx=Force*sin(Angle)
|
;vx=Force*sin(Angle)
|
||||||
;vy=Force*cos(Angle)
|
;vy=Force*cos(Angle)
|
||||||
@@ -1358,8 +1357,7 @@ RepeatIfSmokeTracer
|
|||||||
sta ydraw+1
|
sta ydraw+1
|
||||||
|
|
||||||
;vx calculation
|
;vx calculation
|
||||||
aslw Force ;Force=Force*4 ... *2
|
aslw Force ;Force = Force * 2
|
||||||
;aslw Force
|
|
||||||
|
|
||||||
;sin(Angle)
|
;sin(Angle)
|
||||||
ldx Angle
|
ldx Angle
|
||||||
@@ -1522,21 +1520,21 @@ StillUp
|
|||||||
lda xtraj+2
|
lda xtraj+2
|
||||||
adc vx+3
|
adc vx+3
|
||||||
sta xtraj+2
|
sta xtraj+2
|
||||||
jmp skip07 ;skipping substracting for Flight to left
|
jmp @+ ;skipping substracting for Flight to left
|
||||||
|
|
||||||
FlightLeft
|
FlightLeft
|
||||||
sec ;xtraj=xtraj-vx (skipping least significant byte of vx)
|
sec ;xtraj=xtraj-vx (skipping least significant byte of vx)
|
||||||
lda xtraj ;here of course Fight to left
|
lda xtraj ;here of course Fight to left
|
||||||
sbc vx+1
|
sbc vx+1
|
||||||
sta xtraj
|
sta xtraj
|
||||||
lda xtraj+1
|
lda xtraj+1
|
||||||
sbc vx+2
|
sbc vx+2
|
||||||
sta xtraj+1
|
sta xtraj+1
|
||||||
lda xtraj+2
|
lda xtraj+2
|
||||||
sbc vx+3
|
sbc vx+3
|
||||||
sta xtraj+2
|
sta xtraj+2
|
||||||
|
|
||||||
skip07
|
@
|
||||||
;vx=vx-Wind (also without least significan byte of vx)
|
;vx=vx-Wind (also without least significan byte of vx)
|
||||||
lda goleft
|
lda goleft
|
||||||
bne FlightsLeft ;blow on bullet flighting left
|
bne FlightsLeft ;blow on bullet flighting left
|
||||||
@@ -1563,26 +1561,25 @@ LWindToLeft
|
|||||||
lda vx+3
|
lda vx+3
|
||||||
adc #0
|
adc #0
|
||||||
sta vx+3
|
sta vx+3
|
||||||
Jmp skip08
|
jmp @+
|
||||||
WindToLeft
|
WindToLeft
|
||||||
LWindToRight
|
LWindToRight
|
||||||
|
;Wind to left, bullet right, so vx=vx-Wind
|
||||||
;Wind to left, bullet right, so vx=vx-Wind
|
;Wind to right, bullet left, so vx=vx-Wind
|
||||||
;Wind to right, bullet left, so vx=vx-Wind
|
sec
|
||||||
sec
|
lda vx
|
||||||
lda vx
|
sbc Wind
|
||||||
sbc Wind
|
sta vx
|
||||||
sta vx
|
lda vx+1
|
||||||
lda vx+1
|
sbc Wind+1
|
||||||
sbc Wind+1
|
sta vx+1
|
||||||
sta vx+1
|
lda vx+2
|
||||||
lda vx+2
|
sbc #0
|
||||||
sbc #0
|
sta vx+2
|
||||||
sta vx+2
|
lda vx+3
|
||||||
lda vx+3
|
sbc #0
|
||||||
sbc #0
|
sta vx+3
|
||||||
sta vx+3
|
@
|
||||||
skip08
|
|
||||||
mwa xtrajold+1 xdraw
|
mwa xtrajold+1 xdraw
|
||||||
mwa ytrajold+1 ydraw
|
mwa ytrajold+1 ydraw
|
||||||
mwa xtraj+1 xbyte
|
mwa xtraj+1 xbyte
|
||||||
@@ -1829,7 +1826,7 @@ mrLoopix
|
|||||||
|
|
||||||
; 2 waits for 5 bullets
|
; 2 waits for 5 bullets
|
||||||
wait
|
wait
|
||||||
wait
|
;wait ; speeded up build 131
|
||||||
|
|
||||||
MIRVdoNotChangeY
|
MIRVdoNotChangeY
|
||||||
|
|
||||||
@@ -2149,37 +2146,41 @@ DecreaseWeaponBeforeShoot .proc
|
|||||||
lda ActiveWeapon,x
|
lda ActiveWeapon,x
|
||||||
jsr DecreaseWeapon
|
jsr DecreaseWeapon
|
||||||
; and here we have amount of possessed ammo for given weapon
|
; and here we have amount of possessed ammo for given weapon
|
||||||
|
sta WeaponDepleted
|
||||||
cmp #0
|
; ;cmp #0
|
||||||
bne AmmunitionDecreased
|
; bne AmmunitionDecreased
|
||||||
lda #0 ;if ammo for given weapon ends
|
; ;lda #0 ;if ammo for given weapon ends
|
||||||
sta ActiveWeapon,x ;then set to default weapon (baby missile)
|
; sta ActiveWeapon,x ;then set to default weapon (baby missile)
|
||||||
AmmunitionDecreased
|
;AmmunitionDecreased
|
||||||
lda #99
|
; lda #99
|
||||||
ldy #0
|
; ldy #0
|
||||||
sta (weaponPointer),y ;baby missile - always 99 pieces
|
; sta (weaponPointer),y ;baby missile - always 99 pieces
|
||||||
|
;
|
||||||
;there is a good value in temp after jsr DecreaseWeapon
|
; ;there is a good value in weaponPointer after jsr DecreaseWeapon
|
||||||
|
;
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
DecreaseWeapon .proc
|
DecreaseWeapon .proc
|
||||||
; in: A <-- Weapon number, TankNr
|
; in: A: Weapon number, TankNr
|
||||||
|
; out: A: number of shells left, Y: weapon number
|
||||||
; decreases 1 bullet from a weapon(A) of tank(TankNr)
|
; decreases 1 bullet from a weapon(A) of tank(TankNr)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr HowManyBullets
|
jsr HowManyBullets
|
||||||
sec
|
cpy #0
|
||||||
sbc #1
|
beq defaultWeapon ; no decreasing Baby Missile
|
||||||
sta (weaponPointer),y ; we have good values after HowManyBullets
|
sec
|
||||||
|
sbc #1
|
||||||
|
sta (weaponPointer),y ; we have good values after HowManyBullets
|
||||||
|
defaultWeapon
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
HowManyBullets .proc
|
HowManyBullets .proc
|
||||||
; in: A <-- Weapon number, TankNr
|
; in: A <-- Weapon number, TankNr
|
||||||
; out: A <-- How many bullets in the weapon
|
; out: A <-- How many bullets in the weapon, Y: weapon number
|
||||||
; how many bullets weapon of tank(TankNr) has, Result w A
|
; how many bullets weapon of tank(TankNr) has, Result w A
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
tay
|
tay
|
||||||
@@ -2189,7 +2190,6 @@ HowManyBullets .proc
|
|||||||
lda TanksWeaponsTableH,x
|
lda TanksWeaponsTableH,x
|
||||||
sta weaponPointer+1
|
sta weaponPointer+1
|
||||||
|
|
||||||
;ldy #$35 ; parachute
|
|
||||||
lda (weaponPointer),y ; and we have number of bullets in A
|
lda (weaponPointer),y ; and we have number of bullets in A
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|||||||
Reference in New Issue
Block a user