Created the generator hierarchy
This commit is contained in:
@@ -22,31 +22,17 @@
|
||||
#ifndef OVERWORLDGENERATOR_HPP_
|
||||
#define OVERWORLDGENERATOR_HPP_
|
||||
|
||||
#include "chunk_data.hpp"
|
||||
|
||||
#include "lua/lua.hpp"
|
||||
#include "base_generator.hpp"
|
||||
|
||||
#define OVERWORLD_GENERATOR_PSEUDOINDEX "OverworldGenerator"
|
||||
|
||||
constexpr int OVERWORLD_WIDTH = 256;
|
||||
constexpr int OVERWORLD_HEIGHT = 256;
|
||||
|
||||
//TODO: SuperGenerator API
|
||||
//TODO: SuperGenerator DOCS
|
||||
class OverworldGenerator {
|
||||
class OverworldGenerator : public BaseGenerator {
|
||||
public:
|
||||
OverworldGenerator();
|
||||
~OverworldGenerator();
|
||||
|
||||
//accessors and mutators
|
||||
ChunkData* GetChunk(int x, int y) { return &chunks[x][y]; }
|
||||
|
||||
lua_State* SetLuaState(lua_State* L) { return luaState = L; }
|
||||
lua_State* GetLuaState() { return luaState; }
|
||||
|
||||
private:
|
||||
ChunkData chunks[OVERWORLD_WIDTH][OVERWORLD_HEIGHT];
|
||||
lua_State* luaState = nullptr;
|
||||
//
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user