Wrote the WaypointManager API skeleton
This commit is contained in:
@@ -21,6 +21,25 @@
|
||||
*/
|
||||
#include "waypoint_manager.hpp"
|
||||
|
||||
WaypointManager::WaypointManager() {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
WaypointManager::~WaypointManager() {
|
||||
UnloadAll();
|
||||
}
|
||||
|
||||
int WaypointManager::Create() {
|
||||
//implicitly creates the element
|
||||
WaypointData& waypointData = elementMap[counter];
|
||||
|
||||
//no real values set
|
||||
waypointData.origin = {0, 0};
|
||||
waypointData.bounds = {0, 0, 0, 0};
|
||||
|
||||
return counter++;
|
||||
}
|
||||
|
||||
int WaypointManager::Create(Vector2 origin, BoundingBox bounds) {
|
||||
//implicitly creates the element
|
||||
WaypointData& waypointData = elementMap[counter];
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
|
||||
class WaypointManager {
|
||||
public:
|
||||
WaypointManager() = default;
|
||||
~WaypointManager() = default;
|
||||
WaypointManager();
|
||||
~WaypointManager();
|
||||
|
||||
//common public methods
|
||||
int Create();
|
||||
int Create(Vector2 origin, BoundingBox bounds);
|
||||
void Unload(int uid);
|
||||
|
||||
|
||||
@@ -23,7 +23,27 @@
|
||||
|
||||
#include "waypoint_manager.hpp"
|
||||
|
||||
static int create(lua_State* L) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
static int unload(lua_State* L) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
static int getWaypoint(lua_State* L) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
static int getLoadedCount(lua_State* L) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
static const luaL_Reg waypointManagerLib[] = {
|
||||
{"Create",create},
|
||||
{"Unload",unload},
|
||||
{"GetWaypoint",getWaypoint},
|
||||
{"GetCount",getLoadedCount},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user