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
f7e6b52c
Commit
f7e6b52c
authored
Oct 05, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataManager: fix FormatLinkMarker
parent
ba831be8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
23 deletions
+21
-23
gframe/data_manager.cpp
gframe/data_manager.cpp
+19
-20
gframe/data_manager.h
gframe/data_manager.h
+1
-2
gframe/game.cpp
gframe/game.cpp
+1
-1
No files found.
gframe/data_manager.cpp
View file @
f7e6b52c
...
...
@@ -360,26 +360,25 @@ std::wstring DataManager::FormatSetName(const uint16_t setcode[]) const {
buffer
.
pop_back
();
return
buffer
;
}
const
wchar_t
*
DataManager
::
FormatLinkMarker
(
int
link_marker
)
{
wchar_t
*
p
=
lmBuffer
;
*
p
=
0
;
if
(
link_marker
&
LINK_MARKER_TOP_LEFT
)
BufferIO
::
CopyWStrRef
(
L"[\u2196]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_TOP
)
BufferIO
::
CopyWStrRef
(
L"[\u2191]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_TOP_RIGHT
)
BufferIO
::
CopyWStrRef
(
L"[\u2197]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_LEFT
)
BufferIO
::
CopyWStrRef
(
L"[\u2190]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_RIGHT
)
BufferIO
::
CopyWStrRef
(
L"[\u2192]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_BOTTOM_LEFT
)
BufferIO
::
CopyWStrRef
(
L"[\u2199]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_BOTTOM
)
BufferIO
::
CopyWStrRef
(
L"[\u2193]"
,
p
,
4
);
if
(
link_marker
&
LINK_MARKER_BOTTOM_RIGHT
)
BufferIO
::
CopyWStrRef
(
L"[\u2198]"
,
p
,
4
);
return
lmBuffer
;
std
::
wstring
DataManager
::
FormatLinkMarker
(
unsigned
int
link_marker
)
const
{
std
::
wstring
buffer
;
if
(
link_marker
&
LINK_MARKER_TOP_LEFT
)
buffer
.
append
(
L"[\u2196]"
);
if
(
link_marker
&
LINK_MARKER_TOP
)
buffer
.
append
(
L"[\u2191]"
);
if
(
link_marker
&
LINK_MARKER_TOP_RIGHT
)
buffer
.
append
(
L"[\u2197]"
);
if
(
link_marker
&
LINK_MARKER_LEFT
)
buffer
.
append
(
L"[\u2190]"
);
if
(
link_marker
&
LINK_MARKER_RIGHT
)
buffer
.
append
(
L"[\u2192]"
);
if
(
link_marker
&
LINK_MARKER_BOTTOM_LEFT
)
buffer
.
append
(
L"[\u2199]"
);
if
(
link_marker
&
LINK_MARKER_BOTTOM
)
buffer
.
append
(
L"[\u2193]"
);
if
(
link_marker
&
LINK_MARKER_BOTTOM_RIGHT
)
buffer
.
append
(
L"[\u2198]"
);
return
buffer
;
}
uint32
DataManager
::
CardReader
(
uint32
code
,
card_data
*
pData
)
{
if
(
!
dataManager
.
GetData
(
code
,
pData
))
...
...
gframe/data_manager.h
View file @
f7e6b52c
...
...
@@ -37,7 +37,7 @@ public:
std
::
wstring
FormatRace
(
unsigned
int
race
)
const
;
std
::
wstring
FormatType
(
unsigned
int
type
)
const
;
std
::
wstring
FormatSetName
(
const
uint16_t
setcode
[])
const
;
const
wchar_t
*
FormatLinkMarker
(
int
link_marker
)
;
std
::
wstring
FormatLinkMarker
(
unsigned
int
link_marker
)
const
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_counterStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_victoryStrings
;
...
...
@@ -50,7 +50,6 @@ public:
wchar_t
numStrings
[
301
][
4
]{};
wchar_t
numBuffer
[
6
]{};
wchar_t
lmBuffer
[
32
]{};
static
byte
scriptBuffer
[
0x20000
];
static
const
wchar_t
*
unknown_string
;
...
...
gframe/game.cpp
View file @
f7e6b52c
...
...
@@ -1602,7 +1602,7 @@ void Game::ShowCardInfo(int code, bool resize) {
else
myswprintf
(
adBuffer
,
L"%d/- "
,
cd
.
attack
);
wcscat
(
formatBuffer
,
adBuffer
);
wcscat
(
formatBuffer
,
dataManager
.
FormatLinkMarker
(
cd
.
link_marker
));
wcscat
(
formatBuffer
,
dataManager
.
FormatLinkMarker
(
cd
.
link_marker
)
.
c_str
()
);
}
if
(
cd
.
type
&
TYPE_PENDULUM
)
{
wchar_t
scaleBuffer
[
16
];
...
...
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