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
REIKAI
ygopro
Commits
6d4239b7
Commit
6d4239b7
authored
Nov 07, 2019
by
mycard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of
https://github.com/purerosefallen/ygopro
parents
42eb3da6
ad340888
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
241 additions
and
20 deletions
+241
-20
.gitignore
.gitignore
+4
-0
cards.cdb
cards.cdb
+0
-0
gframe/drawing.cpp
gframe/drawing.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+8
-3
gframe/duelclient.h
gframe/duelclient.h
+9
-0
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+14
-2
lflist.conf
lflist.conf
+198
-12
strings.conf
strings.conf
+6
-1
No files found.
.gitignore
View file @
6d4239b7
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
.vscode
.vscode
core*
core*
/bak/
/bak/
/.vs
/bug.txt
/bug.txt
/output
/output
/temp
/temp
...
@@ -89,3 +90,6 @@ core*
...
@@ -89,3 +90,6 @@ core*
/*.bat
/*.bat
/*.sh
/*.sh
/*.sql
/*.sql
/patch.exe.manifest
/patch.exe
/diff.exe
cards.cdb
View file @
6d4239b7
No preview for this file type
gframe/drawing.cpp
View file @
6d4239b7
...
@@ -984,7 +984,7 @@ void Game::DrawSpec() {
...
@@ -984,7 +984,7 @@ void Game::DrawSpec() {
break
;
break
;
}
}
}
}
if
(
auto_watch_mode
&&
showcard
code
<
8
&&
showcardcode
>
0
)
{
if
(
auto_watch_mode
&&
showcard
p
<
8
&&
showcardp
>
0
&&
showcardcode
>
10
0
)
{
mainGame
->
ShowCardInfo
(
showcardcode
);
mainGame
->
ShowCardInfo
(
showcardcode
);
}
}
}
}
...
...
gframe/duelclient.cpp
View file @
6d4239b7
...
@@ -253,6 +253,9 @@ int DuelClient::ClientThread() {
...
@@ -253,6 +253,9 @@ int DuelClient::ClientThread() {
void
DuelClient
::
HandleSTOCPacketLan
(
char
*
data
,
unsigned
int
len
)
{
void
DuelClient
::
HandleSTOCPacketLan
(
char
*
data
,
unsigned
int
len
)
{
char
*
pdata
=
data
;
char
*
pdata
=
data
;
unsigned
char
pktType
=
BufferIO
::
ReadUInt8
(
pdata
);
unsigned
char
pktType
=
BufferIO
::
ReadUInt8
(
pdata
);
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"STOC: %d Length: %d
\n
"
,
pktType
,
len
);
#endif
switch
(
pktType
)
{
switch
(
pktType
)
{
case
STOC_GAME_MSG
:
{
case
STOC_GAME_MSG
:
{
ClientAnalyze
(
pdata
,
len
-
1
);
ClientAnalyze
(
pdata
,
len
-
1
);
...
@@ -960,6 +963,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -960,6 +963,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
char
*
pbuf
=
msg
;
char
*
pbuf
=
msg
;
wchar_t
textBuffer
[
256
];
wchar_t
textBuffer
[
256
];
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"MSG: %d Length: %d
\n
"
,
mainGame
->
dInfo
.
curMsg
,
len
);
#endif
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_RETRY
)
{
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_RETRY
)
{
memcpy
(
last_successful_msg
,
msg
,
len
);
memcpy
(
last_successful_msg
,
msg
,
len
);
last_successful_msg_length
=
len
;
last_successful_msg_length
=
len
;
...
@@ -3027,8 +3033,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3027,8 +3033,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
if
(
auto_watch_mode
)
{
if
(
auto_watch_mode
)
{
int
code
=
mainGame
->
dField
.
chains
[
ct
-
1
].
chain_card
->
code
;
int
code
=
mainGame
->
dField
.
chains
[
ct
-
1
].
chain_card
->
code
;
if
(
code
>
0
)
mainGame
->
ShowCardInfo
(
code
);
mainGame
->
ShowCardInfo
(
code
);
}
}
mainGame
->
dField
.
last_chain
=
false
;
mainGame
->
dField
.
last_chain
=
false
;
return
true
;
return
true
;
...
@@ -3100,7 +3105,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3100,7 +3105,7 @@ 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
)
{
if
(
auto_watch_mode
&&
i
==
0
)
{
mainGame
->
ShowCardInfo
(
pcard
->
code
);
mainGame
->
ShowCardInfo
(
pcard
->
code
);
}
}
pcard
->
is_highlighting
=
true
;
pcard
->
is_highlighting
=
true
;
...
...
gframe/duelclient.h
View file @
6d4239b7
...
@@ -59,6 +59,9 @@ public:
...
@@ -59,6 +59,9 @@ public:
char
*
p
=
duel_client_write
;
char
*
p
=
duel_client_write
;
BufferIO
::
WriteInt16
(
p
,
1
);
BufferIO
::
WriteInt16
(
p
,
1
);
BufferIO
::
WriteInt8
(
p
,
proto
);
BufferIO
::
WriteInt8
(
p
,
proto
);
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"CTOS: %d
\n
"
,
proto
);
#endif
bufferevent_write
(
client_bev
,
duel_client_write
,
3
);
bufferevent_write
(
client_bev
,
duel_client_write
,
3
);
}
}
template
<
typename
ST
>
template
<
typename
ST
>
...
@@ -67,6 +70,9 @@ public:
...
@@ -67,6 +70,9 @@ public:
BufferIO
::
WriteInt16
(
p
,
1
+
sizeof
(
ST
));
BufferIO
::
WriteInt16
(
p
,
1
+
sizeof
(
ST
));
BufferIO
::
WriteInt8
(
p
,
proto
);
BufferIO
::
WriteInt8
(
p
,
proto
);
memcpy
(
p
,
&
st
,
sizeof
(
ST
));
memcpy
(
p
,
&
st
,
sizeof
(
ST
));
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"CTOS: %d Length: %d
\n
"
,
proto
,
sizeof
(
ST
));
#endif
bufferevent_write
(
client_bev
,
duel_client_write
,
sizeof
(
ST
)
+
3
);
bufferevent_write
(
client_bev
,
duel_client_write
,
sizeof
(
ST
)
+
3
);
}
}
static
void
SendBufferToServer
(
unsigned
char
proto
,
void
*
buffer
,
size_t
len
)
{
static
void
SendBufferToServer
(
unsigned
char
proto
,
void
*
buffer
,
size_t
len
)
{
...
@@ -74,6 +80,9 @@ public:
...
@@ -74,6 +80,9 @@ public:
BufferIO
::
WriteInt16
(
p
,
1
+
len
);
BufferIO
::
WriteInt16
(
p
,
1
+
len
);
BufferIO
::
WriteInt8
(
p
,
proto
);
BufferIO
::
WriteInt8
(
p
,
proto
);
memcpy
(
p
,
buffer
,
len
);
memcpy
(
p
,
buffer
,
len
);
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"CTOS: %d Length: %d
\n
"
,
proto
,
len
);
#endif
bufferevent_write
(
client_bev
,
duel_client_write
,
len
+
3
);
bufferevent_write
(
client_bev
,
duel_client_write
,
len
+
3
);
}
}
...
...
gframe/game.cpp
View file @
6d4239b7
...
@@ -149,7 +149,7 @@ bool Game::Initialize() {
...
@@ -149,7 +149,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
SetWindowsIcon
();
//main menu
//main menu
wchar_t
strbuf
[
256
];
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X S
carlet
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X S
akura
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/replay_mode.cpp
View file @
6d4239b7
...
@@ -238,7 +238,13 @@ void ReplayMode::EndDuel() {
...
@@ -238,7 +238,13 @@ void ReplayMode::EndDuel() {
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
mainGame
->
actionSignal
.
Wait
();
if
(
auto_watch_mode
)
{
mainGame
->
actionSignal
.
Wait
(
2000
);
mainGame
->
device
->
closeDevice
();
}
else
{
mainGame
->
actionSignal
.
Wait
();
}
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isFinished
=
true
;
...
@@ -315,7 +321,13 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -315,7 +321,13 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
if
(
auto_watch_mode
){
mainGame
->
actionSignal
.
Wait
(
2000
);
mainGame
->
device
->
closeDevice
();
}
else
{
mainGame
->
actionSignal
.
Wait
();
}
return
false
;
return
false
;
}
}
case
MSG_HINT
:
{
case
MSG_HINT
:
{
...
...
lflist.conf
View file @
6d4239b7
This diff is collapsed.
Click to expand it.
strings.conf
View file @
6d4239b7
...
@@ -992,7 +992,8 @@
...
@@ -992,7 +992,8 @@
!
setname
0
x120
调皮宝贝 プランキッズ
!
setname
0
x120
调皮宝贝 プランキッズ
!
setname
0
x121
魔妖
!
setname
0
x121
魔妖
!
setname
0
x122
女武神 ワルキューレ
!
setname
0
x122
女武神 ワルキューレ
!
setname
0
x123
蔷薇龙 ローズ・ドラゴン
!
setname
0
x123
蔷薇 ローズ
!
setname
0
x1123
蔷薇龙 ローズ・ドラゴン
!
setname
0
x124
机械天使 機械天使
!
setname
0
x124
机械天使 機械天使
!
setname
0
x125
笑容 スマイル
!
setname
0
x125
笑容 スマイル
!
setname
0
x126
时间潜行者 クロノダイバー
!
setname
0
x126
时间潜行者 クロノダイバー
...
@@ -1011,3 +1012,7 @@
...
@@ -1011,3 +1012,7 @@
!
setname
0
x132
斩机 斬機
!
setname
0
x132
斩机 斬機
!
setname
0
x133
半龙女仆 ドラゴンメイド
!
setname
0
x133
半龙女仆 ドラゴンメイド
!
setname
0
x134
王战 ジェネレイド
!
setname
0
x134
王战 ジェネレイド
!
setname
0
x135
@火灵天星 @イグニスター
!
setname
0
x136
“艾”
Ai
(アイ)
!
setname
0
x137
战华 戦華
!
setname
0
x138
巨石遗物 メガリス
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