Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_prefetch_textures

(view raw script w/o annotations or w/e)
1
function 
scr_prefetch_textures
scr_prefetch_textures

function
scr_prefetch_textures()
{ var texture_groups = ["Default", "ConsolePS4"]; if (global.is_console) { if (scr_is_switch_os()) texture_groups = ["Default", "ConsoleSwitch"]; texture_groups[array_length(texture_groups)] = "Console"; } array_push(texture_groups, "NoAutoCrop"); if (global.floortex_load_mode == 1) array_push(texture_groups, "ftex_castle_left", "ftex_castle_right", "ftex_castle_top", "ftex_cliffs", "ftex_garden"); array_push(texture_groups, "unusedAssets"); for (var i = 0; i < array_length(texture_groups); i++) { var _tex_array = texturegroup_get_textures(texture_groups[i]); for (var j = 0; j < array_length(_tex_array); j++) { if (texture_is_ready(_tex_array[j])) continue; texture_prefetch(_tex_array[j]); } } }
()
2
{
3
    var texture_groups = ["Default", "ConsolePS4"];
4
    if (global.is_console)
5
    {
6
        if (scr_is_switch_os())
7
            texture_groups = ["Default", "ConsoleSwitch"];
8
        texture_groups[array_length(texture_groups)] = "Console";
9
    }
10
    array_push(texture_groups, "NoAutoCrop");
11
    if (global.floortex_load_mode == 1)
12
        array_push(texture_groups, "ftex_castle_left", "ftex_castle_right", "ftex_castle_top", "ftex_cliffs", "ftex_garden");
13
    array_push(texture_groups, "unusedAssets");
14
    for (var i = 0; i < array_length(texture_groups); i++)
15
    {
16
        var _tex_array = texturegroup_get_textures(texture_groups[i]);
17
        for (var j = 0; j < array_length(_tex_array); j++)
18
        {
19
            if (texture_is_ready(_tex_array[j]))
20
                continue;
21
            texture_prefetch(_tex_array[j]);
22
        }
23
    }
24
}