mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
almost done #74
This commit is contained in:
+11
-19
@@ -23,7 +23,6 @@ RoundsTable .by 10,20,30,40,50
|
|||||||
flyDelayTable .by 255,150,75,35,1
|
flyDelayTable .by 255,150,75,35,1
|
||||||
seppukuTable .by 255, 45,25,15,9
|
seppukuTable .by 255, 45,25,15,9
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
|
|
||||||
LevelNameBeginL ; begins of level names
|
LevelNameBeginL ; begins of level names
|
||||||
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
|
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
|
||||||
.by <(NamesOfLevels+32),<(NamesOfLevels+42),<(NamesOfLevels+52)
|
.by <(NamesOfLevels+32),<(NamesOfLevels+42),<(NamesOfLevels+52)
|
||||||
@@ -37,31 +36,25 @@ TanksWeaponsTableL
|
|||||||
.by <TanksWeapon1,<TanksWeapon2,<TanksWeapon3,<TanksWeapon4,<TanksWeapon5,<TanksWeapon6
|
.by <TanksWeapon1,<TanksWeapon2,<TanksWeapon3,<TanksWeapon4,<TanksWeapon5,<TanksWeapon6
|
||||||
TanksWeaponsTableH
|
TanksWeaponsTableH
|
||||||
.by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6
|
.by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6
|
||||||
;-----4x4 texts-----
|
|
||||||
|
|
||||||
|
;-----4x4 texts-----
|
||||||
LineTop
|
LineTop
|
||||||
dta d"(%%%%%%%%%%%%)"
|
dta d"(%%%%%%%%%%%%)", $ff
|
||||||
.byte $ff
|
|
||||||
;# - vertical, () * +, % - horizontal
|
;# - vertical, () * +, % - horizontal
|
||||||
LineBottom
|
LineBottom
|
||||||
dta d"*%%%%%%%%%%%%+"
|
dta d"*%%%%%%%%%%%%+", $ff
|
||||||
.byte $ff
|
|
||||||
LineEmpty
|
LineEmpty
|
||||||
dta d"# #"
|
dta d"# #", $ff
|
||||||
.byte $ff
|
|
||||||
LineHeader2
|
LineHeader2
|
||||||
dta d"# RESULTS #"
|
dta d"# RESULTS #", $ff
|
||||||
.byte $ff
|
|
||||||
LineGameOver
|
LineGameOver
|
||||||
dta d"# GAME OVER #"
|
dta d"# GAME OVER #", $ff
|
||||||
.byte $ff
|
|
||||||
seppukuText
|
seppukuText
|
||||||
dta d"# SEPPUKU! #"
|
dta d"# SEPPUKU! #", $ff
|
||||||
.byte $ff
|
areYouSureText
|
||||||
|
dta d"# SURE? Y/N #", $ff
|
||||||
lineClear
|
lineClear
|
||||||
dta d" "
|
dta d" ", $ff
|
||||||
.byte $ff
|
|
||||||
|
|
||||||
|
|
||||||
;-----------
|
;-----------
|
||||||
pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background)
|
pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background)
|
||||||
@@ -541,8 +534,8 @@ EndOfTheBarrelY
|
|||||||
.by 7,7,7,7,7,7,7,7,7
|
.by 7,7,7,7,7,7,7,7,7
|
||||||
.by 7,7,7,7,7,7,7,7,7,7
|
.by 7,7,7,7,7,7,7,7,7,7
|
||||||
.by 7,7,7,7,7,7,7,7,7,7,7
|
.by 7,7,7,7,7,7,7,7,7,7,7
|
||||||
;-------------------------------------------------
|
|
||||||
|
|
||||||
|
;-------------------------------------------------
|
||||||
TanksNamesDefault
|
TanksNamesDefault
|
||||||
dta d"1st.Tank"
|
dta d"1st.Tank"
|
||||||
dta d"2nd.Tank"
|
dta d"2nd.Tank"
|
||||||
@@ -551,7 +544,6 @@ TanksNamesDefault
|
|||||||
dta d"5th.Tank"
|
dta d"5th.Tank"
|
||||||
dta d"6th.Tank"
|
dta d"6th.Tank"
|
||||||
|
|
||||||
|
|
||||||
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||||
.by >price_Baby_Missile___
|
.by >price_Baby_Missile___
|
||||||
.by >price_Missile________
|
.by >price_Missile________
|
||||||
|
|||||||
+46
-48
@@ -98,6 +98,7 @@
|
|||||||
icl 'lib/atari.hea'
|
icl 'lib/atari.hea'
|
||||||
icl 'lib/macro.hea'
|
icl 'lib/macro.hea'
|
||||||
|
|
||||||
|
;splash screen and musix
|
||||||
icl 'artwork/HIMARS14.asm'
|
icl 'artwork/HIMARS14.asm'
|
||||||
;Game loading address
|
;Game loading address
|
||||||
ORG $3000
|
ORG $3000
|
||||||
@@ -117,13 +118,14 @@ START
|
|||||||
; Startup sequence
|
; Startup sequence
|
||||||
jsr Initialize
|
jsr Initialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jsr Options ;startup screen
|
jsr Options ;startup screen
|
||||||
lda escFlag
|
lda escFlag
|
||||||
bne START
|
bne START
|
||||||
|
|
||||||
jsr EnterPlayerNames
|
jsr EnterPlayerNames
|
||||||
|
lda escFlag
|
||||||
|
bne START
|
||||||
|
|
||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
@@ -144,6 +146,9 @@ MainGameLoop
|
|||||||
jsr RoundInit
|
jsr RoundInit
|
||||||
|
|
||||||
jsr MainRoundLoop
|
jsr MainRoundLoop
|
||||||
|
lda escFlag
|
||||||
|
bne START
|
||||||
|
|
||||||
mva #0 TankNr ;
|
mva #0 TankNr ;
|
||||||
|
|
||||||
jsr SortSequence
|
jsr SortSequence
|
||||||
@@ -248,51 +253,46 @@ skipzeroing
|
|||||||
; the shooting angle is randomized
|
; the shooting angle is randomized
|
||||||
; of course gains an looses are zeroed
|
; of course gains an looses are zeroed
|
||||||
|
|
||||||
;jsr StatusDisplay
|
|
||||||
lda #0
|
lda #0
|
||||||
tax
|
tax
|
||||||
@
|
@ sta singleRoundVars,x
|
||||||
sta singleRoundVars,x
|
inx
|
||||||
inx
|
cpx #(singleRoundVarsEnd-singleRoundVars)
|
||||||
cpx #(singleRoundVarsEnd-singleRoundVars)
|
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
ldx #(MaxPlayers-1)
|
ldx #(MaxPlayers-1)
|
||||||
SettingEnergies
|
SettingEnergies
|
||||||
lda #$00
|
lda #$00
|
||||||
sta gainL,x
|
sta gainL,x
|
||||||
sta gainH,x
|
sta gainH,x
|
||||||
sta looseL,x
|
sta looseL,x
|
||||||
sta looseH,x
|
sta looseH,x
|
||||||
lda #99
|
lda #99
|
||||||
sta Energy,x
|
sta Energy,x
|
||||||
sta eXistenZ,x
|
sta eXistenZ,x
|
||||||
sta LASTeXistenZ,x
|
sta LASTeXistenZ,x
|
||||||
; anything in eXistenZ table means that this tank exist
|
; anything in eXistenZ table means that this tank exist
|
||||||
; in the given round
|
; in the given round
|
||||||
lda #<1000
|
lda #<1000
|
||||||
sta MaxForceTableL,x
|
sta MaxForceTableL,x
|
||||||
lda #>1000
|
lda #>1000
|
||||||
sta MaxForceTableH,x
|
sta MaxForceTableH,x
|
||||||
lda #<350
|
lda #<350
|
||||||
sta ForceTableL,x
|
sta ForceTableL,x
|
||||||
lda #>350
|
lda #>350
|
||||||
sta ForceTableH,x
|
sta ForceTableH,x
|
||||||
|
|
||||||
;lda #(255-45)
|
;lda #(255-45)
|
||||||
;it does not look good when all tanks have
|
;it does not look good when all tanks have
|
||||||
;barrels pointing the same direction
|
;barrels pointing the same direction
|
||||||
;so it would be nice to have more or less random
|
;so it would be nice to have more or less random
|
||||||
;angles
|
;angles
|
||||||
jsr RandomizeAngle
|
jsr RandomizeAngle
|
||||||
sta AngleTable,x
|
sta AngleTable,x
|
||||||
|
|
||||||
|
dex
|
||||||
dex
|
|
||||||
bpl SettingEnergies
|
bpl SettingEnergies
|
||||||
|
|
||||||
mva #0 CurrentResult
|
|
||||||
|
|
||||||
;generating the new landscape
|
;generating the new landscape
|
||||||
jsr PMoutofScreen ;let P/M disappear
|
jsr PMoutofScreen ;let P/M disappear
|
||||||
jsr clearscreen ;let the screen be clean
|
jsr clearscreen ;let the screen be clean
|
||||||
@@ -344,8 +344,7 @@ WhichTankWonLoop
|
|||||||
bne ThisOneWon
|
bne ThisOneWon
|
||||||
dex
|
dex
|
||||||
bpl WhichTankWonLoop
|
bpl WhichTankWonLoop
|
||||||
;error here!!!
|
;error was here!!!
|
||||||
;stop
|
|
||||||
; somehow I believed program will be never here
|
; somehow I believed program will be never here
|
||||||
; but it was a bad assumption
|
; but it was a bad assumption
|
||||||
; god knows when there is such a situation
|
; god knows when there is such a situation
|
||||||
@@ -409,6 +408,8 @@ ManualShooting
|
|||||||
|
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
jsr BeforeFire
|
jsr BeforeFire
|
||||||
|
lda escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
AfterManualShooting
|
AfterManualShooting
|
||||||
inc noDeathCounter
|
inc noDeathCounter
|
||||||
@@ -768,16 +769,12 @@ PMoutofScreen .proc
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc Initialize
|
.proc Initialize
|
||||||
;Initialization sequence
|
;Initialization sequence
|
||||||
|
;uses: temp, ...
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
deletePtr = temp
|
deletePtr = temp
|
||||||
|
|
||||||
lda #0
|
|
||||||
sta Erase
|
|
||||||
sta tracerflag
|
|
||||||
sta GameIsOver
|
|
||||||
sta escFlag
|
|
||||||
|
|
||||||
; clean variables
|
; clean variables
|
||||||
|
lda #0
|
||||||
tay
|
tay
|
||||||
mwa #variablesStart deletePtr
|
mwa #variablesStart deletePtr
|
||||||
@ tya
|
@ tya
|
||||||
@@ -1185,7 +1182,8 @@ nextishigher
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc getkey ; waits for pressing a key and returns pressed value in A
|
.proc GetKey ; waits for pressing a key and returns pressed value in A
|
||||||
|
; when [ESC] is pressed, escFlag is set to 1
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
@
|
@
|
||||||
|
|||||||
BIN
Binary file not shown.
+65
-1
@@ -218,6 +218,8 @@ OptionsYLoop
|
|||||||
|
|
||||||
ManualPurchase
|
ManualPurchase
|
||||||
jsr Purchase
|
jsr Purchase
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
AfterManualPurchase
|
AfterManualPurchase
|
||||||
|
|
||||||
inc:lda TankNr
|
inc:lda TankNr
|
||||||
@@ -556,6 +558,8 @@ ChoosingItemForPurchase
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr PutLitteChar ; Places pointer at the right position
|
jsr PutLitteChar ; Places pointer at the right position
|
||||||
jsr getkey
|
jsr getkey
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
cmp #$2c ; Tab
|
cmp #$2c ; Tab
|
||||||
jeq ListChange
|
jeq ListChange
|
||||||
cmp #$0c ; Return
|
cmp #$0c ; Return
|
||||||
@@ -838,7 +842,7 @@ NoArrowDown
|
|||||||
sta colpf2s ; set color of player name line
|
sta colpf2s ; set color of player name line
|
||||||
jsr EnterPlayerName
|
jsr EnterPlayerName
|
||||||
lda escFlag
|
lda escFlag
|
||||||
jne START
|
seq:rts
|
||||||
inc TankNr
|
inc TankNr
|
||||||
lda TankNr
|
lda TankNr
|
||||||
cmp NumberOfPlayers
|
cmp NumberOfPlayers
|
||||||
@@ -1366,6 +1370,66 @@ EndOfTypeLine4x4
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
.proc AreYouSure
|
||||||
|
;using 4x4 font
|
||||||
|
|
||||||
|
;save vars (messed in TypeLine4x4)
|
||||||
|
mwa Xdraw xk
|
||||||
|
mva Ydraw yc
|
||||||
|
|
||||||
|
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
||||||
|
|
||||||
|
;top frame
|
||||||
|
mwa #LineTop LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
;seppuku
|
||||||
|
mwa #areYouSureText LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
;bottom frame
|
||||||
|
mwa #LineBottom LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
|
||||||
|
jsr GetKey
|
||||||
|
cmp #$2b ; "Y"
|
||||||
|
bne @+
|
||||||
|
mva #1 escFlag
|
||||||
|
bne skip01
|
||||||
|
@ mva #0 escFlag
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
skip01
|
||||||
|
|
||||||
|
;clean
|
||||||
|
mva #3 dx
|
||||||
|
mva #4 ResultY
|
||||||
|
@
|
||||||
|
mva #1 plot4x4color
|
||||||
|
mwa #lineClear LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
dec dx
|
||||||
|
bne @-
|
||||||
|
|
||||||
|
|
||||||
|
quit_areyousure
|
||||||
|
;restore vars
|
||||||
|
mva yc Ydraw
|
||||||
|
mwa xk Xdraw
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
.proc DisplaySeppuku
|
.proc DisplaySeppuku
|
||||||
;using 4x4 font
|
;using 4x4 font
|
||||||
|
|||||||
+48
-46
@@ -8,35 +8,30 @@
|
|||||||
; compilation to e.g. cartridge
|
; compilation to e.g. cartridge
|
||||||
; zero page variables are declared in program.s65 module
|
; zero page variables are declared in program.s65 module
|
||||||
;=====================================================
|
;=====================================================
|
||||||
;--------------------------------------------------
|
|
||||||
;Variables
|
|
||||||
;--------------
|
|
||||||
TanksNames ; DO NOT ZERO - ticket #24
|
TanksNames ; DO NOT ZERO - ticket #24
|
||||||
:6 dta d" "
|
:6 dta d" "
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
;Options DO NOT ZERO - ticket #27
|
;Options DO NOT ZERO - ticket #27
|
||||||
OptionsTable .by 0,0,2,2,0,1,3
|
OptionsTable .by 0,0,2,2,0,1,3
|
||||||
RoundsInTheGame .by 10 ;how many rounds in the current game
|
RoundsInTheGame .by 10 ;how many rounds in the current game
|
||||||
seppukuVal .by 75
|
seppukuVal .by 75
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
|
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
; 4x4 text buffer
|
; 4x4 text buffer
|
||||||
ResultLineBuffer
|
ResultLineBuffer
|
||||||
dta d" "
|
dta d" ", $ff
|
||||||
.byte $ff
|
|
||||||
LineHeader1
|
LineHeader1
|
||||||
dta d"# ROUND: "
|
dta d"# ROUND: "
|
||||||
RoundNrDisplay
|
RoundNrDisplay
|
||||||
dta d" #"
|
dta d" #", $ff
|
||||||
.byte $ff
|
|
||||||
|
|
||||||
|
;=====================================================
|
||||||
variablesStart ; zeroing starts here
|
variablesStart ; zeroing starts here
|
||||||
|
;=====================================================
|
||||||
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
;--------------
|
;--------------
|
||||||
escFlag .ds 1
|
|
||||||
;--------------
|
|
||||||
sfx_effect .ds 1
|
sfx_effect .ds 1
|
||||||
;--------------
|
;--------------
|
||||||
noDeathCounter .ds 1
|
noDeathCounter .ds 1
|
||||||
@@ -47,28 +42,28 @@ flyDelay .ds 1
|
|||||||
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
||||||
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
||||||
GameIsOver .DS 1 ; 1 means it was the last round in the game
|
GameIsOver .DS 1 ; 1 means it was the last round in the game
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
moneyH ;we place zero at the end of prices and money
|
moneyH ;we place zero at the end of prices and money
|
||||||
;and have range from 0 to 99990 (not too much)
|
;and have range from 0 to 99990 (not too much)
|
||||||
;money players have (maybe one more byte is needed?)
|
;money players have (maybe one more byte is needed?)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
moneyL
|
moneyL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
gainH ;how much money player gets after the round
|
gainH ;how much money player gets after the round
|
||||||
;it is gathered during the round basing on energy
|
;it is gathered during the round basing on energy
|
||||||
;opponents loose after player's shoots
|
;opponents loose after player's shoots
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
gainL
|
gainL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
looseH ;how much player looses after the round
|
looseH ;how much player looses after the round
|
||||||
;calculated from REAL energy loss
|
;calculated from REAL energy loss
|
||||||
;(not only to zero energy)
|
;(not only to zero energy)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
looseL
|
looseL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
Energy
|
Energy
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
EnergyDecrease .DS 1
|
EnergyDecrease .DS 1
|
||||||
@@ -81,9 +76,7 @@ ResultsTable ;the results in the gameeeeee
|
|||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
TempResults
|
TempResults
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
CurrentResult
|
;----------------------------------------------------
|
||||||
.DS 1
|
|
||||||
;-----------------------------------
|
|
||||||
ForceTableL ;shooting Force of the tank during the round
|
ForceTableL ;shooting Force of the tank during the round
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
ForceTableH
|
ForceTableH
|
||||||
@@ -93,36 +86,36 @@ MaxForceTableL ;Energy of the tank during the round
|
|||||||
.DS [MaxPlayers] ;1000 is the default
|
.DS [MaxPlayers] ;1000 is the default
|
||||||
MaxForceTableH
|
MaxForceTableH
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
AngleTable ;Angle of the barrel of each tank during the round
|
AngleTable ;Angle of the barrel of each tank during the round
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
NewAngle .DS 1
|
NewAngle .DS 1
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
ActiveWeapon ;number of the selected weapon
|
ActiveWeapon ;number of the selected weapon
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
;format of the 3-byte static point number used in the game
|
;format of the 3-byte static point number used in the game
|
||||||
; 20203.5 => 128 : <20203 : >20203
|
; 20203.5 => 128 : <20203 : >20203
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
L1 .DS 1 ; variable used in multiplications (by 10:)
|
L1 .DS 1 ; variable used in multiplications (by 10:)
|
||||||
gravity .DS 1 ;only the decimal part (1/10 = 25)
|
gravity .DS 1 ;only the decimal part (1/10 = 25)
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
Wind .ds 4 ;format: 0000.hhll
|
Wind .ds 4 ;format: 0000.hhll
|
||||||
;walue displayed on the screen is
|
;walue displayed on the screen is
|
||||||
;decimal portion divided by 16 (>>4)
|
;decimal portion divided by 16 (>>4)
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
MaxWind .ds 1 ;
|
MaxWind .ds 1 ;
|
||||||
WindOrientation .DS 1 ;(0-right,1-left)
|
WindOrientation .DS 1 ;(0-right,1-left)
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
Counter .DS 1 ;temporary Counter for outside loops
|
Counter .DS 1 ;temporary Counter for outside loops
|
||||||
HitFlag .DS 1 ;1 when missile hit anything
|
HitFlag .DS 1 ;1 when missile hit anything
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
xtankstableL ;X positions of tanks (lower left point)
|
xtankstableL ;X positions of tanks (lower left point)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
xtankstableH
|
xtankstableH
|
||||||
@@ -131,17 +124,17 @@ ytankstable ;Y positions of tanks (lower left point)
|
|||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
|
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
Erase .DS 1 ; if 1 only mask of the character is printed
|
Erase .DS 1 ; if 1 only mask of the character is printed
|
||||||
; on the graphics screen. if 0 character is printed normally
|
; on the graphics screen. if 0 character is printed normally
|
||||||
|
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
RangeLeft .DS 2 ;range of the soil to be fallen down
|
RangeLeft .DS 2 ;range of the soil to be fallen down
|
||||||
RangeRight .DS 2 ;it is being set by all Explosions
|
RangeRight .DS 2 ;it is being set by all Explosions
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon
|
WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon
|
||||||
WeaponRangeRight .DS 2
|
WeaponRangeRight .DS 2
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
;xroller
|
;xroller
|
||||||
HowMuchToFall .ds 1
|
HowMuchToFall .ds 1
|
||||||
HeightRol .DS 1
|
HeightRol .DS 1
|
||||||
@@ -181,7 +174,7 @@ IfFallDown .DS 1
|
|||||||
PreviousFall .DS 1
|
PreviousFall .DS 1
|
||||||
EndOfTheFallFlag .DS 1 ; in case of the infinite fall
|
EndOfTheFallFlag .DS 1 ; in case of the infinite fall
|
||||||
Parachute .DS 1 ; are you insured with parachute?
|
Parachute .DS 1 ; are you insured with parachute?
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Flight
|
;Flight
|
||||||
;variables for 5 missiles (used for mirv)
|
;variables for 5 missiles (used for mirv)
|
||||||
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
|
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
|
||||||
@@ -196,7 +189,7 @@ MirvMissileCounter .DS 1 ; missile Counter (mainly for X)
|
|||||||
SmokeTracerFlag .DS 1 ; if Smoketracer
|
SmokeTracerFlag .DS 1 ; if Smoketracer
|
||||||
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
|
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
|
||||||
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
|
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;CheckCollisionWithTank
|
;CheckCollisionWithTank
|
||||||
vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA)
|
vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA)
|
||||||
vy .ds 4 ;0,0,0,0
|
vy .ds 4 ;0,0,0,0
|
||||||
@@ -209,10 +202,10 @@ Force .ds 3 ; 0,0,0
|
|||||||
Multiplier .ds 3 ; 0,0,0
|
Multiplier .ds 3 ; 0,0,0
|
||||||
Multiplee .ds 2 ; 0,0
|
Multiplee .ds 2 ; 0,0
|
||||||
goleft .DS 1 ;if 1 then flights left
|
goleft .DS 1 ;if 1 then flights left
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
;SoilDown2
|
;SoilDown2
|
||||||
IsEndOfTheFallFlag .DS 1
|
IsEndOfTheFallFlag .DS 1
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;unPlot
|
;unPlot
|
||||||
WhichUnPlot .DS 1
|
WhichUnPlot .DS 1
|
||||||
; max 5 concurrent unPlots
|
; max 5 concurrent unPlots
|
||||||
@@ -226,7 +219,7 @@ xtrajfb .DS 2
|
|||||||
ytrajfb .DS 2
|
ytrajfb .DS 2
|
||||||
;
|
;
|
||||||
tracerflag .DS 1
|
tracerflag .DS 1
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;TypeChar
|
;TypeChar
|
||||||
mask1 .DS [8]
|
mask1 .DS [8]
|
||||||
mask2 .DS [8]
|
mask2 .DS [8]
|
||||||
@@ -244,7 +237,7 @@ UpNdown .DS 1
|
|||||||
temptankX .DS 2
|
temptankX .DS 2
|
||||||
temptankNr .DS 1
|
temptankNr .DS 1
|
||||||
|
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Variables from textproc.s65
|
;Variables from textproc.s65
|
||||||
; tables with numbers of weapons on the right lists
|
; tables with numbers of weapons on the right lists
|
||||||
; to be honest - I do not know at the moment what the above
|
; to be honest - I do not know at the moment what the above
|
||||||
@@ -254,7 +247,7 @@ NubersOfWeaponsL1
|
|||||||
.ds 8*5 ; :(8*5) .by $ff
|
.ds 8*5 ; :(8*5) .by $ff
|
||||||
NubersOfWeaponsL2
|
NubersOfWeaponsL2
|
||||||
.ds 8*2 ; :(8*2) .by $ff
|
.ds 8*2 ; :(8*2) .by $ff
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
; variables storing amount of weapons on the first and second
|
; variables storing amount of weapons on the first and second
|
||||||
; list and pointer position
|
; list and pointer position
|
||||||
@@ -277,14 +270,14 @@ WhichList ; list currently on the screen
|
|||||||
OffsetDL1 ; offset of the list screen (how many lines)....
|
OffsetDL1 ; offset of the list screen (how many lines)....
|
||||||
.DS 1
|
.DS 1
|
||||||
|
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
;mark the level
|
;mark the level
|
||||||
PositionInName ; cursor position in name of the player when name input
|
PositionInName ; cursor position in name of the player when name input
|
||||||
.DS 1
|
.DS 1
|
||||||
DifficultyLevel ; Difficulty Level (human/cpu)
|
DifficultyLevel ; Difficulty Level (human/cpu)
|
||||||
.DS 1
|
.DS 1
|
||||||
;-------------------------------------------------
|
;----------------------------------------------------
|
||||||
;displaydecimal
|
;displaydecimal
|
||||||
decimal .DS 2
|
decimal .DS 2
|
||||||
decimalresult .DS 4
|
decimalresult .DS 4
|
||||||
@@ -299,7 +292,7 @@ FallDown2 .DS 1
|
|||||||
LeapFrogAngle .DS 1
|
LeapFrogAngle .DS 1
|
||||||
;laser
|
;laser
|
||||||
LaserCoordinate .DS 8 ; 2,2,2,2
|
LaserCoordinate .DS 8 ; 2,2,2,2
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
; Here go tables with weapons possesed by a given tank
|
; Here go tables with weapons possesed by a given tank
|
||||||
; Index in the table means weapon type
|
; Index in the table means weapon type
|
||||||
; number entered means ammo for given weapon possessed (max 99)
|
; number entered means ammo for given weapon possessed (max 99)
|
||||||
@@ -326,7 +319,7 @@ mountaintable2 ;table of mountains (size=screenwidth)
|
|||||||
.DS [screenwidth]
|
.DS [screenwidth]
|
||||||
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
|
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
|
||||||
MountaintableEnd ;good for table clearing
|
MountaintableEnd ;good for table clearing
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
TextPositionX .DS 2
|
TextPositionX .DS 2
|
||||||
TextPositionY .DS 1
|
TextPositionY .DS 1
|
||||||
TextAddress .DS 2
|
TextAddress .DS 2
|
||||||
@@ -335,8 +328,16 @@ TextNumberOff .DS 1
|
|||||||
;--------------
|
;--------------
|
||||||
TankTempY
|
TankTempY
|
||||||
.DS 1
|
.DS 1
|
||||||
|
;----------------------------------------------------
|
||||||
;-------------- single round variables --------------
|
;-------------- single round variables --------------
|
||||||
|
;----------------------------------------------------
|
||||||
singleRoundVars
|
singleRoundVars
|
||||||
|
;--------------
|
||||||
|
escFlag .ds 1
|
||||||
|
;--------------
|
||||||
|
CurrentResult
|
||||||
|
.DS 1
|
||||||
|
;--------------
|
||||||
previousAngle
|
previousAngle
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
previousEnergyL
|
previousEnergyL
|
||||||
@@ -354,9 +355,9 @@ RandBoundaryHigh
|
|||||||
AngleTablePointer
|
AngleTablePointer
|
||||||
.DS 1
|
.DS 1
|
||||||
singleRoundVarsEnd
|
singleRoundVarsEnd
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
; 4x4 texts
|
; 4x4 texts
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
LineAddress4x4
|
LineAddress4x4
|
||||||
.DS 2
|
.DS 2
|
||||||
LineCharNr
|
LineCharNr
|
||||||
@@ -374,8 +375,9 @@ ResultY
|
|||||||
ResultOfTankNr
|
ResultOfTankNr
|
||||||
.DS 1
|
.DS 1
|
||||||
|
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
;PutChar4x4
|
;PutChar4x4
|
||||||
|
;----------------------------------------------------
|
||||||
LoopCounter4x4 .DS 1
|
LoopCounter4x4 .DS 1
|
||||||
y4x4 .DS 1
|
y4x4 .DS 1
|
||||||
StoreA4x4 .DS 1
|
StoreA4x4 .DS 1
|
||||||
@@ -387,6 +389,6 @@ plot4x4color .DS 1 ;1-white, 0-background
|
|||||||
|
|
||||||
|
|
||||||
variablesEnd
|
variablesEnd
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
+17
-10
@@ -1016,7 +1016,17 @@ notpressed
|
|||||||
beq checkJoy
|
beq checkJoy
|
||||||
|
|
||||||
lda kbcode
|
lda kbcode
|
||||||
and #$Bf
|
and #%10111111 ; SHIFT elimination
|
||||||
|
|
||||||
|
cmp #28 ; ESC
|
||||||
|
bne @+
|
||||||
|
jsr AreYouSure
|
||||||
|
lda escFlag
|
||||||
|
beq notpressed
|
||||||
|
;---esc pressed-quit game---
|
||||||
|
rts
|
||||||
|
|
||||||
|
@
|
||||||
cmp #$8e
|
cmp #$8e
|
||||||
jeq CTRLPressedUp
|
jeq CTRLPressedUp
|
||||||
cmp #$8f
|
cmp #$8f
|
||||||
@@ -1104,9 +1114,9 @@ pressedDown
|
|||||||
dec ForceTableH,x
|
dec ForceTableH,x
|
||||||
bpl @+
|
bpl @+
|
||||||
ForceGoesZero
|
ForceGoesZero
|
||||||
lda #0
|
lda #0
|
||||||
sta ForceTableH,x
|
sta ForceTableH,x
|
||||||
sta ForceTableL,x
|
sta ForceTableL,x
|
||||||
@
|
@
|
||||||
jmp BeforeFire
|
jmp BeforeFire
|
||||||
|
|
||||||
@@ -1571,17 +1581,14 @@ RepeatIfSmokeTracer
|
|||||||
tax
|
tax
|
||||||
sta Angle
|
sta Angle
|
||||||
|
|
||||||
;
|
|
||||||
mva #1 goleft
|
|
||||||
; and now we contine as if nothing happened
|
; and now we contine as if nothing happened
|
||||||
; (but we have goleft set to 1!!!)
|
; (but we have goleft set to 1!!!)
|
||||||
bne dontzerogoleft
|
mva #1 goleft
|
||||||
|
bne @+
|
||||||
|
|
||||||
FlightRight
|
FlightRight
|
||||||
mva #0 goleft
|
mva #0 goleft
|
||||||
|
@
|
||||||
dontzerogoleft
|
|
||||||
|
|
||||||
lda sintable,x ;sin(Angle)
|
lda sintable,x ;sin(Angle)
|
||||||
sta Multiplee ;sin(Angle)*Force
|
sta Multiplee ;sin(Angle)*Force
|
||||||
mwa Force Multiplier
|
mwa Force Multiplier
|
||||||
|
|||||||
Reference in New Issue
Block a user