aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/saveload.cpp
diff options
context:
space:
mode:
authorMax Horn2011-04-12 16:53:15 +0200
committerMax Horn2011-04-12 16:53:15 +0200
commit0ce2ca4e006a70d787481040fa844c85aac43222 (patch)
tree25fb61d7e7165ec2570ecf14a4af52e9bdb6b176 /engines/scumm/saveload.cpp
parenta8b3501252c46c3fc4fd129fa0a945eb87f47d0a (diff)
downloadscummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.tar.gz
scummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.tar.bz2
scummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.zip
COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro.
Diffstat (limited to 'engines/scumm/saveload.cpp')
-rw-r--r--engines/scumm/saveload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index fb34255683..3bfe51a77b 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -154,7 +154,7 @@ void ScummEngine::requestLoad(int slot) {
}
static bool saveSaveGameHeader(Common::OutSaveFile *out, SaveGameHeader &hdr) {
- hdr.type = MKID_BE('SCVM');
+ hdr.type = MKTAG('S','C','V','M');
hdr.size = 0;
hdr.ver = CURRENT_VER;
@@ -308,7 +308,7 @@ static bool loadSaveGameHeader(Common::SeekableReadStream *in, SaveGameHeader &h
hdr.size = in->readUint32LE();
hdr.ver = in->readUint32LE();
in->read(hdr.name, sizeof(hdr.name));
- return !in->err() && hdr.type == MKID_BE('SCVM');
+ return !in->err() && hdr.type == MKTAG('S','C','V','M');
}
bool ScummEngine::loadState(int slot, bool compat) {
@@ -746,7 +746,7 @@ bool ScummEngine::loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos
SaveInfoSection section;
section.type = file->readUint32BE();
- if (section.type != MKID_BE('INFO')) {
+ if (section.type != MKTAG('I','N','F','O')) {
return false;
}
@@ -793,7 +793,7 @@ bool ScummEngine::loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos
void ScummEngine::saveInfos(Common::WriteStream* file) {
SaveInfoSection section;
- section.type = MKID_BE('INFO');
+ section.type = MKTAG('I','N','F','O');
section.version = INFOSECTION_VERSION;
section.size = SaveInfoSectionSize;