Archived

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

Special effect at 16-bit color mode

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

hi all. i wonder to know, how to do special effect such as waterfall at 16-bit color mode. i know usually we do palette animation to get this kind of effect at 256 color palette mode, but there is no palette at 16-bit color mode, should i update the pixel directly one by one, or the video hardware will handle it for us, if so, how to make use of this hardware feature in directdraw, thanx.

Share this post


Link to post
Share on other sites
It''s soooooo easy!

You include
and then you do the following

-----------------------------------------------------------------
IGDIPalDevice *gpd;

gpd = new IGDIPalDevice(PD_16_5_6_5); // Set mode
gpd->InstallHandler(PD_IRQ0); // This masks a pixel
gpd->SelectEffect(PD_EXPLOSION);
gpd->Apply(time(NULL)); // Apply effect as fast as possible
gpd->Finish(hwnd.Pixels[time(T_NOW), time(10)]);
delete gpd;
-----------------------------------------------------------------

I know it looks a bit complicated, but it works (I saw this in the unr2_fx.cpp, as you know, Unreal2 is open-source)

Kneelz

Share this post


Link to post
Share on other sites