Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
901309c0
Commit
901309c0
authored
May 01, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into server
parents
a0d801ec
ecd3b55c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
3 deletions
+48
-3
cards.cdb
cards.cdb
+0
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+14
-0
gframe/game.cpp
gframe/game.cpp
+2
-2
gframe/network.h
gframe/network.h
+1
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+14
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+16
-0
script
script
+1
-1
No files found.
cards.cdb
View file @
901309c0
No preview for this file type
gframe/duelclient.cpp
View file @
901309c0
...
...
@@ -505,6 +505,19 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
unlock
();
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
:
{
temp_ver
=
0
;
STOC_JoinGame
*
pkt
=
(
STOC_JoinGame
*
)
pdata
;
...
...
@@ -1327,6 +1340,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
showcard
=
0
;
mainGame
->
gMutex
.
lock
();
mainGame
->
dField
.
Clear
();
int
playertype
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dInfo
.
isFirst
=
(
playertype
&
0xf
)
?
false
:
true
;
if
(
playertype
&
0xf0
)
...
...
gframe/game.cpp
View file @
901309c0
...
...
@@ -18,7 +18,7 @@
#include <regex>
#endif //YGOPRO_SERVER_MODE
unsigned
short
PRO_VERSION
=
0x135
0
;
unsigned
short
PRO_VERSION
=
0x135
1
;
namespace
ygo
{
...
...
@@ -149,7 +149,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X Mo
nokuro
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X Mo
pemope
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/network.h
View file @
901309c0
...
...
@@ -194,6 +194,7 @@ public:
#define STOC_TP_RESULT 0x6
#define STOC_CHANGE_SIDE 0x7
#define STOC_WAITING_SIDE 0x8
#define STOC_DECK_COUNT 0x9
#define STOC_CREATE_GAME 0x11
#define STOC_JOIN_GAME 0x12
#define STOC_TYPE_CHANGE 0x13
...
...
gframe/single_duel.cpp
View file @
901309c0
...
...
@@ -447,6 +447,20 @@ void SingleDuel::StartDuel(DuelPlayer* dp) {
replay_recorder
->
state
=
CTOS_LEAVE_GAME
;
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
#endif
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
::
ReSendToPlayer
(
players
[
1
]);
hand_result
[
0
]
=
0
;
...
...
gframe/tag_duel.cpp
View file @
901309c0
...
...
@@ -407,6 +407,22 @@ void TagDuel::StartDuel(DuelPlayer* dp) {
replay_recorder
->
state
=
CTOS_LEAVE_GAME
;
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
#endif
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
::
ReSendToPlayer
(
players
[
2
]);
hand_result
[
0
]
=
0
;
...
...
script
@
216c4754
Subproject commit
10c2806e0aae76d0b6bf2f052208d28fabcbee73
Subproject commit
216c4754fb203fe2f598fee02ace05e54f7cea55
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment