Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


24 bit bitmaps & DirectX 5

This topic is 6167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here''s the deal. I have a C++ project to make for my Project/Graphics Programming class. The project I decided to make is a very basic Zelda engine. We do not have any DirectX lessons in these class but I still want to use it for my engine. (The course is mainly on MFC) I already did a basic tile engine in Visual Basic. My only problem is with using DirectX. Since they only have DirectX 5 at school, I''m only allowed to use that. My main problem right now is loading 24bits bitmaps into a DirectX surface. Can anyone point me to a good web tutorial or book that explains that? In the WGPFD book, they only show how to use 8bit bitmaps. There is a part on loading 24bit bitmaps on a directdraw surface but it appears all green when I blit it to the screen... I really don''t have much time to do that project. Any help would really be appreciated.

Share this post

Link to post
Share on other sites
A really easy function you can use is DDLoadBitmap

//Initialize Direct Draw
LPDIRECTDRAWSURFACE surface = DDLoadBitmap(lpdd, "filename.bmp", 0, 0);

This function creates the offscreen surface and loads the bmp into it

also there is DDReLoadBitmap, if you've already created the surface:

DDReLoadBitmap(surface, "filename.bmp");

The files, ddutil.h/.cpp, that contain these functions are somewhere in the DirectX SDK, if you have trouble finding them, email me and I will send them to you.
Good luck making Zelda

Edited by - atcdevil on November 4, 2001 10:36:36 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!