Re: A86: drawing a sprite to the screen.


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

Re: A86: drawing a sprite to the screen.






>From: BlAsTo1414@aol.com
>Date: Tue, 15 Sep 1998 22:22:06 EDT
>To: assembly-86@lists.ticalc.org
>Subject: Re: A86: drawing a sprite to the screen.
>Reply-To: assembly-86@lists.ticalc.org
>
>
>ok,
>couple things.
>
>GET_KEY is wrong, I think.  Its calling for a label labeled GET_KEY, at 
least
>thats what the compiler is looking for.
>
>What is 'draw_loop"?(its a label at the bottom)  is it supposed to be
>'Draw_Sprite'?
>
>If so, then what is Draw_Sprite?  am I supposed to put my mod. version 
of
>putsprite there?
>
>The compiler is also looking for K_Right  and K_Left labels.
>
>Thanks,
>BlAsTo1414
>
>
>
>In a message dated 9/15/98 6:13:19 PM Pacific Daylight Time,
>uneven14@hotmail.com writes:
>
><< draw_first_sprite:
>      ld d,1
>      ld e,5
>      ld hl,Sprite
>      call Draw_Sprite
> 
> key_loop:
>      call GET_KEY
>      cp K_RIGHT
>      jp z,move_sprite_right
>      cp K_LEFT
>      jp z,move_sprite_left
>      jp key_loop
> 
> move_sprite_right:
>      inc d
>      ld hl,Sprite
>      call Draw_Sprite
>      jp key_loop
> 
> move_sprite_left:
>      dec d
>      ld hl,Sprite
>      call Draw_Sprite
>      jp key_loop
> 
> Draw_Loop:
>     
>      {paste sprite routine here}
> 
> Sprite:
> 
>      {paste sprite here} >>
>

If you look in the "header" part (all the comments at the top) I said 
that I didn't put the correct key calls due to my laziness and not 
wanting to look them up.  And also Draw_Loop was meant to say 
Draw_Sprite and I don't really know why I typed Draw_Loop.  Just put 
whatever sprite routine you're using there and take that away it was 
just for clarification which I guess it didn't really do.  I don't 
really know how to read the arrow keys for input but I know theres a way 
to do that cuz some posted it before (and almost every game uses them 
too).  It has something to do with reading port 1 and dec'ing a but 
don't listen to me on that I'm probably wrong.

Matt


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com