First attempt to position NES graphics correctly on screen. Still verbs
are at wrong places. svn-id: r17217
This commit is contained in:
parent
50759016b0
commit
166e009061
3 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue