From f3fb5017b368e5dbdee4746a2c00b184eef1bbb9 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Tue, 30 Dec 2014 02:45:35 +1100 Subject: [PATCH] Added waypoint API placeholder files --- server/waypoints/waypoint_api.cpp | 33 ++++++++++++++++++++++ server/waypoints/waypoint_api.hpp | 34 +++++++++++++++++++++++ server/waypoints/waypoint_manager_api.cpp | 33 ++++++++++++++++++++++ server/waypoints/waypoint_manager_api.hpp | 34 +++++++++++++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 server/waypoints/waypoint_api.cpp create mode 100644 server/waypoints/waypoint_api.hpp create mode 100644 server/waypoints/waypoint_manager_api.cpp create mode 100644 server/waypoints/waypoint_manager_api.hpp diff --git a/server/waypoints/waypoint_api.cpp b/server/waypoints/waypoint_api.cpp new file mode 100644 index 0000000..0092d3d --- /dev/null +++ b/server/waypoints/waypoint_api.cpp @@ -0,0 +1,33 @@ +/* Copyright: (c) Kayne Ruse 2013-2015 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#include "waypoint_api.hpp" + +#include "waypoint_data.hpp" + +static const luaL_Reg waypointLib[] = { + {nullptr, nullptr} +}; + +LUAMOD_API int openWaypointAPI(lua_State* L) { + luaL_newlib(L, waypointLib); + return 1; +} \ No newline at end of file diff --git a/server/waypoints/waypoint_api.hpp b/server/waypoints/waypoint_api.hpp new file mode 100644 index 0000000..a3c49b9 --- /dev/null +++ b/server/waypoints/waypoint_api.hpp @@ -0,0 +1,34 @@ +/* Copyright: (c) Kayne Ruse 2013-2015 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#ifndef WAYPOINTAPI_HPP_ +#define WAYPOINTAPI_HPP_ + +#if defined(__MINGW32__) + #include "lua/lua.hpp" +#else + #include "lua.hpp" +#endif + +#define TORTUGA_WAYPOINT_API "waypoint" +LUAMOD_API int openWaypointAPI(lua_State* L); + +#endif \ No newline at end of file diff --git a/server/waypoints/waypoint_manager_api.cpp b/server/waypoints/waypoint_manager_api.cpp new file mode 100644 index 0000000..c99782a --- /dev/null +++ b/server/waypoints/waypoint_manager_api.cpp @@ -0,0 +1,33 @@ +/* Copyright: (c) Kayne Ruse 2013-2015 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#include "waypoint_manager_api.hpp" + +#include "waypoint_manager.hpp" + +static const luaL_Reg waypointManagerLib[] = { + {nullptr, nullptr} +}; + +LUAMOD_API int openWaypointManagerAPI(lua_State* L) { + luaL_newlib(L, waypointManagerLib); + return 1; +} \ No newline at end of file diff --git a/server/waypoints/waypoint_manager_api.hpp b/server/waypoints/waypoint_manager_api.hpp new file mode 100644 index 0000000..f716ab4 --- /dev/null +++ b/server/waypoints/waypoint_manager_api.hpp @@ -0,0 +1,34 @@ +/* Copyright: (c) Kayne Ruse 2013-2015 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#ifndef WAYPOINTMANAGERAPI_HPP_ +#define WAYPOINTMANAGERAPI_HPP_ + +#if defined(__MINGW32__) + #include "lua/lua.hpp" +#else + #include "lua.hpp" +#endif + +#define TORTUGA_WAYPOINT_MANAGER_API "waypoint_manager" +LUAMOD_API int openWaypointManagerAPI(lua_State* L); + +#endif \ No newline at end of file