mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 21:34:20 +02:00
PM code optimisation
This commit is contained in:
+11
-24
@@ -689,51 +689,37 @@ NoMissile
|
|||||||
cpx #$5
|
cpx #$5
|
||||||
bcs PMForTank6
|
bcs PMForTank6
|
||||||
; clear sprite and put 3 lines on the tank at the same time
|
; clear sprite and put 3 lines on the tank at the same time
|
||||||
|
ldx #3 ; three lines of PM
|
||||||
ClearPM
|
ClearPM
|
||||||
cpy temp
|
cpy temp
|
||||||
bne ZeroesToGo
|
bne ZeroesToGo
|
||||||
lda (xbyte),y
|
@ lda (xbyte),y
|
||||||
and #%11110000 ; only for equal speeds
|
and #%11110000
|
||||||
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
|
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
|
dex
|
||||||
|
bne @-
|
||||||
ZeroesToGo
|
ZeroesToGo
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and #%11110000 ; only for equal speeds
|
and #%11110000
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
bne ClearPM
|
bne ClearPM
|
||||||
beq NoPlayerMissile
|
beq NoPlayerMissile
|
||||||
PMForTank6
|
PMForTank6
|
||||||
; clear sprite and put 3 lines on the tank at the same time
|
; clear sprite and put 3 lines on the tank at the same time
|
||||||
|
ldx #3 ; three lines of PM
|
||||||
ClearPM6
|
ClearPM6
|
||||||
cpy temp
|
cpy temp
|
||||||
bne ZeroesToGo6
|
bne ZeroesToGo6
|
||||||
lda (xbyte),y
|
@ 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
|
and #%00001111
|
||||||
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
|
dex
|
||||||
|
bne @-
|
||||||
ZeroesToGo6
|
ZeroesToGo6
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and #%00001111
|
and #%00001111
|
||||||
@@ -744,6 +730,7 @@ ZeroesToGo6
|
|||||||
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
|
||||||
|
ldx TankNr
|
||||||
lda ActiveDefenceWeapon,x
|
lda ActiveDefenceWeapon,x
|
||||||
cmp #ind_Shield_________ ; one shot shield
|
cmp #ind_Shield_________ ; one shot shield
|
||||||
beq DrawTankShield
|
beq DrawTankShield
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user