ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.121 by root, Sun Oct 1 18:17:38 2006 UTC vs.
Revision 1.122 by root, Sun Oct 8 21:22:30 2006 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2
3my $startup_done = sub { };
4
5# do splash-screen thingy on win32
6BEGIN {
7 if ($^O eq "MSWin32") {
8 while (my ($filename, $zip) = each %PAR::LibCache) {
9 $zip->extractMember ("SPLASH.bmp", "$ENV{PAR_TEMP}/SPLASH.bmp");
10 }
11
12 require Win32::GUI::SplashScreen;
13
14 Win32::GUI::SplashScreen::Show (
15 -file => "$ENV{PAR_TEMP}/SPLASH.bmp",
16 );
17
18 $startup_done = sub {
19 Win32::GUI::SplashScreen::Done (1);
20 };
21 }
22}
2 23
3use strict; 24use strict;
4use utf8; 25use utf8;
5 26
6# do things only needed for single-binary version (par) 27# do things only needed for single-binary version (par)
8 if (%PAR::LibCache) { 29 if (%PAR::LibCache) {
9 @INC = grep ref, @INC; # weed out all paths except pars loader refs 30 @INC = grep ref, @INC; # weed out all paths except pars loader refs
10 31
11 while (my ($filename, $zip) = each %PAR::LibCache) { 32 while (my ($filename, $zip) = each %PAR::LibCache) {
12 for ($zip->memberNames) { 33 for ($zip->memberNames) {
13 next unless /^\/root\/(.*)/; 34 next unless /^root\/(.*)/;
14 $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") 35 $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1")
15 unless -e "$ENV{PAR_TEMP}/$1"; 36 unless -e "$ENV{PAR_TEMP}/$1";
16 } 37 }
17 } 38 }
18 39
135 $STATUSBOX->add (CFPlus::asxml $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); 156 $STATUSBOX->add (CFPlus::asxml $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]);
136} 157}
137 158
138sub debug { 159sub debug {
139 $DEBUG_STATUS->set_text ($_[0]); 160 $DEBUG_STATUS->set_text ($_[0]);
161}
162
163sub message {
164 my ($para) = @_;
165
166 my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0];
167
168 $para->{markup} = "<span foreground='#ffffff'>$time</span> $para->{markup}";
169
170 $LOGVIEW->add_paragraph ($para);
171 $LOGVIEW->scroll_to_bottom;
140} 172}
141 173
142sub destroy_query_dialog { 174sub destroy_query_dialog {
143 (delete $_[0]{query_dialog})->destroy 175 (delete $_[0]{query_dialog})->destroy
144 if $_[0]{query_dialog}; 176 if $_[0]{query_dialog};
2087# } 2119# }
2088# my $t2 = Time::HiRes::time; 2120# my $t2 = Time::HiRes::time;
2089# warn $t2-$t1; 2121# warn $t2-$t1;
2090# } 2122# }
2091 2123
2124 $startup_done->();
2125
2092 video_init; 2126 video_init;
2093 audio_init; 2127 audio_init;
2094} 2128}
2095 2129
2096show_tip_of_the_day if $CFG->{show_tips}; 2130show_tip_of_the_day if $CFG->{show_tips};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines