diff options
author | Johannes Schickel | 2007-07-29 16:33:11 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-07-29 16:33:11 +0000 |
commit | 1140fca82e79121ad2a154dc98b1637c8d56d55d (patch) | |
tree | 409ae64e02fef57ada9489f652c6e6f40762102a /engines/kyra/screen.cpp | |
parent | 076d6b1bc1c4f62732ff46a0931c6bc28ef9a08f (diff) | |
download | scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.tar.gz scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.tar.bz2 scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.zip |
- Kyrandia 1 works again
- Added timer class for timer handling
- Little bit more resturcturing
- A little bit (almost nothing but a start!) Kyrandia 2 support
svn-id: r28297
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 0e01801369..a7e9c90824 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -355,33 +355,6 @@ void Screen::fadeToBlack(int delay) { fadePalette(blackPal, delay); } -void Screen::k2IntroFadeToGrey(int delay) { - debugC(9, kDebugLevelScreen, "Screen::k2IntroFadeToGrey()"); - - for (int i = 0; i <= 50; ++i) { - if (i <= 8 || i >= 30) { - _currentPalette[3 * i + 0] = (_currentPalette[3 * i + 0] + - _currentPalette[3 * i + 1] + - _currentPalette[3 * i + 2]) / 3; - _currentPalette[3 * i + 1] = _currentPalette[3 * i + 0]; - _currentPalette[3 * i + 2] = _currentPalette[3 * i + 0]; - } - } - - // color 71 is the same in both the overview and closeup scenes - // Converting it to greyscale makes the trees in the closeup look dull - for (int i = 71; i < 200; ++i) { - _currentPalette[3 * i + 0] = (_currentPalette[3 * i + 0] + - _currentPalette[3 * i + 1] + - _currentPalette[3 * i + 2]) / 3; - _currentPalette[3 * i + 1] = _currentPalette[3 * i + 0]; - _currentPalette[3 * i + 2] = _currentPalette[3 * i + 0]; - } - fadePalette(_currentPalette, delay); - // Make the font color white again - setPaletteIndex(254, 254, 254, 254); -} - void Screen::fadePalette(const uint8 *palData, int delay) { debugC(9, kDebugLevelScreen, "Screen::fadePalette(%p, %d)", (const void *)palData, delay); updateScreen(); @@ -1057,13 +1030,8 @@ void Screen::drawCharANSI(uint8 c, int x, int y) { void Screen::setScreenDim(int dim) { debugC(9, kDebugLevelScreen, "Screen::setScreenDim(%d)", dim); - if (_vm->game() == GI_KYRA1) { - assert(dim < _screenDimTableCount); - _curDim = &_screenDimTable[dim]; - } else { - assert(dim < _screenDimTableCountK3); - _curDim = &_screenDimTableK3[dim]; - } + assert(dim < _screenDimTableCount); + _curDim = &_screenDimTable[dim]; // XXX } @@ -2680,38 +2648,6 @@ void Screen::loadPalette(const byte *data, uint8 *palData, int bytes) { } } -// kyra3 specific - -const uint8 *Screen::getPtrToShape(const uint8 *shpFile, int shape) { - debugC(9, kDebugLevelScreen, "KyraEngine::getPtrToShape(%p, %d)", (const void *)shpFile, shape); - uint16 shapes = READ_LE_UINT16(shpFile); - - if (shapes <= shape) - return 0; - - uint32 offset = READ_LE_UINT32(shpFile + (shape << 2) + 2); - - return shpFile + offset + 2; -} - -uint8 *Screen::getPtrToShape(uint8 *shpFile, int shape) { - debugC(9, kDebugLevelScreen, "KyraEngine::getPtrToShape(%p, %d)", (void *)shpFile, shape); - uint16 shapes = READ_LE_UINT16(shpFile); - - if (shapes <= shape) - return 0; - - uint32 offset = READ_LE_UINT32(shpFile + (shape << 2) + 2); - - return shpFile + offset + 2; -} - -uint16 Screen::getShapeSize(const uint8 *shp) { - debugC(9, kDebugLevelScreen, "KyraEngine::getShapeSize(%p)", (const void *)shp); - - return READ_LE_UINT16(shp+6); -} - // dirty rect handling void Screen::addDirtyRect(int x, int y, int w, int h) { |