Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
44b7e104
Commit
44b7e104
authored
Nov 23, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化超量素材叠放视觉
parent
bfacf1f8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
16 deletions
+71
-16
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+12
-8
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+15
-2
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+1
-1
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+42
-5
Classes/gframe/game.h
Classes/gframe/game.h
+1
-0
No files found.
Classes/gframe/client_field.cpp
View file @
44b7e104
...
...
@@ -869,6 +869,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
;
...
...
@@ -948,7 +951,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
;
...
...
@@ -1061,21 +1064,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
;
...
...
Classes/gframe/drawing.cpp
View file @
44b7e104
...
...
@@ -282,8 +282,21 @@ void Game::DrawLinkedZones(ClientCard* pcard, ClientCard* fcard) {
}
void
Game
::
DrawCards
()
{
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
);
}
}
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
it
=
dField
.
mzone
[
p
].
begin
();
it
!=
dField
.
mzone
[
p
].
end
();
++
it
)
if
(
*
it
)
...
...
Classes/gframe/duelclient.cpp
View file @
44b7e104
...
...
@@ -2669,7 +2669,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
)
...
...
Classes/gframe/event_handler.cpp
View file @
44b7e104
...
...
@@ -2554,25 +2554,62 @@ void ClientField::GetHoverField(int x, int y) {
hovered_sequence
=
sequence
;
}
else
if
(
boardy
>=
matManager
.
vFieldMzone
[
0
][
5
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldMzone
[
0
][
5
][
2
].
Pos
.
Y
)
{
if
(
sequence
==
1
)
{
if
(
!
mzone
[
1
][
6
])
{
if
(
mzone
[
0
][
5
])
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
5
;
}
else
{
}
else
if
(
mzone
[
1
][
6
])
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
6
;
}
}
else
if
(
sequence
==
3
)
{
if
(
!
mzone
[
1
][
5
])
{
else
if
((
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_PLACE
||
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_DISFIELD
))
{
if
(
mainGame
->
dField
.
selectable_field
&
(
0x1
<<
(
16
+
6
)))
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
6
;
}
else
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
5
;
}
}
else
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
5
;
}
}
else
if
(
sequence
==
3
)
{
if
(
mzone
[
0
][
6
])
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
6
;
}
else
{
}
else
if
(
mzone
[
1
][
5
])
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
5
;
}
else
if
((
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_PLACE
||
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_DISFIELD
))
{
if
(
mainGame
->
dField
.
selectable_field
&
(
0x1
<<
(
16
+
5
)))
{
hovered_controler
=
1
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
5
;
}
else
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
6
;
}
}
else
{
hovered_controler
=
0
;
hovered_location
=
LOCATION_MZONE
;
hovered_sequence
=
6
;
}
}
}
else
if
(
boardy
>=
matManager
.
vFieldMzone
[
1
][
0
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldMzone
[
1
][
0
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
...
...
Classes/gframe/game.h
View file @
44b7e104
...
...
@@ -927,6 +927,7 @@ extern Game* mainGame;
#define DEFAULT_DUEL_RULE 5
#define CARD_ARTWORK_VERSIONS_OFFSET 10
#define MAX_LAYER_COUNT 6
#ifdef _IRR_ANDROID_PLATFORM_
#define GAME_WIDTH 1024
...
...
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