Rewrite planemap and idalloc in pure C++

This commit is contained in:
2021-01-06 15:10:21 -05:00
parent b03aada315
commit 78f8610eb8
18 changed files with 913 additions and 520 deletions

31
luprex/syscpp/world.hpp Normal file
View File

@@ -0,0 +1,31 @@
// Note about header file dependencies:
//
// world.hpp contains a lot of forward declarations.
// That's because it is at the bottom of the dependency stack:
// everyone includes world.hpp.
//
// However, world.cpp is at the top of the dependency stack,
// it includes everyone else.
//
#ifndef WORLD_HPP
#define WORLD_HPP
#include "luastack.hpp"
#include <memory>
class IdGlobalPool;
class World {
public:
int id_;
std::unique_ptr<IdGlobalPool> id_pool_;
World() : id_(0) {};
~World();
static void init(lua_State *L);
static World *fetch(lua_State *L);
};
#endif // WORLD_HPP