diff options
author | Max Horn | 2008-10-18 22:56:43 +0000 |
---|---|---|
committer | Max Horn | 2008-10-18 22:56:43 +0000 |
commit | 2f92b31235350cb7b08a2a2b3c8704f485d0ea88 (patch) | |
tree | ce1e20e45ef3f2cfef90ab01e783e4bc8ffc2e63 /graphics | |
parent | 53163a4284d1f8a2337045c86ea28ae3444b8ba5 (diff) | |
download | scummvm-rg350-2f92b31235350cb7b08a2a2b3c8704f485d0ea88.tar.gz scummvm-rg350-2f92b31235350cb7b08a2a2b3c8704f485d0ea88.tar.bz2 scummvm-rg350-2f92b31235350cb7b08a2a2b3c8704f485d0ea88.zip |
Simplify DXAPlayer::decodeZlib, and use common/zlib.h instead of system's zlib.h
svn-id: r34824
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/dxa_player.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/graphics/dxa_player.cpp b/graphics/dxa_player.cpp index 2430f46eea..fdfcb8992f 100644 --- a/graphics/dxa_player.cpp +++ b/graphics/dxa_player.cpp @@ -29,11 +29,7 @@ #include "common/util.h" #ifdef USE_ZLIB - #ifdef __SYMBIAN32__ - #include <zlib\zlib.h> - #else - #include <zlib.h> - #endif + #include "common/zlib.h" #endif namespace Graphics { @@ -218,18 +214,8 @@ void DXAPlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { void DXAPlayer::decodeZlib(byte *data, int size, int totalSize) { #ifdef USE_ZLIB - z_stream _d_stream; - _d_stream.zalloc = (alloc_func)0; - _d_stream.zfree = (free_func)0; - _d_stream.opaque = (voidpf)0; - _d_stream.next_in = _inBuffer; - _d_stream.avail_in = size; - _d_stream.total_in = size; - _d_stream.next_out = data; - _d_stream.avail_out = totalSize; - inflateInit(&_d_stream); - inflate(&_d_stream, Z_FINISH); - inflateEnd(&_d_stream); + unsigned long dstLen = totalSize; + Common::uncompress(data, &dstLen, _inBuffer, size); #endif } |