Quote:Original post by Illco
(...)Please let me know what you have and what exactly you want to know (which code parts).
Then: why still use DX7? I know it is not always so easy to switch so I'm just curious for your reasons. I also know DirectDraw got lost but you can do quite the same on a full-screen quad isn't it? (probably not)
That's no problem at all, it's been an informative discussion anyways :) First, the reason I used DX7: I'm new to this stuff, extremely new. I have a background coding in C, Java and a host of other web languages, but I've never touched graphics stuff. I've been reading on different graphical APIs trying to find a good tutorial for tileset RPGs, and I read a lot. It seems tutorials are somewhat hard to find for making 2d in DX9, and slightly harder to understand. Simply put, I found the concept of making a 2d RPG in 2d a lot simpler (DirectDraw), than playing with vertexes in a 3d space (Direct3d). On top of that, I found an excellent tutorial on gamedev that really contained everything I needed to get me started, and it was using DirectX7, so I decided to go with that. I understand it's outdated, but for a 2d RPG, it seems quite enough.
Now for the actual question at hand: I did find the DirectX7/DD7 SDK online and I'm using that as a base of reference. I'm using strictly Fullscreen mode, so all I need to check is if the program looses Fullscreen mode. IDirectDraw7::TestCooperativeLevel returns DDERR_NOEXCLUSIVEMODE if it does, or DD_OK if it's fine. (I don't need to check in windowed mode). It then looks like you have to pause your application. The SDK kinda gets vague after that, but says to restore it you need to call IDirectDraw7::RestoreAllSurfaces and reload the bitmaps on the surfaces etc.. This seems quite simple, and I'm afraid I'm missing something. I did try that code briefly yesterday, and when I alt-tabbed, I simply couldn't get back in my program, so I'm guessing I did something wrong. I'll try playing again with it this morning, if it doesn't work I'll try to post my code. Thanks for your help!
P.S: I know my partner will kill me for posting this. I tend to talk in terms of RPG, but in fact it's more like an adventure game a la Zelda. If you're reading this, sorry! Hehe!