Re: A89: Re: Faster map routine, addon..
[Prev][Next][Index][Thread]
Re: A89: Re: Faster map routine, addon..
ehm.. Level is the leveldata.
and GBplanes are the two planes for graphic data..
In this project I used multiple buffers..
Maybe I should tell that too. that routine writes to a buffer that is 176x96
pixels wide. (22x12 sprites 8x8 in size)
The idea was then to shift this buffer and then copy it to the lcd-mem.
after each 8 shifts in the same direction, a new column of sprites is written,
"off screen" in the buffer.
To directly answer your question, Level is the address of the level-data, a
large matrix, 12xsomething
and GBplanes are two buffers in memory.
If you want this to write directly to screen, change GBplane-things to point to
screen and the graybuffer and change all numbers 22 to 30..
the levelmatrix is basicly a lookuptable and this:
clr d0 ; Sprite address is now in a0
move.b (a2)+,d0 ;
lsl #4,d0 ;
move.l #Sprites,a0 ;
adda d0,a0 ;
is doing the lookup.
so 0 in Level means the first sprite after tha label Sprites, 1 the second and
so on..
one more hint, it puts the sprites in columns at a time.
this way, I get by with fewer changes of the address registers.
//Olle
Lynn McCartney wrote:
>
> Real quick question concerning your sprite routine, what would be in Level
> and the 2 GBplanes? I know what they're supposed to be, I just want to know
> what should be in them. Thanks.
>
> Eric Greening
> -----Original Message-----
> From: Olle Hedman <oh@hem.passagen.se>
> To: asm89 <assembly-89@lists.ticalc.org>
> Date: Wednesday, October 20, 1999 1:33 AM
> Subject: A89: Faster map routine, addon..
>
> >
> >Yea.. one more thing to understand my code.. I use my own sprite format in
> this
> >routine.
> >It looks like this: (use fixed with font)
> >
> >; plane1 |plane0
> > dc.b %00000000,%00000000
> > dc.b %11111110,%11111110
> > dc.b %01000100,%00101000
> > dc.b %01000100,%00101000
> > dc.b %01000100,%00101000
> > dc.b %01000100,%00101000
> > dc.b %01000100,%00101000
> > dc.b %11111110,%11111110
> >
> >
> >
> >that is, the sprite are mixed. first one line of the first plane, then one
> line
> >of the second, and so on.
> >
> >//Olle
> >
> >
References: