Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_DEVICE_MENU_Create_0

(view raw script w/o annotations or w/e)
1
TYPE = 1;
2
SUBTYPE = 0;
3
CH = string(global.chapter);
4
if (scr_completed_chapter_any_slot(global.chapter))
5
    SUBTYPE = 1;
6
COMPLETEFILE_PREV[0] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_3");
7
COMPLETEFILE_PREV[1] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_4");
8
COMPLETEFILE_PREV[2] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_5");
9
INCOMPLETEFILE_PREV[0] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_0");
10
INCOMPLETEFILE_PREV[1] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_1");
11
INCOMPLETEFILE_PREV[2] = ossafe_file_exists("filech" + string(global.chapter - 1) + "_2");
12
INCOMPLETE_LOAD = 0;
13
if (TYPE == 0)
14
{
15
    
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] != 1 && global.chapter == 1) window_set_caption(arg0); else window_set_caption("DELTARUNE Chapter 4"); }
(stringsetloc(
CONTACT
"CONTACT", "DEVICE_MENU_slash_Create_0_gml_8_0"
));
16
    global.currentsong[0] = snd_init("AUDIO_DRONE.ogg");
17
    global.currentsong[1] = mus_loop(global.currentsong[0]);
18
}
19
if (TYPE == 1)
20
{
21
    instance_create(0, 0, obj_fadein);
22
    global.tempflag[10] = 1;
23
    
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] != 1 && global.chapter == 1) window_set_caption(arg0); else window_set_caption("DELTARUNE Chapter 4"); }
(stringsetloc(
DELTARUNE
"DELTARUNE", "DEVICE_MENU_slash_Create_0_gml_17_0"
));
24
    if (SUBTYPE == 0)
25
        global.currentsong[0] = snd_init("menu.ogg");
26
    if (SUBTYPE == 1)
27
        global.currentsong[0] = snd_init("quiet_church.ogg");
28
    if (SUBTYPE >= 1)
29
        scr_enable_chapter_skip(global.chapter);
30
    global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 0.95);
31
}
32
BGMADE = 0;
33
BG_ALPHA = 0;
34
BG_SINER = 0;
35
OBMADE = 0;
36
OB_DEPTH = 0;
37
obacktimer = 0;
38
OBM = 0.5;
39
COL_A = c_green;
40
COL_B = c_lime;
41
COL_PLUS = merge_color(c_lime, c_white, 0.5);
42
jamod = 0;
43
if (TYPE == 1)
44
{
45
    BGSINER = 0;
46
    BGMAGNITUDE = 6;
47
    COL_A = merge_color(c_ltgray, c_navy, 0.2);
48
    COL_B = c_white;
49
    COL_PLUS = merge_color(c_yellow, c_white, 0.5);
50
    BGMADE = 1;
51
    BG_ALPHA = 0;
52
    ANIM_SINER = 0;
53
    ANIM_SINER_B = 0;
54
    TRUE_ANIM_SINER = 0;
55
    if (SUBTYPE == 0)
56
    {
57
        COL_A = merge_color(c_ltgray, c_maroon, 0.2);
58
        COL_B = c_white;
59
        COL_PLUS = merge_color(c_yellow, c_white, 0.4);
60
        BGMADE = 0;
61
    }
62
}
63
MENU_NO = 0;
64
for (i = 0; i < 12; i += 1)
65
    MENUCOORD[i] = 0;
66
XL = 210;
67
YL = 40;
68
YS = 5;
69
HEARTX = 75;
70
HEARTY = 110;
71
HEARTXCUR = 75;
72
HEARTYCUR = 75;
73
MOVENOISE = 0;
74
SELNOISE = 0;
75
BACKNOISE = 0;
76
DEATHNOISE = 0;
77
STARTGAME = 0;
78
REMMENU = 0;
79
CANQUIT = 1;
80
if (global.is_console == 1)
81
    CANQUIT = 0;
