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
c07b9172
Commit
c07b9172
authored
Dec 09, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b5e7bc61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
gframe/data_manager.cpp
gframe/data_manager.cpp
+4
-4
No files found.
gframe/data_manager.cpp
View file @
c07b9172
...
@@ -103,7 +103,7 @@ bool DataManager::LoadStrings(const char* file) {
...
@@ -103,7 +103,7 @@ bool DataManager::LoadStrings(const char* file) {
wcscpy
(
pbuf
,
strBuffer
);
wcscpy
(
pbuf
,
strBuffer
);
_counterStrings
[
value
]
=
pbuf
;
_counterStrings
[
value
]
=
pbuf
;
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t
^
\n
]"
,
&
value
,
strbuf
);
//using tab for comment
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
);
//using tab for comment
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wcscpy
(
pbuf
,
strBuffer
);
wcscpy
(
pbuf
,
strBuffer
);
...
@@ -191,11 +191,11 @@ const wchar_t* DataManager::GetCounterName(int code) {
...
@@ -191,11 +191,11 @@ const wchar_t* DataManager::GetCounterName(int code) {
const
wchar_t
*
DataManager
::
GetSetName
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetSetName
(
int
code
)
{
auto
csit
=
_setnameStrings
.
find
(
code
);
auto
csit
=
_setnameStrings
.
find
(
code
);
if
(
csit
==
_setnameStrings
.
end
())
if
(
csit
==
_setnameStrings
.
end
())
return
L""
;
return
NULL
;
return
csit
->
second
;
return
csit
->
second
;
}
}
unsigned
int
DataManager
::
GetSetCode
(
const
wchar_t
*
setname
)
{
unsigned
int
DataManager
::
GetSetCode
(
const
wchar_t
*
setname
)
{
for
(
auto
csit
=
_setnameStrings
.
begin
();
csit
!=
_setnameStrings
.
end
();
csit
++
)
for
(
auto
csit
=
_setnameStrings
.
begin
();
csit
!=
_setnameStrings
.
end
();
++
csit
)
if
(
wcscmp
(
csit
->
second
,
setname
)
==
0
)
if
(
wcscmp
(
csit
->
second
,
setname
)
==
0
)
return
csit
->
first
;
return
csit
->
first
;
return
0
;
return
0
;
...
@@ -281,7 +281,7 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) {
...
@@ -281,7 +281,7 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) {
wchar_t
*
p
=
scBuffer
;
wchar_t
*
p
=
scBuffer
;
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
const
wchar_t
*
setname
=
GetSetName
((
setcode
>>
i
*
16
)
&
0xffff
);
const
wchar_t
*
setname
=
GetSetName
((
setcode
>>
i
*
16
)
&
0xffff
);
if
(
setname
!=
L""
)
{
if
(
setname
)
{
BufferIO
::
CopyWStrRef
(
setname
,
p
,
16
);
BufferIO
::
CopyWStrRef
(
setname
,
p
,
16
);
*
p
=
L'|'
;
*
p
=
L'|'
;
*++
p
=
0
;
*++
p
=
0
;
...
...
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