2023-06-03 01:02:35 -07:00
|
|
|
function scr_files_init(){
|
|
|
|
if (!variable_global_exists( "global.default_save" ) ) {
|
|
|
|
global.default_save = -1;
|
|
|
|
}
|
|
|
|
if (!ds_exists(global.default_save, ds_type_map) ) {
|
|
|
|
global.default_save = ds_map_create();
|
|
|
|
}
|
|
|
|
if (!variable_global_exists( "global.loaded_file" ) ) {
|
|
|
|
global.loaded_file = -1;
|
|
|
|
}
|
|
|
|
if (!ds_exists(global.loaded_file, ds_type_map) ) {
|
|
|
|
global.loaded_file = ds_map_create();
|
|
|
|
}
|
|
|
|
|
|
|
|
//initialize default save data
|
2023-06-06 23:53:55 -07:00
|
|
|
global.default_save[? SAVE_CHNUM ] = 1;
|
|
|
|
global.default_save[? SAVE_LINENUM ] = 0;
|
2023-06-03 01:02:35 -07:00
|
|
|
scr_files_load( SAVE_DEFAULTS );
|
|
|
|
|
|
|
|
//initialize save files
|
|
|
|
if ( !file_exists(SAVE_FILE_NAME_A) ) {
|
|
|
|
scr_files_save(SAVE_FILE_NAME_A);
|
|
|
|
}
|
|
|
|
if (!file_exists(SAVE_FILE_NAME_B) ) {
|
|
|
|
scr_files_save(SAVE_FILE_NAME_B);
|
|
|
|
}
|
|
|
|
if (!file_exists(SAVE_FILE_NAME_C) ) {
|
|
|
|
scr_files_save(SAVE_FILE_NAME_C);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|