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.152 by root, Tue Apr 24 01:13:15 2007 UTC vs.
Revision 1.158 by root, Sun Jul 1 03:12:35 2007 UTC

29# do things only needed for single-binary version (par) 29# do things only needed for single-binary version (par)
30BEGIN { 30BEGIN {
31 if (%PAR::LibCache) { 31 if (%PAR::LibCache) {
32 @INC = grep ref, @INC; # weed out all paths except pars loader refs 32 @INC = grep ref, @INC; # weed out all paths except pars loader refs
33 33
34 my $tmp = $ENV{PAR_TEMP};
35
34 while (my ($filename, $zip) = each %PAR::LibCache) { 36 while (my ($filename, $zip) = each %PAR::LibCache) {
35 for ($zip->memberNames) { 37 for ($zip->memberNames) {
36 next unless /^root\/(.*)/; 38 next unless /^root\/(.*)/;
37 $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") 39 $zip->extractMember ($_, "$tmp/$1")
38 unless -e "$ENV{PAR_TEMP}/$1"; 40 unless -e "$tmp/$1";
39 } 41 }
40 } 42 }
41 43
42 # TODO: pango-rc file, anybody? 44 if ($^O eq "MSWin32") {
45 # relocatable
46 } else {
47 # unix, need to patch pango rc file
48 open my $fh, "<:perlio", "$tmp/usr/lib/pango/1.5.0/module-files.d/libpango1.0-0.modules"
49 or die "$tmp/usr/lib/1.5.0/module-files.d/libpango1.0-0.modules: $!";
50 local $/;
51 my $rc = <$fh>;
52 $rc =~ s/^\//$tmp\//gm; # replace abs paths by relative ones
43 53
44 unshift @INC, $ENV{PAR_TEMP}; 54 mkdir "$tmp/pango-modules";
55 open my $fh, ">:perlio", "$tmp/pango-modules/pango.modules"
56 or die "$tmp/pango-modules/pango.modules: $!";
57 print $fh $rc;
58
59 $ENV{PANGO_RC_FILE} = "$tmp/pango.rc";
60 open my $fh, ">:perlio", $ENV{PANGO_RC_FILE}
61 or die "$ENV{PANGO_RC_FILE}: $!";
62 print $fh "[Pango]\nModuleFiles = $tmp/pango-modules\n";
63 }
64
65 unshift @INC, $tmp;
45 } 66 }
46} 67}
47 68
48# need to do it again because that pile of garbage called PAR nukes it before main 69# need to do it again because that pile of garbage called PAR nukes it before main
49unshift @INC, $ENV{PAR_TEMP} 70unshift @INC, $ENV{PAR_TEMP}
269 ellipsise => 0, 290 ellipsise => 0,
270 markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>", 291 markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>",
271 ; 292 ;
272 } 293 }
273 294
274 if ($conn->{chargen_race_title}) {
275 unshift @dialog, new CFPlus::UI::Face 295 unshift @dialog, new CFPlus::UI::Face
276 face => $conn->{player}{face}, 296 face => $conn->{player}{face},
277 bg => [.2, .2, .2, 1], 297 bg => [.2, .2, .2, 1],
278 min_w => 64, 298 min_w => 64,
279 min_h => 64, 299 min_h => 64,
280 ;
281 } 300 ;
282 301
283 if ($conn->{chargen_race_title}) { 302 if ($conn->{chargen_race_title}) {
284 unshift @dialog, new CFPlus::UI::Label 303 unshift @dialog, new CFPlus::UI::Label
285 allign => 1, 304 allign => 1,
286 ellipsise => 0, 305 ellipsise => 0,
476 $LOGIN_BUTTON->set_text ("Login"); 495 $LOGIN_BUTTON->set_text ("Login");
477 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 496 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
478 $SETUP_DIALOG->show; 497 $SETUP_DIALOG->show;
479 $PL_WINDOW->hide; 498 $PL_WINDOW->hide;
480 $SPELL_LIST->clear_spells; 499 $SPELL_LIST->clear_spells;
500 $CFPlus::UI::ROOT->emit (stop_game => ! ! $CONN);
481 501
482 return unless $CONN; 502 return unless $CONN;
483 503
484 status "connection closed"; 504 status "connection closed";
485 505
726 $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 }); 746 $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 });
727 $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); 747 $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS");
728 $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); 748 $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 });
729 $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); 749 $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips");
730 $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); 750 $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 });
731 $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { die "violator" } ); 751 $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } );
732 752
733 my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05); 753 my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05);
734 754
735 for my $x (0..2) { 755 for my $x (0..2) {
736 for my $y (0 .. 2) { 756 for my $y (0 .. 2) {
1434 has_close_button => 1 1454 has_close_button => 1
1435 ; 1455 ;
1436 1456
1437 my $ntb = 1457 my $ntb =
1438 $PL_NOTEBOOK = 1458 $PL_NOTEBOOK =
1439 new CFPlus::UI::Notebook expand => 1, debug => 1; 1459 new CFPlus::UI::Notebook expand => 1;
1440 1460
1441 $ntb->add ( 1461 $ntb->add (
1442 "Statistics (F2)" => $STATS_PAGE = stats_window, 1462 "Statistics (F2)" => $STATS_PAGE = stats_window,
1443 "Shows statistics, where all your Stats and Resistances are shown." 1463 "Shows statistics, where all your Stats and Resistances are shown."
1444 ); 1464 );
1456 $ntb->add ( 1476 $ntb->add (
1457 "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget, 1477 "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget,
1458 "Toggles the inventory window, where you can manage your loot (or treasures :). " 1478 "Toggles the inventory window, where you can manage your loot (or treasures :). "
1459 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory." 1479 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory."
1460 ); 1480 );
1481 $ntb->add (Pickup => autopickup_setup,
1482 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them.");
1461 1483
1462 $ntb->set_current_page ($INVENTORY_PAGE); 1484 $ntb->set_current_page ($INVENTORY_PAGE);
1463 1485
1464 $plwin->add ($ntb); 1486 $plwin->add ($ntb);
1465 $plwin 1487 $plwin
1792 1814
1793 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, 1815 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup,
1794 "Configure the server to play on, your username, password and other server-related options."); 1816 "Configure the server to play on, your username, password and other server-related options.");
1795 $SETUP_NOTEBOOK->add (Client => client_setup, 1817 $SETUP_NOTEBOOK->add (Client => client_setup,
1796 "Configure various client-specific settings."); 1818 "Configure various client-specific settings.");
1797 $SETUP_NOTEBOOK->add (Pickup => autopickup_setup,
1798 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them.");
1799 $SETUP_NOTEBOOK->add (Graphics => graphics_setup, 1819 $SETUP_NOTEBOOK->add (Graphics => graphics_setup,
1800 "Configure the video mode, performance, fonts and other graphical aspects of the game."); 1820 "Configure the video mode, performance, fonts and other graphical aspects of the game.");
1801 $SETUP_NOTEBOOK->add (Audio => audio_setup, 1821 $SETUP_NOTEBOOK->add (Audio => audio_setup,
1802 "Configure the use of audio, sound effects and background music."); 1822 "Configure the use of audio, sound effects and background music.");
1803 $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, 1823 $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines