Two sets of "gradient" selectable.

This commit is contained in:
Pecusx
2022-12-23 14:07:22 +01:00
parent d420ce06ca
commit 3936b2bf8c
7 changed files with 50 additions and 88 deletions
-57
View File
@@ -514,64 +514,7 @@ skipThisPlayer
lda tempor2 lda tempor2
rts rts
.endp .endp
/*
;----------------------------------------------
.proc FindBestTarget1
; find farthest tank neighbour
; X - shooting tank number
; returns target tank number in Y and
; direcion of shoot in A (0 - left, >0 - right)
;----------------------------------------------
jsr MakeLowResDistances
lda #$00
sta temp2 ; max possible distance
sta tempor2 ; direction of shoot
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
;enemy on the right
sec
lda LowResDistances,y
sbc LowResDistances,x
cmp temp2 ; bigest
bcc bigestIsBigger
sta temp2
sty temp2+1 ; number of the farthest tank
inc tempor2 ; set direction to right
bne bigestIsBigger
EnemyOnTheLeft
sec
lda LowResDistances,x
sbc LowResDistances,y
cmp temp2 ; lowest
bcc bigestIsBigger
sta temp2
sty temp2+1 ; number of the farthest tank
bigestIsBigger
skipThisPlayer
dey
bpl loop01
; 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 x distance divided by 8
ldy temp2+1
lda tempor2
rts
.endp
*/
;---------------------------------------------- ;----------------------------------------------
.proc TakeAim .proc TakeAim
; targeting the tank number TargetTankNr (and Y) ; targeting the tank number TargetTankNr (and Y)
+5
View File
@@ -63,6 +63,11 @@ TankColoursTable .BYTE $58,$2a,$96,$ca,$7a,$ed
;TankStatusColoursTable .BYTE $54,$24,$92,$c4,$74,$e4 ; standard order ;TankStatusColoursTable .BYTE $54,$24,$92,$c4,$74,$e4 ; standard order
TankStatusColoursTable .BYTE $74,$c4,$24,$e4,$54,$94 ; Adam's order TankStatusColoursTable .BYTE $74,$c4,$24,$e4,$54,$94 ; Adam's order
;----------- ;-----------
GradientAddrL
.by <dliColorsFore, <dliColorsFore, <(Sintable+40)
GradientAddrH
.by >dliColorsFore, >dliColorsFore, >(Sintable+40)
pmtableL ; addressess of the P/M memory for 6 tanks pmtableL ; addressess of the P/M memory for 6 tanks
.by <(pmgraph+$400) .by <(pmgraph+$400)
.by <(pmgraph+$500) .by <(pmgraph+$500)
+9 -2
View File
@@ -26,9 +26,11 @@
;--------------------------------------------------- ;---------------------------------------------------
icl 'definitions.asm' icl 'definitions.asm'
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $5E FirstZpageVariable = $5B
.zpvar DliColorBack .byte = FirstZpageVariable .zpvar DliColorBack .byte = FirstZpageVariable
.zpvar Gradient .byte .zpvar Gradient .byte
.zpvar GradientNr .byte
.zpvar GradientColors .word
.zpvar JoystickNumber .byte .zpvar JoystickNumber .byte
.zpvar xdraw .word ;= $64 ;variable X for plot .zpvar xdraw .word ;= $64 ;variable X for plot
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
@@ -250,6 +252,11 @@ FirstSTART
dey dey
bpl @- bpl @-
; initialize one Variable in zero page :)
lda #<dliColorsFore
sta GradientColors
lda #>dliColorsFore
sta GradientColors+1
; generate linetables ; generate linetables
mwa #display temp mwa #display temp
@@ -1196,7 +1203,7 @@ GoGradient
; nop ; nop
.ENDIF .ENDIF
sta COLPF1 sta COLPF1
lda dliColorsFore,y ; mountains colors array lda (GradientColors),y ; mountains colors array
; lda dliColorsFore ; one mauntain color ; lda dliColorsFore ; one mauntain color
sta COLPF2 sta COLPF2
inc dliCounter inc dliCounter
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+16 -1
View File
@@ -114,9 +114,24 @@ OptionsNoRight
OptionsNoReturn OptionsNoReturn
cmp #@kbcode._tab ; Tab key cmp #@kbcode._tab ; Tab key
bne OptionsNoTab bne OptionsNoTab
bit Gradient
bmi NextGradientNr
lda Gradient lda Gradient
eor #$80 @ eor #$80
sta Gradient sta Gradient
NextGradientNr
ldy GradientNr
iny
cpy #$03
bne NoGradientLoop
mva #$ff GradientNr
bne @-
NoGradientLoop
sty GradientNr
lda GradientAddrL,y
sta GradientColors
lda GradientAddrH,y
sta GradientColors+1
OptionsNoTab OptionsNoTab
jmp OptionsMainLoop jmp OptionsMainLoop
.endp .endp
+20 -28
View File
@@ -76,25 +76,29 @@ CheckNextTankBFG
.proc babymissile .proc babymissile
mva #sfx_baby_missile sfx_effect mva #sfx_baby_missile sfx_effect
mva #11 ExplosionRadius mva #11 ExplosionRadius
GoXmissile
jmp xmissile jmp xmissile
.endp .endp
; ------------------------ ; ------------------------
.proc missile ; .proc missile ;
mva #sfx_baby_missile sfx_effect mva #sfx_baby_missile sfx_effect
mva #17 ExplosionRadius mva #17 ExplosionRadius
jmp xmissile bne babymissile.GoXmissile
; jmp xmissile
.endp .endp
; ------------------------ ; ------------------------
.proc babynuke .proc babynuke
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
mva #25 ExplosionRadius mva #25 ExplosionRadius
jmp xmissile bne babymissile.GoXmissile
; jmp xmissile
.endp .endp
; ------------------------ ; ------------------------
.proc nuke .proc nuke
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
mva #30 ExplosionRadius mva #30 ExplosionRadius
jmp xmissile bne babymissile.GoXmissile
; jmp xmissile
.endp .endp
; ------------------------ ; ------------------------
.proc leapfrog .proc leapfrog
@@ -221,19 +225,13 @@ NoWallsInFunky
.proc deathshead .proc deathshead
mva #30 ExplosionRadius mva #30 ExplosionRadius
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
SaveDrawXY jsr GoXmissileWithSaveXYdraw
jsr xmissile
UnSaveDrawXY
sbw xdraw #34 sbw xdraw #34
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
SaveDrawXY jsr GoXmissileWithSaveXYdraw
jsr xmissile
UnSaveDrawXY
adw xdraw #68 adw xdraw #68
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
SaveDrawXY jsr GoXmissileWithSaveXYdraw
jsr xmissile
UnSaveDrawXY
sbw xdraw #34 sbw xdraw #34
; ;
sbw ydraw #34 sbw ydraw #34
@@ -241,28 +239,22 @@ NoWallsInFunky
cpw ydraw #screenHeight cpw ydraw #screenHeight
bcs NoUpperCircle bcs NoUpperCircle
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
SaveDrawXY jsr GoXmissileWithSaveXYdraw
jsr xmissile
UnSaveDrawXY
NoUpperCircle NoUpperCircle
adw ydraw #68 adw ydraw #68
;jsr CalculateExplosionRange ;jsr CalculateExplosionRange
cpw ydraw #screenHeight cpw ydraw #screenHeight
bcs NoLowerCircle bcs NoLowerCircle
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
SaveDrawXY jsr GoXmissileWithSaveXYdraw
jsr xmissile
UnSaveDrawXY
NoLowerCircle NoLowerCircle
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
rts rts
.endp
.proc SaveDrawXY GoXmissileWithSaveXYdraw
mwa xdraw tempXROLLER mwa xdraw tempXROLLER
mwa ydraw modify mwa ydraw modify
rts jsr xmissile
.endp
.proc UnSaveDrawXY
mwa tempXROLLER xdraw mwa tempXROLLER xdraw
mwa modify ydraw mwa modify ydraw
rts rts
@@ -273,7 +265,7 @@ NoLowerCircle
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width) mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
jsr CalculateExplosionRange jsr CalculateExplosionRange
mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
jmp xnapalm beq xnapalm
.endp .endp
; ------------------------ ; ------------------------
.proc hotnapalm .proc hotnapalm
@@ -281,7 +273,7 @@ NoLowerCircle
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width) mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
jsr CalculateExplosionRange jsr CalculateExplosionRange
mva #1 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm mva #1 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
jmp xnapalm ; jmp xnapalm
.endp .endp
; ------------------------ ; ------------------------
.proc xnapalm .proc xnapalm
@@ -420,7 +412,7 @@ EndNurnedCheckLoop
mva #0 sandhogflag mva #0 sandhogflag
mva #13 DigLong mva #13 DigLong
mva #1 diggery ; how many branches (-1) mva #1 diggery ; how many branches (-1)
jmp xdigger bne xdigger
.endp .endp
; ------------------------ ; ------------------------
.proc digger ; .proc digger ;
@@ -428,7 +420,7 @@ EndNurnedCheckLoop
mva #0 sandhogflag mva #0 sandhogflag
mva #13 DigLong mva #13 DigLong
mva #3 diggery ; how many branches (-1) mva #3 diggery ; how many branches (-1)
jmp xdigger bne xdigger
.endp .endp
; ------------------------ ; ------------------------
.proc heavydigger .proc heavydigger
@@ -436,7 +428,7 @@ EndNurnedCheckLoop
mva #0 sandhogflag mva #0 sandhogflag
mva #13 DigLong mva #13 DigLong
mva #7 diggery ; how many branches (-1) mva #7 diggery ; how many branches (-1)
jmp xdigger ; jmp xdigger
.endp .endp
; ------------------------ ; ------------------------
.proc xdigger .proc xdigger