TONY: Fixed the CopyMemory stub to copy the correct number of bytes.

Tony can now leave his office without the game crashing.
This commit is contained in:
Paul Gilbert 2012-05-12 10:55:18 +10:00
parent a153f9a2e6
commit 435971f256
2 changed files with 6 additions and 14 deletions

View File

@ -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

View File

@ -53,24 +53,12 @@ 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