Jump to content
  • Advertisement

Archived

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

jimiwa

ddraw almost successful - help please

This topic is 5331 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

OK, I got some code that was very helpful, more helpful and close to compiling than any code I''ve encountered in the last year and I almost have a simple animation.. I just typed in a bunch of code and almost everything works.. I even figured out how to do a resource file with a bitmap loaded onto it which I''ve never done before. All the setup and everything worked until I got to this one point. The thing is I''m getting two errors DDLoadBitmap and DDSetColorKey are not found. I have the Summer 2003 version of Direct X 9.0 and what gets me is there''s no C++ directdraw documentation. I need to know how to load a bitmap from a resource and set the color key for transparency however it''s done the "new" way or whatever. Any help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
ok please anyone correct me if im wrong (dont put it past me) but direct draw only exsists as direct draw 2 in Direct X9 as Microsoft stopped making extensions of it once they hit version 7 (the last). Direct X8.1 still has direct draw as a part of it though. I believe you're supposed to learn D3D and use that in DX9... since i haven't read too much about this, please dont flame me if im wrong...

hope that helps clarify some stuff

[edited by - the_moo on April 13, 2004 1:19:33 AM]

Share this post


Link to post
Share on other sites
DirectDraw 7 will be the last DirectDraw version (MS stated this), but it will be there in DirectX forever (well, at least 20 years). Since DirectX is COM-based, and COM objects may NEVER remove any features it has to be there. If MS actually removed it a whole lot of older games won''t work anymore of a sudden.

To your answers:

You''ll have a IDirectDrawSurface interface pointer, which has the method SetColorKey.

For DDLoadBitmap, look in the SDK samples, in Common/Src there''s ddutil.cpp. Inside you should find the functions CDisplay::CreateSurfaceFromBitmap and CSurface::DrawBitmap.
There''s some encapsulation going on, but those two functions actually load the bitmap to a surface and blit it.

Share this post


Link to post
Share on other sites
I've looked at SetColorKey and CreateSurfaceFromBitmap
but I can't figure out how to pass the correct parameters.
Which parameters do I need to use and how do I initialize
them and set them to the right values? Please be specific
and try to give me an example.


[edited by - jimiwa on April 13, 2004 12:53:47 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!