Chicago95.script: add loop animation for boot, and shutdown screen

This commit is contained in:
Dmytro Kropenko 2019-12-23 18:38:31 +02:00
parent b39d469357
commit d235afda79
1 changed files with 20 additions and 6 deletions

View File

@ -14,17 +14,31 @@ resized_boot_image = boot_image.Scale(screen_width, screen_height);
boot_sprite.SetImage(resized_boot_image);
for (i = 0; i < 18; i++)
for (i = 0; i <= 19; i++)
boot_images[i] = Image("win95_boot_" + i + ".png");
boot_sprite = Sprite();
shutdown_image = Image("win95_shutdown-01.png");
progress = 0;
fun refresh_callback ()
{
if (Plymouth.GetMode () == "boot")
{
Plymouth.SetRefreshRate(10);
resized_image = boot_images[Math.Int(progress)].Scale(screen_width, screen_height);
boot_sprite.SetImage(resized_image);
progress++;
if (progress > 19)
progress = 0;
}
if (Plymouth.GetMode () == "shutdown")
{
Plymouth.SetRefreshRate(0);
resized_image = shutdown_image.Scale(screen_width, screen_height);
boot_sprite.SetImage(resized_image);
}
}
Plymouth.SetRefreshFunction (refresh_callback);