#pragma once #include "CNProtocol.hpp" #include #include #include #include class Chunk { public: std::set players; std::set NPCs; }; namespace ChunkManager { void init(); void cleanup(); extern std::map, Chunk*> chunks; void addNPC(int posX, int posY, int32_t id); void addPlayer(int posX, int posY, CNSocket* sock); std::pair grabChunk(int posX, int posY); std::vector grabChunks(int chunkX, int chunkY); std::vector getDeltaChunks(std::vector from, std::vector to); }