Hi guys,
ahm, i just wondered if there is any clean and proper method to load bitmaps in directdraw. there are different ways and i tried it with normal windows functions so far, but failed.

( code snippet : inv CreateCompatibleDC, NULL
mov hdc, eax
inv SelectObject, hdcImage, hBitmap
inv GetObject, hBitmap, SIZEOF bm, OFFSET bm)

So, what's the "normal" way to load bitmaps? and have you got some source code for that?

thanks :)
Posted on 2003-03-02 13:52:13 by Johannson
Use this sequence:

2)CreateCompatibleDC with your main window or screen (after you have setup resolution/fullscreen)
3)SelectObject Hbitmap from above in HDC from above

4)DirectDraw CreateSurface - where to keep above bitmap
5)DirectDraw GetDC for above surface

6)BitBlt from GDI HDC to Directraw's surface DC

7)Eventually set colorkey for above surface IF it is going to be a sprite :)

Lately we have designed our own sprite format that is more memory intensive and faster to blit for HE game
However we are still loading a lot of bitmaps using above sequence
Posted on 2003-03-02 14:47:47 by BogdanOntanu
bogdan, i love you :alright:
Posted on 2003-03-02 14:51:14 by Johannson