aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoost Peters2009-02-21 12:21:15 +0000
committerJoost Peters2009-02-21 12:21:15 +0000
commit3988062776a0b1c3775807b8f733382c4c1d838f (patch)
tree7fcfd90c6e61fa682fbb8a588e0a471e85e46f7f
parentf069c04c60abf8616b258c9550f31b6b58ece787 (diff)
downloadscummvm-rg350-3988062776a0b1c3775807b8f733382c4c1d838f.tar.gz
scummvm-rg350-3988062776a0b1c3775807b8f733382c4c1d838f.tar.bz2
scummvm-rg350-3988062776a0b1c3775807b8f733382c4c1d838f.zip
replace #ifdef WORDS_BIGENDIAN by SCUMM_BIG_ENDIAN
svn-id: r38689
-rw-r--r--engines/sci/engine/kstring.cpp2
-rw-r--r--engines/sci/gfx/antialias.cpp2
-rw-r--r--engines/sci/gfx/gfx_line.cpp2
-rw-r--r--engines/sci/gfx/gfx_resource.cpp8
-rw-r--r--engines/sci/gfx/gfx_support.cpp2
-rw-r--r--engines/sci/include/sfx_pcm.h2
-rw-r--r--engines/sci/scicore/decompress0.cpp6
-rw-r--r--engines/sci/scicore/decompress01.cpp4
-rw-r--r--engines/sci/scicore/decompress1.cpp6
-rw-r--r--engines/sci/scicore/decompress11.cpp4
10 files changed, 19 insertions, 19 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index ecf9816e43..1a547cd162 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -426,7 +426,7 @@ reg_t kStrAt(EngineState *s, int funct_nr, int argc, reg_t *argv) {
((strlen((const char*)dest) < 2) || (!is_print_str((char*)dest))))
/* SQ4 array handling detected */
{
-#ifndef WORDS_BIGENDIAN
+#ifndef SCUMM_BIG_ENDIAN
int odd = KP_UINT(argv[1]) & 1;
#else
int odd = !(KP_UINT(argv[1]) & 1);
diff --git a/engines/sci/gfx/antialias.cpp b/engines/sci/gfx/antialias.cpp
index f297301236..e7bf190d23 100644
--- a/engines/sci/gfx/antialias.cpp
+++ b/engines/sci/gfx/antialias.cpp
@@ -135,7 +135,7 @@ void gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t
int masks[3];
int shift_const = 0;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
shift_const = (sizeof(unsigned long) - mode->bytespp) << 3;
#endif
diff --git a/engines/sci/gfx/gfx_line.cpp b/engines/sci/gfx/gfx_line.cpp
index 21f2f429b1..84c4e78d04 100644
--- a/engines/sci/gfx/gfx_line.cpp
+++ b/engines/sci/gfx/gfx_line.cpp
@@ -52,7 +52,7 @@ static inline void DRAWLINE_FUNC(byte *buffer, int linewidth, Common::Point star
dy = end.y - start.y;
finalx = end.x;
finaly = end.y;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
color = GUINT32_SWAP_LE_BE_CONSTANT(color);
#endif
dx = abs(dx);
diff --git a/engines/sci/gfx/gfx_resource.cpp b/engines/sci/gfx/gfx_resource.cpp
index c65668a6db..779a87a3e1 100644
--- a/engines/sci/gfx/gfx_resource.cpp
+++ b/engines/sci/gfx/gfx_resource.cpp
@@ -222,10 +222,10 @@ gfx_pixmap_t *gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode) {
#include "gfx_pixmap_scale.cpp"
#undef COPY_BYTES
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
# undef EXTRA_BYTE_OFFSET
# define EXTRA_BYTE_OFFSET 1
-#endif // WORDS_BIGENDIAN
+#endif // SCUMM_BIG_ENDIAN
#define SIZETYPE guint32
#define FUNCNAME _gfx_xlate_pixmap_unfiltered_3
#define FUNCNAME_LINEAR _gfx_xlate_pixmap_linear_3
@@ -233,10 +233,10 @@ gfx_pixmap_t *gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode) {
#define COPY_BYTES 3
#include "gfx_pixmap_scale.cpp"
#undef COPY_BYTES
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
# undef EXTRA_BYTE_OFFSET
# define EXTRA_BYTE_OFFSET 0
-#endif // WORDS_BIGENDIAN
+#endif // SCUMM_BIG_ENDIAN
#define SIZETYPE guint32
#define FUNCNAME _gfx_xlate_pixmap_unfiltered_4
diff --git a/engines/sci/gfx/gfx_support.cpp b/engines/sci/gfx/gfx_support.cpp
index b99e179d60..276d51e176 100644
--- a/engines/sci/gfx/gfx_support.cpp
+++ b/engines/sci/gfx/gfx_support.cpp
@@ -362,7 +362,7 @@ int gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rect
alpha_mask &= 0xff;
}
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
alpha += (mode->bytespp) - (shift_nr + 1);
#else
alpha += shift_nr;
diff --git a/engines/sci/include/sfx_pcm.h b/engines/sci/include/sfx_pcm.h
index b1402acc1a..7490ab3e22 100644
--- a/engines/sci/include/sfx_pcm.h
+++ b/engines/sci/include/sfx_pcm.h
@@ -54,7 +54,7 @@ namespace Sci {
#define SFX_PCM_FORMAT_U16_BE (0x8000 | SFX_PCM_FORMAT_16 | SFX_PCM_FORMAT_BE) /* Unsigned (bias 32768) 16 bit BE format */
#define SFX_PCM_FORMAT_S16_BE (0x0000 | SFX_PCM_FORMAT_16 | SFX_PCM_FORMAT_BE) /* Signed 16 bit format, big endian */
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
# define SFX_PCM_FORMAT_U16_NATIVE SFX_PCM_FORMAT_U16_BE
# define SFX_PCM_FORMAT_S16_NATIVE SFX_PCM_FORMAT_S16_BE
#else
diff --git a/engines/sci/scicore/decompress0.cpp b/engines/sci/scicore/decompress0.cpp
index 4768e033de..0f6411b6a7 100644
--- a/engines/sci/scicore/decompress0.cpp
+++ b/engines/sci/scicore/decompress0.cpp
@@ -231,7 +231,7 @@ int sci0_get_compression_method(Common::ReadStream &stream) {
if ((stream.read(&compressedLength, 2) != 2) || (stream.read(&result_size, 2) != 2) || (stream.read(&compressionMethod, 2) != 2))
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
compressionMethod = GUINT16_SWAP_LE_BE_CONSTANT(compressionMethod);
#endif
@@ -247,7 +247,7 @@ int decompress0(resource_t *result, Common::ReadStream &stream, int sci_version)
if (stream.read(&(result->id), 2) != 2)
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
result->id = GUINT16_SWAP_LE_BE_CONSTANT(result->id);
#endif
result->number = result->id & 0x07ff;
@@ -259,7 +259,7 @@ int decompress0(resource_t *result, Common::ReadStream &stream, int sci_version)
if ((stream.read(&compressedLength, 2) != 2) || (stream.read(&result_size, 2) != 2) || (stream.read(&compressionMethod, 2) != 2))
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
compressedLength = GUINT16_SWAP_LE_BE_CONSTANT(compressedLength);
result_size = GUINT16_SWAP_LE_BE_CONSTANT(result_size);
compressionMethod = GUINT16_SWAP_LE_BE_CONSTANT(compressionMethod);
diff --git a/engines/sci/scicore/decompress01.cpp b/engines/sci/scicore/decompress01.cpp
index 6c22437d46..59afdb6b56 100644
--- a/engines/sci/scicore/decompress01.cpp
+++ b/engines/sci/scicore/decompress01.cpp
@@ -496,7 +496,7 @@ int decompress01(resource_t *result, Common::ReadStream &stream, int sci_version
if (stream.read(&(result->id), 2) != 2)
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
result->id = GUINT16_SWAP_LE_BE_CONSTANT(result->id);
#endif
@@ -509,7 +509,7 @@ int decompress01(resource_t *result, Common::ReadStream &stream, int sci_version
if ((stream.read(&compressedLength, 2) != 2) || (stream.read(&result_size, 2) != 2) || (stream.read(&compressionMethod, 2) != 2))
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
compressedLength = GUINT16_SWAP_LE_BE_CONSTANT(compressedLength);
result_size = GUINT16_SWAP_LE_BE_CONSTANT(result_size);
compressionMethod = GUINT16_SWAP_LE_BE_CONSTANT(compressionMethod);
diff --git a/engines/sci/scicore/decompress1.cpp b/engines/sci/scicore/decompress1.cpp
index 7d56545070..6a49ceb740 100644
--- a/engines/sci/scicore/decompress1.cpp
+++ b/engines/sci/scicore/decompress1.cpp
@@ -273,7 +273,7 @@ int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version)
if (stream.read(&(result->id), 2) != 2)
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
result->id = GUINT16_SWAP_LE_BE_CONSTANT(result->id);
#endif
@@ -292,7 +292,7 @@ int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version)
if (stream.read(&(result->number), 2) != 2)
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
result->number = GUINT16_SWAP_LE_BE_CONSTANT(result->number);
#endif
if ((result->number >= sci_max_resource_nr[SCI_VERSION_1_LATE]) || (result->type > sci_invalid_resource))
@@ -302,7 +302,7 @@ int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version)
if ((stream.read(&compressedLength, 2) != 2) || (stream.read(&result_size, 2) != 2) || (stream.read(&compressionMethod, 2) != 2))
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
compressedLength = GUINT16_SWAP_LE_BE_CONSTANT(compressedLength);
result_size = GUINT16_SWAP_LE_BE_CONSTANT(result_size);
compressionMethod = GUINT16_SWAP_LE_BE_CONSTANT(compressionMethod);
diff --git a/engines/sci/scicore/decompress11.cpp b/engines/sci/scicore/decompress11.cpp
index 49a355d8bd..722f51dd6f 100644
--- a/engines/sci/scicore/decompress11.cpp
+++ b/engines/sci/scicore/decompress11.cpp
@@ -54,7 +54,7 @@ int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version
if (stream.read(&(result->number), 2) != 2)
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
result->number = GUINT16_SWAP_LE_BE_CONSTANT(result->number);
#endif
if ((result->type > sci_invalid_resource))
@@ -63,7 +63,7 @@ int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version
if ((stream.read(&compressedLength, 2) != 2) || (stream.read(&result_size, 2) != 2) || (stream.read(&compressionMethod, 2) != 2))
return SCI_ERROR_IO_ERROR;
-#ifdef WORDS_BIGENDIAN
+#ifdef SCUMM_BIG_ENDIAN
compressedLength = GUINT16_SWAP_LE_BE_CONSTANT(compressedLength);
result_size = GUINT16_SWAP_LE_BE_CONSTANT(result_size);
compressionMethod = GUINT16_SWAP_LE_BE_CONSTANT(compressionMethod);