SpriterDrag

GMEA Backgrounds

Sep 16th, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///Deals with parallax backgrounds.
  2.  
  3. for (var i=0; i<8; i++) {
  4.  
  5.     //If the background is not set, do not draw
  6.     if (background_index[i] != -1) {
  7.    
  8.         //If the background is not a foreground, do not draw
  9.         if (background_foreground[i] == false) {
  10.        
  11.             //If the background is higher than the height of the room
  12.             if (background_height[i] < room_height)
  13.             && (background_height[i] > view_hview[0])
  14.                 draw_background_tiled_horizontal_ext(background_index[i], view_xview[0]/(1.2+(0.2*i))+(background_x[i]+background_hspeed[i]), background_y[i]+(view_yview[0]*(room_height-background_height[i])/(room_height-view_hview[0])), 1, 1, 0, background_blend[i], background_alpha[i]);
  15.                
  16.             //Otherwise, draw normally        
  17.             else        
  18.                 draw_background_tiled_horizontal_ext(background_index[i], view_xview[0]/(1.2+(0.2*i))+(background_x[i]+background_hspeed[i]), background_y[i], 1, 1, 0, background_blend[i], background_alpha[i]);
  19.         }
  20.     }
  21. }
  22.  
  23. //Draw pit marker
  24. draw_background_ext(bgr_pit, 0, room_height-32, room_width/16, 1, 0, background_blend[0], 0.5);
Add Comment
Please, Sign In to add comment