[A83] Re: Putsprite w/o xor
[Prev][Next][Index][Thread]
[A83] Re: Putsprite w/o xor
Thank you so much for that advice. I changed Joe's routine to make this
routine:
maskedsprite:
;-----> Draw a sprite; b=size of sprite; l=yc; a=xc; ix holds
pointerputSprite: ld e,l ld h,$00 ld d,h add hl,de add hl,de add
hl,hl add hl,hl ld e,a and $07 ld c,a srl e srl e srl e add hl,de
ld de,gbuf add hl,deputSpriteLoop1:sl1: ld d,(ix) ld e,$00 ld a,c
or a jr z,putSpriteSkip1putSpriteLoop2: srl d rr e dec a jr
nz,putSpriteLoop2putSpriteSkip1: ld a,(hl) and d or d ld (hl),a
inc hl ld a,(hl) and e or e ld (hl),a ld de,$0B add hl,de inc
ix djnz putSpriteLoop1 ret
The only problem is that my sprite is 8x8, but when I use this routine it
makes a block 16wide8tall with the sprite on one side, and the side the
sprite is on keeps alternating when it is moved around the screen. Does
anyone know how to fix this?
-Cole South