//#resource "vcs-ca65.h" import "vcslib.ecs" component Bitmap bitmapdata: array of 0..255 baseoffset 31 height: 0..255 end component HasBitmap bitmap: [Bitmap] end component Colormap colormapdata: array of 0..255 baseoffset 31 end component HasColormap colormap: [Colormap] end component Sprite plyrflags: 0..63 end component HasXpos xpos: 0..255 end component HasYpos ypos: 0..255 end component SpriteSlot sprite: [Sprite,HasBitmap,HasColormap,HasYpos] end component Missile end system Kernel2Sprite locals 13 on preframe do with [KernelSection] --- .define KLINES {{Bitmap:bitmapdata}},x sbc #0 sta {{$2}},y ; get bitmap height lda {{Colormap:colormapdata}},x sbc #0 sta {{$6}},y ; save ypos ldx {{$12}} ; restore X lda {{ L0 H0 L1 H1 lda {{$1}} ldy {{$2}} sty {{$1}} sta {{$2}} lda {{$5}} ldy {{$6}} sty {{$5}} sta {{$6}} --- on preframe do if [BGColor] --- lda {{data}} sta {{$1}} --- on scanline1 do with [VersatilePlayfield] --- lda ({{local 0}}),y tax --- on scanline2 do with [VersatilePlayfield] --- lda ({{local 0}}),y sta $00,x --- end system SetXPos on preframe do once --- sta HMCLR --- on preframe do join [SpriteSlot] with [HasXpos] limit 2 --- lda {{