Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
aadb8c2a
Commit
aadb8c2a
authored
May 26, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into server
parents
24519d9e
366bdc0a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
24 deletions
+20
-24
gframe/client_field.cpp
gframe/client_field.cpp
+7
-11
gframe/client_field.h
gframe/client_field.h
+3
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+3
-3
gframe/event_handler.cpp
gframe/event_handler.cpp
+2
-2
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
script
script
+1
-1
No files found.
gframe/client_field.cpp
View file @
aadb8c2a
...
@@ -1451,7 +1451,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
...
@@ -1451,7 +1451,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
}
}
void
ClientField
::
UpdateDeclarableCodeType
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeType
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
CardString
cstr
;
...
@@ -1464,9 +1464,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
...
@@ -1464,9 +1464,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
return
;
return
;
}
}
bool
try_cache
=
false
;
bool
try_cache
=
false
;
if
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
{
if
(
pname
[
0
]
==
0
)
{
if
(
!
enter
)
return
;
try_cache
=
true
;
try_cache
=
true
;
}
}
mainGame
->
lstANCard
->
clear
();
mainGame
->
lstANCard
->
clear
();
...
@@ -1498,7 +1496,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
...
@@ -1498,7 +1496,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
}
}
}
}
}
}
void
ClientField
::
UpdateDeclarableCodeOpcode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeOpcode
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
CardString
cstr
;
...
@@ -1511,9 +1509,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
...
@@ -1511,9 +1509,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
return
;
return
;
}
}
bool
try_cache
=
false
;
bool
try_cache
=
false
;
if
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
{
if
(
pname
[
0
]
==
0
)
{
if
(
!
enter
)
return
;
try_cache
=
true
;
try_cache
=
true
;
}
}
mainGame
->
lstANCard
->
clear
();
mainGame
->
lstANCard
->
clear
();
...
@@ -1545,11 +1541,11 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
...
@@ -1545,11 +1541,11 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
}
}
}
}
}
}
void
ClientField
::
UpdateDeclarableCode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCode
()
{
if
(
opcode
.
size
()
==
0
)
if
(
opcode
.
size
()
==
0
)
UpdateDeclarableCodeType
(
enter
);
UpdateDeclarableCodeType
();
else
else
UpdateDeclarableCodeOpcode
(
enter
);
UpdateDeclarableCodeOpcode
();
}
}
void
ClientField
::
RefreshCardCountDisplay
()
{
void
ClientField
::
RefreshCardCountDisplay
()
{
ClientCard
*
pcard
;
ClientCard
*
pcard
;
...
...
gframe/client_field.h
View file @
aadb8c2a
...
@@ -113,9 +113,9 @@ public:
...
@@ -113,9 +113,9 @@ public:
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
void
UpdateDeclarableCodeType
(
bool
enter
);
void
UpdateDeclarableCodeType
();
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCodeOpcode
();
void
UpdateDeclarableCode
(
bool
enter
);
void
UpdateDeclarableCode
();
void
RefreshCardCountDisplay
();
void
RefreshCardCountDisplay
();
...
...
gframe/duelclient.cpp
View file @
aadb8c2a
...
@@ -3606,7 +3606,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
...
@@ -3606,7 +3606,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
true
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
@@ -3633,7 +3633,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
...
@@ -3633,7 +3633,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
}
}
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
/*int player = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
/*int player = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
mainGame
->
dField
.
declarable_type
=
0
;
mainGame
->
dField
.
declarable_type
=
0
;
mainGame
->
dField
.
opcode
.
clear
();
mainGame
->
dField
.
opcode
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
for
(
int
i
=
0
;
i
<
count
;
++
i
)
...
@@ -3645,7 +3645,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
...
@@ -3645,7 +3645,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
true
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
...
gframe/event_handler.cpp
View file @
aadb8c2a
...
@@ -961,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -961,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
false
);
UpdateDeclarableCode
();
break
;
break
;
}
}
}
}
...
@@ -970,7 +970,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -970,7 +970,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
true
);
UpdateDeclarableCode
();
break
;
break
;
}
}
}
}
...
...
gframe/replay_mode.cpp
View file @
aadb8c2a
...
@@ -779,7 +779,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -779,7 +779,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
...
...
gframe/single_duel.cpp
View file @
aadb8c2a
...
@@ -1677,7 +1677,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1677,7 +1677,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
gframe/single_mode.cpp
View file @
aadb8c2a
...
@@ -697,7 +697,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
...
@@ -697,7 +697,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
mainGame
->
singleSignal
.
Reset
();
mainGame
->
singleSignal
.
Reset
();
...
...
gframe/tag_duel.cpp
View file @
aadb8c2a
...
@@ -1741,7 +1741,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1741,7 +1741,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
script
@
4d18e52c
Subproject commit
a880d2694549c77e51846cb2d0029e4ddd3e2b8f
Subproject commit
4d18e52cb6b232c24b8c34f4817c8bde0c7bd58a
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