diff options
-rw-r--r-- | scumm/gfx.cpp | 4 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 25 | ||||
-rw-r--r-- | scumm/verbs.cpp | 28 |
3 files changed, 30 insertions, 27 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 1e4e648847..68cae6b929 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -552,10 +552,10 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i int x1 = x; // HACK: This is dirty hack which renders narrow NES rooms centered - // NES can address negative number sprites and that poses problem for + // NES can address negative number strips and that poses problem for // our code. So instead adding zillions of fixes and potentially break // other games we shift it right on rendering stage - if (_features & GF_NES && ((_NESStartStrip > 0) || (vs->number != kMainVirtScreen))) { + if ((_features & GF_NES) && ((_NESStartStrip > 0) && (vs->number == kMainVirtScreen)) || (vs->number == kTextVirtScreen)) { x += 16; } diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index e12c233565..d8657854a7 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -819,7 +819,7 @@ void ScummEngine_v2::o2_verbOps() { int prep = fetchScriptByte(); // Only used in V1? // V1 Maniac verbs are relative to the 'verb area' - under the sentence if (_features & GF_NES) - x -= 8; + x += 8; else if ((_gameId == GID_MANIAC) && (_version == 1)) y += 8; @@ -1033,9 +1033,10 @@ void ScummEngine_v2::o2_drawSentence() { _string[2].charset = 1; _string[2].ypos = virtscr[2].topline; _string[2].xpos = 0; - if (_features & GF_NES) + if (_features & GF_NES) { + _string[2].xpos = 16; _string[2].color = 0; - else if (_version == 1) + } else if (_version == 1) _string[2].color = 16; else _string[2].color = 13; @@ -1056,8 +1057,13 @@ void ScummEngine_v2::o2_drawSentence() { sentenceline.top = virtscr[2].topline; sentenceline.bottom = virtscr[2].topline + 8; - sentenceline.left = 0; - sentenceline.right = 319; + if (_features & GF_NES) { + sentenceline.left = 16; + sentenceline.right = 255; + } else { + sentenceline.left = 0; + sentenceline.right = 319; + } restoreBG(sentenceline); drawString(2, (byte*)sentence); @@ -1525,8 +1531,13 @@ void ScummEngine_v2::setUserState(byte state) { Common::Rect rect; rect.top = virtscr[2].topline; rect.bottom = virtscr[2].topline + 8 * 88; - rect.left = 0; - rect.right = 319; + if (_features & GF_NES) { + rect.left = 16; + rect.right = 255; + } else { + rect.left = 0; + rect.right = 319; + } restoreBG(rect); // Draw all verbs and inventory diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index d9c1c4af22..e22bdb9de9 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -118,16 +118,16 @@ void ScummEngine_v2::initNESMouseOver() { // Inventory items for (i = 0; i < 2; i++) { - v2_mouseover_boxes[2 * i].rect.left = 0; - v2_mouseover_boxes[2 * i].rect.right = 104; + v2_mouseover_boxes[2 * i].rect.left = 16; + v2_mouseover_boxes[2 * i].rect.right = 120; v2_mouseover_boxes[2 * i].rect.top = 48 + 8 * i; v2_mouseover_boxes[2 * i].rect.bottom = v2_mouseover_boxes[2 * i].rect.top + 8; v2_mouseover_boxes[2 * i].color = color; v2_mouseover_boxes[2 * i].hicolor = hi_color; - v2_mouseover_boxes[2 * i + 1].rect.left = 120; - v2_mouseover_boxes[2 * i + 1].rect.right = 224; + v2_mouseover_boxes[2 * i + 1].rect.left = 152; + v2_mouseover_boxes[2 * i + 1].rect.right = 256; v2_mouseover_boxes[2 * i + 1].rect.top = v2_mouseover_boxes[2 * i].rect.top; v2_mouseover_boxes[2 * i + 1].rect.bottom = v2_mouseover_boxes[2 * i].rect.bottom; @@ -137,16 +137,16 @@ void ScummEngine_v2::initNESMouseOver() { // Inventory arrows - v2_mouseover_boxes[kInventoryUpArrow].rect.left = 104; - v2_mouseover_boxes[kInventoryUpArrow].rect.right = 112; + v2_mouseover_boxes[kInventoryUpArrow].rect.left = 128; + v2_mouseover_boxes[kInventoryUpArrow].rect.right = 136; v2_mouseover_boxes[kInventoryUpArrow].rect.top = 48; v2_mouseover_boxes[kInventoryUpArrow].rect.bottom = 56; v2_mouseover_boxes[kInventoryUpArrow].color = arrow_color; v2_mouseover_boxes[kInventoryUpArrow].hicolor = hi_color; - v2_mouseover_boxes[kInventoryDownArrow].rect.left = 112; - v2_mouseover_boxes[kInventoryDownArrow].rect.right = 120; + v2_mouseover_boxes[kInventoryDownArrow].rect.left = 136; + v2_mouseover_boxes[kInventoryDownArrow].rect.right = 144; v2_mouseover_boxes[kInventoryDownArrow].rect.top = 48; v2_mouseover_boxes[kInventoryDownArrow].rect.bottom = 56; @@ -155,8 +155,8 @@ void ScummEngine_v2::initNESMouseOver() { // Sentence line - v2_mouseover_boxes[kSentenceLine].rect.left = 0; - v2_mouseover_boxes[kSentenceLine].rect.right = 224; + v2_mouseover_boxes[kSentenceLine].rect.left = 16; + v2_mouseover_boxes[kSentenceLine].rect.right = 256; v2_mouseover_boxes[kSentenceLine].rect.top = 0; v2_mouseover_boxes[kSentenceLine].rect.bottom = 8; @@ -233,10 +233,6 @@ void ScummEngine::checkV2Inventory(int x, int y) { if ((y < inventoryArea) || !(_mouseButStat & MBS_LEFT_CLICK)) return; - // Inventory is shifted right - if (_features & GF_NES) - x -= 16; - if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) { if (_inventoryOffset >= 2) { _inventoryOffset -= 2; @@ -441,10 +437,6 @@ int ScummEngine::findVerbAtPos(int x, int y) const { VerbSlot *vs; int i = _numVerbs - 1; - // Verbs are shifted right - if (_features & GF_NES) - x -= 16; - vs = &_verbs[i]; do { if (vs->curmode != 1 || !vs->verbid || vs->saveid || y < vs->curRect.top || y >= vs->curRect.bottom) |