diff options
| author | Torbjörn Andersson | 2004-06-09 06:33:29 +0000 |
|---|---|---|
| committer | Torbjörn Andersson | 2004-06-09 06:33:29 +0000 |
| commit | 0426d38aa599d554bd63c4053c6990356a62b71e (patch) | |
| tree | b6a0362ef754b67e1c55df5da7e7acb7f5857469 /sword2/driver/animation.cpp | |
| parent | 51b373eb6fdcbc6af2bc606341c92cd645c56096 (diff) | |
| download | scummvm-rg350-0426d38aa599d554bd63c4053c6990356a62b71e.tar.gz scummvm-rg350-0426d38aa599d554bd63c4053c6990356a62b71e.tar.bz2 scummvm-rg350-0426d38aa599d554bd63c4053c6990356a62b71e.zip | |
Cleaned up the palette handling a bit. Renamed _palCopy to _palette since I
found the old name misleading (there is only one array that stores the
palette in the engine, though it could be argued that it's a copy of the
one used by the backend), and removed some code that I'm almost certain was
never used. (I've added assert()s to trigger in the cases where it would
have been used.)
svn-id: r13949
Diffstat (limited to 'sword2/driver/animation.cpp')
| -rw-r--r-- | sword2/driver/animation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp index f975b4be7d..3fe259c7cf 100644 --- a/sword2/driver/animation.cpp +++ b/sword2/driver/animation.cpp @@ -178,8 +178,8 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *mus uint32 flags = SoundMixer::FLAG_16BITS; bool startNextText = false; - byte oldPal[1024]; - memcpy(oldPal, _vm->_graphics->_palCopy, 1024); + byte oldPal[256 * 4]; + memcpy(oldPal, _vm->_graphics->_palette, sizeof(oldPal)); AnimationState *anim = new AnimationState(_vm); @@ -345,8 +345,8 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *mus int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte *musicOut) { int frameCounter = 0, textCounter = 0; if (text) { - byte oldPal[1024]; - byte tmpPal[1024]; + byte oldPal[256 * 4]; + byte tmpPal[256 * 4]; _vm->_graphics->clearScene(); @@ -384,8 +384,8 @@ int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte // In the opening cutscene it seems to use colours 1 (black?) // and 255 (white?). - memcpy(oldPal, _vm->_graphics->_palCopy, 1024); - memset(tmpPal, 0, 1024); + memcpy(oldPal, _vm->_graphics->_palette, sizeof(oldPal)); + memset(tmpPal, 0, sizeof(tmpPal)); tmpPal[255 * 4 + 0] = 255; tmpPal[255 * 4 + 1] = 255; tmpPal[255 * 4 + 2] = 255; |
