Re: A83: sprite prob....(sorry if long)


[Prev][Next][Index][Thread]

Re: A83: sprite prob....(sorry if long)




For a delay do this... You'll may need to call it a couple of times if
it isn't long enough

Delay:
ld bc, $FFFF		;Change this value lesser for less delay...
DelayLoop:
ld a, b
or c
jr nz, DelayLoop
ret 			;If you call it


Cory Derenburger wrote:
> 
> Ok, my code, I'm basically using James Mathews code for the TI Mouse.
> What I did is the part that calls putmse I repeated that with different
> sprite (easy enough) to make him walk.  But my problem is that I made
> separate moveloops: for each direction he facelike this
> 
> mooveloopup:
>                     call faceup (XOR routine calling the sprite that
> faces up)
>                     jp getkey  (goes to get key routine)
> 
> I did one for each direction and I call the same sprite for the routine
> to keep it from leaving lots of shadows behind (like this  8 8 8 8 8 E)
> But when I change direction it doesn't call the previous sprite, but a
> different one.  This causes the part that isn't written over to leave
> streaks (hope that helps)
> I've written two other small programs so I feel pretty comfortable with
> ASM (my fist language)
> Hopefully this doesn't upset James (too) much.  But for a side note the
> sprite is 8X12. Also anybody have a good delay routine that is small?
> Mine goes like this (mine all mine all mine)
> 
> Delay1:
>         call delay2
>         call delay2
>         call delay2
> Delay2:
>         ect. to seven?
> Delay:
>         push af
>         inc hl
>         dec hl
>         pop af
>         ret
> 
> It gives a good 1/4 sec. it uses somwhere around 42 bytes. could use
> jp's but it reduces it 1 byte and makes it go lots faster (not good for
> a delay prog)
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com


-- 
Scott "_Wrath_" Dial
homosapian@geocities.com
ICQ#3608935
http://www.geocities.com/~homosapian/


References: