--- deliantra/Deliantra-Client/bin/cfplus 2006/10/01 18:17:38 1.121 +++ deliantra/Deliantra-Client/bin/cfplus 2006/10/08 21:22:30 1.122 @@ -1,5 +1,26 @@ #!/opt/bin/perl +my $startup_done = sub { }; + +# do splash-screen thingy on win32 +BEGIN { + if ($^O eq "MSWin32") { + while (my ($filename, $zip) = each %PAR::LibCache) { + $zip->extractMember ("SPLASH.bmp", "$ENV{PAR_TEMP}/SPLASH.bmp"); + } + + require Win32::GUI::SplashScreen; + + Win32::GUI::SplashScreen::Show ( + -file => "$ENV{PAR_TEMP}/SPLASH.bmp", + ); + + $startup_done = sub { + Win32::GUI::SplashScreen::Done (1); + }; + } +} + use strict; use utf8; @@ -10,7 +31,7 @@ while (my ($filename, $zip) = each %PAR::LibCache) { for ($zip->memberNames) { - next unless /^\/root\/(.*)/; + next unless /^root\/(.*)/; $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") unless -e "$ENV{PAR_TEMP}/$1"; } @@ -139,6 +160,17 @@ $DEBUG_STATUS->set_text ($_[0]); } +sub message { + my ($para) = @_; + + my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0]; + + $para->{markup} = "$time $para->{markup}"; + + $LOGVIEW->add_paragraph ($para); + $LOGVIEW->scroll_to_bottom; +} + sub destroy_query_dialog { (delete $_[0]{query_dialog})->destroy if $_[0]{query_dialog}; @@ -2089,6 +2121,8 @@ # warn $t2-$t1; # } + $startup_done->(); + video_init; audio_init; }