diff options
author | Max Horn | 2003-09-11 13:02:13 +0000 |
---|---|---|
committer | Max Horn | 2003-09-11 13:02:13 +0000 |
commit | 06c93b1821c4d3a1ebd2c8281095858f0b080ed4 (patch) | |
tree | 862388b36887f09eb979af597ee5e89aec3e690e /scumm | |
parent | a323d65cc388245a2396721804684927bc08e556 (diff) | |
download | scummvm-rg350-06c93b1821c4d3a1ebd2c8281095858f0b080ed4.tar.gz scummvm-rg350-06c93b1821c4d3a1ebd2c8281095858f0b080ed4.tar.bz2 scummvm-rg350-06c93b1821c4d3a1ebd2c8281095858f0b080ed4.zip |
oops
svn-id: r10171
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/scummvm.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 8eef25aa52..8973625567 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1948,29 +1948,30 @@ void Scumm::startScene(int room, Actor *a, int objectNr) { else loadRoomObjects(); - if (!(_features & GF_NEW_CAMERA)) { - camera._mode = CM_NORMAL; - camera._cur.x = camera._dest.x = _screenWidth / 2; - camera._cur.y = camera._dest.y = _screenHeight / 2; + if (_version > 2) { + + if (VAR_V6_SCREEN_WIDTH != 0xFF && VAR_V6_SCREEN_HEIGHT != 0xFF) { + VAR(VAR_V6_SCREEN_WIDTH) = _roomWidth; + VAR(VAR_V6_SCREEN_HEIGHT) = _roomHeight; + } + + if (_features & GF_NEW_CAMERA) { + VAR(VAR_CAMERA_MIN_Y) = _screenHeight / 2; + VAR(VAR_CAMERA_MAX_Y) = _roomHeight - (_screenHeight / 2); + setCameraAt(_screenWidth / 2, _screenHeight / 2); + } else { + camera._mode = CM_NORMAL; + camera._cur.x = camera._dest.x = _screenWidth / 2; + camera._cur.y = camera._dest.y = _screenHeight / 2; + } } - if (VAR_V6_SCREEN_WIDTH != 0xFF && VAR_V6_SCREEN_HEIGHT != 0xFF) { - VAR(VAR_V6_SCREEN_WIDTH) = _roomWidth; - VAR(VAR_V6_SCREEN_HEIGHT) = _roomHeight; - } + if (_roomResource == 0) + return; VAR(VAR_CAMERA_MIN_X) = _screenWidth / 2; VAR(VAR_CAMERA_MAX_X) = _roomWidth - (_screenWidth / 2); - if (_features & GF_NEW_CAMERA) { - VAR(VAR_CAMERA_MIN_Y) = _screenHeight / 2; - VAR(VAR_CAMERA_MAX_Y) = _roomHeight - (_screenHeight / 2); - setCameraAt(_screenWidth / 2, _screenHeight / 2); - } - - if (_roomResource == 0) - return; - memset(gfxUsageBits, 0, sizeof(gfxUsageBits)); if (a) { @@ -1991,8 +1992,9 @@ void Scumm::startScene(int room, Actor *a, int objectNr) { runEntryScript(); if (_version <= 2) runScript(5, 0, 0, 0); - - if (_version < 7) { + else if (_version <= 4 && _version <= 6) { + // FIXME: The check above maybe should only trigger for V5&V6 games (i.e. not + // for V4). More investigation (ASM) needed. See also o5_loadRoomWithEgo(). if (a && !_egoPositioned) { int x, y; getObjectXYPos(objectNr, x, y); |