Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_background_create_colour

(view raw script w/o annotations or w/e)
1
function background_create_colour(argument0, argument1, argument2) //gml_Script_background_create_colour
2
{
3
    var __w = argument0
4
    var __h = argument1
5
    var __col = argument2
6
    var __CompTempSurf = surface_create(__w, __h)
7
    if surface_exists(__CompTempSurf)
8
    {
9
        surface_set_target(__CompTempSurf)
10
        draw_clear(__col)
11
        surface_reset_target()
12
        var __sprid = sprite_create_from_surface(__CompTempSurf, 0, 0, __w, __h, false, false, 0, 0)
13
        surface_free(__CompTempSurf)
14
        return __sprid;
15
    }
16
    else
17
        return -1;
18
}