mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
Meteors added :)
This commit is contained in:
@@ -161,6 +161,36 @@ ClearPlot
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -----------------------------------------
|
||||
.proc ExPlot ;ExPlot (EplotX, EplotY)
|
||||
; EOR plot:
|
||||
; Inverts color of a pixel
|
||||
; Note: No coordinate control!!!
|
||||
; With off-screen coordinates, it can damage main program.
|
||||
; -----------------------------------------
|
||||
; let's calculate coordinates from xdraw and ydraw
|
||||
;xbyte = xbyte/8
|
||||
lda EplotX+1
|
||||
lsr
|
||||
lda EplotX
|
||||
ror ;just one bit over 256. Max screenwidth = 512!!!
|
||||
lsr
|
||||
lsr
|
||||
sta EplotByte
|
||||
;---
|
||||
ldx EplotY
|
||||
ldy linetableL,x
|
||||
lda linetableH,x
|
||||
sta EplotByte+1
|
||||
|
||||
ldx EplotX ; optimization (256 bytes long bittable)
|
||||
|
||||
lda (EplotByte),y
|
||||
eor bittable1_long,x
|
||||
sta (EplotByte),y
|
||||
rts
|
||||
.endp
|
||||
|
||||
; -----------------------------------------
|
||||
.proc point_plot
|
||||
; -----------------------------------------
|
||||
|
||||
@@ -142,6 +142,54 @@ lab2
|
||||
jsr RASTERMUSICTRACKER+3 ;1 play
|
||||
; ------- RMT -------
|
||||
SkipRMTVBL
|
||||
; ------ meteors ------ start
|
||||
bit Mcounter
|
||||
bpl MeteorOnSky
|
||||
bit MeteorsFlag
|
||||
bmi SkipMeteors
|
||||
; randomize meteor
|
||||
lda random
|
||||
and #%11111111
|
||||
bne SkipMeteors
|
||||
lda random
|
||||
sta Mpoint1X
|
||||
sta Mpoint2X
|
||||
lda #0
|
||||
sta Mpoint1X+1
|
||||
sta Mpoint2X+1
|
||||
lda random
|
||||
and #$1f
|
||||
sta Mpoint1Y
|
||||
sta Mpoint2Y
|
||||
mva #10 Mcounter
|
||||
MeteorOnSky
|
||||
lda Mpoint1Y
|
||||
cmp #64
|
||||
beq NoFirstPlot
|
||||
sta EplotY
|
||||
inc Mpoint1Y
|
||||
mwa Mpoint1X EplotX
|
||||
inw Mpoint1X
|
||||
jsr Explot
|
||||
NoFirstPlot
|
||||
lda Mcounter
|
||||
beq @+
|
||||
dec Mcounter
|
||||
bpl SkipSecondPlot
|
||||
@ lda Mpoint2Y
|
||||
cmp #64
|
||||
bne GoSecondPlot
|
||||
mva #$ff Mcounter
|
||||
bmi SkipMeteors
|
||||
GoSecondPlot
|
||||
sta EplotY
|
||||
inc Mpoint2Y
|
||||
mwa Mpoint2X EplotX
|
||||
inw Mpoint2X
|
||||
jsr Explot
|
||||
SkipSecondPlot
|
||||
SkipMeteors
|
||||
; ------ meteors ------ end
|
||||
bit ScrollFlag
|
||||
bpl EndOfCreditsVBI
|
||||
CreditsVBI
|
||||
|
||||
Reference in New Issue
Block a user