diff options
author | Strangerke | 2013-02-07 21:56:10 +0100 |
---|---|---|
committer | Strangerke | 2013-02-07 21:56:10 +0100 |
commit | d12cd961610e3c2c8d060e2a300a5690dfb3daef (patch) | |
tree | 6c77d03e169cf27dadd0bfa0472f8c90f92991dc /engines/hopkins/computer.cpp | |
parent | a542e38059dc3ba1a346131cddf210d64a88866e (diff) | |
download | scummvm-rg350-d12cd961610e3c2c8d060e2a300a5690dfb3daef.tar.gz scummvm-rg350-d12cd961610e3c2c8d060e2a300a5690dfb3daef.tar.bz2 scummvm-rg350-d12cd961610e3c2c8d060e2a300a5690dfb3daef.zip |
HOPKINS: Improve private/public scope in Globals. Remove some useless variables, move some variables to FontManager
Diffstat (limited to 'engines/hopkins/computer.cpp')
-rw-r--r-- | engines/hopkins/computer.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 04c81fe2b5..12ac40e6d8 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -77,15 +77,15 @@ void ComputerManager::setTextMode() { _vm->_graphicsManager.unlockScreen(); _vm->_graphicsManager._lineNbr = SCREEN_WIDTH; - _vm->_globals._font = _vm->_globals.freeMemory(_vm->_globals._font); + _vm->_fontManager._font = _vm->_globals.freeMemory(_vm->_fontManager._font); Common::String filename = "STFONT.SPR"; Common::File f; if (!f.exists(filename)) filename = "FONTE.SPR"; // Used by the BeOS and OS/2 versions as an alternative - _vm->_globals._font = _vm->_fileManager.loadFile(filename); - _vm->_globals._fontFixedWidth = 8; - _vm->_globals._fontFixedHeight = 8; + _vm->_fontManager._font = _vm->_fileManager.loadFile(filename); + _vm->_fontManager._fontFixedWidth = 8; + _vm->_fontManager._fontFixedHeight = 8; _vm->_graphicsManager.loadImage("WINTEXT"); _vm->_graphicsManager.fadeInLong(); @@ -421,28 +421,28 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) { // BackSpace if (curChar == 8 && textIndex > 0) { _inputBuf[textIndex--] = 0; - x1 -= _vm->_globals._fontFixedWidth; - x2 = x1 + 2 * _vm->_globals._fontFixedWidth; - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, 3 * _vm->_globals._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); + x1 -= _vm->_fontManager._fontFixedWidth; + x2 = x1 + 2 * _vm->_fontManager._fontFixedWidth; + _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, 3 * _vm->_fontManager._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); _vm->_graphicsManager.addVesaSegment(x1, yp, x2, yp + 12); _vm->_fontManager.displayTextVesa(x1, yp, "_", 252); } if (mappedChar != '*') { char newChar = mappedChar; - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_globals._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); - _vm->_graphicsManager.addVesaSegment(x1, yp, _vm->_globals._fontFixedWidth + x1, yp + 12); + _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_fontManager._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); + _vm->_graphicsManager.addVesaSegment(x1, yp, _vm->_fontManager._fontFixedWidth + x1, yp + 12); _inputBuf[textIndex] = newChar; Common::String charString = Common::String::format("%c_", newChar); _vm->_fontManager.displayTextVesa(x1, yp, charString, 252); ++textIndex; - x1 += _vm->_globals._fontFixedWidth; + x1 += _vm->_fontManager._fontFixedWidth; } _vm->_eventsManager.VBL(); } while (textIndex != textIdx && curChar != 13); - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_globals._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); - _vm->_graphicsManager.addVesaSegment(x1, yp, _vm->_globals._fontFixedWidth + x1, yp + 12); + _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_fontManager._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); + _vm->_graphicsManager.addVesaSegment(x1, yp, _vm->_fontManager._fontFixedWidth + x1, yp + 12); _vm->_eventsManager.VBL(); _inputBuf[textIndex] = 0; @@ -467,11 +467,11 @@ void ComputerManager::outText2(const Common::String &msg) { * Restores the scene for the FBI headquarters room */ void ComputerManager::restoreFBIRoom() { - _vm->_globals.freeMemory(_vm->_globals._font); - _vm->_globals._font = _vm->_fileManager.loadFile("FONTE3.SPR"); + _vm->_globals.freeMemory(_vm->_fontManager._font); + _vm->_fontManager._font = _vm->_fileManager.loadFile("FONTE3.SPR"); + _vm->_fontManager._fontFixedWidth = 12; + _vm->_fontManager._fontFixedHeight = 21; - _vm->_globals._fontFixedWidth = 12; - _vm->_globals._fontFixedHeight = 21; _vm->_eventsManager._mouseFl = true; } |