Skip to main content
gamedev.net
🔒 Locked

bitmap loading methods

Started by lpsoftware Mar 25, 2000 at 6:22 PM 2 replies 550+ views
Original Post
lpsoftware
lpsoftware
Hi, I''ve got a question: I''ve been using the DDLoadBitmap() function from ddutils.h to create an offscreen surface and load the bitmap to it. Is this fine to do? I think that it''s an easier and less painless way that writing your own bitmap-loading function. Does anyone else use this method, or, have any gripes about it? Thanks, Martin
______________Martin EstevaolpSoftware
Rappler
Rappler
Sure, it''s OK to use for a while, but in the long run I would suggest writing your own. Not only does it teach you the .bmp file format and creating offscreen surfaces, you might be able to add extra functionality that the one you are using now doesn''t have.

And it''s fulfilling to know that you wrote it, rather than having to depend on someone else.
"The Gates of Pearl have turned to gold, it seems you've lost your way."
lpsoftware
lpsoftware
Rappler: Thanks for the info. I guess I should write my own loading function sooner or later. But, when I learn from other people''s functions, mine is probably going to end up very similar, so how could I really call it my own? Anyway, the learning experience is important.

Thanks,
Martin
______________Martin EstevaolpSoftware
lshadow
lshadow
Well it will be similar since you have to load the file just about the same way. But the cool thing is that once you know the format and how it works, you could create your own file that holds a bunch of bitmaps and the bitmaps are already inverted (since bitmaps are upside down). You could also convert them to 16 bit in your file if you were using 16 bit. So knowing how to load them is of great advantage later on.
Working on: DoP

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.