the whole game

This commit is contained in:
Kolyah35
2026-03-02 22:04:18 +03:00
parent 816e9060b4
commit f0617a5d22
2069 changed files with 581500 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#ifndef NET_MINECRAFT_WORLD_LEVEL_STORAGE__RegionFile_H__
#define NET_MINECRAFT_WORLD_LEVEL_STORAGE__RegionFile_H__
#include <map>
#include <string>
#include "../../../raknet/BitStream.h"
typedef std::map<int, bool> FreeSectorMap;
class RegionFile
{
public:
RegionFile(const std::string& basePath);
virtual ~RegionFile();
bool open();
bool readChunk(int x, int z, RakNet::BitStream** destChunkData);
bool writeChunk(int x, int z, RakNet::BitStream& chunkData);
private:
bool write(int sector, RakNet::BitStream& chunkData);
void close();
FILE* file;
std::string filename;
int* offsets;
int* emptyChunk;
FreeSectorMap sectorFree;
};
#endif /*NET_MINECRAFT_WORLD_LEVEL_STORAGE__RegionFile_H__*/