Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_debugger_Draw_64

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if show_timer
4
{
5
    var string_hours = string(global.elapsed_seconds div 3600)
6
    var string_minutes = string((global.elapsed_seconds div 60) % 60)
7
    var string_seconds = string(global.elapsed_seconds % 60)
8
    if (real(string_hours) < 10)
9
        string_hours = "0" + string_hours
10
    if (real(string_minutes) < 10)
11
        string_minutes = "0" + string_minutes
12
    if (real(string_seconds) < 10)
13
        string_seconds = "0" + string_seconds
14
    var playtime = string_hash_to_newline(string_hours + ":" + string_minutes + ":" + string_seconds)
15
    draw_set_color(c_white)
16
    draw_text(280, 10, playtime)
17
    return;
18
}
19
if (is_recording == true)
20
    return;
21
display_set_gui_size(640, 480)
22
draw_set_halign(fa_left)
23
draw_set_color(c_white)
24
draw_set_font(fnt_stats)
25
var xx = 8
26
var yy = 8
27
draw_set_color(c_white)
28
draw_text((xx + 180), yy, string_hash_to_newline("WASD - Nagivate#Q - Back#E - Confirm"))
29
if (floor(fps) < 30)
30
    draw_set_color(c_red)
31
draw_text((xx + 180), yy, string_hash_to_newline("###FPS: " + string(fps)))
32
draw_text((xx + 180), yy, string_hash_to_newline("####ROOM: " + string(room_get_name(room))))
33
draw_set_color(c_white)
34
if (dbg_menu == 0)
35
{
36
    for (var i = 1; i <= 5; i++)
37
    {
38
        draw_set_color(c_white)
39
        if (dbg_pos == i)
40
            draw_set_color(c_yellow)
41
        switch i
42
        {
43
            case 1:
44
                draw_text(xx, yy, string_hash_to_newline("[ROOMS]"))
45
                break
46
            case 2:
47
                draw_text(xx, (yy * 2), string_hash_to_newline("[BATTLES]"))
48
                break
49
            case 3:
50
                draw_text(xx, (yy * 3), string_hash_to_newline("[CHEATS]"))
51
                break
52
            case 4:
53
                draw_text(xx, (yy * 4), string_hash_to_newline("[RESTART GAME]"))
54
                break
55
            case 5:
56
                draw_text(xx, (yy * 5), string_hash_to_newline("[EXECUTE GML]"))
57
                break
58
        }
59
60
    }
61
}
62
if (dbg_menu == 1)
63
{
64
    for (i = 0; i <= dbg_room_count; i++)
65
    {
66
        yy = (-dbg_pos) * 8
67
        draw_set_color(c_white)
68
        if (dbg_pos == i)
69
            draw_set_color(c_yellow)
70
        draw_text(xx, (yy + (i + 1) * 8), string_hash_to_newline(ds_list_find_value(room_list, i)))
71
    }
72
}
73
if (dbg_menu == 2)
74
{
75
    for (i = 1; i <= 4; i++)
76
    {
77
        draw_set_color(c_white)
78
        if (dbg_pos == i)
79
            draw_set_color(c_yellow)
80
        switch i
81
        {
82
            case 1:
83
                draw_text(xx, yy, string_hash_to_newline("LVL UP"))
84
                break
85
            case 2:
86
                draw_text(xx, (yy * 2), string_hash_to_newline("LVL RESET"))
87
                break
88
            case 3:
89
                draw_text(xx, (yy * 3), string_hash_to_newline("CHOOSE BATTLE"))
90
                break
91
            case 4:
92
                draw_text(xx, (yy * 4), string_hash_to_newline("BOSS BATTLE"))
93
                break
94
        }
95
96
        draw_set_color(c_white)
97
        draw_text((xx + 100), (yy * 3), string_hash_to_newline(dbg_battle_enemy_name[dbg_enemy_current]))
98
        draw_text((xx + 100), (yy * 4), string_hash_to_newline(dbg_battle_boss_name[dbg_boss_current]))
99
    }
100
}
101
if (dbg_menu == 3)
102
{
103
    for (i = 0; i < ds_map_size(cheat_map); i++)
104
    {
105
        var current_value = ds_map_find_value(cheat_map, i)
106
        draw_set_color(c_white)
107
        if (dbg_pos == i)
108
            draw_set_color(c_yellow)
109
        var rt = "neutral"
110
        switch i
111
        {
112
            case 0:
113
                draw_text(xx, yy, string_hash_to_newline("GAME SPEED: " + string(current_value)))
114
                break
115
            case 1:
116
                draw_text(xx, (yy * 2), string_hash_to_newline("9999 HP: " + string(current_value)))
117
                break
118
            case 2:
119
                draw_text(xx, (yy * 3), string_hash_to_newline("NO COL: " + string(current_value)))
120
                break
121
            case 3:
122
                draw_text(xx, (yy * 4), string_hash_to_newline("GET G: " + string(current_value)))
123
                break
124
            case 4:
125
                draw_text(xx, (yy * 5), string_hash_to_newline("EASY ITEMS"))
126
                break
127
            case 5:
128
                switch current_value
129
                {
130
                    case 1:
131
                        rt = "neutral"
132
                        break
133
                    case 2:
134
                        rt = "pacifist"
135
                        break
136
                    case 3:
137
                        rt = "M U R D E R"
138
                        break
139
                }
140
141
                draw_text(xx, (yy * 6), string_hash_to_newline("ROUTE SELECT: " + rt))
142
            case 6:
143
                draw_text(xx, (yy * 7), string_hash_to_newline("KANAKO TIME"))
144
                break
145
            case 7:
146
                draw_text(xx, (yy * 8), string_hash_to_newline("SUPER DEBUG"))
147
                break
148
        }
149
150
    }
151
}
152
display_set_gui_size(320, 240)