Lunarbeam
|
I've looked at some demos and in them there are these odd Gif files. Inside, there's not just one picture but a whole list of them in a sort of strip continuing down the length of the image. How do I get this to work? I thought you could only load a whole image, not just a part. Also, can you do this with pcx files?
-- Lunarbeam @
Posted on 2001-01-03 22:41:10
|
andy
|
Basicly, the VC coder is doing some clever coding to blit part of the image. The part that makes it work is the fact that they're in a vertical strip.
Basicly, when blitting the first frame, you can specify any height you want, and it'll blit okay. (specifying an incorrect width will result in weirdness)
So, taking this step further, the coder supplies an offset, so that it starts blitting somewhere other than the upper left corner of the image.
TCopySprite(x,y,imagewidth,frameheight,imageptr+(curframe*frameheight*bytesperpixel));
And it doesn't matter what kind of image it is, it's converted to raw pixel data at runtime.
'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald
Posted on 2001-01-03 23:19:10
|