Here's the latest in my game's tech demo's. Sorry if this one's a little lengthy but I think it needs proper explanation.
The book that I learned (or should I say started) game programming from has an example of a very crappy, confusing bitmap parsing routine. The author even says that it's far from great and just there for teaching purposes.
Anyway, I needed a graphics parser to read through a bitmap that contains animation frames for a character and get the RECTs that contain the sprite, load those RECTs into an array and then tuck them away in a file (as an object) so I can quickly load them during the games initialization and use them in my blitting routines.
All code included except for GDIf.cpp/GDIf.h are soley mine in creation. The GDIf.* files are straight out of the book. They work fine for what they do, so I didn't bother rewriting them. The GDIf.* files is a basic GDI functions wrapper.
I'm not going to go into a ton of detail here since I've taken half of the night tonight to go back through and heavily comment the parsing files (tp.cpp/tp.h).
To test it click anywhere on the client area of the window. It takes about 6 seconds to parse it on my system (PIII 933, 128mb RAM).
**also, this tech demo features an update to the (formerly) boxy maintenance bot from the game**
Let me know what you think...