82
ONEBUFFER = 2;
83
TWOBUFFER = 0;
84
THREAT = 0;
85
TEMPMESSAGE = " ";
86
MESSAGETIMER = 0;
87
version_text = "1.00";
88
if (scr_is_switch_os())
89
    version_text = "1.03";
90
if (os_type == os_ps4 || os_type == os_ps5)
91
    version_text = "1.00";
92
for (i = 0; i < 3; i += 1)
93
    FILE[i] = 0;
94
for (i = 0; i < 3; i += 1)
95
{
96
    FILE[i] = 0;
97
    NAME[i] = stringsetloc(
[EMPTY]
"[EMPTY]", "DEVICE_MENU_slash_Create_0_gml_97_0"
);
98
    TIME[i] = 0;
99
    PLACE[i] = "------------";
100
    LEVEL[i] = 0;
101
    TIME_STRING[i] = "--:--";
102
    INITLANG[i] = 0;
103
}
104
if (ossafe_file_exists("filech" + CH + "_0"))
105
{
106
    FILE[0] = 1;
107
    NAME[0] = "FILE0";
108
}
109
if (ossafe_file_exists("filech" + CH + "_1"))
110
{
111
    FILE[1] = 1;
112
    NAME[1] = "FILE1";
113
}
114
if (ossafe_file_exists("filech" + CH + "_2"))
115
{
116
    FILE[2] = 1;
117
    NAME[2] = "FILE2";
118
}
119
if (ossafe_file_exists("dr.ini"))
120
{
121
    ossafe_ini_open("dr.ini");
122
    for (i = 0; i < 3; i += 1)
123
    {
124
        if (FILE[i] == 1)
125
        {
126
            var room_id = ini_read_real(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter, i), "Room", scr_get_id_by_room_index(room));
127
            var room_index = 
scr_get_room_by_id
scr_get_room_by_id

function
scr_get_room_by_id(arg0)
{ var room_id = arg0; var rooms = scr_get_room_list(); if (room_id < 10000) room_id += (global.chapter * 10000); var room_index = 0; for (var i = 0; i < array_length_1d(rooms); i++) { if (rooms[i].room_id == room_id) { room_index = rooms[i].room_index; break; } } if (room_index == 0) show_debug_message("*** ERROR: could not find room with id " + string(room_id)); return room_index; } function scr_get_id_by_room_index(arg0) { var room_index = arg0; var rooms = scr_get_room_list(); var room_id = room_gms_debug_failsafe; for (var i = 0; i < array_length_1d(rooms); i++) { if (rooms[i].room_index == room_index) { room_id = rooms[i].room_id; break; } } if (room_id == room_gms_debug_failsafe) show_debug_message("*** ERROR: could not find room with index " + string(room_index)); return room_id; } function scr_room(arg0, arg1) constructor { room_index = arg0; room_id = arg1; } function scr_get_room_list() { var idsarr = [new scr_room(room_krisroom, 40014), new scr_room(room_krishallway, 40015), new scr_room(room_torroom, 40016), new scr_room(room_torhouse, 40017), new scr_room(room_torbathroom, 40018), new scr_room(room_town_krisyard, 40019), new scr_room(room_town_northwest, 40020), new scr_room(room_town_north, 40021), new scr_room(room_beach, 40022), new scr_room(room_town_mid, 40023), new scr_room(room_town_apartments, 40024), new scr_room(room_town_south, 40025), new scr_room(room_town_school, 40026), new scr_room(room_town_church, 40027), new scr_room(room_graveyard, 40028), new scr_room(room_town_shelter, 40029), new scr_room(room_hospital_lobby, 40030), new scr_room(room_hospital_hallway, 40031), new scr_room(room_hospital_rudy, 40032), new scr_room(room_hospital_room2, 40033), new scr_room(room_diner, 40034), new scr_room(room_townhall, 40035), new scr_room(room_flowershop_1f, 40036), new scr_room(room_flowershop_2f, 40037), new scr_room(room_library, 40038), new scr_room(room_alphysalley, 40039), new scr_room(room_lw_computer_lab, 40040), new scr_room(room_lw_library_upstairs, 40041), new scr_room(room_lw_police, 40042), new scr_room(room_lw_conbini, 40043), new scr_room(room_lw_icee_pizza, 40044), new scr_room(room_lw_church_entrance, 40045), new scr_room(room_lw_church_main, 40046), new scr_room(room_lw_noellehouse_main, 40047), new scr_room(room_lw_noellehouse_kitchen, 40048), new scr_room(room_lw_noellehouse_bathroom, 40049), new scr_room(room_lw_noellehouse_keyroom, 40050), new scr_room(room_lw_noellehouse_noelle, 40051), new scr_room(room_lw_noellehouse_dess, 40052), new scr_room(room_lw_noellehouse_closet, 40053), new scr_room(room_torielclass, 40054), new scr_room(room_schoollobby, 40055), new scr_room(room_alphysclass, 40056), new scr_room(room_schooldoor, 40057), new scr_room(room_insidecloset, 40058), new scr_room(room_school_unusedroom, 40059), new scr_room(room_castle_tutorial, 40060), new scr_room(room_dw_castle_east_door, 40061), new scr_room(room_dw_castle_west_cliff, 40062), new scr_room(room_dw_castle_area_1, 40063), new scr_room(room_dw_castle_town, 40064), new scr_room(room_dw_ralsei_castle_front, 40065), new scr_room(room_dw_castle_restaurant, 40066), new scr_room(room_dw_castle_cafe, 40067), new scr_room(room_dw_castle_dojo, 40068), new scr_room(room_dw_ralsei_castle_1f, 40069), new scr_room(room_dw_ralsei_castle_2f, 40070), new scr_room(room_dw_castle_dungeon, 40071), new scr_room(room_dw_castle_rooms_kris, 40072), new scr_room(room_dw_castle_rooms_susie, 40073), new scr_room(PLACE_MENU, 40083), new scr_room(room_cc_lancer, 40088), new scr_room(room_cc_clover, 40089), new scr_room(room_cc_fountain, 40090), new scr_room(room_dw_church_slidingbookshelf, 40101), new scr_room(room_dw_church_bellplay, 40104), new scr_room(room_intro_ch4, 40105), new scr_room(room_dw_church_candlelighting, 40106), new scr_room(room_town_noellehouse, 40107), new scr_room(room_dw_church_intro1, 40108), new scr_room(room_dw_church_intro3, 40109), new scr_room(room_dw_church_intro_guei, 40110), new scr_room(room_dw_church_lantern_hallway, 40113), new scr_room(room_dw_church_gersonstudy, 40115), new scr_room(room_dw_church_stairs_west_bell, 40116), new scr_room(room_dw_church_librarybookenemy, 40117), new scr_room(room_dw_church_bookshelfpuzzle1, 40118), new scr_room(room_dw_church_bookshelfpuzzle2, 40119), new scr_room(room_dw_church_worshiproom, 40120), new scr_room(room_dw_church_swingingbell, 40121), new scr_room(room_dw_church_tallbookcases, 40122), new scr_room(room_dw_church_lantern2, 40123), new scr_room(room_dw_church_smallbells, 40124), new scr_room(room_dw_church_claw, 40125), new scr_room(room_dw_church_shelfclimb1, 40126), new scr_room(room_dw_church_statueclimb, 40127), new scr_room(room_dw_church_offering, 40128), new scr_room(room_dw_church_npcroom_shelfclimb, 40129), new scr_room(room_dw_church_stairs_stainedglass, 40130), new scr_room(room_dw_church_bellsareawest, 40131), new scr_room(room_dw_church_stairs_topright, 40132), new scr_room(room_dw_church_poolsroom1, 40133), new scr_room(room_dw_church_candlesroom1, 40134), new scr_room(room_dw_church_solowaterfall, 40135), new scr_room(room_dw_church_statueroom, 40136), new scr_room(room_dw_church_poolsroom2, 40137), new scr_room(room_dw_church_shelfclimb2, 40138), new scr_room(room_dw_church_statueclimb_npcroom, 40139), new scr_room(room_dw_church_bellhall_west, 40140), new scr_room(room_dw_church_fountainconnection, 40141), new scr_room(room_dw_church_stainedglasspreview, 40142), new scr_room(room_dw_church_stairs_topleft, 40143), new scr_room(room_dw_church_npcroom_pools1, 40144), new scr_room(room_dw_church_poolsroom1_east, 40145), new scr_room(room_dw_church_minorlegend, 40146), new scr_room(room_dw_church_bookenemywest, 40147), new scr_room(room_dw_church_poolsroom2south, 40148), new scr_room(room_lw_church_office, 40149), new scr_room(room_dw_church_bellhall_east, 40150), new scr_room(room_dw_church_bellhall_central, 40151), new scr_room(room_dw_ralsei_castle_3f, 40154), new scr_room(room_dw_castle_rooms_ralsei, 40155), new scr_room(room_dw_rotating_tower, 40156), new scr_room(room_krisroom_dark, 40159), new scr_room(room_lw_noellehouse_vents_west, 40162), new scr_room(room_town_krisyard_dark, 40166), new scr_room(room_dw_castle_rooms_queen, 40167), new scr_room(room_dw_castle_rooms_tenna, 40168), new scr_room(room_dw_church_ripplepuzzle, 40171), new scr_room(room_dw_church_glass, 40173), new scr_room(room_dw_church_staircase, 40174), new scr_room(room_dw_church_bellhall_bookroom, 40175), new scr_room(room_dw_church_bookcase, 40176), new scr_room(room_dw_church_savepoint, 40177), new scr_room(room_dw_church_dark_fire_puzzle, 40178), new scr_room(room_dw_church_turtles, 40179), new scr_room(room_dw_church_guei, 40180), new scr_room(room_dw_church_jackenstein, 40181), new scr_room(room_dw_church_bellhall_curtain, 40182), new scr_room(room_dw_church_dogclimb, 40184), new scr_room(room_dw_church_arena, 40185), new scr_room(room_dw_churchb_nongerson_post, 40192), new scr_room(room_lw_noellehouse_vents_north, 40193), new scr_room(room_lw_noellehouse_vents_east, 40194), new scr_room(room_lw_noellehouse_vents_south, 40195), new scr_room(room_dw_church_climbtut, 40205), new scr_room(room_dw_church_fastwater, 40206), new scr_room(room_dw_church_crumbletower, 40207), new scr_room(room_dw_church_tower1, 40208), new scr_room(room_lw_church_choir, 40209), new scr_room(room_dw_church_bellclimb, 40210), new scr_room(room_dw_church_shiftclimb, 40211), new scr_room(room_dw_church_intropiano, 40212), new scr_room(room_dw_church_intro_gerson, 40213), new scr_room(room_dw_church_pianopiece_left, 40214), new scr_room(room_dw_church_northprophecies, 40215), new scr_room(room_dw_church_darkmaze, 40216), new scr_room(room_dw_church_quicktest, 40217), new scr_room(room_dw_church_pianopiece_right, 40218), new scr_room(room_dw_church_pianopuzzle, 40219), new scr_room(room_dw_church_nwconnect, 40220), new scr_room(room_dw_church_rightconnect, 40221), new scr_room(room_dw_church_stairspreview, 40222), new scr_room(room_dw_church_trueclimbadventure, 40223), new scr_room(room_dw_church_organpuzzle, 40224), new scr_room(room_dw_church_mizzleencounter, 40225), new scr_room(room_dw_church_sideclimb, 40226), new scr_room(room_dw_church_secretpiano, 40227), new scr_room(room_dw_church_ripplepuzzle_postgers, 40228), new scr_room(room_dw_church_tallbookcases_backup, 40229), new scr_room(room_dw_church_fountain, 40230), new scr_room(room_dw_church_b_intro, 40231), new scr_room(room_dw_churchc_final_prophecy, 40232), new scr_room(room_dw_church_bookshelfpuzzle, 40233), new scr_room(room_lw_noellehouse_basement, 40234), new scr_room(room_dw_church_biblioxencounter, 40235), new scr_room(room_dw_church_darkclimb, 40236), new scr_room(room_dw_church_moneyfountain, 40237), new scr_room(room_dw_church_pianopiece_left_b, 40239), new scr_room(room_dw_church_pianopiece_rightprophecy, 40240), new scr_room(room_dw_church_shadowgerson, 40242), new scr_room(room_dw_church_holywatercooler, 40243), new scr_room(room_dw_church_rippleworship, 40244), new scr_room(room_dw_church_waterfallroom, 40245), new scr_room(room_dw_church_waterfalltearoom, 40246), new scr_room(room_dw_castle_rooms_kris_susie, 40247), new scr_room(room_dw_churchb_staircaseintro, 40248), new scr_room(room_dw_churchb_prophecyencounter, 40249), new scr_room(room_dw_churchb_worshiproom, 40250), new scr_room(room_dw_churchb_libraryconnector, 40251), new scr_room(room_dw_churchb_savepoint, 40252), new scr_room(room_dw_churchb_rotatingtower, 40253), new scr_room(room_dw_churchb_bellroom, 40254), new scr_room(room_dw_churchb_escherstaircase, 40255), new scr_room(room_dw_churchb_prophecymaze, 40256), new scr_room(room_dw_churchb_rotatingtower2, 40257), new scr_room(room_dw_churchb_gersonstudy, 40258), new scr_room(room_dw_churchb_gersonchase, 40259), new scr_room(room_dw_churchb_extinguisher, 40260), new scr_room(room_dw_church_knightclimb, 40261), new scr_room(room_dw_church_knightclimb_post, 40262), new scr_room(room_dw_rhythm, 40263), new scr_room(room_dw_rhythm_countdown, 40264), new scr_room(room_dw_rhythm_empty, 40265), new scr_room(room_rhythmgame_editor, 40266), new scr_room(room_dw_churchb_ripple1, 40267), new scr_room(room_dw_churchb_ripplepost, 40268), new scr_room(room_dw_churchb_library_alternate, 40269), new scr_room(room_dw_churchb_moneyfountain, 40270), new scr_room(room_dw_churchc_superprophecies, 40271), new scr_room(room_dw_churchc_encounter1, 40272), new scr_room(room_dw_churchc_slidingpiano, 40273), new scr_room(room_dw_churchc_ripplesneak_poc, 40274), new scr_room(room_dw_churchc_encounter2, 40275), new scr_room(room_dw_churchc_finalclimb, 40276), new scr_room(room_dw_churchc_angelprophecy_encounter, 40277), new scr_room(room_dw_churchc_savepoint, 40278), new scr_room(room_dw_churchc_darkswords, 40279), new scr_room(room_dw_churchc_pretitan, 40280), new scr_room(room_dw_churchc_prepretitan, 40281), new scr_room(room_dw_churchc_titandefeated, 40282), new scr_room(room_dw_churchb_fountain, 40283), new scr_room(room_dw_church_ripseq1, 40284), new scr_room(room_dw_church_ripseq2, 40285), new scr_room(room_dw_churchc_titanclimb1, 40286), new scr_room(room_dw_churchc_titanclimb2, 40287), new scr_room(room_lw_noellehouse_north, 40291), new scr_room(room_lw_noellehouse_vents_north_west, 40292), new scr_room(room_dw_churchb_fireplace, 40296), new scr_room(room_dw_churchb_nongerson, 40297), new scr_room(room_dw_churchb_library, 40298), new scr_room(room_dw_castle_tv_rhythm, 40299), new scr_room(room_dw_castle_tv, 40300), new scr_room(room_dw_churchb_windows, 40301), new scr_room(room_dw_churchb_bookshelf, 40302), new scr_room(room_dw_churchb_man, 40303), new scr_room(room_dw_churchb_gallery, 40304), new scr_room(room_dw_churchb_rotatingtower_old, 40305), new scr_room(room_dw_churchb_darkclimb, 40306), new scr_room(room_dw_churchc_titanclimb1_post, 40307), new scr_room(room_dw_churchc_titanclimb2_post, 40308), new scr_room(room_dw_churchb_darkclimb_scene, 40309), new scr_room(room_dw_churchc_dodge, 40310), new scr_room(room_dw_churchc_insidetitan, 40311), new scr_room(room_dw_churchc_prophecies, 40313), new scr_room(room_dw_churchc_angelprophecy, 40314), new scr_room(room_dw_church_bookshelfpuzzle_rev, 40315), new scr_room(room_dw_churchc_treasurechest, 40317), new scr_room(room_dw_castle_tv_zone_1, 40321), new scr_room(room_dw_castle_tv_zone_2, 40322), new scr_room(room_dw_castle_tv_zone_3, 40323), new scr_room(room_dw_castle_tv_zone_battle, 40324), new scr_room(room_dw_castle_tv_zone_minigame, 40325)]; return idsarr; }
(room_id);
128
            PLACE[i] = 
scr_roomname
scr_roomname

function
scr_roomname(arg0)
{ roomname = stringsetloc(
Dark World?
"Dark World?", "scr_roomname_slash_scr_roomname_gml_1_0"
);
if (arg0 == 0) roomname = stringsetloc(
---
"---", "scr_roomname_slash_scr_roomname_gml_2_0"
);
if (arg0 == 15) roomname = stringsetloc(
Kris's Room
"Kris's Room", "scr_roomname_slash_scr_roomname_gml_4_0_b"
);
if (arg0 == 24) roomname = stringsetloc(
Hometown
"Hometown", "scr_roomname_slash_scr_roomname_gml_5_0_b"
);
if (arg0 == 49) roomname = stringsetloc(
Noelle's House
"Noelle's House", "scr_roomname_slash_scr_roomname_gml_6_0"
);
if (arg0 == 65) roomname = stringsetloc(
My Castle Town
"My Castle Town", "scr_roomname_slash_scr_roomname_gml_5_0"
);
var church_name_a = stringsetloc(
Dark Sanctuary
"Dark Sanctuary", "scr_roomname_slash_scr_roomname_gml_7_0_b"
);
if (arg0 == 108) roomname = stringsetsubloc("~1 - Atrium", church_name_a, "scr_roomname_slash_scr_roomname_gml_8_0_c"); if (arg0 == 177) roomname = stringsetsubloc("~1 - Lower Left", church_name_a, "scr_roomname_slash_scr_roomname_gml_9_0_c"); if (arg0 == 227) roomname = stringsetsubloc("~1 - Lower Right", church_name_a, "scr_roomname_slash_scr_roomname_gml_10_0"); if (arg0 == 115) roomname = stringsetsubloc("~1 - Study", church_name_a, "scr_roomname_slash_scr_roomname_gml_11_0_b"); if (arg0 == 219) roomname = stringsetsubloc("~1 - Library", church_name_a, "scr_roomname_slash_scr_roomname_gml_12_0"); if (arg0 == 218) roomname = stringsetsubloc("~1 - Small Piano", church_name_a, "scr_roomname_slash_scr_roomname_gml_13_0"); var church_name_b = stringsetloc(
2nd Sanctuary
"2nd Sanctuary", "scr_roomname_slash_scr_roomname_gml_15_0"
);
if (arg0 == 247) roomname = stringsetsubloc("~1 - Atrium", church_name_b, "scr_roomname_slash_scr_roomname_gml_16_0"); if (arg0 == 251) roomname = stringsetsubloc("~1 - Floor", church_name_b, "scr_roomname_slash_scr_roomname_gml_17_0"); if (arg0 == 257) roomname = stringsetsubloc("~1 - Study", church_name_b, "scr_roomname_slash_scr_roomname_gml_18_0"); if (arg0 == 304) roomname = stringsetsubloc("~1 - Study", church_name_b, "scr_roomname_slash_scr_roomname_gml_19_0"); var church_name_c = stringsetloc(
3rd Sanctuary
"3rd Sanctuary", "scr_roomname_slash_scr_roomname_gml_21_0"
);
if (arg0 == 270) roomname = church_name_c; if (arg0 == 277) roomname = stringsetsubloc("~1 - Stairs", church_name_c, "scr_roomname_slash_scr_roomname_gml_23_0"); if (arg0 == 280) roomname = stringsetsubloc("~1 - Last Chamber", church_name_c, "scr_roomname_slash_scr_roomname_gml_24_0"); if (arg0 == 322) roomname = stringsetloc(
MIKE ZONE
"MIKE ZONE", "scr_roomname_slash_scr_roomname_gml_29_0"
);
if (arg0 == 298) roomname = stringsetloc(
Castle Town - TV Building
"Castle Town - TV Building", "scr_roomname_slash_scr_roomname_gml_30_0"
);
return roomname; }
(room_index);
129
            TIME[i] = ini_read_real(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter, i), "Time", 0);
130
            NAME[i] = ini_read_string(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter, i), "Name", "------");
