ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/deliantra
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.54 by root, Fri Jul 18 22:56:11 2008 UTC vs.
Revision 1.58 by root, Sun Aug 17 01:27:33 2008 UTC

849 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Video Mode"); 849 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Video Mode");
850 $table->add_at (1, $row++, my $hbox = new DC::UI::HBox); 850 $table->add_at (1, $row++, my $hbox = new DC::UI::HBox);
851 851
852 $hbox->add ($MODE_SLIDER = new DC::UI::Slider 852 $hbox->add ($MODE_SLIDER = new DC::UI::Slider
853 force_w => $WIDTH * 0.1, expand => 1, 853 force_w => $WIDTH * 0.1, expand => 1,
854 range => [ ($CFG->{sdl_mode}) x 3 ],
854 tooltip => $vidmode_tooltip); 855 tooltip => $vidmode_tooltip);
855 $hbox->add (my $mode_label = new DC::UI::Label 856 $hbox->add (my $mode_label = new DC::UI::Label
856 height => 0.8, template => "9999x9999@9+9", 857 height => 0.8, template => "9999x9999@9+9",
857 can_events => 1, tooltip => $vidmode_tooltip); 858 can_events => 1, tooltip => $vidmode_tooltip);
858 859
930 on_activate => sub { 931 on_activate => sub {
931 video_shutdown (); 932 video_shutdown ();
932 video_init (); 933 video_init ();
933 0 934 0
934 } 935 }
936 );
937
938 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Smooth Movement");
939 $table->add_at (1, $row++, new DC::UI::CheckBox
940 state => $CFG->{smooth_movement},
941 tooltip => "<b>Smooth Movement</b> tries to make movement, well, smoother, but also increases the framerate. "
942 . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, "
943 . "then disable this option. Changes take effect immdiately.",
944 on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_movement} = $value; 0 }
935 ); 945 );
936 946
937 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale"); 947 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale");
938 $table->add_at (1, $row++, new DC::UI::Slider 948 $table->add_at (1, $row++, new DC::UI::Slider
939 range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], 949 range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1],
1739 ["Magic Devices" => PICKUP_MAGIC_DEVICE], 1749 ["Magic Devices" => PICKUP_MAGIC_DEVICE],
1740 ["Ignore cursed" => PICKUP_NOT_CURSED], 1750 ["Ignore cursed" => PICKUP_NOT_CURSED],
1741 ["Jewelery" => PICKUP_JEWELS], 1751 ["Jewelery" => PICKUP_JEWELS],
1742 ["Flesh" => PICKUP_FLESH], 1752 ["Flesh" => PICKUP_FLESH],
1743 ], 1753 ],
1744 ["Weight/Value ratio", 2, 17] 1754 ["Value/Weight ratio", 2, 17]
1745 ) 1755 )
1746 { 1756 {
1747 my ($title, $x, $y, @bits) = @$_; 1757 my ($title, $x, $y, @bits) = @$_;
1748 $table->add_at ($x, $y, new DC::UI::Label text => $title, align => 1, fg => [1, 1, 0]); 1758 $table->add_at ($x, $y, new DC::UI::Label text => $title, align => 1, fg => [1, 1, 0]);
1749 1759
1774 } 1784 }
1775 1785
1776 $table->add_at (2, 18, new DC::UI::ValSlider 1786 $table->add_at (2, 18, new DC::UI::ValSlider
1777 range => [$::CFG->{pickup} & 0xF, 0, 16, 1, 1], 1787 range => [$::CFG->{pickup} & 0xF, 0, 16, 1, 1],
1778 template => ">= 99", 1788 template => ">= 99",
1789 tooltip => "Pick up items whose value/weight (silver/kg) ratio is equal or higher than this setting (which is specified in gold coins).",
1779 to_value => sub { ">= " . 5 * $_[0] }, 1790 to_value => sub { ">= " . 5 * $_[0] },
1780 on_changed => sub { 1791 on_changed => sub {
1781 my ($slider, $value) = @_; 1792 my ($slider, $value) = @_;
1782 1793
1783 $::CFG->{pickup} &= ~0xF; 1794 $::CFG->{pickup} &= ~0xF;
1839 $::CFG->{inv_sort} = $_[1]; 1850 $::CFG->{inv_sort} = $_[1];
1840 $INV->set_sort_order ($SORT_ORDER{$_[1]}); 1851 $INV->set_sort_order ($SORT_ORDER{$_[1]});
1841 }, 1852 },
1842 ); 1853 );
1843 $hb1->add (new DC::UI::Label text => "Weight: ", align => 1, expand => 1); 1854 $hb1->add (new DC::UI::Label text => "Weight: ", align => 1, expand => 1);
1844 #TODO# update to weigh/maxweight 1855 #TODO# update to weight/maxweight
1845 $hb1->add ($STATWIDS->{i_weight} = new DC::UI::Label align => 0); 1856 $hb1->add ($STATWIDS->{i_weight} = new DC::UI::Label align => 0);
1846 1857
1847 $vb1->add (my $sw1 = new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); 1858 $vb1->add (my $sw1 = new DC::UI::ScrolledWindow expand => 1, scroll_y => 1);
1848 $sw1->add ($INV = new DC::UI::Inventory); 1859 $sw1->add ($INV = new DC::UI::Inventory);
1849 $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}}); 1860 $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}});
2191 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES; 2202 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES;
2192 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)"; 2203 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)";
2193 2204
2194 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES; 2205 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES;
2195 2206
2196 if (!exists $CFG->{sdl_mode} or $CFG->{sdl_mode} >= @SDL_MODES) { 2207 if (!exists $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) {
2197 $CFG->{sdl_mode} = 0; 2208 $CFG->{sdl_mode} = 0;
2198 for (reverse 0 .. $#SDL_MODES) { 2209 for (reverse 0 .. $#SDL_MODES) {
2199 $CFG->{sdl_mode} = $_ if $SDL_MODES[$_][0] * $SDL_MODES[$_][1] >= 800 * 600; 2210 $CFG->{sdl_mode} = $_ if $SDL_MODES[$_][0] * $SDL_MODES[$_][1] >= 800 * 600;
2200 } 2211 }
2201 } 2212 }
2394 2405
2395 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]); 2406 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]);
2396 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode}); 2407 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode});
2397 2408
2398 $CAVEAT_LABEL->set_text ("None :)"); 2409 $CAVEAT_LABEL->set_text ("None :)");
2399 $CAVEAT_LABEL->set_text ("Sofwtare Rendering (very slow)") 2410 $CAVEAT_LABEL->set_text ("Software Rendering (very slow)")
2400 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL; 2411 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL;
2401 2412
2402 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]); 2413 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]);
2403} 2414}
2404 2415
2534 sdl_mode => 0, 2545 sdl_mode => 0,
2535 fullscreen => 1, 2546 fullscreen => 1,
2536 fast => 0, 2547 fast => 0,
2537 force_opengl11 => undef, 2548 force_opengl11 => undef,
2538 disable_alpha => 0, 2549 disable_alpha => 0,
2550 smooth_movement => 1,
2539 texture_compression => 1, 2551 texture_compression => 1,
2540 map_scale => 1, 2552 map_scale => 1,
2541 fow_enable => 1, 2553 fow_enable => 1,
2542 fow_intensity => 0, 2554 fow_intensity => 0,
2543 map_smoothing => 1, 2555 map_smoothing => 1,
2664 4 show fps 2676 4 show fps
2665 8 suppress tooltips 2677 8 suppress tooltips
2666 2678
2667=head1 AUTHOR 2679=head1 AUTHOR
2668 2680
2669Marc Lehmann <crossfire@schmorp.de>, Robin Redeker <elmex@ta-sa.org> 2681Marc Lehmann <deliantra@schmorp.de>, Robin Redeker <elmex@ta-sa.org>
2670 2682
2671 2683
2672 2684

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines