Archived

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

BoNkErZ

Performing effects on the entire screen

Recommended Posts

BoNkErZ    122
OK guys, the newbie strikes again, with yet another question... I''m working on an RPG for my project and I need to perform effects on the entire screen once battle has been commenced. Does anyone have a simple snippet of code to fade out the entire screen to black? How about fading in from black? I''ve looked anywhere for tutorials, but I just have no idea at all on how to do it in DirectX. Just a little side note: I''m using DirectX 6.0 (haha a little outdated) and the libraries of the "Tricks of the Windows Game Programming Gurus" by Andre LaMothe. I''m also using the 16 bit graphics mode. Thanx a load, ppl! - Haz -

Share this post


Link to post
Share on other sites
SikCiv    122
You will need to use Alpha blending, and since DDraw does not support it you will have to implement your own routine. In the GameDev tutorials there is a tut on Alpha blending (though it uses DDraw7 so u may have to upgrade to DX7).

Once the alpha blending routine is up and running, you will need to load a black bitmap (or create an empty surface) and alpha-blit it to the backbuffer about 60 times, incrementing the alpha opacity by 4 every frame until you reach 0xFF (255).

  Downloads:  ZeroOne Realm

Share this post


Link to post
Share on other sites