Commit 801969a1 authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents 899d91c3 8ec251d5
...@@ -20,10 +20,7 @@ env: ...@@ -20,10 +20,7 @@ env:
- USE_IRRKLANG=1 - USE_IRRKLANG=1
before_install: before_install:
- git submodule update --init --recursive - git submodule update --init --recursive
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install freetype libevent sqlite dylibbundler p7zip; fi
brew update > /dev/null;
brew install freetype libevent sqlite p7zip dylibbundler > /dev/null;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - 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-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -;
...@@ -33,7 +30,7 @@ before_install: ...@@ -33,7 +30,7 @@ before_install:
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 -; 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 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 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir irrlicht ; cd irrlicht ; curl --retry 5 --location https://github.com/moecube/irrlicht/releases/download/test/irrlicht-mycard-mac.tar.gz | tar zfx - ; cp libIrrlicht.a /usr/local/lib/ ; sudo cp -r include /usr/local/include/irrlicht ; cd .. ; fi
- git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/irrklang - git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/irrklang
......
...@@ -348,20 +348,17 @@ int DataManager::CardReader(int code, void* pData) { ...@@ -348,20 +348,17 @@ int DataManager::CardReader(int code, void* pData) {
byte* DataManager::ScriptReaderEx(const char* script_name, int* slen) { byte* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
byte* buffer; byte* buffer;
if(!mainGame->gameConf.prefer_expansion_script) { if(!mainGame->gameConf.prefer_expansion_script) {
buffer = ScriptReaderExSingle(".", script_name, slen); buffer = ScriptReaderExSingle("", script_name, slen);
if(buffer) if(buffer)
return buffer; return buffer;
} }
buffer = ScriptReaderExSingle("./specials", script_name, slen, 8); buffer = ScriptReaderExSingle("specials/", script_name, slen, 9);
if(buffer) if(buffer)
return buffer; return buffer;
buffer = ScriptReaderExSingle("./expansions", script_name, slen); buffer = ScriptReaderExSingle("expansions/", script_name, slen);
if(buffer) if(buffer)
return buffer; return buffer;
buffer = ScriptReaderExSingle("./beta", script_name, slen); return ScriptReaderExSingle("", script_name, slen);
if(buffer)
return buffer;
return ScriptReader(script_name, slen);
} }
byte* DataManager::ScriptReaderExSingle(const char* path, const char* script_name, int* slen, int pre_len) { byte* DataManager::ScriptReaderExSingle(const char* path, const char* script_name, int* slen, int pre_len) {
char sname[256]; char sname[256];
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "config.h" #include "config.h"
#include "sqlite3.h" #include "sqlite3.h"
#include "spmemvfs.h" #include "spmemvfs/spmemvfs.h"
#include "client_card.h" #include "client_card.h"
#include <unordered_map> #include <unordered_map>
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
static const wchar_t* unknown_string; static const wchar_t* unknown_string;
static int CardReader(int, void*); static int CardReader(int, void*);
static byte* ScriptReaderEx(const char* script_name, int* slen); static byte* ScriptReaderEx(const char* script_name, int* slen);
static byte* ScriptReaderExSingle(const char* path, const char* script_name, int* slen, int pre_len = 1); static byte* ScriptReaderExSingle(const char* path, const char* script_name, int* slen, int pre_len = 2);
static byte* ScriptReader(const char* script_name, int* slen); static byte* ScriptReader(const char* script_name, int* slen);
static IFileSystem* FileSystem; static IFileSystem* FileSystem;
}; };
......
...@@ -984,6 +984,9 @@ void Game::DrawSpec() { ...@@ -984,6 +984,9 @@ void Game::DrawSpec() {
break; break;
} }
} }
if (auto_watch_mode & showcardcode < 8 && showcardcode > 0) {
mainGame->ShowCardInfo(showcardcode);
}
} }
if(is_attacking) { if(is_attacking) {
irr::core::matrix4 matk; irr::core::matrix4 matk;
......
...@@ -3001,6 +3001,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3001,6 +3001,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->WaitFrameSignal(3); mainGame->WaitFrameSignal(3);
} }
} }
if (auto_watch_mode) {
int code = mainGame->dField.chains[ct - 1].chain_card->code;
if (code > 0)
mainGame->ShowCardInfo(code);
}
mainGame->dField.last_chain = false; mainGame->dField.last_chain = false;
return true; return true;
} }
...@@ -3071,6 +3076,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3071,6 +3076,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int s = BufferIO::ReadInt8(pbuf); int s = BufferIO::ReadInt8(pbuf);
/*int ss = */BufferIO::ReadInt8(pbuf); /*int ss = */BufferIO::ReadInt8(pbuf);
ClientCard* pcard = mainGame->dField.GetCard(c, l, s); ClientCard* pcard = mainGame->dField.GetCard(c, l, s);
if (auto_watch_mode && i == 0 && pcard->code > 0 ) {
mainGame->ShowCardInfo(pcard->code);
}
pcard->is_highlighting = true; pcard->is_highlighting = true;
mainGame->dField.current_chain.target.insert(pcard); mainGame->dField.current_chain.target.insert(pcard);
if(pcard->location & LOCATION_ONFIELD) { if(pcard->location & LOCATION_ONFIELD) {
...@@ -3435,6 +3443,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3435,6 +3443,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya)));
} }
matManager.GenArrow(sy); matManager.GenArrow(sy);
if (auto_watch_mode) {
mainGame->ShowCardInfo(mainGame->dField.attacker->code);
}
mainGame->attack_sv = 0; mainGame->attack_sv = 0;
mainGame->is_attacking = true; mainGame->is_attacking = true;
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
......
...@@ -1975,6 +1975,8 @@ void Game::OnResize() { ...@@ -1975,6 +1975,8 @@ void Game::OnResize() {
lstLog->setRelativePosition(Resize(10, 10, 290, 290)); lstLog->setRelativePosition(Resize(10, 10, 290, 290));
if(showingcode) if(showingcode)
ShowCardInfo(showingcode, true); ShowCardInfo(showingcode, true);
else
ClearCardInfo();
btnClearLog->setRelativePosition(Resize(160, 300, 260, 325)); btnClearLog->setRelativePosition(Resize(160, 300, 260, 325));
wPhase->setRelativePosition(Resize(480, 310, 855, 330)); wPhase->setRelativePosition(Resize(480, 310, 855, 330));
......
include "lzma/." include "lzma/."
include "spmemvfs/."
project "ygopro" project "ygopro"
kind "WindowedApp" kind "WindowedApp"
files { "**.cpp", "**.cc", "**.c", "**.h" } files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes "lzma/**" excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event" } links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "freetype", "sqlite3", "lua" , "event" }
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
links { "ikpmp3" } links { "ikpmp3" }
......
project "cspmemvfs"
kind "StaticLib"
files { "**.c", "**.h" }
configuration "windows"
includedirs { "../../sqlite3" }
Subproject commit 848005898ba085a1dfa172085c495418d8afcb16 Subproject commit 60eb18014a0537d65944850617753f45ca08de03
Subproject commit 17096c4264ac893d691a08732d2a929db995baed Subproject commit 6e98bf821eda80175f219a263cff6e53ab5c589c
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