mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-14 02:11:58 -04:00
game folder "just" compiles (not link)
This commit is contained in:
parent
13d3908273
commit
1b0f7fe0c2
135 changed files with 2161 additions and 2336 deletions
31
game/crc.c
Normal file
31
game/crc.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <stdio.h>
|
||||
#include <mem.h>
|
||||
|
||||
unsigned long l;
|
||||
|
||||
#define ZAKLAD_CRC 0xC005
|
||||
|
||||
char data[100000];
|
||||
long delka;
|
||||
FILE *f;
|
||||
|
||||
|
||||
main()
|
||||
{
|
||||
int i;
|
||||
f=fopen("CRC.C","rb");
|
||||
memset(data,0,sizeof(data));
|
||||
delka=fread(data,1,sizeof(data),f);
|
||||
fclose(f);
|
||||
memcpy(&l,data,2);i=0;
|
||||
l%=ZAKLAD_CRC;
|
||||
while(i<delka)
|
||||
{
|
||||
i+=2;
|
||||
l<<=16;
|
||||
memcpy(&l,data+i,2);
|
||||
l%=ZAKLAD_CRC;
|
||||
}
|
||||
printf("CRC: %x\n",l);
|
||||
}
|
||||
z
|
Loading…
Add table
Add a link
Reference in a new issue