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