plymouth/themes/script/script.script
Charlie Brej 67b8703dd6 [scan] Add parsing of line comments
These are currently hard coded to '//' and '#'. The code is there to return
them to the caller but currently they are thrown away.
Should add a skip_comments option and allow customisable markers.
2009-07-24 09:30:08 -04:00

51 lines
1.3 KiB
Text

index = 0;
while (index<30){
mystring = index;
if (index<10) mystring = "0" + index;
sprites[index] = SpriteNewWithImage("../spinfinity/throbber-" + mystring + ".png");
sprites[index].orig_image = sprites[index].image;
sprites[index].xd = 1 + index;
sprites[index].yd = 1 + index;
index = index + 1;
}
random = 1;
count = 0;
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)/0.5;
if (sprite.y < 0)
sprite.yd = +(global.random % 5 + 1)/0.5;
if ((sprite.x + image_width) > 800)
sprite.xd = -((global.random % 5 + 1)/0.5);
if ((sprite.y + image_height) > 600)
sprite.yd = -((global.random % 5 + 1)/0.5);
global.random = (1 + global.random * 7) % 101;
sprite.x = sprite.x + sprite.xd;
sprite.y = sprite.y + sprite.yd;
sprite.image = ImageRotate(sprite.orig_image, count*0.1);
SpriteUpdate(sprite);
}
fun refresh (){
index = 0;
count++;
while (!(index>=30)){
update_logo_sprite (sprites[index]);
index++;
}
return;
}
// This is a comment
# As is this (both are acceptable because people do forget which to use)
PlymouthSetRefreshFunction(refresh);