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
baichixing
ygopro
Commits
0f5444d2
Commit
0f5444d2
authored
Mar 18, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update vField
parent
89b00401
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
432 deletions
+179
-432
gframe/client_field.cpp
gframe/client_field.cpp
+43
-150
gframe/drawing.cpp
gframe/drawing.cpp
+40
-43
gframe/event_handler.cpp
gframe/event_handler.cpp
+31
-36
gframe/materials.cpp
gframe/materials.cpp
+56
-200
gframe/materials.h
gframe/materials.h
+9
-3
No files found.
gframe/client_field.cpp
View file @
0f5444d2
This diff is collapsed.
Click to expand it.
gframe/drawing.cpp
View file @
0f5444d2
This diff is collapsed.
Click to expand it.
gframe/event_handler.cpp
View file @
0f5444d2
...
...
@@ -2057,90 +2057,85 @@ void ClientField::GetHoverField(int x, int y) {
double
boardx
=
4.2
+
7.8
*
screenx
/
vlen
/
cos
(
angle
);
double
boardy
=
8.0
-
7.8
*
tan
(
angle
);
hovered_location
=
0
;
if
(
boardx
>=
matManager
.
vField
s
[
8
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
9
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
s
[
8
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
10
].
Pos
.
Y
)
{
if
(
boardx
>=
matManager
.
vField
Extra
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldExtra
[
0
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
Extra
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldExtra
[
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_EXTRA
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
56
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
58
].
Pos
.
Y
)
{
//field
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
0
][
5
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
5
][
2
].
Pos
.
Y
)
{
//field
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
60
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
6
2
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
0
][
6
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
6
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
134
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
132
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
1
][
7
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
74
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
72
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Grave
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
1
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
70
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
68
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Deck
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
1
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_DECK
;
}
}
else
if
(
boardx
>=
matManager
.
vField
s
[
81
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
8
0
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
s
[
82
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
8
0
].
Pos
.
Y
)
{
}
else
if
(
boardx
>=
matManager
.
vField
Remove
[
1
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
0
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
Remove
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
136
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
138
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
ContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
]
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
}
}
else
if
(
boardx
>=
matManager
.
vField
s
[
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
s
[
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
2
].
Pos
.
Y
)
{
}
else
if
(
boardx
>=
matManager
.
vField
Deck
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldDeck
[
0
]
[
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
Deck
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
0
]
[
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_DECK
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
4
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
6
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Grave
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldGrave
[
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
130
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
128
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
1
][
6
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
6
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
64
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
66
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
0
][
7
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
126
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
124
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Szone
[
1
][
5
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
}
else
if
(
boardy
>=
matManager
.
vField
s
[
78
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
76
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vField
Extra
[
1
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldExtra
[
1
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_EXTRA
;
}
}
else
if
(
boardx
>=
matManager
.
vField
s
[
12
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
13
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
s
[
12
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
14
].
Pos
.
Y
)
{
}
else
if
(
boardx
>=
matManager
.
vField
Remove
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vField
Remove
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
}
}
else
if
(
boardx
>=
matManager
.
vFields
[
36
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
55
].
Pos
.
X
)
{
if
(
boardy
>
matManager
.
vFields
[
36
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
38
].
Pos
.
Y
)
{
}
else
if
(
boardx
>=
matManager
.
vFieldMzone
[
0
][
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldMzone
[
0
][
4
][
1
].
Pos
.
X
)
{
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
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
if
(
hovered_sequence
>
4
)
hovered_sequence
=
4
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
16
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
35
].
Pos
.
Y
)
{
hovered_sequence
=
sequence
;
}
else
if
(
boardy
>=
matManager
.
vFieldMzone
[
0
][
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldMzone
[
0
][
0
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
if
(
hovered_sequence
>
4
)
hovered_sequence
=
4
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
103
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
84
].
Pos
.
Y
)
{
hovered_sequence
=
sequence
;
}
else
if
(
boardy
>=
matManager
.
vFieldMzone
[
1
][
0
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldMzone
[
1
][
0
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
if
(
hovered_sequence
<
0
)
hovered_sequence
=
0
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
123
].
Pos
.
Y
&&
boardy
<
matManager
.
vFields
[
104
].
Pos
.
Y
)
{
hovered_sequence
=
4
-
sequence
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
0
][
2
].
Pos
.
Y
&&
boardy
<
matManager
.
vFieldSzone
[
1
][
0
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
if
(
hovered_sequence
<
0
)
hovered_sequence
=
0
;
hovered_sequence
=
4
-
sequence
;
}
}
}
...
...
gframe/materials.cpp
View file @
0f5444d2
This diff is collapsed.
Click to expand it.
gframe/materials.h
View file @
0f5444d2
...
...
@@ -19,12 +19,18 @@ public:
S3DVertex
vFieldSpell
[
4
];
S3DVertex
vFieldSpell1
[
4
];
S3DVertex
vFieldSpell2
[
4
];
S3DVertex
vBackLine
[
76
];
S3DVertex
vFields
[
140
];
//S3DVertex vBackLine[76];
S3DVertex
vFieldDeck
[
2
][
4
];
S3DVertex
vFieldGrave
[
2
][
4
];
S3DVertex
vFieldExtra
[
2
][
4
];
S3DVertex
vFieldRemove
[
2
][
4
];
S3DVertex
vFieldMzone
[
2
][
5
][
4
];
S3DVertex
vFieldSzone
[
2
][
8
][
4
];
irr
::
core
::
vector3df
vFieldContiAct
[
4
];
S3DVertex
vArrow
[
40
];
SColor
c2d
[
4
];
u16
iRectangle
[
6
];
u16
iBackLine
[
116
];
//
u16 iBackLine[116];
u16
iArrow
[
40
];
irr
::
video
::
SMaterial
mCard
;
irr
::
video
::
SMaterial
mTexture
;
...
...
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