Commit b9d211ca authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents 3d34ed80 f19874ab
...@@ -23,14 +23,15 @@ before_install: ...@@ -23,14 +23,15 @@ 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 update;
brew install freetype libevent sqlite dylibbundler p7zip lua; brew install freetype libevent sqlite dylibbundler p7zip;
sudo cp -r /usr/local/include/freetype2 ./freetype2; sudo cp -r /usr/local/include/freetype2 ./freetype2;
sudo cp -r /usr/local/include/event2 ./event2; sudo cp -r /usr/local/include/event2 ./event2;
sudo cp -r /usr/local/include/lua ./lua;
sudo rm -rf /usr/local/include/*; sudo rm -rf /usr/local/include/*;
sudo cp -r ./freetype2 /usr/local/include/freetype2; sudo cp -r ./freetype2 /usr/local/include/freetype2;
sudo cp -r ./event2 /usr/local/include/event2; sudo cp -r ./event2 /usr/local/include/event2;
sudo cp -r ./lua /usr/local/include/lua; curl --retry 5 --location https://www.lua.org/ftp/lua-5.3.5.tar.gz | tar zfx -;
mv lua-5.3.5/src lua;
cp premake/lua/premake4.lua lua/;
fi 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 - 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
......
No preview for this file type
...@@ -506,6 +506,19 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -506,6 +506,19 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
break; break;
} }
case STOC_DECK_COUNT: {
mainGame->gMutex.lock();
int deckc = BufferIO::ReadInt16(pdata);
int extrac = BufferIO::ReadInt16(pdata);
int sidec = BufferIO::ReadInt16(pdata);
mainGame->dField.Initial(0, deckc, extrac);
deckc = BufferIO::ReadInt16(pdata);
extrac = BufferIO::ReadInt16(pdata);
sidec = BufferIO::ReadInt16(pdata);
mainGame->dField.Initial(1, deckc, extrac);
mainGame->gMutex.unlock();
break;
}
case STOC_JOIN_GAME: { case STOC_JOIN_GAME: {
temp_ver = 0; temp_ver = 0;
STOC_JoinGame* pkt = (STOC_JoinGame*)pdata; STOC_JoinGame* pkt = (STOC_JoinGame*)pdata;
...@@ -1369,6 +1382,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1369,6 +1382,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->sidedeck_extra[i].clear(); mainGame->sidedeck_extra[i].clear();
} }
mainGame->gMutex.lock(); mainGame->gMutex.lock();
mainGame->dField.Clear();
int playertype = BufferIO::ReadInt8(pbuf); int playertype = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true; mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true;
if(playertype & 0xf0) if(playertype & 0xf0)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <sstream> #include <sstream>
#include <regex> #include <regex>
unsigned short PRO_VERSION = 0x1350; unsigned short PRO_VERSION = 0x1351;
namespace ygo { namespace ygo {
......
...@@ -185,6 +185,7 @@ public: ...@@ -185,6 +185,7 @@ public:
#define STOC_TP_RESULT 0x6 #define STOC_TP_RESULT 0x6
#define STOC_CHANGE_SIDE 0x7 #define STOC_CHANGE_SIDE 0x7
#define STOC_WAITING_SIDE 0x8 #define STOC_WAITING_SIDE 0x8
#define STOC_DECK_COUNT 0x9
#define STOC_CREATE_GAME 0x11 #define STOC_CREATE_GAME 0x11
#define STOC_JOIN_GAME 0x12 #define STOC_JOIN_GAME 0x12
#define STOC_TYPE_CHANGE 0x13 #define STOC_TYPE_CHANGE 0x13
......
...@@ -61,6 +61,7 @@ project "ygopro" ...@@ -61,6 +61,7 @@ project "ygopro"
end end
configuration "macosx" configuration "macosx"
includedirs { "/usr/include/irrlicht" } includedirs { "/usr/include/irrlicht" }
links { "lua" }
if USE_IRRKLANG then if USE_IRRKLANG then
links { "irrklang" } links { "irrklang" }
libdirs { "../irrklang/bin/macosx-gcc" } libdirs { "../irrklang/bin/macosx-gcc" }
......
...@@ -330,6 +330,20 @@ void SingleDuel::StartDuel(DuelPlayer* dp) { ...@@ -330,6 +330,20 @@ void SingleDuel::StartDuel(DuelPlayer* dp) {
(*oit)->state = CTOS_LEAVE_GAME; (*oit)->state = CTOS_LEAVE_GAME;
NetServer::ReSendToPlayer(*oit); NetServer::ReSendToPlayer(*oit);
} }
char deckbuff[12];
char* pbuf = deckbuff;
BufferIO::WriteInt16(pbuf, pdeck[0].main.size());
BufferIO::WriteInt16(pbuf, pdeck[0].extra.size());
BufferIO::WriteInt16(pbuf, pdeck[0].side.size());
BufferIO::WriteInt16(pbuf, pdeck[1].main.size());
BufferIO::WriteInt16(pbuf, pdeck[1].extra.size());
BufferIO::WriteInt16(pbuf, pdeck[1].side.size());
NetServer::SendBufferToPlayer(players[0], STOC_DECK_COUNT, deckbuff, 12);
char tempbuff[6];
memcpy(tempbuff, deckbuff, 6);
memcpy(deckbuff, deckbuff + 6, 6);
memcpy(deckbuff + 6, tempbuff, 6);
NetServer::SendBufferToPlayer(players[1], STOC_DECK_COUNT, deckbuff, 12);
NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND); NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND);
NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[1]);
hand_result[0] = 0; hand_result[0] = 0;
......
...@@ -287,6 +287,22 @@ void TagDuel::StartDuel(DuelPlayer* dp) { ...@@ -287,6 +287,22 @@ void TagDuel::StartDuel(DuelPlayer* dp) {
(*oit)->state = CTOS_LEAVE_GAME; (*oit)->state = CTOS_LEAVE_GAME;
NetServer::ReSendToPlayer(*oit); NetServer::ReSendToPlayer(*oit);
} }
char deckbuff[12];
char* pbuf = deckbuff;
BufferIO::WriteInt16(pbuf, pdeck[0].main.size());
BufferIO::WriteInt16(pbuf, pdeck[0].extra.size());
BufferIO::WriteInt16(pbuf, pdeck[0].side.size());
BufferIO::WriteInt16(pbuf, pdeck[2].main.size());
BufferIO::WriteInt16(pbuf, pdeck[2].extra.size());
BufferIO::WriteInt16(pbuf, pdeck[2].side.size());
NetServer::SendBufferToPlayer(players[0], STOC_DECK_COUNT, deckbuff, 12);
NetServer::ReSendToPlayer(players[1]);
char tempbuff[6];
memcpy(tempbuff, deckbuff, 6);
memcpy(deckbuff, deckbuff + 6, 6);
memcpy(deckbuff + 6, tempbuff, 6);
NetServer::SendBufferToPlayer(players[2], STOC_DECK_COUNT, deckbuff, 12);
NetServer::ReSendToPlayer(players[3]);
NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND); NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND);
NetServer::ReSendToPlayer(players[2]); NetServer::ReSendToPlayer(players[2]);
hand_result[0] = 0; hand_result[0] = 0;
......
Subproject commit c48f5e5f179bfda57a0da32d0e1a0f14bcdd8884 Subproject commit a636af1e4e078d6380303a63b013900b0816fdf7
1 ICON "ygopro.ico" 1 ICON "ygopro.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 1, 0, 35, 0 FILEVERSION 1, 0, 35, 1
PRODUCTVERSION 1, 0, 35, 0 PRODUCTVERSION 1, 0, 35, 1
FILEOS 0x4 FILEOS 0x4
FILETYPE 0x1 FILETYPE 0x1
...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro" ...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro"
VALUE "LegalCopyright", "Copyright (C) 2019 Nanahira" VALUE "LegalCopyright", "Copyright (C) 2019 Nanahira"
VALUE "OriginalFilename", "ygopro_another.exe" VALUE "OriginalFilename", "ygopro_another.exe"
VALUE "ProductName", "KoishiPro" VALUE "ProductName", "KoishiPro"
VALUE "FileVersion", "Monokuro" VALUE "FileVersion", "Mopemope"
VALUE "ProductVersion", "Monokuro" VALUE "ProductVersion", "Mopemope"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
...@@ -98,6 +98,9 @@ end ...@@ -98,6 +98,9 @@ end
if os.ishost("linux") then if os.ishost("linux") then
include "irrlicht_linux" include "irrlicht_linux"
end end
if os.ishost("macosx") then
include "lua"
end
if USE_IRRKLANG then if USE_IRRKLANG then
include "ikpmp3" include "ikpmp3"
end end
Subproject commit 8fb7f95a65d6b7ccb5ec565e95df34139ca9439a Subproject commit 216c4754fb203fe2f598fee02ace05e54f7cea55
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#nickname & gamename should be less than 20 characters #nickname & gamename should be less than 20 characters
use_d3d = 0 use_d3d = 0
use_image_scale = 1 use_image_scale = 1
pro_version = 4944 pro_version = 4945
antialias = 2 antialias = 2
errorlog = 3 errorlog = 3
nickname = Komeiji Koishi nickname = Komeiji Koishi
......
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