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/keyboard.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/keyboard.cpp')
-rw-r--r-- | engines/agi/keyboard.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index ba1b2f5729..3bc45af5d4 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -313,7 +313,8 @@ bool AgiEngine::handleMouseClicks(uint16 &key) { if (!cycleInnerLoopIsActive()) { // Only do this, when no inner loop is currently active - Common::Rect displayLineRect(DISPLAY_WIDTH, FONT_DISPLAY_HEIGHT); + Common::Rect displayLineRect = _gfx->getFontRectForDisplayScreen(0, 0, FONT_COLUMN_CHARACTERS, 1); +// Common::Rect displayLineRect(_gfx->getDisplayScreenWidth(), _gfx->getDisplayFontHeight()); if (displayLineRect.contains(_mouse.pos)) { // Mouse is inside first line of the screen @@ -328,7 +329,7 @@ bool AgiEngine::handleMouseClicks(uint16 &key) { // Prompt is currently enabled int16 promptRow = _text->promptRow_Get(); - displayLineRect.moveTo(0, promptRow * FONT_DISPLAY_HEIGHT); + displayLineRect.moveTo(0, promptRow * _gfx->getDisplayFontHeight()); if (displayLineRect.contains(_mouse.pos)) { // and user clicked within the line of the prompt @@ -351,9 +352,7 @@ bool AgiEngine::handleMouseClicks(uint16 &key) { _text->stringPos_Get(stringRow, stringColumn); stringMaxLen = _text->stringGetMaxLen(); - Common::Rect displayRect(stringMaxLen * FONT_DISPLAY_WIDTH, FONT_DISPLAY_HEIGHT); - displayRect.moveTo(stringColumn * FONT_DISPLAY_WIDTH, stringRow * FONT_DISPLAY_HEIGHT); - + Common::Rect displayRect = _gfx->getFontRectForDisplayScreen(stringColumn, stringRow, stringMaxLen, 1); if (displayRect.contains(_mouse.pos)) { // user clicked inside the input space showPredictiveDialog(); @@ -493,7 +492,7 @@ bool AgiEngine::handleController(uint16 key) { // in case you walked to the log by using the mouse, so don't!!! int16 egoDestinationX = _mouse.pos.x; int16 egoDestinationY = _mouse.pos.y; - adjustPosToGameScreen(egoDestinationX, egoDestinationY); + _gfx->translateDisplayPosToGameScreen(egoDestinationX, egoDestinationY); screenObjEgo->motionType = kMotionEgo; if (egoDestinationX < (screenObjEgo->xSize / 2)) { |