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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

c_navy<br />

c_olive<br />

c_orange<br />

c_purple<br />

c_red<br />

c_silver<br />

c_teal<br />

c_white<br />

c_yellow<br />

The following functions can help you to create the colors you want.<br />

make_color_rgb(red,green,blue) Returns a color <strong>with</strong> the indicated red,<br />

green, and blue components, where red, green and blue must be values<br />

between 0 and 255.<br />

make_color_hsv(hue,saturation,value) Returns a color <strong>with</strong> the<br />

indicated hue, saturation and value components (each between 0 and 255).<br />

color_get_red(col) Returns the red component of the color.<br />

color_get_green(col) Returns the green component of the color.<br />

color_get_blue(col) Returns the blue component of the color.<br />

color_get_hue(col) Returns the hue component of the color.<br />

color_get_saturation(col) Returns the saturation component of the<br />

color.<br />

color_get_value(col) Returns the value component of the color.<br />

merge_color(col1,col2,amount) Returns a merged color of col1 and<br />

col2. The merging is determined by amount. A value of 0 corresponds to col1,<br />

a value of 1 to col2, and values in between to merged values.<br />

The following miscellaneous functions exist.<br />

draw_getpixel(x,y) Returns the color of the pixel corresponding to<br />

position (x,y) in the room. This is not very fast, so use <strong>with</strong> care.<br />

screen_save(fname) Saves a bmp image of the screen in the given<br />

filename. Useful for making screenshots.<br />

screen_save_part(fname,x,y,w,h) Saves part of the screen in the given<br />

filename.

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

Saved successfully!

Ooh no, something went wrong!