Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int AGS_EngineOnEvent (int event, int data) {
- if (event == AGSE_POSTSCREENDRAW) {
- if (clutslot > 0)
- {
- // Get a reference to the screen we'll draw onto
- BITMAP *virtsc = engine->GetVirtualScreen();
- BITMAP *clutspr = engine->GetSpriteGraphic (clutslot);
- BITMAP *rain = engine->GetSpriteGraphic (920);
- // Get its surface, in both 8-bit and 16-bit flavours
- unsigned char **charbuffer = engine->GetRawBitmapSurface (virtsc);
- unsigned char **clutarray = engine->GetRawBitmapSurface (clutspr);
- unsigned char **rainarray = engine->GetRawBitmapSurface (rain);
- // Find out the screen width and colour depth
- int x = 0;
- int y = 0;
- int transamount = 256 * 4;
- while (y < 200)
- {
- while (x < 320)
- {
- charbuffer[x][y] = clutarray [charbuffer[x][y]][rainarray [x][y+transamount]];
- x++;
- }
- x=0;
- y++;
- }
- // Release the screen so that the engine can continue
- engine->ReleaseBitmapSurface (virtsc);
- engine->ReleaseBitmapSurface (clutspr);
- engine->ReleaseBitmapSurface (rain);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement