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
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
MyCard
ygopro
Commits
92c95792
Commit
92c95792
authored
Nov 26, 2023
by
Chen Bill
Committed by
GitHub
Nov 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix xyz material drawing (#2506)
normal card: 0.010f xyz material: 0.003f
parent
88e3f5a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
10 deletions
+28
-10
gframe/client_field.cpp
gframe/client_field.cpp
+10
-6
gframe/drawing.cpp
gframe/drawing.cpp
+15
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-1
gframe/game.h
gframe/game.h
+2
-1
No files found.
gframe/client_field.cpp
View file @
92c95792
...
...
@@ -848,6 +848,9 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
int
sequence
=
pcard
->
sequence
;
int
location
=
pcard
->
location
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
const
float
overlay_buttom
=
0.0
f
;
const
float
material_height
=
0.003
f
;
const
float
mzone_buttom
=
0.020
f
;
switch
(
location
)
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
...
@@ -927,7 +930,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
case
LOCATION_MZONE
:
{
t
->
X
=
(
matManager
.
vFieldMzone
[
controler
][
sequence
][
0
].
Pos
.
X
+
matManager
.
vFieldMzone
[
controler
][
sequence
][
1
].
Pos
.
X
)
/
2
;
t
->
Y
=
(
matManager
.
vFieldMzone
[
controler
][
sequence
][
0
].
Pos
.
Y
+
matManager
.
vFieldMzone
[
controler
][
sequence
][
2
].
Pos
.
Y
)
/
2
;
t
->
Z
=
0.01
f
;
t
->
Z
=
mzone_buttom
;
if
(
controler
==
0
)
{
if
(
pcard
->
position
&
POS_DEFENSE
)
{
r
->
X
=
0.0
f
;
...
...
@@ -1040,21 +1043,22 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
break
;
}
case
LOCATION_OVERLAY
:
{
if
(
pcard
->
overlayTarget
->
location
!=
0x4
)
{
if
(
pcard
->
overlayTarget
->
location
!=
LOCATION_MZONE
)
{
return
;
}
int
oseq
=
pcard
->
overlayTarget
->
sequence
;
int
mseq
=
(
sequence
<
MAX_LAYER_COUNT
)
?
sequence
:
(
MAX_LAYER_COUNT
-
1
);
if
(
pcard
->
overlayTarget
->
controler
==
0
)
{
t
->
X
=
(
matManager
.
vFieldMzone
[
0
][
oseq
][
0
].
Pos
.
X
+
matManager
.
vFieldMzone
[
0
][
oseq
][
1
].
Pos
.
X
)
/
2
-
0.12
f
+
0.06
f
*
sequence
;
t
->
X
=
(
matManager
.
vFieldMzone
[
0
][
oseq
][
0
].
Pos
.
X
+
matManager
.
vFieldMzone
[
0
][
oseq
][
1
].
Pos
.
X
)
/
2
-
0.12
f
+
0.06
f
*
mseq
;
t
->
Y
=
(
matManager
.
vFieldMzone
[
0
][
oseq
][
0
].
Pos
.
Y
+
matManager
.
vFieldMzone
[
0
][
oseq
][
2
].
Pos
.
Y
)
/
2
+
0.05
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
t
->
Z
=
overlay_buttom
+
mseq
*
material_height
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
else
{
t
->
X
=
(
matManager
.
vFieldMzone
[
1
][
oseq
][
0
].
Pos
.
X
+
matManager
.
vFieldMzone
[
1
][
oseq
][
1
].
Pos
.
X
)
/
2
+
0.12
f
-
0.06
f
*
sequence
;
t
->
X
=
(
matManager
.
vFieldMzone
[
1
][
oseq
][
0
].
Pos
.
X
+
matManager
.
vFieldMzone
[
1
][
oseq
][
1
].
Pos
.
X
)
/
2
+
0.12
f
-
0.06
f
*
mseq
;
t
->
Y
=
(
matManager
.
vFieldMzone
[
1
][
oseq
][
0
].
Pos
.
Y
+
matManager
.
vFieldMzone
[
1
][
oseq
][
2
].
Pos
.
Y
)
/
2
-
0.05
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
t
->
Z
=
overlay_buttom
+
mseq
*
material_height
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
3.1415926
f
;
...
...
gframe/drawing.cpp
View file @
92c95792
...
...
@@ -318,8 +318,21 @@ void Game::DrawCards() {
for
(
auto
it
=
dField
.
extra
[
p
].
begin
();
it
!=
dField
.
extra
[
p
].
end
();
++
it
)
DrawCard
(
*
it
);
}
for
(
auto
cit
=
dField
.
overlay_cards
.
begin
();
cit
!=
dField
.
overlay_cards
.
end
();
++
cit
)
DrawCard
(
*
cit
);
for
(
auto
cit
=
dField
.
overlay_cards
.
begin
();
cit
!=
dField
.
overlay_cards
.
end
();
++
cit
)
{
auto
pcard
=
(
*
cit
);
auto
olcard
=
pcard
->
overlayTarget
;
if
(
pcard
->
aniFrame
)
{
DrawCard
(
pcard
);
}
else
if
(
olcard
&&
olcard
->
location
==
LOCATION_MZONE
)
{
if
(
pcard
->
sequence
<
MAX_LAYER_COUNT
)
{
DrawCard
(
pcard
);
}
}
else
{
DrawCard
(
pcard
);
}
}
}
void
Game
::
DrawCard
(
ClientCard
*
pcard
)
{
if
(
pcard
->
aniFrame
)
{
...
...
gframe/duelclient.cpp
View file @
92c95792
...
...
@@ -2650,7 +2650,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
overlayTarget
=
olcard
;
pcard
->
location
=
LOCATION_OVERLAY
;
pcard
->
sequence
=
olcard
->
overlayed
.
size
()
-
1
;
if
(
olcard
->
location
==
0x4
)
{
if
(
olcard
->
location
==
LOCATION_MZONE
)
{
mainGame
->
gMutex
.
lock
();
mainGame
->
dField
.
MoveCard
(
pcard
,
10
);
if
(
pl
==
0x2
)
...
...
gframe/game.h
View file @
92c95792
...
...
@@ -807,7 +807,8 @@ extern Game* mainGame;
#define AVAIL_SC 0x8
#define AVAIL_OCGTCG (AVAIL_OCG|AVAIL_TCG)
#define DEFAULT_DUEL_RULE
5
#define DEFAULT_DUEL_RULE 5
#define CARD_ARTWORK_VERSIONS_OFFSET 10
#define MAX_LAYER_COUNT 6
#endif // GAME_H
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