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
d1b1bc79
Commit
d1b1bc79
authored
Feb 28, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9b0c8181
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
20 deletions
+36
-20
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-8
gframe/event_handler.cpp
gframe/event_handler.cpp
+3
-1
gframe/game.cpp
gframe/game.cpp
+4
-3
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+12
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+10
-5
system.conf
system.conf
+1
-1
No files found.
gframe/duelclient.cpp
View file @
d1b1bc79
...
...
@@ -1420,14 +1420,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return
true
;
}
case
MSG_DECK_TOP
:
{
int
p0
=
mainGame
->
LocalPlayer
(
0
);
int
p1
=
mainGame
->
LocalPlayer
(
1
);
int
code0
=
BufferIO
::
ReadInt32
(
pbuf
);
int
code1
=
BufferIO
::
ReadInt32
(
pbuf
);
if
(
code0
)
mainGame
->
dField
.
GetCard
(
p0
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
p0
].
size
()
-
1
)
->
SetCode
(
code0
);
if
(
code1
)
mainGame
->
dField
.
GetCard
(
p1
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
p1
].
size
()
-
1
)
->
SetCode
(
code1
);
int
player
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
seq
=
BufferIO
::
ReadInt8
(
pbuf
);
int
code
=
BufferIO
::
ReadInt32
(
pbuf
);
mainGame
->
dField
.
GetCard
(
player
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
player
].
size
()
-
1
-
seq
)
->
SetCode
(
code
);
return
true
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
...
...
gframe/event_handler.cpp
View file @
d1b1bc79
...
...
@@ -1189,7 +1189,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mcard
=
*
(
remove
[
hovered_controler
].
rbegin
());
if
(
mcard
->
position
&
POS_FACEDOWN
)
mcard
=
0
;
}
else
mcard
=
0
;
}
else
if
(
hovered_location
==
LOCATION_DECK
&&
deck
[
hovered_controler
].
size
())
mcard
=
*
(
deck
[
hovered_controler
].
rbegin
());
else
mcard
=
0
;
}
if
(
hovered_location
==
LOCATION_HAND
&&
(
mainGame
->
dInfo
.
is_shuffling
||
mainGame
->
dInfo
.
curMsg
==
MSG_SHUFFLE_HAND
))
mcard
=
0
;
...
...
gframe/game.cpp
View file @
d1b1bc79
...
...
@@ -750,9 +750,10 @@ void Game::ClearTextures() {
imageManager
.
ClearTexture
();
}
void
Game
::
CloseDuelWindow
()
{
for
(
auto
wit
=
fadingList
.
begin
();
wit
!=
fadingList
.
end
();
++
wit
)
wit
->
guiFading
->
setRelativePosition
(
wit
->
fadingSize
);
fadingList
.
clear
();
for
(
auto
wit
=
fadingList
.
begin
();
wit
!=
fadingList
.
end
();
++
wit
)
{
if
(
wit
->
isFadein
)
wit
->
autoFadeoutFrame
=
1
;
}
wACMessage
->
setVisible
(
false
);
wANAttribute
->
setVisible
(
false
);
wANCard
->
setVisible
(
false
);
...
...
gframe/replay_mode.cpp
View file @
d1b1bc79
...
...
@@ -279,7 +279,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
break
;
}
case
MSG_DECK_TOP
:
{
pbuf
+=
8
;
pbuf
+=
6
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
...
...
gframe/single_duel.cpp
View file @
d1b1bc79
...
...
@@ -780,7 +780,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
}
case
MSG_DECK_TOP
:
{
pbuf
+=
8
;
pbuf
+=
6
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
ReSendToPlayer
(
players
[
1
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
...
...
ocgcore/operations.cpp
View file @
d1b1bc79
...
...
@@ -334,6 +334,12 @@ int32 field::draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reaso
core
.
hint_timing
[
playerid
]
|=
TIMING_DRAW
+
TIMING_TOHAND
;
adjust_instant
();
core
.
units
.
begin
()
->
arg2
=
(
core
.
units
.
begin
()
->
arg2
&
0xff000000
)
+
drawed
;
if
(
core
.
deck_reversed
&&
player
[
playerid
].
list_main
.
size
())
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
drawed
);
pduel
->
write_buffer32
((
*
player
[
playerid
].
list_main
.
rbegin
())
->
data
.
code
);
}
if
(
drawed
>
0
)
{
pduel
->
write_buffer8
(
MSG_DRAW
);
pduel
->
write_buffer8
(
playerid
);
...
...
@@ -2422,6 +2428,12 @@ int32 field::discard_deck(uint16 step, uint8 playerid, uint8 count, uint32 reaso
dest
=
redirect
;
}
}
if
(
core
.
deck_reversed
&&
player
[
playerid
].
list_main
.
size
()
>
count
)
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
count
);
pduel
->
write_buffer32
((
*
(
player
[
playerid
].
list_main
.
rbegin
()
+
count
))
->
data
.
code
);
}
return
FALSE
;
}
case
1
:
{
...
...
ocgcore/processor.cpp
View file @
d1b1bc79
...
...
@@ -4429,13 +4429,18 @@ int32 field::adjust_step(uint16 step) {
}
core
.
deck_reversed
=
rv
;
if
(
core
.
deck_reversed
)
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
if
(
player
[
0
].
list_main
.
size
())
if
(
player
[
0
].
list_main
.
size
())
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
((
*
player
[
0
].
list_main
.
rbegin
())
->
data
.
code
);
else
pduel
->
write_buffer32
(
0
);
if
(
player
[
1
].
list_main
.
size
())
}
if
(
player
[
1
].
list_main
.
size
())
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
1
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
((
*
player
[
1
].
list_main
.
rbegin
())
->
data
.
code
);
else
pduel
->
write_buffer32
(
0
);
}
}
return
FALSE
;
}
...
...
system.conf
View file @
d1b1bc79
...
...
@@ -7,5 +7,5 @@ lastdeck = test
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
lastip
=
192
.
168
.
3
.
235
lastip
=
192
.
168
.
2
.
100
lastport
=
7911
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