diff options
author | Martin Kiewitz | 2016-02-27 21:44:21 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-02-27 21:44:21 +0100 |
commit | e1c36a52b561463217e22687605d2f4f1dc33be6 (patch) | |
tree | 467a36e258d105164bc4e1883f15af66bcc4693f /engines/agi/agi.cpp | |
parent | 9059189e35b37f7c4bec2714cf866e67d80c140d (diff) | |
download | scummvm-rg350-e1c36a52b561463217e22687605d2f4f1dc33be6.tar.gz scummvm-rg350-e1c36a52b561463217e22687605d2f4f1dc33be6.tar.bz2 scummvm-rg350-e1c36a52b561463217e22687605d2f4f1dc33be6.zip |
AGI: Add support for upscaling and Hercules hires font
- User option to force Hercules hires font for any rendering mode
- Also change mouse cursor hotspots from 1,1 to 0,0
- Fix inaccuracy in mouse controlled game menu
- Change render_Block(), drawBox(), drawDisplayRect() to use
upper Y instead of lower Y. Original AGI uses lower Y, but
upper Y makes upscaling way easier.
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; |