aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
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/sword1
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/sword1')
-rw-r--r--engines/sword1/control.h2
-rw-r--r--engines/sword1/screen.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index a6ccb09a04..2e5bfc7197 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -44,7 +44,7 @@ class Mouse;
class Music;
class Sound;
-#define SAVEGAME_HEADER MKID_BE('BS_1')
+#define SAVEGAME_HEADER MKTAG('B','S','_','1')
#define SAVEGAME_VERSION 2
#define MAX_BUTTONS 16
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 24fd5b502f..1906fcb7fd 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -899,7 +899,7 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr
uint8 *fullres_buffer = (uint8 *)malloc(bakXres * (yresInTiles + 1) * 32);
memset(fullres_buffer, 0, bakXres * (yresInTiles + 1) * 32);
- bool isCompressed = (READ_LE_UINT32(psxBackground) == MKID_BE('COMP'));
+ bool isCompressed = (READ_LE_UINT32(psxBackground) == MKTAG('C','O','M','P'));
totTiles -= xresInTiles;
psxBackground += 4; //We skip the id tag