diff options
| author | Torbjörn Andersson | 2005-09-27 17:38:35 +0000 |
|---|---|---|
| committer | Torbjörn Andersson | 2005-09-27 17:38:35 +0000 |
| commit | 2854ddbc809c01306761294be7851342808f6995 (patch) | |
| tree | 93e94fbeba1300f3c8ba39793ab147335d5194f9 | |
| parent | 1da2d2662b97659eafa2ab6be8730062a86fbaea (diff) | |
| download | scummvm-rg350-2854ddbc809c01306761294be7851342808f6995.tar.gz scummvm-rg350-2854ddbc809c01306761294be7851342808f6995.tar.bz2 scummvm-rg350-2854ddbc809c01306761294be7851342808f6995.zip | |
Used Willem Jan's suggestion for making the ugliness go away.
svn-id: r18889
| -rw-r--r-- | saga/animation.cpp | 3 | ||||
| -rw-r--r-- | saga/gfx.cpp | 2 | ||||
| -rw-r--r-- | saga/gfx.h | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/saga/animation.cpp b/saga/animation.cpp index 7194975ab2..a5f6e9bd68 100644 --- a/saga/animation.cpp +++ b/saga/animation.cpp @@ -114,7 +114,7 @@ void Anim::playCutaway(int cut, bool fade) { const Rect rect(width, height); bgSurface->blit(rect, buf); - _vm->_gfx->setPalette(const_cast<PalEntry *>(palette)); + _vm->_gfx->setPalette(palette); free(buf); free(resourceData); @@ -215,7 +215,6 @@ void Anim::load(uint16 animId, const byte *animResourceData, size_t animResource } anim->start += temp; - // Cache frame offsets anim->frameOffsets = (size_t *)malloc((anim->maxFrame + 1) * sizeof(*anim->frameOffsets)); if (anim->frameOffsets == NULL) { diff --git a/saga/gfx.cpp b/saga/gfx.cpp index ca8f566e76..6dcf1f09cc 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -164,7 +164,7 @@ void Surface::transitionDissolve(const byte *sourceBuffer, const Common::Rect &s } -void Gfx::setPalette(PalEntry *pal) { +void Gfx::setPalette(const PalEntry *pal) { int i; byte *ppal; diff --git a/saga/gfx.h b/saga/gfx.h index e9af30ca2a..6150def7c3 100644 --- a/saga/gfx.h +++ b/saga/gfx.h @@ -134,7 +134,7 @@ public: return &_backBuffer; } - void setPalette(PalEntry *pal); + void setPalette(const PalEntry *pal); void getCurrentPal(PalEntry *src_pal); void palToBlack(PalEntry *src_pal, double percent); void blackToPal(PalEntry *src_pal, double percent); |
