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
f7ee8e6a
Commit
f7ee8e6a
authored
Mar 19, 2014
by
Damien Lawford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Field Design
parent
cf8c6d59
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
312 additions
and
300 deletions
+312
-300
gframe/client_card.cpp
gframe/client_card.cpp
+2
-0
gframe/client_field.cpp
gframe/client_field.cpp
+60
-59
gframe/drawing.cpp
gframe/drawing.cpp
+59
-53
gframe/event_handler.cpp
gframe/event_handler.cpp
+42
-41
gframe/game.cpp
gframe/game.cpp
+2
-2
gframe/materials.cpp
gframe/materials.cpp
+137
-136
ocgcore/card.cpp
ocgcore/card.cpp
+7
-7
ocgcore/duel.cpp
ocgcore/duel.cpp
+3
-2
textures/field2.png
textures/field2.png
+0
-0
No files found.
gframe/client_card.cpp
View file @
f7ee8e6a
...
@@ -37,6 +37,8 @@ ClientCard::ClientCard() {
...
@@ -37,6 +37,8 @@ ClientCard::ClientCard() {
atkstring
[
0
]
=
0
;
atkstring
[
0
]
=
0
;
defstring
[
0
]
=
0
;
defstring
[
0
]
=
0
;
lvstring
[
0
]
=
0
;
lvstring
[
0
]
=
0
;
rscstring
[
0
]
=
0
;
lscstring
[
0
]
=
0
;
overlayTarget
=
0
;
overlayTarget
=
0
;
equipTarget
=
0
;
equipTarget
=
0
;
}
}
...
...
gframe/client_field.cpp
View file @
f7ee8e6a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include "data_manager.h"
#include "data_manager.h"
#include "image_manager.h"
#include "image_manager.h"
#include "game.h"
#include "game.h"
#include "materials.h"
#include "../ocgcore/field.h"
#include "../ocgcore/field.h"
namespace
ygo
{
namespace
ygo
{
...
@@ -655,9 +656,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -655,9 +656,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
switch
(
location
)
{
switch
(
location
)
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
t
->
X
=
7.3
f
;
t
->
X
=
matManager
.
vFields
[
0
].
Pos
.
X
-
(
matManager
.
vFields
[
0
].
Pos
.
X
-
matManager
.
vFields
[
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
3.0
f
;
t
->
Y
=
matManager
.
vFields
[
0
].
Pos
.
Y
-
(
matManager
.
vFields
[
0
].
Pos
.
Y
-
matManager
.
vFields
[
3
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
deck_reversed
==
pcard
->
is_reversed
)
{
if
(
deck_reversed
==
pcard
->
is_reversed
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
3.1415926
f
;
r
->
Y
=
3.1415926
f
;
...
@@ -668,8 +669,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -668,8 +669,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
}
}
else
{
}
else
{
t
->
X
=
0.6
f
;
t
->
X
=
matManager
.
vFields
[
68
].
Pos
.
X
-
(
matManager
.
vFields
[
68
].
Pos
.
X
-
matManager
.
vFields
[
69
].
Pos
.
X
)
/
2
;
//
0.6f;
t
->
Y
=
-
3.0
f
;
t
->
Y
=
matManager
.
vFields
[
68
].
Pos
.
Y
-
(
matManager
.
vFields
[
68
].
Pos
.
Y
-
matManager
.
vFields
[
70
].
Pos
.
Y
)
/
2
;
//
-3.0f;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
deck_reversed
==
pcard
->
is_reversed
)
{
if
(
deck_reversed
==
pcard
->
is_reversed
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
...
@@ -733,9 +734,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -733,9 +734,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
}
case
LOCATION_MZONE
:
{
case
LOCATION_MZONE
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
t
->
X
=
1.75
f
+
1.1
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
16
].
Pos
.
X
-
(
matManager
.
vFields
[
16
].
Pos
.
X
-
matManager
.
vFields
[
17
].
Pos
.
X
)
/
2
)
+
1.1
f
*
sequence
;
t
->
Y
=
1.1
f
;
t
->
Y
=
matManager
.
vFields
[
16
].
Pos
.
Y
-
(
matManager
.
vFields
[
16
].
Pos
.
Y
-
matManager
.
vFields
[
18
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
if
(
pcard
->
position
&
POS_DEFENCE
)
{
if
(
pcard
->
position
&
POS_DEFENCE
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Z
=
-
3.1415926
f
/
2.0
f
;
r
->
Z
=
-
3.1415926
f
/
2.0
f
;
...
@@ -750,9 +751,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -750,9 +751,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
else
r
->
Y
=
0.0
f
;
else
r
->
Y
=
0.0
f
;
}
}
}
else
{
}
else
{
t
->
X
=
6.15
f
-
1.1
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
84
].
Pos
.
X
-
(
matManager
.
vFields
[
84
].
Pos
.
X
-
matManager
.
vFields
[
85
].
Pos
.
X
)
/
2
)
-
1.1
f
*
sequence
;
t
->
Y
=
-
1.1
f
;
t
->
Y
=
matManager
.
vFields
[
84
].
Pos
.
Y
-
(
matManager
.
vFields
[
84
].
Pos
.
Y
-
matManager
.
vFields
[
86
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
if
(
pcard
->
position
&
POS_DEFENCE
)
{
if
(
pcard
->
position
&
POS_DEFENCE
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Z
=
3.1415926
f
/
2.0
f
;
r
->
Z
=
3.1415926
f
/
2.0
f
;
...
@@ -772,21 +773,21 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -772,21 +773,21 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
case
LOCATION_SZONE
:
{
case
LOCATION_SZONE
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
if
(
sequence
<=
4
)
{
if
(
sequence
<=
4
)
{
t
->
X
=
1.75
f
+
1.1
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
36
].
Pos
.
X
-
(
matManager
.
vFields
[
36
].
Pos
.
X
-
matManager
.
vFields
[
37
].
Pos
.
X
)
/
2
)
+
1.1
f
*
sequence
;
t
->
Y
=
2.3
f
;
t
->
Y
=
matManager
.
vFields
[
36
].
Pos
.
Y
-
(
matManager
.
vFields
[
36
].
Pos
.
Y
-
matManager
.
vFields
[
38
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
if
(
sequence
==
5
)
{
}
else
if
(
sequence
==
5
)
{
t
->
X
=
0.6
f
;
t
->
X
=
matManager
.
vFields
[
56
].
Pos
.
X
-
(
matManager
.
vFields
[
56
].
Pos
.
X
-
matManager
.
vFields
[
57
].
Pos
.
X
)
/
2
;
t
->
Y
=
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
56
].
Pos
.
Y
-
(
matManager
.
vFields
[
56
].
Pos
.
Y
-
matManager
.
vFields
[
58
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
if
(
sequence
==
6
)
{
}
else
if
(
sequence
==
6
)
{
t
->
X
=
-
0.4
f
;
t
->
X
=
matManager
.
vFields
[
60
].
Pos
.
X
-
(
matManager
.
vFields
[
60
].
Pos
.
X
-
matManager
.
vFields
[
61
].
Pos
.
X
)
/
2
;
t
->
Y
=
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
60
].
Pos
.
Y
-
(
matManager
.
vFields
[
60
].
Pos
.
Y
-
matManager
.
vFields
[
62
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
{
}
else
{
t
->
X
=
8.3
f
;
t
->
X
=
matManager
.
vFields
[
65
].
Pos
.
X
-
(
matManager
.
vFields
[
65
].
Pos
.
X
-
matManager
.
vFields
[
66
].
Pos
.
X
)
/
2
;
t
->
Y
=
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
65
].
Pos
.
Y
-
(
matManager
.
vFields
[
65
].
Pos
.
Y
-
matManager
.
vFields
[
67
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
}
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
...
@@ -795,21 +796,21 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -795,21 +796,21 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
else
r
->
Y
=
0.0
f
;
else
r
->
Y
=
0.0
f
;
}
else
{
}
else
{
if
(
sequence
<=
4
)
{
if
(
sequence
<=
4
)
{
t
->
X
=
6.15
f
-
1.1
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
104
].
Pos
.
X
-
(
matManager
.
vFields
[
104
].
Pos
.
X
-
matManager
.
vFields
[
105
].
Pos
.
X
)
/
2
)
-
1.1
f
*
sequence
;
t
->
Y
=
-
2.3
f
;
t
->
Y
=
matManager
.
vFields
[
104
].
Pos
.
Y
-
(
matManager
.
vFields
[
104
].
Pos
.
Y
-
matManager
.
vFields
[
106
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
if
(
sequence
==
5
)
{
}
else
if
(
sequence
==
5
)
{
t
->
X
=
7.3
f
;
t
->
X
=
matManager
.
vFields
[
124
].
Pos
.
X
-
(
matManager
.
vFields
[
124
].
Pos
.
X
-
matManager
.
vFields
[
125
].
Pos
.
X
)
/
2
;
t
->
Y
=
-
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
124
].
Pos
.
Y
-
(
matManager
.
vFields
[
124
].
Pos
.
Y
-
matManager
.
vFields
[
126
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
if
(
sequence
==
6
)
{
}
else
if
(
sequence
==
6
)
{
t
->
X
=
8.3
f
;
t
->
X
=
matManager
.
vFields
[
128
].
Pos
.
X
-
(
matManager
.
vFields
[
128
].
Pos
.
X
-
matManager
.
vFields
[
129
].
Pos
.
X
)
/
2
;
t
->
Y
=
-
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
128
].
Pos
.
Y
-
(
matManager
.
vFields
[
128
].
Pos
.
Y
-
matManager
.
vFields
[
130
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
else
{
}
else
{
t
->
X
=
-
0.4
f
;
t
->
X
=
matManager
.
vFields
[
132
].
Pos
.
X
-
(
matManager
.
vFields
[
132
].
Pos
.
X
-
matManager
.
vFields
[
133
].
Pos
.
X
)
/
2
;
//
-0.4f;
t
->
Y
=
-
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
132
].
Pos
.
Y
-
(
matManager
.
vFields
[
132
].
Pos
.
Y
-
matManager
.
vFields
[
134
].
Pos
.
Y
)
/
2
;
//
-1.7f;
t
->
Z
=
0.01
f
;
t
->
Z
=
0.01
f
;
}
}
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Z
=
3.1415926
f
;
r
->
Z
=
3.1415926
f
;
...
@@ -821,16 +822,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -821,16 +822,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
}
case
LOCATION_GRAVE
:
{
case
LOCATION_GRAVE
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
t
->
X
=
7.3
f
;
t
->
X
=
matManager
.
vFields
[
4
].
Pos
.
X
-
(
matManager
.
vFields
[
4
].
Pos
.
X
-
matManager
.
vFields
[
5
].
Pos
.
X
)
/
2
;
t
->
Y
=
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
4
].
Pos
.
Y
-
(
matManager
.
vFields
[
4
].
Pos
.
Y
-
matManager
.
vFields
[
6
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
else
{
}
else
{
t
->
X
=
0.6
f
;
t
->
X
=
matManager
.
vFields
[
72
].
Pos
.
X
-
(
matManager
.
vFields
[
72
].
Pos
.
X
-
matManager
.
vFields
[
73
].
Pos
.
X
)
/
2
;
t
->
Y
=
-
1.7
f
;
t
->
Y
=
matManager
.
vFields
[
72
].
Pos
.
Y
-
(
matManager
.
vFields
[
72
].
Pos
.
Y
-
matManager
.
vFields
[
74
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
3.1415926
f
;
r
->
Z
=
3.1415926
f
;
...
@@ -839,9 +840,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -839,9 +840,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
}
case
LOCATION_REMOVED
:
{
case
LOCATION_REMOVED
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
t
->
X
=
7.3
f
;
t
->
X
=
matManager
.
vFields
[
12
].
Pos
.
X
-
(
matManager
.
vFields
[
12
].
Pos
.
X
-
matManager
.
vFields
[
13
].
Pos
.
X
)
/
2
;
t
->
Y
=
0.4
f
;
t
->
Y
=
matManager
.
vFields
[
12
].
Pos
.
Y
-
(
matManager
.
vFields
[
12
].
Pos
.
Y
-
matManager
.
vFields
[
14
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
pcard
->
position
&
POS_FACEUP
)
{
if
(
pcard
->
position
&
POS_FACEUP
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
...
@@ -852,9 +853,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -852,9 +853,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
}
}
else
{
}
else
{
t
->
X
=
0.6
f
;
t
->
X
=
matManager
.
vFields
[
80
].
Pos
.
X
-
(
matManager
.
vFields
[
80
].
Pos
.
X
-
matManager
.
vFields
[
81
].
Pos
.
X
)
/
2
;
t
->
Y
=
-
0.4
f
;
t
->
Y
=
matManager
.
vFields
[
80
].
Pos
.
Y
-
(
matManager
.
vFields
[
80
].
Pos
.
Y
-
matManager
.
vFields
[
82
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
if
(
pcard
->
position
&
POS_FACEUP
)
{
if
(
pcard
->
position
&
POS_FACEUP
)
{
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
...
@@ -869,18 +870,18 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -869,18 +870,18 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
}
case
LOCATION_EXTRA
:
{
case
LOCATION_EXTRA
:
{
if
(
controler
==
0
)
{
if
(
controler
==
0
)
{
t
->
X
=
0.6
f
;
t
->
X
=
matManager
.
vFields
[
8
].
Pos
.
X
-
(
matManager
.
vFields
[
8
].
Pos
.
X
-
matManager
.
vFields
[
9
].
Pos
.
X
)
/
2
;
t
->
Y
=
3.0
f
;
t
->
Y
=
matManager
.
vFields
[
8
].
Pos
.
Y
-
(
matManager
.
vFields
[
8
].
Pos
.
Y
-
matManager
.
vFields
[
10
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
+
0.01
f
*
sequence
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
if
(
pcard
->
position
&
POS_FACEUP
)
if
(
pcard
->
position
&
POS_FACEUP
)
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
else
r
->
Y
=
3.1415926
f
;
else
r
->
Y
=
3.1415926
f
;
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
else
{
}
else
{
t
->
X
=
7.3
f
;
t
->
X
=
matManager
.
vFields
[
76
].
Pos
.
X
-
(
matManager
.
vFields
[
76
].
Pos
.
X
-
matManager
.
vFields
[
77
].
Pos
.
X
)
/
2
;
t
->
Y
=
-
3.0
f
;
t
->
Y
=
matManager
.
vFields
[
76
].
Pos
.
Y
-
(
matManager
.
vFields
[
76
].
Pos
.
Y
-
matManager
.
vFields
[
78
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
*
sequence
;
t
->
Z
=
0.01
f
*
sequence
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
if
(
pcard
->
position
&
POS_FACEUP
)
if
(
pcard
->
position
&
POS_FACEUP
)
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
...
@@ -895,16 +896,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -895,16 +896,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
}
int
oseq
=
pcard
->
overlayTarget
->
sequence
;
int
oseq
=
pcard
->
overlayTarget
->
sequence
;
if
(
pcard
->
overlayTarget
->
controler
==
0
)
{
if
(
pcard
->
overlayTarget
->
controler
==
0
)
{
t
->
X
=
1.75
f
+
1.1
f
*
oseq
-
0.12
f
+
0.06
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
16
].
Pos
.
X
-
(
matManager
.
vFields
[
16
].
Pos
.
X
-
matManager
.
vFields
[
17
].
Pos
.
X
)
/
2
)
+
1.1
f
*
oseq
-
0.12
f
+
0.06
f
*
sequence
;
//
1.75f + 1.1f * oseq - 0.12f + 0.06f * sequence;
t
->
Y
=
1.15
f
;
t
->
Y
=
matManager
.
vFields
[
16
].
Pos
.
Y
-
(
matManager
.
vFields
[
16
].
Pos
.
Y
-
matManager
.
vFields
[
18
].
Pos
.
Y
)
/
2
+
0.05
f
;
//
1.15f;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
else
{
}
else
{
t
->
X
=
6.15
f
-
1.1
f
*
oseq
+
0.12
f
-
0.06
f
*
sequence
;
t
->
X
=
(
matManager
.
vFields
[
84
].
Pos
.
X
-
(
matManager
.
vFields
[
84
].
Pos
.
X
-
matManager
.
vFields
[
85
].
Pos
.
X
)
/
2
)
-
1.1
f
*
oseq
+
0.12
f
-
0.06
f
*
sequence
;
//
6.15f - 1.1f * oseq + 0.12f - 0.06f * sequence;
t
->
Y
=
-
1.15
f
;
t
->
Y
=
matManager
.
vFields
[
84
].
Pos
.
Y
-
(
matManager
.
vFields
[
84
].
Pos
.
Y
-
matManager
.
vFields
[
86
].
Pos
.
Y
)
/
2
-
0.05
f
;
//
-1.15f;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
r
->
X
=
0.0
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
3.1415926
f
;
r
->
Z
=
3.1415926
f
;
...
...
gframe/drawing.cpp
View file @
f7ee8e6a
This diff is collapsed.
Click to expand it.
gframe/event_handler.cpp
View file @
f7ee8e6a
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "image_manager.h"
#include "image_manager.h"
#include "replay_mode.h"
#include "replay_mode.h"
#include "single_mode.h"
#include "single_mode.h"
#include "materials.h"
#include "../ocgcore/field.h"
#include "../ocgcore/field.h"
namespace
ygo
{
namespace
ygo
{
...
@@ -1488,15 +1489,15 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1488,15 +1489,15 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
return
false
;
return
false
;
}
}
void
ClientField
::
GetHoverField
(
int
x
,
int
y
)
{
void
ClientField
::
GetHoverField
(
int
x
,
int
y
)
{
irr
::
core
::
recti
sfRect
(
416
,
504
,
90
0
,
600
);
irr
::
core
::
recti
sfRect
(
396
,
504
,
88
0
,
600
);
irr
::
core
::
recti
ofRect
(
5
16
,
135
,
80
5
,
191
);
irr
::
core
::
recti
ofRect
(
5
06
,
135
,
79
5
,
191
);
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
core
::
position2di
pos
(
x
,
y
);
if
(
sfRect
.
isPointInside
(
pos
))
{
if
(
sfRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
0
].
size
();
int
hc
=
hand
[
0
].
size
();
if
(
hc
==
0
)
if
(
hc
==
0
)
hovered_location
=
0
;
hovered_location
=
0
;
else
if
(
hc
<
7
)
{
else
if
(
hc
<
7
)
{
int
left
=
41
6
+
82
*
(
6
-
hc
)
/
2
;
int
left
=
39
6
+
82
*
(
6
-
hc
)
/
2
;
if
(
x
<
left
)
if
(
x
<
left
)
hovered_location
=
0
;
hovered_location
=
0
;
else
{
else
{
...
@@ -1521,7 +1522,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1521,7 +1522,7 @@ void ClientField::GetHoverField(int x, int y) {
if
(
hc
==
0
)
if
(
hc
==
0
)
hovered_location
=
0
;
hovered_location
=
0
;
else
if
(
hc
<
7
)
{
else
if
(
hc
<
7
)
{
int
left
=
5
1
6
+
49
*
(
6
-
hc
)
/
2
;
int
left
=
5
0
6
+
49
*
(
6
-
hc
)
/
2
;
if
(
x
<
left
)
if
(
x
<
left
)
hovered_location
=
0
;
hovered_location
=
0
;
else
{
else
{
...
@@ -1546,85 +1547,85 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1546,85 +1547,85 @@ void ClientField::GetHoverField(int x, int y) {
double
screeny
=
y
/
640.0
*
0.84
-
0.42
;
double
screeny
=
y
/
640.0
*
0.84
-
0.42
;
double
angle
=
0.798056
-
atan
(
screeny
);
//0.798056 = arctan(8.0/7.8)
double
angle
=
0.798056
-
atan
(
screeny
);
//0.798056 = arctan(8.0/7.8)
double
vlen
=
sqrt
(
1.0
+
screeny
*
screeny
);
double
vlen
=
sqrt
(
1.0
+
screeny
*
screeny
);
double
boardx
=
3.95
+
7.8
*
screenx
/
vlen
/
cos
(
angle
);
double
boardx
=
4.2
+
7.8
*
screenx
/
vlen
/
cos
(
angle
);
double
boardy
=
8.0
-
7.8
*
tan
(
angle
);
double
boardy
=
8.0
-
7.8
*
tan
(
angle
);
hovered_location
=
0
;
hovered_location
=
0
;
if
(
boardx
>=
0.2
&&
boardx
<=
1.0
)
{
if
(
boardx
>=
matManager
.
vFields
[
8
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
9
].
Pos
.
X
)
{
if
(
boardy
>=
2.4
&&
boardy
<=
3.6
)
{
if
(
boardy
>=
matManager
.
vFields
[
8
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
10
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_EXTRA
;
hovered_location
=
LOCATION_EXTRA
;
}
else
if
(
boardy
>=
1.1
&&
boardy
<=
2.3
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
56
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
58
].
Pos
.
Y
)
{
//field
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
hovered_sequence
=
5
;
}
else
if
(
boardy
>=
-
1.0
&&
boardy
<=
0.2
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
60
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
62
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
134
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
132
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_SZONE
;
}
else
if
(
boardy
>=
-
2.3
&&
boardy
<=
-
1.1
)
{
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
74
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
72
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_GRAVE
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
-
3.6
&&
boardy
<=
-
2.4
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
70
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
68
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_DECK
;
hovered_location
=
LOCATION_DECK
;
}
}
}
else
if
(
boardx
>=
-
0.7
&&
boardx
<=
0.1
)
{
}
else
if
(
boardx
>=
matManager
.
vFields
[
81
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
80
].
Pos
.
X
)
{
if
(
boardy
>=
-
2.3
&&
boardy
<=
-
1.1
)
{
if
(
boardy
>=
matManager
.
vFields
[
82
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
80
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_REMOVED
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
1.1
&&
boardy
<=
2.3
)
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
}
}
else
if
(
boardx
>=
6.9
&&
boardx
<=
7.7
)
{
}
else
if
(
boardx
>=
matManager
.
vFields
[
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
1
].
Pos
.
X
)
{
if
(
boardy
>=
2.4
&&
boardy
<=
3.6
)
{
if
(
boardy
>=
matManager
.
vFields
[
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_DECK
;
hovered_location
=
LOCATION_DECK
;
}
else
if
(
boardy
>=
1.1
&&
boardy
<=
2.3
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
4
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
6
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_GRAVE
;
hovered_location
=
LOCATION_GRAVE
;
}
else
if
(
boardy
>=
-
0.2
&&
boardy
<=
1.0
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
130
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
128
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
64
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
66
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_SZONE
;
}
else
if
(
boardy
>=
-
2.3
&&
boardy
<=
-
1.1
)
{
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFields
[
126
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
124
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
5
;
hovered_sequence
=
5
;
}
else
if
(
boardy
>=
-
3.6
&&
boardy
<=
-
2.4
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
78
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
76
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_EXTRA
;
hovered_location
=
LOCATION_EXTRA
;
}
}
}
else
if
(
boardx
>=
7.8
&&
boardx
<=
8.6
)
{
}
else
if
(
boardx
>=
matManager
.
vFields
[
12
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
13
].
Pos
.
X
)
{
if
(
boardy
>=
-
2.3
&&
boardy
<=
-
1.1
)
{
if
(
boardy
>=
matManager
.
vFields
[
12
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
14
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
}
else
if
(
boardy
>=
1.1
&&
boardy
<=
2.3
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_REMOVED
;
hovered_sequence
=
7
;
}
}
}
else
if
(
boardx
>=
1.2
&&
boardx
<=
6.7
)
{
}
else
if
(
boardx
>=
matManager
.
vFields
[
36
].
Pos
.
X
&&
boardx
<=
matManager
.
vFields
[
55
].
Pos
.
X
)
{
if
(
boardy
>
1.7
&&
boardy
<=
2.9
)
{
if
(
boardy
>
matManager
.
vFields
[
36
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
38
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
if
(
hovered_sequence
>
4
)
if
(
hovered_sequence
>
4
)
hovered_sequence
=
4
;
hovered_sequence
=
4
;
}
else
if
(
boardy
>=
0.5
&&
boardy
<=
1.7
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
16
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
35
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
hovered_sequence
=
(
boardx
-
1.2
)
/
1.1
;
if
(
hovered_sequence
>
4
)
if
(
hovered_sequence
>
4
)
hovered_sequence
=
4
;
hovered_sequence
=
4
;
}
else
if
(
boardy
>=
-
1.7
&&
boardy
<=
-
0.5
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
103
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFields
[
84
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
if
(
hovered_sequence
<
0
)
if
(
hovered_sequence
<
0
)
hovered_sequence
=
0
;
hovered_sequence
=
0
;
}
else
if
(
boardy
>=
-
2.9
&&
boardy
<
-
1.7
)
{
}
else
if
(
boardy
>=
matManager
.
vFields
[
123
].
Pos
.
Y
&&
boardy
<
matManager
.
vFields
[
104
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
hovered_sequence
=
4
-
(
int
)((
boardx
-
1.2
)
/
1.1
);
...
@@ -1632,7 +1633,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1632,7 +1633,7 @@ void ClientField::GetHoverField(int x, int y) {
hovered_sequence
=
0
;
hovered_sequence
=
0
;
}
}
}
}
}
}
}
}
void
ClientField
::
ShowMenu
(
int
flag
,
int
x
,
int
y
)
{
void
ClientField
::
ShowMenu
(
int
flag
,
int
x
,
int
y
)
{
if
(
!
flag
)
{
if
(
!
flag
)
{
...
...
gframe/game.cpp
View file @
f7ee8e6a
...
@@ -176,7 +176,7 @@ bool Game::Initialize() {
...
@@ -176,7 +176,7 @@ bool Game::Initialize() {
imgCard
=
env
->
addImage
(
rect
<
s32
>
(
9
,
9
,
187
,
262
),
wCardImg
);
imgCard
=
env
->
addImage
(
rect
<
s32
>
(
9
,
9
,
187
,
262
),
wCardImg
);
imgCard
->
setUseAlphaChannel
(
true
);
imgCard
->
setUseAlphaChannel
(
true
);
//phase
//phase
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
4
75
,
310
,
85
0
,
330
));
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
4
55
,
310
,
83
0
,
330
));
wPhase
->
setVisible
(
false
);
wPhase
->
setVisible
(
false
);
btnDP
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
50
,
20
),
wPhase
,
-
1
,
L"
\xff24\xff30
"
);
btnDP
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
50
,
20
),
wPhase
,
-
1
,
L"
\xff24\xff30
"
);
btnDP
->
setEnabled
(
false
);
btnDP
->
setEnabled
(
false
);
...
@@ -500,7 +500,7 @@ void Game::MainLoop() {
...
@@ -500,7 +500,7 @@ void Game::MainLoop() {
BuildProjectionMatrix
(
mProjection
,
-
0.81
f
,
0.44
f
,
-
0.42
f
,
0.42
f
,
1.0
f
,
100.0
f
);
BuildProjectionMatrix
(
mProjection
,
-
0.81
f
,
0.44
f
,
-
0.42
f
,
0.42
f
,
1.0
f
,
100.0
f
);
camera
->
setProjectionMatrix
(
mProjection
);
camera
->
setProjectionMatrix
(
mProjection
);
mProjection
.
buildCameraLookAtMatrixLH
(
vector3df
(
3.95
f
,
8.0
f
,
7.8
f
),
vector3df
(
3.95
f
,
0
,
0
),
vector3df
(
0
,
0
,
1
));
mProjection
.
buildCameraLookAtMatrixLH
(
vector3df
(
4.2
f
,
8.0
f
,
7.8
f
),
vector3df
(
4.2
f
,
0
,
0
),
vector3df
(
0
,
0
,
1
));
camera
->
setViewMatrixAffector
(
mProjection
);
camera
->
setViewMatrixAffector
(
mProjection
);
smgr
->
setAmbientLight
(
SColorf
(
1.0
f
,
1.0
f
,
1.0
f
));
smgr
->
setAmbientLight
(
SColorf
(
1.0
f
,
1.0
f
,
1.0
f
));
float
atkframe
=
0.1
f
;
float
atkframe
=
0.1
f
;
...
...
gframe/materials.cpp
View file @
f7ee8e6a
This diff is collapsed.
Click to expand it.
ocgcore/card.cpp
View file @
f7ee8e6a
...
@@ -767,14 +767,14 @@ void card::xyz_overlay(card_set* materials) {
...
@@ -767,14 +767,14 @@ void card::xyz_overlay(card_set* materials) {
xyz_add
(
pcard
,
&
des
);
xyz_add
(
pcard
,
&
des
);
}
else
{
}
else
{
field
::
card_vector
cv
;
field
::
card_vector
cv
;
for
(
auto
cit
:
*
materials
)
for
(
auto
cit
=
materials
->
begin
();
cit
!=
materials
->
end
();
++
cit
)
cv
.
push_back
(
cit
);
cv
.
push_back
(
*
cit
);
std
::
sort
(
cv
.
begin
(),
cv
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
cv
.
begin
(),
cv
.
end
(),
card
::
card_operation_sort
);
for
(
auto
pcard
:
cv
)
{
for
(
auto
cvit
=
cv
.
begin
();
cvit
!=
cv
.
end
();
++
cvit
)
{
pcard
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
(
*
cvit
)
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
if
(
pcard
->
unique_code
)
if
(
(
*
cvit
)
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard
);
pduel
->
game_field
->
remove_unique_card
(
*
cvit
);
xyz_add
(
pcard
,
&
des
);
xyz_add
(
*
cvit
,
&
des
);
}
}
}
}
if
(
des
.
size
())
if
(
des
.
size
())
...
...
ocgcore/duel.cpp
View file @
f7ee8e6a
...
@@ -105,8 +105,9 @@ void duel::release_script_group() {
...
@@ -105,8 +105,9 @@ void duel::release_script_group() {
sgroups
.
clear
();
sgroups
.
clear
();
}
}
void
duel
::
restore_assumes
()
{
void
duel
::
restore_assumes
()
{
for
(
auto
pcard
:
assumes
)
std
::
set
<
card
*>::
iterator
sit
;
pcard
->
assume_type
=
0
;
for
(
sit
=
assumes
.
begin
();
sit
!=
assumes
.
end
();
++
sit
)
(
*
sit
)
->
assume_type
=
0
;
assumes
.
clear
();
assumes
.
clear
();
}
}
void
duel
::
write_buffer32
(
uint32
value
)
{
void
duel
::
write_buffer32
(
uint32
value
)
{
...
...
textures/field2.png
View replaced file @
cf8c6d59
View file @
f7ee8e6a
1.86 KB
|
W:
|
H:
3.99 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