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.146 by root, Wed Apr 4 02:43:30 2007 UTC vs.
Revision 1.153 by root, Tue Apr 24 01:13:54 2007 UTC

58use Compress::LZF; 58use Compress::LZF;
59 59
60use CFPlus; 60use CFPlus;
61use CFPlus::OpenGL (); 61use CFPlus::OpenGL ();
62use CFPlus::Protocol; 62use CFPlus::Protocol;
63use CFPlus::DB;
63use CFPlus::UI; 64use CFPlus::UI;
64use CFPlus::UI::Inventory; 65use CFPlus::UI::Inventory;
65use CFPlus::UI::SpellList; 66use CFPlus::UI::SpellList;
66use CFPlus::Pod; 67use CFPlus::Pod;
67use CFPlus::MapWidget; 68use CFPlus::MapWidget;
206 title => "Server Query", 207 title => "Server Query",
207 child => my $vbox = new CFPlus::UI::VBox, 208 child => my $vbox = new CFPlus::UI::VBox,
208 ; 209 ;
209 210
210 my @dialog = my $label = new CFPlus::UI::Label 211 my @dialog = my $label = new CFPlus::UI::Label
211 max_w => $::WIDTH * 0.4, 212 max_w => $::WIDTH * 0.8,
212 ellipsise => 0, 213 ellipsise => 0,
213 text => $prompt; 214 text => $prompt;
214 215
215 if ($flags & CS_QUERY_YESNO) { 216 if ($flags & CS_QUERY_YESNO) {
216 push @dialog, my $hbox = new CFPlus::UI::HBox; 217 push @dialog, my $hbox = new CFPlus::UI::HBox;
233 ); 234 );
234 235
235 $dialog->grab_focus; 236 $dialog->grab_focus;
236 237
237 } elsif ($flags & CS_QUERY_SINGLECHAR) { 238 } elsif ($flags & CS_QUERY_SINGLECHAR) {
238 $dialog->{tooltip} = "#charcreation_focus";
239
240 if ($prompt =~ /Now choose a character|Press any key for the next race/i) { 239 if ($prompt =~ /Now choose a character|Press any key for the next race/i) {
241 $MESSAGE_WINDOW->show; 240 $dialog->{tooltip} = "#charcreation_focus";
242 241
243 unshift @dialog, new CFPlus::UI::Label 242 unshift @dialog, new CFPlus::UI::Label
244 max_w => $::WIDTH * 0.4, 243 max_w => $::WIDTH * 0.8,
245 ellipsise => 0, 244 ellipsise => 0,
246 markup => "\nOr use your keyboard and the text entry below:\n"; 245 markup => "\nOr use your keyboard and the text entry below:\n";
247 246
248 unshift @dialog, my $table = new CFPlus::UI::Table; 247 unshift @dialog, my $table = new CFPlus::UI::Table;
249 248
261 $conn->send ("reply d"); 260 $conn->send ("reply d");
262 destroy_query_dialog $conn; 261 destroy_query_dialog $conn;
263 0 262 0
264 }, 263 },
265 ); 264 );
265
266 if ($conn->{chargen_race_description}) {
267 unshift @dialog, new CFPlus::UI::Label
268 max_w => $::WIDTH * 0.8,
269 ellipsise => 0,
270 markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>",
271 ;
272 }
273
274 unshift @dialog, new CFPlus::UI::Face
275 face => $conn->{player}{face},
276 bg => [.2, .2, .2, 1],
277 min_w => 64,
278 min_h => 64,
279 ;
280
281 if ($conn->{chargen_race_title}) {
282 unshift @dialog, new CFPlus::UI::Label
283 allign => 1,
284 ellipsise => 0,
285 markup => "<span foreground='#ccccff' size='large'>Race: $conn->{chargen_race_title}</span>",
286 ;
287 }
266 288
267 unshift @dialog, new CFPlus::UI::Label 289 unshift @dialog, new CFPlus::UI::Label
268 max_w => $::WIDTH * 0.4, 290 max_w => $::WIDTH * 0.4,
269 ellipsise => 0, 291 ellipsise => 0,
270 markup => (CFPlus::Pod::section_label ui => "chargen_race"), 292 markup => (CFPlus::Pod::section_label ui => "chargen_race"),
419 statusbox => $STATUSBOX, 441 statusbox => $STATUSBOX,
420 map => $MAP, 442 map => $MAP,
421 mapmap => $MAPMAP, 443 mapmap => $MAPMAP,
422 query => \&server_query, 444 query => \&server_query,
423 445
446 setup_req => {
447 smoothing => $CFG->{map_smoothing}*1,
448 },
449
424 sound_play => sub { 450 sound_play => sub {
425 my ($x, $y, $soundnum, $type) = @_; 451 my ($x, $y, $soundnum, $type) = @_;
426 452
427 $SDL_MIXER 453 $SDL_MIXER
428 or return; 454 or return;
500 state => $CFG->{fast}, 526 state => $CFG->{fast},
501 tooltip => "Lower the visual quality considerably to speed up rendering.", 527 tooltip => "Lower the visual quality considerably to speed up rendering.",
502 on_changed => sub { my ($self, $value) = @_; $CFG->{fast} = $value; 0 } 528 on_changed => sub { my ($self, $value) = @_; $CFG->{fast} = $value; 0 }
503 ); 529 );
504 530
531 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "GUI Fontsize");
532 $table->add (1, $row++, new CFPlus::UI::Slider
533 range => [$CFG->{gui_fontsize}, 0.5, 2, 0, 0.1],
534 tooltip => "The base font size used by most GUI elements that do not have their own setting.",
535 on_changed => sub { $CFG->{gui_fontsize} = $_[1]; 0 },
536 );
537
538 $table->add (1, $row++, new CFPlus::UI::Button
539 expand => 1, align => 0, text => "Apply",
540 tooltip => "Apply the video settings above.",
541 on_activate => sub {
542 video_shutdown ();
543 video_init ();
544 0
545 }
546 );
547
505 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Map Scale"); 548 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Map Scale");
506 $table->add (1, $row++, new CFPlus::UI::Slider 549 $table->add (1, $row++, new CFPlus::UI::Slider
507 range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], 550 range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1],
508 tooltip => "Enlarge or shrink the displayed map. Changes are instant.", 551 tooltip => "Enlarge or shrink the displayed map. Changes are instant.",
509 on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 } 552 on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 }
553 );
554
555 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Smoothing");
556 $table->add (1, $row++, new CFPlus::UI::CheckBox
557 state => $CFG->{map_smoothing},
558 tooltip => "<b>Map Smoothing</b> tries to make tile borders less square. "
559 . "This increases load on the graphics subsystem and works only with 2.x servers. "
560 . "Changes take effect at next connection only.",
561 on_changed => sub { my ($self, $value) = @_; $CFG->{map_smoothing} = $value; 0 }
510 ); 562 );
511 563
512 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fog of War"); 564 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fog of War");
513 $table->add (1, $row++, new CFPlus::UI::CheckBox 565 $table->add (1, $row++, new CFPlus::UI::CheckBox
514 state => $CFG->{fow_enable}, 566 state => $CFG->{fow_enable},
533 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFPlus::OpenGL::GL_VERSION < 1.2; 585 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFPlus::OpenGL::GL_VERSION < 1.2;
534 0 586 0
535 } 587 }
536 ); 588 );
537 589
538 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "GUI Fontsize");
539 $table->add (1, $row++, new CFPlus::UI::Slider
540 range => [$CFG->{gui_fontsize}, 0.5, 2, 0, 0.1],
541 tooltip => "The base font size used by most GUI elements that do not have their own setting.",
542 on_changed => sub { $CFG->{gui_fontsize} = $_[1]; 0 },
543 );
544
545 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Message Fontsize"); 590 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Message Fontsize");
546 $table->add (1, $row++, new CFPlus::UI::Slider 591 $table->add (1, $row++, new CFPlus::UI::Slider
547 range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1], 592 range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1],
548 tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant.", 593 tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant.",
549 on_changed => sub { $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 }, 594 on_changed => sub { $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 },
565 range => [$CFG->{gauge_size}, 0.2, 0.8], 610 range => [$CFG->{gauge_size}, 0.2, 0.8],
566 tooltip => "Adjust the size of the stats gauges at the bottom right. Changes are instant.", 611 tooltip => "Adjust the size of the stats gauges at the bottom right. Changes are instant.",
567 on_changed => sub { 612 on_changed => sub {
568 $CFG->{gauge_size} = $_[1]; 613 $CFG->{gauge_size} = $_[1];
569 $GAUGES->{win}->set_size ($WIDTH, int $HEIGHT * $CFG->{gauge_size}); 614 $GAUGES->{win}->set_size ($WIDTH, int $HEIGHT * $CFG->{gauge_size});
570 0
571 }
572 );
573
574 $table->add (1, $row++, new CFPlus::UI::Button
575 expand => 1, align => 0, text => "Apply",
576 tooltip => "Apply the video settings",
577 on_activate => sub {
578 video_shutdown ();
579 video_init ();
580 0 615 0
581 } 616 }
582 ); 617 );
583 618
584 $vbox 619 $vbox
1097 : start_game; 1132 : start_game;
1098 0 1133 0
1099 }, 1134 },
1100 ); 1135 );
1101 1136
1137 $vbox->add (new CFPlus::UI::FancyFrame
1138 label => "Server Info",
1139 child => ($SERVER_INFO = new CFPlus::UI::Label ellipsise => 0),
1140 );
1141
1142 $vbox
1143}
1144
1145sub client_setup {
1146 my $table = new CFPlus::UI::Table expand => 1, col_expand => [0, 1];
1147
1148 my $row = 0;
1149
1102 $table->add (0, 13, new CFPlus::UI::Label valign => 0, align => 1, text => "Chat Command"); 1150 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Chat Command");
1103 $table->add (1, 13, my $saycmd = new CFPlus::UI::Entry 1151 $table->add (1, $row++, my $saycmd = new CFPlus::UI::Entry
1104 text => $CFG->{say_command}, 1152 text => $CFG->{say_command},
1105 tooltip => "This is the command that will be used if you write a line in the message window entry or press <b>\"</b> in the map window. " 1153 tooltip => "This is the command that will be used if you write a line in the message window entry or press <b>\"</b> in the map window. "
1106 . "Usually you want to enter something like 'say' or 'shout' or 'gsay' here. " 1154 . "Usually you want to enter something like 'say' or 'shout' or 'gsay' here. "
1107 . "But you could also set it to <b>tell <i>playername</i></b> to only chat with that user.", 1155 . "But you could also set it to <b>tell <i>playername</i></b> to only chat with that user.",
1108 on_changed => sub { 1156 on_changed => sub {
1109 my ($self, $value) = @_; 1157 my ($self, $value) = @_;
1110 $CFG->{say_command} = $value; 1158 $CFG->{say_command} = $value;
1111 0 1159 0
1112 } 1160 }
1113 ); 1161 );
1114 1162
1115 $table->add (0, 14, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day"); 1163 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day");
1116 $table->add (1, 14, my $saycmd = new CFPlus::UI::CheckBox 1164 $table->add (1, $row++, new CFPlus::UI::CheckBox
1117 state => $CFG->{show_tips}, 1165 state => $CFG->{show_tips},
1118 tooltip => "Show the <b>Tip of the day</b> window at startup?", 1166 tooltip => "Show the <b>Tip of the day</b> window at startup?",
1119 on_changed => sub { 1167 on_changed => sub {
1120 my ($self, $value) = @_; 1168 my ($self, $value) = @_;
1121 $CFG->{show_tips} = $value; 1169 $CFG->{show_tips} = $value;
1122 0 1170 0
1123 } 1171 }
1124 ); 1172 );
1125 1173
1126 $vbox->add (new CFPlus::UI::FancyFrame 1174 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Messages Window Size");
1127 label => "Server Info", 1175 $table->add (1, $row++, my $saycmd = new CFPlus::UI::Entry
1128 child => ($SERVER_INFO = new CFPlus::UI::Label ellipsise => 0), 1176 text => $CFG->{logview_max_par},
1177 tooltip => "This is maximum number of messages remembered in the <b>Messages</b> window. If the server "
1178 . "sends more messages than this number, older messages get removed to save memory and "
1179 . "computing time. A value of <b>0</b> disables this feature, but that is not recommended.",
1180 on_changed => sub {
1181 my ($self, $value) = @_;
1182 $LOGVIEW->{max_par} = $CFG->{logview_max_par} = $value*1;
1183 0
1184 },
1129 ); 1185 );
1130 1186
1131 $vbox 1187 $table
1132} 1188}
1133 1189
1134sub message_window { 1190sub message_window {
1135 my $window = new CFPlus::UI::Toplevel 1191 my $window = new CFPlus::UI::Toplevel
1136 name => "message_window", 1192 name => "message_window",
1573 1629
1574sub show_tip_of_the_day { 1630sub show_tip_of_the_day {
1575 # find all tips 1631 # find all tips
1576 my @tod = CFPlus::Pod::find tip_of_the_day => "*"; 1632 my @tod = CFPlus::Pod::find tip_of_the_day => "*";
1577 1633
1578 my $todindex = $CFPlus::DB_STATE->get ("tip_of_the_day"); 1634 CFPlus::DB::get state => "tip_of_the_day", sub {
1635 my ($todindex) = @_;
1579 $todindex = 0 if $todindex >= @tod; 1636 $todindex = 0 if $todindex >= @tod;
1580 $CFPlus::DB_STATE->put (tip_of_the_day => $todindex + 1); 1637 CFPlus::DB::put state => tip_of_the_day => $todindex + 1, sub { };
1581 1638
1582 # create dialog 1639 # create dialog
1583 my $dialog; 1640 my $dialog;
1584 1641
1585 my $close = sub { 1642 my $close = sub {
1586 $dialog->destroy; 1643 $dialog->destroy;
1644 };
1645
1646 $dialog = new CFPlus::UI::Toplevel
1647 x => "center",
1648 y => "center",
1649 z => 3,
1650 name => 'tip_of_the_day',
1651 force_w => int $WIDTH * 4/9,
1652 force_h => int $WIDTH * 2/9,
1653 title => "Tip of the day #" . (1 + $todindex),
1654 child => my $vbox = new CFPlus::UI::VBox,
1655 has_close_button => 1,
1656 on_delete => $close,
1657 ;
1658
1659 $vbox->add (my $viewer = new CFPlus::UI::TextScroller
1660 expand => 1, fontsize => 0.8, padding_x => 4, padding_y => 4);
1661 $viewer->add_paragraph (CFPlus::Pod::as_paragraphs CFPlus::Pod::section_of $tod[$todindex]);
1662
1663 $vbox->add (my $table = new CFPlus::UI::Table col_expand => [0, 1]);
1664
1665 $table->add (0, 0, new CFPlus::UI::Button
1666 text => "Close",
1667 tooltip => "Close the tip of the day window. To never see it again, disable the tip of the day in the <b>Server Setup</b>.",
1668 on_activate => $close,
1669 );
1670
1671 $table->add (2, 0, new CFPlus::UI::Button
1672 text => "Next",
1673 tooltip => "Show the next <b>Tip of the day</b>.",
1674 on_activate => sub {
1675 $close->();
1676 &show_tip_of_the_day;
1677 },
1678 );
1679
1680 $dialog->show;
1587 }; 1681 };
1588
1589 $dialog = new CFPlus::UI::Toplevel
1590 x => "center",
1591 y => "center",
1592 z => 3,
1593 name => 'tip_of_the_day',
1594 force_w => int $WIDTH * 4/9,
1595 force_h => int $WIDTH * 2/9,
1596 title => "Tip of the day #" . (1 + $todindex),
1597 child => my $vbox = new CFPlus::UI::VBox,
1598 has_close_button => 1,
1599 on_delete => $close,
1600 ;
1601
1602 $vbox->add (my $viewer = new CFPlus::UI::TextScroller
1603 expand => 1, fontsize => 0.8, padding_x => 4, padding_y => 4);
1604 $viewer->add_paragraph (CFPlus::Pod::as_paragraphs CFPlus::Pod::section_of $tod[$todindex]);
1605
1606 $vbox->add (my $table = new CFPlus::UI::Table col_expand => [0, 1]);
1607
1608 $table->add (0, 0, new CFPlus::UI::Button
1609 text => "Close",
1610 tooltip => "Close the tip of the day window. To never see it again, disable the tip of the day in the <b>Server Setup</b>.",
1611 on_activate => $close,
1612 );
1613
1614 $table->add (2, 0, new CFPlus::UI::Button
1615 text => "Next",
1616 tooltip => "Show the next <b>Tip of the day</b>.",
1617 on_activate => sub {
1618 $close->();
1619 &show_tip_of_the_day;
1620 },
1621 );
1622
1623 $dialog->show;
1624} 1682}
1625 1683
1626sub sdl_init { 1684sub sdl_init {
1627 CFPlus::SDL_Init 1685 CFPlus::SDL_Init
1628 and die "SDL::Init failed!\n"; 1686 and die "SDL::Init failed!\n";
1708 font => $FONT_FIXED, 1766 font => $FONT_FIXED,
1709 fontsize => $::CFG->{log_fontsize}, 1767 fontsize => $::CFG->{log_fontsize},
1710 indent => -4, 1768 indent => -4,
1711 can_hover => 1, 1769 can_hover => 1,
1712 can_events => 1, 1770 can_events => 1,
1771 max_par => $CFG->{logview_max_par},
1713 tooltip => "<b>Server Log</b>. This text viewer contains all the messages sent by the server.", 1772 tooltip => "<b>Server Log</b>. This text viewer contains all recent messages sent by the server.",
1714 ; 1773 ;
1715 1774
1716 $SETUP_DIALOG = new CFPlus::UI::Toplevel 1775 $SETUP_DIALOG = new CFPlus::UI::Toplevel
1717 title => "Setup", 1776 title => "Setup",
1718 name => "setup_dialog", 1777 name => "setup_dialog",
1729 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFPlus::UI::Notebook expand => 1, debug => 1, 1788 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFPlus::UI::Notebook expand => 1, debug => 1,
1730 filter => new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1); 1789 filter => new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1);
1731 1790
1732 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, 1791 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup,
1733 "Configure the server to play on, your username, password and other server-related options."); 1792 "Configure the server to play on, your username, password and other server-related options.");
1793 $SETUP_NOTEBOOK->add (Client => client_setup,
1794 "Configure various client-specific settings.");
1734 $SETUP_NOTEBOOK->add (Pickup => autopickup_setup, 1795 $SETUP_NOTEBOOK->add (Pickup => autopickup_setup,
1735 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them."); 1796 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them.");
1736 $SETUP_NOTEBOOK->add (Graphics => graphics_setup, 1797 $SETUP_NOTEBOOK->add (Graphics => graphics_setup,
1737 "Configure the video mode, performance, fonts and other graphical aspects of the game."); 1798 "Configure the video mode, performance, fonts and other graphical aspects of the game.");
1738 $SETUP_NOTEBOOK->add (Audio => audio_setup, 1799 $SETUP_NOTEBOOK->add (Audio => audio_setup,
2039 if $CONN; 2100 if $CONN;
2040}); 2101});
2041 2102
2042%SDL_CB = ( 2103%SDL_CB = (
2043 CFPlus::SDL_QUIT => sub { 2104 CFPlus::SDL_QUIT => sub {
2044 Event::unloop -1; 2105 exit;
2045 }, 2106 },
2046 CFPlus::SDL_VIDEORESIZE => sub { 2107 CFPlus::SDL_VIDEORESIZE => sub {
2047 }, 2108 },
2048 CFPlus::SDL_VIDEOEXPOSE => sub { 2109 CFPlus::SDL_VIDEOEXPOSE => sub {
2049 CFPlus::UI::full_refresh; 2110 CFPlus::UI::full_refresh;
2082 2143
2083$SIG{INT} = $SIG{TERM} = sub { exit }; 2144$SIG{INT} = $SIG{TERM} = sub { exit };
2084 2145
2085{ 2146{
2086 CFPlus::read_cfg "$Crossfire::VARDIR/cfplusrc"; 2147 CFPlus::read_cfg "$Crossfire::VARDIR/cfplusrc";
2148 CFPlus::DB::Server::run;
2149
2087 CFPlus::UI::set_layout ($::CFG->{layout}); 2150 CFPlus::UI::set_layout ($::CFG->{layout});
2088 2151
2089 my %DEF_CFG = ( 2152 my %DEF_CFG = (
2090 sdl_mode => 0, 2153 sdl_mode => 0,
2091 width => 640, 2154 width => 640,
2092 height => 480, 2155 height => 480,
2093 fullscreen => 0, 2156 fullscreen => 0,
2094 fast => 0, 2157 fast => 0,
2095 map_scale => 1, 2158 map_scale => 1,
2096 fow_enable => 1, 2159 fow_enable => 1,
2097 fow_intensity => 0.45, 2160 fow_intensity => 0.45,
2098 fow_smooth => 0, 2161 fow_smooth => 0,
2162 map_smoothing => 1,
2099 gui_fontsize => 1, 2163 gui_fontsize => 1,
2100 log_fontsize => 0.7, 2164 log_fontsize => 0.7,
2101 gauge_fontsize => 1, 2165 gauge_fontsize => 1,
2102 gauge_size => 0.35, 2166 gauge_size => 0.35,
2103 stat_fontsize => 0.7, 2167 stat_fontsize => 0.7,
2104 mapsize => 100, 2168 mapsize => 100,
2105 say_command => 'chat', 2169 say_command => 'chat',
2106 audio_enable => 1, 2170 audio_enable => 1,
2107 bgm_enable => 1, 2171 bgm_enable => 1,
2108 bgm_volume => 0.25, 2172 bgm_volume => 0.25,
2109 face_prefetch => 0, 2173 face_prefetch => 0,
2110 output_sync => 1, 2174 output_sync => 1,
2111 output_count => 1, 2175 output_count => 1,
2112 output_rate => "", 2176 output_rate => "",
2113 pickup => 0, 2177 pickup => 0,
2114 inv_sort => "mtime", 2178 inv_sort => "mtime",
2115 default => "profile", # default profile 2179 default => "profile", # default profile
2116 show_tips => 1, 2180 show_tips => 1,
2181 logview_max_par => 1000,
2117 ); 2182 );
2118 2183
2119 while (my ($k, $v) = each %DEF_CFG) { 2184 while (my ($k, $v) = each %DEF_CFG) {
2120 $CFG->{$k} = $v unless exists $CFG->{$k}; 2185 $CFG->{$k} = $v unless exists $CFG->{$k};
2121 } 2186 }
2190 2255
2191Event::loop; 2256Event::loop;
2192#CFPlus::SDL_Quit; 2257#CFPlus::SDL_Quit;
2193#CFPlus::_exit 0; 2258#CFPlus::_exit 0;
2194 2259
2260END {
2195END { CFPlus::SDL_Quit } 2261 CFPlus::SDL_Quit;
2262 CFPlus::DB::Server::stop;
2263}
2196 2264
2197=head1 NAME 2265=head1 NAME
2198 2266
2199cfplus - A Crossfire+ and Crossfire game client 2267cfplus - A Crossfire+ and Crossfire game client
2200 2268

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines