1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix formatting in TxCache.cpp

This commit is contained in:
Sergey Lipskiy 2019-11-04 19:49:09 +07:00
parent ad85856ee7
commit f3b83d2c8b

View File

@ -156,8 +156,7 @@ bool TxMemoryCache::add(Checksum checksum, GHQTexInfo *info, int dataSize)
if (compress2(dest, &destLen, info->data, dataSize, 1) != Z_OK) {
dest = info->data;
DBG_INFO(80, wst("Error: zlib compression failed!\n"));
}
else {
} else {
DBG_INFO(80, wst("zlib compressed: %.02fkb->%.02fkb\n"), (float)dataSize / 1000, (float)destLen / 1000);
dataSize = destLen;
format |= GL_TEXFMT_GZ;
@ -410,8 +409,7 @@ bool TxMemoryCache::load(const wchar_t *path, const wchar_t *filename, int confi
add(checksum, &tmpInfo, (tmpInfo.format & GL_TEXFMT_GZ) ? dataSize : 0);
free(tmpInfo.data);
}
else {
} else {
gzseek(gzfp, dataSize, SEEK_CUR);
}
@ -564,9 +562,9 @@ TxFileStorage::TxFileStorage(uint32 & options,
void TxFileStorage::buildFullPath()
{
char cbuf[MAX_PATH*2];
char cbuf[MAX_PATH * 2];
tx_wstring filename = _cachePath + OSAL_DIR_SEPARATOR_STR + _filename;
wcstombs(cbuf, filename.c_str(), MAX_PATH*2);
wcstombs(cbuf, filename.c_str(), MAX_PATH * 2);
_fullPath = cbuf;
}
@ -670,8 +668,7 @@ bool TxFileStorage::readData(GHQTexInfo & info)
info.data = _gzdest1;
info.format &= ~GL_TEXFMT_GZ;
DBG_INFO(80, wst("zlib decompressed: %.02gkb->%.02gkb\n"), dataSize / 1024.0, destLen / 1024.0);
}
else {
} else {
info.data = _gzdest0;
}
@ -713,8 +710,7 @@ bool TxFileStorage::add(Checksum checksum, GHQTexInfo *info, int dataSize)
if (compress2(dest, &destLen, info->data, dataSize, 1) != Z_OK) {
dest = info->data;
DBG_INFO(80, wst("Error: zlib compression failed!\n"));
}
else {
} else {
DBG_INFO(80, wst("zlib compressed: %.02fkb->%.02fkb\n"), dataSize / 1024.0, destLen / 1024.0);
dataSize = destLen;
format |= GL_TEXFMT_GZ;