123456789101112131415161718192021222324252627 |
- #ifndef BLOCKSTORAGE_H
- #define BLOCKSTORAGE_H
- #include "common/world/BlockMap.h"
- #include "gaming-core/memory/UniquePointer.h"
- #include "gaming-core/utils/List.h"
- #include <memory>
- class BlockStorage final {
- int size;
- int height;
- int sizeMask;
- List<UniquePointer<BlockMap>> maps;
- public:
- BlockStorage(int sizeBits, int heightBits);
- BlockId get(int x, int y, int z) const;
- void set(int x, int y, int z, BlockId id);
- int getSize() const;
- int getHeight() const;
- };
- #endif
|