mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +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:
|
||||
|
||||
###### 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
|
||||
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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
MOVED TO: https://github.com/pkali/scorch_src/issues
|
||||
|
||||
TODO and BUGS file
|
||||
rev. 2013-11-17
|
||||
|
||||
---------------------------------------------------------
|
||||
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.
|
||||
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 groud below)
|
||||
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
|
||||
@@ -56,17 +59,15 @@ To do
|
||||
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 frame
|
||||
009. Make AI in the existing framework (ongoing)
|
||||
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
|
||||
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
|
||||
023. Make not implemented weapons raise NotImplementedError :]
|
||||
024. no visual indication of using defensive weapons
|
||||
|
||||
Done:
|
||||
|
||||
@@ -77,10 +78,13 @@ Done:
|
||||
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 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.
|
||||
+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)
|
||||
+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
|
||||
;-----------------------------------------------
|
||||
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" and press (Return) to proceed "
|
||||
OptionsHere
|
||||
|
||||
+38
-43
@@ -229,6 +229,7 @@ EndOfDraw
|
||||
rts
|
||||
.endp
|
||||
|
||||
;-------------JumpPad-------------
|
||||
DrawJumpPad
|
||||
jmp (DrawJumpAddr)
|
||||
Drawplot
|
||||
@@ -236,10 +237,9 @@ Drawplot
|
||||
DrawLen
|
||||
inw LineLength
|
||||
rts
|
||||
;-------------JumpPad-------------
|
||||
|
||||
DrawCheck .proc
|
||||
; lda SmokeTracerFlag
|
||||
; bne yestrace ; jakie to g�upie....
|
||||
lda tracerflag
|
||||
ora SmokeTracerFlag
|
||||
yestrace
|
||||
@@ -260,14 +260,7 @@ CheckCollisionDraw
|
||||
bne StopHitChecking
|
||||
|
||||
mwa xdraw temp
|
||||
;adw temp --- it does not work!!!!!!!! and should? OMC ??? #mountaintable
|
||||
clc
|
||||
lda temp
|
||||
adc #<mountaintable
|
||||
sta temp
|
||||
lda temp+1
|
||||
adc #>mountaintable
|
||||
sta temp+1
|
||||
adw temp #mountaintable
|
||||
|
||||
ldy #0
|
||||
lda ydraw
|
||||
@@ -504,20 +497,20 @@ placetanks .proc
|
||||
;--------------------------------------------------
|
||||
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
|
||||
lda #0
|
||||
skip09
|
||||
; clearing the tables with coordinates of the tank
|
||||
; it is necessary, because randomizing checks
|
||||
; if the given tank is already placed
|
||||
; after check if its position is not (0,0)
|
||||
|
||||
; I will be honest with you - I have no idea
|
||||
; what the above comment was intending to mean :)
|
||||
|
||||
sta XtankstableL,x
|
||||
sta XtankstableH,x
|
||||
sta Ytankstable,x
|
||||
dex
|
||||
bpl skip09
|
||||
@
|
||||
; clearing the tables with coordinates of the tank
|
||||
; it is necessary, because randomizing checks
|
||||
; if the given tank is already placed
|
||||
; after check if its position is not (0,0)
|
||||
|
||||
; I will be honest with you - I have no idea
|
||||
; what the above comment was intending to mean :)
|
||||
|
||||
sta XtankstableL,x
|
||||
sta XtankstableH,x
|
||||
sta Ytankstable,x
|
||||
dex
|
||||
bpl @-
|
||||
|
||||
|
||||
mwa #0 temptankX
|
||||
@@ -635,10 +628,10 @@ drawtanknr
|
||||
lda eXistenZ,x
|
||||
bne SkipRemovigPM ; if energy=0 then no tank
|
||||
|
||||
; hide P/M
|
||||
lda #0
|
||||
sta hposp0,x
|
||||
jmp DoNotDrawTankNr
|
||||
; hide P/M
|
||||
lda #0
|
||||
sta hposp0,x
|
||||
jmp DoNotDrawTankNr
|
||||
SkipRemovigPM
|
||||
|
||||
|
||||
@@ -964,21 +957,21 @@ ToTop ;it means substracting
|
||||
sbw yfloat delta
|
||||
lda yfloat+1
|
||||
cmp #margin
|
||||
bcs Skip01
|
||||
; if smaller than 10
|
||||
ldx #$00
|
||||
stx UpNdown
|
||||
jmp Skip01
|
||||
bcs @+
|
||||
; if smaller than 10
|
||||
ldx #$00
|
||||
stx UpNdown
|
||||
jmp @+
|
||||
|
||||
ToBottom
|
||||
adw yfloat delta
|
||||
lda yfloat+1
|
||||
cmp #screenheight-margin
|
||||
bcc Skip01
|
||||
; if higher than screen
|
||||
ldx #$01
|
||||
stx UpNdown
|
||||
Skip01
|
||||
adw yfloat delta
|
||||
lda yfloat+1
|
||||
cmp #screenheight-margin
|
||||
bcc @+
|
||||
; if higher than screen
|
||||
ldx #$01
|
||||
stx UpNdown
|
||||
@
|
||||
sta ydraw
|
||||
|
||||
inw xdraw
|
||||
@@ -1096,7 +1089,9 @@ EndOfUnPlot
|
||||
rts
|
||||
.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
|
||||
; game. If you are going to speed up the game, start with
|
||||
; plot - it is used by every single effect starting from explosions
|
||||
@@ -1123,7 +1118,7 @@ MakePlot
|
||||
;xbyte = xbyte/8
|
||||
lda xbyte
|
||||
lsr xbyte+1
|
||||
ror ;just one bit over 256. Max screenwidht = 512!!!
|
||||
ror ;just one bit over 256. Max screenwidth = 512!!!
|
||||
lsr
|
||||
lsr
|
||||
tay ;save
|
||||
|
||||
+17
-9
@@ -53,7 +53,7 @@
|
||||
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
||||
;--------------temps used in circle 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 fy .byte
|
||||
.zpvar xk .word
|
||||
@@ -75,7 +75,7 @@ displayposition = modify
|
||||
FlyDelay = 150
|
||||
screenheight = 200
|
||||
screenBytes = 40
|
||||
screenwidth = screenBytes*8
|
||||
screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
|
||||
margin = 48 ;mountain drawing Y variable margin
|
||||
display = $1010 ;kill dos with the casette recorder!
|
||||
MaxPlayers = 6
|
||||
@@ -272,7 +272,6 @@ loop
|
||||
inx
|
||||
cpx #(clearEnd-PreviousAngle)
|
||||
bne loop
|
||||
.endp
|
||||
|
||||
ldx #5
|
||||
SettingEnergies
|
||||
@@ -318,6 +317,8 @@ SettingEnergies
|
||||
jsr drawmountains ;draw them
|
||||
jsr drawtanks ;finally draw tanks
|
||||
|
||||
.endp ; not really end of the procedure, but just for now. revisit.
|
||||
|
||||
;--------------------round screen is ready---------
|
||||
|
||||
;mva #0 TankNr
|
||||
@@ -408,12 +409,12 @@ AfterManualShooting
|
||||
jsr DecreaseWeaponBeforeShoot
|
||||
jsr DisplayingSymbols
|
||||
|
||||
; lower energy to eventually let tanks commit suicide
|
||||
ldx TankNr
|
||||
dec Energy,x
|
||||
dec Energy,x ; lower energy to eventually let tanks commit suicide
|
||||
lda ActiveWeapon,x
|
||||
|
||||
jsr Shoot
|
||||
|
||||
lda HitFlag ;0 if missed
|
||||
beq missed
|
||||
lda #0
|
||||
@@ -428,6 +429,13 @@ AfterManualShooting
|
||||
|
||||
|
||||
AfterExplode
|
||||
ldy WeaponDepleted
|
||||
bne @+
|
||||
ldx TankNr
|
||||
tya
|
||||
sta ActiveWeapon,x
|
||||
@
|
||||
|
||||
;temporary tanks removal (would fall down with soil)
|
||||
mva TankNr tempor2
|
||||
mva #1 Erase
|
||||
@@ -773,10 +781,10 @@ loop05
|
||||
sta TanksWeapon5,x
|
||||
sta TanksWeapon6,x
|
||||
dex
|
||||
bne skip13
|
||||
lda #99
|
||||
bne loop05
|
||||
skip13 bpl loop05
|
||||
bne @+
|
||||
lda #99
|
||||
bne loop05
|
||||
@ bpl loop05
|
||||
rts
|
||||
.endp
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+65
-55
@@ -134,14 +134,14 @@ OptionsFinished
|
||||
|
||||
ldy OptionsTable+1
|
||||
ldx #0
|
||||
skip10
|
||||
lda CashOptionL,y
|
||||
sta moneyL,x
|
||||
lda CashOptionH,y
|
||||
sta moneyH,x
|
||||
inx
|
||||
cpx NumberOfPlayers
|
||||
bne skip10
|
||||
@
|
||||
lda CashOptionL,y
|
||||
sta moneyL,x
|
||||
lda CashOptionH,y
|
||||
sta moneyH,x
|
||||
inx
|
||||
cpx NumberOfPlayers
|
||||
bne @-
|
||||
|
||||
;third option (gravity)
|
||||
ldy OptionsTable+2
|
||||
@@ -234,7 +234,7 @@ OptionsYLoop
|
||||
|
||||
;-------------------------------------------
|
||||
; call of the purchase screens for each tank
|
||||
CallPurchaseForEveryTank
|
||||
.proc CallPurchaseForEveryTank
|
||||
mva #$2 colpf2s ; set normal color
|
||||
mwa #PurchaseDL dlptrs
|
||||
lda dmactls
|
||||
@@ -259,9 +259,10 @@ AfterManualPurchase
|
||||
cmp NumberOfPlayers
|
||||
bne loop03
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
Purchase ;
|
||||
.proc Purchase ;
|
||||
;--------------------------------------------------
|
||||
; In tanknr there is a number of the tank (player)
|
||||
; that is buying weapons now (from 0).
|
||||
@@ -359,7 +360,7 @@ CheckWeapon01
|
||||
ldy #$4 ; 4 chars from the beginning of the line
|
||||
sta (xbyte),y
|
||||
|
||||
;now number of purchased units (bullets)
|
||||
;now number of purchased units (shells)
|
||||
clc
|
||||
lda xbyte
|
||||
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
|
||||
; times 16 (it's length of the names of weapons)
|
||||
ldy #3 ; Rotate 4 times
|
||||
Rotate02
|
||||
@
|
||||
asl temp
|
||||
rol temp+1
|
||||
dey
|
||||
bpl Rotate02
|
||||
; Hmmm..... Interesting why there is no CLC here?
|
||||
bpl @-
|
||||
|
||||
adw temp #NamesOfWeapons modify
|
||||
sbw modify #6 ; from 6th char
|
||||
adw temp #NamesOfWeapons-6 modify
|
||||
|
||||
ldy #6 ; from 6th char
|
||||
|
||||
modyf1
|
||||
@
|
||||
lda (modify),y
|
||||
sta (xbyte),y
|
||||
iny
|
||||
cpy #(16+6)
|
||||
bne modyf1
|
||||
bne @-
|
||||
|
||||
|
||||
; in X there is what we need
|
||||
@@ -506,8 +505,8 @@ WeHaveOffset
|
||||
Rotate04
|
||||
lsr xbyte+1
|
||||
bcc DoNotAddX01
|
||||
clc
|
||||
adc #40
|
||||
clc
|
||||
adc #40
|
||||
DoNotAddX01
|
||||
ror
|
||||
ror xbyte
|
||||
@@ -668,20 +667,23 @@ ListChange
|
||||
sta WhichList
|
||||
bne SecondSelected
|
||||
mwa #ListOfWeapons WeaponsListDL
|
||||
jmp dalejx01
|
||||
jmp @+
|
||||
SecondSelected
|
||||
mwa #ListOfDefensiveWeapons WeaponsListDL
|
||||
dalejx01
|
||||
@
|
||||
lda #$00
|
||||
sta PositionOnTheList
|
||||
sta OffsetDL1
|
||||
jmp ChoosingItemForPurchase
|
||||
|
||||
.endp
|
||||
; weapon purchase routne increases number of possessed bullets
|
||||
; decreases cash and jumps to screen refresh
|
||||
;--------------------------------------------------
|
||||
PurchaseWeaponNow
|
||||
.proc PurchaseWeaponNow
|
||||
;--------------------------------------------------
|
||||
isPriceZero = tempXRoller
|
||||
|
||||
lda WhichList
|
||||
bne PurchaseDeffensive
|
||||
|
||||
@@ -696,6 +698,7 @@ PurchaseAll
|
||||
; after getting weapon number the routine is common for all
|
||||
ldx tanknr
|
||||
tay ; weapon number is in Y
|
||||
beq @+
|
||||
sec
|
||||
lda moneyL,x ; substracting from posessed money
|
||||
sbc WeaponPriceL,y ; of price of the given weapon
|
||||
@@ -703,25 +706,20 @@ PurchaseAll
|
||||
lda moneyH,x
|
||||
sbc WeaponPriceH,y
|
||||
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
|
||||
; and add appropriate number of bullets
|
||||
stx temp ;we will multiply by 64
|
||||
mva #0 temp+1
|
||||
; 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
|
||||
; and add appropriate number of shells
|
||||
|
||||
lda TanksWeaponsTableL,x
|
||||
sta temp
|
||||
lda #>TanksWeapon1
|
||||
adc temp+1
|
||||
lda TanksWeaponsTableH,x
|
||||
sta temp+1
|
||||
|
||||
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
|
||||
cmp #100 ; but there should be no more than 99 bullets
|
||||
bcc LessThan100
|
||||
lda #99
|
||||
sta (temp),y
|
||||
lda #99
|
||||
sta (temp),y
|
||||
LessThan100
|
||||
sty LastWeapon ; store last purchased weapon
|
||||
; 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
|
||||
mwa #ListOfWeapons xbyte
|
||||
ldx #52 ; there are 52 lines total
|
||||
@@ -846,9 +853,9 @@ NoArrowDown
|
||||
stx MoreDowndl
|
||||
sty MoreDowndl+1
|
||||
rts
|
||||
|
||||
.endp
|
||||
; -----------------------------------------------------
|
||||
EnterPlayerName
|
||||
.proc EnterPlayerName
|
||||
; in: TankNr
|
||||
; Out: TanksNames, SkillTable
|
||||
|
||||
@@ -1008,11 +1015,10 @@ nextchar05
|
||||
cpy #$08
|
||||
bne nextchar05
|
||||
rts
|
||||
.endp
|
||||
|
||||
|
||||
|
||||
|
||||
SelectLevel
|
||||
.proc SelectLevel
|
||||
; this routine highlights the choosen
|
||||
; level of the computer opponent
|
||||
ldx #$9 ; 9 possible levels
|
||||
@@ -1042,8 +1048,10 @@ CheckNextLevel
|
||||
dex
|
||||
bpl CheckNextLevel01
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
displaydec ;decimal (word), displayposition (word)
|
||||
.proc displaydec ;decimal (word), displayposition (word)
|
||||
;--------------------------------------------------
|
||||
; displays decimal number as in parameters (in text mode)
|
||||
; leading zeores are removed
|
||||
@@ -1104,10 +1112,10 @@ displayloop
|
||||
bpl displayloop
|
||||
|
||||
rts
|
||||
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
displaybyte ;decimal (byte), displayposition (word)
|
||||
.proc displaybyte ;decimal (byte), displayposition (word)
|
||||
;--------------------------------------------------
|
||||
; displays decimal number as in parameters (in text mode)
|
||||
; leading zeores are removed
|
||||
@@ -1153,6 +1161,7 @@ displayloop1
|
||||
bpl displayloop1
|
||||
|
||||
rts
|
||||
.endp
|
||||
;-------decimal constans
|
||||
zero
|
||||
digits dta d"0123456789"
|
||||
@@ -1160,7 +1169,7 @@ nineplus dta d"9"+1
|
||||
space dta d" "
|
||||
|
||||
;--------------------------------------------------------
|
||||
DisplayOffensiveTextNr ;
|
||||
.proc DisplayOffensiveTextNr ;
|
||||
;This routine displays texts using PutChar4x4
|
||||
;pretty cool, eh
|
||||
;parameters are:
|
||||
@@ -1306,9 +1315,9 @@ DOTNcharloop
|
||||
bne DOTNcharloop
|
||||
|
||||
rts
|
||||
|
||||
.endp
|
||||
;-------------------------------
|
||||
TypeLine4x4 ;
|
||||
.proc TypeLine4x4 ;
|
||||
;-------------------------------
|
||||
;this routine prints line ending with $ff
|
||||
;address in LineAddress4x4
|
||||
@@ -1337,6 +1346,7 @@ TypeLine4x4Loop
|
||||
|
||||
EndOfTypeLine4x4
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------
|
||||
.proc DisplayResults ;
|
||||
|
||||
+263
-18
@@ -68,10 +68,11 @@ NewAngle
|
||||
|
||||
ActiveWeapon ;number of the selected weapon
|
||||
: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
|
||||
; 20203.5 = 128 : <20203 : >20203
|
||||
;format of the 3-byte static point number used in the game
|
||||
; 20203.5 => 128 : <20203 : >20203
|
||||
;-----------------------------------
|
||||
|
||||
L1 .by 0 ; variable used in multiplications (by 10:)
|
||||
@@ -772,20 +773,204 @@ TanksNamesDefault
|
||||
dta d"5th 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)
|
||||
.byte $00,$00,$00,$00,$00,$01,$01,$01
|
||||
.byte $01,$01,$00,$01,$02,$02,$02,$01
|
||||
.byte $01,$01,$01,$01,$01,$00,$00,$00
|
||||
.byte $01,$00,$00,$00,$02,$02,$01,$01
|
||||
.byte $02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,$04,0,0,0,0,0,0,0,0,0,0
|
||||
.by >price_Baby_Missile___
|
||||
.by >price_Missile________
|
||||
.by >price_Baby_Nuke______
|
||||
.by >price_Nuke___________
|
||||
.by >price_LeapFrog_______
|
||||
.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
|
||||
.byte $00,$60,$6F,$90,$c0,$25,$c8,$51
|
||||
.byte $f0,$ff,$66,$23,$b1,$58,$50,$4A
|
||||
.byte $55,$71,$42,$50,$14,$fd,$da,$bf
|
||||
.byte $31,$68,$82,$ab,$12,$45,$ae,$12
|
||||
.byte $41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,$4c,0,0,0,0,0,0,0,0,0,0
|
||||
.by <price_Baby_Missile___
|
||||
.by <price_Missile________
|
||||
.by <price_Baby_Nuke______
|
||||
.by <price_Nuke___________
|
||||
.by <price_LeapFrog_______
|
||||
.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
|
||||
; This is a table of constans.
|
||||
@@ -793,10 +978,70 @@ WeaponPriceL
|
||||
; is not present in the game.
|
||||
; This is the slot for adding new weapons.
|
||||
WeaponUnits
|
||||
.byte 10,5,3,1,2,2,3,1,10,2,20,10,10,5,2,10
|
||||
.byte 5,5,2,10,5,2,10,5,2,10,5,2,2,10,10,5
|
||||
.byte 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 6,2,5,5,2,8,10,2,3,3,2,2,1,10,25,0
|
||||
.by 10 ;Baby_Missile___
|
||||
.by 5 ;Missile________
|
||||
.by 3 ;Baby_Nuke______
|
||||
.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
|
||||
|
||||
+80
-80
@@ -777,6 +777,7 @@ EndOfTheDirt
|
||||
mva ycircle ydraw
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
BeforeFire .proc ;TankNr (byte)
|
||||
;--------------------------------------------------
|
||||
@@ -798,14 +799,12 @@ BeforeFire .proc ;TankNr (byte)
|
||||
lda MaxEnergyTableL,x
|
||||
cmp EnergyTableL,x
|
||||
ContinueToCheckMaxForce2
|
||||
bcs skip15
|
||||
|
||||
lda MaxEnergyTableH,x
|
||||
sta EnergyTableH,x
|
||||
lda MaxEnergyTableL,x
|
||||
sta EnergyTableL,x
|
||||
|
||||
skip15
|
||||
bcs @+
|
||||
lda MaxEnergyTableH,x
|
||||
sta EnergyTableH,x
|
||||
lda MaxEnergyTableL,x
|
||||
sta EnergyTableL,x
|
||||
@
|
||||
jsr DisplayingSymbols ;all digital values like force, angle, wind, etc.
|
||||
jsr PutTankNameOnScreen
|
||||
|
||||
@@ -911,14 +910,14 @@ pressedDown
|
||||
dec EnergyTableL,x
|
||||
lda EnergyTableL,x
|
||||
cmp #$ff
|
||||
bne skip04
|
||||
dec EnergyTableH,x
|
||||
bpl skip04
|
||||
bne @+
|
||||
dec EnergyTableH,x
|
||||
bpl @+
|
||||
ForceGoesZero
|
||||
lda #0
|
||||
sta EnergyTableH,x
|
||||
sta EnergyTableL,x
|
||||
skip04
|
||||
lda #0
|
||||
sta EnergyTableH,x
|
||||
sta EnergyTableL,x
|
||||
@
|
||||
jmp BeforeFire
|
||||
|
||||
CTRLPressedDown
|
||||
@@ -966,10 +965,10 @@ pressedTAB
|
||||
inc ActiveWeapon,x
|
||||
lda ActiveWeapon,x
|
||||
cmp #$30 ; number of offensive weapons
|
||||
bne skip14
|
||||
lda #0
|
||||
sta ActiveWeapon,x
|
||||
skip14
|
||||
bne @+
|
||||
lda #0
|
||||
sta ActiveWeapon,x
|
||||
@
|
||||
lda ActiveWeapon,x
|
||||
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
||||
beq pressedTAB
|
||||
@@ -979,10 +978,10 @@ skip14
|
||||
CTRLpressedTAB
|
||||
ldx TankNr
|
||||
dec ActiveWeapon,x
|
||||
bpl skip14CT
|
||||
lda #$2f ; the last possible offensive weapon
|
||||
sta ActiveWeapon,x
|
||||
skip14CT
|
||||
bpl @+
|
||||
lda #$2f ; the last possible offensive weapon
|
||||
sta ActiveWeapon,x
|
||||
@
|
||||
lda ActiveWeapon,x
|
||||
jsr HowManyBullets ; and we have qty of owned shells. Ufff....
|
||||
beq CTRLpressedTAB
|
||||
@@ -1023,11 +1022,11 @@ RandomizeOffensiveText
|
||||
lda ActiveWeapon,x
|
||||
cmp #$20 ; laser
|
||||
bne NotStrongShoot
|
||||
mva #0 color
|
||||
lda #7
|
||||
sta Force
|
||||
sta Force+1
|
||||
bne AfterStrongShoot
|
||||
mva #0 color
|
||||
lda #7
|
||||
sta Force
|
||||
sta Force+1
|
||||
bne AfterStrongShoot
|
||||
NotStrongShoot
|
||||
lda EnergyTableL,x
|
||||
sta Force
|
||||
@@ -1316,10 +1315,10 @@ EndOfFall
|
||||
ThereWasNoParachute
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
Flight .proc ;Force(byte.byte), Angle(byte), Wind(.byte) 128=0, 255=maxright, 0=maxleft
|
||||
;--------------------------------------------------
|
||||
|
||||
;g=-0.1
|
||||
;vx=Force*sin(Angle)
|
||||
;vy=Force*cos(Angle)
|
||||
@@ -1358,8 +1357,7 @@ RepeatIfSmokeTracer
|
||||
sta ydraw+1
|
||||
|
||||
;vx calculation
|
||||
aslw Force ;Force=Force*4 ... *2
|
||||
;aslw Force
|
||||
aslw Force ;Force = Force * 2
|
||||
|
||||
;sin(Angle)
|
||||
ldx Angle
|
||||
@@ -1522,21 +1520,21 @@ StillUp
|
||||
lda xtraj+2
|
||||
adc vx+3
|
||||
sta xtraj+2
|
||||
jmp skip07 ;skipping substracting for Flight to left
|
||||
jmp @+ ;skipping substracting for Flight to left
|
||||
|
||||
FlightLeft
|
||||
sec ;xtraj=xtraj-vx (skipping least significant byte of vx)
|
||||
lda xtraj ;here of course Fight to left
|
||||
sbc vx+1
|
||||
sta xtraj
|
||||
lda xtraj+1
|
||||
sbc vx+2
|
||||
sta xtraj+1
|
||||
lda xtraj+2
|
||||
sbc vx+3
|
||||
sta xtraj+2
|
||||
sec ;xtraj=xtraj-vx (skipping least significant byte of vx)
|
||||
lda xtraj ;here of course Fight to left
|
||||
sbc vx+1
|
||||
sta xtraj
|
||||
lda xtraj+1
|
||||
sbc vx+2
|
||||
sta xtraj+1
|
||||
lda xtraj+2
|
||||
sbc vx+3
|
||||
sta xtraj+2
|
||||
|
||||
skip07
|
||||
@
|
||||
;vx=vx-Wind (also without least significan byte of vx)
|
||||
lda goleft
|
||||
bne FlightsLeft ;blow on bullet flighting left
|
||||
@@ -1563,26 +1561,25 @@ LWindToLeft
|
||||
lda vx+3
|
||||
adc #0
|
||||
sta vx+3
|
||||
Jmp skip08
|
||||
jmp @+
|
||||
WindToLeft
|
||||
LWindToRight
|
||||
|
||||
;Wind to left, bullet right, so vx=vx-Wind
|
||||
;Wind to right, bullet left, so vx=vx-Wind
|
||||
sec
|
||||
lda vx
|
||||
sbc Wind
|
||||
sta vx
|
||||
lda vx+1
|
||||
sbc Wind+1
|
||||
sta vx+1
|
||||
lda vx+2
|
||||
sbc #0
|
||||
sta vx+2
|
||||
lda vx+3
|
||||
sbc #0
|
||||
sta vx+3
|
||||
skip08
|
||||
;Wind to left, bullet right, so vx=vx-Wind
|
||||
;Wind to right, bullet left, so vx=vx-Wind
|
||||
sec
|
||||
lda vx
|
||||
sbc Wind
|
||||
sta vx
|
||||
lda vx+1
|
||||
sbc Wind+1
|
||||
sta vx+1
|
||||
lda vx+2
|
||||
sbc #0
|
||||
sta vx+2
|
||||
lda vx+3
|
||||
sbc #0
|
||||
sta vx+3
|
||||
@
|
||||
mwa xtrajold+1 xdraw
|
||||
mwa ytrajold+1 ydraw
|
||||
mwa xtraj+1 xbyte
|
||||
@@ -1829,7 +1826,7 @@ mrLoopix
|
||||
|
||||
; 2 waits for 5 bullets
|
||||
wait
|
||||
wait
|
||||
;wait ; speeded up build 131
|
||||
|
||||
MIRVdoNotChangeY
|
||||
|
||||
@@ -2149,37 +2146,41 @@ DecreaseWeaponBeforeShoot .proc
|
||||
lda ActiveWeapon,x
|
||||
jsr DecreaseWeapon
|
||||
; and here we have amount of possessed ammo for given weapon
|
||||
|
||||
cmp #0
|
||||
bne AmmunitionDecreased
|
||||
lda #0 ;if ammo for given weapon ends
|
||||
sta ActiveWeapon,x ;then set to default weapon (baby missile)
|
||||
AmmunitionDecreased
|
||||
lda #99
|
||||
ldy #0
|
||||
sta (weaponPointer),y ;baby missile - always 99 pieces
|
||||
|
||||
;there is a good value in temp after jsr DecreaseWeapon
|
||||
|
||||
sta WeaponDepleted
|
||||
; ;cmp #0
|
||||
; bne AmmunitionDecreased
|
||||
; ;lda #0 ;if ammo for given weapon ends
|
||||
; sta ActiveWeapon,x ;then set to default weapon (baby missile)
|
||||
;AmmunitionDecreased
|
||||
; lda #99
|
||||
; ldy #0
|
||||
; sta (weaponPointer),y ;baby missile - always 99 pieces
|
||||
;
|
||||
; ;there is a good value in weaponPointer after jsr DecreaseWeapon
|
||||
;
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
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)
|
||||
;--------------------------------------------------
|
||||
jsr HowManyBullets
|
||||
sec
|
||||
sbc #1
|
||||
sta (weaponPointer),y ; we have good values after HowManyBullets
|
||||
cpy #0
|
||||
beq defaultWeapon ; no decreasing Baby Missile
|
||||
sec
|
||||
sbc #1
|
||||
sta (weaponPointer),y ; we have good values after HowManyBullets
|
||||
defaultWeapon
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
HowManyBullets .proc
|
||||
; 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
|
||||
;--------------------------------------------------
|
||||
tay
|
||||
@@ -2189,7 +2190,6 @@ HowManyBullets .proc
|
||||
lda TanksWeaponsTableH,x
|
||||
sta weaponPointer+1
|
||||
|
||||
;ldy #$35 ; parachute
|
||||
lda (weaponPointer),y ; and we have number of bullets in A
|
||||
rts
|
||||
.endp
|
||||
|
||||
Reference in New Issue
Block a user