Re: LZ: Re: Sprite question
[Prev][Next][Index][Thread]
Re: LZ: Re: Sprite question
ask jimmy =)
On Wed, 2 Jul 1997, houston 00 wrote:
> >I have a question about sprites:
> >
> >I'm using the sprite library under usgard, but any sprite routine would
> >have this same problem. I'm trying to scroll a sprite across the
> >screen, and it works perfectly except for one problem. When I get to
> >the complete left or top of the screen, I want the sprite to draw only
> >the lower part or right part of the sprite. Instead, it draws the
> >sprite only at the bottom of the screen if I try to scroll up, and if I
> >try to scroll left, it draws half on the very left of the screen and
> >half on the very right of the screen.
> >
> >How the heck do I draw only the lower right corner of a sprite?
>
> I'm making bomberman and I ran into the same problem. I haven't tested
> anything yet but here's my basic idea: instead of using the library
> you'll have to cut and paste with the routine. The new inputs are
> d=x displacement
> e=y displacement
> Then you change the routine so that is has a loop for
> srl a's and inc hl's
> i.e.
> ;put this at the beginning
> Loop1:
> inc hl
> dec e
> jr nz,Loop1
> ;put this every time there's a new byte
> Loop2:
> srl a
> dec d
> jr nz,Loop2
>
> adding pushes and pops where ever neccesary. This only works with
> PutSprite, I haven't read the code to NASR. Of course, now the obvious
> problem is how do you do lower left corners and upper right and upper
> left corners?!! Well, my idea is to have a seperate routine for lower
> left corners. Also I have a status bar at the bottom of the screen so
> when I just need an upper corner I'll just displace horizontally, then
> draw the status bar over the the bottom.
>
> Having two routines and no library isn't very efficient, but its the
> best way I can think of offhand. What routine did the author of Sqrxz
> use?
>
> Terry Peng
> houston00@hotmail.com
>
> P.S. I heard that you're doing bomberman as well?!!!
>
> _______________________________________________________
> Get Private Web-Based Email Free http://www.hotmail.com
>
Biya,
Will Stokes
8^)
_____________________________________________________
/ /|
/____________________________________________________/ |
| | |
| Will Stokes | |
| wstokes@geocities.com | |
| wstokes@vertex.ucls.uchicago.edu | |
| | |
| My Personal Homepage | |
| http://www.uic.edu/~hhstokes/will.htm | |
| | |
| The TI-85 Calculator Center | |
| (the website I maintain and update very often) | |
| http://www.geocities.com/SiliconValley/Pines/7360/ | |
| | /
|____________________________________________________|/
References: