[A83] Re: Using data...
[Prev][Next][Index][Thread]
[A83] Re: Using data...
Well, the first sprite is pointless if you just want your code to read the
second one...But, if your code uses BOTH sprites, put the sprites into
different pointers...
EX:
....CODE HERE....
cp 5
jr z,showsprite1
cp 6
jr z,showsprite2
showsprite1:
ld b,8 ;I am using the ionPutSprite routine...sprite is 8 high
ld a,0 ;X coord=0
ld l,a ;Y coord=0
ld ix,sprite1 ;Point to the first sprite
call ionPutSprite ;call the routine (any sprite routine would work,
just fix the X & Y coord registers and the sprite pointers.)
call ionFastCopy ;copy the graph buffer (another is
B_CALL(_grbufcpy) or for 83 ASM call _grbufcpy_v)
B_CALL(_getkey)
ret
showsprite2:
ld b,8
ld a,0
ld l,a
ld ix,sprite2
call ionPutSprite
call ionFastCopy
B_CALL(_getkey)
ret
sprite1:
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
sprite2:
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.end
end
I hope that helped you out a bit
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com