mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Code cleanup: fix idents in GLideNHQ/TxUtil
This commit is contained in:
parent
366c389d56
commit
f2ab6d9505
|
@ -492,25 +492,25 @@ TxUtil::getNumberofProcessors()
|
|||
int numcore = 1;
|
||||
try {
|
||||
#if defined (OS_WINDOWS)
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
numcore = sysinfo.dwNumberOfProcessors;
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
numcore = sysinfo.dwNumberOfProcessors;
|
||||
#elif defined (OS_MAC_OS_X)
|
||||
int nm[2];
|
||||
size_t len = 4;
|
||||
uint32_t count;
|
||||
int nm[2];
|
||||
size_t len = 4;
|
||||
uint32_t count;
|
||||
|
||||
nm[0] = CTL_HW; nm[1] = HW_AVAILCPU;
|
||||
sysctl(nm, 2, &count, &len, NULL, 0);
|
||||
|
||||
if (count < 1) {
|
||||
nm[1] = HW_NCPU;
|
||||
nm[0] = CTL_HW; nm[1] = HW_AVAILCPU;
|
||||
sysctl(nm, 2, &count, &len, NULL, 0);
|
||||
if (count < 1) { count = 1; }
|
||||
}
|
||||
numcore = count;
|
||||
|
||||
if (count < 1) {
|
||||
nm[1] = HW_NCPU;
|
||||
sysctl(nm, 2, &count, &len, NULL, 0);
|
||||
if (count < 1) { count = 1; }
|
||||
}
|
||||
numcore = count;
|
||||
#elif defined (OS_LINUX)
|
||||
numcore = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
numcore = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
} catch (...) {
|
||||
DBG_INFO(80, L"Error: number of processor detection failed!\n");
|
||||
|
|
|
@ -36,40 +36,40 @@
|
|||
class TxUtil
|
||||
{
|
||||
private:
|
||||
uint32 RiceCRC32(const uint8* src, int width, int height, int size, int rowStride);
|
||||
boolean RiceCRC32_CI4(const uint8* src, int width, int height, int rowStride,
|
||||
uint32* crc32, uint32* cimax);
|
||||
boolean RiceCRC32_CI8(const uint8* src, int width, int height, int rowStride,
|
||||
uint32* crc32, uint32* cimax);
|
||||
uint32 RiceCRC32(const uint8* src, int width, int height, int size, int rowStride);
|
||||
boolean RiceCRC32_CI4(const uint8* src, int width, int height, int rowStride,
|
||||
uint32* crc32, uint32* cimax);
|
||||
boolean RiceCRC32_CI8(const uint8* src, int width, int height, int rowStride,
|
||||
uint32* crc32, uint32* cimax);
|
||||
public:
|
||||
TxUtil() { }
|
||||
~TxUtil() { }
|
||||
int sizeofTx(int width, int height, uint16 format);
|
||||
uint32 checksumTx(uint8 *data, int width, int height, uint16 format);
|
||||
TxUtil() { }
|
||||
~TxUtil() { }
|
||||
int sizeofTx(int width, int height, uint16 format);
|
||||
uint32 checksumTx(uint8 *data, int width, int height, uint16 format);
|
||||
#if 0 /* unused */
|
||||
uint32 chkAlpha(uint32* src, int width, int height);
|
||||
uint32 chkAlpha(uint32* src, int width, int height);
|
||||
#endif
|
||||
uint32 checksum(uint8 *src, int width, int height, int size, int rowStride);
|
||||
uint64 checksum64(uint8 *src, int width, int height, int size, int rowStride, uint8 *palette);
|
||||
int getNumberofProcessors();
|
||||
uint32 checksum(uint8 *src, int width, int height, int size, int rowStride);
|
||||
uint64 checksum64(uint8 *src, int width, int height, int size, int rowStride, uint8 *palette);
|
||||
int getNumberofProcessors();
|
||||
};
|
||||
|
||||
class TxMemBuf
|
||||
{
|
||||
private:
|
||||
uint8 *_tex[2];
|
||||
uint32 _size[2];
|
||||
TxMemBuf();
|
||||
uint8 *_tex[2];
|
||||
uint32 _size[2];
|
||||
TxMemBuf();
|
||||
public:
|
||||
static TxMemBuf* getInstance() {
|
||||
static TxMemBuf txMemBuf;
|
||||
return &txMemBuf;
|
||||
}
|
||||
~TxMemBuf();
|
||||
boolean init(int maxwidth, int maxheight);
|
||||
void shutdown(void);
|
||||
uint8 *get(unsigned int num);
|
||||
uint32 size_of(unsigned int num);
|
||||
static TxMemBuf* getInstance() {
|
||||
static TxMemBuf txMemBuf;
|
||||
return &txMemBuf;
|
||||
}
|
||||
~TxMemBuf();
|
||||
boolean init(int maxwidth, int maxheight);
|
||||
void shutdown(void);
|
||||
uint8 *get(unsigned int num);
|
||||
uint32 size_of(unsigned int num);
|
||||
};
|
||||
|
||||
void setTextureFormat(uint16 internalFormat, GHQTexInfo * info);
|
||||
|
|
Loading…
Reference in New Issue
Block a user