Undertale script viewer

← back to main script listing

gml_Object_obj_settingsmenu_Draw_0

(view raw script w/o annotations or w/e)
1
buffer -= 1;
2
if (fun == 1 && harp == 0)
3
{
4
    harp = caster_load("music/harpnoise.ogg");
5
    if (weather == 1)
6
        weathermusic = caster_load("music/options_winter.ogg");
7
    if (weather == 2 || weather == 4)
8
        weathermusic = caster_load("music/options_fall.ogg");
9
    if (weather == 3)
10
        weathermusic = caster_load("music/options_summer.ogg");
11
}
12
if (weather == 1)
13
{
14
    c = instance_create(0, 0, obj_ct_fallobj);
15
    c.sprite_index = spr_christmasflake;
16
    siner += 1;
17
    draw_sprite_ext(spr_tobdog_winter, 0, 250, 218, 1, 1, 0, c_white, 1);
18
    draw_set_color(c_gray);
19
    draw_text_transformed(220 + sin(siner / 12), 120 + cos(siner / 12), 
cold outside#but stay warm#inside of you
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_fun_winter")
, 1, 1, -20);
20
}
21
if (weather == 2)
22
{
23
    c = instance_create(0, 0, obj_ct_fallobj);
24
    c.sprite_index = spr_fallleaf;
25
    c.image_blend = choose(merge_color(c_red, c_white, 0.5));
26
    siner += 1;
27
    draw_sprite_ext(spr_tobdog_spring, floor(siner / 15), 250, 218, 1, 1, 0, c_white, 1);
28
    draw_set_color(c_gray);
29
    draw_text_transformed(220 + sin(siner / 12), 120 + cos(siner / 12), 
spring time#back to school
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_fun_spring")
, 1, 1, -20);
30
}
31
if (weather == 3)
32
{
33
    extreme2 += 1;
34
    if (extreme2 >= 240)
35
    {
36
        extreme += 1;
37
        if (extreme >= 1100 && abs(sin(siner / 15)) < 0.1)
38
        {
39
            extreme = 0;
40
            extreme2 = 0;
41
        }
42
    }
43
    siner += 1;
44
    draw_sprite_ext(spr_tobdog_summer, floor(siner / 15), 250, 225, 2 + (sin(siner / 15) * (0.2 + (extreme / 900))), 2 - (sin(siner / 15) * (0.2 + (extreme / 900))), 0, c_white, 1);
45
    draw_set_color(c_yellow);
46
    draw_circle(258 + (cos(siner / 18) * 6), 40 + (sin(siner / 18) * 6), 28 + (sin(siner / 6) * 4), 0);
47
    draw_set_color(c_gray);
48
    draw_text_transformed(220 + sin(siner / 12), 120 + cos(siner / 12), 
try to withstand#the sun's life-#giving rays
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_fun_summer")
, 1, 1, -20);
49
}
50
if (weather == 4)
51
{
52
    c = instance_create(0, 0, obj_ct_fallobj);
53
    c.sprite_index = spr_fallleaf;
54
    c.image_blend = choose(c_yellow, c_orange, c_red);
55
    siner += 1;
56
    draw_sprite_ext(spr_tobdog_autumn, 0, 250, 218, 1, 1, 0, c_white, 1);
57
    draw_set_color(c_gray);
58
    draw_text_transformed(220 + sin(siner / 12), 120 + cos(siner / 12), 
sweep a leaf#sweep away a#troubles
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_fun_fall")
, 1, 1, -20);
59
}
60
var menu_max = 6;
61
if (global.osflavor <= 2)
62
{
63
    menu_max = 2;
64
    if (obj_time.j_ch == 0)
65
        menu_max = 1;
66
}
67
if (menu_engage == 0)
68
{
69
    if (keyboard_check_pressed(vk_down))
70
        menu += 1;
71
    if (keyboard_check_pressed(vk_up))
72
        menu -= 1;
73
    if (menu <= 0)
74
        menu = 0;
75
    if (menu >= menu_max)
76
        menu = menu_max;
77
    if (buffer < 0 && control_check_pressed(0))
78
    {
79
        if (!(global.osflavor >= 4 && menu >= 2 && menu <= 4))
80
        {
81
            menu_engage = 1;
82
            js_buffer = 1;
83
            buffer = 4;
84
        }
85
    }
86
    if (menu == 1)
87
    {
88
        if ((global.osflavor <= 2 && menu_engage == 1) || keyboard_check_pressed(vk_left) || keyboard_check_pressed(vk_right))
89
        {
90
            if (global.language == "en")
91
                global.language = "ja";
92
            else
93
                global.language = "en";
94
        }
95
        menu_engage = 0;
96
    }
97
    if (menu == 6)
98
    {
99
        if ((global.osflavor <= 2 && menu_engage == 1) || keyboard_check_pressed(vk_right))
100
        {
101
            do
102
            {
103
                global.screen_border_id++;
104
                if (global.screen_border_id > num_borders)
105
                    global.screen_border_id = 0;
106
            }
107
            until (global.screen_border_id < 0 || border_enabled[global.screen_border_id]);
108
            global.screen_border_state = 0;
109
            global.screen_border_dynamic_fade_id = 0;
110
            global.screen_border_dynamic_fade_level = 0;
111
            scr_enable_screen_border
scr_enable_screen_border

var flag = argument0; flag = flag != 0; if (flag != global.screen_border_active) { global.screen_border_active = flag != 0; global.screen_border_state = 0; global.screen_border_dynamic_fade_id = 0; global.screen_border_dynamic_fade_level = 0; }
(1);
112
        }
113
        else if (keyboard_check_pressed(vk_left))
114
        {
115
            do
116
            {
117
                global.screen_border_id--;
118
                if (global.screen_border_id < 0)
119
                    global.screen_border_id = num_borders;
120
            }
121
            until (global.screen_border_id < 0 || border_enabled[global.screen_border_id]);
122
            global.screen_border_state = 0;
123
            global.screen_border_dynamic_fade_id = 0;
124
            global.screen_border_dynamic_fade_level = 0;
125
            scr_enable_screen_border
scr_enable_screen_border

var flag = argument0; flag = flag != 0; if (flag != global.screen_border_active) { global.screen_border_active = flag != 0; global.screen_border_state = 0; global.screen_border_dynamic_fade_id = 0; global.screen_border_dynamic_fade_level = 0; }
(1);
126
        }
127
        menu_engage = 0;
128
    }
129
}
130
if (menu == 0 && menu_engage == 1)
131
    finish = 1;
