mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-11 14:56:00 +00:00
improved handling of missing models/images
This commit is contained in:
@@ -1015,10 +1015,19 @@ slide dmv_slides[] = {
|
||||
"(the animation is not included with RogueViz)"
|
||||
,
|
||||
[] (presmode mode) {
|
||||
static bool pic_exists, video_exists;
|
||||
if(mode == pmStartAll || mode == pmStart) {
|
||||
pic_exists = file_exists("rogueviz/nil/emty-ring.png");
|
||||
video_exists = file_exists("rogueviz/nil/emty-ring.mp4");
|
||||
}
|
||||
slide_url(mode, 'i', "Instagram link", "https://www.instagram.com/p/B756GCynErw/");
|
||||
empty_screen(mode);
|
||||
// show_picture(mode, "rogueviz/nil/emty-ring.png");
|
||||
// show_animation(mode, "rogueviz/nil/emty-ring.mp4", 720, 900, 300, 30);
|
||||
if(video_exists)
|
||||
show_animation(mode, "rogueviz/nil/emty-ring.mp4", 720, 900, 300, 30);
|
||||
else if(pic_exists)
|
||||
show_picture(mode, "rogueviz/nil/emty-ring.png");
|
||||
else
|
||||
slide_error(mode, "(image not available)");
|
||||
no_other_hud(mode);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user