diff options
author | Eugene Sandulenko | 2005-03-24 04:53:28 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-03-24 04:53:28 +0000 |
commit | 166e009061981c161a9abfdec548e0283caf289f (patch) | |
tree | 9d3054b378d07cbe336217f1178036011447212f | |
parent | 50759016b0f7cdd48238f6ecf71445351fa674ae (diff) | |
download | scummvm-rg350-166e009061981c161a9abfdec548e0283caf289f.tar.gz scummvm-rg350-166e009061981c161a9abfdec548e0283caf289f.tar.bz2 scummvm-rg350-166e009061981c161a9abfdec548e0283caf289f.zip |
First attempt to position NES graphics correctly on screen. Still verbs
are at wrong places.
svn-id: r17217
-rw-r--r-- | scumm/charset.cpp | 5 | ||||
-rw-r--r-- | scumm/gfx.cpp | 13 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 9ba5619c43..c62140630e 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1752,6 +1752,10 @@ void CharsetRendererNES::printChar(int chr) { VirtScreen *vs; byte *charPtr, *dst; + // HACK: how to set it properly? + if (_top == 0) + _top = 16; + if ((vs = _vm->findVirtScreen(_top)) == NULL) return; @@ -1766,7 +1770,6 @@ void CharsetRendererNES::printChar(int chr) { origHeight = height; if (_firstChar) { - _left += 16; _str.left = _left; _str.top = _top; _str.right = _left; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index abb697c7e4..1bb9eba7b9 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -210,6 +210,7 @@ Gdi::Gdi(ScummEngine *vm) { void ScummEngine::initScreens(int b, int h) { int i; + int adj = 0; for (i = 0; i < 3; i++) { nukeResource(rtBuffer, i + 1); @@ -230,10 +231,14 @@ void ScummEngine::initScreens(int b, int h) { } } - initVirtScreen(kMainVirtScreen, 0, b, _screenWidth, h - b, true, true); - initVirtScreen(kTextVirtScreen, 0, 0, _screenWidth, b, false, false); - initVirtScreen(kVerbVirtScreen, 0, h, _screenWidth, _screenHeight - h, false, false); + if (_features & GF_NES) { + adj = 16; + initVirtScreen(kUnkVirtScreen, 0, 0, _screenWidth, adj, false, false); + } + initVirtScreen(kMainVirtScreen, 0, b + adj, _screenWidth, h - b, true, true); + initVirtScreen(kTextVirtScreen, 0, adj, _screenWidth, b, false, false); + initVirtScreen(kVerbVirtScreen, 0, h + adj, _screenWidth, _screenHeight - h - adj, false, false); _screenB = b; _screenH = h; @@ -550,7 +555,7 @@ 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 && vs->number == kMainVirtScreen) { + if (_vm->_features & GF_NES && _vm->_NESStartStrip > 0) { x += _vm->_NESStartStrip * 8; } diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 2cc833265c..d2c85ecc29 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -820,7 +820,7 @@ void ScummEngine_v2::o2_verbOps() { // V1 Maniac verbs are relative to the 'verb area' - under the sentence if (_features & GF_NES) { y -= 16; - x -= 8; + x += 8; } else if ((_gameId == GID_MANIAC) && (_version == 1)) y += 8; |