08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Draws the indicated part of subimage subimg (-1 = current) of the sprite <strong>with</strong><br />

the top-left corner of the part at position (x,y).<br />

draw_background(back,x,y) Draws the background at position (x,y).<br />

(Without color blending and no alpha transparency.)<br />

draw_background_stretched(back,x,y,w,h) Draws the background<br />

stretched to the indicated region.<br />

draw_background_tiled(back,x,y) Draws the background tiled so that it<br />

fills the entire room.<br />

draw_background_part(back,left,top,width,height,x,y) Draws<br />

the indicated part of the background <strong>with</strong> the top-left corner of the part at<br />

position (x,y).<br />

The following functions are extended functions of the ones indicated above. These extended<br />

versions can only be used in the Pro Edition!<br />

draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,a<br />

lpha) Draws the sprite scaled <strong>with</strong> factors xscale and yscale and rotated<br />

counterclockwise over rot degrees. color is the blending color (use c_white for<br />

no blending) and alpha indicates the transparency factor <strong>with</strong> which the<br />

images is merged <strong>with</strong> its background. A value of 0 makes the sprite<br />

completely transparent. A value of 1 makes it completely solid. This function<br />

can create great effect (for example partially transparent explosions).<br />

draw_sprite_stretched_ext(sprite,subimg,x,y,w,h,color,alpha<br />

) Draws the sprite stretched so that it fills the region <strong>with</strong> top-left corner (x,y)<br />

and width w and height h. color is the blending color and alpha indicates the<br />

transparency setting.<br />

draw_sprite_tiled_ext(sprite,subimg,x,y,xscale,yscale,color<br />

,alpha) Draws the sprite tiled so that it fills the entire room but now <strong>with</strong><br />

scale factors and a color and transparency setting.<br />

draw_sprite_part_ext(sprite,subimg,left,top,width,height,x,<br />

y,xscale,yscale,color,alpha) Draws the indicated part of subimage<br />

subimg (-1 = current) of the sprite <strong>with</strong> the top-left corner of the part at<br />

position (x,y) but now <strong>with</strong> scale factors and a color and transparency setting.<br />

draw_sprite_general(sprite,subimg,left,top,width,height,x,y

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!