aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorWalter van Niftrik2011-03-04 21:51:55 +0100
committerWalter van Niftrik2011-03-04 21:55:39 +0100
commit23dcd3c7612205c822f81d7ebdc25b0076a18600 (patch)
treea00bc0a83bef7e438fb8c22e9350e7c48d89727e /engines/sci/engine
parenta913d360f27f300633a8da5997686343e95e56a3 (diff)
downloadscummvm-rg350-23dcd3c7612205c822f81d7ebdc25b0076a18600.tar.gz
scummvm-rg350-23dcd3c7612205c822f81d7ebdc25b0076a18600.tar.bz2
scummvm-rg350-23dcd3c7612205c822f81d7ebdc25b0076a18600.zip
SCI: Remove SCI version check from READ/WRITE_SCI1ENDIAN_UINT16.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kmisc.cpp8
-rw-r--r--engines/sci/engine/kpathing.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 5b0d93a249..73c92a9394 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -298,9 +298,9 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) {
error("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1]));
return s->r_acc;
}
- if (ref.isRaw) {
- return make_reg(0, (int16)READ_SCI1ENDIAN_UINT16(ref.raw));
- } else {
+ if (ref.isRaw)
+ return make_reg(0, (int16)READ_SCIENDIAN_UINT16(ref.raw));
+ else {
if (ref.skipByte)
error("Attempt to peek memory at odd offset %04X:%04X", PRINT_REG(argv[1]));
return *(ref.reg);
@@ -320,7 +320,7 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) {
error("Attempt to poke memory reference %04x:%04x to %04x:%04x", PRINT_REG(argv[2]), PRINT_REG(argv[1]));
return s->r_acc;
}
- WRITE_SCI1ENDIAN_UINT16(ref.raw, argv[2].offset); // Amiga versions are BE
+ WRITE_SCIENDIAN_UINT16(ref.raw, argv[2].offset); // Amiga versions are BE
} else {
if (ref.skipByte)
error("Attempt to poke memory at odd offset %04X:%04X", PRINT_REG(argv[1]));
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index c98d93c2d9..7786f9b093 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -265,8 +265,8 @@ static Common::Point readPoint(SegmentRef list_r, int offset) {
Common::Point point;
if (list_r.isRaw) { // dynmem blocks are raw
- point.x = (int16)READ_SCI1ENDIAN_UINT16(list_r.raw + offset * POLY_POINT_SIZE);
- point.y = (int16)READ_SCI1ENDIAN_UINT16(list_r.raw + offset * POLY_POINT_SIZE + 2);
+ point.x = (int16)READ_SCIENDIAN_UINT16(list_r.raw + offset * POLY_POINT_SIZE);
+ point.y = (int16)READ_SCIENDIAN_UINT16(list_r.raw + offset * POLY_POINT_SIZE + 2);
} else {
point.x = list_r.reg[offset * 2].toUint16();
point.y = list_r.reg[offset * 2 + 1].toUint16();
@@ -276,8 +276,8 @@ static Common::Point readPoint(SegmentRef list_r, int offset) {
static void writePoint(SegmentRef ref, int offset, const Common::Point &point) {
if (ref.isRaw) { // dynmem blocks are raw
- WRITE_SCI1ENDIAN_UINT16(ref.raw + offset * POLY_POINT_SIZE, point.x);
- WRITE_SCI1ENDIAN_UINT16(ref.raw + offset * POLY_POINT_SIZE + 2, point.y);
+ WRITE_SCIENDIAN_UINT16(ref.raw + offset * POLY_POINT_SIZE, point.x);
+ WRITE_SCIENDIAN_UINT16(ref.raw + offset * POLY_POINT_SIZE + 2, point.y);
} else {
ref.reg[offset * 2] = make_reg(0, point.x);
ref.reg[offset * 2 + 1] = make_reg(0, point.y);