Sound like a lot of progress so far!
P.S. Chip, WTF did you do to you avatar?
P.S. Chip, WTF did you do to you avatar?
ld a,20
ld l,20
ld b,8
ld ix,test
call iPutSpriteMask
bcall(_grbufcpy)
bcall(_getkey)
ret
test:
.db %00000000
.db %01111110
.db %01000010
.db %01000010
.db %01000010
.db %01000010
.db %01111110
.db %00000000
testMask:
.db %11111111
.db %10000001
.db %10000001
.db %11000001
.db %11000001
.db %10000001
.db %10000001
.db %11111111
; Ion Extended Routines by Joe Wingbermuehle and Kerm Martian
;Inputs: Exactly the same as iPutSprite, but with 16 bytes at ix.
iPutSpriteMask:
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,de
iPutSpriteLoop1Mask:
ld d,(ix)
ld e,$FF
ld a,c
or a
jr z,iPutSpriteSkip1Mask
iPutSpriteLoop2Mask:
srl d
rr e
set 7,d
dec a
jr nz,iPutSpriteLoop2Mask
iPutSpriteSkip1Mask:
ld a,(hl)
and d
ld (hl),a
inc hl
ld a,(hl)
and e
ld (hl),a
push ix
dec hl
ld de,8
add ix,de
iPutSpriteLoop1AND:
ld d,(ix)
ld e,$00
ld a,c
or a
jr z,iPutSpriteSkip1AND
iPutSpriteLoop2AND:
srl d
rr e
dec a
jr nz,iPutSpriteLoop2AND
iPutSpriteSkip1AND:
ld a,(hl)
xor d
ld (hl),a
inc hl
ld a,(hl)
xor e
ld (hl),a
pop ix
ld de,$0B
add hl,de
inc ix
djnz iPutSpriteLoop1Mask
ret
;%11111111
;%10000001
;%10000001
;%11000001
;%11000001
;%10000001
;%10000001
;%11111111
Advertisement