Dispiacere
October 21st, 2009, 04:34 AM
I'm creating a top-down RPG game engine(like Zelda, only tile-based instead of pixel*based) in Windows and would like to know if anyone can direct me to a tutorial or source code for displaying multiple static GIFs in a window. I don't need animation support, but transparency is a must. I don't like using libraries and would strongly prefer to use small routines for loading and displaying them.
The first version of the engine I made only used Bitmaps and I wrote the code based on bmp tutorials from a book. But after creating nearly 60mb worth of bitmaps I realized that they were just too big for the project and I needed some kind of compressed image type.
The second version used GIFView, written by Juan Soulie, which I found on this page:
http://www.cplusplus.com/src/
but the way that program handles gifs is to create a single image window for each gif, and if you want the same gif in two places at once you have to create a whole separate image window. It also didn't handle overlapping images because of the image window approach. My needs call for a simple set of functions that can load the gif, display it on the window at a specified location, and be done with it because there are at least 300 images on the screen at one time, tiles, sprites, and text.
Here's an example of the way I want to set up the function on loading them:
int LoadGIF(int XDest, int YDest, char *FileName, HWND hWnd);
Where I specify the x position, the y position, the file name, and the window to send it to. That's the way I had the bitmap loading set up. I tried to strip Juan's program's gif decompressing and loading routines and writing a program to use them in this way but wasn't able to succeed.
The first version of the engine I made only used Bitmaps and I wrote the code based on bmp tutorials from a book. But after creating nearly 60mb worth of bitmaps I realized that they were just too big for the project and I needed some kind of compressed image type.
The second version used GIFView, written by Juan Soulie, which I found on this page:
http://www.cplusplus.com/src/
but the way that program handles gifs is to create a single image window for each gif, and if you want the same gif in two places at once you have to create a whole separate image window. It also didn't handle overlapping images because of the image window approach. My needs call for a simple set of functions that can load the gif, display it on the window at a specified location, and be done with it because there are at least 300 images on the screen at one time, tiles, sprites, and text.
Here's an example of the way I want to set up the function on loading them:
int LoadGIF(int XDest, int YDest, char *FileName, HWND hWnd);
Where I specify the x position, the y position, the file name, and the window to send it to. That's the way I had the bitmap loading set up. I tried to strip Juan's program's gif decompressing and loading routines and writing a program to use them in this way but wasn't able to succeed.