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
6bdff452
Commit
6bdff452
authored
Oct 05, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataManager: fix FormatAttribute, FormatRace
parent
6a2deaac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
32 deletions
+22
-32
gframe/data_manager.cpp
gframe/data_manager.cpp
+20
-28
gframe/data_manager.h
gframe/data_manager.h
+2
-4
No files found.
gframe/data_manager.cpp
View file @
6bdff452
...
@@ -304,39 +304,31 @@ const wchar_t* DataManager::FormatLocation(int location, int sequence) const {
...
@@ -304,39 +304,31 @@ const wchar_t* DataManager::FormatLocation(int location, int sequence) const {
else
else
return
unknown_string
;
return
unknown_string
;
}
}
const
wchar_t
*
DataManager
::
FormatAttribute
(
int
attribute
)
{
std
::
wstring
DataManager
::
FormatAttribute
(
unsigned
int
attribute
)
const
{
wchar_t
*
p
=
attBuffer
;
std
::
wstring
buffer
;
unsigned
filter
=
1
;
for
(
int
i
=
0
;
i
<
ATTRIBUTES_COUNT
;
++
i
)
{
int
i
=
1010
;
if
(
attribute
&
(
0x1U
<<
i
))
{
for
(;
filter
!=
0x80
;
filter
<<=
1
,
++
i
)
{
buffer
.
append
(
GetSysString
(
1010
+
i
));
if
(
attribute
&
filter
)
{
buffer
.
push_back
(
L'|'
);
BufferIO
::
CopyWStrRef
(
GetSysString
(
i
),
p
,
16
);
*
p
=
L'|'
;
*++
p
=
0
;
}
}
}
}
if
(
p
!=
attBuffer
)
if
(
buffer
.
empty
())
*
(
p
-
1
)
=
0
;
return
std
::
wstring
(
unknown_string
);
else
buffer
.
pop_back
();
return
unknown_string
;
return
buffer
;
return
attBuffer
;
}
}
const
wchar_t
*
DataManager
::
FormatRace
(
int
race
)
{
std
::
wstring
DataManager
::
FormatRace
(
unsigned
int
race
)
const
{
wchar_t
*
p
=
racBuffer
;
std
::
wstring
buffer
;
unsigned
filter
=
1
;
for
(
int
i
=
0
;
i
<
RACES_COUNT
;
++
i
)
{
int
i
=
1020
;
if
(
race
&
(
0x1U
<<
i
))
{
for
(;
filter
<
(
1
<<
RACES_COUNT
);
filter
<<=
1
,
++
i
)
{
buffer
.
append
(
GetSysString
(
1020
+
i
));
if
(
race
&
filter
)
{
buffer
.
push_back
(
L'|'
);
BufferIO
::
CopyWStrRef
(
GetSysString
(
i
),
p
,
16
);
*
p
=
L'|'
;
*++
p
=
0
;
}
}
}
}
if
(
p
!=
racBuffer
)
if
(
buffer
.
empty
())
*
(
p
-
1
)
=
0
;
return
std
::
wstring
(
unknown_string
);
else
buffer
.
pop_back
();
return
unknown_string
;
return
buffer
;
return
racBuffer
;
}
}
const
wchar_t
*
DataManager
::
FormatType
(
int
type
)
{
const
wchar_t
*
DataManager
::
FormatType
(
int
type
)
{
wchar_t
*
p
=
tpBuffer
;
wchar_t
*
p
=
tpBuffer
;
...
...
gframe/data_manager.h
View file @
6bdff452
...
@@ -33,8 +33,8 @@ public:
...
@@ -33,8 +33,8 @@ public:
std
::
vector
<
unsigned
int
>
GetSetCodes
(
std
::
wstring
setname
)
const
;
std
::
vector
<
unsigned
int
>
GetSetCodes
(
std
::
wstring
setname
)
const
;
const
wchar_t
*
GetNumString
(
int
num
,
bool
bracket
=
false
);
const
wchar_t
*
GetNumString
(
int
num
,
bool
bracket
=
false
);
const
wchar_t
*
FormatLocation
(
int
location
,
int
sequence
)
const
;
const
wchar_t
*
FormatLocation
(
int
location
,
int
sequence
)
const
;
const
wchar_t
*
FormatAttribute
(
int
attribute
)
;
std
::
wstring
FormatAttribute
(
unsigned
int
attribute
)
const
;
const
wchar_t
*
FormatRace
(
int
race
)
;
std
::
wstring
FormatRace
(
unsigned
int
race
)
const
;
const
wchar_t
*
FormatType
(
int
type
);
const
wchar_t
*
FormatType
(
int
type
);
const
wchar_t
*
FormatSetName
(
const
uint16_t
setcode
[]);
const
wchar_t
*
FormatSetName
(
const
uint16_t
setcode
[]);
const
wchar_t
*
FormatLinkMarker
(
int
link_marker
);
const
wchar_t
*
FormatLinkMarker
(
int
link_marker
);
...
@@ -50,8 +50,6 @@ public:
...
@@ -50,8 +50,6 @@ public:
wchar_t
numStrings
[
301
][
4
]{};
wchar_t
numStrings
[
301
][
4
]{};
wchar_t
numBuffer
[
6
]{};
wchar_t
numBuffer
[
6
]{};
wchar_t
attBuffer
[
128
]{};
wchar_t
racBuffer
[
128
]{};
wchar_t
tpBuffer
[
128
]{};
wchar_t
tpBuffer
[
128
]{};
wchar_t
scBuffer
[
128
]{};
wchar_t
scBuffer
[
128
]{};
wchar_t
lmBuffer
[
32
]{};
wchar_t
lmBuffer
[
32
]{};
...
...
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