131
            LEVEL[i] = 1;
132
            INITLANG[i] = ini_read_real(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter, i), "InitLang", 0);
133
            TIME_SECONDS_TOTAL[i] = floor(TIME[i] / 30);
134
            TIME_MINUTES[i] = floor(TIME_SECONDS_TOTAL[i] / 60);
135
            TIME_SECONDS[i] = TIME_SECONDS_TOTAL[i] - (TIME_MINUTES[i] * 60);
136
            TIME_SECONDS_STRING[i] = string(TIME_SECONDS[i]);
137
            if (TIME_SECONDS[i] == 0)
138
                TIME_SECONDS_STRING[i] = "00";
139
            if (TIME_SECONDS[i] < 10 && TIME_SECONDS[i] >= 1)
140
                TIME_SECONDS_STRING[i] = "0" + string(TIME_SECONDS[i]);
141
            TIME_STRING[i] = 
scr_timedisp
scr_timedisp

function
scr_timedisp(arg0)
{ var minutes = floor(arg0 / 1800); var remmins = minutes % 60; var hours = (minutes - remmins) / 60; var seconds = floor((arg0 / 30) - (minutes * 60)); var hourstring = string(hours) + ":"; var minstring = string(remmins) + ":"; if (remmins < 10) minstring = "0" + minstring; var secstring = string(floor(seconds)); if (seconds < 10) secstring = "0" + secstring; var timedisp = hourstring + minstring + secstring; return timedisp; }
(TIME[i]);
142
        }
