scr_texture_page_handlerfunction
scr_texture_page_handler() //gml_Script_scr_texture_page_handler
{
texture_prefetch("GeneralUse")
texture_prefetch("MainMenu")
texture_prefetch("BattleBase")
var _assets_load_new_home = false
var _assets_load_ruins = false
var _assets_load_snowdin = false
var _assets_load_dunes = false
var _assets_load_wild_east = false
var _assets_load_steamworks = false
var _assets_load_waterfall = false
var _assets_load_minigames = false
var _assets_load_shop = false
var _assets_load_hotland = false
var _assets_load_mansion = false
var _room_tag = asset_get_tags(room, 3)
for (var i = 0; i < array_length(_room_tag); i++)
{
switch _room_tag[i]
{
case "Ruins":
_assets_load_ruins = true
break
case "Snowdin":
_assets_load_snowdin = true
break
case "Dunes":
_assets_load_dunes = true
break
case "Wild East":
_assets_load_wild_east = true
break
case "Steamworks":
_assets_load_steamworks = true
break
case "Minigame":
_assets_load_minigames = true
break
case "Waterfall":
_assets_load_waterfall = true
break
case "Hotland":
_assets_load_hotland = true
break
case "New Home":
_assets_load_new_home = true
break
case "Mansion":
_assets_load_new_home = true
break
case "Shop":
_assets_load_shop = true
break
}
}
if (room == rm_battle)
return;
if (_assets_load_ruins == true)
{
if (!texture_is_ready("Ruins"))
show_debug_message("Ruins Textures Loaded")
if (!texture_is_ready("Ruins"))
texture_prefetch("Ruins")
if (!texture_is_ready("BattleRuins"))
texture_prefetch("BattleRuins")
}
else
{
if texture_is_ready("Ruins")
show_debug_message("Ruins Textures Flushed")
if texture_is_ready("Ruins")
texture_flush("Ruins")
if texture_is_ready("BattleRuins")
texture_flush("BattleRuins")
}
if (_assets_load_snowdin == true)
{
if (!texture_is_ready("Snowdin"))
show_debug_message("Snowdin Textures Loaded")
if (!texture_is_ready("Snowdin"))
texture_prefetch("Snowdin")
if (!texture_is_ready("BattleSnowdin"))
texture_prefetch("BattleSnowdin")
}
else
{
if texture_is_ready("Snowdin")
show_debug_message("Snowdin Textures Flushed")
if texture_is_ready("Snowdin")
texture_flush("Snowdin")
if texture_is_ready("BattleSnowdin")
texture_flush("BattleSnowdin")
}
if (_assets_load_waterfall == true)
{
if (!texture_is_ready("Waterfall"))
show_debug_message("Waterfall Textures Loaded")
if (!texture_is_ready("Waterfall"))
texture_prefetch("Waterfall")
...