aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/saveload.cpp4
-rw-r--r--engines/sword2/saveload.cpp4
-rw-r--r--engines/sword2/sword2.cpp2
-rw-r--r--engines/sword2/sword2.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp
index e45ea661b7..0788dc70f9 100644
--- a/engines/gob/saveload.cpp
+++ b/engines/gob/saveload.cpp
@@ -91,7 +91,7 @@ bool TempSprite::saveSprite(const SurfaceDesc &surfDesc) {
}
bool TempSprite::savePalette(const Video::Color *palette) {
- memcpy((byte *) _palette, (byte *) palette, 768);
+ memcpy((byte *) _palette, (const byte *) palette, 768);
return true;
}
@@ -126,7 +126,7 @@ bool TempSprite::toBuffer(byte *buffer, int32 size, bool palette) const {
}
if (palette) {
- memcpy(buffer, (byte *) _palette, 768);
+ memcpy(buffer, (const byte *) _palette, 768);
buffer += 768;
}
diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp
index e9d184f9d6..4a8b0e9ab6 100644
--- a/engines/sword2/saveload.cpp
+++ b/engines/sword2/saveload.cpp
@@ -70,14 +70,14 @@ uint32 Sword2Engine::findBufferSize() {
* Save the game.
*/
-uint32 Sword2Engine::saveGame(uint16 slotNo, byte *desc) {
+uint32 Sword2Engine::saveGame(uint16 slotNo, const byte *desc) {
char description[SAVE_DESCRIPTION_LEN];
uint32 bufferSize = findBufferSize();
byte *saveBuffer = (byte *)malloc(bufferSize);
ScreenInfo *screenInfo = _screen->getScreenInfo();
memset(description, 0, sizeof(description));
- strncpy(description, (char *)desc, SAVE_DESCRIPTION_LEN - 1);
+ strncpy(description, (const char *)desc, SAVE_DESCRIPTION_LEN - 1);
Common::MemoryWriteStream writeS(saveBuffer, bufferSize);
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index e9ad1dba4a..54c646c326 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -832,7 +832,7 @@ uint32 Sword2Engine::getMillis() {
}
Common::Error Sword2Engine::saveGameState(int slot, const char *desc) {
- uint32 saveVal = saveGame(slot, (byte *)desc);
+ uint32 saveVal = saveGame(slot, (const byte *)desc);
if (saveVal == SR_OK)
return Common::kNoError;
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 7168e7ae47..84530fc4f2 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -219,7 +219,7 @@ public:
bool checkTextLine(byte *file, uint32 text_line);
byte *fetchPaletteMatchTable(byte *screenFile);
- uint32 saveGame(uint16 slotNo, byte *description);
+ uint32 saveGame(uint16 slotNo, const byte *description);
uint32 restoreGame(uint16 slotNo);
uint32 getSaveDescription(uint16 slotNo, byte *description);
bool saveExists();