Archived

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

Metus

Loading bitmap -> IDirectDrawSurface7

Recommended Posts

Metus    168
I''m the test phase of my simple 2d game and before i travel farther down the ladder to hell i need to know if everything is working as i want i to. what i want is the easiest way to load a bitmap (a regular window .bmp) into a IDirectDrawSurface7 surface...

Share this post


Link to post
Share on other sites
SelethD    456
In the DirectX SDK look in the file ddutil.h and ddutil.cpp

thats how i figured out how to load a bitmap into a DIRECTDRAWSURFACE7 object

I would post my code, but is part of a class object and I dont think it would help much in that context.

Share this post


Link to post
Share on other sites
Odoacer    140
It''s unbelieveably easy. with ddutil.

LPDIRECTDRAWSURFACE7 img1 = DDLoadBitmap(DD_Device_Name, "pic.bmp", 0, 0);

Actually I''m not sure what the last two params are used for (prototype shows them as X and Y coords), I just set them to 0.

There''s a good article here on gamedev about it.

Share this post


Link to post
Share on other sites