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

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -268,9 +268,9 @@ plMipmap* plJPEG::ReadFromFile( const wchar_t *fileName )
//// IWrite ///////////////////////////////////////////////////////////////////
// Oh, figure it out yourself. :P
hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
bool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
{
hsBool result = true, swapped = false;
bool result = true, swapped = false;
uint8_t *jpgBuffer = nil;
uint32_t jpgBufferSize = 0;
@ -360,22 +360,22 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
return result;
}
hsBool plJPEG::WriteToFile( const char *fileName, plMipmap *sourceData )
bool plJPEG::WriteToFile( const char *fileName, plMipmap *sourceData )
{
wchar_t* wFilename = hsStringToWString(fileName);
hsBool retVal = WriteToFile(wFilename, sourceData);
bool retVal = WriteToFile(wFilename, sourceData);
delete [] wFilename;
return retVal;
}
hsBool plJPEG::WriteToFile( const wchar_t *fileName, plMipmap *sourceData )
bool plJPEG::WriteToFile( const wchar_t *fileName, plMipmap *sourceData )
{
// we use a stream because the IJL can't handle unicode
hsRAMStream tempstream;
hsUNIXStream out;
if (!out.Open(fileName, L"wb"))
return false;
hsBool ret = IWrite(sourceData, &tempstream);
bool ret = IWrite(sourceData, &tempstream);
if (ret)
{
// The stream writer for JPEGs prepends a 32-bit size,

View File

@ -67,7 +67,7 @@ class plJPEG
// Pick one...
plMipmap *IRead( hsStream *inStream );
hsBool IWrite( plMipmap *source, hsStream *outStream );
bool IWrite( plMipmap *source, hsStream *outStream );
void ISwapRGBAComponents( uint32_t *data, uint32_t count );
@ -77,9 +77,9 @@ class plJPEG
plMipmap *ReadFromFile( const char *fileName );
plMipmap *ReadFromFile( const wchar_t *fileName );
hsBool WriteToStream( hsStream *outStream, plMipmap *sourceData ) { return IWrite( sourceData, outStream ); }
hsBool WriteToFile( const char *fileName, plMipmap *sourceData );
hsBool WriteToFile( const wchar_t *fileName, plMipmap *sourceData );
bool WriteToStream( hsStream *outStream, plMipmap *sourceData ) { return IWrite( sourceData, outStream ); }
bool WriteToFile( const char *fileName, plMipmap *sourceData );
bool WriteToFile( const wchar_t *fileName, plMipmap *sourceData );
// Range is 0 (worst) to 100 (best)
void SetWriteQuality( uint8_t q ) { fWriteQuality = q; }