Ember

surfarce

Nov 15th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Initialization
  2. Width = 640; Height = 480;
  3. Texture = surface_create(Width, Height);
  4.  
  5. // Alpha blending
  6. surface_set_target(Texture);
  7.     // Prepare the surface for drawing
  8.     draw_clear_alpha(0, 0);
  9.     // Texture to be alpha blended
  10.     draw_sprite(rockBackground, 0, 0, 0);
  11.     // Prepare the surface for alpha blending
  12.     draw_set_blend_mode(bm_subtract);
  13.     // Alpha blending!
  14.     draw_surface(mySurface[0], 0, 0);
  15.     // Done with blending
  16.     draw_set_blend_mode(bm_normal);
  17. // Done with the surface
  18. surface_reset_target();
Advertisement
Add Comment
Please, Sign In to add comment