143
    }
144
    var cadd = 3;
145
    if (INCOMPLETE_LOAD)
146
        cadd = 0;
147
    for (i = 0; i < 3; i++)
148
    {
149
        COMPLETEFILE_PREV_NAME[i] = stringsetloc(
NO DATA
"NO DATA", "DEVICE_MENU_slash_Create_0_gml_182_0"
);
150
        COMPLETEFILE_PREV_TIME[i] = 0;
151
        COMPLETEFILE_PREV_PLACE[i] = stringsetloc(
CHAPTER 1
"CHAPTER 1", "DEVICE_MENU_slash_Create_0_gml_221_0"
);
152
        INCOMPLETEFILE_PREV_NAME[i] = stringsetloc(
NO DATA
"NO DATA", "DEVICE_MENU_slash_Create_0_gml_185_0"
);
153
        INCOMPLETEFILE_PREV_TIME[i] = 0;
154
        var loadcompletion = 0;
155
        if (COMPLETEFILE_PREV[i] == 1 && INCOMPLETE_LOAD == 0)
156
            loadcompletion = 1;
157
        if (INCOMPLETEFILE_PREV[i] == 1 && INCOMPLETE_LOAD == 1)
158
            loadcompletion = 1;
159
        if (loadcompletion)
160
        {
161
            COMPLETEFILE_PREV_NAME[i] = stringsetloc(
UNKNOWN FILE
"UNKNOWN FILE", "DEVICE_MENU_slash_Create_0_gml_190_0"
);
162
            COMPLETEFILE_PREV_NAME[i] = ini_read_string(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter - 1, i + cadd), "Name", "------");
163
            COMPLETEFILE_PREV_TIME[i] = ini_read_real(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter - 1, i + cadd), "Time", 0);
