aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorMax Horn2003-04-30 13:23:31 +0000
committerMax Horn2003-04-30 13:23:31 +0000
commit2b74abd2c900d1a8bfd6c15829397503d9439849 (patch)
treebe0e1c3845c90a7e66fffc6b763b964066621ebb /scumm/script_v6.cpp
parent30e3a8161857260e75c84e4a54cf0849afa10dfd (diff)
downloadscummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.tar.gz
scummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.tar.bz2
scummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.zip
PalmOS changes
svn-id: r7224
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 1a8d391109..307043b469 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -425,15 +425,14 @@ void Scumm::writeArray(int array, int idx, int base, int value) {
} else if (_features & GF_AFTER_V8) {
#if defined(SCUMM_NEED_ALIGNMENT)
uint32 tmp = TO_LE_32(value);
- memcpy(&((uint32*)ah->data)[base], &tmp, 4);
+ memcpy(&((uint32 *)ah->data)[base], &tmp, 4);
#else
((uint32 *)ah->data)[base] = TO_LE_32(value);
#endif
-
} else {
#if defined(SCUMM_NEED_ALIGNMENT)
uint16 tmp = TO_LE_16(value);
- memcpy(&((uint16*)ah->data)[base], &tmp, 2);
+ memcpy(&((uint16 *)ah->data)[base], &tmp, 2);
#else
((uint16 *)ah->data)[base] = TO_LE_16(value);
#endif
@@ -2281,7 +2280,8 @@ void Scumm_v6::o6_dim2() {
}
void Scumm_v6::o6_abs() {
- push(abs(pop()));
+ int a = pop(); // palmos: prevent multi pop if we use an abs function defined as : #define abs(a) ((a) < 0 ? -(a) : (a))
+ push(abs(a));
}
void Scumm_v6::o6_distObjectObject() {