Re: A86: re: moving sprites
[Prev][Next][Index][Thread]
Re: A86: re: moving sprites
I didn't really know how to do a decent loop with this thing. I was using
your routine and got the picture, but no movement. What I need is some type
of loop to get the sprite to move about 30 spaces (x-coord=10 to
x-cood=40). My y-coord is 24. The game, I'm not sure if I'll be releasing
it or not, is a kind of Duckhunt clone. That's why I've been looking off
the source to it as help.
start:
call _clrLCD
call _runindicoff
call titledisp
call no_key
call BG
call no_key
call putspr
ret
titledisp: ;----------------
. ;I got all of this working
. ;so I won't bother
. ;copying it since it
no_key: ;really isn't that
. ;important.
. ;
. ;----------------
putspr:
ld hl,duckr ;I know what this does
ld a,10 ;but I don't know
ld e,24 ;how to get it
ld b,a ;to keep moving
ld c,e ;the sprite around
push bc
call PutSprite
pop bc
ld a,b
ld e,c
inc a
ret
PutSprite:
.
.
.
duckr:
.db 00000100b
.db 00001110b
.db 10001111b
.db 11111110b
.db 11111100b
.db 01111100b
.db 00111000b
.db 00000000b
.end
Jeff Zimmerman
gramdon@mail2.theonramp.net
> can you post the code you are using for the loop?
Follow-Ups: