Draw minimap.png if it is mounted

This is a simple change - we draw minimap.png, instead of the generated
custom map, if it is a per-level mounted custom asset.

Custom levels have already been able to utilize minimap.png, but it was
limited - they could do gamemode(teleporter) in a script, and that would
show their customized minimap.png, but it's not like the player could
look at it during gameplay.

I would have done this earlier if I had figured out how to check if a
specific asset was mounted or not.
This commit is contained in:
Misa
2021-04-18 23:39:10 -07:00
committed by Ethan Lee
parent 186f36beea
commit 370e53f4d3
3 changed files with 13 additions and 1 deletions

View File

@@ -149,6 +149,7 @@ void Graphics::init(void)
#ifndef NO_CUSTOM_LEVELS
tiles1_mounted = false;
tiles2_mounted = false;
minimap_mounted = false;
#endif
}
@@ -3402,6 +3403,7 @@ void Graphics::reloadresources(void)
#ifndef NO_CUSTOM_LEVELS
tiles1_mounted = FILESYSTEM_isAssetMounted("graphics/tiles.png");
tiles2_mounted = FILESYSTEM_isAssetMounted("graphics/tiles2.png");
minimap_mounted = FILESYSTEM_isAssetMounted("graphics/minimap.png");
#endif
}