diff --git a/gframe/config.h b/gframe/config.h index 11c983baa9..5a2e484ee6 100644 --- a/gframe/config.h +++ b/gframe/config.h @@ -16,6 +16,8 @@ #define myswprintf swprintf #endif +#define socklen_t int + #else //_WIN32 #include @@ -24,6 +26,7 @@ #include #include #include +#include #define SD_BOTH 2 #define SOCKET int diff --git a/gframe/deck_manager.cpp b/gframe/deck_manager.cpp index 1b5533335b..951de89d2d 100644 --- a/gframe/deck_manager.cpp +++ b/gframe/deck_manager.cpp @@ -176,7 +176,7 @@ bool DeckManager::LoadDeck(const wchar_t* file) { FILE* fp = _wfopen(deck, L"r"); #else char deckfn[256]; - DataManager::EncodeUTF8(deck, deckfn); + BufferIO::EncodeUTF8(deck, deckfn); FILE* fp = fopen(deckfn, "r"); #endif if(!fp) @@ -213,7 +213,7 @@ void DeckManager::SaveDeck(Deck& deck, const wchar_t* name) { FILE* fp = _wfopen(file, L"w"); #else char filefn[256]; - DataManager::EncodeUTF8(file, filefn); + BufferIO::EncodeUTF8(file, filefn); FILE* fp = fopen(filefn, "w"); #endif if(!fp) diff --git a/gframe/duelclient.cpp b/gframe/duelclient.cpp index 8529dad710..36ba6c646c 100644 --- a/gframe/duelclient.cpp +++ b/gframe/duelclient.cpp @@ -2845,7 +2845,7 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) { mainGame->btnLanRefresh->setEnabled(true); } else if(events & EV_READ) { sockaddr_in bc_addr; - int sz = sizeof(sockaddr_in); + socklen_t sz = sizeof(sockaddr_in); char buf[256]; int ret = recvfrom(fd, buf, 256, 0, (sockaddr*)&bc_addr, &sz); unsigned int ipaddr = bc_addr.sin_addr.s_addr; diff --git a/gframe/game.cpp b/gframe/game.cpp index 93cfa6e849..a6f519f1e9 100644 --- a/gframe/game.cpp +++ b/gframe/game.cpp @@ -651,8 +651,8 @@ void Game::RefreshReplay() { continue; wchar_t wname[256]; BufferIO::DecodeUTF8(dirp->d_name, wname); - if(lastReplay.CheckReplay(dirp->d_name)); - lstReplayList->addItem(wname); + if(Replay::CheckReplay(wname)) + lstReplayList->addItem(wname); } #endif } diff --git a/gframe/netserver.cpp b/gframe/netserver.cpp index 3bb21bcda3..d4577659be 100644 --- a/gframe/netserver.cpp +++ b/gframe/netserver.cpp @@ -78,7 +78,7 @@ void NetServer::StopListen() { } void NetServer::BroadcastEvent(evutil_socket_t fd, short events, void* arg) { sockaddr_in bc_addr; - int sz = sizeof(sockaddr_in); + socklen_t sz = sizeof(sockaddr_in); char buf[256]; int ret = recvfrom(fd, buf, 256, 0, (sockaddr*)&bc_addr, &sz); if(ret == -1) diff --git a/gframe/premake4.lua b/gframe/premake4.lua index a3aa8fe41b..8a85dbe020 100644 --- a/gframe/premake4.lua +++ b/gframe/premake4.lua @@ -6,13 +6,15 @@ project "gframe" files { "**.cpp", "**.cc", "**.c", "**.h" } excludes "lzma/**" includedirs { "../ocgcore" } - links { "ocgcore", "clzma", "irrlicht", "freetype", "sqlite3", "lua" , "event"} + links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event"} configuration "windows" links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" } configuration {"windows", "not vs*"} includedirs { "/mingw/include/irrlicht", "/mingw/include/freetype2" } configuration "not vs*" - buildoptions { "-std=gnu++0x" } + buildoptions { "-std=gnu++0x", "-fno-rtti" } configuration "not windows" - links { "gl", "dl" } + includedirs { "/usr/include/lua", "/usr/include/lua5.2", "/usr/include/lua/5.2", "/usr/include/irrlicht", "/usr/include/freetype2" } + excludes { "COSOperator.*" } + links { "event_pthreads", "GL", "dl", "pthread" } diff --git a/gframe/single_duel.h b/gframe/single_duel.h index 270f758738..4464f11d60 100644 --- a/gframe/single_duel.h +++ b/gframe/single_duel.h @@ -3,7 +3,7 @@ #include "config.h" #include "network.h" -#include "Replay.h" +#include "replay.h" namespace ygo { diff --git a/gframe/tag_duel.h b/gframe/tag_duel.h index 1af47308d5..f55427c575 100644 --- a/gframe/tag_duel.h +++ b/gframe/tag_duel.h @@ -3,7 +3,7 @@ #include "config.h" #include "network.h" -#include "Replay.h" +#include "replay.h" namespace ygo { diff --git a/lflist.conf b/lflist.conf index 08d24abc49..8c816f2111 100644 --- a/lflist.conf +++ b/lflist.conf @@ -1,4 +1,4 @@ -#[2012.3.1][2011.9.1] +#[2012.3.1][2011.9.1] !2012.3.1 #forbidden 20663556 0 --イレカエル diff --git a/ocgcore/interpreter.h b/ocgcore/interpreter.h index e92abf127a..302c9eafd9 100644 --- a/ocgcore/interpreter.h +++ b/ocgcore/interpreter.h @@ -14,9 +14,9 @@ extern "C" { #include #include #else -#include -#include -#include +#include +#include +#include #endif } #include "common.h" diff --git a/ocgcore/premake4.lua b/ocgcore/premake4.lua index 379240d003..7d3dbb7099 100644 --- a/ocgcore/premake4.lua +++ b/ocgcore/premake4.lua @@ -4,3 +4,5 @@ project "ocgcore" files { "**.cc", "**.cpp", "**.c", "**.h" } configuration "not vs*" buildoptions { "-std=gnu++0x" } + configuration "not windows" + includedirs { "/usr/include/lua", "/usr/include/lua5.2", "/usr/include/lua/5.2" }