![]() |
Transparent Color For Surfaces - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Transparent Color For Surfaces (/showthread.php?tid=528) |
Transparent Color For Surfaces - Tutorial Bot - 23-12-2006 Author: Enigmewave Difficulty: 3/5 :: CLIENT SIDE :: In modDirectX.bas, add: Code: Public Sub SetMaskColorFromPixel(ByRef TheSurface As DirectDrawSurface7, ByVal X As Long, ByVal Y As Long) In sub InitSurfaces, replace: Code: DD_SpriteSurf.SetColorKey DDCKEY_SRCBLT, key Code: SetMaskColorFromPixel DD_SpriteSurf, 0, 0 Code: DD_TileSurf.SetColorKey DDCKEY_SRCBLT, key Code: SetMaskColorFromPixel DD_TileSurf, 0, 0 Code: DD_ItemSurf.SetColorKey DDCKEY_SRCBLT, key Code: SetMaskColorFromPixel DD_ItemSurf, 0, 0 After that, whatever color the top left pixel is on the sprites surface, tiles surface, or items surface will be the transparent color for that surface. |