aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/animation.cpp3
-rw-r--r--saga/gfx.cpp2
-rw-r--r--saga/gfx.h2
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);