… | |
… | |
769 | on_changed => sub { my ($self, $value) = @_; $CFG->{fullscreen} = $value; 0 } |
769 | on_changed => sub { my ($self, $value) = @_; $CFG->{fullscreen} = $value; 0 } |
770 | ); |
770 | ); |
771 | |
771 | |
772 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Force OpenGL 1.1"); |
772 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Force OpenGL 1.1"); |
773 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
773 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
774 | state => $CFG->{opengl11}, |
774 | state => $CFG->{force_opengl11}, |
775 | tooltip => "Limit CFPlus to use OpenGL 1.1 features only. This will normally result in " |
775 | tooltip => "Limit CFPlus to use OpenGL 1.1 features only. This will normally result in " |
776 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
776 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
777 | . "cards that claim to support a feature but fall back to software rendering. " |
777 | . "cards that claim to support a feature but fall back to software rendering. " |
778 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
778 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
779 | . "but cards and drivers from other vendors (ATI) are often just as bad. <b>If you " |
779 | . "but cards and drivers from other vendors (ATI) are often just as bad. <b>If you " |
780 | . "experience extremely low framerates and your card should do better, try this option.</b>", |
780 | . "experience extremely low framerates and your card should do better, try this option.</b>", |
781 | on_changed => sub { my ($self, $value) = @_; $CFG->{opengl11} = $value; 0 } |
781 | on_changed => sub { my ($self, $value) = @_; $CFG->{force_opengl11} = $value; 0 } |
|
|
782 | ); |
|
|
783 | |
|
|
784 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Compress Textures"); |
|
|
785 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
|
|
786 | state => $CFG->{texture_compression}, |
|
|
787 | tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " |
|
|
788 | . "will save a lot of memory and increase performance. The compression algorithm " |
|
|
789 | . "can differ form card to card, so your mileage may vary.", |
|
|
790 | on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } |
782 | ); |
791 | ); |
783 | |
792 | |
784 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fast & Ugly"); |
793 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fast & Ugly"); |
785 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
794 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
786 | state => $CFG->{fast}, |
795 | state => $CFG->{fast}, |
… | |
… | |
2189 | CFPlus::DB::Server::run; |
2198 | CFPlus::DB::Server::run; |
2190 | |
2199 | |
2191 | CFPlus::UI::set_layout ($::CFG->{layout}); |
2200 | CFPlus::UI::set_layout ($::CFG->{layout}); |
2192 | |
2201 | |
2193 | my %DEF_CFG = ( |
2202 | my %DEF_CFG = ( |
2194 | sdl_mode => 0, |
2203 | sdl_mode => 0, |
2195 | fullscreen => 0, |
2204 | fullscreen => 0, |
2196 | fast => 0, |
2205 | fast => 0, |
2197 | opengl11 => 0, |
2206 | force_opengl11 => 0, |
|
|
2207 | texture_compression => 1, |
2198 | map_scale => 1, |
2208 | map_scale => 1, |
2199 | fow_enable => 1, |
2209 | fow_enable => 1, |
2200 | fow_intensity => 0, |
2210 | fow_intensity => 0, |
2201 | map_smoothing => 1, |
2211 | map_smoothing => 1, |
2202 | gui_fontsize => 1, |
2212 | gui_fontsize => 1, |
2203 | log_fontsize => 0.7, |
2213 | log_fontsize => 0.7, |
2204 | gauge_fontsize => 1, |
2214 | gauge_fontsize => 1, |
2205 | gauge_size => 0.35, |
2215 | gauge_size => 0.35, |
2206 | stat_fontsize => 0.7, |
2216 | stat_fontsize => 0.7, |
2207 | mapsize => 100, |
2217 | mapsize => 100, |
2208 | audio_enable => 1, |
2218 | audio_enable => 1, |
2209 | effects_enable => 1, |
2219 | effects_enable => 1, |
2210 | effects_volume => 1, |
2220 | effects_volume => 1, |
2211 | bgm_enable => 1, |
2221 | bgm_enable => 1, |
2212 | bgm_volume => 0.5, |
2222 | bgm_volume => 0.5, |
2213 | output_sync => 1, |
2223 | output_sync => 1, |
2214 | output_count => 1, |
2224 | output_count => 1, |
2215 | output_rate => "", |
2225 | output_rate => "", |
2216 | pickup => 0, |
2226 | pickup => 0, |
2217 | inv_sort => "mtime", |
2227 | inv_sort => "mtime", |
2218 | default => "profile", # default profile |
2228 | default => "profile", # default profile |
2219 | show_tips => 1, |
2229 | show_tips => 1, |
2220 | logview_max_par => 1000, |
2230 | logview_max_par => 1000, |
2221 | ); |
2231 | ); |
2222 | |
2232 | |
2223 | while (my ($k, $v) = each %DEF_CFG) { |
2233 | while (my ($k, $v) = each %DEF_CFG) { |
2224 | $CFG->{$k} = $v unless exists $CFG->{$k}; |
2234 | $CFG->{$k} = $v unless exists $CFG->{$k}; |
2225 | } |
2235 | } |