132
draw_set_color(c_white);
133
scr_setfont
scr_setfont

var newfont = argument0; if (global.language == "ja") { if (newfont == fnt_main) newfont = fnt_ja_main; if (newfont == fnt_maintext) newfont = fnt_ja_maintext; if (newfont == fnt_plain) newfont = fnt_ja_plain; } draw_set_font(newfont);
(fnt_maintext);
134
scr_drawtext_centered_scaled
scr_drawtext_centered_scaled

var xx = argument0; var yy = argument1; var text = argument2; var xscale = argument3; var yscale = argument4; var display_scale = surface_get_width(application_surface) / view_wview[view_current]; var lineheight = round(string_height(" ") * yscale); var eol = string_pos("#", text); yy = round(yy * display_scale) / display_scale; while (eol != 0) { var line = substr(text, 1, eol); text = substr(text, eol + 1); width = string_width(line) * xscale; var line_x = round((xx - (width / 2)) * display_scale) / display_scale; draw_text_transformed(line_x, yy, line, xscale, yscale, 0); yy += lineheight; eol = string_pos("#", text); } var width = string_width(text) * xscale; draw_text_transformed(round(xx - (width / 2)), yy, text, xscale, yscale, 0);
(160, 10,
SETTINGS
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_title")
, 2, 2);
135
if (menu != 0)
136
    draw_set_color(c_white);
137
else
138
    draw_set_color(c_yellow);
