[SDL] Multiple Images in one file
Dave Ashley (SDL list)
sdl at xdr.com
Tue Aug 24 16:19:19 PDT 1999
>I agree. But with your own format you can make it so your sprites can be variable
>sized instead of a static width and height. Unless in the PCX file you had
>bounding boxes to search for, hmmm. that would be interesting.
>-= aaron p. matthews
>-= rival entertainment
For my bomberman game I have each pcx file stored so that sprites move left
to right, top to bottom. The first sprite in the upper left is just a wire
frame of color # 1 with color # 0 interior. So it is easy to figure out how
big the sprites are, and they can be variable. I could be more clever and
have a single color #1 dot inside the box to specify the handle of the
sprite but I don't do that. I try to make the pcx files around 640 across,
and as tall as they need to be. The graphics fetch mechanism just keeps moving
sideways until there isn't enough space left to contain a box, then it moves
down a row.
With a frame mechanism the size must be minimum 3x3 but that doesn't matter.
More information about the SDL