source clean-up

This commit is contained in:
2023-05-20 09:48:28 -04:00
parent 401d94eec9
commit 4fa861af3d
23 changed files with 805 additions and 12540 deletions
+2 -4
View File
@@ -1,7 +1,5 @@
.project
*.bak
scorch.lab
scorch.lst
textproc.lab
textproc.lst
*.lab
*.lst
artwork/talk.as_
+1 -1
View File
@@ -4,7 +4,7 @@
;-----------------------------------------------
; start of "variables" (RAM)
;-----------------------------------------------
OptionsHere
OptionsHere
; 0123456789012345678901234567890123456789
dta d"Players : 2 3 4 5 6 "
dta d"Cash : none 2K 8K 12K 20K "
+55 -60
View File
@@ -8,54 +8,54 @@
;-----------------------------------------------
OptionsScreen
dta d"Welcome to Scorch v. "
build ; 4 bytes from scorch.asm (fancy method) :)
build ; 4 bytes from scorch.asm (fancy method) :)
dta d" (un)2000-2023"
.IF TARGET = 800
dta d" Please select option with "
dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" and "
dta d"Tab"*
dta d" "
dta d" Press "
dta d"Return"*
dta d" to proceed "
dta d" Please select option with "
dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" and "
dta d"Tab"*
dta d" "
dta d" Press "
dta d"Return"*
dta d" to proceed "
.ELIF TARGET = 5200
dta d" Please select option with joystick one "
dta d" and press FIRE to proceed "
dta d" Please select option with joystick one "
dta d" and press FIRE to proceed "
.ENDIF
; 0123456789012345678901234567890123456789
;-----------------------------------------------
NameScreen
.IF TARGET = 800
dta d" Enter names of players "
dta d" Enter names of players "
.ELIF TARGET = 5200
dta d"Hold "
dta d "FIRE"*
dta d " to enter player names "
dta d"Hold "
dta d "FIRE"*
dta d " to enter player names "
.ENDIF
NameScreen3
dta d" Human/Atari (difficulty level) "
NameScreen5
.IF TARGET = 800
dta d"TAB"*
dta d" - Port nr "
dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" - Difficulty"
dta d" "
dta d"INV"*
dta d" - Shape "
dta d"Return"*
dta d" - Proceed "
dta d"TAB"*
dta d" - Port nr "
dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" - Difficulty"
dta d" "
dta d"INV"*
dta d" - Shape "
dta d"Return"*
dta d" - Proceed "
.ELIF TARGET = 5200
dta d" "
dta d"(5)"*
dta d" - Port/Shape "
dta d"Joy"*
dta d" - Diffic. "
dta d" "
dta d"FIRE"*
dta d" - Proceed "
dta d" "
dta d"(5)"*
dta d" - Port/Shape "
dta d"Joy"*
dta d" - Diffic. "
dta d" "
dta d"FIRE"*
dta d" - Proceed "
.ENDIF
;-----------------------------------------------
MoreUp
@@ -73,51 +73,46 @@ MoreDown
WeaponsDescription
; 0123456789012345678901234567890123456789
.IF TARGET = 800
dta d"Tab"*
dta d ": Defensive/Offensive weapon "
dta d"Tab"*
dta d ": Defensive/Offensive weapon "
.ELIF TARGET = 5200
dta d"Left"*
dta d ": Defensive/Offensive weapon"
dta d"Left"*
dta d ": Defensive/Offensive weapon"
.ENDIF
PurchaseDescription
; 0123456789012345678901234567890123456789
.IF TARGET = 800
dta d"Space"*
dta d": Purchase "
dta d"Return"*
dta d": Finish "
dta d"Space"*
dta d": Purchase "
dta d"Return"*
dta d": Finish "
.ELIF TARGET = 5200
dta d"Right"*
dta d": Purchase "
dta d"FIRE"*
dta d": Finish "
dta d"Right"*
dta d": Purchase "
dta d"FIRE"*
dta d": Finish "
.ENDIF
ActivateDescription
; 0123456789012345678901234567890123456789
.IF TARGET = 800
dta d"Space"*
dta d": Activate "
dta d"Return"*
dta d": Finish "
dta d"Space"*
dta d": Activate "
dta d"Return"*
dta d": Finish "
.ELIF TARGET = 5200
dta d"Right"*
dta d": Activate "
dta d"FIRE"*
dta d": Finish "
dta d"Right"*
dta d": Activate "
dta d"FIRE"*
dta d": Finish "
.ENDIF
EmptyLine
dta d" "
;---------------------------------------------------
OptionsTitle
.IF TARGET = 800
dta d" scorch "*
dta d" scorch "*
.ELIF TARGET = 5200
dta d" scorch supersystem "*
; dta d" scorch "*
; dta d"5"
; dta d"k"*
; dta d"2"
; dta d" "*
dta d" scorch supersystem "*
.ENDIF
DifficultyTitle
dta d" difficulty "*
@@ -135,7 +130,7 @@ GameOverTitle2
dl ; MAIN game display list
.byte $70
.byte $42
.byte $42
.word statusBuffer
.byte $02, $02
.byte $10+$80 ; 2 blank lines + DLI
+14 -14
View File
@@ -113,7 +113,7 @@ EndOfUnPlot
; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions
; through line drawing and small text output!!!
;
;
; Optimized by 0xF (Fox) THXXXX!!!
; -----------------------------------------
@@ -122,7 +122,7 @@ EndOfUnPlot
bcs unPlot.EndOfUnPlot ;nearest RTS
CheckX02
cpw xdraw #screenwidth
bcs EndOfPlot
bcs EndOfPlot
MakePlot
; let's calculate coordinates from xdraw and ydraw
@@ -190,7 +190,7 @@ ClearPlot
rts
.endp
;--------------------------------------------------
.proc drawmountains
.proc drawmountains
;--------------------------------------------------
mwa #0 xdraw
mwa #mountaintable modify
@@ -204,7 +204,7 @@ drawmountainsloop
sta ydraw
sty ydraw+1
.IF FASTER_GRAF_PROCS = 1
; there was Drawline proc
; there was Drawline proc
lda #screenheight
sec
sbc ydraw
@@ -223,7 +223,7 @@ drawmountainsloop
bne @-
; end of Drawline proc
.ELSE
; there was Drawline proc
; there was Drawline proc
drawline
jsr plot.MakePlot
inc ydraw
@@ -331,12 +331,12 @@ EmptyChar
ldx #0
CharLoopi
lda (xbyte),y
ora mask1,x
ora mask1,x
and char1,x
sta (xbyte),y
iny
lda (xbyte),y
ora mask2,x
ora mask2,x
and char2,x
sta (xbyte),y
dey
@@ -398,7 +398,7 @@ EndPutChar
cpw dy #(screenheight-1)
jcs TypeChar.EndPutChar ;nearest RTS
cpw dy #(4)
jcc TypeChar.EndPutChar ;nearest RTS
jcc TypeChar.EndPutChar ;nearest RTS
cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited.
@@ -414,7 +414,7 @@ Upper4bits
sta fontind
lda #$00
sta fontind+1
adw fontind #font4x4
; and 4 bytes to the table
@@ -480,7 +480,7 @@ MaskOK01
ldx #0
CharLoopi4x4
lda (xbyte),y
ora mask1,x
ora mask1,x
bit plot4x4color
bpl PutInColor0_1 ; only mask - no char
and char1,x
@@ -488,7 +488,7 @@ PutInColor0_1
sta (xbyte),y
iny
lda (xbyte),y
ora mask2,x
ora mask2,x
bit plot4x4color
bpl PutInColor0_2 ; only mask - no char
and char2,x
@@ -555,7 +555,7 @@ EndPut4x4
inw temp
cpw temp #display+screenheight*screenBytes+1
bne @-
rts
rts
.endp
;--------------------------------------------------
@@ -577,14 +577,14 @@ EndPut4x4
.endp
;--------------------------------------------------
.proc SetMainScreen
; mva #0 dmactls
; mva #0 dmactls
SetDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
mwa #dl dlptrs ; issue #72 (glitches when switches)
lda #%00111110
; and #$fc
; ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls
mva WallsType COLBAKS ; set color of background
mva WallsType COLBAKS ; set color of background
jsr WaitOneFrame
rts
.endp
+21 -21
View File
@@ -98,13 +98,13 @@ EndOfDLI_Text
pla
DLIinterruptNone
rti
.endp
;--------------------------------------------------
.proc VBLinterrupt
mva #0 dliCounter
mva #$02 DliColorBack
lda PAL
and #%00001110
beq itsPAL
@@ -118,7 +118,7 @@ DLIinterruptNone
itsPAL
; pressTimer is trigger tick counter. always 50 ticks / s
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
SkippedIfNTSC
bit RMT_blocked
@@ -138,7 +138,7 @@ SkippedIfNTSC
lab2
jsr RASTERMUSICTRACKER+3 ;1 play
; ------- RMT -------
SkipRMTVBL
SkipRMTVBL
bit ScrollFlag
bpl EndOfCreditsVBI
CreditsVBI
@@ -170,7 +170,15 @@ nextlinedisplay
; bne EndOfCreditsVBI
mwa #Credits DLCreditsAddr
EndOfCreditsVBI
.IF TARGET = 5200
.IF TARGET = 800
; support for joysticks :)
ldx JoystickNumber
lda STICK0,x
sta STICK0
lda STRIG0,x
sta STRIG0
jmp XITVBV
.ELIF TARGET = 5200
lda SkStatSimulator
bmi @+
inc SkStatSimulator
@@ -181,7 +189,7 @@ EndOfCreditsVBI
center = 114 ;Read analog stick and make it look like a digital stick
threshold = 60
lda JoystickNumber
asl
tax
@@ -190,28 +198,28 @@ EndOfCreditsVBI
rol stick0 ;Feed carry into digital stick value
cmp #center-threshold ;Compare with left threshold
rol stick0 ;Feed carry into digital stick value
lda paddl1,x ;Read POT1 value (vertical position)
cmp #center+threshold ;Compare with down threshold
rol stick0 ;Feed carry into digital stick value
cmp #center-threshold ;Compare with down threshold
rol stick0 ;Feed carry into digital stick value
lda stick0 ;0 indicates a press so the right/down values need to be inverted
eor #2+8
and #$0f
sta stick0
ldx JoystickNumber
; check shift key (5200 second fire button)
lda SKSTAT
:3 lsr ; third bit
and trig0,x ; and first button
and trig0,x ; and first button
;lda trig0,x
sta strig0 ;Move hardware to shadow
mva chbas chbase
lda skstat ;Reset consol key shadow is no key is pressed anymore
and #4
beq @+
@@ -225,14 +233,6 @@ EndOfCreditsVBI
tax
pla
rti
.ELSE
; support for joysticks :)
ldx JoystickNumber
lda STICK0,x
sta STICK0
lda STRIG0,x
sta STRIG0
jmp XITVBV
.ENDIF
.endp
.IF TARGET = 5200
@@ -245,7 +245,7 @@ exit pla
tax
pla
rti
.endp
.endp
.ENDIF
;--------------------------------------------------
+69 -69
View File
@@ -32,7 +32,7 @@
jsr ColorsOfSprites
mva #$ca COLOR1
mva #$00 COLBAKS ; set color of background
SetDLI DLIinterruptOptions ; jsr SetDLI for Options text screen
; -------- setup bottom (tanks) line
@@ -70,7 +70,7 @@ OptionsMainLoop
jsr getkey
bit escFlag
spl:rts
cmp #@kbcode._down ; $f ;cursor down
bne OptionsNoDown
inc:lda OptionsY
@@ -113,7 +113,7 @@ OptionsNoRight
cmp #@kbcode._ret ; $c ;Return key
bne OptionsNoReturn
rts ; options selected
OptionsNoReturn
cmp #@kbcode._tab ; Tab key
bne OptionsNoTab
@@ -141,7 +141,7 @@ NoGradientLoop
lda GradientAddrL,y
sta GradientColors
lda GradientAddrH,y
sta GradientColors+1
sta GradientColors+1
rts
.endp
@@ -174,7 +174,7 @@ OptionsLoop
cpy #optionWidth ; width of the option highlight
bne OptionsLoop
ldy #0
; next X position of the
; next X position of the
adw temp #optionWidth ; width of the option highlight
inc:lda XPos
cmp #5 ; number of options in a row
@@ -191,12 +191,12 @@ OptionsLoop
_inverter
beq invertme
; clean inversion otherwise
lda (temp),y
lda (temp),y
and #$7f ; clear the top bit
sta (temp),y
bpl @+ ; JMP
invertme
lda (temp),y
lda (temp),y
ora #$80 ; set the top bit
sta (temp),y
@
@@ -227,7 +227,7 @@ ManualPurchase
spl:rts
jsr DefensivesActivate ; activate weapons
bit escFlag
spl:rts
spl:rts
AfterManualPurchase
inc:lda TankNr
cmp NumberOfPlayers
@@ -238,8 +238,8 @@ AfterManualPurchase
.proc DefensivesActivate
;--------------------------------------------------
; This proc call Inventory and set Defensives activation first
mwa #ListOfDefensiveWeapons WeaponsListDL ;switch to the list of offensive weapons
mwa #ListOfDefensiveWeapons WeaponsListDL ;switch to the list of offensive weapons
mva #$ff IsInventory
mva #%10000000 WhichList
; offensive weapon - 0, defensive - %10000000
@@ -265,7 +265,7 @@ AfterManualPurchase
jsr CopyFromPurchaseAndGameOver
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
; we are clearing list of the weapons
mva #$00 WhichList
; offensive weapon - 0, deffensive - %10000000
@@ -283,7 +283,7 @@ GoToActivation
bpl @+
lda #song_inventory
@ jsr RmtSongSelect
ldx tankNr
lda TankStatusColoursTable,x
sta COLOR2
@@ -331,15 +331,15 @@ AfterPurchase
ldx #$00 ; index of the checked weapon
stx HowManyOnTheListOff ; amounts of weapons (shells, bullets) in both lists
stx HowManyOnTheListDef
jsr CreateList
bit isInventory ;
bit isInventory ;
bpl ChoosingItemForPurchase
lda whichList
bne PositionDefensive
; calculate positionOnTheList from the activeWeapon (offensives)
ldx tankNr
lda activeWeapon,x
@@ -356,7 +356,7 @@ AfterPurchase
beq ?weaponFound ; jmp
PositionDefensive
jsr calcPosDefensive
?weaponFound
; weapon index in Y
@@ -368,7 +368,7 @@ PositionDefensive
;--------------------------------------------------
ChoosingItemForPurchase
;--------------------------------------------------
jsr PutLitteChar ; Places pointer at the right position
jsr getkey
bit escFlag
@@ -497,11 +497,11 @@ CreateList
lda WeaponUnits,x
jeq NoWeapon
ldy tanknr
ldy tanknr
bit isInventory
jmi itIsInventory
; put "Purchase" on the screen
mwa #PurchaseDescription PurActDescAddr
; and Title
@@ -516,7 +516,7 @@ CreateList
cmp WeaponPriceL,x
@
jcc TooLittleCash
; we have enough cash and the weapon can be
; added to the list
@@ -585,7 +585,7 @@ notInventory
jsr HowManyBullets
sta decimal
adw xbyte #1 displayposition
adw xbyte #1 displayposition
jsr displaybyte
ldx temp ;weapon index
@@ -665,7 +665,7 @@ NoWeapon
mwa #ListOfDefensiveWeapons xbyte
NoDefense
cpx #last_defensive +1
jne CreateList
; offset may be only too big
@@ -686,14 +686,14 @@ WeHaveOffset
lda HowManyOnTheListOff
sta xbyte ; multiplier (temporarily here, it will be erased anyway)
lda #$00 ;
lda #$00 ;
sta xbyte+1 ; higher byte of the Result
ldx #$05 ; 2^5
@ asl xbyte
rol xbyte+1
dex
bne @-
; add to the address of the list
adw xbyte #ListOfWeapons
ldy #0
@@ -711,7 +711,7 @@ ListCleared1
; of the first erased char.
lda HowManyOnTheListDef
sta xbyte ; multiplier (temporarily here, it will be erased anyway)
lda #$00 ;
lda #$00 ;
sta xbyte+1 ; higher byte of the Result
ldx #$05 ; 2^5
@ asl xbyte
@@ -766,36 +766,36 @@ PurchaseAll
lda moneyH,x
sbc WeaponPriceH,y
sta moneyH,x
positiveMoney
positiveMoney
; now we have to get address of
; the table of the weapon of the tank
; and add appropriate number of shells
sty LastWeapon ; store last purchased weapon
; because we must put screen pointer next to it
; but if we purchasing "Buy me!" then we must draw the winning weapon.
cpy #ind_Buy_me
cpy #ind_Buy_me
bne NoSuprise
Suprise ; get a random weapon
lda random
cmp #51 ; defensive weapons are less likely because they are more expensive - probability 255:51 (5:1)
bcc GetRandomDefensive
GetRandomOffensive
randomize ind_Missile last_offensive
randomize ind_Missile last_offensive
;cmp #ind_Buy_me ; buy me do not buy buy me :)
;beq GetRandomOffensive
tay
bne NoSuprise ; Y always <> 0
GetRandomDefensive
randomize ind_Battery last_defensive
randomize ind_Battery last_defensive
tay
; lda WeaponUnits,y ; check if weapon exist
; beq GetRandomDefensive
NoSuprise
lda TanksWeaponsTableL,x
sta weaponPointer
@@ -824,13 +824,13 @@ inventorySelect
ldx tankNr
sta activeWeapon,x
jmp WaitForKeyRelease ; rts
invSelectDef
ldy PositionOnTheList
lda IndexesOfWeaponsL2,y
tay
ldx tankNr
cmp #ind_Battery
cmp #ind_Battery
bne NotBattery
; if activate battery, we do it differently
mva #sfx_battery sfx_effect
@@ -840,38 +840,38 @@ invSelectDef
ply
jmp DecreaseDefensive ; bypass activation
NotBattery
cmp #ind_Auto_Defense
cmp #ind_Auto_Defense
bne NoAutoDefense
; Auto Defense - do it like battery
mva #sfx_auto_defense sfx_effect
mva #$A1 AutoDefenseFlag,x ; this is "A" in inverse - for status line :)
jmp DecreaseDefensive ; bypass activation
NoAutoDefense
cmp #ind_Lazy_Boy
cmp #ind_Lazy_Boy
bne NoLazyBoy
; Lazy Boy - do it like battery
mva #%01000000 LazyFlag
jmp DecreaseDefensive ; bypass activation
NoLazyBoy
cmp #ind_Lazy_Darwin
cmp #ind_Lazy_Darwin
bne NoLazyDarwin
; Lazy Darwin - do it like battery
mva #%11000000 LazyFlag
jmp DecreaseDefensive ; bypass activation
NoLazyDarwin
cmp #ind_Spy_Hard
cmp #ind_Spy_Hard
bne NotSpy
mva #$ff SpyHardFlag
jmp DecreaseDefensive ; bypass activation
jmp DecreaseDefensive ; bypass activation
NotSpy
cmp #ind_Long_Barrel
cmp #ind_Long_Barrel
bne NotBarrel
; if activate long barrel, we do it differently too
mva #sfx_long_barrel sfx_effect
mva #LongBarrel BarrelLength,x
bne DecreaseDefensive ; bypass activation
bne DecreaseDefensive ; bypass activation
NotBarrel
cmp #ind_White_Flag
cmp #ind_White_Flag
bne NotWhiteFlag
cmp ActiveDefenceWeapon,x
bne NoDeactivateWhiteFlag
@@ -897,7 +897,7 @@ DecreaseDefensive
sec
sbc #1
sta (weaponPointer),y
DefActivationEnd
jmp WaitForKeyRelease ; rts
.endp
@@ -1084,7 +1084,7 @@ NoArrowDown
lda TankNr
:3 asl
tax
ldy #0
@ lda TanksNames,x
sta NameAdr,y
@@ -1114,12 +1114,12 @@ CheckKeys
lda TankShape,x
tay
lda digits+1,y
sta NameScreen2+15 ; display tank shape number
sta NameScreen2+15 ; display tank shape number
jsr CursorDisplay
jsr getkey
bit escFlag
spl:rts
.IF TARGET = 800 ; only the A800 has a keyboard
; is the char to be recorded?
ldx #keycodesEnd-keycodes ;table was 38 chars long
@@ -1256,7 +1256,7 @@ NotRobot
; check if all chars are empty (" ")
ldy #7
lda #0
@ ora NameAdr,y
@ ora NameAdr,y
and #$7F ; remove inverse (Cursor)
dey
bpl @-
@@ -1333,7 +1333,7 @@ CharacterFound
beq checkjoy
bit pressTimer ; trick (no A change)
bpl @-
checkjoy
checkjoy
lda STICK0
and #$0f
cmp #$0f
@@ -1543,7 +1543,7 @@ displayloop1
sta dmactls
lda #%00100100 ; playfield before P/M
sta GPRIOR
jsr SetPMWidth
jsr SetPMWidth
jsr ColorsOfSprites
mva #0 COLOR1
sta COLBAKS ; set color of background
@@ -1628,7 +1628,7 @@ ThisIsAI
NotAItank
tya
ldy #38
sta (temp),y
sta (temp),y
; put earned money on the screen
lda EarnedMoneyL,x
sta decimal
@@ -1669,10 +1669,10 @@ MakeAllTanksVisible
jsr RandomizeTankPos
dex
bpl @-
MainTanksFloatingLoop
MainTanksFloatingLoop
; main tanks floating loop
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
AllTanksFloatingDown
AllTanksFloatingDown
stx TankNr
lda Ytankstable,x
cmp #(72-7) ; tank under screen - no erase
@@ -1842,7 +1842,7 @@ ThisIsAI
;-------------------------------------------------
ldx TankNr
;=========================
;displaying symbol of the weapon
;=========================
@@ -1872,7 +1872,7 @@ ThisIsAI
aslw temp
dey
bpl @-
adw temp #NamesOfWeapons
ldy #15
@
@@ -1900,7 +1900,7 @@ ThisIsAI
sta statusBuffer+80+22
sta statusBuffer+80+39
mwa #emptyLine temp
jmp ClearingOnly
jmp ClearingOnly
ActiveDefence
sta temp ;get back number of the weapon
mva #0 temp+1
@@ -1910,7 +1910,7 @@ ActiveDefence
aslw temp
dey
bpl @-
adw temp #NamesOfWeapons
ClearingOnly
ldy #15
@@ -1950,7 +1950,7 @@ ClearingOnly
jsr displaybyte
lda #$09 ; )
sta statusBuffer+40+13
NoDefenceWeapon
NoDefenceWeapon
NoShieldEnergy
;=========================
@@ -1981,7 +1981,7 @@ DisplayWindValue
sta decimal
mwa #statusBuffer+80+18 displayposition
jsr displaybyte
;=========================
;display round number
;=========================
@@ -2027,7 +2027,7 @@ AngleToLeft
sty statusBuffer+40+25 ; (space) character
lda #$7e ;(del) char
sta statusBuffer+40+22
bne AngleDisplay
bne AngleDisplay
VerticallyUp
; now we have value 90
sta decimal
@@ -2037,7 +2037,7 @@ VerticallyUp
AngleDisplay
mwa #statusBuffer+40+23 displayposition
jsr displaybyte
ldx TankNr
ldx TankNr
rts
.endp
;-------------------------------------------------
@@ -2047,7 +2047,7 @@ AngleDisplay
dey
lda gameOverSpritesTop,y
sta temp
; clean the whole sprite
lda #0
tax
@@ -2055,11 +2055,11 @@ AngleDisplay
sta PMGraph+$500,x
dex
bne @-
lda #$01
sta sizep0 ; P0-P1 widths
sta sizep0+1
; set background
lda #$ff
ldx #100+7 ; top of the sprites
@@ -2071,10 +2071,10 @@ AngleDisplay
GOSbeg = 112
mva #GOSbeg hposp0
mva #GOSbeg+12 hposp0+1
mva #15 PCOLR0
sta PCOLR1
rts
.endp
+14 -14
View File
@@ -103,7 +103,7 @@ EndOfUnPlot
; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions
; through line drawing and small text output!!!
;
;
; Optimized by 0xF (Fox) THXXXX!!!
; -----------------------------------------
@@ -112,7 +112,7 @@ EndOfUnPlot
bcs unPlot.EndOfUnPlot ;nearest RTS
CheckX02
cpw xdraw #screenwidth
bcs EndOfPlot
bcs EndOfPlot
MakePlot
; let's calculate coordinates from xdraw and ydraw
@@ -177,7 +177,7 @@ ClearPlot
rts
.endp
;--------------------------------------------------
.proc drawmountains
.proc drawmountains
;--------------------------------------------------
mwa #0 xdraw
mwa #mountaintable modify
@@ -191,7 +191,7 @@ drawmountainsloop
sta ydraw
sty ydraw+1
.IF FASTER_GRAF_PROCS = 1
; there was Drawline proc
; there was Drawline proc
lda #screenheight
sec
sbc ydraw
@@ -217,12 +217,12 @@ drawmountainsloop
lda linetableH,y
adc xdraw+1
sta xbyte+1
ldy #0
ldy #0
dec tempbyte01
bne @-
; end of Drawline proc
.ELSE
; there was Drawline proc
; there was Drawline proc
drawline
jsr plot.MakePlot
inc ydraw
@@ -326,12 +326,12 @@ CharLoopi
;--
ldy #0
lda (xbyte),y
ora mask1,x
ora mask1,x
and char1,x
sta (xbyte),y
ldy #8
lda (xbyte),y
ora mask2,x
ora mask2,x
and char2,x
sta (xbyte),y
inc ydraw
@@ -392,7 +392,7 @@ EndPutChar
cpw dy #(screenheight-1)
jcs TypeChar.EndPutChar ;nearest RTS
cpw dy #(4)
jcc TypeChar.EndPutChar ;nearest RTS
jcc TypeChar.EndPutChar ;nearest RTS
cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited.
@@ -408,7 +408,7 @@ Upper4bits
sta fontind
lda #$00
sta fontind+1
adw fontind #font4x4
; and 4 bytes to the table
@@ -471,7 +471,7 @@ CharLoopi4x4
;--
ldy #0
lda (xbyte),y
ora mask1,x
ora mask1,x
bit plot4x4color
bpl PutInColor0_1 ; only mask - no char
and char1,x
@@ -479,7 +479,7 @@ PutInColor0_1
sta (xbyte),y
ldy #8
lda (xbyte),y
ora mask2,x
ora mask2,x
bit plot4x4color
bpl PutInColor0_2 ; only mask - no char
and char2,x
@@ -545,7 +545,7 @@ EndPut4x4
inw temp
cpw temp #displayC64+screenheight*screenBytes+1
bne @-
rts
rts
.endp
;--------------------------------------------------
@@ -581,7 +581,7 @@ next8lines
:4 rol
sta $d020
sta $d021
lda $dd00 ; Set video bank to start at 0
and #252
ora #3
+10 -10
View File
@@ -2,7 +2,7 @@
.IF *>0
WeaponsListDL = 0
NamesOfLevels = 0
;----------------------------------------
@@ -27,7 +27,7 @@ NamesOfLevels = 0
bpl @-
rts
Autoplay_OptionsTable .by 4,4,2,2,4,1,3,2,4
.endp
@@ -51,7 +51,7 @@ NoGradientLoop
lda GradientAddrL,y
sta GradientColors
lda GradientAddrH,y
sta GradientColors+1
sta GradientColors+1
rts
.endp
@@ -76,7 +76,7 @@ ManualPurchase
spl:rts
jsr DefensivesActivate ; activate weapons
bit escFlag
spl:rts
spl:rts
AfterManualPurchase
inc:lda TankNr
cmp NumberOfPlayers
@@ -87,8 +87,8 @@ AfterManualPurchase
.proc DefensivesActivate
;--------------------------------------------------
; This proc call Inventory and set Defensives activation first
mwa #ListOfDefensiveWeapons WeaponsListDL ;switch to the list of offensive weapons
mwa #ListOfDefensiveWeapons WeaponsListDL ;switch to the list of offensive weapons
mva #$ff IsInventory
mva #%10000000 WhichList
; offensive weapon - 0, defensive - %10000000
@@ -104,13 +104,13 @@ AfterManualPurchase
; Rest of the data is taken from appropriate tables
; and during the purchase these tables are modified.
; we are clearing list of the weapons
mva #$00 WhichList
; offensive weapon - 0, deffensive - %10000000
GoToActivation
rts
.endp
; -----------------------------------------------------
@@ -173,7 +173,7 @@ NotRobot
; check if all chars are empty (" ")
ldy #7
lda #0
@ ora #0 ; NameAdr,y
@ ora #0 ; NameAdr,y
and #$7F ; remove inverse (Cursor)
dey
bpl @-
@@ -306,7 +306,7 @@ displayloop1
.endp
;-------------------------------------------------
.proc RoundOverSprites
; fill sprites with bytes
; fill sprites with bytes
rts
.endp
+79 -79
View File
@@ -25,9 +25,9 @@
; it's no necessary - PrepareAIShoot is next proc :)
; jsr PrepareAIShoot
; rts
.endp
.endp
;----------------------------------------------
.proc PrepareAIShoot
.proc PrepareAIShoot
; create low precision table of positions
; by dividing positions by 4
ldy #MaxPlayers-1
@@ -76,11 +76,11 @@ AIRoutines
rts
.endp
;----------------------------------------------
.proc Moron
.proc Moron
jsr RandomizeAngle
sta NewAngle
mwa #80 RandBoundaryLow
mwa #800 RandBoundaryHigh
mwa #800 RandBoundaryHigh
jsr RandomizeForce
; choose the best weapon
ldy #ind_Buy_me +1 ; if the cheat is active it will fire the BFG :)
@@ -88,13 +88,13 @@ AIRoutines
;rts
.endp
;----------------------------------------------
.proc Shooter
.proc Shooter
lda PreviousAngle,x
ora PreviousEnergyL,x
ora PreviousEnergyH,x
beq firstShoot
lda PreviousAngle,x
cmp #90
bcs shootingLeftAtThisMomentOfTime
@@ -104,9 +104,9 @@ AIRoutines
cmp #10
bcs @+ ;not smaller than 10
bcc firstShoot ; GET THE aim againg
shootingLeftAtThisMomentOfTime
clc
adc #5
cmp #170 ; maximum shooter angle
@@ -115,7 +115,7 @@ shootingLeftAtThisMomentOfTime
sta NewAngle
sec
lda PreviousEnergyL,x
lda PreviousEnergyL,x
sbc #5
sta ForceTableL,x
lda PreviousEnergyH,x
@@ -140,10 +140,10 @@ firstShoot
tankIsOnTheRight
randomize 55 85
sta NewAngle
forceNow
mwa #100 RandBoundaryLow
mwa #800 RandBoundaryHigh
mwa #800 RandBoundaryHigh
;ldx TankNr ;this is possibly not necessary
jsr RandomizeForce
@@ -153,12 +153,12 @@ endo
lda NewAngle
sta PreviousAngle,x
lda ForceTableL,x
sta PreviousEnergyL,x
sta PreviousEnergyL,x
lda ForceTableH,x
sta PreviousEnergyH,x
; choose the best weapon
jmp ChooseBestOffensive
;rts
.endp
@@ -172,40 +172,40 @@ firstShoot
jsr FindBestTarget2
beq EnemyOnLeft
; calculate index to shotangle table
; in temp2 we have x distance divided by 8
; in temp2 we have x distance divided by 8
lda temp2
:3 lsr @
and #%00000111
clc
adc #8
sta AngleTablePointer
bne AngleIsSet
bne AngleIsSet
EnemyOnLeft
lda temp2
:3 lsr @
and #%00000111
eor #%00000111
sta AngleTablePointer
sta AngleTablePointer
AngleIsSet
randomize 0 8
ldy AngleTablePointer
clc
adc AngleTable,y
sta NewAngle
forceNow
mwa #300 RandBoundaryLow
mwa #700 RandBoundaryHigh
mwa #700 RandBoundaryHigh
ldx TankNr
jsr RandomizeForce
endo
endo
; choose the best weapon
jsr ChooseBestOffensive
rts
;----------------------------------------------
AngleTable ; 16 bytes ;ba w $348b L$3350
.by 106,114,122,130,138,146,154,162
@@ -220,7 +220,7 @@ AngleTable ; 16 bytes ;ba w $348b L$3350
bcs EnoughEnergy
; lower than 5 units - white flag
jsr ClearTankNr ; we must hide tank to erase shields (issue #138)
lda #ind_White_Flag
lda #ind_White_Flag
sta ActiveDefenceWeapon,x
jsr PutTankNr ; and draw tank witch Flag
EnoughEnergy
@@ -233,7 +233,7 @@ EnoughEnergy
cmp #30
bcs EnoughEnergy
; lower than 30 units - check battery
ldy #ind_Battery
ldy #ind_Battery
lda (temp),y ; has address of TanksWeaponsTable
beq NoBatteries
; we have batteries - use one
@@ -263,7 +263,7 @@ NoBatteries
cpy #ind_Hovercraft ;first defensive weapon (White Flag, Battery and Hovercraft - never use)
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
beq @-
; decrease in inventory
sec
sbc #1
@@ -292,13 +292,13 @@ DefensiveInUse
; first check check if any is in use
lda ActiveDefenceWeapon,x
bne DefensiveInUse
ldy #last_real_defensive+1 ;the last defensive weapon
ldy #last_real_defensive+1 ;the last defensive weapon
@
dey
cpy #ind_Hovercraft ;first defensive weapon (White Flag, Battery and Hovercraft - never use)
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
beq @-
; decrease in inventory
sec
sbc #1
@@ -324,7 +324,7 @@ NoUseDefensive
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
jsr ChooseBestOffensive
@@ -335,11 +335,11 @@ NoUseDefensive
NotNegativeEnergy
adw Force #100 RandBoundaryHigh
jsr RandomizeForce
; if target distance lower than 24 - set weapon to Baby Missile (for security :)
; if target distance lower than 24 - set weapon to Baby Missile (for security :)
jsr GetDistance
cmp #6 ; 24/4
bcs HighForce
lda #ind_Baby_Missile
lda #ind_Baby_Missile
sta ActiveWeapon,x
HighForce
rts
@@ -356,7 +356,7 @@ HighForce
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
jsr ChooseBestOffensive
@@ -367,11 +367,11 @@ HighForce
NotNegativeEnergy
adw Force #50 RandBoundaryHigh
jsr RandomizeForce
; if target distance lower than 24 - set weapon to Baby Missile (for security :)
; if target distance lower than 24 - set weapon to Baby Missile (for security :)
jsr GetDistance
cmp #6 ; 24/4
bcs HighForce
lda #ind_Baby_Missile
lda #ind_Baby_Missile
sta ActiveWeapon,x
HighForce
rts
@@ -387,7 +387,7 @@ HighForce
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
ldy #ind_Nuke +1
jsr ChooseBestOffensive.NotFromAll
@@ -396,11 +396,11 @@ HighForce
sta ForceTableL,x
lda Force+1
sta ForceTableH,x
; if target distance lower than 32 - set weapon to Baby Missile (for security :)
; if target distance lower than 32 - set weapon to Baby Missile (for security :)
jsr GetDistance
cmp #8 ;32/4
bcs HighForce
lda #ind_Baby_Missile
lda #ind_Baby_Missile
sta ActiveWeapon,x
HighForce
rts
@@ -423,7 +423,7 @@ HighForce
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
@@ -446,8 +446,8 @@ ItIsHuman
bcs EnemyOnTheLeft
; enemy on right
inc tempor2 ; set direction to right
EnemyOnTheLeft
EnemyOnTheLeft
lowestIsLower
skipThisPlayer
dey
@@ -455,7 +455,7 @@ skipThisPlayer
; now we have number of the farthest tank in temp2+1
; and direction (0 - left, >0 - right) in tempor2
; let's move them to registers
; in temp2 we have energy of target
; in temp2 we have energy of target
ldy temp2+1
lda tempor2
rts
@@ -474,13 +474,13 @@ skipThisPlayer
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
@@ -503,7 +503,7 @@ EnemyOnTheLeft
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
lowestIsLower
skipThisPlayer
dey
@@ -511,7 +511,7 @@ skipThisPlayer
; now we have number of the closest tank in temp2+1
; and direction (0 - left, >0 - right) in tempor2
; let's move them to registers
; in temp2 we have x distance divided by 8
; in temp2 we have x distance divided by 8
ldy temp2+1
lda tempor2
rts
@@ -529,7 +529,7 @@ skipThisPlayer
mva #$ff SecondTryFlag
; set initial Angle and Force values
lda OptionsTable+2 ; selected gravity
asl
asl
tay
; force correction - lower tank Y position - higher possible force
sec
@@ -556,7 +556,7 @@ RepeatAim
adc temp2
sta NewAngle
; set virtual weapon :)
lda #ind_Baby_Missile
lda #ind_Baby_Missile
sta ActiveWeapon,x
; now we have initial valuses
mva #%11000000 TestFlightFlag
@@ -597,11 +597,11 @@ GroundHitInFirstLoopR
sta NewAngle
jmp AimingRight
NoHitInFirstLoopR
; Angle 5 deg to left and end loop
; Angle 5 deg to left and end loop
sec
lda NewAngle
sbc #5
sta NewAngle
sta NewAngle
HitOnRightSideOfTargetR
dec NewAngle
EndOfFirstLoopR
@@ -639,7 +639,7 @@ HitOnLeftSideOfTargetR
; decrease energy (a little)
sbw Force #5
NoHitInSecondLoopR
; Angle 1 deg to right and end loop
; Angle 1 deg to right and end loop
inc NewAngle
EndOfSecondLoopR
EndOfAim
@@ -657,7 +657,7 @@ AimSecondTry
sta ForceTableH,x
jsr RandomizeForce.LimitForce
jmp RepeatAim
AimingLeft
; make test Shoot (Flight)
jsr SetStartAndFlight
@@ -692,11 +692,11 @@ GroundHitInFirstLoopL
sta NewAngle
jmp AimingLeft
NoHitInFirstLoopL
; Angle 5 deg to right and end loop
; Angle 5 deg to right and end loop
clc
lda NewAngle
adc #5
sta NewAngle
sta NewAngle
HitOnLeftSideOfTargetL
inc NewAngle
EndOfFirstLoopL
@@ -734,11 +734,11 @@ HitOnRightSideOfTargetL
; decrease energy (a little)
sbw Force #5
NoHitInSecondLoopL
; Angle 1 deg to left and end loop
; Angle 1 deg to left and end loop
dec NewAngle
EndOfSecondLoopL
jmp EndOfAim
SetStartAndFlight ; set start point (virtual barrel end :) ) and make test flight
; xtraj+1 and ytraj+1 set
clc
@@ -759,7 +759,7 @@ SetStartAndFlight ; set start point (virtual barrel end :) ) and make test fl
rts
.endp
;----------------------------------------------
.proc PurchaseAI ;
.proc PurchaseAI ;
; A - skill of the TankNr
; makes purchase for AI opponents
; results of this routine are not visible on the screen
@@ -804,7 +804,7 @@ PurchaseAIRoutines
tay
lda bittable,y
ldy temp
and PurchaseMeTable2,y
and PurchaseMeTable2,y
beq TryToPurchaseOnePiece.SorryNoPurchase
jmp TryToPurchaseOnePiece.PurchaseIt
.endp
@@ -846,7 +846,7 @@ PurchaseIt
lda temp2+1
sbc temp+1
sta MoneyH,x
lda TanksWeaponsTableL,x
sta temp
lda TanksWeaponsTableH,x
@@ -860,12 +860,12 @@ PurchaseIt
lda #99
NotExceeded
sta (temp),y
SorryNoPurchase
rts
rts
.endp
;----------------------------------------------
.proc ShooterPurchase
@@ -877,17 +877,17 @@ SorryNoPurchase
jsr TryToPurchaseOnePiece
; dec tempXroller
; bne @-
; and now offensives
mva #4 tempXroller; number of offensive purchases to perform
;ldx TankNr
@
randomize ind_Missile ind_Heavy_Roller
randomize ind_Missile ind_Heavy_Roller
jsr TryToPurchaseOnePiece
dec tempXroller
bne @-
rts
rts
.endp
;----------------------------------------------
.proc PoolsharkPurchase
@@ -895,21 +895,21 @@ SorryNoPurchase
; mva #2 tempXroller; number of offensive purchases to perform
ldx TankNr
@
randomize ind_Battery ind_Bouncy_Castle
randomize ind_Battery ind_Bouncy_Castle
jsr TryToPurchaseOnePiece
dec tempXroller
; bpl @-
; and now offensives
mva #6 tempXroller; number of purchases to perform
;ldx TankNr
@
randomize ind_Missile ind_Dirt_Charge
randomize ind_Missile ind_Dirt_Charge
jsr TryToPurchaseOnePiece
dec tempXroller
bne @-
rts
rts
.endp
;----------------------------------------------
.proc TosserPurchase
@@ -922,22 +922,22 @@ SorryNoPurchase
; first try to buy defensives
; mva #1 tempXroller; number of defensive purchases to perform
@
randomize ind_Battery ind_Bouncy_Castle
randomize ind_Battery ind_Bouncy_Castle
jsr TryToPurchaseOnePiece
dec tempXroller
bpl @-
; and now offensives
lda MoneyH,x ; money / 256
asl ;*2
sta tempXroller ; perform this many purchase attempts
@
randomize ind_Missile ind_Dirt_Charge
randomize ind_Missile ind_Dirt_Charge
jsr TryToPurchaseOnePiece
dec tempXroller
bpl @-
rts
rts
.endp
;----------------------------------------------
.proc CyborgPurchase
@@ -950,22 +950,22 @@ SorryNoPurchase
; first try to buy defensives
; mva #1 tempXroller; number of defensive purchases to perform
@
randomize ind_Battery ind_Bouncy_Castle
randomize ind_Battery ind_Bouncy_Castle
jsr TryToPurchaseOnePiece2
dec tempXroller
bpl @-
; and now offensives
lda MoneyH,x ; money / 256
:3 asl ;*8
sta tempXroller ; perform this many purchase attempts
@
randomize first_offensive last_offensive
randomize first_offensive last_offensive
jsr TryToPurchaseOnePiece2
dec tempXroller
bpl @-
rts
rts
.endp
;----------------------------------------------
.proc ChooseBestOffensive
@@ -973,7 +973,7 @@ SorryNoPurchase
; X - TankNr
;----------------------------------------------
ldy #ind_Dirt_Charge +1 ;the last weapon to choose +1 (not BFG or Laser :) )
NotFromAll
NotFromAll
; Y - the last offensive weapon to use + 1
lda TanksWeaponsTableL,x
sta temp
@@ -982,7 +982,7 @@ NotFromAll
loop
dey
lda (temp),y
beq loop
beq loop
tya
sta ActiveWeapon,x
rts
+5 -6
View File
@@ -1,10 +1,10 @@
icl '../lib/atari.hea'
org $2000
joytest
joytest
mva #0 dmactls
@
lda trig0
beq pressed
@@ -15,6 +15,5 @@ pressed
;ora jstick0
sta colbak
jmp @-
run joytest
run joytest
+1 -1
View File
@@ -620,7 +620,7 @@ rmt_p5
.IF TARGET = 800
ldx #$10 ; pseudo stereo
bne SetPokey_OffsetX ; pseudo stereo
.ELSE
.ELIF TARGET = 5200
rts
.ENDIF
SetPokey
+3 -4
View File
@@ -6,7 +6,7 @@ song_end
buffers
.ds 256 * 9
POKEY2 = POKEY+$10 ; stereo
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -22,7 +22,7 @@ POKEY2 = POKEY+$10 ; stereo
mva #1 bit_data
; Example: here initializes song pointer:
;mwa #song_data song_ptr
; Init all channels:
@@ -67,7 +67,7 @@ delay
sta POKEY2,x ; stereo
dex ;stereo
bpl @- ; stereo
lda #>buffers
sta bptr+1
@@ -150,4 +150,3 @@ skip
stereo_buff ; stereo
.ds 9 ; stereo
+6 -6
View File
@@ -4,7 +4,7 @@
/***************************************/
icl "splash.h"
; --- dmsc LZSS player routine on zero page
org $80
@@ -57,7 +57,7 @@ fnt
.ds $0300
pmg SPRITES
eif
FontSplash
ins '../../artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
@@ -103,14 +103,14 @@ LOOP lda vcount ;synchronization for the first screen (picture) line
mva >ant dlptr+1
icl "output.png.rp.ini"
;--- 16 lines down ---- !!!
:16 sta wsync
; wait 13 cycles !!!
:4 nop
inc byt2
;--- wait 18 cycles
; jsr _rts
; inc byt3
@@ -185,7 +185,7 @@ stop mva #$00 pmcntl ;PMG disabled
sta POKEY2,x ; stereo
dex
bpl @-
;no glitching please (issue #67)
lda #0
sta $D400 ;dmactl
+161 -159
View File
@@ -59,11 +59,11 @@ LineGameOver
seppukuText
dta d"# SEPPUKU! #"
areYouSureText
.IF target != 5200
.IF TARGET = 800
dta d"# SURE? Y/N #"
.ELSE
.ELIF TARGET = 5200
dta d"#END? Y-1/N-0#"
.ENDIF
.ENDIF
lineClear
dta d" "
@@ -232,109 +232,109 @@ TanksNamesDefault
dta d":1th.Tank"
.ENDR
;-------------------------------------------------
TankShapesTable .BYTE char_tank1
.BYTE char_tank2
.BYTE char_tank3
.BYTE char_tank4
;-------------------------------------------------
TankShapesTable .BYTE char_tank1
.BYTE char_tank2
.BYTE char_tank3
.BYTE char_tank4
;-------------------------------------------------
WeaponPriceH ; weapons prices (tables with prices of weapons)
.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_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_Buy_me
.by >price_Laser
.by >price_White_Flag
.by >price_Battery
.by >price_Hovercraft
.by >price_Parachute
.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_Buy_me
.by >price_Laser
.by >price_White_Flag
.by >price_Battery
.by >price_Hovercraft
.by >price_Parachute
.by >price_StrongParachute
.by >price_Mag_Deflector
.by >price_Shield
.by >price_Heavy_Shield
.by >price_Force_Shield
.by >price_Bouncy_Castle
.by >price_Long_Barrel
.by >price_Mag_Deflector
.by >price_Shield
.by >price_Heavy_Shield
.by >price_Force_Shield
.by >price_Bouncy_Castle
.by >price_Long_Barrel
.by >price_Nuclear_Winter_
.by >price_Lazy_Boy
.by >price_Lazy_Darwin
.by >price_Auto_Defense
.by >price_Spy_Hard
.by >price_Lazy_Boy
.by >price_Lazy_Darwin
.by >price_Auto_Defense
.by >price_Spy_Hard
WeaponPriceL
.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_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_Buy_me
.by <price_Laser
.by <price_White_Flag
.by <price_Battery
.by <price_Hovercraft
.by <price_Parachute
.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_Buy_me
.by <price_Laser
.by <price_White_Flag
.by <price_Battery
.by <price_Hovercraft
.by <price_Parachute
.by <price_StrongParachute
.by <price_Mag_Deflector
.by <price_Shield
.by <price_Heavy_Shield
.by <price_Force_Shield
.by <price_Bouncy_Castle
.by <price_Long_Barrel
.by <price_Mag_Deflector
.by <price_Shield
.by <price_Heavy_Shield
.by <price_Force_Shield
.by <price_Bouncy_Castle
.by <price_Long_Barrel
.by <price_Nuclear_Winter_
.by <price_Lazy_Boy
.by <price_Lazy_Darwin
.by <price_Auto_Defense
.by <price_Spy_Hard
.by <price_Lazy_Boy
.by <price_Lazy_Darwin
.by <price_Auto_Defense
.by <price_Spy_Hard
;-------------------------------------------------
; how many units (bulletd) of a given weapon we get for a given price
@@ -392,7 +392,7 @@ WeaponUnits
.by 2 ;Auto_Defense ;_46
.by 4 ;Spy_Hard ;_47
PurchaseMeTable ;weapons good to be purchased by the robot
PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables
; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
@@ -530,7 +530,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Shield " ; 38 - shield for one shot - no energy
dta d"Heavy Shield " ; 39 - shield with energy
dta d"Force Shield " ; 40 - shield with energy and parachute
dta d"Bouncy Castle " ; 41 - with shield and energy
dta d"Bouncy Castle " ; 41 - with shield and energy
dta d"Long Schlong " ; 42
dta d"Nuclear Winter " ; 43
dta d"Lazy Boy " ; 44
@@ -556,22 +556,22 @@ DefensiveEnergy = *-(last_offensive - first_offensive +1) ; to fake the table f
.by 00 ; Auto Defense
.by 00 ; Spy Hard
weaponsOfDeath ; weapons used in tank death animations
dta ind_Missile
dta ind_Baby_Nuke
dta ind_Nuke
dta ind_Death_s_Head
dta ind_Missile
dta ind_Baby_Nuke
dta ind_Nuke
dta ind_Death_s_Head
dta ind_Hot_Napalm ; why not?
dta ind_Riot_Bomb
dta ind_Riot_Bomb
dta ind_Heavy_Riot_Bomb
dta ind_Baby_Digger
dta ind_Digger
dta ind_Heavy_Digger
dta ind_Baby_Sandhog
dta ind_Sandhog
dta ind_Heavy_Sandhog
dta ind_Dirt_Clod
dta ind_Dirt_Ball
dta ind_Ton_of_Dirt
dta ind_Baby_Digger
dta ind_Digger
dta ind_Heavy_Digger
dta ind_Baby_Sandhog
dta ind_Sandhog
dta ind_Heavy_Sandhog
dta ind_Dirt_Clod
dta ind_Dirt_Ball
dta ind_Ton_of_Dirt
weaponsOfDeathEnd
joyToKeyTable
.by $ff ;00
@@ -618,66 +618,68 @@ gameOverSpritesTop
.by 130+7,130+7,136+7,142+7,148+7,154+7
;------credits
CreditsStart
dta d" "*
dta d"You were playin",d"g"*
dta d"Scorc",d"h"*
dta d"Warsaw, Miam",d"i"*
dta d"2000-202",d"3"*
dta d" "*
dta d"Programmin",d"g"*
dta d"Tomasz 'Pecus' Peck",d"o"*
dta d"Pawel 'pirx' Kalinowsk",d"i"*
dta d" "*
dta d"SFX, Music and Suppor",d"t"*
dta d"Michal 'Miker' Szpilowsk",d"i"*
dta d" "*
.IF target != 5200
dta d" "*
dta d"You were playin",d"g"*
dta d"Scorc",d"h"*
dta d"Warsaw, Miam",d"i"*
dta d"2000-202",d"3"*
dta d" "*
dta d"Programmin",d"g"*
dta d"Tomasz 'Pecus' Peck",d"o"*
dta d"Pawel 'pirx' Kalinowsk",d"i"*
dta d" "*
dta d"SFX, Music and Suppor",d"t"*
dta d"Michal 'Miker' Szpilowsk",d"i"*
dta d" "*
.IF TARGET = 800
dta d"Additional Musi",d"c"*
dta d"Mario 'Emkay' Kri",d"x"*
dta d" "*
.ENDIF
dta d"Code Optimizatio",d"n"*
dta d"Piotr '0xF' Fusi",d"k"*
dta d" "*
dta d"Ar",d"t"*
dta d"Adam Wachowsk",d"i"*
.IF target != 5200
dta d"Code Optimizatio",d"n"*
dta d"Piotr '0xF' Fusi",d"k"*
dta d" "*
dta d"Ar",d"t"*
dta d"Adam Wachowsk",d"i"*
.IF TARGET = 800
dta d"Roman 'xorcerer' Fierfa",d"s"*
.ENDIF
dta d" "*
dta d"Ideas, help and Q",d"A"*
dta d"Bocianu, Probabilitydragon",d","*
dta d"EnderDude, Dracon",d","*
dta d"Beeblebrox, KrzysRog, lopezpb",d","*
dta d"brad-colbert, archon800, nowy80",d","*
dta d"Shaggy the Atarian, RetroBorsuk, ZPH"
.IF target = 5200
dta d","*
dta d"x-usr(1536), Aking, JAC!, phaeron",d","*
dta d"RB520",d"0"*
.ELSE
dta d" "*
dta d" "*
dta d"Ideas, help and Q",d"A"*
dta d"Bocianu, Probabilitydragon",d","*
dta d"EnderDude, Dracon",d","*
dta d"Beeblebrox, KrzysRog, lopezpb",d","*
dta d"brad-colbert, archon800, nowy80",d","*
dta d"Shaggy the Atarian, RetroBorsuk, ZPH"
.IF TARGET = 800
dta d" "*
.ELIF TARGET = 5200
dta d","*
dta d"x-usr(1536), Aking, JAC!, phaeron",d","*
dta d"RB520",d"0"*
.ENDIF
dta d" "*
dta d"Additional testin",d"g"*
dta d"Arek and Alex Peck",d"o"*
dta d" "*
dta d"Special thank",d"s"*
dta d"Krzysztof 'Kaz' Ziembi",d"k"*
.IF target != 5200
dta d" "*
dta d"Additional testin",d"g"*
dta d"Arek and Alex Peck",d"o"*
dta d" "*
dta d"Special thank",d"s"*
dta d"Krzysztof 'Kaz' Ziembi",d"k"*
.IF TARGET = 800
dta d" "*
dta d"Stay tuned for the FujiNet version",d"!"*
.ENDIF
dta d" "*
CreditsEnd
.IF target = 5200
CreditsLines=34 + 7; add 7 for scrollout
.ELSE
.IF TARGET = 800
CreditsLines=40 + 7 ; add 7 for scrollout
.ELIF TARGET = 5200
CreditsLines=34 + 7; add 7 for scrollout
.ENDIF
.IF target = 5200
.IF TARGET = 5200
; Atari 5200 splash
NewSplashText=*
dta d" 2023 atariage", $4e, "com " ; $4e - non blinking dot
.ENDIF
.endif
.endif ; .IF *>0
+1 -1
View File
@@ -14,7 +14,7 @@ dliColorsFore
.by $08,$08,$08,$06,$06,$06,$06,$06,$06,$04
CashOptionL ;(one zero less than on the screen)
.by 0,<200,<800,<1200,<2000
CashOptionH
CashOptionH
.by 0,>200,>800,>1200,>2000
GravityTable .by 10,20,25,30,40
MaxWindTable .by 5,20,40,70,99
+26 -26
View File
@@ -34,7 +34,7 @@ char_flame = $14
char_clear_flame = $1c
char_digger = $04
char_sandhog = $0c
char_sandhog_offset = char_sandhog - char_digger
char_sandhog_offset = char_sandhog - char_digger
char_tank1 = $20
char_tank2 = $24
char_tank3 = $2c
@@ -74,16 +74,16 @@ price_Dirt_Charge = 343 ;_29
price_Buy_me = 170 ;_30
price_Laser = 277 ;_31
price_White_Flag = $0 ;_32
price_Battery = 300 ;_33
price_Hovercraft = 352 ;_34
price_Parachute = 234 ;_35
price_StrongParachute = 1000 ;_36
price_Mag_Deflector = 745 ;_37
price_Shield = 224 ;_38
price_Heavy_Shield = 628 ;_39
price_Force_Shield = 1100 ;_40
price_Bouncy_Castle = 512 ;_41
price_Long_Barrel = 2100 ;_42
price_Battery = 300 ;_33
price_Hovercraft = 352 ;_34
price_Parachute = 234 ;_35
price_StrongParachute = 1000 ;_36
price_Mag_Deflector = 745 ;_37
price_Shield = 224 ;_38
price_Heavy_Shield = 628 ;_39
price_Force_Shield = 1100 ;_40
price_Bouncy_Castle = 512 ;_41
price_Long_Barrel = 2100 ;_42
price_Nuclear_Winter_ = 1000 ;_43
price_Lazy_Boy = 500 ;_44
price_Lazy_Darwin = 730 ;_45
@@ -91,7 +91,7 @@ price_Auto_Defense = 250 ;_46
price_Spy_Hard = 83 ;_47
;Weapon indexes (numbers)
ind_Baby_Missile = 0
first_offensive = ind_Baby_Missile
first_offensive = ind_Baby_Missile
ind_Missile = 1
ind_Baby_Nuke = 2
ind_Nuke = 3
@@ -123,26 +123,26 @@ ind_Liquid_Dirt = 28
ind_Dirt_Charge = 29
ind_Buy_me = 30
ind_Laser = 31
last_offensive = ind_Laser
last_offensive = ind_Laser
ind_White_Flag = 32
first_defensive = ind_White_Flag
ind_Battery = 33
ind_Hovercraft = 34
ind_Parachute = 35
ind_StrongParachute = 36
ind_Mag_Deflector = 37
ind_Shield = 38
ind_Heavy_Shield = 39
ind_Force_Shield = 40
ind_Bouncy_Castle = 41
ind_Long_Barrel = 42
first_defensive = ind_White_Flag
ind_Battery = 33
ind_Hovercraft = 34
ind_Parachute = 35
ind_StrongParachute = 36
ind_Mag_Deflector = 37
ind_Shield = 38
ind_Heavy_Shield = 39
ind_Force_Shield = 40
ind_Bouncy_Castle = 41
ind_Long_Barrel = 42
ind_Nuclear_Winter_ = 43
ind_Lazy_Boy = 44
ind_Lazy_Darwin = 45
ind_Auto_Defense = 46
ind_Spy_Hard = 47
last_defensive = ind_Spy_Hard
last_real_defensive = ind_Bouncy_Castle
last_defensive = ind_Spy_Hard
last_real_defensive = ind_Bouncy_Castle
number_of_offensives = last_offensive - first_offensive +1
number_of_defensives = (last_defensive - first_defensive +1)
number_of_weapons = number_of_offensives + number_of_defensives
+54 -54
View File
@@ -8,7 +8,7 @@ START
jsr Initialize
;jsr GameOverScreen ; only for test !!!
RMTSong song_main_menu
jsr Options ;startup screen
@@ -24,7 +24,7 @@ START
jsr RandomizeSequence
; for the round #1 shooting sequence is random
MainGameLoop
jsr SetWallsType
; first set default barrel lengths (fix for Long Schlong activation :) )
@@ -40,20 +40,20 @@ MainGameLoop
jsr GetRandomWind
jsr RoundInit
jsr MainRoundLoop
bit escFlag
jvs GoGameOver
bmi START
jsr CalculateGains
jsr SortSequence
mva #0 TankNr ;
mva #0 TankNr ;
sta COLBAKS ; set background color to black
sta JoystickNumber ; set joystick port for player
; Hide all (easier than hide last ;) ) tanks
jsr cleartanks ; A=0
@@ -69,7 +69,7 @@ MainGameLoop
jsr DemoModeOrKey
jsr MakeDarkScreen
lda GameIsOver
beq NoGameOverYet
GoGameOver
@@ -80,7 +80,7 @@ NoGameOverYet
mva #sfx_silencer sfx_effect
jmp MainGameLoop
;--------------------------------------------------
.proc CalculateGains
;--------------------------------------------------
@@ -96,7 +96,7 @@ NoGameOverYet
ldx NumberOfPlayers
dex
CalculateGainsLoop
; adding the remaining energy of the tank to gain
; winner gets more ! :)
lda Energy,x
@@ -104,7 +104,7 @@ CalculateGainsLoop
sta gainL,x
bcc @+
inc gainH,x
@
@
; add gain * 2
asl gainL,x
rol gainH,x
@@ -175,7 +175,7 @@ eskipzeroing
rts
.endp
;--------------------------------------------------
.proc RoundInit
.proc RoundInit
;--------------------------------------------------
; at the beginning of each Round we set energy
; of all players to 99
@@ -191,7 +191,7 @@ eskipzeroing
sta AfterBFGflag ; reset BFG flag
sta COLOR2 ; status line "off"
sta COLOR1
tax
@ sta singleRoundVars,x
inx
@@ -219,7 +219,7 @@ SettingEnergies
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
@@ -227,7 +227,7 @@ SettingEnergies
;angles
jsr RandomizeAngle
sta AngleTable,x
dex
bpl SettingEnergies
@@ -312,10 +312,10 @@ DoNotFinishTheRound
lda noDeathCounter
cmp seppukuVal
bcc @+
mva #0 noDeathCounter
mva #sfx_seppuku sfx_effect
jsr DisplaySeppuku
jmp Seppuku
@@ -342,10 +342,10 @@ CheckNextTankAD
jeq NextPlayerShoots
mva #$ff plot4x4color
jsr DisplayTankNameAbove
mva #1 color ;to display flying point
ldx tankNr
@@ -358,7 +358,7 @@ CheckNextTankAD
beq ManualShooting
RoboTanks
; robotanks shoot here
; robotanks shoot here
; TankNr still in X
jsr ArtificialIntelligence
;pause 30
@@ -391,7 +391,7 @@ AfterManualShooting
; defensive weapons without flight handling
ldx TankNr
lda ActiveDefenceWeapon,x
cmp #ind_Hovercraft
cmp #ind_Hovercraft
beq GoFloat
cmp #ind_White_Flag ; White Flag
beq ShootWhiteFlag
@@ -431,10 +431,10 @@ ShootNow
bit escFlag
spl:rts ; keys Esc or O
lda HitFlag ;0 if missed
beq missed
jsr Explosion
continueMainRoundLoopAfterSeppuku
@@ -461,7 +461,7 @@ missed
bne @+
ldx TankNr
tya
sta ActiveWeapon,x
sta ActiveWeapon,x
@
;here we clear offensive text (after a shoot)
@@ -477,7 +477,7 @@ NextPlayerShoots
SeteXistenZ
lda Energy,x
sta eXistenZ,x
jsr MaxForceCalculate
dex
@@ -504,7 +504,7 @@ PlayersAgain
; Aaaah! - in the main loop we have to set eXistenZ and LASTeXistenZ
mva #sfx_next_player sfx_effect
ldx NumberOfPlayers
dex
CheckingPlayersDeath
@@ -521,7 +521,7 @@ NoPlayerNoDeath
cmp NumberOfPlayers
bne NotLastPlayerInRound
mva #0 TankSequencePointer
lda WindChangeInRound
beq NoWindChangeNow
jsr GetRandomWind ; wind change after each turn (not round only)
@@ -529,7 +529,7 @@ NoWindChangeNow
NotLastPlayerInRound
jmp MainRoundLoop
.endp
;---------------------------------
.proc PlayerXdeath
; this tank should not explode anymore:
@@ -560,9 +560,9 @@ NotLastPlayerInRound
adc ResultsTable,x
sta ResultsTable,x
;inc CurrentResult
; RandomizeDeffensiveText
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
TextAfterBFG
sta TextNumberOff
inc CurrentResult ; ... but increase result of winner (BFG)
@@ -574,7 +574,7 @@ TextAfterBFG
mva TankNr temp2 ; not elegant, and probably unnecessary
sty TankNr
jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) )
mva temp2 TankNr
mva temp2 TankNr
;Deffensive text cleanup
;here we clear Deffensive text (after a shoot)
@@ -752,7 +752,7 @@ NotNegativeShieldEnergy
; Energy of tank X in A
;--------------------------------------------------
sta L1
;DATA L1,L2
;Multiplication 8bit*8bit,
;result 16bit
@@ -786,7 +786,7 @@ B0 dey
@ lda #$0
cpx #ind_White_Flag ; White Flag
bne no99
set99 lda #99
set99 lda #99
no99
.REPT MaxPlayers, #+1
sta TanksWeapon:1,x
@@ -823,16 +823,16 @@ deletePtr = temp
iny
sty TankShape+2
sty TankShape+5
mwa #1024 RandBoundaryHigh
mva #$ff LastWeapon
sta HowMuchToFall
mva #1 color
jsr SetStandardBarrels
jsr WeaponCleanup
jsr WeaponCleanup
mva #>WeaponFont chbas
;parameter for old plot (unPlot) max 5 points
@@ -869,7 +869,7 @@ MakeTanksVisible
mva #1 CurrentRoundNr ;we start from round 1
mva #6 NTSCcounter
rts
.endp
;--------------------------------------------------
@@ -973,7 +973,7 @@ UsageLoop
lda RANDOM
and #%00000011 ;(0..1023)
sta temp2+1
cpw RandBoundaryLow temp2
seq:bcs RandomizeForce
@@ -984,9 +984,9 @@ UsageLoop
sta ForceTableL,x
lda temp2+1
sta ForceTableH,x
;---------
LimitForce
LimitForce
; in X must be TankNr
; cuts force to MaxForceTable
lda MaxForceTableH,x
@@ -995,7 +995,7 @@ LimitForce
lda MaxForceTableL,x
cmp ForceTableL,x
@ bcs @+
lda MaxForceTableL,x
sta ForceTableL,x
lda MaxForceTableH,x
@@ -1045,7 +1045,7 @@ rotateLeft ; older is bigger
BarrelPositionIsFine
jsr DrawTankNr
rts
.endp
;----------------------------------------------
@@ -1166,7 +1166,7 @@ SetRandomWalls
.endp
; --------------------------------------
; Sets the appropriate variables based on the options table
;
;
.proc SetVariablesFromOptions
;first option
ldy OptionsTable
@@ -1196,29 +1196,29 @@ SetRandomWalls
ldy OptionsTable+3
lda MaxWindTable,y
sta MaxWind
;fifth option (no of rounds)
ldy OptionsTable+4
lda RoundsTable,y
sta RoundsInTheGame
;6th option (shell speed)
ldy OptionsTable+5
lda flyDelayTable,y
sta flyDelay
;7th option (Airstrike after how many missess)
ldy OptionsTable+6
lda seppukuTable,y
sta seppukuVal
;8th option (how aggressive are mountains)
ldy OptionsTable+7
lda mountainsDeltaTableH,y
sta mountainDeltaH
lda mountainsDeltaTableL,y
sta mountainDeltaL
rts
.endp
@@ -1228,9 +1228,9 @@ SetRandomWalls
;using 4x4 font
jsr RoundOverSprites
mva #$ff plot4x4color
;centering the result screen
mva #((ScreenHeight/2)-(8*4)) ResultY
@@ -1246,7 +1246,7 @@ SetRandomWalls
lda CurrentRoundNr
cmp RoundsInTheGame
beq GameOver4x4
sta decimal
mwa #RoundNrDisplay displayposition
jsr displaybyte ;decimal (byte), displayposition (word)
@@ -1264,7 +1264,7 @@ GameOver4x4
mva ResultY LineYdraw
jsr TypeLine4x4
mva #1 GameIsOver
@
adb ResultY #4 ;next line
@@ -1321,7 +1321,7 @@ ResultOfTheNextPlayer
; overwrite the second digit of the points (max 255)
;it means ":"
mva #26 ResultLineBuffer+9
ldx #0
lda TankNr
asl
+59 -59
View File
@@ -4,7 +4,7 @@
;--------------------------------------------------
.proc draw ;;fuxxing good draw :)
.proc draw ;;fuxxing good draw :)
; xdraw,ydraw (word) - coordinates of first point
; xbyte,ybyte (word) - coordinates of last point
;--------------------------------------------------
@@ -221,7 +221,7 @@ LineGoesLeft
; line goes left - we are reversing X
sbw xtempDRAW temp xdraw ; XI
PutPixelinDraw
; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
bit drawFunction
bpl @+
@@ -276,7 +276,7 @@ StopHitChecking
jmp ContinueDraw
@
MeasureVisualisation
jsr plot
jsr plot
ContinueDraw
; XI=XI+1
@@ -292,9 +292,9 @@ EndOfDraw
.endp
;--------------------------------------------------
.proc circle ;fxxxing good circle drawing :)
.proc circle ;fxxxing good circle drawing :)
; xdraw,ydraw (word) - coordinates of circle center
; radius (byte) - radius of circle
; radius (byte) - radius of circle
;--------------------------------------------------
;Turbo Basic source
; R=30
@@ -483,10 +483,10 @@ endcircleloop
; 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
@@ -708,7 +708,7 @@ NoMissile
bcs PMForTank6
; clear sprite and put 3 lines on the tank at the same time
ldx #3 ; three lines of PM
ClearPM
ClearPM
cpy temp
bne ZeroesToGo
@ lda (xbyte),y
@@ -728,7 +728,7 @@ ZeroesToGo
PMForTank6
; clear sprite and put 3 lines on the tank at the same time
ldx #3 ; three lines of PM
ClearPM6
ClearPM6
cpy temp
bne ZeroesToGo6
@ lda (xbyte),y
@@ -756,7 +756,7 @@ noTankNoPM
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
ldx TankNr
lda ActiveDefenceWeapon,x
cmp #ind_Shield ; one shot shield
cmp #ind_Shield ; one shot shield
beq DrawTankSh
cmp #ind_Force_Shield ; shield with energy and parachute
beq DrawTankShieldBold
@@ -809,7 +809,7 @@ DoNotDrawTankNr
tankflash_loop
lda CONSOL ; turbo mode
and #%00000001 ; START KEY
sne:mva #1 fs ; finish it
sne:mva #1 fs ; finish it
mva #1 Erase
ldx TankNr
jsr DrawTankNr.SkipHidingPM ; it's necessary becouse DrawTankNr skips tanks with no energy !
@@ -833,7 +833,7 @@ tankflash_loop
; if use DrawInPosition entry point then:
; xdraw, ydraw - coordinates left LOWER corner of Tank char
; values remain there after a DrawTankNr proc.
;
;
; this proc change xdraw, ydraw and temp!
;--------------------------------------------------
sbw xdraw #$03 ; 3 pixels to left
@@ -934,7 +934,7 @@ ToHighToParachute
;--------------------------------------------------
.proc DrawTankRocketEngine
; X - tank number
;
;
; this proc change xdraw, ydraw and temp!
;--------------------------------------------------
clc
@@ -942,7 +942,7 @@ ToHighToParachute
adc #2 ; 1 pixel down
sta ydraw
mva #0 ydraw+1
clc
lda XtanksTableL,x
adc #2 ; 2 pixels to right
@@ -951,18 +951,18 @@ ToHighToParachute
adc #0
sta xdraw+1
; draw first horizontal line
; draw first horizontal line
mva #5 temp
@
jsr plot
inw xdraw
dec temp
bne @-
sbw xdraw #2 ; 2 pixels left
sbw xdraw #2 ; 2 pixels left
inw ydraw ; 1 pixel down
; draw second horizontal line
; draw second horizontal line
mva #3 temp
@
jsr plot
@@ -970,7 +970,7 @@ ToHighToParachute
dec temp
bne @-
adw xdraw #2 ; 2 pixels right
adw xdraw #2 ; 2 pixels right
inw ydraw ; 1 pixel down
; and last pixel
@@ -982,7 +982,7 @@ ToHighToParachute
;--------------------------------------------------
.proc DrawTankEngine
; X - tank number
;
;
; this proc change xdraw, ydraw and temp!
;--------------------------------------------------
; one pixel under tank
@@ -1087,7 +1087,7 @@ ROLPoint2
rol UnderTank1
inw xdraw
dec temp
bne ByteBelowTank
bne ByteBelowTank
NoGroundCheck
ldx TankNr
lda Ytankstable,x
@@ -1099,7 +1099,7 @@ NoGroundCheck
lda Parachute
and #1
bne ParachutePresent
; decreasing energy
; decreasing energy
ldy #2 ; how much energy to substract if no parachute
jsr DecreaseEnergyX
ParachutePresent
@@ -1114,7 +1114,7 @@ ParachutePresent
beq @+
jsr DecreaseEnergyX
@
; check energy of parachute
; check energy of parachute
lda ShieldEnergy,x
bne OneTimeParachute
lda #$00
@@ -1187,7 +1187,7 @@ NotLeftEdge
EndLeftFall
EndRightFall
NoLeftOrRight
inc EndOfTheFallFlag ; after this is shouldn't fall
inc EndOfTheFallFlag ; after this is shouldn't fall
EndOfFCycle
; draw tank on new position
jsr DrawTankNr ; ew have TankNr in X (I hope :) )
@@ -1247,7 +1247,7 @@ NoParachuteWeapon
beq ThereWasNoParachute
jsr DrawTankParachute
ThereWasNoParachute
; ldx TankNr
; ldx TankNr
jsr PutTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
mva #sfx_silencer sfx_effect
rts
@@ -1267,7 +1267,7 @@ ThereWasNoParachute
sta pmgraph+$700,y
iny
bne @-
rts
rts
.endp
/*
@@ -1419,7 +1419,7 @@ ColumnIsReady
bcc FalloutOfLine
beq FalloutOfLine
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
lda IsEndOfTheFallFlag
@@ -1539,7 +1539,7 @@ EndDrawing
rts
.endp
/*
/*
;--------------------------------------------------
.proc calculatemountains0
; Only for testing - makes ground flat (0 pixels)
@@ -1601,7 +1601,7 @@ NotHigher
sta temp ; opty possible
; substract address of the next text from previous to get text length
sbw temp LineAddress4x4 temp2
mva temp2 fx
mva temp2 fx
;jsr Display4x4AboveTank
;rts
@@ -1745,7 +1745,7 @@ DOTOldLowestValue
bne end_found
dey
bne @-
end_found
iny
sty fx
@@ -1797,21 +1797,21 @@ EndOfTypeLine4x4
;--------------------------------
.proc AreYouSure
;using 4x4 font
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
;sure?
mwa #areYouSureText LineAddress4x4
jsr _sep_opty
jsr _sep_opty
;bottom frame
mva ResultY LineYdraw
jsr TL4x4_bottom
jsr GetKey
cmp #@kbcode._Y ; $2b ; "Y"
@@ -1821,14 +1821,14 @@ EndOfTypeLine4x4
@ mva #0 escFlag
skip01
jsr WaitForKeyRelease
;clean
mva #3 di
mva #4 ResultY
@
mva #$ff plot4x4color
mwa #lineClear LineAddress4x4
jsr _sep_opty
jsr _sep_opty
dec di
bne @-
@@ -1847,31 +1847,31 @@ quit_areyousure
;--------------------------------
.proc DisplaySeppuku
;using 4x4 font
mva #20 fs ; temp, how many times blink the billboard
seppuku_loop
lda CONSOL ; turbo mode
and #%00000001 ; START KEY
sne:mva #1 fs ; finish it
sne:mva #1 fs ; finish it
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 #seppukuText LineAddress4x4
jsr _sep_opty
;bottom frame
mva ResultY LineYdraw
jsr TL4x4_bottom ; just go
;clean seppuku
mva #3 di
;mva #4 ResultY
lda #4
@@ -1879,7 +1879,7 @@ seppuku_loop
loplop ;@
mwa #lineClear LineAddress4x4
jsr _sep_opty
dec di
bne loplop ;@-
@@ -1888,7 +1888,7 @@ loplop ;@
quit_seppuku
rts
.endp
; -------------------------------------
@@ -1909,7 +1909,7 @@ X lda XtanksTableL,x
;--------------------------------------------------
;vx calculation
;vx = sin(90-Angle) for Angle <=90
;vx = -sin(Angle-90) for 90 < Angle <= 180
;vx = -sin(Angle-90) for 90 < Angle <= 180
; erase previous barrel
@@ -1918,7 +1918,7 @@ X lda XtanksTableL,x
; lda previousBarrelAngle,x
; sta Angle
; jsr DrawBarrelTech
;
;
; mva #1 color
ldx TankNr
jsr SetupXYdraw
@@ -1932,11 +1932,11 @@ X lda XtanksTableL,x
.proc DrawBarrelTech
; angle in Angle and A
mvx #0 goleft
cmp #91
bcc angleUnder90
;over 90
sec
sbc #90
@@ -1953,8 +1953,8 @@ angleUnder90
tax
; barrel start offset under 90deg
adw xdraw #3 xdraw
@
@
sbw ydraw #3 ydraw
lda sintable,x ; cos(X)
sta vx
@@ -1967,7 +1967,7 @@ angleUnder90
lda Angle
cmp #91
bcc YangleUnder90
lda #180
sec
sbc Angle
@@ -1984,14 +1984,14 @@ YangleUnder90
sta fy
; draw by vx vy
; in each step
; in each step
; 1. plot(xdraw, ydraw)
; 2. add vx and vy to 3 byte variables xdraw.fx, ydraw.fy
; 3 check length, if shorter, go to 1.
; mva #6 yc ; barrel length
barrelLoop
lda goleft
bne goright
clc
@@ -2029,15 +2029,15 @@ ybarrel
sta ydraw
bcs @+
dec ydraw+1
@
@
jsr plot ;.MakePlot
dec yc
bne barrelLoop
mwa xdraw EndOfTheBarrelX
mva ydraw EndOfTheBarrelY
rts
.endp
;--------------------------------------------------
+97 -111
View File
@@ -7,7 +7,7 @@
;---------------------------------------------------
.IFNDEF TARGET
.def TARGET = 800 ; 5200 ; or 64
.def TARGET = 800 ; 5200
.ENDIF
;atari800 -5200 -cart ${outputFilePath} -cart-type 4
;atari800 -run ${outputFilePath}
@@ -64,7 +64,7 @@ FirstZpageVariable = $57
.zpvar CreditsVScrol .byte
;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine
.zpvar fx .byte
.zpvar fx .byte
.zpvar yi .word ;Y (word) in draw routine
.zpvar fy .byte
.zpvar xk .word
@@ -77,7 +77,7 @@ FirstZpageVariable = $57
.zpvar dp .word
;----------------------------
.zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte
.zpvar UnderTank2 .byte
;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word
@@ -131,7 +131,7 @@ FirstZpageVariable = $57
.zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing
.zpvar LineYdraw .byte
.zpvar LineXdraw .word
.zpvar plot4x4color .byte ; $00 / $ff
.zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte
@@ -152,11 +152,15 @@ FirstZpageVariable = $57
;-----------------------------------------------
; libraries
;-----------------------------------------------
.IF TARGET = 5200
.IF TARGET = 800
icl 'Atari/lib/ATARISYS.ASM'
icl 'Atari/lib/MACRO.ASM'
icl 'artwork/splash_v2/splash.asm' ; splash screen and musix
.ELIF TARGET = 5200
OPT h-f+ ; no headers, single block --> cart bin file
icl 'Atari/lib/5200SYS.ASM'
icl 'Atari/lib/5200MACRO.ASM'
.enum @kbcode
.enum @kbcode
/*
_0
_1
@@ -193,21 +197,17 @@ FirstZpageVariable = $57
_none = $0f
.ende
.ELSE
icl 'Atari/lib/ATARISYS.ASM'
icl 'Atari/lib/MACRO.ASM'
icl 'artwork/splash_v2/splash.asm' ; splash screen and musix
.ENDIF
;-----------------------------------------------
; variable declarations in RAM (no code)
;-----------------------------------------------
ORG PMGraph + $0300 - (variablesEnd - OneTimeZeroVariables + 1)
icl 'variables.asm'
; Game loading address
ORG $4000
WeaponFont
ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
@@ -220,25 +220,25 @@ DisplayCopyStart
icl 'Atari/display_main_menu.asm'
DisplayCopyEnd
org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart)
DisplayCopyPurchaseDlROM = *
org DisplayCopyPurchase, DisplayCopyPurchaseDlROM
DisplayCopyPurchaseStart
icl 'Atari/display_purchasedl.asm'
DisplayCopyPurchaseEnd
org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart)
StatusBufferROM = *
org StatusBufferCopy, StatusBufferROM
StatusBufferCopyStart
icl 'Atari/display_status.asm'
StatusBufferCopyEnd
org StatusBufferROM + (StatusBufferCopyEnd - StatusBufferCopyStart)
icl 'Atari/display_static.asm'
;----------------------------------------------
;--------------------------------------------------
; Game Code
;--------------------------------------------------
@@ -246,16 +246,11 @@ FirstSTART
.IF TARGET = 5200
; start in 5200 diagnostic mode
; move original startup procedure to RAM
Modified5200Splash = $2100 ; apparently there is some free space here
; 6502 initialization
; SEI
; CLD
; LDX #$FF
; TXS
; check kernel version
Atari5200KernelByte = $fff8
; $32 - 4 joy
; $32 - 4 joy
; $00 - 2 joy
; $ff - Altirra kernel
@@ -276,11 +271,11 @@ rom2joy
@
mwa $fffc temp ; startup proc address
mwa #Modified5200Splash temp2
jsr CopyFromROM
jsr CopyFromROM
; modify the end of the splash procedure
lda #$60 ; rts
sta (temp2),y
jsr Modified5200Splash+$0f ; after the diag cart detection
; modify the text
splash_text = $3c80 ; '.scorch.supersystem.copyright.19xx.atari'
@@ -290,12 +285,12 @@ rom2joy
@ lda NewSplashText,y
sta splash_copyright,y
dey
bpl @-
bpl @-
; splash screen delay. maybe add fire to speed up?
@ cpx RTCLOK+1
bne @-
no5200splash
no5200splash
.ENDIF
jsr MakeDarkScreen
@@ -305,13 +300,13 @@ no5200splash
@ sta OneTimeZeroVariables,y
dey
bpl @-
; one time zero variables in RAM (zero page)
ldy #FirstZpageVariable
@ sta $0000,y
iny
bne @-
; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1
@ lda initialvaluesStart,y
@@ -327,41 +322,32 @@ no5200splash
jsr GenerateLineTable
.IF TARGET = 800
; pokeys init
lda #3 ; stereo
sta POKEY+$0f ; stereo
sta POKEY+$1f ; stereo
lda PAL
and #%00001110
bne NoRMT_PALchange
;it is PAL here
; Change RMT to PAL version
; 5 values in RMT file
; not elegant :(
mva #$06 MODUL-6+$967 ; $07 > $06
;mva #$06 MODUL-6+$bc3 ; $07 > $06
;mva #$06 MODUL-6+$e69 ; $08 > $06
;mva #$06 MODUL-6+$ebc ; $08 > $06
sta MODUL-6+$bc3 ; $07 > $06
sta MODUL-6+$e69 ; $08 > $06
sta MODUL-6+$ebc ; $08 > $06
mva #$10 MODUL-6+$a69 ; $12 > $10
mva #$04 MODUL-6+$bf8 ; $05 > $04
mva #$08 MODUL-6+$e3d ; $0a > $08
; and mountains colors table address
mva #<dliColorsFore2PAL GradientAddrL+2
mva #>dliColorsFore2PAL GradientAddrH+2
; mva #$c4 dliColorsFore2+16
; mva #$c6 dliColorsFore2+17
; mva #$a4 dliColorsFore2+18
; mva #$a6 dliColorsFore2+19
; sta dliColorsFore2+20
; pokeys init
lda #3 ; stereo
sta POKEY+$0f ; stereo
sta POKEY+$1f ; stereo
lda PAL
and #%00001110
bne NoRMT_PALchange
;it is PAL here
; Change RMT to PAL version
; 5 values in RMT file
; not elegant :(
mva #$06 MODUL-6+$967 ; $07 > $06
sta MODUL-6+$bc3 ; $07 > $06
sta MODUL-6+$e69 ; $08 > $06
sta MODUL-6+$ebc ; $08 > $06
mva #$10 MODUL-6+$a69 ; $12 > $10
mva #$04 MODUL-6+$bf8 ; $05 > $04
mva #$08 MODUL-6+$e3d ; $0a > $08
; and mountains colors table address
mva #<dliColorsFore2PAL GradientAddrL+2
mva #>dliColorsFore2PAL GradientAddrH+2
NoRMT_PALchange
.ELSE
mva #$7f SkStatSimulator
.ELIF TARGET = 5200
mva #$7f SkStatSimulator
.ENDIF
@@ -380,7 +366,7 @@ NoRMT_PALchange
mwa #kb_continue VKEYCNT ;Keyboard handler
.ENDIF
VMAIN VBLinterrupt,7 ;jsr SetVBL
mva #2 chactl ; necessary for 5200
;--------------------------------------------------
@@ -388,7 +374,7 @@ NoRMT_PALchange
icl 'game.asm'
;--------------------------------------------------
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
@@ -396,26 +382,26 @@ NoRMT_PALchange
; result: A=keycode
;--------------------------------------------------
jsr WaitForKeyRelease
@
.IF TARGET = 800
lda SKSTAT
cmp #$ff
beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT
beq checkJoyGetKey
.ELSE
lda SkStatSimulator
and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF
lda kbcode
cmp #@kbcode._none
beq checkJoyGetKey
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
bne getkeyend
mvy #$80 escFlag
bne getkeyend
getKeyAfterWait
.IF TARGET = 800
lda SKSTAT
cmp #$ff
beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT
beq checkJoyGetKey
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF
lda kbcode
cmp #@kbcode._none
beq checkJoyGetKey
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
bne getkeyend
mvy #$80 escFlag
bne getkeyend
checkJoyGetKey
;------------JOY-------------
@@ -425,7 +411,7 @@ checkJoyGetKey
and #$0f
cmp #$0f
beq notpressedJoyGetKey
tay
tay
lda joyToKeyTable,y
bne getkeyend
@@ -434,26 +420,26 @@ notpressedJoyGetKey
lda STRIG0
beq JoyButton
.IF TARGET = 800 ; Select and Option key only on A800
bne checkSelectKey
bne checkSelectKey
checkSelectKey
lda CONSOL
and #%00000010 ; Select
beq SelectPressed
lda CONSOL
and #%00000100 ; Option
lda CONSOL
and #%00000010 ; Select
beq SelectPressed
lda CONSOL
and #%00000100 ; Option
.ENDIF
bne @-
bne getKeyAfterWait
OptionPressed
lda #@kbcode._atari ; Option key
bne getkeyend
bne getkeyend
SelectPressed
lda #@kbcode._tab ; Select key
bne getkeyend
JoyButton
lda #@kbcode._ret ;Return key
lda #@kbcode._ret ;Return key
getkeyend
ldy #0
sty ATRACT ; reset atract mode
sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect
rts
.endp
@@ -461,7 +447,7 @@ getkeyend
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
jsr WaitForKeyRelease
lda kbcode
and #$3f ;CTRL and SHIFT ellimination
rts
@@ -471,7 +457,7 @@ getkeyend
.proc WaitForKeyRelease
;--------------------------------------------------
mva #128-KeyRepeatSpeed pressTimer ; tricky
StillWait
StillWait
bit pressTimer
bmi KeyReleased
lda STICK0
@@ -488,10 +474,10 @@ StillWait
and #%00000110 ; Select and Option only
cmp #%00000110
bne StillWait
.ELSE
lda SkStatSimulator
and #%11111110
beq StillWait
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
beq StillWait
.ENDIF
KeyReleased
rts
@@ -745,19 +731,21 @@ EndofBFGDLI
.ERROR 'Code and data too long'
.ENDIF
.ECHO "Bytes left: ",$b000-*
org $b000 ;address of RMT module
MODUL
MODUL
;RMT module is standard Atari binary file already
ins "artwork/sfx/scorch_str9-NTSC.rmt",+6 ;include music RMT module
MODULEND
;----------------------------------------------
icl 'constants_top.asm'
;----------------------------------------------
.ECHO "Bytes on top left: ",$bfe8-* ;ROM_SETTINGS-*
.IF target = 5200
.IF TARGET = 800
run FirstSTART
.ELIF TARGET = 5200
.IF * > ROM_SETTINGS-1
.ERROR 'Code and RMT song too long to fit in 5200'
.ENDIF
@@ -766,6 +754,4 @@ MODULEND
.byte " scorch supersystem " ;20 characters title
.byte " ", $ff ;$BFFD == $ff means diagnostic cart, no splash screen
.word FirstSTART
.ELSE
run FirstSTART
.ENDIF
+16 -17
View File
@@ -20,8 +20,8 @@
org $801
org [a($801)],$801
basic_start(FirstSTART)
;---------------------------------------------------
.macro build
dta d"1.28" ; number of this build (4 bytes)
@@ -64,7 +64,7 @@ FirstZpageVariable = $58 ; $57
.zpvar CreditsVScrol .byte
;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine
.zpvar fx .byte
.zpvar fx .byte
.zpvar yi .word ;Y (word) in draw routine
.zpvar fy .byte
.zpvar xk .word
@@ -77,7 +77,7 @@ FirstZpageVariable = $58 ; $57
.zpvar dp .word
;----------------------------
.zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte
.zpvar UnderTank2 .byte
;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word
@@ -131,7 +131,7 @@ FirstZpageVariable = $58 ; $57
.zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing
.zpvar LineYdraw .byte
.zpvar LineXdraw .word
.zpvar plot4x4color .byte ; $00 / $ff
.zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte
@@ -155,19 +155,19 @@ FirstZpageVariable = $58 ; $57
icl 'C64/lib/C64_ATARISYS.ASM'
icl 'C64/lib/C64SYS.ASM'
icl 'C64/lib/MACRO.ASM'
;-----------------------------------------------
; variable declarations in RAM (no code)
;-----------------------------------------------
; Game loading address
ORG $4100
icl 'variables.asm'
WeaponFont
ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
;--------------------------------------------------
; Game Code
;--------------------------------------------------
@@ -199,22 +199,22 @@ FirstSTART
; from here on NMI is disabled
jsr MakeDarkScreen
; one time zero variables in RAM (non zero page)
lda #0
ldy #OneTimeZeroVariablesCount-1
@ sta OneTimeZeroVariables,y
dey
bpl @-
; one time zero variables in RAM (zero page)
ldy #FirstZpageVariable
@ sta $0000,y
iny
bne @-
; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1
@ lda initialvaluesStart,y
@@ -235,7 +235,7 @@ FirstSTART
icl 'game.asm'
;--------------------------------------------------
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
@@ -252,7 +252,7 @@ FirstSTART
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
jsr WaitForKeyRelease
lda kbcode
and #$3f ;CTRL and SHIFT ellimination
rts
@@ -361,7 +361,7 @@ noShellDelay
icl 'C64/textproc.asm'
;----------------------------------------------
icl 'grafproc.asm'
icl 'C64/gr_basics.asm'
icl 'C64/gr_basics.asm'
;----------------------------------------------
icl 'weapons.asm'
;----------------------------------------------
@@ -442,4 +442,3 @@ NMI
INC $D020 ; change border colour, indication for a NMI
RTI ; exit interrupt
; (not acknowledged!)
-11712
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -55,9 +55,9 @@ StatusBufferCopy
variablesStart ; zeroing starts here
;=====================================================
;isInventory .ds 1 ; 0 - purchase, $ff - inventory
;--------------
;--------------
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
;--------------
;--------------
noDeathCounter .ds 1
;--------------
OptionsY .ds 1 ;vertical position of cursor on Options screen
@@ -125,9 +125,9 @@ BarrelLength ;length of the tank barrel - dont forget to set it to 6 at round st
.DS MaxPlayers
ActiveWeapon ;number of the selected weapon
.DS MaxPlayers
ActiveDefenceWeapon ;number of the activated defence weapon - 0
ActiveDefenceWeapon ;number of the activated defence weapon - 0
.DS MaxPlayers
AutoDefenseFlag ; 0 - not activated, >$7f - activated
AutoDefenseFlag ; 0 - not activated, >$7f - activated
.DS MaxPlayers
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
;----------------------------------------------------
@@ -301,7 +301,7 @@ HowManyOnTheListDef
.DS 1
;PositionOnTheList ; pointer position on the list being displayed
; .DS 1
LastWeapon
LastWeapon
; number of the last previously purchased weapon
; it is necessary when after purchase some weapon
; is removed from the list (because too expensive)
@@ -361,9 +361,9 @@ TankTempY
;-------------- single round variables --------------
;----------------------------------------------------
singleRoundVars
;--------------
;--------------
;escFlag .ds 1 ; 0 - Esc or O not pressed, $80 - Esc pressed, $40 - O pressed
;--------------
;--------------
CurrentResult
.DS 1
;--------------
+104 -105
View File
@@ -22,7 +22,7 @@
pha
rts
ExplosionRoutines
.word babymissile-1 ;Baby_Missile ;_00
.word babymissile-1 ;Baby_Missile ;_00
.word missile-1 ;Missile ;_01
.word babynuke-1 ;Baby_Nuke ;_02
.word nuke-1 ;Nuke ;_03
@@ -60,7 +60,7 @@ tracer
rts
.endp
.proc BFG
mva #sfx_plasma_2_2 sfx_effect
mva #sfx_plasma_2_2 sfx_effect
jsr BFGblink
; Kill all :)
ldx NumberOfPlayers
@@ -79,7 +79,7 @@ CheckNextTankBFG
.proc babymissile
mva #11 ExplosionRadius
GoBabyMissileSFX
mva #sfx_baby_missile sfx_effect
mva #sfx_baby_missile sfx_effect
GoXmissile
jmp xmissile
.endp
@@ -106,12 +106,12 @@ GoBabyNukeSFX
; ------------------------
.proc leapfrog
mva #17 ExplosionRadius
; mva #sfx_baby_missile sfx_effect
; mva #sfx_baby_missile sfx_effect
; jsr xmissile
jsr babymissile.GoBabyMissileSFX
jsr SecondRepeat
SecondRepeat
; soil must fall down now! there is no other way...
; hide tanks or they fall down with soil
@@ -150,7 +150,7 @@ EndOfLeapping
mva #21 ExplosionRadius
jsr CalculateExplosionRange0
jsr xmissile.NoRangeCalc
jsr SoilDown2
;
jsr cleartanks ; maybe not?
@@ -208,10 +208,10 @@ NoWallsInFunky
mva #sfx_nuke sfx_effect
jsr GoXmissileWithSaveXYdraw
sbw xdraw #34
mva #sfx_nuke sfx_effect
mva #sfx_nuke sfx_effect
jsr GoXmissileWithSaveXYdraw
adw xdraw #68
mva #sfx_nuke sfx_effect
mva #sfx_nuke sfx_effect
jsr GoXmissileWithSaveXYdraw
sbw xdraw #34
;
@@ -219,14 +219,14 @@ NoWallsInFunky
;jsr CalculateExplosionRange
cpw ydraw #screenHeight
bcs NoUpperCircle
mva #sfx_nuke sfx_effect
mva #sfx_nuke sfx_effect
jsr GoXmissileWithSaveXYdraw
NoUpperCircle
adw ydraw #68
;jsr CalculateExplosionRange
cpw ydraw #screenHeight
bcs NoLowerCircle
mva #sfx_nuke sfx_effect
mva #sfx_nuke sfx_effect
jsr GoXmissileWithSaveXYdraw
NoLowerCircle
mva #sfx_silencer sfx_effect
@@ -258,7 +258,7 @@ GoXmissileWithSaveXYdraw
;
mwa xdraw xcircle ; store hitpoint for future repeats
ldy #30 ; repeat 30 times
sty magic
sty magic
RepeatNapalm ; external loop (for fire animation)
mwa xcircle xdraw
sbw xdraw #(napalmRadius) ; 10 pixels on left side hit point
@@ -280,7 +280,7 @@ RepeatFlame ; internal loop (draw flames)
tya
sec
sbc ydraw
sta ydraw
sta ydraw
sbw xdraw #4 ; half character correction
; draw flame symbol
lda magic ; if last repeat - clear flames
@@ -288,7 +288,7 @@ RepeatFlame ; internal loop (draw flames)
lda random
and #%00000110
clc
adc #char_flame
adc #char_flame
bne PutFlameChar
LastNapalmRepeat
lda #char_clear_flame ; clear flame symbol
@@ -312,7 +312,7 @@ CharOffTheScreen
jne RepeatFlame
dec magic
jpl RepeatNapalm
; after napalm
; after napalm
;now we must check tanks in range
ldx NumberOfPlayers
dex
@@ -536,7 +536,7 @@ DiggerCharacter
lda random
and #$06
clc
adc #char_digger
adc #char_digger
adc sandhogflag
sta CharCode
cpw xdraw #(screenwidth-6)
@@ -619,7 +619,7 @@ RepeatFill
ldy #0
lda (tempXROLLER),y
sta HeightRol ; relative point
RollinContinuesLiquid
; new point is set
adw xdraw #mountaintable tempXROLLER
@@ -684,19 +684,19 @@ ToHighFill
ldx TankNr
lda AngleTable,x
tay
mwa EndOfTheBarrelX xbyte
mva EndOfTheBarrelY ybyte
mva #0 ybyte+1
sta LaserFlag ; turn on gravity and wind after shot :)
mwa xdraw LaserCoordinate
mwa ydraw LaserCoordinate+2
mwa xbyte LaserCoordinate+4
mwa ybyte LaserCoordinate+6
mva #sfx_lightning sfx_effect
mva #%10000000 drawFunction
;the above switches Draw to measuring length
jsr draw
@@ -723,7 +723,7 @@ ToHighFill
dec yc
bne @-
mva #1 color
mwa LaserCoordinate xdraw
mwa LaserCoordinate+2 ydraw
@@ -764,7 +764,7 @@ ExplosionLoop2
bcc ExplosionLoop2
mva #1 color
;check tanks' distance from the centre of the explosion
mva #%10000000 drawFunction
@@ -830,10 +830,10 @@ UseShieldWithEnergy
cpy #0 ; is necessary to reduce tenk energy ?
beq ShieldCoveredTank
jsr DecreaseEnergyX
ShieldCoveredTank
ShieldCoveredTank
lda ShieldEnergy,x
jne EndOfDistanceCheckLoop
ShieldEnergy0 ; deactivate if no energy. it's like use one hit shield :)
ShieldEnergy0 ; deactivate if no energy. it's like use one hit shield :)
UseShield
lda TankNr
pha ; store TankNr
@@ -1007,7 +1007,7 @@ DirectionChecked
; --------------------------------------------------
; makes dirt on xdraw,ydraw position and of ExplosionRadius height
mva #sfx_dirt_chrg_s sfx_effect
mva #1 color
NoColor ; jump here with color=0 to clean dirt
mwa xdraw xcircle
@@ -1098,10 +1098,10 @@ ContinueToCheckMaxForce2
; $f3 - shift+key
notpressed
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
ldx TankNr ; for optimize
ldx TankNr ; for optimize
; Select and Option
lda CONSOL
tay
@@ -1127,7 +1127,7 @@ callActivation
jsr DefensivesActivate
jmp afterInventory
@
@
cmp #@kbcode._I ; $0d ; I
bne @+
callInventory
@@ -1137,9 +1137,9 @@ callInventory
mva #$ff isInventory
jsr Purchase
afterInventory
jsr MakeDarkScreen
jsr MakeDarkScreen
jsr DisplayStatus
jsr SetMainScreen
jsr SetMainScreen
jsr DrawTanks
;jsr WaitOneFrame ; not necessary
bit LazyFlag
@@ -1152,7 +1152,7 @@ NoLazy
NoSpyHard
RmtSong song_ingame
mva #0 escFlag
jmp ReleaseAndLoop
jmp ReleaseAndLoop
@
cmp #$80|@kbcode._up
jeq CTRLPressedUp
@@ -1163,13 +1163,13 @@ NoSpyHard
jumpFromStick
.IF TARGET = 800
cmp #$80|17 ; Ctrl+Help
bne NoVdebugSwitch
lda Vdebug
eor #$ff
sta Vdebug
jmp ReleaseAndLoop
NoVdebugSwitch
cmp #$80|17 ; Ctrl+Help
bne NoVdebugSwitch
lda Vdebug
eor #$ff
sta Vdebug
jmp ReleaseAndLoop
NoVdebugSwitch
.ENDIF
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._up ; $e
@@ -1189,10 +1189,10 @@ NoVdebugSwitch
cmp #@kbcode._S ; $3e ; S
jeq pressedS
.IF TARGET = 800
cmp #61 ; G
bne EndKeys
jsr SelectNextGradient.NotWind
jmp ReleaseAndLoop
cmp #61 ; G
bne EndKeys
jsr SelectNextGradient.NotWind
jmp ReleaseAndLoop
.ENDIF
EndKeys
jmp notpressed
@@ -1205,7 +1205,7 @@ checkJoy
cmp #$0f
beq notpressedJoy
tay
mva #0 ATRACT ; reset atract mode
mva #0 ATRACT ; reset atract mode
lda joyToKeyTable,y
jmp jumpFromStick
notpressedJoy
@@ -1221,14 +1221,14 @@ pressedUp
spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #25 ; 1/2s
bcs CTRLPressedUp
;force increaseeee!
;ldx TankNr ; optimized
inc ForceTableL,x
bne CheckingMaxForce
inc ForceTableH,x
CheckingMaxForce
mva #sfx_set_power_1 sfx_effect
@@ -1305,7 +1305,7 @@ pressedRight
mva #1 Erase
jsr DrawTankNr.BarrelChange
dec:lda AngleTable,x
cmp #255 ; -1
cmp #255 ; -1
jne BeforeFire
lda #180
sta AngleTable,x
@@ -1325,7 +1325,7 @@ CTRLPressedRight
lda #180
sta AngleTable,x
jmp BeforeFire
pressedLeft
;ldx TankNr ; optimized
@@ -1369,7 +1369,7 @@ pressedTAB
lda #first_offensive ; #0
sta ActiveWeapon,x
beq @+ ; allways = 0
?notlasttofirst
?notlasttofirst
inc ActiveWeapon,x
@
lda ActiveWeapon,x
@@ -1413,7 +1413,7 @@ pressedSpace
;=================================
;we shoot here!!!
lda #0
sta ATRACT ; reset atract mode
sta ATRACT ; reset atract mode
sta pressTimer ; reset
jsr WaitForKeyRelease.StillWait
lda pressTimer
@@ -1447,7 +1447,7 @@ RandomizeOffensiveText
ldy TankNr
mva #$ff plot4x4color
jsr DisplayOffensiveTextNr
AfterOffensiveText
mva #0 LaserFlag ; $ff - Laser
ldx TankNr
@@ -1477,7 +1477,7 @@ AfterStrongShoot
; to start where the tank's barrel ends
; (without it bullet would go from the left lower corner of the tank)
;ldx TankNr
mwa EndOfTheBarrelX xtraj+1
mva EndOfTheBarrely ytraj+1
lda #0
@@ -1535,12 +1535,12 @@ noSmokeTracer
sty SmokeTracerFlag
RepeatIfSmokeTracer
RepeatFlight
RepeatFlight
mwa ytraj+1 Ytrajold+1
mwa xtraj+1 Xtrajold+1
mva #%01000000 drawFunction
lda #0
lda #0
sta vx
sta vx+1
sta vx+2
@@ -1552,7 +1552,7 @@ RepeatFlight
;vx calculation
;vx = sin(90-Angle) for Angle <=90
;vx = -sin(Angle-90) for 90 < Angle <= 180
;vx = -sin(Angle-90) for 90 < Angle <= 180
aslw Force ;Force = Force * 2
;cos(Angle) (but we use sin table only so some shenanigans happen)
@@ -1565,10 +1565,10 @@ RepeatFlight
;180 horizontally left
; (we have to set goleft used in rolling weapons)
cpx #91
bcc angleUnder90
;over 90
mva #1 goleft
sec
@@ -1583,7 +1583,7 @@ angleUnder90
lda #90
sbc Angle
tax
@
@
lda sintable,x ; cos(X)
sta Multiplee ; *Force
mwa Force Multiplier
@@ -1610,9 +1610,9 @@ DoNotAdd
rol Multiplier+2
dex
bne MultiplyLoop
mva #0 vx+3
; here in vx there is a number
; here in vx there is a number
; xxxx.xx00 = sin(Angle)*Force
; negate it if going left
lda goleft
@@ -1627,7 +1627,7 @@ DoNotAdd
;vy = sin(Angle) for Angle <=90
;vy = sin(180-Angle) for 90 < Angle <= 180
lda #0
lda #0
sta vy
sta vy+1
sta vy+2
@@ -1635,7 +1635,7 @@ DoNotAdd
ldx Angle
cpx #91
bcc YangleUnder90
lda #180
sec
sbc Angle
@@ -1669,7 +1669,7 @@ DoNotAddY
rol Multiplier+2
dex
bne MultiplyLoopY
; here in vy there is a number
; here in vy there is a number
; yyyy.yy=cos(Angle)*Force
mva #0 vy+3 ;vy=cos(Angle)*Force
@@ -1757,12 +1757,12 @@ LaserNoWalls
nolaserwait
lda color
beq nonowait ; smoke tracer erases slowly
lda tracerflag
lda tracerflag
bne nowait ; funky bomb explotes fast ( tracerflag in real is funkyflag :) )
nonowait
nonowait
jsr shellDelay
;
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
ldx TankNr
;
@@ -1797,7 +1797,7 @@ SkipCollisionCheck
mwa xtraj+1 xdraw
mwa ytraj+1 ydraw
bit TestFlightFlag
bvc NoTestFlight
bit Vdebug
@@ -1807,7 +1807,7 @@ SkipCollisionCheck
NoTestFlight
lda tracerflag
bne NoUnPlot
YesUnPlot
jsr UnPlot
@@ -1837,7 +1837,7 @@ EndOfFlight
jmp SecondFlight
EndOfFlight2
mva #0 tracerflag ; don't know why
bit TestFlightFlag
jmi NoHitAtEndOfFight ; RTS only !!! - no defendsives check
; and now check for defensive-aggressive weapon
@@ -1861,7 +1861,7 @@ EndOfFlight2
lda ActiveWeapon,y
cmp #ind_Tracer ; defence not fire by tracers
beq JNoDefence
cmp #ind_Smoke_Tracer
cmp #ind_Smoke_Tracer
beq JNoDefence
cmp #ind_Laser ; Bouncy and Mag not fire by Laser
beq JNoDefence
@@ -1914,12 +1914,12 @@ NoTankHitAtEndOfFight
NoHitAtEndOfFight
NoDefence
lsrw Force ; Force = Force / 2 - because earlier we multiplied by 2
rts ; END !!!
rts ; END !!!
BouncyCastle
; now in Y we have number of of the attacking player (TankNr) !
lda ActiveWeapon,y
; if Bouncy Castle bounced Funky Bomb - whole screen in range of soil down
cmp #ind_Funky_Bomb
cmp #ind_Funky_Bomb
bne @+
jsr SetFullScreenSoilRange
@
@@ -1965,7 +1965,7 @@ BouncyCastle
; to start where the tank's barrel ends
; (without it bullet would go from the left lower corner of the tank)
;ldx TankNr
mwa EndOfTheBarrelX xtraj+1
mva EndOfTheBarrely ytraj+1
lda #0
@@ -1975,7 +1975,7 @@ BouncyCastle
sta ytraj
sta color
ldy #100 ; ???
mva #1 tracerflag ; I do not know (I mean I think I know ;) )
; 10 years later - I do not know!!!
@@ -2068,7 +2068,7 @@ mrLoopi
bne @+
ldx #0
@ stx MirvMissileCounter
; Y changes only for bullet number 0
; because rest of the bullets have the same Y (height)
@@ -2101,14 +2101,14 @@ mrLoopi
jsr ShellDelay
;
phx
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
bpl ExitnotPressed
plx
rts ; exit if pressed 'Exit keys'
ExitnotPressed
plx
;
MIRVdoNotChangeY
lda MirvDown,x ; if bullet is already down we go with the next one
@@ -2140,14 +2140,14 @@ MIRVdoNotChangeY
; if (Y>=0 and Y<=screenhight) and X<=screenwidth (bullet on the screen) - check collision
; if Y>screenhight and X>screenwidth (bullet under the screen on the left or right side) - stop flying without hit
; if Y>screenhight and X<=screenwidth (bullet under the screen) - check collision (allways hit)
; check bullet position and set flags:
; check bullet position and set flags:
; XposFlag - bullet positon X (0 - on screen , %1000000 - off-screen)
; YposFlag - bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
lda #$00
sta XposFlag
sta YposFlag
lda ytraj+2 ; Y high byte
lda ytraj+2 ; Y high byte
bpl @+
mva #%10000000 YposFlag ; bullet over the screen (Y)
bmi MIRVsetXflag
@@ -2341,13 +2341,13 @@ MakeBump
sec
lda #180
sbc LeapFrogAngle
sta LeapFrogAngle ; swap angle (LeapFrogAngle)
sta LeapFrogAngle ; swap angle (LeapFrogAngle)
inc FunkyWallFlag
rts
WrapAndNone
bvc NoWall
cpw xtraj+1 #screenwidth
bcc OnScreen
bcc OnScreen
; (wrapping wall)
inc FunkyWallFlag
bit xtraj+2
@@ -2431,7 +2431,7 @@ SelectNextTank
beq RepeatSpy
SpyHardEnd
mvx TargetTankNr TankNr ; restore
jsr DisplaySpyInfo
jsr DisplaySpyInfo
rts
.endp
.proc DisplaySpyInfo
@@ -2490,7 +2490,7 @@ EndLazy
bcc IsToHigh
sbc #12 ; tank with shield high correction
bne StoreMaxAlt
IsToHigh
IsToHigh
lda #18
StoreMaxAlt
sta FloatingAlt
@@ -2502,10 +2502,10 @@ StoreMaxAlt
jsr TypeLine4x4.variableLength
ldx TankNr
; TankNr in X reg.
; now animate Up
mva #0 modify ; it's a counter
mva #0 modify ; it's a counter
TankGoUp
lda ytankstable,x
cmp FloatingAlt ; Floating altitude
@@ -2576,7 +2576,7 @@ KeyboardAndJoyCheck
lda ShieldEnergy,x
cmp #20
bne LotOfFuel
; display text 4x4 - low fuel
jsr SetLowFuelText
jsr TypeLine4x4.variableLength
@@ -2590,7 +2590,7 @@ notpressed
; let's animate "engine"
jsr DrawTankEngine
; enimation ends
lda SKSTAT
cmp #$ff
jeq checkJoy
@@ -2616,7 +2616,7 @@ checkJoy
and #$0f
cmp #$0f
beq notpressedJoy
tay
tay
lda joyToKeyTable,y
jmp jumpFromStick
notpressedJoy
@@ -2635,11 +2635,11 @@ pressedRight
jsr ClearTankNr
mva #0 Erase
lda XtankstableH,x
cmp #>(screenwidth-TankWidth-4) ; tank width correction +4
cmp #>(screenwidth-TankWidth-4) ; tank width correction +4
bne @+
lda XtankstableL,x
cmp #<(screenwidth-TankWidth-4) ; tank width correction +4 pixels
@ bcs RightScreenEdge
cmp #<(screenwidth-TankWidth-4) ; tank width correction +4 pixels
@ bcs RightScreenEdge
inc XtankstableL,x
sne:inc XtankstableH,x
jmp NoREdge
@@ -2729,10 +2729,10 @@ CheckCollisionWithTankLoop
bne @+
cpy xdraw
@
bcs LeftFromTheTank
bcs LeftFromTheTank
tya ;add 20 (tank size*2 +2 and +2)
clc
adc #20
adc #20
tay
lda xtankstableH,x
adc #0
@@ -2828,7 +2828,7 @@ NotHighest
jsr SoilDown2
ldx TankNr
rts
CalculateSoildown
ldx TankNr
clc
@@ -2888,11 +2888,11 @@ CheckCollisionWithTankLoop
cmp #ind_Mag_Deflector ; first shielded weapon
bcc CheckCollisionWithNotShieldedTank
cmp #ind_Bouncy_Castle +1 ; last shielded weapon
bcc CheckCollisionWithShieldedTank ; tank with shield is bigger :)
bcc CheckCollisionWithShieldedTank ; tank with shield is bigger :)
;lda ShieldEnergy,x ; there is wrong method to check shield :)
;bne CheckCollisionWithShieldedTank ; tank with shield is bigger :)
CheckCollisionWithNotShieldedTank
lda xtankstableH,x
cmp xdraw+1
@@ -2944,10 +2944,10 @@ CheckCollisionWithShieldedTank
bne @+
cpy xdraw
@
bcs LeftFromTheTank
bcs LeftFromTheTank
tya ;add 16 double byte
clc
adc #TankWidth+4+4
adc #TankWidth+4+4
tay
lda xtankstableH,x
adc #0
@@ -3017,7 +3017,7 @@ CheckRangeRight
RangesChecked
rts
.endp
.endp
;--------------------------------------------------
.proc SetFullScreenSoilRange
@@ -3031,7 +3031,7 @@ RangesChecked
.endp
;--------------------------------------------------
.proc ClearScreenSoilRange
; cleanup of the soil fall down ranges (left and right)
; cleanup of the soil fall down ranges (left and right)
;--------------------------------------------------
mwa #screenwidth RangeLeft
lda #0
@@ -3072,7 +3072,7 @@ noBullets
.proc HowManyBullets
; in: A <-- Weapon number, TankNr
; out: A <-- How many bullets in the weapon, Y: weapon number
; how many bullets weapon of tank(TankNr) has, Result in A
; how many bullets weapon of tank(TankNr) has, Result in A
;--------------------------------------------------
tay
ldx TankNr
@@ -3080,11 +3080,10 @@ noBullets
sta weaponPointer
lda TanksWeaponsTableH,x
sta weaponPointer+1
lda (weaponPointer),y ; and we have number of bullets in A
rts
.endp
.ENDIF