build 133

This commit is contained in:
2022-04-03 18:10:47 -04:00
parent d343426b63
commit 73c0b86b90
7 changed files with 118 additions and 98 deletions
+15 -18
View File
@@ -7,7 +7,7 @@
;----------------------------------------------------- ;-----------------------------------------------------
PurchaseDL PurchaseDL
.byte $70,$70,$20 .byte $70,$70,$20
.byte $42 .byte $42+$80
.word textbuffer2 .word textbuffer2
.byte $02,$10,$42 .byte $02,$10,$42
MoreUpdl MoreUpdl
@@ -29,7 +29,8 @@ OptionsDL
:5 .byte $70 :5 .byte $70
.byte $42 .byte $42
.word OptionsScreen .word OptionsScreen
.byte $30,$02,$02,$70,$02,0,$02,0,$2,0,$2,0,$2 .byte $30,$02,$02,$70
:maxOptions .by $02,0
.byte $41 .byte $41
.word OptionsDL .word OptionsDL
;------------------------ ;------------------------
@@ -46,18 +47,14 @@ NameDL
; ------------------------------------------------- ; -------------------------------------------------
dl ; MAIN game display list dl ; MAIN game display list
.byte $70,$00 .byte 0
.byte $42 .byte $42
.word textbuffer .word textbuffer
.byte $02 +$80 ;DLI .byte $02, $02 +$80 ;DLI
.byte $00 .byte $00
.byte $4f
.word WhiteLine
.byte $4f .byte $4f
.word PlotLine .word PlotLine
.byte $4f
.word WhiteLine
.byte $4f .byte $4f
.word display .word display
@@ -69,24 +66,22 @@ dl ; MAIN game display list
:97 .byte $0f :97 .byte $0f
.byte $41 .byte $41
.word dl .word dl
; horizontal line
WhiteLine
:screenBytes .by $ff
PlotLine = display + screenHeight*screenBytes ; the last line is plot pointer PlotLine = display + screenHeight*screenBytes ; the last line is plot pointer
;----------------------------------------------- ;-----------------------------------------------
;Screen displays go first to avoid crossing 4kb barrier ;Screen displays go first to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
OptionsScreen OptionsScreen
dta d"Welcome to Scorch ver. 132 (un)2000-2022" dta d"Welcome to Scorch ver. 133 (un)2000-2022"
dta d" Please select option with cursor keys " dta d" Please select option with cursor keys "
dta d" and press (Return) to proceed " dta d" and press (Return) to proceed "
OptionsHere OptionsHere
; 0123456789012345678901234567890123456789 ; 0123456789012345678901234567890123456789
dta d"Players : 2 3 4 5 6 " dta d"Players : 2 3 4 5 6 "
dta d"Cash : none 2K 5K 8K 10K " dta d"Cash : none 2K 5K 8K 10K "
dta d"Gravity : 0.2G 0.5G 1G 2G 4G " dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
dta d"Wind : 1B 3B 5B 7B 9B " dta d"Wind : 1B 3B 5B 7B 9B "
dta d"Rounds : 10 20 30 40 50 " dta d"Rounds : 10 20 30 40 50 "
dta d"Shells : slug slow norm fast hare "
OptionsScreenEnd OptionsScreenEnd
; ------------------------------------------------- ; -------------------------------------------------
NameScreen NameScreen
@@ -138,8 +133,10 @@ EmptyLine
dta d" " dta d" "
;----------------------------------------------- ;-----------------------------------------------
textbuffer textbuffer
; 0123456789012345678901234567890123456789
dta d"Player: " dta d"Player: "
dta d" " dta d"Energy: 99 Angle: <32> Force: 1000 "
dta d" Round: 50 Wind: <22> "
textbuffer2 textbuffer2
dta d"Player: ******** Cash: 00000 " dta d"Player: ******** Cash: 00000 "
dta d"----------------------------------------" dta d"----------------------------------------"
+1 -1
View File
@@ -674,7 +674,7 @@ NoMissile
; calculate start position of the tank ; calculate start position of the tank
lda ydraw lda ydraw
clc clc
adc #$25 ; P/M to graphics offset adc #PMOffset
sta temp sta temp
; clear sprite and put 3 lines on the tank at the same time ; clear sprite and put 3 lines on the tank at the same time
ldy #$00 ldy #$00
+17 -31
View File
@@ -73,13 +73,14 @@
displayposition = modify displayposition = modify
;------------------------------- ;-------------------------------
;constants ;constants
FlyDelay = 150
screenheight = 200 screenheight = 200
screenBytes = 40 screenBytes = 40
screenwidth = screenBytes*8 ; Max screenwidth = 512!!! screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
margin = 48 ;mountain drawing Y variable margin margin = 48 ;mountain drawing Y variable margin
display = $1010 ;kill dos with the casette recorder! display = $1010 ;kill dos with the casette recorder!
MaxPlayers = 6 MaxPlayers = 6
maxOptions = 6 ;number of all options
PMOffset = $23 ; P/M to graphics offset
icl 'lib/atari.hea' icl 'lib/atari.hea'
icl 'lib/macro.hea' icl 'lib/macro.hea'
@@ -91,12 +92,6 @@ MaxPlayers = 6
;Screen displays go first to avoid crossing 4kb barrier ;Screen displays go first to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
icl 'display.asm' icl 'display.asm'
;----------------------------------------------
icl 'constants.asm'
icl 'variables.asm'
;--------------------------------------------------
OffensiveTexts
icl 'artwork/talk.asm'
;-------------------------------------------------- ;--------------------------------------------------
; Game Code ; Game Code
;-------------------------------------------------- ;--------------------------------------------------
@@ -139,9 +134,10 @@ START
MainGameLoop MainGameLoop
VDLI DLIinterrupt ; jsr SetDLI
jsr CallPurchaseForEveryTank jsr CallPurchaseForEveryTank
jsr SetDLI
mwa #dl dlptrs mwa #dl dlptrs
lda dmactls lda dmactls
and #$fc and #$fc
@@ -251,6 +247,7 @@ Round .proc ;
; the default shooting angle to 45 degrees ; the default shooting angle to 45 degrees
; of course gains an looses are zeroed ; of course gains an looses are zeroed
jsr DisplayingSymbols
lda #0 lda #0
tax tax
@ @
@@ -479,7 +476,7 @@ LP0
BCC B0 BCC B0
CLC CLC
ADC #10 ; multiplication by 10 ADC #10 ; multiplication by 10
B0 DEy B0 DEY
BNE LP0 BNE LP0
ror ror
ROR L1 ROR L1
@@ -613,8 +610,6 @@ PlayerXdeath .proc
jmp AfterExplode jmp AfterExplode
icl 'weapons.asm'
;-------------------------------------------------- ;--------------------------------------------------
DecreaseEnergyX .proc DecreaseEnergyX .proc
;Decreases energy of player nr X ;Decreases energy of player nr X
@@ -734,19 +729,10 @@ deletePtr = temp
cpw deletePtr #variablesEnd cpw deletePtr #variablesEnd
bne @- bne @-
lda #2
sta OptionsTable+2
sta OptionsTable+3
mwa #1024 RandBoundaryHigh mwa #1024 RandBoundaryHigh
mva #$ff LastWeapon mva #$ff LastWeapon
sta HowMuchToFall sta HowMuchToFall
mva #1 color mva #1 color
mva #$40 MaxWind
mwa #$0080 Wind
mva #25 gravity
jsr WeaponCleanup jsr WeaponCleanup
@@ -820,10 +806,6 @@ ClearResults
rts rts
.endp .endp
SetDLI .proc
VDLI DLIinterrupt
rts
.endp
DLIinterrupt .proc DLIinterrupt .proc
pha pha
lda #$02 ; color of playground lda #$02 ; color of playground
@@ -865,9 +847,9 @@ GetRandomAgainX
stx temp stx temp
ldy temp ldy temp
UsageLoop UsageLoop
cmp TankSequence,y cmp TankSequence,y
beq GetRandomAgainX ;apparently we have already used this value beq GetRandomAgainX ;apparently we have already used this value
dey dey
bpl UsageLoop bpl UsageLoop
;well, looks like this value is new! ;well, looks like this value is new!
@@ -914,7 +896,6 @@ RandomizeForce .proc
; RandBoundaryHigh ; RandBoundaryHigh
;---------------------------------------------- ;----------------------------------------------
lda MaxEnergyTableL,x lda MaxEnergyTableL,x
sta temp sta temp
lda MaxEnergyTableH,x lda MaxEnergyTableH,x
@@ -939,7 +920,6 @@ GetRandomAgain
mwa temp temp2 mwa temp temp2
EnergyInRange EnergyInRange
lda temp2 lda temp2
sta EnergyTableL,x sta EnergyTableL,x
lda temp2+1 lda temp2+1
@@ -1121,10 +1101,14 @@ WaitForKeyRelease .proc
lda SKSTAT lda SKSTAT
cmp #$ff cmp #$ff
bne WaitForKeyRelease bne WaitForKeyRelease
KeyIsReleased
rts rts
.endp .endp
;----------------------------------------------
OffensiveTexts
icl 'artwork/talk.asm'
;----------------------------------------------
icl 'weapons.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'textproc.asm' icl 'textproc.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -1132,8 +1116,10 @@ KeyIsReleased
;---------------------------------------------- ;----------------------------------------------
icl 'ai.asm' icl 'ai.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'constants.asm'
;----------------------------------------------
icl 'variables.asm'
TankColoursTable .BYTE $52,$32,$72,$92,$B2,$02
font4x4 font4x4
ins 'artwork/font4x4s.bmp',+62 ins 'artwork/font4x4s.bmp',+62
BIN
View File
Binary file not shown.
+60 -25
View File
@@ -14,7 +14,7 @@ Options .proc
; this function returns: ; this function returns:
; - number of players (NumberOfPlayers) ; - number of players (NumberOfPlayers)
; - money each player has on the beginning of the game (moneyL i moneyH) ; - money each player has on the beginning of the game (moneyL i moneyH)
; - and I am sure maxwind, gravity, no_of_rounds in a game ; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
mva #0 OptionsY mva #0 OptionsY
@@ -103,6 +103,11 @@ OptionsFinished
lda RoundsTable,y lda RoundsTable,y
sta RoundsInTheGame sta RoundsInTheGame
;6th option (shell speed)
ldy OptionsTable+5
lda flyDelayTable,y
sta flyDelay
rts rts
;-------- ;--------
; inversing selected option (cursor) ; inversing selected option (cursor)
@@ -131,7 +136,7 @@ OptionsSetMainLoop
asl asl
adc OptionsTable,x ;OptionsTable value * 5 adc OptionsTable,x ;OptionsTable value * 5
tay tay
ldx #4 ldx #MaxOptions-1
OptionSetLoop OptionSetLoop
lda (temp),y lda (temp),y
ora #$80 ora #$80
@@ -180,7 +185,6 @@ OptionsYLoop
;------------------------------------------- ;-------------------------------------------
; call of the purchase screens for each tank ; call of the purchase screens for each tank
.proc CallPurchaseForEveryTank .proc CallPurchaseForEveryTank
mva #$2 colpf2s ; set normal color
mwa #PurchaseDL dlptrs mwa #PurchaseDL dlptrs
lda dmactls lda dmactls
and #$fc and #$fc
@@ -218,6 +222,10 @@ AfterManualPurchase
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
jsr PMoutofScreen jsr PMoutofScreen
ldx tankNr
lda TankColoursTable,x
sta colpf2s
; we are clearing list of the weapons ; we are clearing list of the weapons
mva #$ff LastWeapon mva #$ff LastWeapon
mva #$00 WhichList mva #$00 WhichList
@@ -820,16 +828,35 @@ NoArrowDown
mwa #(NameScreen+41) displayposition mwa #(NameScreen+41) displayposition
jsr displaybyte jsr displaybyte
jsr SelectLevel ; setting choosen level of the opponent (Moron, etc) jsr SelectLevel ; setting choosen level of the opponent (Moron, etc)
; clear the name and place cursor at position 0
; clear tank name editor field
ldx #8
lda #0 lda #0
sta PositionInName @ sta NameAdr,x
ldx #$08 ; one more because cursor could be there dex
LoopName01 bpl @-
sta NameAdr,x
dex ; copy existing name and place cursor at end
bne LoopName01 lda TankNr
lda #$80 ; place cursor on the beginning :3 asl
sta NameAdr tax
ldy #0
@ lda TanksNames,x
beq endOfTankName
sta NameAdr,y
inx
iny
cpy #8
bne @-
endOfTankName
lda #$80 ; place cursor on the end
sta NameAdr,y
sty PositionInName
CheckKeys CheckKeys
jsr getkey jsr getkey
; is the char to be recorded? ; is the char to be recorded?
@@ -1492,7 +1519,7 @@ FinishResultDisplay
lda Energy,x lda Energy,x
sta decimal sta decimal
mwa #textbuffer+40 displayposition mwa #textbuffer+48 displayposition
jsr displaybyte jsr displaybyte
;--------------------- ;---------------------
;displaying quantity of the given weapon ;displaying quantity of the given weapon
@@ -1535,7 +1562,7 @@ loop06
sta decimal sta decimal
lda EnergyTableH,x lda EnergyTableH,x
sta decimal+1 sta decimal+1
mwa #textbuffer+63 displayposition mwa #textbuffer+40+34 displayposition
jsr displaydec jsr displaydec
;========================= ;=========================
@@ -1547,9 +1574,9 @@ loop06
lda AngleTable,x lda AngleTable,x
bmi AngleToLeft bmi AngleToLeft
lda #$7f ; (tab) character lda #$7f ; (tab) character
sta textbuffer+52 sta textbuffer+40+23
lda #0 ;space lda #0 ;space
sta textbuffer+49 sta textbuffer+40+20
lda #90 lda #90
sec sec
sbc AngleTable,x sbc AngleTable,x
@@ -1557,7 +1584,7 @@ loop06
tay tay
lda BarrelTableR,y lda BarrelTableR,y
sta CharCode sta CharCode
jmp AngleDisplay ;like jp, because code always <>0 bne AngleDisplay ;like jmp, because code always <>0
AngleToLeft AngleToLeft
sec sec
sbc #(255-90) sbc #(255-90)
@@ -1566,12 +1593,12 @@ AngleToLeft
lda BarrelTableL,y lda BarrelTableL,y
sta CharCode sta CharCode
lda #$7e ;(del) char lda #$7e ;(del) char
sta textbuffer+49 sta textbuffer+40+20
lda #0 ;space lda #0 ;space
sta textbuffer+52 sta textbuffer+40+23
AngleDisplay AngleDisplay
mwa #textbuffer+50 displayposition mwa #textbuffer+40+21 displayposition
jsr displaybyte jsr displaybyte
@@ -1581,15 +1608,15 @@ AngleDisplay
lda WindOrientation lda WindOrientation
bne DisplayLeftWind bne DisplayLeftWind
lda #$7f ; (tab) char lda #$7f ; (tab) char
sta textbuffer+79 sta textbuffer+80+28
lda #0 ;space lda #0 ;space
sta textbuffer+76 sta textbuffer+80+25
beq DisplayWindValue beq DisplayWindValue
DisplayLeftWind DisplayLeftWind
lda #$7e ;(del) char lda #$7e ;(del) char
sta textbuffer+76 sta textbuffer+80+25
lda #0 ;space lda #0 ;space
sta textbuffer+79 sta textbuffer+80+28
DisplayWindValue DisplayWindValue
mwa Wind temp mwa Wind temp
lsrw temp ;divide by 16 to have lsrw temp ;divide by 16 to have
@@ -1598,8 +1625,16 @@ DisplayWindValue
lsrw temp lsrw temp
lda temp lda temp
sta decimal sta decimal
mwa #textbuffer+77 displayposition mwa #textbuffer+80+26 displayposition
jsr displaybyte jsr displaybyte
;display round number
lda CurrentRoundNr
sta decimal
mwa #textbuffer+80+14 displayposition
jsr displaybyte ;decimal (byte), displayposition (word)
rts rts
.endp .endp
;------------------------------------------------- ;-------------------------------------------------
+10 -5
View File
@@ -10,9 +10,18 @@
;===================================================== ;=====================================================
;-------------------------------------------------- ;--------------------------------------------------
;Variables ;Variables
;--------------
TanksNames ; DO NOT ZERO - ticket #24
:6 dta d" "
;----------------------------
;Options DO NOT ZERO - ticket #27
OptionsTable .by 0,0,2,2,0,1
;-------------------------------------------------- ;--------------------------------------------------
variablesStart ; zeroing starts here variablesStart ; zeroing starts here
;--------------
OptionsY .ds 0 ;vertical position of cursor on Options screen
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 - it was the last round in the game GameIsOver .DS 1 ; 1 - it was the last round in the game
@@ -358,10 +367,6 @@ CharCode4x4 .DS 1
plot4x4color .DS 1 ;1-white, 0-background plot4x4color .DS 1 ;1-white, 0-background
;----------------------------
;Options
OptionsTable .ds 5
OptionsY .DS 1 ;vertical position of cursor on Options screen
variablesEnd variablesEnd
;---------------------------- ;----------------------------
+13 -16
View File
@@ -1648,18 +1648,8 @@ LWindToRight
bne nowait bne nowait
lda color lda color
beq nowait beq nowait
;wait
;this is where program slows down the flight of a missile jsr shellDelay
;possibly it is too slow to wait till next frame...
;we will see.
;---2003-08-01 yes, it is too slow!!! shorter delay
; must be here like few sta wsync's
; half a frame would be the best...
ldx #FlyDelay
DelayLoop
sta wsync
dex
bne DelayLoop
nowait nowait
lda HitFlag lda HitFlag
@@ -1879,9 +1869,7 @@ mrLoopix
sbc #0 sbc #0
sta vy+3 sta vy+3
; 2 waits for 5 bullets jsr ShellDelay
wait
;wait ; speeded up build 131
MIRVdoNotChangeY MIRVdoNotChangeY
@@ -2249,7 +2237,16 @@ HowManyBullets .proc
rts rts
.endp .endp
;--------------------------------------------------
ShellDelay .proc
ldx flyDelay
DelayLoop
sta wsync
sta wsync
dex
bne DelayLoop
rts
.endp
.ENDIF .ENDIF