mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-03-14 02:50:36 +01:00
This is an initial support for the scripted plugin. There are _many_ FIXMEs and the whole code is reather unstable. The formatting is completely incorrect and will be changed soon. There are scripts which are converted using a perl to an C embeddable string.
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
index = 0;
|
|
|
|
while (index<30){
|
|
mystring = index;
|
|
if (index<10) mystring = "0" + index;
|
|
sprites[index] = SpriteNewWithImage("../spinfinity/throbber-" + mystring + ".png");
|
|
sprites[index].xd = 1 + index;
|
|
sprites[index].yd = 1 + index;
|
|
index = index + 1;
|
|
}
|
|
|
|
random = 1;
|
|
|
|
fun update_logo_sprite (sprite){
|
|
image_width = ImageGetWidth (sprite.image);
|
|
image_height = ImageGetHeight(sprite.image);
|
|
|
|
if (sprite.x < 0)
|
|
sprite.xd = global.random % 5 + 1;
|
|
if (sprite.y < 0)
|
|
sprite.yd = global.random % 5 + 1;
|
|
if ((sprite.x + image_width) > 800)
|
|
sprite.xd = 0 - (global.random % 5 + 1);
|
|
if ((sprite.y + image_height) > 600)
|
|
sprite.yd = 0 - (global.random % 5 + 1);
|
|
|
|
global.random = (1 + global.random * 7) % 101;
|
|
|
|
sprite.x = sprite.x + sprite.xd;
|
|
sprite.y = sprite.y + sprite.yd;
|
|
|
|
SpriteUpdate(sprite);
|
|
}
|
|
|
|
|
|
fun refresh (){
|
|
index = 0;
|
|
while (index<30){
|
|
update_logo_sprite (sprites[index]);
|
|
index = index + 1;
|
|
}
|
|
return;
|
|
}
|
|
|
|
PlymouthSetRefreshFunction(refresh);
|