mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
New PMG for 6 colored tanks
but colors not set to new scheme.
This commit is contained in:
+3
-1
@@ -59,18 +59,20 @@ lineClear
|
|||||||
dta d" ", $ff
|
dta d" ", $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 6 tanks
|
||||||
.by <(pmgraph+$400)
|
.by <(pmgraph+$400)
|
||||||
.by <(pmgraph+$500)
|
.by <(pmgraph+$500)
|
||||||
.by <(pmgraph+$600)
|
.by <(pmgraph+$600)
|
||||||
.by <(pmgraph+$700)
|
.by <(pmgraph+$700)
|
||||||
.by <(pmgraph+$300) ; this is a missile background
|
.by <(pmgraph+$300) ; this is a missile background
|
||||||
|
.by <(pmgraph+$300) ; this is a missile background
|
||||||
pmtableH
|
pmtableH
|
||||||
.by >(pmgraph+$400)
|
.by >(pmgraph+$400)
|
||||||
.by >(pmgraph+$500)
|
.by >(pmgraph+$500)
|
||||||
.by >(pmgraph+$600)
|
.by >(pmgraph+$600)
|
||||||
.by >(pmgraph+$700)
|
.by >(pmgraph+$700)
|
||||||
.by >(pmgraph+$300)
|
.by >(pmgraph+$300)
|
||||||
|
.by >(pmgraph+$300)
|
||||||
;-----------
|
;-----------
|
||||||
sintable
|
sintable
|
||||||
.by 0
|
.by 0
|
||||||
|
|||||||
+2
-1
@@ -7,7 +7,8 @@ margin = 40 ;mountain drawing Y variable margin
|
|||||||
display = $1010 ;screen takes $2K due to clearing routine
|
display = $1010 ;screen takes $2K due to clearing routine
|
||||||
MaxPlayers = 6
|
MaxPlayers = 6
|
||||||
maxOptions = 8 ;number of all options
|
maxOptions = 8 ;number of all options
|
||||||
PMOffset = $23 ; P/M to graphics offset
|
PMOffsetX = $2C ; P/M to graphics offset
|
||||||
|
PMOffsetY = $23 ; P/M to graphics offset
|
||||||
napalmRadius = 10
|
napalmRadius = 10
|
||||||
|
|
||||||
;Weapon prices (*10 on screen)
|
;Weapon prices (*10 on screen)
|
||||||
|
|||||||
+94
-16
@@ -611,10 +611,23 @@ DrawNextTank
|
|||||||
lda eXistenZ,x
|
lda eXistenZ,x
|
||||||
bne SkipHidingPM ; if energy=0 then no tank
|
bne SkipHidingPM ; if energy=0 then no tank
|
||||||
|
|
||||||
; hide P/M
|
; hide P/M
|
||||||
lda #0
|
lda #0
|
||||||
sta hposp0,x
|
cpx #$4 ; 5th tank is defferent
|
||||||
jmp DoNotDrawTankNr
|
bne No5thTankHide
|
||||||
|
sta hposp0+4
|
||||||
|
sta hposp0+5
|
||||||
|
beq @+
|
||||||
|
No5thTankHide
|
||||||
|
cpx #$5 ; 6th tank is defferent
|
||||||
|
bne No6thTankHide
|
||||||
|
sta hposp0+6
|
||||||
|
sta hposp0+7
|
||||||
|
beq @+
|
||||||
|
No6thTankHide
|
||||||
|
sta hposp0,x
|
||||||
|
@
|
||||||
|
jmp DoNotDrawTankNr
|
||||||
SkipHidingPM
|
SkipHidingPM
|
||||||
|
|
||||||
|
|
||||||
@@ -636,20 +649,31 @@ DrawTankNrX
|
|||||||
|
|
||||||
; now P/M graphics on the screen (only for 5 tanks)
|
; now P/M graphics on the screen (only for 5 tanks)
|
||||||
; horizontal position
|
; horizontal position
|
||||||
|
ldx TankNr
|
||||||
mwa xdraw xbyte
|
mwa xdraw xbyte
|
||||||
ldx tanknr
|
|
||||||
cpx #$5
|
|
||||||
bcs NoPlayerMissile
|
|
||||||
rorw xbyte ; divide by 2 (carry does not matter)
|
rorw xbyte ; divide by 2 (carry does not matter)
|
||||||
lda xbyte
|
lda xbyte
|
||||||
clc
|
clc
|
||||||
adc #PMOffset+1 ; P/M to graphics offset
|
adc #PMOffsetX ; P/M to graphics offset
|
||||||
cpx #$4 ; 5th tank are joined missiles and offset is defferent
|
cpx #$4 ; 5th tank are joined missiles and offset is defferent
|
||||||
bne NoMissile
|
bne No5thTank
|
||||||
clc
|
clc
|
||||||
adc #$0C ; missile offset offset
|
adc #$04 ; missile offset offset
|
||||||
NoMissile
|
sta hposp0+4
|
||||||
|
sta hposp0+5
|
||||||
|
bne NoMissile
|
||||||
|
No5thTank
|
||||||
|
cpx #$5 ; 6th tank are joined missiles and offset is defferent
|
||||||
|
bne Tanks1to4
|
||||||
|
clc
|
||||||
|
adc #$04 ; missile offset offset
|
||||||
|
sta hposp0+6
|
||||||
|
sta hposp0+7
|
||||||
|
bne NoMissile
|
||||||
|
Tanks1to4
|
||||||
sta hposp0,x
|
sta hposp0,x
|
||||||
|
|
||||||
|
NoMissile
|
||||||
; vertical position
|
; vertical position
|
||||||
lda pmtableL,x
|
lda pmtableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
@@ -659,26 +683,64 @@ NoMissile
|
|||||||
; calculate start position of the tank
|
; calculate start position of the tank
|
||||||
lda ydraw
|
lda ydraw
|
||||||
clc
|
clc
|
||||||
adc #PMOffset
|
adc #PMOffsetY
|
||||||
sta temp
|
sta temp
|
||||||
; clear sprite and put 3 lines on the tank at the same time
|
|
||||||
ldy #$00
|
ldy #$00
|
||||||
tya
|
cpx #$5
|
||||||
|
bcs PMForTank6
|
||||||
|
; clear sprite and put 3 lines on the tank at the same time
|
||||||
ClearPM
|
ClearPM
|
||||||
cpy temp
|
cpy temp
|
||||||
bne ZeroesToGo
|
bne ZeroesToGo
|
||||||
lda #$03 ; (2 bits set) we set on two pixels in three lines
|
lda (xbyte),y
|
||||||
|
and #%11110000 ; only for equal speeds
|
||||||
|
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%11110000 ; only for equal speeds
|
||||||
|
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%11110000 ; only for equal speeds
|
||||||
|
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
lda #$00
|
|
||||||
ZeroesToGo
|
ZeroesToGo
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%11110000 ; only for equal speeds
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
bne ClearPM
|
bne ClearPM
|
||||||
|
beq NoPlayerMissile
|
||||||
|
PMForTank6
|
||||||
|
; clear sprite and put 3 lines on the tank at the same time
|
||||||
|
ClearPM6
|
||||||
|
cpy temp
|
||||||
|
bne ZeroesToGo6
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%00001111
|
||||||
|
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
||||||
|
sta (xbyte),y
|
||||||
|
dey
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%00001111
|
||||||
|
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
||||||
|
sta (xbyte),y
|
||||||
|
dey
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%00001111
|
||||||
|
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
||||||
|
sta (xbyte),y
|
||||||
|
dey
|
||||||
|
ZeroesToGo6
|
||||||
|
lda (xbyte),y
|
||||||
|
and #%00001111
|
||||||
|
sta (xbyte),y
|
||||||
|
dey
|
||||||
|
bne ClearPM6
|
||||||
|
|
||||||
NoPlayerMissile
|
NoPlayerMissile
|
||||||
; draw defensive weapons like shield ( tank number in X )
|
; draw defensive weapons like shield ( tank number in X )
|
||||||
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||||
@@ -842,6 +904,22 @@ ShieldVisible
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc ClearPMmemory
|
||||||
|
;--------------------------------------------------
|
||||||
|
|
||||||
|
lda #$00
|
||||||
|
tay
|
||||||
|
@ sta pmgraph+$300,y
|
||||||
|
sta pmgraph+$400,y
|
||||||
|
sta pmgraph+$500,y
|
||||||
|
sta pmgraph+$600,y
|
||||||
|
sta pmgraph+$700,y
|
||||||
|
iny
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc drawmountains
|
.proc drawmountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|||||||
+5
-3
@@ -306,6 +306,7 @@ SettingEnergies
|
|||||||
;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
|
||||||
|
jsr ClearPMmemory
|
||||||
jsr placetanks ;let the tanks be evenly placed
|
jsr placetanks ;let the tanks be evenly placed
|
||||||
jsr calculatemountains ;let mountains be easy for the eye
|
jsr calculatemountains ;let mountains be easy for the eye
|
||||||
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
||||||
@@ -918,13 +919,14 @@ SetunPlots
|
|||||||
sta dmactls
|
sta dmactls
|
||||||
lda #$03 ; P/M on
|
lda #$03 ; P/M on
|
||||||
sta pmcntl
|
sta pmcntl
|
||||||
lda #$01
|
lda #$00
|
||||||
sta sizem ; there will be only M0, double width
|
|
||||||
sta sizep0 ; P0-P3 widths
|
sta sizep0 ; P0-P3 widths
|
||||||
sta sizep0+1
|
sta sizep0+1
|
||||||
sta sizep0+2
|
sta sizep0+2
|
||||||
sta sizep0+3
|
sta sizep0+3
|
||||||
lda #$10 ; P/M priorities (bit 4 joins missiles)
|
lda #%01010101
|
||||||
|
sta sizem ; all missiles, double width
|
||||||
|
lda #%00100000 ; P/M priorities (multicolor players on)
|
||||||
sta gtictls
|
sta gtictls
|
||||||
jsr PMoutofScreen
|
jsr PMoutofScreen
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user