1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Code cleanup: remove unused function textureCRC

This commit is contained in:
Sergey Lipskiy 2016-07-08 12:47:25 +06:00
parent 2bc803dd14
commit f48ab4828d
3 changed files with 2 additions and 26 deletions

View File

@ -1,4 +1,4 @@
#include "Types.h"
#include "CRC.h"
#define CRC32_POLYNOMIAL 0x04C11DB7
@ -58,25 +58,3 @@ u32 CRC_CalculatePalette(u32 crc, const void * buffer, u32 count )
return crc ^ orig;
}
u32 textureCRC(u8 * addr, u32 height, u32 stride)
{
const u32 width = stride / 8;
const u32 line = stride % 8;
u64 crc = 0;
u64 twopixel_crc;
u32 * pixelpos = (u32*)addr;
for (; height; height--) {
int col = 0;
for (u32 i = width; i; --i) {
twopixel_crc = i * ((u64)(pixelpos[1] & 0xFFFEFFFE) + (u64)(pixelpos[0] & 0xFFFEFFFE) + crc);
crc = (twopixel_crc >> 32) + twopixel_crc;
pixelpos += 2;
}
crc = (height * crc >> 32) + height * crc;
pixelpos = (u32*)((u8*)pixelpos + line);
}
return crc&0xFFFFFFFF;
}

View File

@ -5,5 +5,3 @@ void CRC_BuildTable();
// CRC32
u32 CRC_Calculate( u32 crc, const void *buffer, u32 count );
u32 CRC_CalculatePalette( u32 crc, const void *buffer, u32 count );
// Fast checksum calculation from Glide64
u32 textureCRC(u8 * addr, u32 height, u32 stride);

View File

@ -1,4 +1,4 @@
#include "Types.h"
#include "CRC.h"
void CRC_BuildTable()
{