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
1
Merge Requests
1
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
nanahira
ygopro
Commits
8a37c8be
Commit
8a37c8be
authored
Jun 11, 2018
by
edo9300
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/Fluorohydride/master'
parents
8107c321
6afb4850
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
28 deletions
+43
-28
gframe/client_field.cpp
gframe/client_field.cpp
+10
-14
gframe/drawing.cpp
gframe/drawing.cpp
+2
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+11
-6
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
gframe/old_replay_mode.cpp
gframe/old_replay_mode.cpp
+1
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+9
-2
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+8
-2
No files found.
gframe/client_field.cpp
View file @
8a37c8be
...
...
@@ -306,7 +306,6 @@ void ClientField::UpdateCard(int controler, int location, int sequence, char* da
}
void
ClientField
::
UpdateFieldCard
(
int
controler
,
int
location
,
char
*
data
)
{
std
::
vector
<
ClientCard
*>*
lst
=
0
;
std
::
vector
<
ClientCard
*>::
iterator
cit
;
switch
(
location
)
{
case
LOCATION_DECK
:
lst
=
&
deck
[
controler
];
...
...
@@ -333,7 +332,7 @@ void ClientField::UpdateFieldCard(int controler, int location, char* data) {
if
(
!
lst
)
return
;
int
len
;
for
(
cit
=
lst
->
begin
();
cit
!=
lst
->
end
();
++
cit
)
{
for
(
auto
cit
=
lst
->
begin
();
cit
!=
lst
->
end
();
++
cit
)
{
len
=
BufferIO
::
ReadInt32
(
data
);
if
(
len
>
8
)
(
*
cit
)
->
UpdateInfo
(
data
);
...
...
@@ -341,20 +340,19 @@ void ClientField::UpdateFieldCard(int controler, int location, char* data) {
}
}
void
ClientField
::
ClearCommandFlag
()
{
std
::
vector
<
ClientCard
*>::
iterator
cit
;
for
(
cit
=
activatable_cards
.
begin
();
cit
!=
activatable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
activatable_cards
.
begin
();
cit
!=
activatable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
summonable_cards
.
begin
();
cit
!=
summonable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
summonable_cards
.
begin
();
cit
!=
summonable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
spsummonable_cards
.
begin
();
cit
!=
spsummonable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
spsummonable_cards
.
begin
();
cit
!=
spsummonable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
msetable_cards
.
begin
();
cit
!=
msetable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
msetable_cards
.
begin
();
cit
!=
msetable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
ssetable_cards
.
begin
();
cit
!=
ssetable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
ssetable_cards
.
begin
();
cit
!=
ssetable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
reposable_cards
.
begin
();
cit
!=
reposable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
reposable_cards
.
begin
();
cit
!=
reposable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
attackable_cards
.
begin
();
cit
!=
attackable_cards
.
end
();
++
cit
)
for
(
auto
cit
=
attackable_cards
.
begin
();
cit
!=
attackable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
conti_cards
.
clear
();
deck_act
=
false
;
...
...
@@ -366,15 +364,13 @@ void ClientField::ClearCommandFlag() {
conti_act
=
false
;
}
void
ClientField
::
ClearSelect
()
{
std
::
vector
<
ClientCard
*>::
iterator
cit
;
for
(
cit
=
selectable_cards
.
begin
();
cit
!=
selectable_cards
.
end
();
++
cit
)
{
for
(
auto
cit
=
selectable_cards
.
begin
();
cit
!=
selectable_cards
.
end
();
++
cit
)
{
(
*
cit
)
->
is_selectable
=
false
;
(
*
cit
)
->
is_selected
=
false
;
}
}
void
ClientField
::
ClearChainSelect
()
{
std
::
vector
<
ClientCard
*>::
iterator
cit
;
for
(
cit
=
activatable_cards
.
begin
();
cit
!=
activatable_cards
.
end
();
++
cit
)
{
for
(
auto
cit
=
activatable_cards
.
begin
();
cit
!=
activatable_cards
.
end
();
++
cit
)
{
(
*
cit
)
->
cmdFlag
=
0
;
(
*
cit
)
->
chain_code
=
0
;
(
*
cit
)
->
is_selectable
=
false
;
...
...
gframe/drawing.cpp
View file @
8a37c8be
...
...
@@ -663,8 +663,7 @@ void Game::ConvertCoords(float x, float y, int* x1, int* y1) {
}
void
Game
::
DrawGUI
()
{
if
(
imageLoading
.
size
())
{
std
::
map
<
irr
::
gui
::
CGUIImageButton
*
,
int
>::
iterator
mit
;
for
(
mit
=
imageLoading
.
begin
();
mit
!=
imageLoading
.
end
();
++
mit
)
for
(
auto
mit
=
imageLoading
.
begin
();
mit
!=
imageLoading
.
end
();
++
mit
)
mit
->
first
->
setImage
(
imageManager
.
GetTexture
(
mit
->
second
));
imageLoading
.
clear
();
}
...
...
@@ -763,7 +762,7 @@ void Game::DrawSpec() {
}
case
2
:
{
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
),
Resize
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
tMask
,
ResizeElem
(
574
+
showcarddif
,
150
,
7
6
1
,
404
),
recti
(
0
,
0
,
CARD_IMG_WIDTH
-
showcarddif
,
254
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tMask
,
ResizeElem
(
574
+
showcarddif
,
150
,
7
5
1
,
404
),
recti
(
0
,
0
,
CARD_IMG_WIDTH
-
showcarddif
,
254
),
0
,
0
,
true
);
showcarddif
+=
15
;
if
(
showcarddif
>=
CARD_IMG_WIDTH
)
{
showcard
=
0
;
...
...
gframe/duelclient.cpp
View file @
8a37c8be
...
...
@@ -2459,8 +2459,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
std
::
vector
<
ClientCard
*>::
iterator
cit
;
std
::
vector
<
ClientCard
*>*
lst
=
0
;
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
if
(
loc
==
LOCATION_MZONE
)
lst
=
mainGame
->
dField
.
mzone
;
else
lst
=
mainGame
->
dField
.
szone
;
ClientCard
*
mc
[
5
];
ClientCard
*
swp
;
int
c
,
l
,
s
,
ps
;
...
...
@@ -2469,7 +2474,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
l
=
BufferIO
::
ReadInt8
(
pbuf
);
s
=
BufferIO
::
ReadInt8
(
pbuf
);
BufferIO
::
ReadInt8
(
pbuf
);
mc
[
i
]
=
mainGame
->
dField
.
mzone
[
c
][
s
];
mc
[
i
]
=
lst
[
c
][
s
];
mc
[
i
]
->
SetCode
(
0
);
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mc
[
i
]
->
dPos
=
irr
::
core
::
vector3df
((
3.95
f
-
mc
[
i
]
->
curPos
.
X
)
/
10
,
0
,
0.05
f
);
...
...
@@ -2487,9 +2492,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
BufferIO
::
ReadInt8
(
pbuf
);
ps
=
mc
[
i
]
->
sequence
;
if
(
l
>
0
)
{
swp
=
mainGame
->
dField
.
mzone
[
c
][
s
];
mainGame
->
dField
.
mzone
[
c
][
ps
]
=
swp
;
mainGame
->
dField
.
mzone
[
c
][
s
]
=
mc
[
i
];
swp
=
lst
[
c
][
s
];
lst
[
c
][
ps
]
=
swp
;
lst
[
c
][
s
]
=
mc
[
i
];
mc
[
i
]
->
sequence
=
s
;
swp
->
sequence
=
ps
;
}
...
...
@@ -2497,7 +2502,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
mainGame
->
dField
.
MoveCard
(
mc
[
i
],
10
);
for
(
cit
=
mc
[
i
]
->
overlayed
.
begin
();
cit
!=
mc
[
i
]
->
overlayed
.
end
();
++
cit
)
for
(
auto
cit
=
mc
[
i
]
->
overlayed
.
begin
();
cit
!=
mc
[
i
]
->
overlayed
.
end
();
++
cit
)
mainGame
->
dField
.
MoveCard
(
*
cit
,
10
);
}
mainGame
->
WaitFrameSignal
(
11
);
...
...
gframe/event_handler.cpp
View file @
8a37c8be
...
...
@@ -1522,7 +1522,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str
.
append
(
formatBuffer
);
}
}
for
(
std
::
map
<
int
,
int
>::
iterator
ctit
=
mcard
->
counters
.
begin
();
ctit
!=
mcard
->
counters
.
end
();
++
ctit
)
{
for
(
auto
ctit
=
mcard
->
counters
.
begin
();
ctit
!=
mcard
->
counters
.
end
();
++
ctit
)
{
myswprintf
(
formatBuffer
,
L"
\n
[%ls]: %d"
,
dataManager
.
GetCounterName
(
ctit
->
first
),
ctit
->
second
);
str
.
append
(
formatBuffer
);
}
...
...
gframe/old_replay_mode.cpp
View file @
8a37c8be
...
...
@@ -444,6 +444,7 @@ namespace ygo {
break
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
...
...
gframe/single_duel.cpp
View file @
8a37c8be
...
...
@@ -934,14 +934,21 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
ReSendToPlayer
(
players
[
1
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
if
(
loc
==
LOCATION_MZONE
)
{
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
}
else
{
RefreshSzone
(
0
,
0x181fff
,
0
);
RefreshSzone
(
1
,
0x181fff
,
0
);
}
break
;
}
case
MSG_NEW_TURN
:
{
...
...
gframe/single_mode.cpp
View file @
8a37c8be
...
...
@@ -458,6 +458,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
break
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
...
...
gframe/tag_duel.cpp
View file @
8a37c8be
...
...
@@ -890,6 +890,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
@@ -898,8 +899,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
ReSendToPlayer
(
players
[
3
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
if
(
loc
==
LOCATION_MZONE
)
{
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
}
else
{
RefreshSzone
(
0
,
0x181fff
,
0
);
RefreshSzone
(
1
,
0x181fff
,
0
);
}
break
;
}
case
MSG_NEW_TURN
:
{
...
...
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