Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_phase_2_red_shader_Draw_0

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