Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_umbrella_tv_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_font(fnt_main);
2
draw_set_halign(fa_center);
3
var _xx = x;
4
var _yy = y;
5
var _w1_x = _xx + 30;
6
var _w1_y = _yy + 60;
7
var _w2_x = _xx + 54;
8
var _w2_y = _yy + 76;
9
var _temp = temp + temp2;
10
var _temp_color;
11
if (_temp < 50)
12
    _temp_color = merge_color(c_aqua, c_white, clamp(_temp / 50, 0, 1));
13
else if (_temp < 80)
14
    _temp_color = merge_color(c_white, c_yellow, clamp((_temp - 50) / 30, 0, 1));
15
else
16
    _temp_color = merge_color(c_yellow, c_red, clamp((_temp - 80) / 40, 0, 1));
17
draw_sprite_ext(spr_glass_pane, 0, _xx, _yy, 2, 2, 0, c_white, 1);
18
draw_text_transformed_color(_xx + 27, _yy + 115, _temp, 2, 2, 25, _temp_color, _temp_color, _temp_color, _temp_color, 1);
19
if (weathersprite == 1035)
20
    draw_sprite_ext(weathersprite, 0, _w1_x, _w1_y, 2, 2, 0, _temp_color, 1);
21
if (weathersprite == 2124)
22
    draw_sprite_ext(weathersprite, 0, _w1_x, _w1_y, -2, 2, 0, _temp_color, 1);
23
draw_set_alpha(1);
24
draw_set_halign(fa_left);
25
var a = 174;
26
if (vspeed < 0 && y < (cameray() - a))
27
    y += ((cameraheight() + a) - 12);
28
if (vspeed > 0 && y > (cameray() + cameraheight()))
29
    y -= ((cameray() + cameraheight() + a) - 12);