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.210 by root, Sun Aug 12 01:49:09 2007 UTC vs.
Revision 1.215 by root, Fri Aug 17 21:18:01 2007 UTC

167our $STATUSBOX; 167our $STATUSBOX;
168our $DEBUG_STATUS; 168our $DEBUG_STATUS;
169 169
170our $INV; 170our $INV;
171our $INVR; 171our $INVR;
172our $INV_RIGHT_HB; 172our $INVR_HB;
173
174our $PICKUP_CFG;
175 173
176############################################################################# 174#############################################################################
177 175
178sub status { 176sub status {
179 $STATUSBOX->add (CFPlus::asxml $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); 177 $STATUSBOX->add (CFPlus::asxml $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]);
263 or return; 261 or return;
264 $CFG->{effects_enable} 262 $CFG->{effects_enable}
265 or return; 263 or return;
266 264
267 my $queue = $AUDIO_PLAY{$face} ||= []; 265 my $queue = $AUDIO_PLAY{$face} ||= [];
268 push @$queue, [Event::time + 0.2, $dx, $dy, $vol]; # delay sound by max. 0.2s 266 push @$queue, [Event::time + 0.6, $dx, $dy, $vol]; # do not play sound for outdated events
269 audio_sound_push $face 267 audio_sound_push $face
270 unless @$queue > 1; 268 unless @$queue > 1;
271} 269}
272 270
273sub audio_music_set_meta { 271sub audio_music_set_meta {
1610 $sw1->add ($INV = new CFPlus::UI::Inventory); 1608 $sw1->add ($INV = new CFPlus::UI::Inventory);
1611 $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}}); 1609 $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}});
1612 1610
1613 $hb->add (my $vb2 = new CFPlus::UI::VBox); 1611 $hb->add (my $vb2 = new CFPlus::UI::VBox);
1614 1612
1615 $vb2->add ($INV_RIGHT_HB = new CFPlus::UI::HBox); 1613 $vb2->add ($INVR_HB = new CFPlus::UI::HBox);
1616 1614
1617 $vb2->add (my $sw2 = new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1); 1615 $vb2->add (my $sw2 = new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1);
1618 $sw2->add ($INVR = new CFPlus::UI::Inventory); 1616 $sw2->add ($INVR = new CFPlus::UI::Inventory);
1619 1617
1620 # XXX: Call after $INVR = ... because set_opencont sets the items 1618 # XXX: Call after $INVR = ... because set_opencont sets the items
1875 on_activate => sub { $QUIT_DIALOG->hide; 0 }, 1873 on_activate => sub { $QUIT_DIALOG->hide; 0 },
1876 ); 1874 );
1877 $hb->add (new CFPlus::UI::Button 1875 $hb->add (new CFPlus::UI::Button
1878 text => "Quit anyway", 1876 text => "Quit anyway",
1879 expand => 1, 1877 expand => 1,
1880 on_activate => sub { exit }, 1878 on_activate => sub { Event::unloop_all },
1881 ); 1879 );
1882 } 1880 }
1883 1881
1884 $QUIT_DIALOG->show; 1882 $QUIT_DIALOG->show;
1885 $QUIT_DIALOG->grab_focus; 1883 $QUIT_DIALOG->grab_focus;
2079 tooltip => "Terminates the program", 2077 tooltip => "Terminates the program",
2080 on_activate => sub { 2078 on_activate => sub {
2081 if ($CONN) { 2079 if ($CONN) {
2082 open_quit_dialog; 2080 open_quit_dialog;
2083 } else { 2081 } else {
2084 exit; 2082 Event::unloop_all;
2085 } 2083 }
2086 0 2084 0
2087 }, 2085 },
2088 ); 2086 );
2089 2087
2090 $BUTTONBAR->show; 2088 $BUTTONBAR->show;
2091 $SETUP_DIALOG->show; 2089 $SETUP_DIALOG->show;
2090 $MESSAGE_WINDOW->show;
2092 } 2091 }
2093 2092
2094 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]); 2093 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]);
2095} 2094}
2096 2095
2193 2192
2194 my %DEF_CFG = ( 2193 my %DEF_CFG = (
2195 sdl_mode => 0, 2194 sdl_mode => 0,
2196 fullscreen => 0, 2195 fullscreen => 0,
2197 fast => 0, 2196 fast => 0,
2197 opengl11 => 0,
2198 map_scale => 1, 2198 map_scale => 1,
2199 fow_enable => 1, 2199 fow_enable => 1,
2200 fow_intensity => 0, 2200 fow_intensity => 0,
2201 map_smoothing => 1, 2201 map_smoothing => 1,
2202 gui_fontsize => 1, 2202 gui_fontsize => 1,
2291} 2291}
2292 2292
2293show_tip_of_the_day if $CFG->{show_tips}; 2293show_tip_of_the_day if $CFG->{show_tips};
2294 2294
2295Event::loop; 2295Event::loop;
2296
2297#video_shutdown;
2298#audio_shutdown;
2296#CFPlus::SDL_Quit; 2299CFPlus::SDL_Quit;
2297#CFPlus::_exit 0;
2298
2299END {
2300 video_shutdown;
2301 audio_shutdown;
2302 CFPlus::SDL_Quit;
2303 CFPlus::DB::Server::stop; 2300CFPlus::DB::Server::stop;
2304}
2305 2301
2306=head1 NAME 2302=head1 NAME
2307 2303
2308cfplus - A Crossfire TRT and Crossfire game client 2304cfplus - A Crossfire TRT and Crossfire game client
2309 2305

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines