12345678910111213141516171819202122232425262728293031323334353637383940 |
- #pragma once
- #include <Array.h>
- #include <InMemoryBuffer.h>
- #include <ReferenceCounter.h>
- #include <Trie.h>
- #include <Critical.h>
- #include <Punkt.h>
- class Dimension;
- class NetworkMessage;
- class Entity;
- class ChunkMap;
- class Chunk;
- class DimensionMap : public Framework::ReferenceCounter
- {
- private:
- Framework::RCTrie<ChunkMap>* chunks;
- Framework::Critical cs;
- Framework::Array<int> observers;
- int dimensionId;
- ChunkMap* load(Framework::Punkt chunkCenter);
- public:
- DimensionMap(int dimensionId);
- ~DimensionMap();
- void api(Framework::InMemoryBuffer* zRequest,
- NetworkMessage* zResponse,
- Entity* zSource,
- Dimension* zDimension);
- void loadMap(char* addr, int addrLen, Chunk* zChunk);
- void onMapUpdated(char* addr, int addrLen);
- void saveMap(char* addr, int addrLen);
- void removeMap(char* addr, int addrLen);
- ChunkMap* getMap(char* addr, int addrLen, Framework::Punkt chunkCenter);
- };
|