1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix a few type issues due to typedef updates

This commit is contained in:
Branan Purvine-Riley
2011-10-24 23:25:20 -07:00
parent 2980fbf53c
commit 0af3d1877d
9 changed files with 21 additions and 26 deletions

View File

@ -46,14 +46,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
hsBool plZlibCompress::Uncompress(UInt8* bufOut, UInt32* bufLenOut, const UInt8* bufIn, UInt32 bufLenIn)
{
return (uncompress(bufOut, bufLenOut, bufIn, bufLenIn) == Z_OK);
unsigned long buflen_out;
bool result = (uncompress(bufOut, &buflen_out, bufIn, bufLenIn) == Z_OK);
*bufLenOut = buflen_out;
return result;
}
hsBool plZlibCompress::Compress(UInt8* bufOut, UInt32* bufLenOut, const UInt8* bufIn, UInt32 bufLenIn)
{
// according to compress doc, the bufOut buffer should be at least .1% larger than source buffer, plus 12 bytes.
hsAssert(*bufLenOut>=(int)(bufLenIn*1.1+12), "bufOut compress buffer is not large enough");
return (compress(bufOut, bufLenOut, bufIn, bufLenIn) == Z_OK);
unsigned long buflen_out;
bool result = (compress(bufOut, &buflen_out, bufIn, bufLenIn) == Z_OK);
*bufLenOut = buflen_out;
return result;
}
//

View File

@ -299,7 +299,7 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
}
UInt8 *bufferAddr = jpgBuffer;
UInt32 bufferSize = jpgBufferSize;
unsigned long bufferSize = jpgBufferSize;
jpeg_mem_dest( &cinfo, &bufferAddr, &bufferSize );
cinfo.image_width = source->GetWidth();