mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-15 12:47:04 +00:00
0432011bd9
* Updated config file * Added missing files * Temporarily removed asm_processor changes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "96ffc1e62" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "96ffc1e62" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "179af7d11" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "179af7d11" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Cleanup and fixes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "50ad2fe78" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "50ad2fe78" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Makefile fix * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "b9120803e" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "b9120803e" git-subrepo: version: "0.4.3" origin: "???" commit: "???" Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
23 lines
No EOL
353 B
C
23 lines
No EOL
353 B
C
#pragma once
|
|
|
|
static uint32_t CRC32B(unsigned char* message, int32_t size)
|
|
{
|
|
int32_t byte, crc;
|
|
int32_t mask;
|
|
|
|
crc = 0xFFFFFFFF;
|
|
|
|
for (int32_t i = 0; i < size; i++)
|
|
{
|
|
byte = message[i];
|
|
crc = crc ^ byte;
|
|
|
|
for (int32_t j = 7; j >= 0; j--)
|
|
{
|
|
mask = -(crc & 1);
|
|
crc = (crc >> 1) ^ (0xEDB88320 & mask);
|
|
}
|
|
}
|
|
|
|
return ~(uint32_t)(crc);
|
|
} |