diff options
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r-- | engines/agi/agi.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index ec10344cfb..6773398271 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -466,7 +466,7 @@ void AgiEngine::initialize() { _console = new Console(this); _words = new Words(this); _font = new GfxFont(this); - _gfx = new GfxMgr(this); + _gfx = new GfxMgr(this, _font); _sound = new SoundMgr(this, _mixer); _picture = new PictureMgr(this, _gfx); _sprites = new SpritesMgr(this, _gfx); @@ -474,9 +474,9 @@ void AgiEngine::initialize() { _systemUI = new SystemUI(this, _gfx, _text); _inventory = new InventoryMgr(this, _gfx, _text, _systemUI); + _font->init(); _gfx->initVideo(); - _font->init(); _text->init(_systemUI); _game.gameFlags = 0; @@ -512,19 +512,6 @@ void AgiEngine::redrawScreen() { _text->promptRedraw(); } -// Adjust a given coordinate to the local game screen -// Used on mouse cursor coordinates before passing them to scripts -void AgiEngine::adjustPosToGameScreen(int16 &x, int16 &y) { - x = x / 2; // 320 -> 160 - y = y - _gfx->getRenderStartOffsetY(); // remove status bar line - if (y < 0) { - y = 0; - } - if (y >= SCRIPT_HEIGHT) { - y = SCRIPT_HEIGHT + 1; // 1 beyond - } -} - AgiEngine::~AgiEngine() { agiDeinit(); delete _loader; |