Qt without tiles
Qt is capable of using an ascii map, and does so on the rogue level. So failing to load tiles doesn't need to quit; it can continue in text mode. Not extensively tested. This disables the paper doll when the ascii map is forced (either via options settings or due to tiles loading failure, but not when simply on the rogue level) rather than trying to display it with object class characters.
This commit is contained in:
@@ -196,6 +196,9 @@ NetHackQtSettings::NetHackQtSettings() :
|
||||
|
||||
NetHackQtGlyphs& NetHackQtSettings::glyphs()
|
||||
{
|
||||
// Caveat:
|
||||
// 'theglyphs' will be Null if the tiles file couldn't be loaded;
|
||||
// the game can still procede with an ascii map in that situation.
|
||||
return *theglyphs;
|
||||
}
|
||||
|
||||
@@ -213,8 +216,10 @@ void NetHackQtSettings::resizeTiles()
|
||||
settings.setValue("tilewidth", tileWidth);
|
||||
settings.setValue("tileheight", tileHeight);
|
||||
|
||||
theglyphs->setSize(tileWidth, tileHeight);
|
||||
emit tilesChanged();
|
||||
if (theglyphs) {
|
||||
theglyphs->setSize(tileWidth, tileHeight);
|
||||
emit tilesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void NetHackQtSettings::toggleGlyphSize()
|
||||
|
||||
Reference in New Issue
Block a user