Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_macro_froggit_green_shader_Draw_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
object[0] = 2860;
4
object[1] = 2869;
5
object[2] = 2876;
6
object[3] = 2877;
7
object[4] = 2879;
8
var color_id = color_uniform;
9
var alpha_id = alpha_uniform;
10
var _color_new = color_new;
11
for (var i = 0; i < array_length_1d(object); i++)
12
{
13
    with (object[i])
14
    {
15
        shader_set(sh_replace_color);
16
        shader_set_uniform_f_array(color_id, _color_new);
17
        shader_set_uniform_f(alpha_id, other.image_alpha);
18
        draw_self();
19
        shader_reset();
20
    }
21
}
22
draw_set_font(fnt_mars_needs_cunnilingus);
23
var text_col = make_color_rgb(color_new[0] * 255, color_new[1] * 255, color_new[2] * 255);
24
draw_set_halign(fa_left);
25
draw_set_valign(fa_top);
26
draw_text_colour(30, 400, string_hash_to_newline(string(global.player_name)), text_col, text_col, text_col, text_col, global.image_alpha_enemy_attacking * image_alpha);
27
draw_text_colour(147, 400, string_hash_to_newline("LV " + string(global.player_level)), text_col, text_col, text_col, text_col, global.image_alpha_enemy_attacking * image_alpha);
28
if (global.current_hp_self < 10 && global.current_hp_self > -10)
29
    draw_text_colour((314 + obj_battle_hp_max_self.sprite_width) - 25, 400, string_hash_to_newline("0" + string(global.current_hp_self) + " / " + string(global.max_hp_self)), text_col, text_col, text_col, text_col, global.image_alpha_enemy_attacking * image_alpha);
30
else
31
    draw_text_colour((314 + obj_battle_hp_max_self.sprite_width) - 25, 400, string_hash_to_newline(string(global.current_hp_self) + " / " + string(global.max_hp_self)), text_col, text_col, text_col, text_col, global.image_alpha_enemy_attacking * image_alpha);
32
draw_set_alpha(image_alpha);
33
if (instance_exists(obj_dialogue_box_battle_transformation_any))
34
{
35
    with (obj_dialogue_box_battle_transformation_any)
36
    {
37
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, text_col, 1 * other.image_alpha);
38
        draw_rectangle_colour(bbox_left, bbox_top, bbox_left + 4, bbox_bottom, text_col, text_col, text_col, text_col, false);
39
        draw_rectangle_colour(bbox_right - 4, bbox_top, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
40
        draw_rectangle_colour(bbox_left, bbox_top, bbox_right, bbox_top + 4, text_col, text_col, text_col, text_col, false);
41
        draw_rectangle_colour(bbox_left, bbox_bottom - 4, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
42
    }
43
}
44
if (instance_exists(obj_dialogue_box_battle_transformation_any_out))
45
{
46
    with (obj_dialogue_box_battle_transformation_any_out)
47
    {
48
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, text_col, 1 * other.image_alpha);
49
        draw_rectangle_colour(bbox_left, bbox_top, bbox_left + 4, bbox_bottom, text_col, text_col, text_col, text_col, false);
50
        draw_rectangle_colour(bbox_right - 4, bbox_top, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
51
        draw_rectangle_colour(bbox_left, bbox_top, bbox_right, bbox_top + 4, text_col, text_col, text_col, text_col, false);
52
        draw_rectangle_colour(bbox_left, bbox_bottom - 4, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
53
    }
54
}
55
if (instance_exists(obj_dialogue_box_battle_transformation_any_in))
56
{
57
    with (obj_dialogue_box_battle_transformation_any_in)
58
    {
59
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, text_col, 1 * other.image_alpha);
60
        draw_rectangle_colour(bbox_left, bbox_top, bbox_left + 4, bbox_bottom, text_col, text_col, text_col, text_col, false);
61
        draw_rectangle_colour(bbox_right - 4, bbox_top, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
62
        draw_rectangle_colour(bbox_left, bbox_top, bbox_right, bbox_top + 4, text_col, text_col, text_col, text_col, false);
63
        draw_rectangle_colour(bbox_left, bbox_bottom - 4, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
64
    }
65
}
66
if (instance_exists(obj_dialogue_box_battle_transformation_attack))
67
{
68
    with (obj_dialogue_box_battle_transformation_attack)
69
    {
70
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, text_col, 1 * other.image_alpha);
71
        draw_rectangle_colour(bbox_left, bbox_top, bbox_left + 4, bbox_bottom, text_col, text_col, text_col, text_col, false);
72
        draw_rectangle_colour(bbox_right - 4, bbox_top, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
73
        draw_rectangle_colour(bbox_left, bbox_top, bbox_right, bbox_top + 4, text_col, text_col, text_col, text_col, false);
74
        draw_rectangle_colour(bbox_left, bbox_bottom - 4, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
75
    }
76
}
77
if (instance_exists(obj_dialogue_box_battle))
78
{
79
    with (obj_dialogue_box_battle)
80
    {
81
        draw_set_alpha(image_alpha * other.image_alpha);
82
        draw_self();
83
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, text_col, 1 * other.image_alpha);
84
        draw_rectangle_colour(bbox_left, bbox_top, bbox_left + 4, bbox_bottom, text_col, text_col, text_col, text_col, false);
85
        draw_rectangle_colour(bbox_right - 4, bbox_top, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
86
        draw_rectangle_colour(bbox_left, bbox_top, bbox_right, bbox_top + 4, text_col, text_col, text_col, text_col, false);
87
        draw_rectangle_colour(bbox_left, bbox_bottom - 4, bbox_right, bbox_bottom, text_col, text_col, text_col, text_col, false);
88
        draw_set_alpha(1);
89
    }
90
}
91
draw_set_alpha(1);