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.130 by root, Sun Nov 19 19:43:53 2006 UTC vs.
Revision 1.133 by root, Sun Dec 3 01:03:49 2006 UTC

21 } 21 }
22} 22}
23 23
24use strict; 24use strict;
25use utf8; 25use utf8;
26
27use Carp 'verbose';
26 28
27# do things only needed for single-binary version (par) 29# do things only needed for single-binary version (par)
28BEGIN { 30BEGIN {
29 if (%PAR::LibCache) { 31 if (%PAR::LibCache) {
30 @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
66$SIG{QUIT} = sub { Carp::cluck "QUIT" }; 68$SIG{QUIT} = sub { Carp::cluck "QUIT" };
67$SIG{PIPE} = 'IGNORE'; 69$SIG{PIPE} = 'IGNORE';
68 70
69$Event::Eval = 0; 71$Event::Eval = 0;
70$Event::DIED = sub { 72$Event::DIED = sub {
71 # TODO: display dialog box or so 73 CFPlus::fatal Carp::longmess $_[1]
72 Carp::cluck $_[1];#d#TODO: remove when stable
73 return;#d#
74 CFPlus::fatal ($_[1]);
75}; 74};
76 75
77my $MAX_FPS = 60; 76my $MAX_FPS = 60;
78my $MIN_FPS = 5; # unused as of yet 77my $MIN_FPS = 5; # unused as of yet
79 78
123 122
124our $INVENTORY_PAGE; 123our $INVENTORY_PAGE;
125our $STATS_PAGE; 124our $STATS_PAGE;
126our $SKILL_PAGE; 125our $SKILL_PAGE;
127our $SPELL_PAGE; 126our $SPELL_PAGE;
127our $SPELL_LIST;
128 128
129our $HELP_WINDOW; 129our $HELP_WINDOW;
130our $MESSAGE_WINDOW; 130our $MESSAGE_WINDOW;
131our $FLOORBOX; 131our $FLOORBOX;
132our $GAUGES; 132our $GAUGES;
429sub stop_game { 429sub stop_game {
430 $LOGIN_BUTTON->set_text ("Login"); 430 $LOGIN_BUTTON->set_text ("Login");
431 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 431 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
432 $SETUP_DIALOG->show; 432 $SETUP_DIALOG->show;
433 $PL_WINDOW->hide; 433 $PL_WINDOW->hide;
434 $SPELL_PAGE->clear_spells; 434 $SPELL_LIST->clear_spells;
435 435
436 return unless $CONN; 436 return unless $CONN;
437 437
438 status "connection closed"; 438 status "connection closed";
439 439
666 $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 }); 666 $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 });
667 $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); 667 $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS");
668 $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); 668 $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 });
669 $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); 669 $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips");
670 $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); 670 $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 });
671 $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { die "violator" } );
671 672
672 my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05); 673 my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05);
673 674
674 for my $x (0..2) { 675 for my $x (0..2) {
675 for my $y (0 .. 2) { 676 for my $y (0 .. 2) {
1189 ["Boots" => PICKUP_BOOTS], 1190 ["Boots" => PICKUP_BOOTS],
1190 ["Gloves" => PICKUP_GLOVES], 1191 ["Gloves" => PICKUP_GLOVES],
1191 ["Cloaks" => PICKUP_CLOAK], 1192 ["Cloaks" => PICKUP_CLOAK],
1192 ], 1193 ],
1193 1194
1194 ["Readables", 2, 2, 1195 ["Readables", 2, 0,
1195 ["Spellbooks" => PICKUP_SPELLBOOK], 1196 ["Spellbooks" => PICKUP_SPELLBOOK],
1196 ["Skillscrolls" => PICKUP_SKILLSCROLL], 1197 ["Skillscrolls" => PICKUP_SKILLSCROLL],
1197 ["Normal Books/Scrolls" => PICKUP_READABLES], 1198 ["Normal Books/Scrolls" => PICKUP_READABLES],
1198 ], 1199 ],
1199 ["Misc", 2, 7, 1200 ["Misc", 2, 5,
1200 ["Food" => PICKUP_FOOD], 1201 ["Food" => PICKUP_FOOD],
1201 ["Drinks" => PICKUP_DRINK], 1202 ["Drinks" => PICKUP_DRINK],
1202 ["Valuables (Money, Gems)" => PICKUP_VALUABLES], 1203 ["Valuables (Money, Gems)" => PICKUP_VALUABLES],
1203 ["Keys" => PICKUP_KEY], 1204 ["Keys" => PICKUP_KEY],
1204 ["Magical Items" => PICKUP_MAGICAL], 1205 ["Magical Items" => PICKUP_MAGICAL],
1205 ["Potions" => PICKUP_POTION], 1206 ["Potions" => PICKUP_POTION],
1206 ["Magic Devices" => PICKUP_MAGIC_DEVICE], 1207 ["Magic Devices" => PICKUP_MAGIC_DEVICE],
1207 ["Ignore cursed" => PICKUP_NOT_CURSED], 1208 ["Ignore cursed" => PICKUP_NOT_CURSED],
1208 ["Jewelery" => PICKUP_JEWELS], 1209 ["Jewelery" => PICKUP_JEWELS],
1210 ["Flesh" => PICKUP_FLESH],
1209 ], 1211 ],
1210 ["Weight/Value ratio", 2, 17] 1212 ["Weight/Value ratio", 2, 17]
1211 ) 1213 )
1212 { 1214 {
1213 my ($title, $x, $y, @bits) = @$_; 1215 my ($title, $x, $y, @bits) = @$_;
1358 $ntb->add ( 1360 $ntb->add (
1359 "Skills (F3)" => $SKILL_PAGE = skill_window, 1361 "Skills (F3)" => $SKILL_PAGE = skill_window,
1360 "Shows all your Skills." 1362 "Shows all your Skills."
1361 ); 1363 );
1362 1364
1363 my $spellsw = new CFPlus::UI::ScrolledWindow (expand => 1, scroll_y => 1); 1365 my $spellsw = $SPELL_PAGE = new CFPlus::UI::ScrolledWindow (expand => 1, scroll_y => 1);
1364 $spellsw->add ($SPELL_PAGE = new CFPlus::UI::SpellList); 1366 $spellsw->add ($SPELL_LIST = new CFPlus::UI::SpellList);
1365 $ntb->add ( 1367 $ntb->add (
1366 "Spellbook (F4)" => $spellsw, 1368 "Spellbook (F4)" => $spellsw,
1367 "Displays all spells you have and lets you edit keyboard shortcuts for them." 1369 "Displays all spells you have and lets you edit keyboard shortcuts for them."
1368 ); 1370 );
1369 $ntb->add ( 1371 $ntb->add (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines