Commit 968d5f19 authored by wind2009's avatar wind2009

Merge branch 'server' into server-develop

parents 94769ffb a1b8730a
version: '{build}' version: '{build}'
image: Visual Studio 2019 image: Visual Studio 2022
environment: environment:
matrix: matrix:
- SERVER_MODE: true - SERVER_MODE: true
...@@ -9,25 +9,25 @@ install: ...@@ -9,25 +9,25 @@ install:
- git submodule update --init --recursive - git submodule update --init --recursive
# environment and system dependency # environment and system dependency
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta3/premake-5.0.0-beta3-windows.zip ; exit 0"
- 7z x premake-5.0.0-beta2-windows.zip - 7z x premake-5.0.0-beta3-windows.zip
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz ; exit 0"
- tar xf libevent-2.0.22-stable.tar.gz - tar xf libevent-2.0.22-stable.tar.gz
- move libevent-2.0.22-stable event - move libevent-2.0.22-stable event
- xcopy /E event\WIN32-Code event\include - xcopy /E event\WIN32-Code event\include
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.4.tar.gz ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz ; exit 0"
- tar xf lua-5.4.4.tar.gz - tar xf lua-5.4.7.tar.gz
- move lua-5.4.4 lua - move lua-5.4.7 lua
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2022/sqlite-amalgamation-3390300.zip ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2024/sqlite-amalgamation-3470000.zip ; exit 0"
- 7z x sqlite-amalgamation-3390300.zip - 7z x sqlite-amalgamation-3470000.zip
- move sqlite-amalgamation-3390300 sqlite3 - move sqlite-amalgamation-3470000 sqlite3
before_build: before_build:
- xcopy /E premake\* . - xcopy /E premake\* .
- premake5 vs2019 - premake5 vs2022
configuration: Release configuration: Release
...@@ -54,7 +54,7 @@ for: ...@@ -54,7 +54,7 @@ for:
- patch -p1 < irrlicht.patch - patch -p1 < irrlicht.patch
- cd .. - cd ..
- premake5 vs2019 - premake5 vs2022
after_build: after_build:
- ps: move bin\release\AI.Server.exe . - ps: move bin\release\AI.Server.exe .
...@@ -64,8 +64,8 @@ for: ...@@ -64,8 +64,8 @@ for:
name: YGOPro server for YGOPro2 AI name: YGOPro server for YGOPro2 AI
cache: cache:
- premake-5.0.0-beta2-windows.zip - premake-5.0.0-beta3-windows.zip
- libevent-2.0.22-stable.tar.gz - libevent-2.0.22-stable.tar.gz
- irrlicht-1.8.5.zip - irrlicht-1.8.5.zip
- lua-5.4.4.tar.gz - lua-5.4.7.tar.gz
- sqlite-amalgamation-3390300.zip - sqlite-amalgamation-3470000.zip
...@@ -103,6 +103,7 @@ void Game::MainServerLoop() { ...@@ -103,6 +103,7 @@ void Game::MainServerLoop() {
} }
} }
#else //YGOPRO_SERVER_MODE #else //YGOPRO_SERVER_MODE
bool Game::Initialize() { bool Game::Initialize() {
LoadConfig(); LoadConfig();
irr::SIrrlichtCreationParameters params = irr::SIrrlichtCreationParameters(); irr::SIrrlichtCreationParameters params = irr::SIrrlichtCreationParameters();
...@@ -1217,7 +1218,7 @@ void Game::LoadExpansions() { ...@@ -1217,7 +1218,7 @@ void Game::LoadExpansions() {
FileSystem::TraversalDir(L"./cdb", [](const wchar_t* name, bool isdir) { FileSystem::TraversalDir(L"./cdb", [](const wchar_t* name, bool isdir) {
wchar_t fpath[1024]; wchar_t fpath[1024];
myswprintf(fpath, L"./cdb/%ls", name); myswprintf(fpath, L"./cdb/%ls", name);
if(!isdir && wcsrchr(name, '.') && !mywcsncasecmp(wcsrchr(name, '.'), L".cdb", 4)) { if(!isdir && IsExtension(name, L".cdb")) {
dataManager.LoadDB(fpath); dataManager.LoadDB(fpath);
} }
}); });
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#define YGOPRO_DEFAULT_DUEL_RULE 5 #define YGOPRO_DEFAULT_DUEL_RULE 5
#endif #endif
constexpr int DEFAULT_DUEL_RULE = YGOPRO_DEFAULT_DUEL_RULE; #define DEFAULT_DUEL_RULE YGOPRO_DEFAULT_DUEL_RULE
constexpr int CONFIG_LINE_SIZE = 1024; constexpr int CONFIG_LINE_SIZE = 1024;
namespace ygo { namespace ygo {
......
...@@ -37,7 +37,7 @@ index 43557cd..ffa06bc 100644 ...@@ -37,7 +37,7 @@ index 43557cd..ffa06bc 100644
} // end namespace core } // end namespace core
} // end namespace irr } // end namespace irr
diff --git a/include/irrTypes.h b/include/irrTypes.h diff --git a/include/irrTypes.h b/include/irrTypes.h
index 403f890..940e859 100644 index 403f890..bfa13f4 100644
--- a/include/irrTypes.h --- a/include/irrTypes.h
+++ b/include/irrTypes.h +++ b/include/irrTypes.h
@@ -48,6 +48,9 @@ typedef __int16 s16; @@ -48,6 +48,9 @@ typedef __int16 s16;
...@@ -50,6 +50,24 @@ index 403f890..940e859 100644 ...@@ -50,6 +50,24 @@ index 403f890..940e859 100644
//! 32 bit unsigned variable. //! 32 bit unsigned variable.
@@ -113,17 +116,6 @@ typedef double f64;
#include <wchar.h>
#ifdef _IRR_WINDOWS_API_
-//! Defines for s{w,n}printf because these methods do not match the ISO C
-//! standard on Windows platforms, but it does on all others.
-//! These should be int snprintf(char *str, size_t size, const char *format, ...);
-//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...);
-#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE)
-#define swprintf swprintf_s
-#define snprintf sprintf_s
-#elif !defined(__CYGWIN__)
-#define swprintf _snwprintf
-#define snprintf _snprintf
-#endif
// define the wchar_t type if not already built in.
#ifdef _MSC_VER
diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp
index 395fb69..cc6b75f 100644 index 395fb69..cc6b75f 100644
--- a/source/Irrlicht/CGUIEditBox.cpp --- a/source/Irrlicht/CGUIEditBox.cpp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment