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
b02d2bc4
Commit
b02d2bc4
authored
May 06, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tag
parent
dcf0155b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
gframe/game.cpp
gframe/game.cpp
+8
-5
gframe/game.h
gframe/game.h
+2
-2
No files found.
gframe/game.cpp
View file @
b02d2bc4
...
@@ -1778,7 +1778,7 @@ int Game::LocalPlayer(int player) const {
...
@@ -1778,7 +1778,7 @@ int Game::LocalPlayer(int player) const {
int
pid
=
player
?
1
:
0
;
int
pid
=
player
?
1
:
0
;
return
dInfo
.
isFirst
?
pid
:
1
-
pid
;
return
dInfo
.
isFirst
?
pid
:
1
-
pid
;
}
}
int
Game
::
OppositePlayer
(
int
player
)
const
{
int
Game
::
OppositePlayer
(
int
player
)
{
if
(
dInfo
.
isTag
)
{
if
(
dInfo
.
isTag
)
{
if
(
player
==
0
)
if
(
player
==
0
)
return
2
;
return
2
;
...
@@ -1792,7 +1792,7 @@ int Game::OppositePlayer(int player) const {
...
@@ -1792,7 +1792,7 @@ int Game::OppositePlayer(int player) const {
}
else
}
else
return
1
-
player
;
return
1
-
player
;
}
}
int
Game
::
ChatLocalPlayer
(
int
player
)
const
{
int
Game
::
ChatLocalPlayer
(
int
player
)
{
if
(
player
>
3
)
if
(
player
>
3
)
return
player
;
return
player
;
bool
is_self
;
bool
is_self
;
...
@@ -1809,13 +1809,16 @@ int Game::ChatLocalPlayer(int player) const {
...
@@ -1809,13 +1809,16 @@ int Game::ChatLocalPlayer(int player) const {
if
(
dInfo
.
isTag
)
{
if
(
dInfo
.
isTag
)
{
is_self
=
(
player
&
0x2
)
==
0
&&
(
player
&
0x1
)
==
(
DuelClient
::
selftype
&
0x1
);
is_self
=
(
player
&
0x2
)
==
0
&&
(
player
&
0x1
)
==
(
DuelClient
::
selftype
&
0x1
);
}
else
{
}
else
{
is_self
=
(
player
==
0
)
;
is_self
=
player
==
0
;
}
}
return
player
|
(
is_self
?
0x10
:
0
);
}
else
{
}
else
{
// when in lobby
// when in lobby
return
player
|
(
player
==
DuelClient
::
selftype
?
0x10
:
0
)
;
is_self
=
player
==
DuelClient
::
selftype
;
}
}
if
(
dInfo
.
isTag
&&
(
player
==
1
||
player
==
2
))
{
player
=
3
-
player
;
}
return
player
|
(
is_self
?
0x10
:
0
);
}
}
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
...
...
gframe/game.h
View file @
b02d2bc4
...
@@ -169,8 +169,8 @@ public:
...
@@ -169,8 +169,8 @@ public:
void
CloseDuelWindow
();
void
CloseDuelWindow
();
int
LocalPlayer
(
int
player
)
const
;
int
LocalPlayer
(
int
player
)
const
;
int
OppositePlayer
(
int
player
)
const
;
int
OppositePlayer
(
int
player
);
int
ChatLocalPlayer
(
int
player
)
const
;
int
ChatLocalPlayer
(
int
player
);
const
wchar_t
*
LocalName
(
int
local_player
);
const
wchar_t
*
LocalName
(
int
local_player
);
bool
HasFocus
(
EGUI_ELEMENT_TYPE
type
)
const
{
bool
HasFocus
(
EGUI_ELEMENT_TYPE
type
)
const
{
...
...
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