164
            COMPLETEFILE_PREV_PLACE[i] = stringsetloc(
CHAPTER 1
"CHAPTER 1", "DEVICE_MENU_slash_Create_0_gml_237_0"
);
165
            COMPLETETIME_SECONDS_TOTAL[i] = floor(COMPLETEFILE_PREV_TIME[i] / 30);
166
            COMPLETETIME_MINUTES[i] = floor(COMPLETETIME_SECONDS_TOTAL[i] / 60);
167
            COMPLETETIME_SECONDS[i] = COMPLETETIME_SECONDS_TOTAL[i] - (COMPLETETIME_MINUTES[i] * 60);
168
            COMPLETETIME_SECONDS_STRING[i] = string(COMPLETETIME_SECONDS[i]);
169
            if (COMPLETETIME_SECONDS[i] == 0)
170
                COMPLETETIME_SECONDS_STRING[i] = "00";
171
            if (COMPLETETIME_SECONDS[i] < 10 && COMPLETETIME_SECONDS[i] >= 1)
172
                COMPLETETIME_SECONDS_STRING[i] = "0" + string(COMPLETETIME_SECONDS[i]);
173
            COMPLETETIME_STRING[i] = string(COMPLETETIME_MINUTES[i]) + ":" + COMPLETETIME_SECONDS_STRING[i];
174
            COMPLETETIME_STRING[i] = 
scr_timedisp
scr_timedisp

function
scr_timedisp(arg0)
{ var minutes = floor(arg0 / 1800); var remmins = minutes % 60; var hours = (minutes - remmins) / 60; var seconds = floor((arg0 / 30) - (minutes * 60)); var hourstring = string(hours) + ":"; var minstring = string(remmins) + ":"; if (remmins < 10) minstring = "0" + minstring; var secstring = string(floor(seconds)); if (seconds < 10) secstring = "0" + secstring; var timedisp = hourstring + minstring + secstring; return timedisp; }
(COMPLETEFILE_PREV_TIME[i]);
175
        }
176
        if (INCOMPLETEFILE_PREV[i])
177
        {
178
            INCOMPLETEFILE_PREV_NAME[i] = stringsetloc(
UNKNOWN FILE
"UNKNOWN FILE", "DEVICE_MENU_slash_Create_0_gml_205_0"
);
179
            INCOMPLETEFILE_PREV_NAME[i] = ini_read_string(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter - 1, i), "Name", "------");
180
            INCOMPLETEFILE_PREV_TIME[i] = ini_read_real(
scr_ini_chapter
scr_ini_chapter

function
scr_ini_chapter(arg0, arg1)
{ if (arg0 >= 2) return "G_" + string(arg0) + "_" + string(arg1); else return "G" + string(arg1); }
(global.chapter - 1, i), "Time", 0);
181
        }
182
    }
183
    ossafe_ini_close();
184
    ossafe_savedata_save();
185
}
186
var INITMENU = 0;
187
if (ossafe_file_exists("dr.ini"))
188
{
189
    if (FILE[0] == 0 && FILE[1] == 0 && FILE[2] == 0)
190
    {
191
        if (COMPLETEFILE_PREV[0] == 1 || COMPLETEFILE_PREV[1] == 1 || COMPLETEFILE_PREV[2] == 1)
192
            INITMENU = 10;
193
        if (INCOMPLETE_LOAD == 1)
194
            INITMENU = 10;
195
    }
196
}
197
MENU_NO = INITMENU;
198
depth = 5;
199
jamod = 0;
200
input_enabled = true;