diff options
-rw-r--r-- | crawl-ref/docs/crawl_manual.txt | 10 | ||||
-rw-r--r-- | crawl-ref/docs/keybind.txt | 5 | ||||
-rw-r--r-- | crawl-ref/docs/options_guide.txt | 9 | ||||
-rw-r--r-- | crawl-ref/docs/tiles_help.txt | 34 | ||||
-rw-r--r-- | crawl-ref/settings/tiles_options.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tilesdl.cc | 14 |
8 files changed, 23 insertions, 54 deletions
diff --git a/crawl-ref/docs/crawl_manual.txt b/crawl-ref/docs/crawl_manual.txt index fd6da2d111..2b09510650 100644 --- a/crawl-ref/docs/crawl_manual.txt +++ b/crawl-ref/docs/crawl_manual.txt @@ -2418,16 +2418,6 @@ Stashes: Ctrl-E Erase stash (ignores the square from stash tracking if using 'stash_tracking = explicit'). -Tiles: - - Edit player doll. This makes it possible to - change the appearance of the player and to - override the defaults, which are to mimic the - current player's equipment and any species - defaults. These options are saved into the - dolls.txt file. - Ctrl-V Modify screen size preferences. These changes - are saved into the wininit.txt file. - Level map ('X') --------------- The level map (brought up by 'X' in the main screen) uses the whole diff --git a/crawl-ref/docs/keybind.txt b/crawl-ref/docs/keybind.txt index 1f66def090..a09ea29c0c 100644 --- a/crawl-ref/docs/keybind.txt +++ b/crawl-ref/docs/keybind.txt @@ -171,8 +171,3 @@ s CMD_TARGET_WIZARD_MAKE_SHOUT w CMD_TARGET_WIZARD_PATHFIND F CMD_TARGET_WIZARD_MAKE_FRIENDLY P CMD_TARGET_WIZARD_BLESS_MONSTER - -Tile-only commands ------------------- -- CMD_EDIT_PLAYER_TILE (edit player doll) -^V CMD_EDIT_PREFS (edit screen preferences) diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt index 6c71498782..10808897e0 100644 --- a/crawl-ref/docs/options_guide.txt +++ b/crawl-ref/docs/options_guide.txt @@ -84,13 +84,15 @@ The contents of this text are: flush.failure, flush.command, flush.message, macro_meta_entry, additional_macro_file, bindkey 4-o Tiles Options. - tile_show_items, title_screen, tile_player_col, + tile_show_items, tile_title_screen, tile_player_col, tile_monster_col, tile_neutral_col, tile_friendly_col, tile_plant_col, tile_item_col, tile_unseen_col, tile_floor_col, tile_wall_col, tile_mapped_wall_col, tile_door_col, tile_downstairs_col, tile_upstairs_col, tile_feature_col, tile_trap_col, tile_water_col, - tile_lava_col, tile_excluded_col, tile_excl_centre_col + tile_lava_col, tile_excluded_col, tile_excl_centre_col, + tile_key_repeat, tile_tooltip_ms, tile_window_width, + tile_window_height, tile_map_pixels, tile_full_screen 5- Character Dump. 5-a Items and Kills. kill_map, dump_kill_places, dump_item_origins, @@ -1530,6 +1532,9 @@ the dungeon level. tile_floor_col and tile_item_col, only) tile_window_col - colour of the rectangular view window +tile_key_repeat = true + Whether or not to repeat key presses when they are held down. + By default, keys will repeat. tile_tooltip_ms = 1000 The number of milliseconds before a tooltip appears when hovering the diff --git a/crawl-ref/docs/tiles_help.txt b/crawl-ref/docs/tiles_help.txt index 642d71b8bf..a85575f0f7 100644 --- a/crawl-ref/docs/tiles_help.txt +++ b/crawl-ref/docs/tiles_help.txt @@ -110,37 +110,3 @@ right mouseclick Escape (quit menu). At inscription prompt: left mouseclick Autoinscribe artefact (where applicable). right mouseclick Escape (quit menu). - - - wininit.txt description - -After Crawl has been run in tiles mode, it will create a wininit.txt file, -which stores several configurable parameters. This is separate from the -standard init.txt file, as it can be modified at run-time via the Ctrl+V -command. - -The contents of this file look like this: - --- SNIP -- -Tile:DngnX=19 -Tile:DngnY=17 -Tile:MapPx=4 -Tile:MsgX=77 -Tile:MsgY=10 -Tile:WindowTop=145 -Tile:WindowLeft=22 -Tile:FontName=8x13 -Tile:FontSize=12 --- SNIP -- - -The above values are typical Unix settings. On Windows, the font name will be -something like "Courier". If you wish to modify this file manually, here are -what these parameters refer to: - -DngnX, DngnY Size (in tiles) of the dungeon region. -MapPx Width (in pixels) per square of the minimap. -MsgX, MsgY Size (in characters) of the message region. -WindowTop, WindowLeft Location (in pixels) of the Crawl window. -FontName Name of the font. -FontSize Size (in pixels) of the font. - diff --git a/crawl-ref/settings/tiles_options.txt b/crawl-ref/settings/tiles_options.txt index 03b7a98e5a..733927b86d 100644 --- a/crawl-ref/settings/tiles_options.txt +++ b/crawl-ref/settings/tiles_options.txt @@ -26,6 +26,8 @@ # tile_excl_centre = darkblue # tile_window_col = yellow +# tile_key_repeat = false + # tile_tooltip_ms = 1000 # tile_window_width = 1024 diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index b8194bcd07..bb1be8a97e 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1932,6 +1932,7 @@ public: int tile_font_lbl_size; std::string tile_font_tip_file; int tile_font_tip_size; + bool tile_key_repeat; bool tile_full_screen; int tile_window_width; int tile_window_height; diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 271734352c..ab9a548b7b 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -860,6 +860,7 @@ void game_options::reset_options() tile_font_lbl_size = 14; // window layout + tile_key_repeat = true; tile_full_screen = false; tile_window_width = 1024; tile_window_height = 768; @@ -2990,6 +2991,7 @@ void game_options::read_option_line(const std::string &str, bool runscript) tile_font_lbl_file = field; } else INT_OPTION(tile_font_lbl_size, 1, INT_MAX); + else BOOL_OPTION(tile_key_repeat); else BOOL_OPTION(tile_full_screen); else INT_OPTION(tile_window_width, 1, INT_MAX); else INT_OPTION(tile_window_height, 1, INT_MAX); diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc index fdb888cf17..886d59f8f1 100644 --- a/crawl-ref/source/tilesdl.cc +++ b/crawl-ref/source/tilesdl.cc @@ -126,7 +126,7 @@ bool TilesFramework::initialise() { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) { - printf ("Failed to initialise SDL: %s\n", SDL_GetError()); + printf("Failed to initialise SDL: %s\n", SDL_GetError()); return false; } @@ -136,7 +136,7 @@ bool TilesFramework::initialise() SDL_Surface *icon = IMG_Load("dat/tiles/stone_soup_icon-32x32.png"); if (!icon) { - printf ("Failed to load icon: %s\n", SDL_GetError()); + printf("Failed to load icon: %s\n", SDL_GetError()); return false; } SDL_WM_SetIcon(icon, NULL); @@ -147,6 +147,14 @@ bool TilesFramework::initialise() SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8); + + if (Options.tile_key_repeat) + { + int delay = SDL_DEFAULT_REPEAT_DELAY; + int interval = SDL_DEFAULT_REPEAT_INTERVAL; + if (SDL_EnableKeyRepeat(delay, interval) != 0) + printf("Failed to set key repeat mode: %s\n", SDL_GetError()); + } unsigned int flags = SDL_OPENGL; if (Options.tile_full_screen) @@ -158,7 +166,7 @@ bool TilesFramework::initialise() m_context = SDL_SetVideoMode(m_windowsz.x, m_windowsz.y, 0, flags); if (!m_context) { - printf ("Failed to set video mode: %s\n", SDL_GetError()); + printf("Failed to set video mode: %s\n", SDL_GetError()); return false; } |