Merge remote-tracking branch 'froozen/master' into unix-compat

This commit is contained in:
Kayne Ruse
2014-10-19 05:17:45 +11:00
18 changed files with 80 additions and 7 deletions
+4
View File
@@ -49,7 +49,11 @@ void ClientApplication::Init(int argc, char* argv[]) {
//load the prerequisites
ConfigUtility& config = ConfigUtility::GetSingleton();
#ifdef __unix__
config.Load("rsc/config.cfg", argc, argv);
#else
config.Load("rsc\\config.cfg", argc, argv);
#endif
//-------------------------
//Initialize the APIs
+6 -1
View File
@@ -1,6 +1,11 @@
#config
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
LIBS+=client.a ../libcommon.a -lSDL_net -lSDLmain -lSDL -llua
ifeq ($(OS),Windows_NT )
LIBS+=-lwsock32 -liphlpapi -lmingw32
endif
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
#source
+1 -1
View File
@@ -29,7 +29,7 @@ $(OUTDIR):
mkdir $(OUTDIR)
$(OBJDIR)/%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(CXX) $(CXXFLAGS) -c -o $@ $< -llua
clean:
$(RM) *.o *.a *.exe
+4
View File
@@ -22,7 +22,11 @@
#ifndef REGIONAPI_HPP_
#define REGIONAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_REGION_NAME "Region"
LUAMOD_API int openRegionAPI(lua_State* L);
+4
View File
@@ -22,7 +22,11 @@
#ifndef REGIONPAGERAPI_HPP_
#define REGIONPAGERAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_REGION_PAGER_NAME "RegionPager"
LUAMOD_API int openRegionPagerAPI(lua_State* L);
+4
View File
@@ -24,7 +24,11 @@
#include "region_pager_base.hpp"
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#include <string>
+5
View File
@@ -22,7 +22,12 @@
#ifndef TILESHEETAPI_HPP_
#define TILESHEETAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_TILE_SHEET_NAME "TileSheet"
LUAMOD_API int openTileSheetAPI(lua_State* L);
+4
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <functional>
#include <map>
+5 -1
View File
@@ -21,7 +21,11 @@
*/
#include "character_manager.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <algorithm>
#include <stdexcept>
@@ -282,4 +286,4 @@ sqlite3* CharacterManager::SetDatabase(sqlite3* db) {
sqlite3* CharacterManager::GetDatabase() {
return database;
}
}
+4
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <functional>
#include <map>
+5 -1
View File
@@ -34,7 +34,11 @@
#define linit_c
#define LUA_LIB
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#include "region_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_pop(L, 1); //remove _PRELOAD table
}
}
+6 -1
View File
@@ -1,6 +1,11 @@
#config
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
LIBS+=server.a ../libcommon.a -lSDL_net -lSDLmain -lSDL -llua -lsqlite3
ifeq ($(OS),Windows_NT)
LIBS+=-lwsock32 -liphlpapi -lmingw32
endif
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
#source
+4
View File
@@ -22,7 +22,11 @@
#ifndef ROOMAPI_HPP_
#define ROOMAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_ROOM_NAME "Room"
LUAMOD_API int openRoomAPI(lua_State* L);
+5 -1
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
class RoomManager:
public Singleton<RoomManager>,
@@ -63,4 +67,4 @@ private:
int counter = 0;
};
#endif
#endif
+4
View File
@@ -22,7 +22,11 @@
#ifndef ROOMMANAGERAPI_HPP_
#define ROOMMANAGERAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_ROOM_MANAGER_NAME "RoomManager"
LUAMOD_API int openRoomManagerAPI(lua_State* L);
+6
View File
@@ -35,8 +35,14 @@
#include "singleton.hpp"
//APIs
#if __unix__
#include "lua.hpp"
#include "sqlite3.h"
#else
#include "lua/lua.hpp"
#include "sqlite3/sqlite3.h"
#endif
#include "SDL/SDL.h"
//STL
+5 -1
View File
@@ -40,7 +40,11 @@ void ServerApplication::Init(int argc, char* argv[]) {
std::cout << "Beginning " << argv[0] << std::endl;
//load the prerequisites
#ifdef __unix__
config.Load("rsc/config.cfg", argc, argv);
#else
config.Load("rsc\\config.cfg", argc, argv);
#endif
//-------------------------
//Initialize the APIs
@@ -260,4 +264,4 @@ void ServerApplication::HandlePacket(SerialPacket* const argPacket) {
}
break;
}
}
}
+4
View File
@@ -22,7 +22,11 @@
#ifndef SERVERUTILITY_HPP_
#define SERVERUTILITY_HPP_
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <string>