forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
15
project/lib_projects/raknet/jni/RaknetSources/IncrementalReadInterface.cpp
Executable file
15
project/lib_projects/raknet/jni/RaknetSources/IncrementalReadInterface.cpp
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#include "IncrementalReadInterface.h"
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace RakNet;
|
||||
|
||||
unsigned int IncrementalReadInterface::GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context)
|
||||
{
|
||||
FILE *fp = fopen(filename, "rb");
|
||||
if (fp==0)
|
||||
return 0;
|
||||
fseek(fp,startReadBytes,SEEK_SET);
|
||||
unsigned int numRead = (unsigned int) fread(preallocatedDestination,1,numBytesToRead, fp);
|
||||
fclose(fp);
|
||||
return numRead;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue