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
wyykak
ygopro
Commits
3043535b
Commit
3043535b
authored
Jun 09, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/Fluorohydride/master'
parents
706ddc71
84703625
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
43 deletions
+42
-43
gframe/client_field.cpp
gframe/client_field.cpp
+2
-2
gframe/drawing.cpp
gframe/drawing.cpp
+14
-20
gframe/duelclient.cpp
gframe/duelclient.cpp
+11
-6
gframe/event_handler.cpp
gframe/event_handler.cpp
+9
-9
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/game.h
gframe/game.h
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
ocgcore
ocgcore
+1
-1
No files found.
gframe/client_field.cpp
View file @
3043535b
...
@@ -719,7 +719,7 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
...
@@ -719,7 +719,7 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
t
->
X
=
0
;
t
->
X
=
0
;
t
->
Y
=
0
;
t
->
Y
=
0
;
t
->
Z
=
0
;
t
->
Z
=
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
switch
((
location
&
0x7f
))
{
switch
((
location
&
0x7f
))
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
@@ -775,7 +775,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -775,7 +775,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
int
controler
=
pcard
->
controler
;
int
controler
=
pcard
->
controler
;
int
sequence
=
pcard
->
sequence
;
int
sequence
=
pcard
->
sequence
;
int
location
=
pcard
->
location
;
int
location
=
pcard
->
location
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
switch
(
location
)
{
switch
(
location
)
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
...
gframe/drawing.cpp
View file @
3043535b
...
@@ -67,7 +67,7 @@ void Game::DrawBackGround() {
...
@@ -67,7 +67,7 @@ void Game::DrawBackGround() {
int
fieldcode1
=
-
1
;
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
int
fieldcode2
=
-
1
;
bool
drawField
=
false
;
bool
drawField
=
false
;
int
rule
=
(
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
mainGame
->
gameConf
.
draw_field_spell
if
(
mainGame
->
gameConf
.
draw_field_spell
&&
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
&&
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
...
@@ -160,9 +160,9 @@ void Game::DrawBackGround() {
...
@@ -160,9 +160,9 @@ void Game::DrawBackGround() {
}
}
}
}
//current sel
//current sel
if
(
dField
.
hovered_location
!=
0
&&
dField
.
hovered_location
!=
2
&&
dField
.
hovered_location
!=
POSITION_HINT
if
(
dField
.
hovered_location
!=
0
&&
dField
.
hovered_location
!=
2
&&
dField
.
hovered_location
!=
POSITION_HINT
&&
!
(
dInfo
.
duel_rule
<
3
&&
dField
.
hovered_location
==
LOCATION_MZONE
&&
dField
.
hovered_sequence
>
4
)
&&
!
(
dInfo
.
duel_rule
<
4
&&
dField
.
hovered_location
==
LOCATION_MZONE
&&
dField
.
hovered_sequence
>
4
)
&&
!
(
dInfo
.
duel_rule
>=
3
&&
dField
.
hovered_location
==
LOCATION_SZONE
&&
dField
.
hovered_sequence
>
5
))
{
&&
!
(
dInfo
.
duel_rule
>=
4
&&
dField
.
hovered_location
==
LOCATION_SZONE
&&
dField
.
hovered_sequence
>
5
))
{
S3DVertex
*
vertex
=
0
;
S3DVertex
*
vertex
=
0
;
if
(
dField
.
hovered_location
==
LOCATION_DECK
)
if
(
dField
.
hovered_location
==
LOCATION_DECK
)
vertex
=
matManager
.
vFieldDeck
[
dField
.
hovered_controler
];
vertex
=
matManager
.
vFieldDeck
[
dField
.
hovered_controler
];
...
@@ -172,8 +172,7 @@ void Game::DrawBackGround() {
...
@@ -172,8 +172,7 @@ void Game::DrawBackGround() {
if
(
pcard
&&
pcard
->
type
&
TYPE_LINK
)
{
if
(
pcard
&&
pcard
->
type
&
TYPE_LINK
)
{
DrawLinkedZones
(
pcard
);
DrawLinkedZones
(
pcard
);
}
}
}
}
else
if
(
dField
.
hovered_location
==
LOCATION_SZONE
)
else
if
(
dField
.
hovered_location
==
LOCATION_SZONE
)
vertex
=
matManager
.
vFieldSzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
][
rule
];
vertex
=
matManager
.
vFieldSzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
][
rule
];
else
if
(
dField
.
hovered_location
==
LOCATION_GRAVE
)
else
if
(
dField
.
hovered_location
==
LOCATION_GRAVE
)
vertex
=
matManager
.
vFieldGrave
[
dField
.
hovered_controler
][
rule
];
vertex
=
matManager
.
vFieldGrave
[
dField
.
hovered_controler
][
rule
];
...
@@ -200,19 +199,18 @@ void Game::DrawLinkedZones(ClientCard* pcard) {
...
@@ -200,19 +199,18 @@ void Game::DrawLinkedZones(ClientCard* pcard) {
int
mark
=
pcard
->
link_marker
;
int
mark
=
pcard
->
link_marker
;
matManager
.
mSelField
.
AmbientColor
=
0xff0261a2
;
matManager
.
mSelField
.
AmbientColor
=
0xff0261a2
;
driver
->
setMaterial
(
matManager
.
mSelField
);
driver
->
setMaterial
(
matManager
.
mSelField
);
if
(
dField
.
hovered_sequence
<
5
)
{
if
(
dField
.
hovered_sequence
<
5
)
{
if
(
mark
&
LINK_MARKER_LEFT
&&
dField
.
hovered_sequence
>
0
)
if
(
mark
&
LINK_MARKER_LEFT
&&
dField
.
hovered_sequence
>
0
)
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
-
1
],
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
-
1
],
4
,
matManager
.
iRectangle
,
2
);
if
(
mark
&
LINK_MARKER_RIGHT
&&
dField
.
hovered_sequence
<
4
)
if
(
mark
&
LINK_MARKER_RIGHT
&&
dField
.
hovered_sequence
<
4
)
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
+
1
],
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
dField
.
hovered_sequence
+
1
],
4
,
matManager
.
iRectangle
,
2
);
if
(
dInfo
.
duel_rule
>=
3
)
{
if
(
dInfo
.
duel_rule
>=
4
)
{
if
((
mark
&
LINK_MARKER_TOP_LEFT
&&
dField
.
hovered_sequence
==
2
)
||
(
mark
&
LINK_MARKER_TOP
&&
dField
.
hovered_sequence
==
1
)
||
(
mark
&
LINK_MARKER_TOP_RIGHT
&&
dField
.
hovered_sequence
==
0
))
if
((
mark
&
LINK_MARKER_TOP_LEFT
&&
dField
.
hovered_sequence
==
2
)
||
(
mark
&
LINK_MARKER_TOP
&&
dField
.
hovered_sequence
==
1
)
||
(
mark
&
LINK_MARKER_TOP_RIGHT
&&
dField
.
hovered_sequence
==
0
))
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
5
],
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
5
],
4
,
matManager
.
iRectangle
,
2
);
if
((
mark
&
LINK_MARKER_TOP_LEFT
&&
dField
.
hovered_sequence
==
4
)
||
(
mark
&
LINK_MARKER_TOP
&&
dField
.
hovered_sequence
==
3
)
||
(
mark
&
LINK_MARKER_TOP_RIGHT
&&
dField
.
hovered_sequence
==
2
))
if
((
mark
&
LINK_MARKER_TOP_LEFT
&&
dField
.
hovered_sequence
==
4
)
||
(
mark
&
LINK_MARKER_TOP
&&
dField
.
hovered_sequence
==
3
)
||
(
mark
&
LINK_MARKER_TOP_RIGHT
&&
dField
.
hovered_sequence
==
2
))
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
6
],
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
6
],
4
,
matManager
.
iRectangle
,
2
);
}
}
}
}
else
{
else
{
int
swap
=
(
dField
.
hovered_sequence
==
5
)
?
0
:
2
;
int
swap
=
(
dField
.
hovered_sequence
==
5
)
?
0
:
2
;
if
(
mark
&
LINK_MARKER_BOTTOM_LEFT
)
if
(
mark
&
LINK_MARKER_BOTTOM_LEFT
)
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
0
+
swap
],
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vFieldMzone
[
dField
.
hovered_controler
][
0
+
swap
],
4
,
matManager
.
iRectangle
,
2
);
...
@@ -317,7 +315,7 @@ void Game::DrawCard(ClientCard* pcard) {
...
@@ -317,7 +315,7 @@ void Game::DrawCard(ClientCard* pcard) {
}
}
void
Game
::
DrawMisc
()
{
void
Game
::
DrawMisc
()
{
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
int
rule
=
(
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
irr
::
core
::
matrix4
im
,
ic
,
it
;
irr
::
core
::
matrix4
im
,
ic
,
it
;
act_rot
.
Z
+=
0.02
f
;
act_rot
.
Z
+=
0.02
f
;
im
.
setRotationRadians
(
act_rot
);
im
.
setRotationRadians
(
act_rot
);
...
@@ -348,18 +346,14 @@ void Game::DrawMisc() {
...
@@ -348,18 +346,14 @@ void Game::DrawMisc() {
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
}
}
if
(
dField
.
pzone_act
[
0
])
{
if
(
dField
.
pzone_act
[
0
])
{
int
seq
=
0
;
int
seq
=
dInfo
.
duel_rule
>=
4
?
0
:
6
;
if
(
dField
.
szone
[
0
][
6
]
&&
dField
.
szone
[
0
][
6
]
->
lscale
)
seq
=
6
;
im
.
setTranslation
(
vector3df
((
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
1
].
Pos
.
X
)
/
2
,
im
.
setTranslation
(
vector3df
((
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
1
].
Pos
.
X
)
/
2
,
(
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
2
].
Pos
.
Y
)
/
2
,
0.03
f
));
(
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
0
][
seq
][
rule
][
2
].
Pos
.
Y
)
/
2
,
0.03
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
}
}
if
(
dField
.
pzone_act
[
1
])
{
if
(
dField
.
pzone_act
[
1
])
{
int
seq
=
0
;
int
seq
=
dInfo
.
duel_rule
>=
4
?
0
:
6
;
if
(
dField
.
szone
[
1
][
6
]
&&
dField
.
szone
[
1
][
6
]
->
lscale
)
seq
=
6
;
im
.
setTranslation
(
vector3df
((
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
1
].
Pos
.
X
)
/
2
,
im
.
setTranslation
(
vector3df
((
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
1
].
Pos
.
X
)
/
2
,
(
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
2
].
Pos
.
Y
)
/
2
,
0.03
f
));
(
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
1
][
seq
][
rule
][
2
].
Pos
.
Y
)
/
2
,
0.03
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
...
@@ -478,7 +472,7 @@ void Game::DrawMisc() {
...
@@ -478,7 +472,7 @@ void Game::DrawMisc() {
pcard
=
dField
.
mzone
[
1
][
6
];
pcard
=
dField
.
mzone
[
1
][
6
];
if
(
pcard
&&
(
pcard
->
position
&
POS_FACEUP
))
if
(
pcard
&&
(
pcard
->
position
&
POS_FACEUP
))
DrawStatus
(
pcard
,
593
,
291
,
555
,
338
);
DrawStatus
(
pcard
,
593
,
291
,
555
,
338
);
if
(
dInfo
.
duel_rule
<
3
)
{
if
(
dInfo
.
duel_rule
<
4
)
{
pcard
=
dField
.
szone
[
0
][
6
];
pcard
=
dField
.
szone
[
0
][
6
];
if
(
pcard
)
{
if
(
pcard
)
{
adFont
->
draw
(
pcard
->
lscstring
,
mainGame
->
Resize
(
426
,
394
,
438
,
414
),
0xff000000
,
true
,
false
,
0
);
adFont
->
draw
(
pcard
->
lscstring
,
mainGame
->
Resize
(
426
,
394
,
438
,
414
),
0xff000000
,
true
,
false
,
0
);
...
...
gframe/duelclient.cpp
View file @
3043535b
...
@@ -119,7 +119,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -119,7 +119,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
cscg
.
info
.
draw_count
=
_wtoi
(
mainGame
->
ebDrawCount
->
getText
());
cscg
.
info
.
draw_count
=
_wtoi
(
mainGame
->
ebDrawCount
->
getText
());
cscg
.
info
.
time_limit
=
_wtoi
(
mainGame
->
ebTimeLimit
->
getText
());
cscg
.
info
.
time_limit
=
_wtoi
(
mainGame
->
ebTimeLimit
->
getText
());
cscg
.
info
.
lflist
=
mainGame
->
cbLFlist
->
getItemData
(
mainGame
->
cbLFlist
->
getSelected
());
cscg
.
info
.
lflist
=
mainGame
->
cbLFlist
->
getItemData
(
mainGame
->
cbLFlist
->
getSelected
());
cscg
.
info
.
duel_rule
=
mainGame
->
cbDuelRule
->
getSelected
();
cscg
.
info
.
duel_rule
=
mainGame
->
cbDuelRule
->
getSelected
()
+
1
;
cscg
.
info
.
no_check_deck
=
mainGame
->
chkNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_check_deck
=
mainGame
->
chkNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkNoShuffleDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkNoShuffleDeck
->
isChecked
();
cscg
.
info
.
destiny_draw
=
mainGame
->
chkDrawDestiny
->
isChecked
()
?
2
:
0
;
cscg
.
info
.
destiny_draw
=
mainGame
->
chkDrawDestiny
->
isChecked
()
?
2
:
0
;
...
@@ -356,7 +356,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -356,7 +356,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
myswprintf
(
msgbuf
,
L"%ls%d
\n
"
,
dataManager
.
GetSysString
(
1233
),
pkt
->
info
.
draw_count
);
myswprintf
(
msgbuf
,
L"%ls%d
\n
"
,
dataManager
.
GetSysString
(
1233
),
pkt
->
info
.
draw_count
);
str
.
append
(
msgbuf
);
str
.
append
(
msgbuf
);
if
(
pkt
->
info
.
duel_rule
!=
DEFAULT_DUEL_RULE
)
{
if
(
pkt
->
info
.
duel_rule
!=
DEFAULT_DUEL_RULE
)
{
myswprintf
(
msgbuf
,
L"*%ls
\n
"
,
dataManager
.
GetSysString
(
1260
+
pkt
->
info
.
duel_rule
));
myswprintf
(
msgbuf
,
L"*%ls
\n
"
,
dataManager
.
GetSysString
(
1260
+
pkt
->
info
.
duel_rule
-
1
));
str
.
append
(
msgbuf
);
str
.
append
(
msgbuf
);
}
}
if
(
pkt
->
info
.
destiny_draw
==
2
)
{
if
(
pkt
->
info
.
destiny_draw
==
2
)
{
...
@@ -1122,8 +1122,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1122,8 +1122,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
remove_act
=
true
;
mainGame
->
dField
.
remove_act
=
true
;
else
if
(
pcard
->
location
==
LOCATION_EXTRA
)
else
if
(
pcard
->
location
==
LOCATION_EXTRA
)
mainGame
->
dField
.
extra_act
=
true
;
mainGame
->
dField
.
extra_act
=
true
;
else
if
(
pcard
->
location
==
LOCATION_SZONE
&&
(
pcard
->
sequence
==
0
||
pcard
->
sequence
==
6
)
&&
(
pcard
->
type
&
TYPE_PENDULUM
))
else
{
mainGame
->
dField
.
pzone_act
[
pcard
->
controler
]
=
true
;
int
seq
=
mainGame
->
dInfo
.
duel_rule
>=
4
?
0
:
6
;
if
(
pcard
->
location
==
LOCATION_SZONE
&&
pcard
->
sequence
==
seq
&&
(
pcard
->
type
&
TYPE_PENDULUM
)
&&
!
pcard
->
equipTarget
)
mainGame
->
dField
.
pzone_act
[
pcard
->
controler
]
=
true
;
}
}
}
mainGame
->
dField
.
reposable_cards
.
clear
();
mainGame
->
dField
.
reposable_cards
.
clear
();
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
...
@@ -3139,10 +3142,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3139,10 +3142,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
mainGame
->
stHintMsg
->
setVisible
(
false
);
mainGame
->
stHintMsg
->
setVisible
(
false
);
int
res1
=
(
res
&
0x3
)
-
1
;
int
res2
=
((
res
>>
2
)
&
0x3
)
-
1
;
if
(
mainGame
->
dInfo
.
isFirst
)
if
(
mainGame
->
dInfo
.
isFirst
)
mainGame
->
showcardcode
=
((
res
&
0x3
)
-
1
)
+
((((
res
>>
2
)
&
0x3
)
-
1
)
<<
16
);
mainGame
->
showcardcode
=
res1
+
(
res2
<<
16
);
else
else
mainGame
->
showcardcode
=
(((
res
>>
2
)
&
0x3
)
-
1
)
+
(((
res
&
0x3
)
-
1
)
<<
16
);
mainGame
->
showcardcode
=
res2
+
(
res1
<<
16
);
mainGame
->
showcarddif
=
50
;
mainGame
->
showcarddif
=
50
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
100
;
mainGame
->
showcard
=
100
;
...
...
gframe/event_handler.cpp
View file @
3043535b
...
@@ -2079,7 +2079,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2079,7 +2079,7 @@ void ClientField::GetHoverField(int x, int y) {
irr
::
core
::
recti
sfRect
(
430
,
504
,
875
,
600
);
irr
::
core
::
recti
sfRect
(
430
,
504
,
875
,
600
);
irr
::
core
::
recti
ofRect
(
531
,
135
,
800
,
191
);
irr
::
core
::
recti
ofRect
(
531
,
135
,
800
,
191
);
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
core
::
position2di
pos
(
x
,
y
);
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
sfRect
.
isPointInside
(
pos
))
{
if
(
sfRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
0
].
size
();
int
hc
=
hand
[
0
].
size
();
int
cardSize
=
66
;
int
cardSize
=
66
;
...
@@ -2154,10 +2154,10 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2154,10 +2154,10 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
hovered_sequence
=
6
;
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
...
@@ -2168,7 +2168,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2168,7 +2168,7 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_DECK
;
hovered_location
=
LOCATION_DECK
;
}
}
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
1
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
X
)
{
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
1
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
...
@@ -2176,7 +2176,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2176,7 +2176,7 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
hovered_location
=
POSITION_HINT
;
}
}
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
X
)
{
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
...
@@ -2196,11 +2196,11 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2196,11 +2196,11 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
hovered_sequence
=
6
;
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
0
].
Pos
.
Y
)
{
...
@@ -2211,13 +2211,13 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2211,13 +2211,13 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_EXTRA
;
hovered_location
=
LOCATION_EXTRA
;
}
}
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
1
].
Pos
.
X
)
{
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
}
}
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
rule
][
1
].
Pos
.
X
)
{
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
rule
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
...
...
gframe/game.cpp
View file @
3043535b
...
@@ -169,7 +169,7 @@ bool Game::Initialize() {
...
@@ -169,7 +169,7 @@ bool Game::Initialize() {
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1261
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1261
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbDuelRule
->
setSelected
(
DEFAULT_DUEL_RULE
);
cbDuelRule
->
setSelected
(
DEFAULT_DUEL_RULE
-
1
);
chkNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
210
,
170
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
210
,
170
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
180
,
210
,
360
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1230
));
chkNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
180
,
210
,
360
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1230
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1231
),
rect
<
s32
>
(
20
,
240
,
320
,
260
),
false
,
false
,
wCreateHost
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1231
),
rect
<
s32
>
(
20
,
240
,
320
,
260
),
false
,
false
,
wCreateHost
);
...
...
gframe/game.h
View file @
3043535b
...
@@ -613,5 +613,5 @@ extern Game* mainGame;
...
@@ -613,5 +613,5 @@ extern Game* mainGame;
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381
#define BUTTON_MARKERS_OK 381
#define DEFAULT_DUEL_RULE
3
#define DEFAULT_DUEL_RULE
4
#endif // GAME_H
#endif // GAME_H
gframe/replay_mode.cpp
View file @
3043535b
...
@@ -81,7 +81,7 @@ int ReplayMode::ReplayThread(void* param) {
...
@@ -81,7 +81,7 @@ int ReplayMode::ReplayThread(void* param) {
int
draw_count
=
cur_replay
.
ReadInt32
();
int
draw_count
=
cur_replay
.
ReadInt32
();
int
opt
=
cur_replay
.
ReadInt32
();
int
opt
=
cur_replay
.
ReadInt32
();
int
duel_rule
=
opt
>>
16
;
int
duel_rule
=
opt
>>
16
;
mainGame
->
dInfo
.
duel_rule
=
duel_rule
-
1
;
mainGame
->
dInfo
.
duel_rule
=
duel_rule
;
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
...
...
gframe/single_duel.cpp
View file @
3043535b
...
@@ -412,7 +412,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -412,7 +412,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
(
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_PSEUDO_SHUFFLE
;
last_replay
.
WriteInt32
(
host_info
.
start_lp
,
false
);
last_replay
.
WriteInt32
(
host_info
.
start_lp
,
false
);
...
...
gframe/tag_duel.cpp
View file @
3043535b
...
@@ -382,7 +382,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -382,7 +382,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
(
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_TAG_MODE
;
opt
|=
DUEL_TAG_MODE
;
...
...
ocgcore
@
25f060f8
Subproject commit
7773835a4a453d0de9ff4fbba7ffa262f4c5d519
Subproject commit
25f060f8aa1eafa11abc0f2ce39d10f0d5306c17
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