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
ba831be8
Commit
ba831be8
authored
Oct 05, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataManager: fix FormatSetName
parent
382ed9e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
gframe/data_manager.cpp
gframe/data_manager.cpp
+8
-10
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 @
ba831be8
...
...
@@ -344,23 +344,21 @@ std::wstring DataManager::FormatType(unsigned int type) const {
buffer
.
pop_back
();
return
buffer
;
}
const
wchar_t
*
DataManager
::
FormatSetName
(
const
uint16_t
setcode
[])
{
wchar_t
*
p
=
scB
uffer
;
std
::
wstring
DataManager
::
FormatSetName
(
const
uint16_t
setcode
[])
const
{
std
::
wstring
b
uffer
;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
if
(
!
setcode
[
i
])
break
;
const
wchar_t
*
setname
=
GetSetName
(
setcode
[
i
]);
if
(
setname
)
{
BufferIO
::
CopyWStrRef
(
setname
,
p
,
32
);
*
p
=
L'|'
;
*++
p
=
0
;
buffer
.
append
(
setname
);
buffer
.
push_back
(
L'|'
);
}
}
if
(
p
!=
scBuffer
)
*
(
p
-
1
)
=
0
;
else
return
unknown_string
;
return
scBuffer
;
if
(
buffer
.
empty
())
return
std
::
wstring
(
unknown_string
);
buffer
.
pop_back
();
return
buffer
;
}
const
wchar_t
*
DataManager
::
FormatLinkMarker
(
int
link_marker
)
{
wchar_t
*
p
=
lmBuffer
;
...
...
gframe/data_manager.h
View file @
ba831be8
...
...
@@ -36,7 +36,7 @@ public:
std
::
wstring
FormatAttribute
(
unsigned
int
attribute
)
const
;
std
::
wstring
FormatRace
(
unsigned
int
race
)
const
;
std
::
wstring
FormatType
(
unsigned
int
type
)
const
;
const
wchar_t
*
FormatSetName
(
const
uint16_t
setcode
[])
;
std
::
wstring
FormatSetName
(
const
uint16_t
setcode
[])
const
;
const
wchar_t
*
FormatLinkMarker
(
int
link_marker
);
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_counterStrings
;
...
...
@@ -50,7 +50,6 @@ public:
wchar_t
numStrings
[
301
][
4
]{};
wchar_t
numBuffer
[
6
]{};
wchar_t
scBuffer
[
128
]{};
wchar_t
lmBuffer
[
32
]{};
static
byte
scriptBuffer
[
0x20000
];
...
...
gframe/game.cpp
View file @
ba831be8
...
...
@@ -1563,7 +1563,7 @@ void Game::ShowCardInfo(int code, bool resize) {
}
if
(
target
->
second
.
setcode
[
0
])
{
offset
=
23
;
// *yScale;
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
target
->
second
.
setcode
));
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
target
->
second
.
setcode
)
.
c_str
()
);
stSetName
->
setText
(
formatBuffer
);
}
else
...
...
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