aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-12 10:55:18 +1000
committerPaul Gilbert2012-05-12 10:55:18 +1000
commit435971f256f33f9944bc37f7c23c90eb70c77948 (patch)
treead23e7a6b7916d0c7b3807502c707325040a42eb /engines/tony
parenta153f9a2e633c788edd00b1c71c75377a3319e66 (diff)
downloadscummvm-rg350-435971f256f33f9944bc37f7c23c90eb70c77948.tar.gz
scummvm-rg350-435971f256f33f9944bc37f7c23c90eb70c77948.tar.bz2
scummvm-rg350-435971f256f33f9944bc37f7c23c90eb70c77948.zip
TONY: Fixed the CopyMemory stub to copy the correct number of bytes.
Tony can now leave his office without the game crashing.
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/mpal/stubs.cpp4
-rw-r--r--engines/tony/mpal/stubs.h16
2 files changed, 6 insertions, 14 deletions
diff --git a/engines/tony/mpal/stubs.cpp b/engines/tony/mpal/stubs.cpp
index 23bc18b0ea..89740fdd52 100644
--- a/engines/tony/mpal/stubs.cpp
+++ b/engines/tony/mpal/stubs.cpp
@@ -40,6 +40,10 @@ uint16 GetAsyncKeyState(Common::KeyCode kc) {
return 0;
}
+void CopyMemory(void *dst, const void *first, int size) {
+ Common::copy((const byte *)first, (const byte *)first + size, (byte *)dst);
+}
+
} // end of namespace MPAL
} // end of namespace Tony
diff --git a/engines/tony/mpal/stubs.h b/engines/tony/mpal/stubs.h
index ae25f7127e..ea88c1c76c 100644
--- a/engines/tony/mpal/stubs.h
+++ b/engines/tony/mpal/stubs.h
@@ -54,23 +54,11 @@ typedef void (*LPTHREAD_ROUTINE)(void *lpThreadParameter);
#define PASCAL
/****************************************************************************\
-* Templates
-\****************************************************************************/
-
-/**
- * Copies data from the range [first, last) to [dst, dst + (last - first)).
- * It requires the range [dst, dst + (last - first)) to be valid.
- * It also requires dst not to be in the range [first, last).
- */
-template<class In, class Out>
-Out CopyMemory(Out dst, In first, int size) {
- return Common::copy(first, first + size, dst);
-}
-
-/****************************************************************************\
* Methods
\****************************************************************************/
+extern void CopyMemory(void *dst, const void *first, int size);
+
extern uint16 GetAsyncKeyState(Common::KeyCode kc);
} // end of namespace MPAL