Commit 339c1780 authored by nanahira's avatar nanahira

Merge branch 'server' into side5

parents 5dd397f6 8754ec99
...@@ -2,18 +2,23 @@ ...@@ -2,18 +2,23 @@
set -x set -x
set -o errexit set -o errexit
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_ARCH TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht
git submodule update --init ./premake5 gmake --cc=clang --build-freetype --build-sqlite
./premake5 gmake --cc=clang
cd build cd build
make config=release -j4 make config=release -j4
cd .. cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
mv bin/release/ygopro.app $TARGET_YGOPRO_BINARY_PATH mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH
if [[ $TARGET_PLATFORM == "x86" ]]; then
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
fi
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
strip $TARGET_YGOPRO_BINARY_PATH strip $TARGET_YGOPRO_BINARY_PATH
...@@ -9,7 +9,6 @@ ARCHIVE_FILES=(ygopro LICENSE README.md lib lflist.conf strings.conf system.conf ...@@ -9,7 +9,6 @@ ARCHIVE_FILES=(ygopro LICENSE README.md lib lflist.conf strings.conf system.conf
TARGET_PLATFORM=linux TARGET_PLATFORM=linux
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay mkdir dist replay
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}" tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
...@@ -9,7 +9,6 @@ ARCHIVE_FILES=(ygopro.app LICENSE README.md lflist.conf strings.conf system.conf ...@@ -9,7 +9,6 @@ ARCHIVE_FILES=(ygopro.app LICENSE README.md lflist.conf strings.conf system.conf
TARGET_PLATFORM=darwin TARGET_PLATFORM=darwin
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay mkdir dist replay
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}" tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
...@@ -12,7 +12,6 @@ fi ...@@ -12,7 +12,6 @@ fi
TARGET_PLATFORM=win32 TARGET_PLATFORM=win32
apt update && apt -y install p7zip-full git apt update && apt -y install p7zip-full git
git submodule update --init
mkdir dist replay mkdir dist replay
7z a -mx9 -xr!.git* dist/KoishiPro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.7z "${ARCHIVE_FILES[@]}" 7z a -mx9 -xr!.git* dist/KoishiPro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.7z "${ARCHIVE_FILES[@]}"
...@@ -13,7 +13,6 @@ fi ...@@ -13,7 +13,6 @@ fi
TARGET_PLATFORM=win32 TARGET_PLATFORM=win32
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay mkdir dist replay
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}" tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
...@@ -14,14 +14,14 @@ mat_common: ...@@ -14,14 +14,14 @@ mat_common:
- linux - linux
script: script:
# lua # lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.5.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.6.tar.gz | tar zfx -
- mv lua-5.3.5/src lua - mv lua-5.3.6 lua
# sqlite3 # sqlite3
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx -
- mv sqlite-autoconf-3360000 sqlite3 - mv sqlite-autoconf-3360000 sqlite3
# freetype # freetype
#- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.4.tar.gz | tar zfx - #- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
#- mv freetype-2.10.4 freetype #- mv freetype-2.11.1 freetype
# premake # premake
- cp -rf premake/* .; - cp -rf premake/* .;
artifacts: artifacts:
...@@ -30,14 +30,24 @@ mat_common: ...@@ -30,14 +30,24 @@ mat_common:
#- freetype #- freetype
- sqlite3 - sqlite3
mat_submodules:
stage: prepare
tags:
- linux
script: git submodule update --init
artifacts:
paths:
- ocgcore
- script
mat_linux: mat_linux:
stage: prepare stage: prepare
tags: tags:
- linux - linux
script: script:
- apt update; apt -y install git wget tar - apt update; apt -y install git wget tar
# - git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht #- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
- env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh - env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts: artifacts:
paths: paths:
...@@ -52,11 +62,13 @@ mat_windows: ...@@ -52,11 +62,13 @@ mat_windows:
script: script:
- apt update; apt -y install wget tar patch p7zip-full - apt update; apt -y install wget tar patch p7zip-full
# premake5.exe # premake5.exe
- wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-windows.zip - wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-windows.zip
- 7z x -y premake-5.0.0-alpha14-windows.zip - 7z x -y premake-5.0.0-beta1-windows.zip
# event # event
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- mv libevent-2.0.22-stable event ; cp -rf event/WIN32-Code/* event/include - mv libevent-2.0.22-stable event
# irrlicht
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
artifacts: artifacts:
paths: paths:
- premake5.exe - premake5.exe
...@@ -64,6 +76,8 @@ mat_windows: ...@@ -64,6 +76,8 @@ mat_windows:
._exec_build: ._exec_build:
stage: build stage: build
variables:
YGOPRO_NO_LUA_SAFE: '1' # on client no lua safe
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths: paths:
...@@ -77,14 +91,11 @@ exec_windows: ...@@ -77,14 +91,11 @@ exec_windows:
dependencies: dependencies:
- mat_common - mat_common
- mat_windows - mat_windows
#variables: - mat_submodules
# irrklang_pro: '1'
# USE_IRRKLANG: "1"
script: script:
- git submodule update --init
- bash -c 'cp -rf premake/* .' - bash -c 'cp -rf premake/* .'
- '.\premake5.exe vs2019' - '.\premake5.exe vs2019'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ygo.sln /m /p:Configuration=Release' - cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release'
- copy bin\release\ygopro.exe . - copy bin\release\ygopro.exe .
artifacts: artifacts:
paths: paths:
...@@ -94,21 +105,37 @@ exec_linux: ...@@ -94,21 +105,37 @@ exec_linux:
extends: ._exec_build extends: ._exec_build
tags: tags:
- linux - linux
variables:
YGOPRO_BUILD_ALL: '1'
#USE_IRRKLANG: "1"
dependencies: dependencies:
- mat_common - mat_common
#- mat_irrklang
- mat_linux - mat_linux
- mat_submodules
script: script:
- apt update; apt -y install git build-essential - apt update; apt -y install git build-essential
- git submodule update --init - ./premake5 gmake --build-sqlite
- env YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable ./premake5 gmake - cd build
- make config=release -j$(nproc)
- cd ..
- mv bin/release/ygopro ./ygopro
- strip ygopro
artifacts:
paths:
- ygopro
exec_debian:
extends: ._exec_build
tags:
- linux
dependencies:
- mat_common
- mat_linux
- mat_submodules
script:
- apt update; apt -y install git build-essential liblua5.3-dev libsqlite3-dev libevent-dev
- ./premake5 gmake --lua-deb
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
- mv bin/release/ygopro . - mv bin/release/ygopro ./ygopro
- strip ygopro - strip ygopro
artifacts: artifacts:
paths: paths:
......
...@@ -22,8 +22,8 @@ before_install: ...@@ -22,8 +22,8 @@ before_install:
#- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc #- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
#- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++ #- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++
#- g++ --version #- g++ --version
- wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-linux.tar.gz | tar zfx - - wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
#- wget -O - https://www.lua.org/ftp/lua-5.3.5.tar.gz | tar zfx -; cd lua-5.3.5; sudo make linux install; cd .. #- wget -O - https://www.lua.org/ftp/lua-5.3.6.tar.gz | tar zfx -; cd lua-5.3.6; sudo make linux install; cd ..
script: script:
- ./premake5 gmake - ./premake5 gmake
- cd build - cd build
......
...@@ -24,6 +24,20 @@ ...@@ -24,6 +24,20 @@
* sqlite3 * sqlite3
* 可参考本项目 [appveyor.yml](https://github.com/mycard/ygopro/blob/server/appveyor.yml) 中的脚本 * 可参考本项目 [appveyor.yml](https://github.com/mycard/ygopro/blob/server/appveyor.yml) 中的脚本
### MacOS下编译
* 需要以下组件或工具
* clang
* premake5
* libevent
* lua5.3
* sqlite3
* 参考步骤
* 安装libevent sqlite3
* 编译premake5
* wget https://www.lua.org/ftp/lua-5.4.3.tar.gz && tar xf lua-5.4.3.tar.gz && mv lua-5.4.3 lua && cp premake/lua/* lua/
* ./premake5 gmake --cc=clang
* cd build && make config=release
### 运行 ### 运行
* 使用[ygopro-server](https://github.com/mycard/ygopro-server)运行 * 使用[ygopro-server](https://github.com/mycard/ygopro-server)运行
* 手动运行的参数是 * 手动运行的参数是
......
...@@ -7,17 +7,22 @@ install: ...@@ -7,17 +7,22 @@ install:
- git submodule update --init --recursive - git submodule update --init --recursive
# environment and system dependency # environment and system dependency
<<<<<<< HEAD
- 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-alpha14/premake-5.0.0-alpha14-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-alpha14/premake-5.0.0-alpha14-windows.zip ; exit 0"
- 7z x -y premake-5.0.0-alpha14-windows.zip - 7z x -y premake-5.0.0-alpha14-windows.zip
=======
- 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-beta1/premake-5.0.0-beta1-windows.zip ; exit 0"
- 7z x premake-5.0.0-beta1-windows.zip
>>>>>>> 57ec431355b6eada0eeb74f1a54f0c1e83fa1ba5
- 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.3.5.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.3.6.tar.gz ; exit 0"
- tar xf lua-5.3.5.tar.gz - tar xf lua-5.3.6.tar.gz
- move lua-5.3.5\src lua - move lua-5.3.6\src lua
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2020/sqlite-amalgamation-3310100.zip ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2020/sqlite-amalgamation-3310100.zip ; exit 0"
- 7z x -y sqlite-amalgamation-3310100.zip - 7z x -y sqlite-amalgamation-3310100.zip
...@@ -89,9 +94,13 @@ deploy: ...@@ -89,9 +94,13 @@ deploy:
branch: server branch: server
cache: cache:
- premake-5.0.0-alpha14-windows.zip - premake-5.0.0-beta1-windows.zip
- libevent-2.0.22-stable.tar.gz - libevent-2.0.22-stable.tar.gz
<<<<<<< HEAD
- freetype-2.10.1.tar.gz - freetype-2.10.1.tar.gz
- lua-5.3.5.tar.gz - lua-5.3.5.tar.gz
- irrlicht-1.8.4.zip - irrlicht-1.8.4.zip
=======
- lua-5.3.6.tar.gz
>>>>>>> 57ec431355b6eada0eeb74f1a54f0c1e83fa1ba5
- sqlite-amalgamation-3310100.zip - sqlite-amalgamation-3310100.zip
...@@ -1766,7 +1766,7 @@ bool DeckBuilder::push_main(code_pointer pointer, int seq) { ...@@ -1766,7 +1766,7 @@ bool DeckBuilder::push_main(code_pointer pointer, int seq) {
if(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) if(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK))
return false; return false;
auto& container = deckManager.current_deck.main; auto& container = deckManager.current_deck.main;
int maxc = mainGame->is_siding ? 64 : 60; int maxc = mainGame->is_siding ? YGOPRO_MAX_DECK + 5 : YGOPRO_MAX_DECK;
if((int)container.size() >= maxc) if((int)container.size() >= maxc)
return false; return false;
if(seq >= 0 && seq < (int)container.size()) if(seq >= 0 && seq < (int)container.size())
...@@ -1781,7 +1781,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) { ...@@ -1781,7 +1781,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) {
if(!(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK))) if(!(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)))
return false; return false;
auto& container = deckManager.current_deck.extra; auto& container = deckManager.current_deck.extra;
int maxc = mainGame->is_siding ? 20 : 15; int maxc = mainGame->is_siding ? YGOPRO_MAX_EXTRA + 5 : YGOPRO_MAX_EXTRA;
if((int)container.size() >= maxc) if((int)container.size() >= maxc)
return false; return false;
if(seq >= 0 && seq < (int)container.size()) if(seq >= 0 && seq < (int)container.size())
...@@ -1794,7 +1794,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) { ...@@ -1794,7 +1794,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) {
} }
bool DeckBuilder::push_side(code_pointer pointer, int seq) { bool DeckBuilder::push_side(code_pointer pointer, int seq) {
auto& container = deckManager.current_deck.side; auto& container = deckManager.current_deck.side;
int maxc = mainGame->is_siding ? 20 : 15; int maxc = mainGame->is_siding ? YGOPRO_MAX_SIDE + 5 : YGOPRO_MAX_SIDE;
if((int)container.size() >= maxc) if((int)container.size() >= maxc)
return false; return false;
if(seq >= 0 && seq < (int)container.size()) if(seq >= 0 && seq < (int)container.size())
......
...@@ -89,21 +89,12 @@ int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) { ...@@ -89,21 +89,12 @@ int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) {
if(!list) if(!list)
return 0; return 0;
int dc = 0; int dc = 0;
#ifdef YGOPRO_SERVER_MODE if(deck.main.size() < YGOPRO_MIN_DECK || deck.main.size() > YGOPRO_MAX_DECK)
if(deck.main.size() < DECKCOUNT_MAIN_MIN || deck.main.size() > DECKCOUNT_MAIN_MAX)
return (DECKERROR_MAINCOUNT << 28) + deck.main.size(); return (DECKERROR_MAINCOUNT << 28) + deck.main.size();
if(deck.extra.size() > DECKCOUNT_EXTRA) if(deck.extra.size() > YGOPRO_MAX_EXTRA)
return (DECKERROR_EXTRACOUNT << 28) + deck.extra.size(); return (DECKERROR_EXTRACOUNT << 28) + deck.extra.size();
if(deck.side.size() > DECKCOUNT_SIDE) if(deck.side.size() > YGOPRO_MAX_SIDE)
return (DECKERROR_SIDECOUNT << 28) + deck.side.size(); return (DECKERROR_SIDECOUNT << 28) + deck.side.size();
#else
if(deck.main.size() < 40 || deck.main.size() > 60)
return (DECKERROR_MAINCOUNT << 28) + deck.main.size();
if(deck.extra.size() > 15)
return (DECKERROR_EXTRACOUNT << 28) + deck.extra.size();
if(deck.side.size() > 15)
return (DECKERROR_SIDECOUNT << 28) + deck.side.size();
#endif
const int rule_map[6] = { AVAIL_OCG, AVAIL_TCG, AVAIL_SC, AVAIL_CUSTOM, AVAIL_OCGTCG, 0 }; const int rule_map[6] = { AVAIL_OCG, AVAIL_TCG, AVAIL_SC, AVAIL_CUSTOM, AVAIL_OCGTCG, 0 };
int avail = rule_map[rule]; int avail = rule_map[rule];
for(size_t i = 0; i < deck.main.size(); ++i) { for(size_t i = 0; i < deck.main.size(); ++i) {
...@@ -179,22 +170,10 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -179,22 +170,10 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
if(cd.type & TYPE_TOKEN) if(cd.type & TYPE_TOKEN)
continue; continue;
else if(cd.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) { else if(cd.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) {
if( if(deck.extra.size() >= YGOPRO_MAX_EXTRA)
#ifdef YGOPRO_SERVER_MODE
deck.extra.size() >= DECKCOUNT_EXTRA
#else
deck.extra.size() >= 15
#endif
)
continue; continue;
deck.extra.push_back(dataManager.GetCodePointer(code)); //verified by GetData() deck.extra.push_back(dataManager.GetCodePointer(code)); //verified by GetData()
} else } else if(deck.main.size() < YGOPRO_MAX_DECK) {
#ifdef YGOPRO_SERVER_MODE
if(deck.main.size() < DECKCOUNT_MAIN_MAX)
#else
if(deck.main.size() < 60)
#endif
{
deck.main.push_back(dataManager.GetCodePointer(code)); deck.main.push_back(dataManager.GetCodePointer(code));
} }
} }
...@@ -206,11 +185,7 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -206,11 +185,7 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
} }
if(cd.type & TYPE_TOKEN) if(cd.type & TYPE_TOKEN)
continue; continue;
#ifdef YGOPRO_SERVER_MODE if(deck.side.size() < YGOPRO_MAX_SIDE)
if(deck.side.size() < DECKCOUNT_SIDE)
#else
if(deck.side.size() < 15)
#endif
deck.side.push_back(dataManager.GetCodePointer(code)); //verified by GetData() deck.side.push_back(dataManager.GetCodePointer(code)); //verified by GetData()
} }
return errorcode; return errorcode;
...@@ -226,7 +201,7 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -226,7 +201,7 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
pcount[deck.side[i]->first]++; pcount[deck.side[i]->first]++;
Deck ndeck; Deck ndeck;
LoadDeck(ndeck, dbuf, mainc, sidec); LoadDeck(ndeck, dbuf, mainc, sidec);
#ifndef NO_SIDE_CHECK #ifndef YGOPRO_NO_SIDE_CHECK
if(ndeck.main.size() != deck.main.size() || ndeck.extra.size() != deck.extra.size()) if(ndeck.main.size() != deck.main.size() || ndeck.extra.size() != deck.extra.size())
return false; return false;
#endif #endif
...@@ -236,7 +211,7 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -236,7 +211,7 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
ncount[ndeck.extra[i]->first]++; ncount[ndeck.extra[i]->first]++;
for(size_t i = 0; i < ndeck.side.size(); ++i) for(size_t i = 0; i < ndeck.side.size(); ++i)
ncount[ndeck.side[i]->first]++; ncount[ndeck.side[i]->first]++;
#ifndef NO_SIDE_CHECK #ifndef YGOPRO_NO_SIDE_CHECK
for(auto cdit = ncount.begin(); cdit != ncount.end(); ++cdit) for(auto cdit = ncount.begin(); cdit != ncount.end(); ++cdit)
if(cdit->second != pcount[cdit->first]) if(cdit->second != pcount[cdit->first])
return false; return false;
......
...@@ -539,7 +539,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -539,7 +539,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
str.append(msgbuf); str.append(msgbuf);
myswprintf(msgbuf, L"%ls%d\n", dataManager.GetSysString(1233), pkt->info.draw_count); myswprintf(msgbuf, L"%ls%d\n", dataManager.GetSysString(1233), pkt->info.draw_count);
str.append(msgbuf); str.append(msgbuf);
if(pkt->info.duel_rule != DEFAULT_DUEL_RULE) { if(pkt->info.duel_rule != YGOPRO_DEFAULT_DUEL_RULE) {
myswprintf(msgbuf, L"*%ls\n", dataManager.GetSysString(1260 + pkt->info.duel_rule - 1)); myswprintf(msgbuf, L"*%ls\n", dataManager.GetSysString(1260 + pkt->info.duel_rule - 1));
str.append(msgbuf); str.append(msgbuf);
} }
...@@ -4326,7 +4326,7 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) { ...@@ -4326,7 +4326,7 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) {
hoststr.append(L"]["); hoststr.append(L"][");
if(pHP->host.draw_count == 1 && pHP->host.start_hand == 5 && pHP->host.start_lp == 8000 if(pHP->host.draw_count == 1 && pHP->host.start_hand == 5 && pHP->host.start_lp == 8000
&& !pHP->host.no_check_deck && !pHP->host.no_shuffle_deck && !pHP->host.no_check_deck && !pHP->host.no_shuffle_deck
&& pHP->host.duel_rule == DEFAULT_DUEL_RULE) && pHP->host.duel_rule == YGOPRO_DEFAULT_DUEL_RULE)
hoststr.append(dataManager.GetSysString(1247)); hoststr.append(dataManager.GetSysString(1247));
else hoststr.append(dataManager.GetSysString(1248)); else hoststr.append(dataManager.GetSysString(1248));
hoststr.append(L"]"); hoststr.append(L"]");
......
...@@ -1448,7 +1448,7 @@ bool Game::LoadConfigFromFile(const char* file) { ...@@ -1448,7 +1448,7 @@ bool Game::LoadConfigFromFile(const char* file) {
} else if(!strcmp(strbuf, "default_rule")) { } else if(!strcmp(strbuf, "default_rule")) {
gameConf.default_rule = atoi(valbuf); gameConf.default_rule = atoi(valbuf);
if(gameConf.default_rule <= 0) if(gameConf.default_rule <= 0)
gameConf.default_rule = DEFAULT_DUEL_RULE; gameConf.default_rule = YGOPRO_DEFAULT_DUEL_RULE;
} else if(!strcmp(strbuf, "hide_setname")) { } else if(!strcmp(strbuf, "hide_setname")) {
gameConf.hide_setname = atoi(valbuf); gameConf.hide_setname = atoi(valbuf);
} else if(!strcmp(strbuf, "hide_hint_button")) { } else if(!strcmp(strbuf, "hide_hint_button")) {
...@@ -1557,7 +1557,7 @@ void Game::LoadConfig() { ...@@ -1557,7 +1557,7 @@ void Game::LoadConfig() {
gameConf.chkIgnore2 = 0; gameConf.chkIgnore2 = 0;
gameConf.use_lflist = 1; gameConf.use_lflist = 1;
gameConf.default_lflist = 0; gameConf.default_lflist = 0;
gameConf.default_rule = DEFAULT_DUEL_RULE; gameConf.default_rule = YGOPRO_DEFAULT_DUEL_RULE;
gameConf.hide_setname = 0; gameConf.hide_setname = 0;
gameConf.hide_hint_button = 0; gameConf.hide_hint_button = 0;
gameConf.control_mode = 0; gameConf.control_mode = 0;
...@@ -1691,7 +1691,7 @@ void Game::SaveConfig() { ...@@ -1691,7 +1691,7 @@ void Game::SaveConfig() {
fprintf(fp, "mute_spectators = %d\n", (chkIgnore2->isChecked() ? 1 : 0)); fprintf(fp, "mute_spectators = %d\n", (chkIgnore2->isChecked() ? 1 : 0));
fprintf(fp, "use_lflist = %d\n", gameConf.use_lflist); fprintf(fp, "use_lflist = %d\n", gameConf.use_lflist);
fprintf(fp, "default_lflist = %d\n", gameConf.default_lflist); fprintf(fp, "default_lflist = %d\n", gameConf.default_lflist);
fprintf(fp, "default_rule = %d\n", gameConf.default_rule == DEFAULT_DUEL_RULE ? 0 : gameConf.default_rule); fprintf(fp, "default_rule = %d\n", gameConf.default_rule == YGOPRO_DEFAULT_DUEL_RULE ? 0 : gameConf.default_rule);
fprintf(fp, "hide_setname = %d\n", gameConf.hide_setname); fprintf(fp, "hide_setname = %d\n", gameConf.hide_setname);
fprintf(fp, "hide_hint_button = %d\n", gameConf.hide_hint_button); fprintf(fp, "hide_hint_button = %d\n", gameConf.hide_hint_button);
fprintf(fp, "#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons\n"); fprintf(fp, "#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons\n");
...@@ -1743,7 +1743,6 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1743,7 +1743,6 @@ void Game::ShowCardInfo(int code, bool resize) {
if(!dataManager.GetData(code, &cd)) if(!dataManager.GetData(code, &cd))
memset(&cd, 0, sizeof(CardData)); memset(&cd, 0, sizeof(CardData));
imgCard->setImage(imageManager.GetTexture(code, true)); imgCard->setImage(imageManager.GetTexture(code, true));
imgCard->setScaleImage(true);
if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET)) if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET))
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias); myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
...@@ -1976,9 +1975,7 @@ void Game::initUtils() { ...@@ -1976,9 +1975,7 @@ void Game::initUtils() {
#ifndef YGOPRO_SERVER_MODE #ifndef YGOPRO_SERVER_MODE
void Game::ClearTextures() { void Game::ClearTextures() {
matManager.mCard.setTexture(0, 0); matManager.mCard.setTexture(0, 0);
imgCard->setImage(imageManager.tCover[0]); ClearCardInfo(0);
scrCardText->setVisible(false);
imgCard->setScaleImage(true);
btnPSAU->setImage(); btnPSAU->setImage();
btnPSDU->setImage(); btnPSDU->setImage();
for(int i=0; i<=4; ++i) { for(int i=0; i<=4; ++i) {
......
...@@ -882,8 +882,24 @@ extern unsigned int pre_seed[3]; ...@@ -882,8 +882,24 @@ extern unsigned int pre_seed[3];
#define AVAIL_SC 0x8 #define AVAIL_SC 0x8
#define AVAIL_OCGTCG (AVAIL_OCG|AVAIL_TCG) #define AVAIL_OCGTCG (AVAIL_OCG|AVAIL_TCG)
#ifndef DEFAULT_DUEL_RULE #ifndef YGOPRO_DEFAULT_DUEL_RULE
#define DEFAULT_DUEL_RULE 5 #define YGOPRO_DEFAULT_DUEL_RULE 5
#endif
#ifndef YGOPRO_MAX_DECK
#define YGOPRO_MAX_DECK 60
#endif
#ifndef YGOPRO_MIN_DECK
#define YGOPRO_MIN_DECK 40
#endif
#ifndef YGOPRO_MAX_EXTRA
#define YGOPRO_MAX_EXTRA 15
#endif
#ifndef YGOPRO_MAX_SIDE
#define YGOPRO_MAX_SIDE 15
#endif #endif
#define CARD_ARTWORK_VERSIONS_OFFSET 10 #define CARD_ARTWORK_VERSIONS_OFFSET 10
......
...@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) { ...@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
#ifndef _WIN32 #ifndef _WIN32
setlocale(LC_CTYPE, "UTF-8"); setlocale(LC_CTYPE, "UTF-8");
#endif #endif
#ifdef __APPLE__ #if defined __APPLE__ && !defined YGOPRO_SERVER_MODE
CFURLRef bundle_url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFURLRef bundle_url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
CFURLRef bundle_base_url = CFURLCreateCopyDeletingLastPathComponent(NULL, bundle_url); CFURLRef bundle_base_url = CFURLCreateCopyDeletingLastPathComponent(NULL, bundle_url);
CFRelease(bundle_url); CFRelease(bundle_url);
...@@ -72,7 +72,7 @@ int main(int argc, char* argv[]) { ...@@ -72,7 +72,7 @@ int main(int argc, char* argv[]) {
ygo::game_info.draw_count = 1; ygo::game_info.draw_count = 1;
ygo::game_info.no_check_deck = false; ygo::game_info.no_check_deck = false;
ygo::game_info.no_shuffle_deck = false; ygo::game_info.no_shuffle_deck = false;
ygo::game_info.duel_rule = DEFAULT_DUEL_RULE; ygo::game_info.duel_rule = YGOPRO_DEFAULT_DUEL_RULE;
ygo::game_info.time_limit = 180; ygo::game_info.time_limit = 180;
for (int i = 0; i < 3; ++i) for (int i = 0; i < 3; ++i)
ygo::pre_seed[i] = (unsigned int)0; ygo::pre_seed[i] = (unsigned int)0;
...@@ -94,15 +94,15 @@ int main(int argc, char* argv[]) { ...@@ -94,15 +94,15 @@ int main(int argc, char* argv[]) {
mode = 0; mode = 0;
ygo::game_info.mode = mode; ygo::game_info.mode = mode;
if(argv[5][0] == 'T') if(argv[5][0] == 'T')
ygo::game_info.duel_rule = DEFAULT_DUEL_RULE - 1; ygo::game_info.duel_rule = YGOPRO_DEFAULT_DUEL_RULE - 1;
else if(argv[5][0] == 'F') else if(argv[5][0] == 'F')
ygo::game_info.duel_rule = DEFAULT_DUEL_RULE; ygo::game_info.duel_rule = YGOPRO_DEFAULT_DUEL_RULE;
else { else {
int master_rule = atoi(argv[5]); int master_rule = atoi(argv[5]);
if(master_rule) if(master_rule)
ygo::game_info.duel_rule = master_rule; ygo::game_info.duel_rule = master_rule;
else else
ygo::game_info.duel_rule = DEFAULT_DUEL_RULE; ygo::game_info.duel_rule = YGOPRO_DEFAULT_DUEL_RULE;
} }
if(argv[6][0] == 'T') if(argv[6][0] == 'T')
ygo::game_info.no_check_deck = true; ygo::game_info.no_check_deck = true;
......
project "clzma" project "clzma"
kind "StaticLib" kind "StaticLib"
files { "**.c", "**.h" } files { "*.c", "*.h" }
include "lzma/."
project "ygopro"
kind "ConsoleApp"
local params={
"DEFAULT_DUEL_RULE",
"DECKCOUNT_MAIN_MIN",
"DECKCOUNT_MAIN_MAX",
"DECKCOUNT_SIDE",
"DECKCOUNT_EXTRA",
"NO_SIDE_CHECK"
}
for _,param in ipairs(params) do
local val=os.getenv("YGOPRO_"..param)
if val and tonumber(val) then defines { param.."="..tonumber(val) } end
end
files { "gframe.cpp", "config.h",
"game.cpp", "game.h", "myfilesystem.h",
"deck_manager.cpp", "deck_manager.h",
"data_manager.cpp", "data_manager.h",
"replay.cpp", "replay.h",
"netserver.cpp", "netserver.h",
"single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "sqlite3", "event" }
configuration "windows"
files "ygopro.rc"
includedirs { "../event/include", "../sqlite3" }
links { "ws2_32", "event", "lua" }
configuration "not vs*"
buildoptions { "-std=c++14", "-fno-rtti" }
configuration "not windows"
links { "dl", "pthread" }
if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" }
libdirs { LIBEVENT_ROOT.."/lib/" }
end
links { "event_pthreads" }
if BUILD_SQLITE then
includedirs { "../sqlite3" }
end
if BUILD_LUA then
links { "lua" }
else
links { "lua5.3-c++" }
end
configuration "linux"
linkoptions { "-static-libstdc++", "-static-libgcc", "-Wl,-rpath=./lib/" }
configuration "macosx"
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos11" }
linkoptions { "-arch arm64" }
end
include "lzma/."
if not SERVER_MODE then
include "spmemvfs/."
end
project "ygopro"
if SERVER_MODE then
kind "ConsoleApp"
defines { "YGOPRO_SERVER_MODE" }
files { "gframe.cpp", "config.h",
"game.cpp", "game.h", "myfilesystem.h",
"deck_manager.cpp", "deck_manager.h",
"data_manager.cpp", "data_manager.h",
"replay.cpp", "replay.h",
"netserver.cpp", "netserver.h",
"single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", LUA_LIB_NAME, "sqlite3", "event" }
else
kind "WindowedApp"
files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" }
end
if BUILD_IKPMP3 then
links { "ikpmp3" }
end
if BUILD_EVENT then
includedirs { "../event/include" }
else
includedirs { EVENT_INCLUDE_DIR }
libdirs { EVENT_LIB_DIR }
end
if BUILD_IRRLICHT then
includedirs { "../irrlicht/include" }
else
includedirs { IRRLICHT_INCLUDE_DIR }
libdirs { IRRLICHT_LIB_DIR }
end
if BUILD_FREETYPE then
includedirs { "../freetype/include" }
else
includedirs { FREETYPE_INCLUDE_DIR }
libdirs { FREETYPE_LIB_DIR }
end
if BUILD_SQLITE then
includedirs { "../sqlite3" }
else
includedirs { SQLITE_INCLUDE_DIR }
libdirs { SQLITE_LIB_DIR }
end
if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
includedirs { IRRKLANG_INCLUDE_DIR }
if not IRRKLANG_PRO then
libdirs { IRRKLANG_LIB_DIR }
end
end
filter "system:windows"
defines { "_IRR_WCHAR_FILESYSTEM" }
files "ygopro.rc"
if not SERVER_MODE then
libdirs { "$(DXSDK_DIR)Lib/x86" }
end
if USE_IRRKLANG then
links { "irrKlang" }
if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" }
links { "ikpmp3" }
filter { "not configurations:Debug" }
libdirs { IRRKLANG_PRO_RELEASE_LIB_DIR }
filter { "configurations:Debug" }
libdirs { IRRKLANG_PRO_DEBUG_LIB_DIR }
filter {}
end
end
if SERVER_MODE then
links { "ws2_32" }
else
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" }
end
filter "not action:vs*"
buildoptions { "-std=c++14", "-fno-rtti" }
filter "not system:windows"
links { "event_pthreads", "dl", "pthread" }
filter "system:macosx"
if not SERVER_MODE then
links { "z" }
defines { "GL_SILENCE_DEPRECATION" }
end
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" }
linkoptions { "-arch arm64" }
end
if USE_IRRKLANG then
links { "irrklang" }
end
filter "system:linux"
linkoptions { "-static-libstdc++", "-static-libgcc" }
if not SERVER_MODE then
links { "GL", "X11", "Xxf86vm" }
end
if USE_IRRKLANG then
links { "IrrKlang" }
linkoptions { IRRKLANG_LINK_RPATH }
end
project "cspmemvfs" project "cspmemvfs"
kind "StaticLib" kind "StaticLib"
files { "**.c", "**.h" } files { "*.c", "*.h" }
configuration "windows" if BUILD_SQLITE then
includedirs { "../../sqlite3" } includedirs { "../../sqlite3" }
end
configuration "not windows"
if BUILD_SQLITE then
includedirs { "../../sqlite3" }
end
Subproject commit 2615ef6a609576d3fd34be6130620f30a30d21b7 Subproject commit d71e1ea4fa0564fc49736aa9e7c19afd99210499
...@@ -8,5 +8,6 @@ project "event" ...@@ -8,5 +8,6 @@ project "event"
"evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c", "evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c",
"event_tagging.c", "http.c", "evdns.c", "evrpc.c" } "event_tagging.c", "http.c", "evdns.c", "evrpc.c" }
configuration "windows" filter "system:windows"
prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" }
files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" } files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" }
...@@ -21,7 +21,6 @@ project "freetype" ...@@ -21,7 +21,6 @@ project "freetype"
"src/base/ftpfr.c", "src/base/ftpfr.c",
"src/base/ftstroke.c", "src/base/ftstroke.c",
"src/base/ftsynth.c", "src/base/ftsynth.c",
"src/base/ftsystem.c",
"src/base/fttype1.c", "src/base/fttype1.c",
"src/base/ftwinfnt.c", "src/base/ftwinfnt.c",
"src/bdf/bdf.c", "src/bdf/bdf.c",
...@@ -37,13 +36,17 @@ project "freetype" ...@@ -37,13 +36,17 @@ project "freetype"
"src/psnames/psmodule.c", "src/psnames/psmodule.c",
"src/raster/raster.c", "src/raster/raster.c",
"src/sfnt/sfnt.c", "src/sfnt/sfnt.c",
"src/sdf/sdf.c",
"src/smooth/smooth.c", "src/smooth/smooth.c",
"src/truetype/truetype.c", "src/truetype/truetype.c",
"src/type1/type1.c", "src/type1/type1.c",
"src/type42/type42.c", "src/type42/type42.c",
"src/winfonts/winfnt.c" } "src/winfonts/winfnt.c" }
configuration "windows" filter "system:windows"
files { "builds/windows/ftdebug.c" } files { "builds/windows/ftsystem.c",
configuration "not windows" "builds/windows/ftdebug.c" }
files { "src/base/ftdebug.c" }
filter "not system:windows"
files { "src/base/ftsystem.c",
"src/base/ftdebug.c" }
This diff is collapsed.
This diff is collapsed.
project "lua"
kind "StaticLib"
files { "**.cc", "**.cpp", "**.c", "**.h" }
excludes { "lua.c", "luac.c" }
configuration "vs*"
buildoptions { "/TP" }
configuration "not vs*"
buildoptions { "-x c++" }
project "lua"
kind "StaticLib"
files { "src/*.c", "src/*.h", "src/*.hpp" }
removefiles { "src/lua.c", "src/luac.c" }
filter "action:vs*"
buildoptions { "/TP" }
filter "not action:vs*"
buildoptions { "-x c++" }
filter "system:bsd"
defines { "LUA_USE_POSIX" }
filter "system:macosx"
defines { "LUA_USE_MACOSX" }
filter "system:linux"
defines { "LUA_USE_LINUX" }
solution "ygo"
location "build"
language "C++"
objdir "obj"
configurations { "Release", "Debug" }
if os.getenv("YGOPRO_NO_LUA_SAFE") then
defines { "LUA_COMPAT_5_2", "YGOPRO_SERVER_MODE" }
else
defines { "LUA_COMPAT_5_2", "YGOPRO_SERVER_MODE", "YGOPRO_LUA_SAFE" }
end
configuration "windows"
defines { "WIN32", "_WIN32" }
configuration "bsd"
defines { "LUA_USE_POSIX" }
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
configuration "macosx"
defines { "LUA_USE_MACOSX" }
includedirs { "/usr/local/include", "/usr/local/include/*" }
libdirs { "/usr/local/lib", "/usr/X11/lib" }
buildoptions { "-stdlib=libc++" }
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
configuration "linux"
defines { "LUA_USE_LINUX" }
configuration "vs*"
flags "EnableSSE2"
buildoptions { "-wd4996", "/utf-8" }
defines { "_CRT_SECURE_NO_WARNINGS" }
configuration "not vs*"
buildoptions { "-fno-strict-aliasing", "-Wno-format-security" }
configuration {"not vs*", "windows"}
buildoptions { "-static-libgcc" }
configuration "Debug"
flags "Symbols"
defines "_DEBUG"
targetdir "bin/debug"
configuration { "Release", "not vs*" }
flags "Symbols"
defines "NDEBUG"
buildoptions "-march=native"
configuration "Release"
--flags { "OptimizeSpeed" }
targetdir "bin/release"
include "ocgcore"
include "gframe"
if os.is("windows") then
include "lua"
include "event"
include "freetype"
include "irrlicht"
include "sqlite3"
end
This diff is collapsed.
Subproject commit 97bbddc05f32aeab9127fdb50f93c2de380d51fd Subproject commit 8e1536d0dd8f08f0cfec0ed723aa1c999f11cac7
...@@ -267,6 +267,7 @@ ...@@ -267,6 +267,7 @@
!system 1190 加入手卡 !system 1190 加入手卡
!system 1191 送去墓地 !system 1191 送去墓地
!system 1192 除外 !system 1192 除外
!system 1193 回到卡组
#menu #menu
!system 1200 联机模式 !system 1200 联机模式
!system 1201 单人模式 !system 1201 单人模式
......
#config file
#nickname & gamename should be less than 20 characters
use_d3d = 0
use_image_scale = 1
pro_version = 4946
antialias = 2
errorlog = 3
nickname = Nanahira
gamename = Game
lastcategory = OCG
lastdeck = wws
textfont = ./fonts/simhei.ttf 14
numfont = ./fonts/arial.ttf
serverport = 7911
lasthost = tiramisu.mycard.moe
lastport = 7911
automonsterpos = 0
autospellpos = 0
randompos = 0
autochain = 0
waitchain = 0
mute_opponent = 0
mute_spectators = 0
use_lflist = 1
default_lflist = 0
default_rule = 0
hide_setname = 0
hide_hint_button = 0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode = 0
draw_field_spell = 1
separate_clear_button = 1
#auto_search_limit >= 0: Start search automatically when the user enters N chars
auto_search_limit = 2
#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator " ". 2: with separator "+"
search_multiple_keywords = 1
search_regex = 1
ignore_deck_changes = 0
default_ot = 1
enable_bot_mode = 1
bot_deck_path = ./windbot/Decks
quick_animation = 1
auto_save_replay = 0
draw_single_chain = 1
prefer_expansion_script = 1
ask_mset = 1
window_maximized = 0
window_width = 1402
window_height = 806
resize_popup_menu = 0
enable_sound = 1
enable_music = 0
#Volume of sound and music, between 0 and 100
sound_volume = 100
music_volume = 100
music_mode = 1
enable_pendulum_scale = 1
skin_index = -1
locale = default
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