139
draw_text(20, 40, 
EXIT
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_exit")
);
140
if (menu != 1)
141
    draw_set_color(c_white);
142
else
143
    draw_set_color(c_yellow);
144
draw_text(20, 70, 
LANGUAGE
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_language")
);
145
draw_text(92, 70, scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_language_" + global.language));
146
if (global.osflavor >= 4)
147
{
148
    draw_set_color(c_white);
149
    draw_text(20, 100, 
BUTTON CONFIG
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_button")
);
150
    var vspacing = 18;
151
    var button_x = 0;
152
    for (var i = 0; i < 3; i++)
153
    {
154
        if (menu == (i + 2))
155
            draw_set_color(c_yellow);
156
        else
157
            draw_set_color(c_white);
158
        var itext;
159
        if (i == 0)
160
            itext = 
CONFIRM
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_button_confirm")
;
161
        else if (i == 1)
162
            itext = 
CANCEL
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_button_cancel")
;
163
        else
164
            itext = 
MENU
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_button_menu")
;
165
        draw_text(40, 100 + ((i + 1) * vspacing), itext);
166
        draw_set_color(c_white);
167
        var xx = 40 + string_width(itext);
168
        if (xx > button_x)
169
            button_x = xx;
170
    }
171
    button_x += 15;
172
    for (var i = 0; i < 3; i++)
173
    {
174
        if (menu == (i + 2) && buffer < 0)
175
        {
176
            var button = -4;
177
            for (var b = 0; button_list[b] != -4; b++)
178
            {
179
                if (gamepad_button_check(0, button_list[b]))
180
                {
181
                    button = button_list[b];
182
                    break;
183
                }
184
            }
185
            if (button != -4)
186
            {
187
                if (menu == 2)
188
                {
189
                    if (global.button1 == button)
190
                        global.button1 = global.button0;
191
                    if (global.button2 == button)
192
                        global.button2 = global.button0;
193
                    global.button0 = button;
194
                }
195
                else if (menu == 3)
196
                {
197
                    if (global.button0 == button)
198
                        global.button0 = global.button1;
199
                    if (global.button2 == button)
200
                        global.button2 = global.button1;
201
                    global.button1 = button;
202
                }
203
                else
204
                {
205
                    if (global.button0 == button)
206
                        global.button0 = global.button2;
207
                    if (global.button1 == button)
208
                        global.button1 = global.button2;
209
                    global.button2 = button;
210
                }
211
                buffer = 4;
212
            }
213
        }
214
        var command = string_char_at("ZXC", i + 1);
215
        var sprite = scr_getbuttonsprite
scr_getbuttonsprite

var control = argument0; var type = argument1; if (control == "A") { if (os_type == os_ps4) return button_ps4_dpad_l; if (os_type == os_psvita) return button_vita_dpad_l; return noone; } if (control == "D") { if (os_type == os_ps4) return button_ps4_dpad_r; if (os_type == os_psvita) return button_vita_dpad_r; return noone; } var button = -4; if (control == "Z") button = global.button0; if (control == "X") button = global.button1; if (control == "C") button = global.button2; if (button == gp_face1) { if (os_type == os_ps4) { if (type == 1) return buttonL_ps4_cross; return button_ps4_cross; } if (os_type == os_psvita) { if (type == 1) return buttonL_vita_cross; return button_vita_cross; } } if (button == gp_face2) { if (os_type == os_ps4) { if (type == 1) return buttonL_ps4_circle; return button_ps4_circle; } if (os_type == os_psvita) { if (type == 1) return buttonL_vita_circle; return button_vita_circle; } } if (button == gp_face3) { if (os_type == os_ps4) { if (type == 1) return buttonL_ps4_square; return button_ps4_square; } if (os_type == os_psvita) { if (type == 1) return buttonL_vita_square; return button_vita_square; } } if (button == gp_face4) { if (os_type == os_ps4) { if (type == 1) return buttonL_ps4_triangle; return button_ps4_triangle; } if (os_type == os_psvita) { if (type == 1) return buttonL_vita_triangle; return button_vita_triangle; } } if (button == gp_shoulderl) { if (os_type == os_ps4) { if (type == 1) return buttonL_ps4_l1; return button_ps4_l1; } if (os_type == os_psvita) { if (type == 1) return buttonL_vita_l; return button_vita_l; } } if (button == gp_shoulderlb) ...
(command, 0);
216
        if (sprite != -4)
217
            draw_sprite(sprite, 0, button_x, 100 + ((i + 1) * vspacing));
218
    }
219
    if (r_buffer > 0)
220
    {
221
        r_buffer -= 1;
222
        draw_set_color(c_red);
223
        draw_text_transformed_color(20, 100 + (3 * vspacing) + 25, r_line, 1, 1, 0, c_red, c_red, c_red, c_red, 1 - ((10 - r_buffer) / 10));
224
    }
225
    else
226
    {
227
        if (menu != 5)
228
            draw_set_color(c_white);
229
        else
230
            draw_set_color(c_yellow);
231
        draw_text(20, 100 + (3 * vspacing) + 25, 
RESET TO DEFAULT
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_reset")
);
232
    }
233
    if (menu == 5 && menu_engage == 1)
234
    {
235
        r_buffer = 15;
236
        rrr = floor(random(50));
237
        if (fun == 1)
238
        {
239
            if (rrr == 1)
240
                r_line = 
SPAGHETTI...
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_spaghetted")
;
241
            else
242
                r_line = 
RESETTED...
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("joyconfig_resetted")
;
243
        }
244
        global.button0 = global.default_button0;
245
        global.button1 = global.default_button1;
246
        global.button2 = global.default_button2;
247
        global.analog_sense = global.default_analog_sense;
248
        global.analog_sense_sense = global.default_analog_sense_sense;
249
        global.joy_dir = global.default_joy_dir;
250
        menu_engage = 0;
251
    }
252
    if (menu != 6)
253
        draw_set_color(c_white);
254
    else
255
        draw_set_color(c_yellow);
256
    var border_label = 
BORDER
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_border")
;
257
    draw_text(20, 100 + (3 * vspacing) + 50, border_label);
258
    var border_sel;
259
    if (global.screen_border_id == 0)
260
        border_sel = 
NONE
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_border_none")
;
261
    else if (global.screen_border_id == -1)
262
        border_sel = "@!%&";
263
    else
264
        border_sel = scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_border_" + string(global.screen_border_id));
265
    draw_text(20 + string_width(border_label) + 20, 100 + (3 * vspacing) + 50, border_sel);
266
}
267
else if (obj_time.j_ch > 0)
268
{
269
    if (menu != 2)
270
        draw_set_color(c_white);
271
    else
272
        draw_set_color(c_yellow);
273
    draw_text(20, 100, 
Joystick Config
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("settings_joyconfig")
);
274
}
275
if (intro == 1)
276
{
277
    if (rectile == 16)
278
        caster_play(harp, 1, 1);
279
    rectile += 4;
280
    draw_set_color(c_black);
281
    ossafe_fill_rectangle(168 - rectile, -10, -1, 250);
282
    draw_set_color(c_black);
283
    ossafe_fill_rectangle(152 + rectile, -10, 330, 250);
284
    if (rectile >= 170)
285
    {
286
        caster_loop(weathermusic, 0.8, 1);
287
        menu_engage = 0;
288
        buffer = 5;
289
        intro = -1;
290
    }
291
}
292
if (global.osflavor <= 2 && menu == 2 && menu_engage == 1)
293
{
294
    jc = instance_create(0, 0, obj_joypadmenu);
295
    jc.menu_engage = 0;
296
    jc.buffer = buffer;
297
    jc.intro = intro;
298
    jc.rectile = rectile;
299
    jc.buffer = buffer;
300
    jc.weather = weather;
301
    jc.extreme = extreme;
302
    jc.extreme2 = extreme2;
303
    jc.harp = harp;
304
    jc.weathermusic = weathermusic;
305
    instance_destroy();
306
}