mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Two sets of "gradient" selectable.
This commit is contained in:
@@ -514,64 +514,7 @@ skipThisPlayer
|
||||
lda tempor2
|
||||
rts
|
||||
.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
|
||||
; targeting the tank number TargetTankNr (and Y)
|
||||
|
||||
@@ -63,6 +63,11 @@ TankColoursTable .BYTE $58,$2a,$96,$ca,$7a,$ed
|
||||
;TankStatusColoursTable .BYTE $54,$24,$92,$c4,$74,$e4 ; standard 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
|
||||
.by <(pmgraph+$400)
|
||||
.by <(pmgraph+$500)
|
||||
|
||||
+9
-2
@@ -26,9 +26,11 @@
|
||||
;---------------------------------------------------
|
||||
icl 'definitions.asm'
|
||||
;---------------------------------------------------
|
||||
FirstZpageVariable = $5E
|
||||
FirstZpageVariable = $5B
|
||||
.zpvar DliColorBack .byte = FirstZpageVariable
|
||||
.zpvar Gradient .byte
|
||||
.zpvar GradientNr .byte
|
||||
.zpvar GradientColors .word
|
||||
.zpvar JoystickNumber .byte
|
||||
.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)
|
||||
@@ -250,6 +252,11 @@ FirstSTART
|
||||
dey
|
||||
bpl @-
|
||||
|
||||
; initialize one Variable in zero page :)
|
||||
lda #<dliColorsFore
|
||||
sta GradientColors
|
||||
lda #>dliColorsFore
|
||||
sta GradientColors+1
|
||||
|
||||
; generate linetables
|
||||
mwa #display temp
|
||||
@@ -1196,7 +1203,7 @@ GoGradient
|
||||
; nop
|
||||
.ENDIF
|
||||
sta COLPF1
|
||||
lda dliColorsFore,y ; mountains colors array
|
||||
lda (GradientColors),y ; mountains colors array
|
||||
; lda dliColorsFore ; one mauntain color
|
||||
sta COLPF2
|
||||
inc dliCounter
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+16
-1
@@ -114,9 +114,24 @@ OptionsNoRight
|
||||
OptionsNoReturn
|
||||
cmp #@kbcode._tab ; Tab key
|
||||
bne OptionsNoTab
|
||||
bit Gradient
|
||||
bmi NextGradientNr
|
||||
lda Gradient
|
||||
eor #$80
|
||||
@ eor #$80
|
||||
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
|
||||
jmp OptionsMainLoop
|
||||
.endp
|
||||
|
||||
+20
-28
@@ -76,25 +76,29 @@ CheckNextTankBFG
|
||||
.proc babymissile
|
||||
mva #sfx_baby_missile sfx_effect
|
||||
mva #11 ExplosionRadius
|
||||
GoXmissile
|
||||
jmp xmissile
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc missile ;
|
||||
mva #sfx_baby_missile sfx_effect
|
||||
mva #17 ExplosionRadius
|
||||
jmp xmissile
|
||||
bne babymissile.GoXmissile
|
||||
; jmp xmissile
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc babynuke
|
||||
mva #sfx_nuke sfx_effect
|
||||
mva #25 ExplosionRadius
|
||||
jmp xmissile
|
||||
bne babymissile.GoXmissile
|
||||
; jmp xmissile
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc nuke
|
||||
mva #sfx_nuke sfx_effect
|
||||
mva #30 ExplosionRadius
|
||||
jmp xmissile
|
||||
bne babymissile.GoXmissile
|
||||
; jmp xmissile
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc leapfrog
|
||||
@@ -221,19 +225,13 @@ NoWallsInFunky
|
||||
.proc deathshead
|
||||
mva #30 ExplosionRadius
|
||||
mva #sfx_nuke sfx_effect
|
||||
SaveDrawXY
|
||||
jsr xmissile
|
||||
UnSaveDrawXY
|
||||
jsr GoXmissileWithSaveXYdraw
|
||||
sbw xdraw #34
|
||||
mva #sfx_nuke sfx_effect
|
||||
SaveDrawXY
|
||||
jsr xmissile
|
||||
UnSaveDrawXY
|
||||
jsr GoXmissileWithSaveXYdraw
|
||||
adw xdraw #68
|
||||
mva #sfx_nuke sfx_effect
|
||||
SaveDrawXY
|
||||
jsr xmissile
|
||||
UnSaveDrawXY
|
||||
jsr GoXmissileWithSaveXYdraw
|
||||
sbw xdraw #34
|
||||
;
|
||||
sbw ydraw #34
|
||||
@@ -241,28 +239,22 @@ NoWallsInFunky
|
||||
cpw ydraw #screenHeight
|
||||
bcs NoUpperCircle
|
||||
mva #sfx_nuke sfx_effect
|
||||
SaveDrawXY
|
||||
jsr xmissile
|
||||
UnSaveDrawXY
|
||||
jsr GoXmissileWithSaveXYdraw
|
||||
NoUpperCircle
|
||||
adw ydraw #68
|
||||
;jsr CalculateExplosionRange
|
||||
cpw ydraw #screenHeight
|
||||
bcs NoLowerCircle
|
||||
mva #sfx_nuke sfx_effect
|
||||
SaveDrawXY
|
||||
jsr xmissile
|
||||
UnSaveDrawXY
|
||||
jsr GoXmissileWithSaveXYdraw
|
||||
NoLowerCircle
|
||||
mva #sfx_silencer sfx_effect
|
||||
rts
|
||||
.endp
|
||||
.proc SaveDrawXY
|
||||
|
||||
GoXmissileWithSaveXYdraw
|
||||
mwa xdraw tempXROLLER
|
||||
mwa ydraw modify
|
||||
rts
|
||||
.endp
|
||||
.proc UnSaveDrawXY
|
||||
jsr xmissile
|
||||
mwa tempXROLLER xdraw
|
||||
mwa modify ydraw
|
||||
rts
|
||||
@@ -273,7 +265,7 @@ NoLowerCircle
|
||||
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
||||
jsr CalculateExplosionRange
|
||||
mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
||||
jmp xnapalm
|
||||
beq xnapalm
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc hotnapalm
|
||||
@@ -281,7 +273,7 @@ NoLowerCircle
|
||||
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
||||
jsr CalculateExplosionRange
|
||||
mva #1 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
||||
jmp xnapalm
|
||||
; jmp xnapalm
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc xnapalm
|
||||
@@ -420,7 +412,7 @@ EndNurnedCheckLoop
|
||||
mva #0 sandhogflag
|
||||
mva #13 DigLong
|
||||
mva #1 diggery ; how many branches (-1)
|
||||
jmp xdigger
|
||||
bne xdigger
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc digger ;
|
||||
@@ -428,7 +420,7 @@ EndNurnedCheckLoop
|
||||
mva #0 sandhogflag
|
||||
mva #13 DigLong
|
||||
mva #3 diggery ; how many branches (-1)
|
||||
jmp xdigger
|
||||
bne xdigger
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc heavydigger
|
||||
@@ -436,7 +428,7 @@ EndNurnedCheckLoop
|
||||
mva #0 sandhogflag
|
||||
mva #13 DigLong
|
||||
mva #7 diggery ; how many branches (-1)
|
||||
jmp xdigger
|
||||
; jmp xdigger
|
||||
.endp
|
||||
; ------------------------
|
||||
.proc xdigger
|
||||
|
||||
Reference in New Issue
Block a user