Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_overworldc_Draw_0

(view raw script w/o annotations or w/e)
1
buffer += 1;
2
if (global.interact == 5)
3
{
4
    xx = __view_get(e__VW.XView, view_current);
5
    yy = __view_get(e__VW.YView, view_current) + 10;
6
    moveyy = yy;
7
    var stat_right = langopt(263, 300);
8
    if (obj_mainchara.y > (yy + 120))
9
        moveyy += 135;
10
    if (global.menuno != 4)
11
    {
12
        draw_set_color(c_white);
13
        ossafe_fill_rectangle(16 + xx, 16 + moveyy, 86 + xx, 70 + moveyy, false);
14
        ossafe_fill_rectangle(16 + xx, 74 + yy, 86 + xx, 147 + yy, false);
15
        if (global.menuno == 1 || global.menuno == 5 || global.menuno == 6)
16
            ossafe_fill_rectangle(94 + xx, 16 + yy, 266 + xx, 196 + yy, false);
17
        if (global.menuno == 2)
18
            ossafe_fill_rectangle(94 + xx, 16 + yy, stat_right + 3 + xx, 224 + yy, false);
19
        if (global.menuno == 3)
20
            ossafe_fill_rectangle(94 + xx, 16 + yy, 266 + xx, 150 + yy, false);
21
        if (global.menuno == 7)
22
            ossafe_fill_rectangle(94 + xx, 16 + yy, 266 + xx, 216 + yy, false);
23
        draw_set_color(c_black);
24
        ossafe_fill_rectangle(19 + xx, 19 + moveyy, 83 + xx, 67 + moveyy, false);
25
        ossafe_fill_rectangle(19 + xx, 77 + yy, 83 + xx, 144 + yy, false);
26
        if (global.menuno == 1 || global.menuno == 5 || global.menuno == 6)
27
            ossafe_fill_rectangle(97 + xx, 19 + yy, 263 + xx, 193 + yy, false);
28
        if (global.menuno == 2)
29
            ossafe_fill_rectangle(97 + xx, 19 + yy, stat_right + xx, 221 + yy, false);
30
        if (global.menuno == 3)
31
            ossafe_fill_rectangle(97 + xx, 19 + yy, 263 + xx, 147 + yy, false);
32
        if (global.menuno == 7)
33
            ossafe_fill_rectangle(97 + xx, 19 + yy, 263 + xx, 213 + yy, false);
34
        draw_set_color(c_white);
35
        draw_set_font(fnt_small);
36
        draw_text(23 + xx, 49 + moveyy, string_hash_to_newline(stringsetsubloc("HP  ~1/~2", string(global.lhp), string(global.lmaxhp), "obj_overworldc_slash_Draw_0_gml_37_0")));
37
        draw_text(23 + xx, 40 + moveyy, string_hash_to_newline(stringsetsubloc("LV  ~1", string(global.llv), "obj_overworldc_slash_Draw_0_gml_38_0")));
38
        draw_text(23 + xx, 58 + moveyy, string_hash_to_newline(stringsetsubloc("$   ~1", string(global.lgold), "obj_overworldc_slash_Draw_0_gml_40_0")));
39
        
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("main");
40
        draw_text(23 + xx, 20 + moveyy, string_hash_to_newline(global.lcharname));
41
        var _itemTextColor = hasitems ? c_white : c_gray;
42
        draw_set_color(_itemTextColor);
43
        draw_text(42 + xx, 84 + yy, string_hash_to_newline(stringsetloc(
ITEM
"ITEM", "obj_overworldc_slash_Draw_0_gml_42_0"
)));
44
        draw_set_color(c_white);
45
        draw_text(42 + xx, 102 + yy, string_hash_to_newline(stringsetloc(
STAT
"STAT", "obj_overworldc_slash_Draw_0_gml_43_0"
)));
46
        draw_text(42 + xx, 120 + yy, string_hash_to_newline(stringsetloc(
CELL
"CELL", "obj_overworldc_slash_Draw_0_gml_44_0"
)));
47
        if (global.menuno == 1 || global.menuno == 5)
48
        {
49
            for (i = 0; i < 8; i += 1)
50
                draw_text(116 + xx, 30 + yy + (i * 16), string_hash_to_newline(global.litemname[i]));
51
            draw_text(116 + xx, 170 + yy, string_hash_to_newline(stringsetloc(
USE
"USE", "obj_overworldc_slash_Draw_0_gml_52_0"
)));
52
            draw_text(116 + xx + 48, 170 + yy, string_hash_to_newline(stringsetloc(
INFO
"INFO", "obj_overworldc_slash_Draw_0_gml_53_0"
)));
53
            draw_text(116 + xx + 105, 170 + yy, string_hash_to_newline(stringsetloc(
DROP
"DROP", "obj_overworldc_slash_Draw_0_gml_54_0"
)));
54
        }
55
    }
56
    if (global.menuno == 3)
57
    {
58
        for (i = 0; i < 7; i += 1)
59
            draw_text(116 + xx, 30 + yy + (i * 16), string_hash_to_newline(global.phonename[i]));
60
    }
61
    if (global.menuno == 2)
62
    {
63
        draw_text(108 + xx, 32 + yy, string_hash_to_newline(stringsetsubloc("\"~1\"", global.lcharname, "obj_overworldc_slash_Draw_0_gml_66_0")));
64
        draw_text(108 + xx, 62 + yy, string_hash_to_newline(stringsetsubloc("LV  ~1", string(global.llv), "obj_overworldc_slash_Draw_0_gml_68_0")));
65
        draw_text(108 + xx, 78 + yy, string_hash_to_newline(stringsetsubloc("HP  ~1 / ~2", string(global.lhp), string(global.lmaxhp), "obj_overworldc_slash_Draw_0_gml_69_0")));
66
        draw_text(108 + xx, 110 + yy, string_hash_to_newline(stringsetsubloc("AT  ~1 (~2)", string(global.lat), string(global.lwstrength), "obj_overworldc_slash_Draw_0_gml_71_0")));
67
        draw_text(108 + xx, 126 + yy, string_hash_to_newline(stringsetsubloc("DF  ~1 (~2)", string(global.ldf), string(global.ladef), "obj_overworldc_slash_Draw_0_gml_72_0")));
68
        weaponname = stringsetloc(
None
"None", "obj_overworldc_slash_Draw_0_gml_73_0"
);
69
        armorname = stringsetloc(
None
"None", "obj_overworldc_slash_Draw_0_gml_74_0"
);
70
        if (global.lweapon == 2)
71
            weaponname = stringsetloc(
Pencil
"Pencil", "obj_overworldc_slash_Draw_0_gml_75_0"
);
72
        if (global.lweapon == 6)
73
            weaponname = stringsetloc(
Halloween Pencil
"Halloween Pencil", "obj_overworldc_slash_Draw_0_gml_76_0"
);
74
        if (global.lweapon == 7)
75
            weaponname = stringsetloc(
Lucky Pencil
"Lucky Pencil", "obj_overworldc_slash_Draw_0_gml_77_0"
);
76
        if (global.lweapon == 12)
77
            weaponname = stringsetloc(
Eraser
"Eraser", "obj_overworldc_slash_Draw_0_gml_78_0_b"
);
78
        if (global.lweapon == 13)
79
            weaponname = stringsetloc(
Mech. Pencil
"Mech. Pencil", "obj_overworldc_slash_Draw_0_gml_79_0"
);
80
        if (global.lweapon == 15)
81
            weaponname = stringsetloc(
Holiday Pencil
"Holiday Pencil", "obj_overworldc_slash_Draw_0_gml_83_0_b"
);
82
        if (global.lweapon == 16)
83
            weaponname = stringsetloc(
CactusNeedle
"CactusNeedle", "obj_overworldc_slash_Draw_0_gml_84_0"
);
84
        if (global.lweapon == 17)
85
            weaponname = stringsetloc(
BlackShard
"BlackShard", "obj_overworldc_slash_Draw_0_gml_85_0"
);
86
        if (global.lweapon == 18)
87
            weaponname = stringsetloc(
QuillPen
"QuillPen", "scr_litemname_slash_scr_litemname_gml_24_0"
);
88
        if (global.larmor == 3)
89
            armorname = stringsetloc(
Bandage
"Bandage", "obj_overworldc_slash_Draw_0_gml_78_0"
);
90
        if (global.larmor == 14)
91
            armorname = stringsetloc(
Wristwatch
"Wristwatch", "obj_overworldc_slash_Draw_0_gml_81_0_b"
);
92
        draw_text(108 + xx, 156 + yy, string_hash_to_newline(stringsetsubloc("WEAPON: ~1", weaponname, "obj_overworldc_slash_Draw_0_gml_81_0")));
93
        draw_text(108 + xx, 172 + yy, string_hash_to_newline(stringsetsubloc("ARMOR: ~1", armorname, "obj_overworldc_slash_Draw_0_gml_82_0")));
94
        draw_text(108 + xx, 192 + yy, string_hash_to_newline(stringsetsubloc("MONEY: ~1", string(global.lgold), "obj_overworldc_slash_Draw_0_gml_83_0")));
95
        if (string_length(global.lcharname) >= 7)
96
        {
97
            draw_text(192 + xx, 32 + yy, string_hash_to_newline(stringsetloc(
???
"???", "obj_overworldc_slash_Draw_0_gml_88_0"
)));
98
        }
99
        else if (global.flag[914 chapter_started] > 0)
100
        {
101
            var krispreservationsociety = stringsetsubloc("Since#Chapter ~1", global.flag[914 chapter_started], "obj_overworldc_slash_Draw_0_gml_95_0");
102
            draw_text(192 + xx, 32 + yy, string_hash_to_newline(krispreservationsociety));
103
        }
104
        nextlevel = 0;
105
        draw_text(192 + xx, 110 + yy, string_hash_to_newline(stringsetsubloc("EXP: ~1", string(global.lxp), "obj_overworldc_slash_Draw_0_gml_92_0")));
106
        if (global.llv == 1)
107
            nextlevel = 10 - global.lxp;
108
        if (global.llv == 2)
109
            nextlevel = 30 - global.lxp;
110
        if (global.llv == 3)
111
            nextlevel = 70 - global.lxp;
112
        if (global.llv == 4)
113
            nextlevel = 120 - global.lxp;
114
        if (global.llv == 5)
115
            nextlevel = 200 - global.lxp;
116
        if (global.llv == 6)
117
            nextlevel = 300 - global.lxp;
118
        if (global.llv == 7)
119
            nextlevel = 500 - global.lxp;
120
        if (global.llv == 8)
121
            nextlevel = 800 - global.lxp;
122
        if (global.llv == 9)
123
            nextlevel = 1200 - global.lxp;
124
        if (global.llv == 10)
125
            nextlevel = 1700 - global.lxp;
126
        if (global.llv == 11)
127
            nextlevel = 2500 - global.lxp;
128
        if (global.llv == 12)
129
            nextlevel = 3500 - global.lxp;
130
        if (global.llv == 13)
131
            nextlevel = 5000 - global.lxp;
132
        if (global.llv == 14)
133
            nextlevel = 7000 - global.lxp;
134
        if (global.llv == 15)
135
            nextlevel = 10000 - global.lxp;
136
        if (global.llv == 16)
137
            nextlevel = 15000 - global.lxp;
138
        if (global.llv == 17)
139
            nextlevel = 25000 - global.lxp;
140
        if (global.llv == 18)
141
            nextlevel = 50000 - global.lxp;
142
        if (global.llv == 19)
143
            nextlevel = 99999 - global.lxp;
144
        if (global.llv >= 20)
145
            nextlevel = 0;
146
        draw_text(192 + xx, 126 + yy, string_hash_to_newline(stringsetsubloc("NEXT: ~1", string(nextlevel), "obj_overworldc_slash_Draw_0_gml_113_0")));
147
    }
148
    if (global.menuno == 444)
149
    {
150
    }
151
    if (global.menuno == 0)
152
        draw_sprite(spr_heartsmall, 0, 28 + xx, 88 + yy + (18 * global.menucoord[0]));
153
    if (global.menuno == 1)
154
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[1]));
155
    if (global.menuno == 3)
156
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[3]));
157
    if (global.menuno == 6)
158
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[6]));
159
    if (global.menuno == 7)
160
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[7]));
161
    if (global.menuno == 5)
162
    {
163
        if (global.menucoord[5] == 0)
164
            draw_sprite(spr_heartsmall, 0, 104 + xx + (45 * global.menucoord[5]), 174 + yy);
165
        if (global.menucoord[5] == 1)
166
            draw_sprite(spr_heartsmall, 0, 104 + xx + ((45 * global.menucoord[5]) + 3), 174 + yy);
167
        if (global.menucoord[5] == 2)
168
            draw_sprite(spr_heartsmall, 0, 104 + xx + ((45 * global.menucoord[5]) + 15), 174 + yy);
169
    }
170
}
171
172
enum e__VW
173
{
174
    XView,
175
    YView,
176
    WView,
177
    HView,
178
    Angle,
179
    HBorder,
180
    VBorder,
181
    HSpeed,
182
    VSpeed,
183
    Object,
184
    Visible,
185
    XPort,
186
    YPort,
187
    WPort,
188
    HPort,
189
    Camera,
190
    SurfaceID
191
}