summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilesdl.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 01:41:54 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 01:41:54 +0000
commit4bc8fa481841a89bd2b6880f7570824478048ca1 (patch)
treed939a75f96f3ae730f7f79ff226d6028d3045007 /crawl-ref/source/tilesdl.cc
parent04fbe88386b9ebe9d655b0270c9453a885b05d1c (diff)
downloadcrawl-ref-4bc8fa481841a89bd2b6880f7570824478048ca1.tar.gz
crawl-ref-4bc8fa481841a89bd2b6880f7570824478048ca1.zip
Moving more settings to the Tiles options file. Fixing a mouse-related crash that Johanna mentioned.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6657 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilesdl.cc')
-rw-r--r--crawl-ref/source/tilesdl.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index df3f7b7d34..a78f6bbf60 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -148,10 +148,12 @@ bool TilesFramework::initialise()
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
unsigned int flags = SDL_OPENGL;
- if (m_fullscreen)
+ if (Options.tile_full_screen)
flags |= SDL_FULLSCREEN;
- // TODO enne - add options for screen size and fullscreen
+ m_windowsz.x = Options.tile_window_width;
+ m_windowsz.y = Options.tile_window_height;
+
m_context = SDL_SetVideoMode(m_windowsz.x, m_windowsz.y, 0, flags);
if (!m_context)
{
@@ -162,9 +164,6 @@ bool TilesFramework::initialise()
if (!m_image.load_textures())
return false;
- // TODO enne - grab these from options
- unsigned int map_pixsz = 4;
-
int crt_font = load_font(Options.tile_font_crt_file.c_str(),
Options.tile_font_crt_size);
int msg_font = load_font(Options.tile_font_msg_file.c_str(),
@@ -184,7 +183,7 @@ bool TilesFramework::initialise()
m_region_tile = new DungeonRegion(&m_image, m_fonts[lbl_font].font,
TILE_X, TILE_Y);
- m_region_map = new MapRegion(map_pixsz);
+ m_region_map = new MapRegion(Options.tile_map_pixels);
m_region_self_inv = new InventoryRegion(&m_image, TILE_X, TILE_Y);
m_region_msg = new MessageRegion(m_fonts[msg_font].font);
@@ -581,10 +580,9 @@ int TilesFramework::getch_ck()
}
}
- // TODO enne - outsource this value
- unsigned int tooltip_ticks = 1000;
- bool show_tooltip = ((ticks - m_last_tick_moved > tooltip_ticks)
- && ticks > m_last_tick_moved);
+ bool show_tooltip =
+ ((ticks - m_last_tick_moved > Options.tile_tooltip_ms)
+ && ticks > m_last_tick_moved);
if (show_tooltip)
{