Special effect at 16-bit color mode
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.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement