Advertisement

DDLoadBitmap

Started by December 31, 2002 05:02 PM
1 comment, last by nodoubt 21 years, 10 months ago
As most of you know, the DDLoadBitmap function is available for DX7+.. I have a question about this function. I have a bitmap with four 32x32 frames of animation (of a game character). I would like to store each frame in a DirectDraw surface so that I can animate it. my question is, can i specify the x and y coordiates of the frame in the DDLoadBitmap function? this is how i usually load the bitmap.. DDLoadBitmap(Null, "filename", 0, 0); do i replace the 0, 0 with x, y coordinates? i tried that but that didnt work. it did not display anything. Or maybe someone has a better suggestion on how to extract a bitmap image out of a bitmap? Thanks alot for your time.
I'm a newbie, please don't hurt me!
No. DDLoadBitmap is a function from sample codes, it is not available in SDK by default. Try to look at the source code of DDLoadBitmap and MSDN, you will know why you can''t replace those two 0''s with x and y coordinate.

Anyway, you don''t pass NULL to the first argument of DDLoadBitmap, it''s supposed to be a pointer to a IDirectDraw interface, which is used to create the surface.

Flamewars don''t make you look smart, but idiot.
Advertisement
ahh my mistake.

i did look at the DDLoadbitmap function, the two zeros are paramaters cx, and cy, but not much more info on what they are used for.

anyway, I guess I have to write my own function to extract a bitmap image because I have not seen/couldnt find one available.

thanks for your time
I'm a newbie, please don't hurt me!

This topic is closed to new replies.

Advertisement