Commit 70260e08 authored by nanahira's avatar nanahira

merge

parents 5b493b82 08ce8ed6
......@@ -27,10 +27,10 @@ before_install:
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -;
curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-macosx.tar.gz | tar zfx -;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz | tar zfx -;
curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-linux.tar.gz | tar zfx -;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip; unzip irrlicht-1.8.4.zip ; cd irrlicht-1.8.4/ ; cp ../premake/irrlicht/irrlicht-mac.patch . ; patch -p1 < irrlicht-mac.patch ; cd source/Irrlicht/MacOSX/ ; xcodebuild -project MacOSX.xcodeproj ; cp build/Release/libIrrlicht.a /usr/local/lib/ ; cp -r ../../../include /usr/local/include/irrlicht ; cd ../../../../ ; fi
......
......@@ -9,8 +9,8 @@ install:
- git submodule update --init --recursive
# 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-alpha12/premake-5.0.0-alpha12-windows.zip ; exit 0"
- 7z x -y premake-5.0.0-alpha12-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-alpha13/premake-5.0.0-alpha13-windows.zip ; exit 0"
- 7z x -y premake-5.0.0-alpha13-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"
- tar xf libevent-2.0.22-stable.tar.gz
......@@ -96,7 +96,7 @@ artifacts:
name: ygopro full repack
cache:
- premake-5.0.0-alpha12-windows.zip
- premake-5.0.0-alpha13-windows.zip
- libevent-2.0.22-stable.tar.gz
- freetype-2.9.1.tar.bz2
- irrlicht-1.8.4.zip
......
......@@ -210,8 +210,14 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
return c1->overlayTarget->sequence < c2->overlayTarget->sequence;
else return c1->sequence < c2->sequence;
else {
if(c1->location & 0x71)
if(c1->location & (LOCATION_DECK | LOCATION_GRAVE | LOCATION_REMOVED | LOCATION_EXTRA)) {
for(size_t i = 0; i < mainGame->dField.chains.size(); ++i) {
auto chit = mainGame->dField.chains[i];
if(c1 == chit.chain_card || chit.target.find(c1) != chit.target.end())
return true;
}
return c1->sequence > c2->sequence;
}
else
return c1->sequence < c2->sequence;
}
......
......@@ -436,6 +436,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->wCardSelect->setText(dataManager.GetSysString(568));
list_command = COMMAND_OPERATION;
}
std::sort(selectable_cards.begin(), selectable_cards.end(), ClientCard::client_card_sort);
ShowSelectCard(true, true);
}
break;
......@@ -592,6 +593,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
list_command = COMMAND_LIST;
std::sort(selectable_cards.begin(), selectable_cards.end(), ClientCard::client_card_sort);
ShowSelectCard(true);
break;
}
......
......@@ -1300,6 +1300,8 @@ void Game::LoadConfig() {
gameConf.enable_bot_mode = atoi(valbuf);
} else if(!strcmp(strbuf, "quick_animation")) {
gameConf.quick_animation = atoi(valbuf);
} else if(!strcmp(strbuf, "auto_save_replay")) {
gameConf.auto_save_replay = atoi(valbuf);
} else if(!strcmp(strbuf, "window_maximized")) {
gameConf.window_maximized = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "window_width")) {
......@@ -1308,8 +1310,6 @@ void Game::LoadConfig() {
gameConf.window_height = atoi(valbuf);
} else if(!strcmp(strbuf, "resize_popup_menu")) {
gameConf.resize_popup_menu = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "auto_save_replay")) {
gameConf.auto_save_replay = atoi(valbuf);
#ifdef YGOPRO_USE_IRRKLANG
} else if(!strcmp(strbuf, "enable_sound")) {
gameConf.enable_sound = atoi(valbuf) > 0;
......@@ -1416,6 +1416,8 @@ void Game::LoadConfig() {
gameConf.enable_bot_mode = atoi(valbuf);
} else if(!strcmp(strbuf, "quick_animation")) {
gameConf.quick_animation = atoi(valbuf);
} else if(!strcmp(strbuf, "auto_save_replay")) {
gameConf.auto_save_replay = atoi(valbuf);
} else if(!strcmp(strbuf, "window_maximized")) {
gameConf.window_maximized = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "window_width")) {
......@@ -1424,8 +1426,6 @@ void Game::LoadConfig() {
gameConf.window_height = atoi(valbuf);
} else if(!strcmp(strbuf, "resize_popup_menu")) {
gameConf.resize_popup_menu = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "auto_save_replay")) {
gameConf.auto_save_replay = atoi(valbuf);
#ifdef YGOPRO_USE_IRRKLANG
} else if(!strcmp(strbuf, "enable_sound")) {
gameConf.enable_sound = atoi(valbuf) > 0;
......@@ -1542,11 +1542,11 @@ void Game::SaveConfig() {
fprintf(fp, "default_ot = %d\n", gameConf.defaultOT);
fprintf(fp, "enable_bot_mode = %d\n", gameConf.enable_bot_mode);
fprintf(fp, "quick_animation = %d\n", gameConf.quick_animation);
fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0));
fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0));
fprintf(fp, "window_width = %d\n", gameConf.window_width);
fprintf(fp, "window_height = %d\n", gameConf.window_height);
fprintf(fp, "resize_popup_menu = %d\n", gameConf.resize_popup_menu ? 1 : 0);
fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0));
#ifdef YGOPRO_USE_IRRKLANG
fprintf(fp, "enable_sound = %d\n", (chkEnableSound->isChecked() ? 1 : 0));
fprintf(fp, "enable_music = %d\n", (chkEnableMusic->isChecked() ? 1 : 0));
......
......@@ -44,8 +44,9 @@ solution "ygo"
targetdir "bin/debug"
configuration { "Release", "vs*" }
flags { "StaticRuntime", "LinkTimeOptimization" }
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4305" }
flags { "LinkTimeOptimization" }
staticruntime "On"
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4305", "4828" }
configuration { "Release", "not vs*" }
symbols "On"
......@@ -54,10 +55,11 @@ solution "ygo"
configuration { "Debug", "vs*" }
defines { "_ITERATOR_DEBUG_LEVEL=0" }
disablewarnings { "4819" }
disablewarnings { "4819", "4828" }
configuration "vs*"
vectorextensions "SSE2"
buildoptions { "/utf-8" }
defines { "_CRT_SECURE_NO_WARNINGS" }
configuration "not vs*"
......
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