diff options
author | Paul Gilbert | 2012-04-30 23:16:19 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-04-30 23:16:19 +1000 |
commit | 68bcaa61b9eb1108028b3db072ade95431b9f14f (patch) | |
tree | 604032ba514b785f5a3216e7d47c9d4906e32d49 /engines/tony/mpal | |
parent | b0eef829728183b7ea170b30a33eca091bcc4574 (diff) | |
download | scummvm-rg350-68bcaa61b9eb1108028b3db072ade95431b9f14f.tar.gz scummvm-rg350-68bcaa61b9eb1108028b3db072ade95431b9f14f.tar.bz2 scummvm-rg350-68bcaa61b9eb1108028b3db072ade95431b9f14f.zip |
TONY: More header files and functionality added
Diffstat (limited to 'engines/tony/mpal')
-rw-r--r-- | engines/tony/mpal/lzo.cpp | 14 | ||||
-rw-r--r-- | engines/tony/mpal/lzo.h | 11 | ||||
-rw-r--r-- | engines/tony/mpal/stubs.cpp | 10 | ||||
-rw-r--r-- | engines/tony/mpal/stubs.h | 8 |
4 files changed, 43 insertions, 0 deletions
diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index 6cd755fc93..17b059455c 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -63,6 +63,7 @@ */ #include "lzo.h" +#include "common/textconsole.h" namespace Tony { @@ -505,6 +506,19 @@ lookbehind_overrun: #endif } +int lzo1x_1_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem) { + warning("TODO: lzo1x_1_compress"); + return 0; +} + +/** + * better compression ratio at the cost of more memory and time + */ +int lzo1x_999_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem) { + warning("TODO: lzo1x_999_compress"); + return 0; +} + } // end of namespace MPAL } // end of namespace Tony diff --git a/engines/tony/mpal/lzo.h b/engines/tony/mpal/lzo.h index 1d20c8e96e..ebb1c4b516 100644 --- a/engines/tony/mpal/lzo.h +++ b/engines/tony/mpal/lzo.h @@ -87,12 +87,23 @@ namespace MPAL { #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ #define LZO_E_INVALID_ARGUMENT (-10) +#define LZO1X_999_MEM_COMPRESS ((uint32) (14 * 16384L * sizeof(uint16))) /** * Decompresses an LZO compressed resource */ int lzo1x_decompress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len); +/** + * Comrpess a data block into an LZO stream + */ +int lzo1x_1_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem); + +/** + * better compression ratio at the cost of more memory and time + */ +int lzo1x_999_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem); + } // end of namespace MPAL } // end of namespace Tony diff --git a/engines/tony/mpal/stubs.cpp b/engines/tony/mpal/stubs.cpp index 054ed55c68..ea93265ec9 100644 --- a/engines/tony/mpal/stubs.cpp +++ b/engines/tony/mpal/stubs.cpp @@ -59,9 +59,15 @@ HANDLE CreateThread(void *lpThreadAttributes, size_t dwStackSize, return 0; } +void _beginthread(LPTHREAD_ROUTINE lpStartAddress, size_t dwStackSize, void *lpParameter) { +} + void ExitThread(int ThreadId) { } +void _endthread() { +} + void TerminateThread(HANDLE ThreadId, uint32 dwExitCode) { } @@ -91,6 +97,10 @@ void SetEvent(HANDLE hEvent) { void ResetEvent(HANDLE hEvent) { } +uint16 GetAsyncKeyState(Common::KeyCode kc) { + return 0; +} + } // end of namespace MPAL } // end of namespace Tony diff --git a/engines/tony/mpal/stubs.h b/engines/tony/mpal/stubs.h index a8d3253ddb..9a22b65b7a 100644 --- a/engines/tony/mpal/stubs.h +++ b/engines/tony/mpal/stubs.h @@ -31,6 +31,7 @@ #include "common/scummsys.h" #include "common/algorithm.h" +#include "common/keyboard.h" #include "tony/mpal/memory.h" namespace Tony { @@ -42,6 +43,7 @@ namespace MPAL { \****************************************************************************/ typedef uint32 (*LPTHREAD_START_ROUTINE)(void *lpThreadParameter); +typedef void (*LPTHREAD_ROUTINE)(void *lpThreadParameter); /****************************************************************************\ * Defines @@ -82,8 +84,12 @@ extern HANDLE CreateThread(void *lpThreadAttributes, size_t dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, void *lpParameter, uint32 dwCreationFlags, uint32 *lpThreadId); +extern void _beginthread(LPTHREAD_ROUTINE lpStartAddress, size_t dwStackSize, void *lpParameter); + extern void ExitThread(int ThreadId); +extern void _endthread(); + extern void TerminateThread(HANDLE ThreadId, uint32 dwExitCode); extern void CloseHandle(HANDLE ThreadId); @@ -100,6 +106,8 @@ extern void SetEvent(HANDLE hEvent); extern void ResetEvent(HANDLE hEvent); +extern uint16 GetAsyncKeyState(Common::KeyCode kc); + } // end of namespace MPAL } // end of namespace Tony |