… | |
… | |
133 | crash "CRASH/EV::DIED: $@" => 0; |
133 | crash "CRASH/EV::DIED: $@" => 0; |
134 | DC::fatal Carp::longmess $@; |
134 | DC::fatal Carp::longmess $@; |
135 | }; |
135 | }; |
136 | |
136 | |
137 | my $MAX_FPS = 60; |
137 | my $MAX_FPS = 60; |
|
|
138 | |
|
|
139 | our $DEFAULT_SERVER = "gameserver.deliantra.net"; |
138 | |
140 | |
139 | our $META_SERVER = "http://metaserver.schmorp.de/current.json"; |
141 | our $META_SERVER = "http://metaserver.schmorp.de/current.json"; |
140 | |
142 | |
141 | our $LAST_REFRESH; |
143 | our $LAST_REFRESH; |
142 | our $NOW; |
144 | our $NOW; |
… | |
… | |
830 | ; |
832 | ; |
831 | } |
833 | } |
832 | |
834 | |
833 | sub start_game { |
835 | sub start_game { |
834 | status "logging in..."; |
836 | status "logging in..."; |
|
|
837 | |
|
|
838 | my $server = $PROFILE->{host} || $DEFAULT_SERVER; |
|
|
839 | my ($host, $port) = AnyEvent::Socket::parse_hostport $server, "deliantra=13327" |
|
|
840 | or return status "$server: unable to parse server address, try an empty field."; |
835 | |
841 | |
836 | $LOGIN_BUTTON->set_text ("Logout"); |
842 | $LOGIN_BUTTON->set_text ("Logout"); |
837 | $SETUP_DIALOG->hide; |
843 | $SETUP_DIALOG->hide; |
838 | |
|
|
839 | my ($host, $port) = AnyEvent::Socket::parse_hostport $PROFILE->{host}, "deliantra=13327"; |
|
|
840 | |
844 | |
841 | $MAP = new DC::Map; |
845 | $MAP = new DC::Map; |
842 | |
846 | |
843 | # hack to make SURE we find the IP address all right |
847 | # hack to make SURE we find the IP address all right |
844 | # can be removed once AnyEvent::DNS is proven stable. |
848 | # can be removed once AnyEvent::DNS is proven stable. |
… | |
… | |
1026 | tooltip => "<b>Smooth Movement</b> tries to make movement, well, smoother, but also increases the framerate. " |
1030 | tooltip => "<b>Smooth Movement</b> tries to make movement, well, smoother, but also increases the framerate. " |
1027 | . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, " |
1031 | . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, " |
1028 | . "then disable this option. Changes take effect immdiately.", |
1032 | . "then disable this option. Changes take effect immdiately.", |
1029 | on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_movement} = $value; 0 } |
1033 | on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_movement} = $value; 0 } |
1030 | ); |
1034 | ); |
|
|
1035 | |
|
|
1036 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Smooth Transitions"); |
|
|
1037 | $table->add_at (1, $row++, new DC::UI::CheckBox |
|
|
1038 | state => $CFG->{smooth_transitions}, |
|
|
1039 | tooltip => "<b>Smooth Transitions</b> tries to blend the fog of war and lighting smoothly between updates. " |
|
|
1040 | . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, " |
|
|
1041 | . "then disable this option. Requires Smooth Movement and OpenGL 1.4 or up. Changes take effect immdiately.", |
|
|
1042 | on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_transitions} = $value; 0 } |
|
|
1043 | ); |
|
|
1044 | |
1031 | |
1045 | |
1032 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale"); |
1046 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale"); |
1033 | $table->add_at (1, $row++, new DC::UI::Slider |
1047 | $table->add_at (1, $row++, new DC::UI::Slider |
1034 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
1048 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
1035 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
1049 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
… | |
… | |
2709 | fullscreen => 1, |
2723 | fullscreen => 1, |
2710 | fast => 0, |
2724 | fast => 0, |
2711 | force_opengl11 => undef, |
2725 | force_opengl11 => undef, |
2712 | disable_alpha => 0, |
2726 | disable_alpha => 0, |
2713 | smooth_movement => 1, |
2727 | smooth_movement => 1, |
|
|
2728 | smooth_transitions => 1, |
2714 | texture_compression => 1, |
2729 | texture_compression => 1, |
2715 | map_scale => 1, |
2730 | map_scale => 1, |
2716 | fow_enable => 1, |
2731 | fow_enable => 1, |
2717 | fow_intensity => 0, |
2732 | fow_intensity => 0, |
2718 | map_smoothing => 1, |
2733 | map_smoothing => 1, |