|
1
|
function scr_loadscr_load
function scr_load()
{
snd_free_all();
filechoicebk = global.filechoice;
scr_gamestart();
global.filechoice = filechoicebk;
file = "filech" + string(global.chapter) + "_" + string(global.filechoice);
myfileid = ossafe_file_text_open_read(file);
global.truename = ossafe_file_text_read_string(myfileid);
ossafe_file_text_readln(myfileid);
if (global.is_console)
{
var othername_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(othername_list); i += 1)
global.othername[i] = ds_list_find_value(othername_list, i);
ds_list_destroy(othername_list);
ossafe_file_text_readln(myfileid);
}
else
{
for (var i = 0; i < 6; i += 1)
{
global.othername[i] = ossafe_file_text_read_string(myfileid);
ossafe_file_text_readln(myfileid);
}
}
global.char[0] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.char[1] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.char[2] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.gold = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.xp = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.lv = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.inv = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.invc = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.darkzone = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
if (global.is_console)
{
var hp_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(hp_list); i += 1)
global.hp[i] = ds_list_find_value(hp_list, i);
ds_list_destroy(hp_list);
ossafe_file_text_readln(myfileid);
var maxhp_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(maxhp_list); i += 1)
global.maxhp[i] = ds_list_find_value(maxhp_list, i);
ds_list_destroy(maxhp_list);
ossafe_file_text_readln(myfileid);
var at_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(at_list); i += 1)
global.at[i] = ds_list_find_value(at_list, i);
ds_list_destroy(at_list);
ossafe_file_text_readln(myfileid);
var df_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(df_list); i += 1)
global.df[i] = ds_list_find_value(df_list, i);
ds_list_destroy(df_list);
ossafe_file_text_readln(myfileid);
var mag_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(mag_list); i += 1)
global.mag[i] = ds_list_find_value(mag_list, i);
ds_list_destroy(mag_list);
ossafe_file_text_readln(myfileid);
var guts_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(guts_list); i += 1)
global.guts[i] = ds_list_find_value(guts_list, i);
ds_list_destroy(guts_list);
ossafe_file_text_readln(myfileid);
var charweapon_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(charweapon_list); i += 1)
global.charweapon[i] = ds_list_find_value(charweapon_list, i);
ds_list_destroy(charweapon_list);
ossafe_file_text_readln(myfileid);
var chararmor1_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(chararmor1_list); i += 1)
global.chararmor1[i] = ds_list_find_value(chararmor1_list, i);
ds_list_destroy(chararmor1_list);
ossafe_file_text_readln(myfileid);
var chararmor2_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(chararmor2_list); i += 1)
global.chararmor2[i] = ds_list_find_value(chararmor2_list, i);
ds_list_destroy(chararmor2_list);
ossafe_file_text_readln(myfileid);
var weaponstyle_list = scr_ds_list_read(myfileid);
for (var i = 0; i < ds_list_size(weaponstyle_list); i += 1)
global.weaponstyle[i] = ds_list_find_value(weaponstyle_list, i);
ds_list_destroy(weaponstyle_list);
ossafe_file_text_readln(myfileid);
}
for (var i = 0; i < 5; i += 1)
{
if (!global.is_console)
{
... ()
|
|
2
|
{
|
|
3
|
snd_free_all();
|
|
4
|
filechoicebk = global.filechoice;
|
|
5
|
scr_gamestartscr_gamestart
function scr_gamestart()
{
global.chapter = 5;
global.darkzone = 0;
global.filechoice = 0;
global.plot = 0;
global.truename = "";
global.othername[0] = "";
global.othername[1] = "";
global.othername[2] = "";
global.othername[3] = "";
global.othername[4] = "";
global.othername[5] = "";
global.othername[6] = "";
global.townname = stringsetloc("", "scr_gamestart_slash_scr_gamestart_gml_19_0");
global.time = 0;
global.fighting = 0;
global.char[0] = 1;
global.char[1] = 0;
global.char[2] = 0;
global.gold = 0;
global.xp = 0;
global.lv = 1;
global.inv = 0;
global.invc = 1;
global.charselect = -1;
global.encounterno = 1;
global.specialbattle = 0;
global.ambush = 0;
global.tension = 0;
global.maxtension = 250;
for (i = 0; i < 3; i += 1)
{
global.heromakex[i] = 100;
global.heromakey[i] = 200;
global.charauto[i] = 0;
global.charmove[i] = 0;
global.charcantarget[i] = 0;
global.chardead[i] = 0;
global.invincible[i] = 1;
global.charaction[i] = 0;
global.faceaction[i] = 0;
global.charcond[i] = 0;
}
global.item[0] = 0;
global.item[1] = 0;
global.item[2] = 0;
global.item[3] = 0;
global.item[4] = 0;
global.item[5] = 0;
global.item[6] = 0;
global.item[7] = 0;
global.item[8] = 0;
global.item[9] = 0;
global.item[10] = 0;
global.item[11] = 0;
global.item[12] = 0;
for (i = 0; i < 72; i++)
global.pocketitem[i] = 0;
for (i = 0; i < 48; i++)
{
global.weapon[i] = 0;
global.armor[i] = 0;
}
global.keyitem[0] = 1;
global.keyitem[1] = 0;
global.keyitem[2] = 0;
global.keyitem[3] = 0;
global.keyitem[4] = 0;
global.keyitem[5] = 0;
global.keyitem[6] = 0;
global.keyitem[7] = 0;
global.keyitem[8] = 0;
global.keyitem[9] = 0;
global.keyitem[10] = 0;
global.keyitem[11] = 0;
global.keyitem[12] = 0;
for (i = 0; i < 20; i += 1)
{
global.hp[i] = 200;
global.maxhp[i] = 250;
global.at[i] = 10;
global.df[i] = 2;
global.mag[i] = 0;
global.guts[i] = 0;
global.charweapon[i] = 1;
global.chararmor1[i] = 0;
global.chararmor2[i] = 0;
global.weaponstyle[i] = 0;
global.charname[i] = stringsetloc( " ", "scr_gamestart_slash_scr_gamestart_gml_72_0" );
for (q = 0; q < 4; q += 1)
{
global.itemat[i][q] = 0;
global.itemdf[i][q] = 0;
global.itemmag[i][q] = 0;
global.itembolts[i][q] = 0;
global.itemgrazeamt[i][q] = 0;
global.itemgrazesize[i][q] = 0;
global.itemboltspeed[i][q] = 0;
global.itemspecial[i][q] = 0;
global.itemelement[i][q] = 0;
... ();
|
|
6
|
global.filechoice = filechoicebk;
|
|
7
|
file = "filech" + string(global.chapter) + "_" + string(global.filechoice);
|
|
8
|
myfileid = ossafe_file_text_open_read(file);
|
|
9
|
global.truename = ossafe_file_text_read_string(myfileid);
|
|
10
|
ossafe_file_text_readln(myfileid);
|
|
11
|
if (global.is_console)
|
|
12
|
{
|
|
13
|
var othername_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
14
|
for (var i = 0; i < ds_list_size(othername_list); i += 1)
|
|
15
|
global.othername[i] = ds_list_find_value(othername_list, i);
|
|
16
|
ds_list_destroy(othername_list);
|
|
17
|
ossafe_file_text_readln(myfileid);
|
|
18
|
}
|
|
19
|
else
|
|
20
|
{
|
|
21
|
for (var i = 0; i < 6; i += 1)
|
|
22
|
{
|
|
23
|
global.othername[i] = ossafe_file_text_read_string(myfileid);
|
|
24
|
ossafe_file_text_readln(myfileid);
|
|
25
|
}
|
|
26
|
}
|
|
27
|
global.char[0] = ossafe_file_text_read_real(myfileid);
|
|
28
|
ossafe_file_text_readln(myfileid);
|
|
29
|
global.char[1] = ossafe_file_text_read_real(myfileid);
|
|
30
|
ossafe_file_text_readln(myfileid);
|
|
31
|
global.char[2] = ossafe_file_text_read_real(myfileid);
|
|
32
|
ossafe_file_text_readln(myfileid);
|
|
33
|
global.gold = ossafe_file_text_read_real(myfileid);
|
|
34
|
ossafe_file_text_readln(myfileid);
|
|
35
|
global.xp = ossafe_file_text_read_real(myfileid);
|
|
36
|
ossafe_file_text_readln(myfileid);
|
|
37
|
global.lv = ossafe_file_text_read_real(myfileid);
|
|
38
|
ossafe_file_text_readln(myfileid);
|
|
39
|
global.inv = ossafe_file_text_read_real(myfileid);
|
|
40
|
ossafe_file_text_readln(myfileid);
|
|
41
|
global.invc = ossafe_file_text_read_real(myfileid);
|
|
42
|
ossafe_file_text_readln(myfileid);
|
|
43
|
global.darkzone = ossafe_file_text_read_real(myfileid);
|
|
44
|
ossafe_file_text_readln(myfileid);
|
|
45
|
if (global.is_console)
|
|
46
|
{
|
|
47
|
var hp_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
48
|
for (var i = 0; i < ds_list_size(hp_list); i += 1)
|
|
49
|
global.hp[i] = ds_list_find_value(hp_list, i);
|
|
50
|
ds_list_destroy(hp_list);
|
|
51
|
ossafe_file_text_readln(myfileid);
|
|
52
|
var maxhp_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
53
|
for (var i = 0; i < ds_list_size(maxhp_list); i += 1)
|
|
54
|
global.maxhp[i] = ds_list_find_value(maxhp_list, i);
|
|
55
|
ds_list_destroy(maxhp_list);
|
|
56
|
ossafe_file_text_readln(myfileid);
|
|
57
|
var at_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
58
|
for (var i = 0; i < ds_list_size(at_list); i += 1)
|
|
59
|
global.at[i] = ds_list_find_value(at_list, i);
|
|
60
|
ds_list_destroy(at_list);
|
|
61
|
ossafe_file_text_readln(myfileid);
|
|
62
|
var df_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
63
|
for (var i = 0; i < ds_list_size(df_list); i += 1)
|
|
64
|
global.df[i] = ds_list_find_value(df_list, i);
|
|
65
|
ds_list_destroy(df_list);
|
|
66
|
ossafe_file_text_readln(myfileid);
|
|
67
|
var mag_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
68
|
for (var i = 0; i < ds_list_size(mag_list); i += 1)
|
|
69
|
global.mag[i] = ds_list_find_value(mag_list, i);
|
|
70
|
ds_list_destroy(mag_list);
|
|
71
|
ossafe_file_text_readln(myfileid);
|
|
72
|
var guts_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
73
|
for (var i = 0; i < ds_list_size(guts_list); i += 1)
|
|
74
|
global.guts[i] = ds_list_find_value(guts_list, i);
|
|
75
|
ds_list_destroy(guts_list);
|
|
76
|
ossafe_file_text_readln(myfileid);
|
|
77
|
var charweapon_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
78
|
for (var i = 0; i < ds_list_size(charweapon_list); i += 1)
|
|
79
|
global.charweapon[i] = ds_list_find_value(charweapon_list, i);
|
|
80
|
ds_list_destroy(charweapon_list);
|
|
81
|
ossafe_file_text_readln(myfileid);
|
|
82
|
var chararmor1_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
83
|
for (var i = 0; i < ds_list_size(chararmor1_list); i += 1)
|
|
84
|
global.chararmor1[i] = ds_list_find_value(chararmor1_list, i);
|
|
85
|
ds_list_destroy(chararmor1_list);
|
|
86
|
ossafe_file_text_readln(myfileid);
|
|
87
|
var chararmor2_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
88
|
for (var i = 0; i < ds_list_size(chararmor2_list); i += 1)
|
|
89
|
global.chararmor2[i] = ds_list_find_value(chararmor2_list, i);
|
|
90
|
ds_list_destroy(chararmor2_list);
|
|
91
|
ossafe_file_text_readln(myfileid);
|
|
92
|
var weaponstyle_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
93
|
for (var i = 0; i < ds_list_size(weaponstyle_list); i += 1)
|
|
94
|
global.weaponstyle[i] = ds_list_find_value(weaponstyle_list, i);
|
|
95
|
ds_list_destroy(weaponstyle_list);
|
|
96
|
ossafe_file_text_readln(myfileid);
|
|
97
|
}
|
|
98
|
for (var i = 0; i < 5; i += 1)
|
|
99
|
{
|
|
100
|
if (!global.is_console)
|
|
101
|
{
|
|
102
|
global.hp[i] = ossafe_file_text_read_real(myfileid);
|
|
103
|
ossafe_file_text_readln(myfileid);
|
|
104
|
global.maxhp[i] = ossafe_file_text_read_real(myfileid);
|
|
105
|
ossafe_file_text_readln(myfileid);
|
|
106
|
global.at[i] = ossafe_file_text_read_real(myfileid);
|
|
107
|
ossafe_file_text_readln(myfileid);
|
|
108
|
global.df[i] = ossafe_file_text_read_real(myfileid);
|
|
109
|
ossafe_file_text_readln(myfileid);
|
|
110
|
global.mag[i] = ossafe_file_text_read_real(myfileid);
|
|
111
|
ossafe_file_text_readln(myfileid);
|
|
112
|
global.guts[i] = ossafe_file_text_read_real(myfileid);
|
|
113
|
ossafe_file_text_readln(myfileid);
|
|
114
|
global.charweapon[i] = ossafe_file_text_read_real(myfileid);
|
|
115
|
ossafe_file_text_readln(myfileid);
|
|
116
|
global.chararmor1[i] = ossafe_file_text_read_real(myfileid);
|
|
117
|
ossafe_file_text_readln(myfileid);
|
|
118
|
global.chararmor2[i] = ossafe_file_text_read_real(myfileid);
|
|
119
|
ossafe_file_text_readln(myfileid);
|
|
120
|
global.weaponstyle[i] = ossafe_file_text_read_real(myfileid);
|
|
121
|
ossafe_file_text_readln(myfileid);
|
|
122
|
}
|
|
123
|
for (q = 0; q < 4; q += 1)
|
|
124
|
{
|
|
125
|
global.itemat[i][q] = ossafe_file_text_read_real(myfileid);
|
|
126
|
ossafe_file_text_readln(myfileid);
|
|
127
|
global.itemdf[i][q] = ossafe_file_text_read_real(myfileid);
|
|
128
|
ossafe_file_text_readln(myfileid);
|
|
129
|
global.itemmag[i][q] = ossafe_file_text_read_real(myfileid);
|
|
130
|
ossafe_file_text_readln(myfileid);
|
|
131
|
global.itembolts[i][q] = ossafe_file_text_read_real(myfileid);
|
|
132
|
ossafe_file_text_readln(myfileid);
|
|
133
|
global.itemgrazeamt[i][q] = ossafe_file_text_read_real(myfileid);
|
|
134
|
ossafe_file_text_readln(myfileid);
|
|
135
|
global.itemgrazesize[i][q] = ossafe_file_text_read_real(myfileid);
|
|
136
|
ossafe_file_text_readln(myfileid);
|
|
137
|
global.itemboltspeed[i][q] = ossafe_file_text_read_real(myfileid);
|
|
138
|
ossafe_file_text_readln(myfileid);
|
|
139
|
global.itemspecial[i][q] = ossafe_file_text_read_real(myfileid);
|
|
140
|
ossafe_file_text_readln(myfileid);
|
|
141
|
global.itemelement[i][q] = ossafe_file_text_read_real(myfileid);
|
|
142
|
ossafe_file_text_readln(myfileid);
|
|
143
|
global.itemelementamount[i][q] = ossafe_file_text_read_real(myfileid);
|
|
144
|
ossafe_file_text_readln(myfileid);
|
|
145
|
}
|
|
146
|
for (j = 0; j < 12; j += 1)
|
|
147
|
{
|
|
148
|
global.spell[i][j] = ossafe_file_text_read_real(myfileid);
|
|
149
|
ossafe_file_text_readln(myfileid);
|
|
150
|
}
|
|
151
|
}
|
|
152
|
global.boltspeed = ossafe_file_text_read_real(myfileid);
|
|
153
|
ossafe_file_text_readln(myfileid);
|
|
154
|
global.grazeamt = ossafe_file_text_read_real(myfileid);
|
|
155
|
ossafe_file_text_readln(myfileid);
|
|
156
|
global.grazesize = ossafe_file_text_read_real(myfileid);
|
|
157
|
ossafe_file_text_readln(myfileid);
|
|
158
|
if (global.is_console)
|
|
159
|
{
|
|
160
|
var item_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
161
|
for (var i = 0; i < ds_list_size(item_list); i += 1)
|
|
162
|
global.item[i] = ds_list_find_value(item_list, i);
|
|
163
|
ds_list_destroy(item_list);
|
|
164
|
ossafe_file_text_readln(myfileid);
|
|
165
|
var keyitem_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
166
|
for (var i = 0; i < ds_list_size(keyitem_list); i += 1)
|
|
167
|
global.keyitem[i] = ds_list_find_value(keyitem_list, i);
|
|
168
|
ds_list_destroy(keyitem_list);
|
|
169
|
ossafe_file_text_readln(myfileid);
|
|
170
|
var weapon_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
171
|
for (var i = 0; i < ds_list_size(weapon_list); i += 1)
|
|
172
|
global.weapon[i] = ds_list_find_value(weapon_list, i);
|
|
173
|
ds_list_destroy(weapon_list);
|
|
174
|
ossafe_file_text_readln(myfileid);
|
|
175
|
var armor_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
176
|
for (var i = 0; i < ds_list_size(armor_list); i += 1)
|
|
177
|
global.armor[i] = ds_list_find_value(armor_list, i);
|
|
178
|
ds_list_destroy(armor_list);
|
|
179
|
ossafe_file_text_readln(myfileid);
|
|
180
|
var pocket_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
181
|
for (var i = 0; i < ds_list_size(pocket_list); i += 1)
|
|
182
|
global.pocketitem[i] = ds_list_find_value(pocket_list, i);
|
|
183
|
ds_list_destroy(pocket_list);
|
|
184
|
ossafe_file_text_readln(myfileid);
|
|
185
|
}
|
|
186
|
else
|
|
187
|
{
|
|
188
|
for (j = 0; j < 13; j += 1)
|
|
189
|
{
|
|
190
|
global.item[j] = ossafe_file_text_read_real(myfileid);
|
|
191
|
ossafe_file_text_readln(myfileid);
|
|
192
|
global.keyitem[j] = ossafe_file_text_read_real(myfileid);
|
|
193
|
ossafe_file_text_readln(myfileid);
|
|
194
|
}
|
|
195
|
for (j = 0; j < 48; j += 1)
|
|
196
|
{
|
|
197
|
global.weapon[j] = ossafe_file_text_read_real(myfileid);
|
|
198
|
ossafe_file_text_readln(myfileid);
|
|
199
|
global.armor[j] = ossafe_file_text_read_real(myfileid);
|
|
200
|
ossafe_file_text_readln(myfileid);
|
|
201
|
}
|
|
202
|
for (j = 0; j < 72; j += 1)
|
|
203
|
{
|
|
204
|
global.pocketitem[j] = ossafe_file_text_read_real(myfileid);
|
|
205
|
ossafe_file_text_readln(myfileid);
|
|
206
|
}
|
|
207
|
}
|
|
208
|
global.tension = ossafe_file_text_read_real(myfileid);
|
|
209
|
ossafe_file_text_readln(myfileid);
|
|
210
|
global.maxtension = ossafe_file_text_read_real(myfileid);
|
|
211
|
ossafe_file_text_readln(myfileid);
|
|
212
|
global.lweapon = ossafe_file_text_read_real(myfileid);
|
|
213
|
ossafe_file_text_readln(myfileid);
|
|
214
|
global.larmor = ossafe_file_text_read_real(myfileid);
|
|
215
|
ossafe_file_text_readln(myfileid);
|
|
216
|
global.lxp = ossafe_file_text_read_real(myfileid);
|
|
217
|
ossafe_file_text_readln(myfileid);
|
|
218
|
global.llv = ossafe_file_text_read_real(myfileid);
|
|
219
|
ossafe_file_text_readln(myfileid);
|
|
220
|
global.lgold = ossafe_file_text_read_real(myfileid);
|
|
221
|
ossafe_file_text_readln(myfileid);
|
|
222
|
global.lhp = ossafe_file_text_read_real(myfileid);
|
|
223
|
ossafe_file_text_readln(myfileid);
|
|
224
|
global.lmaxhp = ossafe_file_text_read_real(myfileid);
|
|
225
|
ossafe_file_text_readln(myfileid);
|
|
226
|
global.lat = ossafe_file_text_read_real(myfileid);
|
|
227
|
ossafe_file_text_readln(myfileid);
|
|
228
|
global.ldf = ossafe_file_text_read_real(myfileid);
|
|
229
|
ossafe_file_text_readln(myfileid);
|
|
230
|
global.lwstrength = ossafe_file_text_read_real(myfileid);
|
|
231
|
ossafe_file_text_readln(myfileid);
|
|
232
|
global.ladef = ossafe_file_text_read_real(myfileid);
|
|
233
|
ossafe_file_text_readln(myfileid);
|
|
234
|
if (global.is_console)
|
|
235
|
{
|
|
236
|
var litem_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
237
|
for (var i = 0; i < (ds_list_size(litem_list) - 1); i += 1)
|
|
238
|
global.litem[i] = ds_list_find_value(litem_list, i);
|
|
239
|
ds_list_destroy(litem_list);
|
|
240
|
ossafe_file_text_readln(myfileid);
|
|
241
|
var phone_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
242
|
for (var i = 0; i < (ds_list_size(phone_list) - 1); i += 1)
|
|
243
|
global.phone[i] = ds_list_find_value(phone_list, i);
|
|
244
|
ds_list_destroy(phone_list);
|
|
245
|
ossafe_file_text_readln(myfileid);
|
|
246
|
var flag_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
247
|
for (var i = 0; i < (ds_list_size(flag_list) - 1); i += 1)
|
|
248
|
global.flag[i] = ds_list_find_value(flag_list, i);
|
|
249
|
ds_list_destroy(flag_list);
|
|
250
|
ossafe_file_text_readln(myfileid);
|
|
251
|
}
|
|
252
|
else
|
|
253
|
{
|
|
254
|
for (var i = 0; i < 8; i += 1)
|
|
255
|
{
|
|
256
|
global.litem[i] = ossafe_file_text_read_real(myfileid);
|
|
257
|
ossafe_file_text_readln(myfileid);
|
|
258
|
global.phone[i] = ossafe_file_text_read_real(myfileid);
|
|
259
|
ossafe_file_text_readln(myfileid);
|
|
260
|
}
|
|
261
|
for (var i = 0; i < 2500; i += 1)
|
|
262
|
{
|
|
263
|
global.flag[i] = ossafe_file_text_read_real(myfileid);
|
|
264
|
ossafe_file_text_readln(myfileid);
|
|
265
|
}
|
|
266
|
}
|
|
267
|
if (global.flag[852 beat_gerson] == 1 && global.flag[1915] == 0)
|
|
268
|
{
|
|
269
|
global.flag[1915] = 1;
|
|
270
|
global.mag[2] += 4;
|
|
271
|
}
|
|
272
|
global.plot = ossafe_file_text_read_real(myfileid);
|
|
273
|
ossafe_file_text_readln(myfileid);
|
|
274
|
global.currentroom = ossafe_file_text_read_real(myfileid);
|
|
275
|
ossafe_file_text_readln(myfileid);
|
|
276
|
global.time = ossafe_file_text_read_real(myfileid);
|
|
277
|
ossafe_file_text_readln(myfileid);
|
|
278
|
ossafe_file_text_close(myfileid);
|
|
279
|
global.lastsavedtime = global.time;
|
|
280
|
global.lastsavedlv = global.lv;
|
|
281
|
audio_group_set_gain(1, global.flag[15 sound_volume], 0);
|
|
282
|
audio_set_master_gain(0, global.flag[17 audio_volume]);
|
|
283
|
var room_id = global.currentroom;
|
|
284
|
if (room_id < 10000)
|
|
285
|
{
|
|
286
|
room_id = scr_get_id_by_room_index(global.currentroom);
|
|
287
|
if (room_id == room_gms_debug_failsafe)
|
|
288
|
room_id += (global.chapter * 10000);
|
|
289
|
global.currentroom = room_id;
|
|
290
|
}
|
|
291
|
var adjusted_list = [];
|
|
292
|
for (var i = 0; i < array_length(global.item); i += 1)
|
|
293
|
{
|
|
294
|
if (global.item[i] == 0 || global.item[i] >= 999)
|
|
295
|
continue;
|
|
296
|
adjusted_list[array_length(adjusted_list)] = global.item[i];
|
|
297
|
}
|
|
298
|
for (var i = 0; i < array_length(global.item); i += 1)
|
|
299
|
global.item[i] = 0;
|
|
300
|
for (var i = 0; i < array_length(adjusted_list); i += 1)
|
|
301
|
global.item[i] = adjusted_list[i];
|
|
302
|
__loadedroom = scr_get_room_by_idscr_get_room_by_id
function scr_get_room_ids()
{
if (!variable_global_exists("room_id_list"))
global.room_id_list = scr_get_room_list();
return global.room_id_list;
}
function scr_get_room_by_id(arg0)
{
var room_id = arg0;
var rooms = scr_get_room_ids();
if (room_id < 10000)
room_id += (global.chapter * 10000);
var room_index = 0;
for (var i = 0; i < array_length(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_ids();
var room_id = room_gms_debug_failsafe;
for (var i = 0; i < array_length(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;
if (room_index == 141)
show_debug_message(string(141) + " " + string(room_id));
}
function scr_get_room_list()
{
var idsarr = [new scr_room(room_krisroom, 50013), new scr_room(room_town_south, 50024), new scr_room(room_dw_castle_town, 50054), new scr_room(PLACE_MENU, 50075), new scr_room(room_dw_castle_tv, 50114), new scr_room(room_dw_garden_intro, 50122), new scr_room(room_dw_garden_floradinnencounter, 50124), new scr_room(room_dw_garden_hospital, 50125), new scr_room(room_dw_garden_enemyrush, 50131), new scr_room(room_dw_garden_diner, 50135), new scr_room(room_dw_garden_aqua, 50138), new scr_room(room_dw_garden_aquahole, 50143), new scr_room(room_dw_garden_aquaplatforming, 50145), new scr_room(room_dw_garden_cliffexit, 50146), new scr_room(room_dw_garden_aquadash, 50152), new scr_room(room_dw_cliff_dash_runner, 50161), new scr_room(room_dw_cliff_seth_miniboss, 50162), new scr_room(room_dw_cliff_shop, 50163), new scr_room(room_dw_cliff_sethaqua_battle, 50169), new scr_room(room_dw_cliff_verticalwind_post, 50170), new scr_room(room_dw_fcastle_cafe, 50181), new scr_room(room_dw_fcastle_foyer, 50182), new scr_room(room_dw_fcastle_post_party_jail, 50183), new scr_room(room_dw_fcastle_left_twodoors, 50187), new scr_room(room_dw_fcastle_dangerous_platforming, 50190), new scr_room(room_dw_fcastle_blueroom, 50191), new scr_room(room_dw_fcastle_onsen, 50193), new scr_room(room_dw_fcastle_second_diner, 50207), new scr_room(room_dw_fcastle_obscured_bullets, 50208), new scr_room(room_dw_fcastle_right_penultimate, 50210), new scr_room(room_dw_fcastle_right_endingscene, 50212), new scr_room(room_dw_fcastle_orange_gauntlet, 50217), new scr_room(room_dw_fcastle_top_staircase_1, 50225), new scr_room(room_dw_fcastle_top_entrance, 50228), new scr_room(room_dw_fcastle_green_checkpoint, 50230), new scr_room(room_dw_fcastle_final_save, 50231), new scr_room(room_dw_fcastle_flowery, 50232), new scr_room(room_dw_fcastle_pinkroom, 50236), new scr_room(room_dw_fcastle_top_ascent, 50248)];
return idsarr;
} (global.currentroom);
|
|
303
|
if (scr_dogcheckscr_dogcheck
function scr_dogcheck()
{
if (scr_debug())
return 0;
var rooms = scr_get_room_list();
var dog_check = true;
for (var i = 0; i < array_length(rooms); i++)
{
if (rooms[i].room_id == global.currentroom)
{
dog_check = false;
break;
}
}
return dog_check;
} ())
|
|
304
|
__loadedroom = 98;
|
|
305
|
scr_tempsavescr_tempsave
function scr_tempsave()
{
filechoicebk2 = global.filechoice;
global.filechoice = 9;
scr_saveprocess(global.filechoice);
global.filechoice = filechoicebk2;
} ();
|
|
306
|
if (global.is_console)
|
|
307
|
global.tempflag[95] = 1;
|
|
308
|
if (scr_debugscr_debug
function scr_debug()
{
return global.debug == 1;
} ())
|
|
309
|
{
|
|
310
|
if (room_exists(__loadedroom))
|
|
311
|
{
|
|
312
|
room_goto(__loadedroom);
|
|
313
|
}
|
|
314
|
else
|
|
315
|
{
|
|
316
|
snd_play(snd_error);
|
|
317
|
scr_debug_printscr_debug_print
function scr_debug_print()
{
if (!scr_debug())
exit;
}
function scr_debug_clear_all()
{
} ("LOAD FAILED: ROOM [" + string(__loadedroom) + "] DOESN'T EXIST");
|
|
318
|
}
|
|
319
|
}
|
|
320
|
else
|
|
321
|
{
|
|
322
|
room_goto(__loadedroom);
|
|
323
|
}
|
|
324
|
}
|