MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xUtil_crc_init

Function xUtil_crc_init

src/SB/Core/x/xutil.cpp:95–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95U32 xUtil_crc_init()
96{
97 S32 i, j;
98 U32 crc_accum;
99
100 if (g_crc_needinit)
101 {
102 for (i = 0; i < 256; i++)
103 {
104 crc_accum = (U32)i << 24;
105
106 for (j = 0; j < 8; j++)
107 {
108 if (crc_accum & (1 << 31))
109 {
110 crc_accum = (crc_accum << 1) ^ 0x04C11DB7;
111 }
112 else
113 {
114 crc_accum = (crc_accum << 1);
115 }
116 }
117
118 g_crc32_table[i] = crc_accum;
119 }
120
121 g_crc_needinit = 0;
122 }
123
124 return 0xFFFFFFFF;
125}
126
127U32 xUtil_crc_update(U32 crc_accum, char* data, S32 datasize)
128{

Callers 3

xUtilStartupFunction · 0.70
xUtil_crc_updateFunction · 0.70
xSGInitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected