Skip to content

Commit

Permalink
3D FOV range is a game constant, not an option
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Jan 26, 2025
1 parent 56f157a commit a96f09f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/cached_options.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "cached_options.h"

int fov_3d_z_range;
bool keycode_mode;
bool log_from_top;
int message_ttl;
Expand Down
1 change: 0 additions & 1 deletion src/cached_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// They should be updated when the corresponding option is changed (in
// options.cpp).

extern int fov_3d_z_range;
extern bool keycode_mode;
extern bool log_from_top;
extern int message_ttl;
Expand Down
2 changes: 2 additions & 0 deletions src/game_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ constexpr int STATUS_WIDTH = 55;

constexpr int EXPLOSION_MULTIPLIER = 7;

constexpr int fov_3d_z_range = 4;

// Really just a sanity check for functions not tested beyond this. in theory 4096 works (`InvletInvlet).
constexpr int MAX_ITEM_IN_SQUARE = 4096;
// no reason to differ.
Expand Down
12 changes: 0 additions & 12 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2912,17 +2912,6 @@ void options_manager::add_options_debug()

add_empty_line();

add( "FOV_3D_Z_RANGE", "debug", to_translation( "Vertical range of 3D field of vision" ),
to_translation(
"How many levels up and down the 3D field of vision reaches. (This many levels up, this many levels down.) "
"3D vision of the full height of the world can slow the game down a lot. Seeing fewer Z-levels is faster. "
"Setting this to 0 disables vertical vision. In tiles mode this also affects how many levels up and down are "
"drawn on screen, and setting this to 0 displays only one level below with colored blocks instead." ),
0, OVERMAP_LAYERS, 4
);

add_empty_line();

add_option_group( "debug", Group( "occlusion_opts", to_translation( "Occlusion options" ),
to_translation( "Options regarding occlusion." ) ),
[&]( const std::string & page_id ) {
Expand Down Expand Up @@ -4090,7 +4079,6 @@ void options_manager::update_options_cache()
log_from_top = ::get_option<std::string>( "LOG_FLOW" ) == "new_top";
message_ttl = ::get_option<int>( "MESSAGE_TTL" );
message_cooldown = ::get_option<int>( "MESSAGE_COOLDOWN" );
fov_3d_z_range = ::get_option<int>( "FOV_3D_Z_RANGE" );
keycode_mode = ::get_option<std::string>( "SDL_KEYBOARD_MODE" ) == "keycode";
use_pinyin_search = ::get_option<bool>( "USE_PINYIN_SEARCH" );

Expand Down

0 comments on commit a96f09f

Please sign in to comment.