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
eaaa8e64
Commit
eaaa8e64
authored
Jan 23, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into server
parents
8eb6fe1d
604ac65a
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
410 additions
and
230 deletions
+410
-230
cmake/compiler/msvc.cmake
cmake/compiler/msvc.cmake
+1
-1
gframe/client_card.cpp
gframe/client_card.cpp
+9
-6
gframe/client_field.cpp
gframe/client_field.cpp
+1
-1
gframe/config.h
gframe/config.h
+1
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+0
-1
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+0
-1
gframe/drawing.cpp
gframe/drawing.cpp
+6
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-15
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-8
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+0
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-2
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-2
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-2
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-2
lflist.conf
lflist.conf
+372
-181
ocgcore
ocgcore
+1
-1
premake4.lua
premake4.lua
+0
-3
script
script
+1
-1
strings.conf
strings.conf
+5
-1
No files found.
cmake/compiler/msvc.cmake
View file @
eaaa8e64
add_definitions
(
"-wd4996"
"-D_CRT_SECURE_NO_WARNINGS"
"-D_ITERATOR_DEBUG_LEVEL=0"
)
add_definitions
(
"-wd4996"
"-D_CRT_SECURE_NO_WARNINGS"
)
add_definitions
(
"-D_UNICODE"
"-DUNICODE"
"/utf-8"
)
include
(
MSVCMultipleProcessCompile
)
...
...
gframe/client_card.cpp
View file @
eaaa8e64
...
...
@@ -213,14 +213,17 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
else
return
c1
->
sequence
<
c2
->
sequence
;
else
{
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
;
auto
it1
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c1
](
const
auto
&
ch
)
{
return
c1
==
ch
.
chain_card
||
ch
.
target
.
find
(
c1
)
!=
ch
.
target
.
end
();
});
auto
it2
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c2
](
const
auto
&
ch
)
{
return
c2
==
ch
.
chain_card
||
ch
.
target
.
find
(
c2
)
!=
ch
.
target
.
end
();
});
if
(
it1
!=
mainGame
->
dField
.
chains
.
rend
()
||
it2
!=
mainGame
->
dField
.
chains
.
rend
())
{
return
it1
<
it2
;
}
return
c1
->
sequence
>
c2
->
sequence
;
}
else
}
else
return
c1
->
sequence
<
c2
->
sequence
;
}
}
...
...
gframe/client_field.cpp
View file @
eaaa8e64
...
...
@@ -405,7 +405,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame
->
btnCardSelect
[
i
]
->
setRelativePosition
(
rect
<
s32
>
(
startpos
+
i
*
125
,
55
,
startpos
+
120
+
i
*
125
,
225
));
mainGame
->
btnCardSelect
[
i
]
->
setPressed
(
false
);
mainGame
->
btnCardSelect
[
i
]
->
setVisible
(
true
);
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_SORT_C
HAIN
&&
mainGame
->
dInfo
.
curMsg
!=
MSG_SORT_C
ARD
)
{
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_SORT_CARD
)
{
// text
wchar_t
formatBuffer
[
2048
];
if
(
conti_selecting
)
...
...
gframe/config.h
View file @
eaaa8e64
...
...
@@ -74,6 +74,7 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
#include <time.h>
#include <thread>
#include <mutex>
#include <algorithm>
#include "bufferio.h"
#include "myfilesystem.h"
#include "mysignal.h"
...
...
gframe/deck_con.cpp
View file @
eaaa8e64
...
...
@@ -6,7 +6,6 @@
#include "sound_manager.h"
#include "game.h"
#include "duelclient.h"
#include <algorithm>
namespace
ygo
{
...
...
gframe/deck_manager.cpp
View file @
eaaa8e64
...
...
@@ -2,7 +2,6 @@
#include "data_manager.h"
#include "network.h"
#include "game.h"
#include <algorithm>
namespace
ygo
{
...
...
gframe/drawing.cpp
View file @
eaaa8e64
...
...
@@ -1015,10 +1015,16 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
dField
.
conti_selecting
=
false
;
stCardListTip
->
setVisible
(
false
);
for
(
auto
&
pcard
:
dField
.
selectable_cards
)
dField
.
SetShowMark
(
pcard
,
false
);
}
if
(
win
==
wCardDisplay
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardDisplay
[
i
]
->
setDrawImage
(
false
);
stCardListTip
->
setVisible
(
false
);
for
(
auto
&
pcard
:
dField
.
display_cards
)
dField
.
SetShowMark
(
pcard
,
false
);
}
fadingList
.
push_back
(
fu
);
}
...
...
gframe/duelclient.cpp
View file @
eaaa8e64
...
...
@@ -8,7 +8,6 @@
#include "game.h"
#include "replay.h"
#include "replay_mode.h"
#include <algorithm>
namespace
ygo
{
...
...
@@ -1127,7 +1126,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
if
(
mainGame
->
LocalPlayer
(
player
)
==
0
)
{
mainGame
->
showcardcode
=
1
;
if
(
match_kill
)
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
20
),
dataManager
.
GetName
(
match_kill
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
ffff
),
dataManager
.
GetName
(
match_kill
));
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
clientname
,
dataManager
.
GetVictoryString
(
type
));
else
...
...
@@ -1136,7 +1135,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
else
{
mainGame
->
showcardcode
=
2
;
if
(
match_kill
)
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
20
),
dataManager
.
GetName
(
match_kill
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
ffff
),
dataManager
.
GetName
(
match_kill
));
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
hostname
,
dataManager
.
GetVictoryString
(
type
));
else
...
...
@@ -1927,8 +1926,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
return
mainGame
->
dField
.
ShowSelectSum
(
mainGame
->
dField
.
select_panalmode
);
}
case
MSG_SORT_CARD
:
case
MSG_SORT_CHAIN
:
{
case
MSG_SORT_CARD
:
{
/*int player = */
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
selectable_cards
.
clear
();
...
...
@@ -1948,16 +1946,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
selectable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
sort_list
.
push_back
(
0
);
}
if
(
mainGame
->
chkAutoChain
->
isChecked
()
&&
mainGame
->
dInfo
.
curMsg
==
MSG_SORT_CHAIN
)
{
mainGame
->
dField
.
sort_list
.
clear
();
SetResponseI
(
-
1
);
DuelClient
::
SendResponse
();
return
true
;
}
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SORT_CHAIN
)
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
206
));
else
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
205
));
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
205
));
mainGame
->
dField
.
select_min
=
0
;
mainGame
->
dField
.
select_max
=
count
;
mainGame
->
dField
.
ShowSelectCard
();
...
...
gframe/event_handler.cpp
View file @
eaaa8e64
...
...
@@ -11,7 +11,6 @@
#include "single_mode.h"
#include "materials.h"
#include "../ocgcore/common.h"
#include <algorithm>
namespace
ygo
{
...
...
@@ -639,7 +638,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
BUTTON_CARD_4
:
{
if
(
mainGame
->
dInfo
.
isReplay
)
break
;
mainGame
->
stCardListTip
->
setVisible
(
false
);
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_SELECT_IDLECMD
:
case
MSG_SELECT_BATTLECMD
:
...
...
@@ -736,7 +734,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
selected_cards
.
size
()
>
0
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);}
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
case
MSG_SELECT_SUM
:
{
...
...
@@ -745,7 +744,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ShowSelectSum
(
true
);
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
int
offset
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
int
sel_seq
=
id
-
BUTTON_CARD_0
+
offset
;
...
...
@@ -785,7 +783,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
BUTTON_CARD_SEL_OK
:
{
mainGame
->
stCardListTip
->
setVisible
(
false
);
if
(
mainGame
->
dInfo
.
isReplay
)
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
break
;
...
...
@@ -1032,13 +1029,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
&&
mainGame
->
stCardListTip
->
isVisible
()
)
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
&&
mainGame
->
stCardListTip
->
isVisible
()
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
false
);
...
...
@@ -2503,7 +2500,6 @@ void ClientField::CancelOrFinish() {
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
...
...
gframe/game.cpp
View file @
eaaa8e64
...
...
@@ -16,7 +16,7 @@
#include "single_mode.h"
#endif //YGOPRO_SERVER_MODE
const
unsigned
short
PRO_VERSION
=
0x13
4B
;
const
unsigned
short
PRO_VERSION
=
0x13
50
;
namespace
ygo
{
...
...
gframe/replay.cpp
View file @
eaaa8e64
#include "replay.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
#include <algorithm>
#include "lzma/LzmaLib.h"
namespace
ygo
{
...
...
gframe/replay_mode.cpp
View file @
eaaa8e64
...
...
@@ -425,8 +425,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
pbuf
+=
count
*
11
;
return
ReadReplayResponse
();
}
case
MSG_SORT_CARD
:
case
MSG_SORT_CHAIN
:
{
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
7
;
...
...
gframe/single_duel.cpp
View file @
eaaa8e64
...
...
@@ -938,8 +938,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
}
case
MSG_SORT_CARD
:
case
MSG_SORT_CHAIN
:
{
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
7
;
...
...
gframe/single_mode.cpp
View file @
eaaa8e64
...
...
@@ -339,8 +339,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
}
break
;
}
case
MSG_SORT_CARD
:
case
MSG_SORT_CHAIN
:
{
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
7
;
...
...
gframe/tag_duel.cpp
View file @
eaaa8e64
...
...
@@ -865,8 +865,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
}
case
MSG_SORT_CARD
:
case
MSG_SORT_CHAIN
:
{
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
7
;
...
...
lflist.conf
View file @
eaaa8e64
This diff is collapsed.
Click to expand it.
ocgcore
@
86d502db
Subproject commit
b644fa90330446a834a49b7539dae9eafdfe2610
Subproject commit
86d502dbfb8fc058439b39945cb3384955a52aea
premake4.lua
View file @
eaaa8e64
...
...
@@ -41,9 +41,6 @@ solution "ygo"
defines
"NDEBUG"
buildoptions
"-march=native"
configuration
{
"Debug"
,
"vs*"
}
defines
{
"_ITERATOR_DEBUG_LEVEL=0"
}
configuration
"Release"
flags
{
"OptimizeSpeed"
}
targetdir
"bin/release"
...
...
script
@
b820812a
Subproject commit
7dc4b3df15a51904a31bd967d3588cbdd3533c9
c
Subproject commit
b820812a1ffb14eeb0022b2336c0c8c93d856d5
c
strings.conf
View file @
eaaa8e64
...
...
@@ -508,7 +508,8 @@
!
victory
0
x1d
「方程式运动员胜利团队」效果胜利
!
victory
0
x1e
「飞行象」效果胜利
!
victory
0
x1f
「守护神 艾克佐迪亚」效果胜利
!
victory
0
x20
由于「%
ls
」的效果获得比赛胜利
!
victory
0
x20
「真艾克佐迪亚」效果胜利
!
victory
0
xffff
由于「%
ls
」的效果获得比赛胜利
#counters
!
counter
0
x1
魔力指示物
!
counter
0
x1002
楔指示物
...
...
@@ -993,3 +994,6 @@
!
setname
0
x139
守护神官 守護神官
!
setname
0
x13a
拟声 オノマト
!
setname
0
x13b
叛逆 リベリオン
!
setname
0
x13c
代码破坏者 コードブレイカー
!
setname
0
x13d
星义 ネメシス
!
setname
0
x13e
巴巴罗斯 バルバロス
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