char cbuf[BUFSZ];
const char *tile_file = NULL, *tile_list[2];
+ this->no_tiles = false;
tiles_per_row = TILES_PER_ROW;
if (user_tiles) {
}
if (!tilesok) {
+ this->no_tiles = true;
+ /* tiles wouldn't load so force ascii map */
::iflags.wc_ascii_map = 1;
::iflags.wc_tiled_map = 0;
- tiles_per_row = 40; // arbitrary
+ /* tiles wouldn't load so don't allow toggling to tiled map */
+ ::set_wc_option_mod_status(WC_ASCII_MAP | WC_TILED_MAP,
+ ::set_in_config);
+ tiles_per_row = 40; // arbitrary to avoid potential divide-by-0
}
if (iflags.wc_tile_width)
// Actually indexed by grid[column][row].
#ifdef ENHANCED_PAPERDOLL
- if (iflags.wc_ascii_map)
+ if (qt_settings->doll_is_shown && ::iflags.wc_ascii_map
+ && qt_settings->glyphs().no_tiles)
qt_settings->doll_is_shown = false;
if (!qt_settings->doll_is_shown)
return;
qt_settings->dollHeight);
/* for drawWorn()'s use of obj->invlet */
- if (!flags.invlet_constant)
+ if (!::flags.invlet_constant)
reassign();
#endif
}
theglyphs=new NetHackQtGlyphs();
- resizeTiles();
+ if (!theglyphs->no_tiles) {
+ resizeTiles();
- connect(&whichsize, SIGNAL(toggled(bool)), this, SLOT(setGlyphSize(bool)));
- connect(&tilewidth, SIGNAL(valueChanged(int)), this, SLOT(resizeTiles()));
- connect(&tileheight, SIGNAL(valueChanged(int)), this, SLOT(resizeTiles()));
+ connect(&whichsize, SIGNAL(toggled(bool)), this,
+ SLOT(setGlyphSize(bool)));
+ connect(&tilewidth, SIGNAL(valueChanged(int)), this,
+ SLOT(resizeTiles()));
+ connect(&tileheight, SIGNAL(valueChanged(int)), this,
+ SLOT(resizeTiles()));
#ifdef ENHANCED_PAPERDOLL
- connect(&dollshown, SIGNAL(toggled(bool)), this, SLOT(setDollShown(bool)));
- connect(&dollwidth, SIGNAL(valueChanged(int)), this, SLOT(resizeDoll()));
- connect(&dollheight, SIGNAL(valueChanged(int)), this, SLOT(resizeDoll()));
+ connect(&dollshown, SIGNAL(toggled(bool)), this,
+ SLOT(setDollShown(bool)));
+ connect(&dollwidth, SIGNAL(valueChanged(int)), this,
+ SLOT(resizeDoll()));
+ connect(&dollheight, SIGNAL(valueChanged(int)), this,
+ SLOT(resizeDoll()));
#endif
+ } else {
+ // paper doll requires map tiles and those just failed to load
+ doll_is_shown = false;
+ }
fontsize.setMinimumContentsLength((int) strlen("Medium"));
fontsize.addItem("Huge");