GLK: COMPREHEND: Extra blank lines in full-screen text mode

This commit is contained in:
Paul Gilbert
2020-06-12 19:00:16 -07:00
parent 4b5c81095b
commit fa5ebf2fee
3 changed files with 11 additions and 6 deletions
+3 -3
View File
@@ -49,13 +49,13 @@ struct GameStrings {
class Comprehend : public GlkAPI {
private:
int _saveSlot; ///< Save slot when loading savegame from launcher
bool _graphicsEnabled;
public:
GraphicsWindow *_topWindow;
TextBufferWindow *_bottomWindow;
DrawSurface *_drawSurface;
ComprehendGame *_game;
Pics *_pics;
bool _graphicsEnabled;
uint _drawFlags;
private:
@@ -156,9 +156,9 @@ public:
void togglePictureVisibility();
/**
* Returns true if the picture area is visible
* Returns true if the graphics area is visible
*/
bool isPictureVisible() const {
bool isGraphicsEnabled() const {
return _graphicsEnabled;
}
};
+7 -2
View File
@@ -330,7 +330,7 @@ void ComprehendGame::update_graphics() {
int type;
uint i;
if (!g_comprehend->_graphicsEnabled)
if (!g_comprehend->isGraphicsEnabled())
return;
type = roomIsSpecial(_currentRoom, NULL);
@@ -1176,7 +1176,6 @@ void ComprehendGame::doBeforeTurn() {
}
void ComprehendGame::doAfterTurn() {
// Do post turn game specific bits
afterTurn();
}
@@ -1185,9 +1184,15 @@ void ComprehendGame::read_input() {
char *line = NULL, buffer[1024];
bool handled;
beforePrompt();
doBeforeTurn();
// If we're in full screen text, we can afford a blank row between
// any game response and the next line of text
if (!g_comprehend->isGraphicsEnabled())
g_comprehend->print("\n");
for (;;) {
g_comprehend->print("> ");
g_comprehend->readLine(buffer, sizeof(buffer));
+1 -1
View File
@@ -960,7 +960,7 @@ void GameData::loadGame() {
/* Load the main game data file */
loadGameData();
if (g_comprehend->_graphicsEnabled) {
if (g_comprehend->isGraphicsEnabled()) {
// Set up the picture archive
g_comprehend->_pics->load(_locationGraphicFiles,
_itemGraphicFiles, _titleGraphicFile);