Board index » delphi » Lots of sprites

Lots of sprites

I have a collection of 64 different views of a 3d sprite that I wish to
display on the screen in mode 13h.  I have had trouble comming up with a way
to store them all and be able to display them relatively fast. Each sprite
a 80 by 50 pixel pcx picture.  If anyone has any idea of a good way to do
this in turbo pascal v6.0, please let me know.
        thanks, David Dambman

P.S. check out my game, a cool space based vertical scrolling shoot 'em up
game in ModeX, with cool ray-traced graphics.  programed in tp 6.0
 Download dop.exe at:
            ftp://ftp.uwp.edu:/pub/msdos/games/arcade/dop.zip

 

Re:Lots of sprites


In article <APC&63'0'27af4d4a'...@glas.apc.org>,
   Carl Dambman <carl...@glas.apc.org> wrote:

Quote
>I have a collection of 64 different views of a 3d sprite that I wish to
>display on the screen in mode 13h.  I have had trouble comming up with a way
>to store them all and be able to display them relatively fast. Each sprite
>a 80 by 50 pixel pcx picture.  If anyone has any idea of a good way to do
>this in turbo pascal v6.0, please let me know.

That's going to take about 256K. If you have room you can do it with an array
of pointers.

sprites : Array[0..63] Of Pointer;
  .
  .

For x :== 0 To 63 Do
Begin
  GetMem(sprites[x], 80 * 50);
  { fill it up }
  BlockRead(file, sprites[x]^, 80 * 50); { or whatever }
End;

Other Threads