mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +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
|
||||
|
||||
;-----------
|
||||
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+$500)
|
||||
.by <(pmgraph+$600)
|
||||
.by <(pmgraph+$700)
|
||||
.by <(pmgraph+$300) ; this is a missile background
|
||||
.by <(pmgraph+$300) ; this is a missile background
|
||||
pmtableH
|
||||
.by >(pmgraph+$400)
|
||||
.by >(pmgraph+$500)
|
||||
.by >(pmgraph+$600)
|
||||
.by >(pmgraph+$700)
|
||||
.by >(pmgraph+$300)
|
||||
.by >(pmgraph+$300)
|
||||
;-----------
|
||||
sintable
|
||||
.by 0
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ margin = 40 ;mountain drawing Y variable margin
|
||||
display = $1010 ;screen takes $2K due to clearing routine
|
||||
MaxPlayers = 6
|
||||
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
|
||||
|
||||
;Weapon prices (*10 on screen)
|
||||
|
||||
+94
-16
@@ -611,10 +611,23 @@ DrawNextTank
|
||||
lda eXistenZ,x
|
||||
bne SkipHidingPM ; if energy=0 then no tank
|
||||
|
||||
; hide P/M
|
||||
lda #0
|
||||
sta hposp0,x
|
||||
jmp DoNotDrawTankNr
|
||||
; hide P/M
|
||||
lda #0
|
||||
cpx #$4 ; 5th tank is defferent
|
||||
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
|
||||
|
||||
|
||||
@@ -636,20 +649,31 @@ DrawTankNrX
|
||||
|
||||
; now P/M graphics on the screen (only for 5 tanks)
|
||||
; horizontal position
|
||||
ldx TankNr
|
||||
mwa xdraw xbyte
|
||||
ldx tanknr
|
||||
cpx #$5
|
||||
bcs NoPlayerMissile
|
||||
rorw xbyte ; divide by 2 (carry does not matter)
|
||||
lda xbyte
|
||||
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
|
||||
bne NoMissile
|
||||
bne No5thTank
|
||||
clc
|
||||
adc #$0C ; missile offset offset
|
||||
NoMissile
|
||||
adc #$04 ; missile offset offset
|
||||
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
|
||||
|
||||
NoMissile
|
||||
; vertical position
|
||||
lda pmtableL,x
|
||||
sta xbyte
|
||||
@@ -659,26 +683,64 @@ NoMissile
|
||||
; calculate start position of the tank
|
||||
lda ydraw
|
||||
clc
|
||||
adc #PMOffset
|
||||
adc #PMOffsetY
|
||||
sta temp
|
||||
; clear sprite and put 3 lines on the tank at the same time
|
||||
ldy #$00
|
||||
tya
|
||||
cpx #$5
|
||||
bcs PMForTank6
|
||||
; clear sprite and put 3 lines on the tank at the same time
|
||||
ClearPM
|
||||
cpy temp
|
||||
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
|
||||
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
|
||||
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
|
||||
dey
|
||||
lda #$00
|
||||
ZeroesToGo
|
||||
lda (xbyte),y
|
||||
and #%11110000 ; only for equal speeds
|
||||
sta (xbyte),y
|
||||
dey
|
||||
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
|
||||
; draw defensive weapons like shield ( tank number in X )
|
||||
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||
@@ -842,6 +904,22 @@ ShieldVisible
|
||||
rts
|
||||
.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
|
||||
;--------------------------------------------------
|
||||
|
||||
+5
-3
@@ -306,6 +306,7 @@ SettingEnergies
|
||||
;generating the new landscape
|
||||
jsr PMoutofScreen ;let P/M disappear
|
||||
jsr clearscreen ;let the screen be clean
|
||||
jsr ClearPMmemory
|
||||
jsr placetanks ;let the tanks be evenly placed
|
||||
jsr calculatemountains ;let mountains be easy for the eye
|
||||
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
||||
@@ -918,13 +919,14 @@ SetunPlots
|
||||
sta dmactls
|
||||
lda #$03 ; P/M on
|
||||
sta pmcntl
|
||||
lda #$01
|
||||
sta sizem ; there will be only M0, double width
|
||||
lda #$00
|
||||
sta sizep0 ; P0-P3 widths
|
||||
sta sizep0+1
|
||||
sta sizep0+2
|
||||
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
|
||||
jsr PMoutofScreen
|
||||
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user