Update to radiantave-cpp, enable plymouth boot image

This commit is contained in:
NeilClack
2026-08-07 17:13:59 -05:00
parent 2d4aca230d
commit cbb3e05859
9 changed files with 163 additions and 122 deletions
+22 -2
View File
@@ -1,6 +1,26 @@
wallpaper_image = Image("splash.png");
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
resized_wallpaper_image = wallpaper_image.Scale(screen_width, screen_height);
wallpaper_sprite = Sprite(resized_wallpaper_image);
# Scale the wallpaper to cover the whole screen, then center-crop the overflow.
# Works for both landscape (NUC) and portrait (rotated android) displays
# without distorting the artwork.
scale_x = screen_width / wallpaper_image.GetWidth();
scale_y = screen_height / wallpaper_image.GetHeight();
if (scale_x > scale_y) {
scale = scale_x;
} else {
scale = scale_y;
}
scaled_width = wallpaper_image.GetWidth() * scale;
scaled_height = wallpaper_image.GetHeight() * scale;
scaled_image = wallpaper_image.Scale(scaled_width, scaled_height);
crop_x = (scaled_width - screen_width) / 2;
crop_y = (scaled_height - screen_height) / 2;
cropped_image = scaled_image.Crop(crop_x, crop_y, screen_width, screen_height);
wallpaper_sprite = Sprite(cropped_image);
wallpaper_sprite.SetZ(-100);