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
MobiusMei
ygopro
Commits
89df9372
Commit
89df9372
authored
Apr 18, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for both mr4 and mr3 field
parent
6344b48c
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
157 additions
and
80 deletions
+157
-80
gframe/client_field.cpp
gframe/client_field.cpp
+14
-12
gframe/drawing.cpp
gframe/drawing.cpp
+59
-33
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+36
-14
gframe/game.h
gframe/game.h
+1
-0
gframe/image_manager.cpp
gframe/image_manager.cpp
+4
-2
gframe/image_manager.h
gframe/image_manager.h
+2
-2
gframe/materials.cpp
gframe/materials.cpp
+34
-14
gframe/materials.h
gframe/materials.h
+3
-3
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+2
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-0
textures/field-transparent3.png
textures/field-transparent3.png
+0
-0
textures/field3.png
textures/field3.png
+0
-0
No files found.
gframe/client_field.cpp
View file @
89df9372
...
...
@@ -715,6 +715,7 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
t
->
X
=
0
;
t
->
Y
=
0
;
t
->
Z
=
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
switch
((
location
&
0x7f
))
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
...
@@ -741,20 +742,20 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
break
;
}
case
LOCATION_SZONE
:
{
t
->
X
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
controler
][
sequenc
e
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
controler
][
sequenc
e
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
controler
][
sequence
][
rul
e
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
controler
][
sequence
][
rul
e
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.03
f
;
break
;
}
case
LOCATION_GRAVE
:
{
t
->
X
=
(
matManager
.
vFieldGrave
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldGrave
[
controler
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
controler
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldGrave
[
controler
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
controler
][
rule
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldGrave
[
controler
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
controler
][
rule
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
grave
[
controler
].
size
()
*
0.01
f
+
0.03
f
;
break
;
}
case
LOCATION_REMOVED
:
{
t
->
X
=
(
matManager
.
vFieldRemove
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldRemove
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldRemove
[
controler
][
0
].
Pos
.
Y
+
matManager
.
vFieldRemove
[
controler
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldRemove
[
controler
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldRemove
[
controler
][
rule
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldRemove
[
controler
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldRemove
[
controler
][
rule
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
remove
[
controler
].
size
()
*
0.01
f
+
0.03
f
;
break
;
}
...
...
@@ -770,6 +771,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
int
controler
=
pcard
->
controler
;
int
sequence
=
pcard
->
sequence
;
int
location
=
pcard
->
location
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
switch
(
location
)
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
...
@@ -882,8 +884,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
break
;
}
case
LOCATION_SZONE
:
{
t
->
X
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
controler
][
sequenc
e
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
controler
][
sequenc
e
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldSzone
[
controler
][
sequence
][
rul
e
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldSzone
[
controler
][
sequence
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldSzone
[
controler
][
sequence
][
rul
e
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
if
(
controler
==
0
)
{
r
->
X
=
0.0
f
;
...
...
@@ -901,8 +903,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
break
;
}
case
LOCATION_GRAVE
:
{
t
->
X
=
(
matManager
.
vFieldGrave
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldGrave
[
controler
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
controler
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldGrave
[
controler
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
controler
][
rule
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldGrave
[
controler
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
controler
][
rule
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
controler
==
0
)
{
r
->
X
=
0.0
f
;
...
...
@@ -916,8 +918,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
break
;
}
case
LOCATION_REMOVED
:
{
t
->
X
=
(
matManager
.
vFieldRemove
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldRemove
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldRemove
[
controler
][
0
].
Pos
.
Y
+
matManager
.
vFieldRemove
[
controler
][
2
].
Pos
.
Y
)
/
2
;
t
->
X
=
(
matManager
.
vFieldRemove
[
controler
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldRemove
[
controler
][
rule
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldRemove
[
controler
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldRemove
[
controler
][
rule
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
controler
==
0
)
{
if
(
pcard
->
position
&
POS_FACEUP
)
{
...
...
gframe/drawing.cpp
View file @
89df9372
This diff is collapsed.
Click to expand it.
gframe/duelclient.cpp
View file @
89df9372
...
...
@@ -3290,6 +3290,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1609
),
dataManager
.
GetName
(
mainGame
->
dField
.
current_chain
.
code
));
mainGame
->
dField
.
last_chain
=
true
;
}
mainGame
->
dInfo
.
duel_rule
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
gMutex
.
Unlock
();
break
;
}
...
...
gframe/event_handler.cpp
View file @
89df9372
...
...
@@ -2002,6 +2002,7 @@ void ClientField::GetHoverField(int x, int y) {
irr
::
core
::
recti
sfRect
(
430
,
504
,
875
,
600
);
irr
::
core
::
recti
ofRect
(
531
,
135
,
800
,
191
);
irr
::
core
::
position2di
pos
(
x
,
y
);
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
if
(
sfRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
0
].
size
();
int
cardSize
=
66
;
...
...
@@ -2068,49 +2069,64 @@ void ClientField::GetHoverField(int x, int y) {
if
(
boardy
>=
matManager
.
vFieldExtra
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldExtra
[
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_EXTRA
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
5
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
5
][
2
].
Pos
.
Y
)
{
//field
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
5
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
5
][
rule
][
2
].
Pos
.
Y
)
{
//field
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
6
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
6
][
2
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
6
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
6
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
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_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
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFieldGrave
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
1
][
0
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldGrave
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
1
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
matManager
.
vFieldDeck
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
1
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_DECK
;
}
}
else
if
(
boardx
>=
matManager
.
vFieldRemove
[
1
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
0
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
0
].
Pos
.
Y
)
{
}
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
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vFieldContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
].
Y
)
{
hovered_controler
=
0
;
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
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFieldContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
].
Y
)
{
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
}
}
else
if
(
boardx
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldDeck
[
0
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_DECK
;
}
else
if
(
boardy
>=
matManager
.
vFieldGrave
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
0
][
2
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldGrave
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
6
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
6
][
0
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
6
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
6
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
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_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
0
].
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_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
...
...
@@ -2118,8 +2134,14 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_location
=
LOCATION_EXTRA
;
}
}
else
if
(
boardx
>=
matManager
.
vFieldRemove
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
2
].
Pos
.
Y
)
{
}
else
if
(
rule
==
0
&&
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
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
}
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
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
}
...
...
@@ -2127,7 +2149,7 @@ void ClientField::GetHoverField(int x, int y) {
int
sequence
=
(
boardx
-
matManager
.
vFieldMzone
[
0
][
0
][
0
].
Pos
.
X
)
/
(
matManager
.
vFieldMzone
[
0
][
0
][
1
].
Pos
.
X
-
matManager
.
vFieldMzone
[
0
][
0
][
0
].
Pos
.
X
);
if
(
sequence
>
4
)
sequence
=
4
;
if
(
boardy
>
matManager
.
vFieldSzone
[
0
][
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
0
][
2
].
Pos
.
Y
)
{
if
(
boardy
>
matManager
.
vFieldSzone
[
0
][
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
sequence
;
...
...
@@ -2161,7 +2183,7 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
4
-
sequence
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
0
][
2
].
Pos
.
Y
&&
boardy
<
matManager
.
vFieldSzone
[
1
][
0
][
0
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
0
][
rule
][
2
].
Pos
.
Y
&&
boardy
<
matManager
.
vFieldSzone
[
1
][
0
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
4
-
sequence
;
...
...
gframe/game.h
View file @
89df9372
...
...
@@ -48,6 +48,7 @@ struct DuelInfo {
bool
is_shuffling
;
bool
tag_player
[
2
];
int
lp
[
2
];
int
duel_rule
;
int
turn
;
short
curMsg
;
wchar_t
hostname
[
20
];
...
...
gframe/image_manager.cpp
View file @
89df9372
...
...
@@ -26,8 +26,10 @@ bool ImageManager::Initial() {
tBackGround
=
driver
->
getTexture
(
"textures/bg.jpg"
);
tBackGround_menu
=
driver
->
getTexture
(
"textures/bg_menu.jpg"
);
tBackGround_deck
=
driver
->
getTexture
(
"textures/bg_deck.jpg"
);
tField
=
driver
->
getTexture
(
"textures/field3.png"
);
tFieldTransparent
=
driver
->
getTexture
(
"textures/field-transparent3.png"
);
tField
[
0
]
=
driver
->
getTexture
(
"textures/field2.png"
);
tFieldTransparent
[
0
]
=
driver
->
getTexture
(
"textures/field-transparent2.png"
);
tField
[
1
]
=
driver
->
getTexture
(
"textures/field3.png"
);
tFieldTransparent
[
1
]
=
driver
->
getTexture
(
"textures/field-transparent3.png"
);
return
true
;
}
void
ImageManager
::
SetDevice
(
irr
::
IrrlichtDevice
*
dev
)
{
...
...
gframe/image_manager.h
View file @
89df9372
...
...
@@ -40,8 +40,8 @@ public:
irr
::
video
::
ITexture
*
tBackGround
;
irr
::
video
::
ITexture
*
tBackGround_menu
;
irr
::
video
::
ITexture
*
tBackGround_deck
;
irr
::
video
::
ITexture
*
tField
;
irr
::
video
::
ITexture
*
tFieldTransparent
;
irr
::
video
::
ITexture
*
tField
[
2
]
;
irr
::
video
::
ITexture
*
tFieldTransparent
[
2
]
;
};
extern
ImageManager
imageManager
;
...
...
gframe/materials.cpp
View file @
89df9372
...
...
@@ -183,38 +183,58 @@ Materials::Materials() {
iRectangle
[
5
]
=
3
;
SetS3DVertex
(
vFieldDeck
[
0
],
6.9
f
,
2.7
f
,
7.7
f
,
3.9
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldGrave
[
0
],
6.9
f
,
0.1
f
,
7.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//grave
SetS3DVertex
(
vFieldGrave
[
0
][
0
],
6.9
f
,
0.1
f
,
7.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldGrave
[
0
][
1
],
6.9
f
,
1.4
f
,
7.7
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//extra
SetS3DVertex
(
vFieldExtra
[
0
],
0.2
f
,
2.7
f
,
1.0
f
,
3.9
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldRemove
[
0
],
7.9
f
,
0.1
f
,
8.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//remove
SetS3DVertex
(
vFieldRemove
[
0
][
0
],
7.9
f
,
0.1
f
,
8.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldRemove
[
0
][
1
],
6.9
f
,
0.1
f
,
7.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
SetS3DVertex
(
vFieldMzone
[
0
][
i
],
1.2
f
+
i
*
1.1
f
,
0.8
f
,
2.3
f
+
i
*
1.1
f
,
2.0
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldMzone
[
0
][
5
],
2.3
f
,
-
0.6
f
,
3.4
f
,
0.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldMzone
[
0
][
6
],
4.5
f
,
-
0.6
f
,
5.6
f
,
0.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
SetS3DVertex
(
vFieldSzone
[
0
][
i
],
1.2
f
+
i
*
1.1
f
,
2.0
f
,
2.3
f
+
i
*
1.1
f
,
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
SetS3DVertex
(
vFieldSzone
[
0
][
i
][
0
],
1.2
f
+
i
*
1.1
f
,
2.0
f
,
2.3
f
+
i
*
1.1
f
,
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
i
][
1
],
1.2
f
+
i
*
1.1
f
,
2.0
f
,
2.3
f
+
i
*
1.1
f
,
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
}
//field
SetS3DVertex
(
vFieldSzone
[
0
][
5
],
0.2
f
,
0.1
f
,
1.0
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
5
][
0
],
0.2
f
,
0.1
f
,
1.0
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
5
][
1
],
0.2
f
,
1.4
f
,
1.0
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//LScale
SetS3DVertex
(
vFieldSzone
[
0
][
6
],
0.2
f
,
1.4
f
,
1.0
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
6
][
0
],
0.2
f
,
1.4
f
,
1.0
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
6
][
1
],
0.2
f
,
0.1
f
,
1.0
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//RScale
SetS3DVertex
(
vFieldSzone
[
0
][
7
],
6.9
f
,
1.4
f
,
7.7
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
7
][
0
],
6.9
f
,
1.4
f
,
7.7
f
,
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
0
][
7
][
1
],
7.9
f
,
0.1
f
,
8.7
f
,
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldDeck
[
1
],
1.0
f
,
-
2.7
f
,
0.2
f
,
-
3.9
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldGrave
[
1
],
1.0
f
,
-
0.1
f
,
0.2
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//grave
SetS3DVertex
(
vFieldGrave
[
1
][
0
],
1.0
f
,
-
0.1
f
,
0.2
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldGrave
[
1
][
1
],
1.0
f
,
-
1.4
f
,
0.2
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//extra
SetS3DVertex
(
vFieldExtra
[
1
],
7.7
f
,
-
2.7
f
,
6.9
f
,
-
3.9
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldRemove
[
1
],
0.0
f
,
-
0.1
f
,
-
0.8
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//remove
SetS3DVertex
(
vFieldRemove
[
1
][
0
],
0.0
f
,
-
0.1
f
,
-
0.8
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldRemove
[
1
][
1
],
1.0
f
,
-
0.1
f
,
0.2
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
SetS3DVertex
(
vFieldMzone
[
1
][
i
],
6.7
f
-
i
*
1.1
f
,
-
0.8
f
,
5.6
f
-
i
*
1.1
f
,
-
2.0
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldMzone
[
1
][
5
],
5.6
f
,
0.6
f
,
4.5
f
,
-
0.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldMzone
[
1
][
6
],
3.4
f
,
0.6
f
,
2.3
f
,
-
0.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
SetS3DVertex
(
vFieldSzone
[
1
][
i
],
6.7
f
-
i
*
1.1
f
,
-
2.0
f
,
5.6
f
-
i
*
1.1
f
,
-
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
SetS3DVertex
(
vFieldSzone
[
1
][
i
][
0
],
6.7
f
-
i
*
1.1
f
,
-
2.0
f
,
5.6
f
-
i
*
1.1
f
,
-
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
i
][
1
],
6.7
f
-
i
*
1.1
f
,
-
2.0
f
,
5.6
f
-
i
*
1.1
f
,
-
3.2
f
,
0
,
1
,
0
,
0
,
0
,
0
);
}
//field
SetS3DVertex
(
vFieldSzone
[
1
][
5
],
7.7
f
,
-
0.1
f
,
6.9
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
5
][
0
],
7.7
f
,
-
0.1
f
,
6.9
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
5
][
1
],
7.7
f
,
-
1.4
f
,
6.9
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//LScale
SetS3DVertex
(
vFieldSzone
[
1
][
6
],
7.7
f
,
-
1.4
f
,
6.9
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
6
][
0
],
7.7
f
,
-
1.4
f
,
6.9
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
6
][
1
],
7.7
f
,
-
0.1
f
,
6.9
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//RScale
SetS3DVertex
(
vFieldSzone
[
1
][
7
],
1.0
f
,
-
1.4
f
,
0.2
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
7
][
0
],
1.0
f
,
-
1.4
f
,
0.2
f
,
-
2.6
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
7
][
1
],
0.0
f
,
-
0.1
f
,
-
0.8
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//conti_act
vFieldContiAct
[
0
]
=
vector3df
(
-
0.8
f
,
0.1
f
,
0.0
f
);
...
...
gframe/materials.h
View file @
89df9372
...
...
@@ -21,11 +21,11 @@ public:
S3DVertex
vFieldSpell2
[
4
];
//S3DVertex vBackLine[76];
S3DVertex
vFieldDeck
[
2
][
4
];
S3DVertex
vFieldGrave
[
2
][
4
];
S3DVertex
vFieldGrave
[
2
][
2
][
4
];
S3DVertex
vFieldExtra
[
2
][
4
];
S3DVertex
vFieldRemove
[
2
][
4
];
S3DVertex
vFieldRemove
[
2
][
2
][
4
];
S3DVertex
vFieldMzone
[
2
][
7
][
4
];
S3DVertex
vFieldSzone
[
2
][
8
][
4
];
S3DVertex
vFieldSzone
[
2
][
8
][
2
][
4
];
irr
::
core
::
vector3df
vFieldContiAct
[
4
];
S3DVertex
vArrow
[
40
];
SColor
c2d
[
4
];
...
...
gframe/replay_mode.cpp
View file @
89df9372
...
...
@@ -80,6 +80,8 @@ int ReplayMode::ReplayThread(void* param) {
int
start_hand
=
cur_replay
.
ReadInt32
();
int
draw_count
=
cur_replay
.
ReadInt32
();
int
opt
=
cur_replay
.
ReadInt32
();
int
duel_rule
=
opt
>>
16
;
mainGame
->
dInfo
.
duel_rule
=
duel_rule
-
1
;
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
...
...
gframe/single_mode.cpp
View file @
89df9372
...
...
@@ -694,6 +694,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
BufferIO
::
ReadInt8
(
pbuf
);
//chain count, always 0
SinglePlayReload
();
mainGame
->
dField
.
RefreshAllCards
();
mainGame
->
dInfo
.
duel_rule
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
gMutex
.
Unlock
();
break
;
}
...
...
textures/field-transparent3.png
View replaced file @
6344b48c
View file @
89df9372
321 KB
|
W:
|
H:
15.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
textures/field3.png
View replaced file @
6344b48c
View file @
89df9372
323 KB
|
W:
|
H:
18.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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