Added mapType to BaseGenerator

This commit is contained in:
Kayne Ruse
2014-06-21 18:10:57 +10:00
parent 8afd0e7c8a
commit 3662a97475
13 changed files with 20 additions and 22 deletions
+7 -1
View File
@@ -22,6 +22,7 @@
#ifndef BASEGENERATOR_HPP_
#define BASEGENERATOR_HPP_
#include "map_type.hpp"
#include "chunk_data.hpp"
#include "lua/lua.hpp"
@@ -31,17 +32,22 @@ constexpr int MAP_HEIGHT = 256;
class BaseGenerator {
public:
BaseGenerator();
virtual ~BaseGenerator();
//accessors and mutators
virtual ChunkData* GetChunk(int x, int y) { return &chunks[x][y]; }
MapType GetMapType() { return mapType; }
lua_State* SetLuaState(lua_State* L) { return luaState = L; }
lua_State* GetLuaState() { return luaState; }
protected:
BaseGenerator() = delete;
BaseGenerator(MapType t);
ChunkData chunks[MAP_WIDTH][MAP_HEIGHT];
MapType mapType = MapType::NONE;
lua_State* luaState = nullptr;
};