if (Log.on) Log.log(Main.class, "done loading initial xwar");
doneDownloading = true;
+
+ MessageQueue.add(new Message() {
+ public void perform() {
+ Picture splash = Box.getPicture("splash");
+ if (splash != null) {
+ SplashScreen.splashScreenPicture = splash;
+ SplashScreen.surf.backbuffer.drawPicture(splash, 0, 0,
+ SplashScreen.surf.backbuffer.getWidth(), SplashScreen.surf.backbuffer.getHeight(),
+ 0, 0, splash.getWidth(), splash.getHeight());
+ SplashScreen.surf.blit(SplashScreen.surf.backbuffer, 0, 0, 0, 0,
+ SplashScreen.surf.backbuffer.getWidth(), SplashScreen.surf.backbuffer.getHeight());
+ updateSplashScreen();
+ }
+ }
+ });
+
initialTemplate = Template.getTemplate(instancename, null);
MessageQueue.add(new Message() {
/** encapsulates the splash screen */
private static class SplashScreen {
- static Surface surf;
-
+ public static Surface surf;
+ public static Picture splashScreenPicture;
+
// the position of the progress bar on the splash screen
static int barX = 5;
static int barY = 0;
int barPos;
- surf.backbuffer.drawPicture(splashScreenPicture, barX, barY - 20, barX + barW, barY + barH, barX, barY - 20, barX + barW, barY + barH);
+ surf.backbuffer.setClip(barX, barY - 20, barX + barW, barY + barH);
+ surf.backbuffer.drawPicture(splashScreenPicture, 0, 0,
+ surf.backbuffer.getWidth(), surf.backbuffer.getHeight(),
+ 0, 0, splashScreenPicture.getWidth(), splashScreenPicture.getHeight());
+ surf.backbuffer.drawPicture(splashScreenPicture, 0, 0);
+ surf.backbuffer.setClip(0, 0, surf.backbuffer.getWidth(), surf.backbuffer.getHeight());
+
if (!doneDownloading) {
float z = (float)barW / (float)2.0;
float x = (float) ( ((float)Resources.bytesDownloaded) / 5000000.0 );
//surf = null;
}
- private static Picture splashScreenPicture;
-
private static String splashScreen_gif_base64_1 =
"R0lGODlhigEUAecAAAICCBIWEi4yLkZKRhoeGj5CPgICJhIWUiYqJjo+OgYEOg4WTjI2Mg4S" +
"EQ4OXwoODR4iHlJWVDY6NgICDgkGThYeXiouKgoSQhIWSk5STg4OJkJGQiImIhceWgICEgQC" +