Merge branch 'unix-compat' into develop
Conflicts: todo.txt
This commit is contained in:
@@ -49,7 +49,7 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
|||||||
|
|
||||||
//load the prerequisites
|
//load the prerequisites
|
||||||
ConfigUtility& config = ConfigUtility::GetSingleton();
|
ConfigUtility& config = ConfigUtility::GetSingleton();
|
||||||
config.Load("rsc\\config.cfg", argc, argv);
|
config.Load("rsc/config.cfg", argc, argv);
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//Initialize the APIs
|
//Initialize the APIs
|
||||||
|
|||||||
+11
-2
@@ -1,6 +1,15 @@
|
|||||||
#config
|
#include directories
|
||||||
INCLUDES+=. client_utilities renderable scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities
|
INCLUDES+=. client_utilities renderable scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities
|
||||||
LIBS+=client.a ../libcommon.a -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua
|
|
||||||
|
#libraries
|
||||||
|
#the order of the $(LIBS) is important, at least for MinGW
|
||||||
|
LIBS+=client.a ../libcommon.a -lSDL_net
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
LIBS+=-lwsock32 -liphlpapi -lmingw32
|
||||||
|
endif
|
||||||
|
LIBS+=-lSDLmain -lSDL
|
||||||
|
|
||||||
|
#flags
|
||||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||||
|
|
||||||
#source
|
#source
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
#ifndef REGIONAPI_HPP_
|
#ifndef REGIONAPI_HPP_
|
||||||
#define REGIONAPI_HPP_
|
#define REGIONAPI_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORTUGA_REGION_NAME "Region"
|
#define TORTUGA_REGION_NAME "Region"
|
||||||
LUAMOD_API int openRegionAPI(lua_State* L);
|
LUAMOD_API int openRegionAPI(lua_State* L);
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
#ifndef REGIONPAGERAPI_HPP_
|
#ifndef REGIONPAGERAPI_HPP_
|
||||||
#define REGIONPAGERAPI_HPP_
|
#define REGIONPAGERAPI_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORTUGA_REGION_PAGER_NAME "RegionPager"
|
#define TORTUGA_REGION_PAGER_NAME "RegionPager"
|
||||||
LUAMOD_API int openRegionPagerAPI(lua_State* L);
|
LUAMOD_API int openRegionPagerAPI(lua_State* L);
|
||||||
|
|||||||
@@ -24,7 +24,11 @@
|
|||||||
|
|
||||||
#include "region_pager_base.hpp"
|
#include "region_pager_base.hpp"
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,12 @@
|
|||||||
#ifndef TILESHEETAPI_HPP_
|
#ifndef TILESHEETAPI_HPP_
|
||||||
#define TILESHEETAPI_HPP_
|
#define TILESHEETAPI_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define TORTUGA_TILE_SHEET_NAME "TileSheet"
|
#define TORTUGA_TILE_SHEET_NAME "TileSheet"
|
||||||
LUAMOD_API int openTileSheetAPI(lua_State* L);
|
LUAMOD_API int openTileSheetAPI(lua_State* L);
|
||||||
|
|||||||
@@ -26,7 +26,11 @@
|
|||||||
#include "singleton.hpp"
|
#include "singleton.hpp"
|
||||||
#include "manager_interface.hpp"
|
#include "manager_interface.hpp"
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "sqlite3.h"
|
||||||
|
#else
|
||||||
#include "sqlite3/sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|||||||
@@ -21,7 +21,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "character_manager.hpp"
|
#include "character_manager.hpp"
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "sqlite3.h"
|
||||||
|
#else
|
||||||
#include "sqlite3/sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@@ -282,4 +286,4 @@ sqlite3* CharacterManager::SetDatabase(sqlite3* db) {
|
|||||||
|
|
||||||
sqlite3* CharacterManager::GetDatabase() {
|
sqlite3* CharacterManager::GetDatabase() {
|
||||||
return database;
|
return database;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,11 @@
|
|||||||
#include "singleton.hpp"
|
#include "singleton.hpp"
|
||||||
#include "manager_interface.hpp"
|
#include "manager_interface.hpp"
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "sqlite3.h"
|
||||||
|
#else
|
||||||
#include "sqlite3/sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|||||||
+5
-1
@@ -34,7 +34,11 @@
|
|||||||
#define linit_c
|
#define linit_c
|
||||||
#define LUA_LIB
|
#define LUA_LIB
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "region_api.hpp"
|
#include "region_api.hpp"
|
||||||
#include "region_pager_api.hpp"
|
#include "region_pager_api.hpp"
|
||||||
@@ -86,4 +90,4 @@ LUALIB_API void luaL_openlibs (lua_State *L) {
|
|||||||
lua_setfield(L, -2, lib->name);
|
lua_setfield(L, -2, lib->name);
|
||||||
}
|
}
|
||||||
lua_pop(L, 1); //remove _PRELOAD table
|
lua_pop(L, 1); //remove _PRELOAD table
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -1,6 +1,15 @@
|
|||||||
#config
|
#include directories
|
||||||
INCLUDES+=. accounts characters rooms server_utilities ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
INCLUDES+=. accounts characters rooms server_utilities ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
||||||
LIBS+=server.a ../libcommon.a -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua -lsqlite3
|
|
||||||
|
#libraries
|
||||||
|
#the order of the $(LIBS) is important, at least for MinGW
|
||||||
|
LIBS+=server.a ../libcommon.a -lSDL_net
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
LIBS+=-lwsock32 -liphlpapi -lmingw32
|
||||||
|
endif
|
||||||
|
LIBS+=-lSDLmain -lSDL -llua -lsqlite3
|
||||||
|
|
||||||
|
#flags
|
||||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||||
|
|
||||||
#source
|
#source
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
#ifndef ROOMAPI_HPP_
|
#ifndef ROOMAPI_HPP_
|
||||||
#define ROOMAPI_HPP_
|
#define ROOMAPI_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORTUGA_ROOM_NAME "Room"
|
#define TORTUGA_ROOM_NAME "Room"
|
||||||
LUAMOD_API int openRoomAPI(lua_State* L);
|
LUAMOD_API int openRoomAPI(lua_State* L);
|
||||||
|
|||||||
@@ -26,7 +26,11 @@
|
|||||||
#include "singleton.hpp"
|
#include "singleton.hpp"
|
||||||
#include "manager_interface.hpp"
|
#include "manager_interface.hpp"
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
class RoomManager:
|
class RoomManager:
|
||||||
public Singleton<RoomManager>,
|
public Singleton<RoomManager>,
|
||||||
@@ -63,4 +67,4 @@ private:
|
|||||||
int counter = 0;
|
int counter = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
#ifndef ROOMMANAGERAPI_HPP_
|
#ifndef ROOMMANAGERAPI_HPP_
|
||||||
#define ROOMMANAGERAPI_HPP_
|
#define ROOMMANAGERAPI_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORTUGA_ROOM_MANAGER_NAME "RoomManager"
|
#define TORTUGA_ROOM_MANAGER_NAME "RoomManager"
|
||||||
LUAMOD_API int openRoomManagerAPI(lua_State* L);
|
LUAMOD_API int openRoomManagerAPI(lua_State* L);
|
||||||
|
|||||||
@@ -35,8 +35,14 @@
|
|||||||
#include "singleton.hpp"
|
#include "singleton.hpp"
|
||||||
|
|
||||||
//APIs
|
//APIs
|
||||||
|
#if __unix__
|
||||||
|
#include "lua.hpp"
|
||||||
|
#include "sqlite3.h"
|
||||||
|
#else
|
||||||
#include "lua/lua.hpp"
|
#include "lua/lua.hpp"
|
||||||
#include "sqlite3/sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SDL/SDL.h"
|
#include "SDL/SDL.h"
|
||||||
|
|
||||||
//STL
|
//STL
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void ServerApplication::Init(int argc, char* argv[]) {
|
|||||||
std::cout << "Beginning " << argv[0] << std::endl;
|
std::cout << "Beginning " << argv[0] << std::endl;
|
||||||
|
|
||||||
//load the prerequisites
|
//load the prerequisites
|
||||||
config.Load("rsc\\config.cfg", argc, argv);
|
config.Load("rsc/config.cfg", argc, argv);
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//Initialize the APIs
|
//Initialize the APIs
|
||||||
@@ -260,4 +260,4 @@ void ServerApplication::HandlePacket(SerialPacket* const argPacket) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
#ifndef SERVERUTILITY_HPP_
|
#ifndef SERVERUTILITY_HPP_
|
||||||
#define SERVERUTILITY_HPP_
|
#define SERVERUTILITY_HPP_
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include "sqlite3.h"
|
||||||
|
#else
|
||||||
#include "sqlite3/sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user