--- deliantra/Deliantra-Client/bin/cfplus 2006/07/15 01:19:55 1.93 +++ deliantra/Deliantra-Client/bin/cfplus 2006/07/24 08:23:28 1.103 @@ -38,19 +38,28 @@ use CFClient::OpenGL (); use CFClient::Protocol; use CFClient::UI; +use CFClient::Pod; use CFClient::BindingEditor; use CFClient::MapWidget; $SIG{QUIT} = sub { Carp::cluck "QUIT" }; $SIG{PIPE} = 'IGNORE'; +$Event::Eval = 0; $Event::DIED = sub { # TODO: display dialog box or so - Carp::confess $_[1];#d#TODO: remove when stable + Carp::cluck $_[1];#d#TODO: remove when stable CFClient::error $_[1]; }; -#$SIG{__WARN__} = sub { Carp::cluck $_[0] };#d# +$SIG{__DIE__} = sub { + return if CFClient::in_destruct; + Carp::cluck $_[0]; + CFClient::error $_[0]; + return;#d# + #return unless defined $^S && !$^S; + $Event::DIED->(undef, $_[0]); +}; our $VERSION = '0.1'; @@ -88,6 +97,7 @@ our $LOGIN_BUTTON; our $QUIT_DIALOG; our $HOST_ENTRY; +our $FULLSCREEN_ENABLE; our $PICKUP_ENABLE; our $SERVER_INFO; @@ -101,6 +111,7 @@ our $INVENTORY_PAGE; our $STATS_PAGE; +our $SKILL_PAGE; our $SPELL_PAGE; our $HELP_WINDOW; @@ -130,7 +141,7 @@ our $PICKUP_CFG; sub status { - $STATUSBOX->add (CFClient::UI::Label::escape $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); + $STATUSBOX->add (CFClient::asxml $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); } sub debug { @@ -189,7 +200,7 @@ unshift @dialog, new CFClient::UI::Label max_w => $::WIDTH * 0.4, ellipsise => 0, - markup => "\nOr use your keyboard:\n"; + markup => "\nOr use your keyboard and the text entry below:\n"; unshift @dialog, my $table = new CFClient::UI::Table; @@ -216,11 +227,11 @@ markup => "Character Creation: Race\n\n" . "Look at the Messages window to see a description of this race " - . "(or hover with your mouse over the bottommost entry in the status area in the lower left area of the screen) " . "and the center of the screen to see how this race looks like " - . "(this is below this dialog window, you may need to click on the display area to make it visible).\n\n" - . "You can look at another race, or accept this race (you will come back to this race eventually, " - . "so you can take your time making this important choice." + . "(below this dialog window: you may need to move the dialog away and " + . "click into the display area to make it visible).\n\n" + . "You can look at another race, or accept this race (you will cycle back to " + . "this race eventually, so you can take your time making this important choice." ; } elsif ($prompt =~ /roll new stats/) { @@ -236,7 +247,7 @@ unshift @dialog, new CFClient::UI::Label max_w => $::WIDTH * 0.4, ellipsise => 0, - markup => "\nOr use your keyboard:\n"; + markup => "\nOr use your keyboard and the text entry below:\n"; unshift @dialog, my $table = new CFClient::UI::Table; @@ -251,7 +262,8 @@ ); # center: swap stats - my ($sw1, $sw2) = map +(new CFClient::UI::Combobox + my ($sw1, $sw2) = map +(new CFClient::UI::Selector + expand => 1, value => $_, options => [ [1 => "Str", "Strength ($conn->{stat}{+CS_STAT_STR})"], @@ -286,15 +298,36 @@ }, ); + unshift @dialog, my $hbox = new CFClient::UI::HBox; + for ( + [Str => CS_STAT_STR], + [Dex => CS_STAT_DEX], + [Con => CS_STAT_CON], + [Int => CS_STAT_INT], + [Wis => CS_STAT_WIS], + [Pow => CS_STAT_POW], + [Cha => CS_STAT_CHA], + ) { + my ($name, $id) = @$_; + $hbox->add (new CFClient::UI::Label + markup => "$conn->{stat}{$id} $name", + align => 0, + expand => 1, + can_events => 1, + can_hover => 1, + tooltip => $CFClient::STAT_TOOLTIP{$name}, + ); + } + unshift @dialog, new CFClient::UI::Label max_w => $::WIDTH * 0.4, ellipsise => 0, markup => "Character Creation: Stats\n\n" - . "Look at the Stats window to see your basic stats " - . "(first column: 1 strength, 2 dexterity, 3 constitution, 4 intelligence, 5 wisdom, 6 power and 7 charisma).\n\n" - . "You can create another set of stats, swap two stat values with each other or accept the stats as they are now and continue. " - . "Race selection will influence those values later on." + . "Stats are a very important aspect of your character. You can use the tooltips to learn what each Stat governs.\n\n" + . "The stats generated by the server are always sorted from Str (highest) to Cha (lowest). " + . "They will be modified later by both the race and the class you choose.\n\n" + . "You can create another set of stats, swap two stat values with each other or accept the stats as shown below and continue.\n" ; } @@ -418,7 +451,7 @@ my $row = 1; $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fullscreen"); - $table->add (1, $row++, new CFClient::UI::CheckBox + $table->add (1, $row++, $FULLSCREEN_ENABLE = new CFClient::UI::CheckBox state => $CFG->{fullscreen}, tooltip => "Bring the client into fullscreen mode.", on_changed => sub { my ($self, $value) = @_; $CFG->{fullscreen} = $value; 0 } @@ -644,7 +677,11 @@ } sub stats_window { - my $vb = new CFClient::UI::VBox; + my $r = new CFClient::UI::ScrolledWindow ( + expand => 1, + scroll_y => 1 + ); + $r->add (my $vb = new CFClient::UI::VBox); $vb->add ($STATWIDS->{title} = new CFClient::UI::Label valign => 0, align => -1, text => "Title:", expand => 1, can_hover => 1, can_events => 1, @@ -661,34 +698,35 @@ can_hover => 1, can_events => 1, tooltip => "The weight limit: you cannot carry more than this."); - $vb->add (my $hb = new CFClient::UI::HBox expand => 1); $hb->add (my $tbl = new CFClient::UI::Table expand => 1); my $color2 = [1, 1, 0]; for ( - [0, 0, st_str => "Str", 30, "Physical Strength, determines damage dealt with weapons, how much you can carry, and how often you can attack"], - [0, 1, st_dex => "Dex", 30, "Dexterity, your physical agility. Determines chance of being hit and affects armor class and speed"], - [0, 2, st_con => "Con", 30, "Constitution, physical health and toughness. Determines how many healthpoints you can have"], - [0, 3, st_int => "Int", 30, "Intelligence, your ability to learn and use skills and incantations (both prayers and magic) and determines how much spell points you can have"], - [0, 4, st_wis => "Wis", 30, "Wisdom, the ability to learn and use divine magic (prayers). Determines how many grace points you can have"], - [0, 5, st_pow => "Pow", 30, "Power, your magical potential. Influences the strength of spell effects, and also how much your spell and grace points increase when leveling up"], - [0, 6, st_cha => "Cha", 30, "Charisma, how well you are received by NPCs. Affects buying and selling prices in shops."], - - [2, 0, st_wc => "Wc", -120, "Weapon Class, effectiveness of melee/missile attacks. Lower is more potent. Current weapon, level and Str are some things which effect the value of Wc. The value of Wc may range between 25 and -72."], - [2, 1, st_ac => "Ac", -120, "Armour Class, how protected you are from being hit by any attack. Lower values are better. Ac is based on your race and is modified by the Dex and current armour worn. For characters that cannot wear armour, Ac improves as their level increases."], - [2, 2, st_dam => "Dam", 120, "Damage, how much damage your melee/missile attack inflicts. Higher values indicate a greater amount of damage will be inflicted with each attack."], - [2, 3, st_arm => "Arm", 120, "Armour, how much damage (from physical attacks) will be subtracted from successful hits made upon you. This value ranges between 0 to 99%. Current armour worn primarily determines Arm value. This is the same as the physical resistance."], - [2, 4, st_spd => "Spd", 10.54, "Speed, how fast you can move. The value of speed may range between nearly 0 (\"very slow\") to higher than 5 (\"lightning fast\"). Base speed is determined from the Dex and modified downward proportionally by the amount of weight carried which exceeds the Max Carry limit. The armour worn also sets the upper limit on speed."], - [2, 5, st_wspd => "WSp", 10.54, "Weapon Speed, how many attacks you may make per unit of time (0.120s). Higher values indicate faster attack speed. Current weapon and Dex effect the value of weapon speed."], + [0, 0, st_str => "Str", 30], + [0, 1, st_dex => "Dex", 30], + [0, 2, st_con => "Con", 30], + [0, 3, st_int => "Int", 30], + [0, 4, st_wis => "Wis", 30], + [0, 5, st_pow => "Pow", 30], + [0, 6, st_cha => "Cha", 30], + + [2, 0, st_wc => "Wc", -120], + [2, 1, st_ac => "Ac", -120], + [2, 2, st_dam => "Dam", 120], + [2, 3, st_arm => "Arm", 120], + [2, 4, st_spd => "Spd", 10.54], + [2, 5, st_wspd => "WSp", 10.54], ) { - my ($col, $row, $id, $label, $template, $tooltip) = @$_; + my ($col, $row, $id, $label, $template) = @$_; $tbl->add ($col , $row, $STATWIDS->{$id} = new CFClient::UI::Label - font => $FONT_FIXED, can_hover => 1, can_events => 1, valign => 0, align => +1, template => $template, tooltip => $tooltip); + font => $FONT_FIXED, can_hover => 1, can_events => 1, valign => 0, + align => +1, template => $template, tooltip => $CFClient::STAT_TOOLTIP{$label}); $tbl->add ($col + 1, $row, $STATWIDS->{"$id\_lbl"} = new CFClient::UI::Label - font => $FONT_FIXED, can_hover => 1, can_events => 1, fg => $color2, valign => 0, align => -1, text => $label, tooltip => $tooltip); + font => $FONT_FIXED, can_hover => 1, can_events => 1, fg => $color2, valign => 0, + align => -1, text => $label, tooltip => $CFClient::STAT_TOOLTIP{$label}); } $vb->add (my $tbl2 = new CFClient::UI::Table expand => 1); @@ -771,125 +809,21 @@ } } - update_stats_window ({}); + #update_stats_window ({}); - $vb + $r } sub skill_window { - my ($self) = @_; - $STATWIDS->{"_skill_tbl"} = new CFClient::UI::Table expand => 1; + my $sw = new CFClient::UI::ScrolledWindow (expand => 1); + $sw->add ($STATWIDS->{skill_tbl} = new CFClient::UI::Table expand => 1, col_expand => [0, 0, 1, 0, 0, 1]); + $sw } sub formsep($) { scalar reverse join ",", unpack "(A3)*", reverse $_[0] * 1 } -sub update_stats_window { - my ($stats) = @_; - - # I love text protocols... - - my $hp = $stats->{+CS_STAT_HP} * 1; - my $hp_m = $stats->{+CS_STAT_MAXHP} * 1; - my $sp = $stats->{+CS_STAT_SP} * 1; - my $sp_m = $stats->{+CS_STAT_MAXSP} * 1; - my $fo = $stats->{+CS_STAT_FOOD} * 1; - my $fo_m = 999; - my $gr = $stats->{+CS_STAT_GRACE} * 1; - my $gr_m = $stats->{+CS_STAT_MAXGRACE} * 1; - - $GAUGES->{hp} ->set_value ($hp, $hp_m); - $GAUGES->{mana} ->set_value ($sp, $sp_m); - $GAUGES->{food} ->set_value ($fo, $fo_m); - $GAUGES->{grace} ->set_value ($gr, $gr_m); - $GAUGES->{exp} ->set_text ("Exp: " . (formsep $stats->{+CS_STAT_EXP64}) - . " (lvl " . ($stats->{+CS_STAT_LEVEL} * 1) . ")"); - my $rng = $stats->{+CS_STAT_RANGE}; - $rng =~ s/^Range: //; # thank you so much dear server - $GAUGES->{range} ->set_text ("Rng: " . $rng); - my $title = $stats->{+CS_STAT_TITLE}; - $title =~ s/^Player: //; - $STATWIDS->{title} ->set_text ("Title: " . $title); - - $STATWIDS->{st_str} ->set_text (sprintf "%d" , $stats->{+CS_STAT_STR}); - $STATWIDS->{st_dex} ->set_text (sprintf "%d" , $stats->{+CS_STAT_DEX}); - $STATWIDS->{st_con} ->set_text (sprintf "%d" , $stats->{+CS_STAT_CON}); - $STATWIDS->{st_int} ->set_text (sprintf "%d" , $stats->{+CS_STAT_INT}); - $STATWIDS->{st_wis} ->set_text (sprintf "%d" , $stats->{+CS_STAT_WIS}); - $STATWIDS->{st_pow} ->set_text (sprintf "%d" , $stats->{+CS_STAT_POW}); - $STATWIDS->{st_cha} ->set_text (sprintf "%d" , $stats->{+CS_STAT_CHA}); - $STATWIDS->{st_wc} ->set_text (sprintf "%d" , $stats->{+CS_STAT_WC}); - $STATWIDS->{st_ac} ->set_text (sprintf "%d" , $stats->{+CS_STAT_AC}); - $STATWIDS->{st_dam} ->set_text (sprintf "%d" , $stats->{+CS_STAT_DAM}); - $STATWIDS->{st_arm} ->set_text (sprintf "%d" , $stats->{+CS_STAT_RES_PHYS}); - $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED}); - $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP}); - - $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000); - - my %tbl = ( - phys => CS_STAT_RES_PHYS, - magic => CS_STAT_RES_MAG, - fire => CS_STAT_RES_FIRE, - elec => CS_STAT_RES_ELEC, - cold => CS_STAT_RES_COLD, - conf => CS_STAT_RES_CONF, - acid => CS_STAT_RES_ACID, - drain => CS_STAT_RES_DRAIN, - ghit => CS_STAT_RES_GHOSTHIT, - pois => CS_STAT_RES_POISON, - slow => CS_STAT_RES_SLOW, - para => CS_STAT_RES_PARA, - tund => CS_STAT_TURN_UNDEAD, - fear => CS_STAT_RES_FEAR, - depl => CS_STAT_RES_DEPLETE, - deat => CS_STAT_RES_DEATH, - holyw => CS_STAT_RES_HOLYWORD, - blind => CS_STAT_RES_BLIND, - ); - - if ($::CONN && !$STATWIDS->{_skill_tbl_init}) { - my $sktbl = $STATWIDS->{_skill_tbl}; - $sktbl->clear; - - $sktbl->add (0, 0, new CFClient::UI::Label text => "Exp.", align => 1); - $sktbl->add (1, 0, new CFClient::UI::Label text => "Level", align => 1); - $sktbl->add (2, 0, new CFClient::UI::Label text => "Skillname"); - - my @skills; - - for (my $i = CS_STAT_SKILLINFO; $i < CS_STAT_SKILLINFO+CS_NUM_SKILLS; $i++) { - push @skills, [$i, $::CONN->{skill_info}{$i}]; - } - - my $y = 1; - for (sort { $a->[1] cmp $b->[1] } @skills) { - my ($idx, $name) = @$_; - - unless (defined $STATWIDS->{"sk_xp_$idx"} || !$::CONN->{skill_info}{$idx}) { - $sktbl->add (0, $y, $STATWIDS->{"sk_xp_$idx"} = new CFClient::UI::Label text => "0", align => 1); - $sktbl->add (1, $y, $STATWIDS->{"sk_lvl_$idx"} = new CFClient::UI::Label text => "0", align => 1); - $sktbl->add (2, $y++, new CFClient::UI::Label text => $name); - } - } - - $STATWIDS->{_skill_tbl_init} = 1; - } - - for (my $i = CS_STAT_SKILLINFO; $i < CS_STAT_SKILLINFO+CS_NUM_SKILLS; $i++) { - if (exists $stats->{$i}) { - $STATWIDS->{"sk_xp_$i"}->set_text (formsep $stats->{$i}->[1]) - if $STATWIDS->{"sk_xp_$i"}; - $STATWIDS->{"sk_lvl_$i"}->set_text (sprintf "%d", $stats->{$i}->[0]) - if $STATWIDS->{"sk_lvl_$i"}; - } - } - - $STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$tbl{$_}}) - for keys %tbl; -} - my $METASERVER_ATIME; sub update_metaserver { @@ -1208,6 +1142,10 @@ y => "center", z => 50, title => "Really Quit?", + on_key_down => sub { + my ($dialog, $ev) = @_; + $ev->{sym} == 27 and $dialog->hide; + } ; $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); @@ -1231,6 +1169,7 @@ } $QUIT_DIALOG->show; + $QUIT_DIALOG->grab_focus; } sub autopickup_setup { @@ -1330,18 +1269,54 @@ $table } +my %SORT_ORDER = ( + type => undef, + mtime => sub { sort { + ($a->{flags} & F_LOCKED) <=> ($b->{flags} & F_LOCKED) + or $b->{mtime} <=> $a->{mtime} + or $a->{type} <=> $b->{type} + } @_ }, + weight => sub { sort { + $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1) + or $a->{type} <=> $b->{type} + } @_ }, +); + sub inventory_widget { my $hb = new CFClient::UI::HBox homogeneous => 1; $hb->add (my $vb1 = new CFClient::UI::VBox); $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); - $vb1->add ($INV = new CFClient::UI::Inventory); + + $vb1->add (my $hb1 = new CFClient::UI::HBox); + + use sort 'stable'; + + $hb1->add (new CFClient::UI::Selector + value => $::CFG->{inv_sort}, + options => [ + [type => "Type/Name"], + [mtime => "Recent/Normal/Locked"], + [weight => "Weight/Type"], + ], + on_changed => sub { + $::CFG->{inv_sort} = $_[1]; + $INV->set_sort_order ($SORT_ORDER{$_[1]}); + }, + ); + $hb1->add (new CFClient::UI::Label text => "Weight: ", align => 1, expand => 1); + #TODO# update to weigh/maxweight + $hb1->add ($STATWIDS->{i_weight} = new CFClient::UI::Label align => -1); + + $vb1->add (my $sw1 = new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1); + $sw1->add ($INV = new CFClient::UI::Inventory); $hb->add (my $vb2 = new CFClient::UI::VBox); $vb2->add ($INV_RIGHT_HB = new CFClient::UI::HBox); - $vb2->add ($INVR = new CFClient::UI::Inventory); + $vb2->add (my $sw2 = new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1); + $sw2->add ($INVR = new CFClient::UI::Inventory); # XXX: Call after $INVR = ... because set_opencont sets the items CFClient::Protocol::set_opencont ($::CONN, 0, "Floor"); @@ -1373,26 +1348,25 @@ my $ntb = $PL_NOTEBOOK = - new CFClient::UI::Notebook - expand => 1, - debug => 1, - filter => (new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1), - ; + new CFClient::UI::Notebook expand => 1, debug => 1; $ntb->add ( - "Stats" => $STATS_PAGE = stats_window, + "Statistics (F2)" => $STATS_PAGE = stats_window, "Shows statistics, where all your Stats and Resistances are shown." ); $ntb->add ( - "Skills" => $STATS_PAGE = skill_window, + "Skills (F3)" => $SKILL_PAGE = skill_window, "Shows all your Skills." ); + + my $spellsw = new CFClient::UI::ScrolledWindow (expand => 1, scroll_y => 1); + $spellsw->add ($SPELL_PAGE = new CFClient::UI::SpellList); $ntb->add ( - Spellbook => $SPELL_PAGE = new CFClient::UI::SpellList, + "Spellbook (F4)" => $spellsw, "Displays all spells you have and lets you edit keyboard shortcuts for them." ); $ntb->add ( - Inventory => $INVENTORY_PAGE = inventory_widget, + "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget, "Toggles the inventory window, where you can manage your loot (or treasures :). " . "You can also hit the Tab-key to show/hide the Inventory." ); @@ -1533,7 +1507,7 @@ expand => 1, fontsize => 0.8, padding_x => 4); $buttons->add (new CFClient::UI::Label text => "Choose a document to display: "); - $buttons->add (my $combo = new CFClient::UI::Combobox + $buttons->add (my $combo = new CFClient::UI::Selector value => undef, options => [ [intro => "Introduction"], @@ -1546,19 +1520,8 @@ on_changed => sub { my ($self, $pod) = @_; - my $pom = CFClient::load_pod CFClient::find_rcfile "pod/$pod.pod", - doc_viewer => 1, sub { CFClient::pod_to_pango_list $_[0] }; - $viewer->clear; - -# $viewer->add_paragraph ([1, 1, 1, 1], ["Test\n\n \x{fffc} \x{fffc}\n", -# (new CFClient::UI::Image path => "x.png", can_hover => 1, can_events => 1), -# (new CFClient::UI::Label text => "üüüü", can_hover => 1, can_events => 1, tooltip => "??"), -# ]);#d# - - $viewer->add_paragraph ([1, 1, 1, 1], $_->[1], $_->[0]) - for @$pom; - + $viewer->add_paragraph (@{ CFClient::Pod::pod_paragraphs $pod }); $viewer->set_offset (0); 0 @@ -1832,60 +1795,6 @@ $CAN_REFRESH = 0; $LAST_REFRESH = $NOW; -0 && do { - # some weird model-drawing code, just a joke right now - use CFClient::OpenGL; - - $demo{t}{eye_auv} ||= new_from_file CFClient::Texture "eye2.png" or die; - $demo{t}{body_auv} ||= new_from_file CFClient::Texture "body_auv3.png" or die; - $demo{r} ||= do { - my $mod = Compress::LZF::sthaw do { local $/; open my $fh, "<:raw:perlio", "dread.lz3"; <$fh> }; - $mod->{v} = pack "f*", @{$mod->{v}}; - $_ = [scalar @$_, pack "S!*", @$_] - for values %{$mod->{g}}; - $mod - }; - - my $r = $demo{r} or die; - - glDepthMask 1; - glClear GL_DEPTH_BUFFER_BIT; - glEnable GL_TEXTURE_2D; - glEnable GL_DEPTH_TEST; - glEnable GL_CULL_FACE; - glShadeModel $::FAST ? GL_FLAT : GL_SMOOTH; - - glMatrixMode GL_PROJECTION; - glLoadIdentity; - glFrustum -1 * ($::WIDTH / $::HEIGHT), 1 * ($::WIDTH / $::HEIGHT), 1, -1, 1, 10000; - #glOrtho 0, $::WIDTH, 0, $::HEIGHT, -10000, 10000; - glMatrixMode GL_MODELVIEW; - glLoadIdentity; - - glPushMatrix; - glTranslate 0, 0, -800; - glScale 1, -1, 1; - glRotate $NOW * 1000 % 36000 / 5, 0, 1, 0; - glRotate $NOW * 1000 % 36000 / 6, 1, 0, 0; - glRotate $NOW * 1000 % 36000 / 7, 0, 0, 1; - glScale 50, 50, 50; - - glInterleavedArrays GL_T2F_N3F_V3F, 0, $r->{v}; - while (my ($k, $v) = each %{$r->{g}}) { - glBindTexture GL_TEXTURE_2D, ($demo{t}{$k}{name} or die); - glDrawElements GL_TRIANGLES, $v->[0], GL_UNSIGNED_SHORT, $v->[1]; - } - - glPopMatrix; - - glShadeModel GL_FLAT; - glDisable GL_DEPTH_TEST; - glDisable GL_TEXTURE_2D; - glDepthMask 0; - - $WANT_REFRESH++; -}; - CFClient::SDL_GL_SwapBuffers; } @@ -1941,8 +1850,8 @@ CFClient::SDL_KEYDOWN => sub { if ($_[0]{mod} & CFClient::KMOD_ALT && $_[0]{sym} == 13) { # alt-enter + $FULLSCREEN_ENABLE->toggle; video_shutdown; - $CFG->{fullscreen} = !$CFG->{fullscreen}; video_init; } else { CFClient::UI::feed_sdl_key_down_event ($_[0]); @@ -1966,12 +1875,6 @@ $SIG{INT} = $SIG{TERM} = sub { exit }; { - local $SIG{__DIE__} = sub { - return unless defined $^S && !$^S; - Carp::confess $_[1];#d#TODO: remove when stable - CFClient::fatal $_[0]; - }; - CFClient::read_cfg "$Crossfire::VARDIR/cfplusrc"; CFClient::UI::set_layout ($::CFG->{layout}); @@ -1999,6 +1902,7 @@ output_sync => 1, output_count => 1, pickup => 0, + inv_sort => "mtime", default => "profile", # default profile );