[Scummvm-cvs-logs] SF.net SVN: scummvm:[34824] scummvm/trunk/graphics/dxa_player.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Oct 19 00:56:43 CEST 2008
Revision: 34824
http://scummvm.svn.sourceforge.net/scummvm/?rev=34824&view=rev
Author: fingolfin
Date: 2008-10-18 22:56:43 +0000 (Sat, 18 Oct 2008)
Log Message:
-----------
Simplify DXAPlayer::decodeZlib, and use common/zlib.h instead of system's zlib.h
Modified Paths:
--------------
scummvm/trunk/graphics/dxa_player.cpp
Modified: scummvm/trunk/graphics/dxa_player.cpp
===================================================================
--- scummvm/trunk/graphics/dxa_player.cpp 2008-10-18 21:28:05 UTC (rev 34823)
+++ scummvm/trunk/graphics/dxa_player.cpp 2008-10-18 22:56:43 UTC (rev 34824)
@@ -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::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
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list