aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/script_v2.cpp8
-rw-r--r--scumm/scumm.cpp6
-rw-r--r--scumm/verbs.cpp9
4 files changed, 17 insertions, 10 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 1bb9eba7b9..b9927a7e14 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -555,8 +555,8 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int width, int top, int botto
// NES can address negative number sprites 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 (_vm->_features & GF_NES && _vm->_NESStartStrip > 0) {
- x += _vm->_NESStartStrip * 8;
+ if (_vm->_features & GF_NES && ((_vm->_NESStartStrip > 0) || (vs->number != kMainVirtScreen))) {
+ x += 16;
}
_vm->_system->copyRectToScreen(_compositeBuf + x1 + y * _vm->_screenWidth, _vm->_screenWidth, x, y, width, height);
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index d2c85ecc29..c53cf03c78 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -818,10 +818,8 @@ void ScummEngine_v2::o2_verbOps() {
slot = getVarOrDirectByte(PARAM_1) + 1;
int prep = fetchScriptByte(); // Only used in V1?
// V1 Maniac verbs are relative to the 'verb area' - under the sentence
- if (_features & GF_NES) {
- y -= 16;
- x += 8;
- }
+ if (_features & GF_NES)
+ x -= 8;
else if ((_gameId == GID_MANIAC) && (_version == 1))
y += 8;
@@ -976,7 +974,7 @@ void ScummEngine_v2::o2_drawSentence() {
const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0);
- if (!(_userState & 32))
+ if (!((_userState & 32) || (_features & GF_NES && _userState & 0xe0)))
return;
if (getResourceAddress(rtVerb, slot))
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index ae0fbd1643..9261c3fca0 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1112,7 +1112,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_screenWidth = 640;
_screenHeight = 480;
} else if (_features & GF_NES) {
- _screenWidth = 256; // 224
+ _screenWidth = 256;
_screenHeight = 240;
} else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
_features |= GF_DEFAULT_TO_1X_SCALER;
@@ -1790,8 +1790,8 @@ int ScummEngine::scummLoop(int delta) {
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
// Adjust mouse coordinates as narrow rooms in NES are centered
- if (_features & GF_NES && _virtualMouse.y >= 16 && _virtualMouse.y < 144) {
- VAR(VAR_VIRT_MOUSE_X) -= _NESStartStrip;
+ if (_features & GF_NES && _NESStartStrip > 0) {
+ VAR(VAR_VIRT_MOUSE_X) -= 2;
if (VAR(VAR_VIRT_MOUSE_X) < 0)
VAR(VAR_VIRT_MOUSE_X) = 0;
}
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 3fb0f2532a..6956ba6837 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -233,6 +233,10 @@ 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;
@@ -255,6 +259,7 @@ void ScummEngine::checkV2Inventory(int x, int y) {
return;
object = findInventory(_scummVars[VAR_EGO], object + 1 + _inventoryOffset);
+
if (object > 0) {
runInputScript(3, object, 0);
}
@@ -436,6 +441,10 @@ 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)