Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
70589a8f
Commit
70589a8f
authored
Apr 12, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add expansions lflist support
parent
4c297b63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+36
-0
No files found.
gframe/deck_manager.cpp
View file @
70589a8f
...
@@ -11,8 +11,44 @@ DeckManager deckManager;
...
@@ -11,8 +11,44 @@ DeckManager deckManager;
void
DeckManager
::
LoadLFList
()
{
void
DeckManager
::
LoadLFList
()
{
LFList
*
cur
=
NULL
;
LFList
*
cur
=
NULL
;
FILE
*
fp
=
fopen
(
"lflist.conf"
,
"r"
);
FILE
*
fp
=
fopen
(
"lflist.conf"
,
"r"
);
FILE
*
fp_custom
=
fopen
(
"expansions/lflist.conf"
,
"r"
);
char
linebuf
[
256
];
char
linebuf
[
256
];
wchar_t
strBuffer
[
256
];
wchar_t
strBuffer
[
256
];
if
(
fp_custom
)
{
while
(
fgets
(
linebuf
,
256
,
fp_custom
))
{
if
(
linebuf
[
0
]
==
'#'
)
continue
;
int
p
=
0
,
sa
=
0
,
code
,
count
;
if
(
linebuf
[
0
]
==
'!'
)
{
sa
=
BufferIO
::
DecodeUTF8
((
const
char
*
)(
&
linebuf
[
1
]),
strBuffer
);
while
(
strBuffer
[
sa
-
1
]
==
L'\r'
||
strBuffer
[
sa
-
1
]
==
L'\n'
)
sa
--
;
LFList
newlist
;
_lfList
.
push_back
(
newlist
);
cur
=
&
_lfList
[
_lfList
.
size
()
-
1
];
memcpy
(
cur
->
listName
,
(
const
void
*
)
strBuffer
,
40
);
cur
->
listName
[
sa
]
=
0
;
cur
->
content
=
new
std
::
unordered_map
<
int
,
int
>
;
cur
->
hash
=
0x7dfcee6a
;
continue
;
}
while
(
linebuf
[
p
]
!=
' '
&&
linebuf
[
p
]
!=
'\t'
&&
linebuf
[
p
]
!=
0
)
p
++
;
if
(
linebuf
[
p
]
==
0
)
continue
;
linebuf
[
p
++
]
=
0
;
sa
=
p
;
code
=
atoi
(
linebuf
);
if
(
code
==
0
)
continue
;
while
(
linebuf
[
p
]
==
' '
||
linebuf
[
p
]
==
'\t'
)
p
++
;
while
(
linebuf
[
p
]
!=
' '
&&
linebuf
[
p
]
!=
'\t'
&&
linebuf
[
p
]
!=
0
)
p
++
;
linebuf
[
p
]
=
0
;
count
=
atoi
(
&
linebuf
[
sa
]);
if
(
cur
==
NULL
)
continue
;
(
*
cur
->
content
)[
code
]
=
count
;
cur
->
hash
=
cur
->
hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
count
))
|
(
code
>>
(
5
-
count
)));
}
fclose
(
fp_custom
);
}
if
(
fp
)
{
if
(
fp
)
{
while
(
fgets
(
linebuf
,
256
,
fp
))
{
while
(
fgets
(
linebuf
,
256
,
fp
))
{
if
(
linebuf
[
0
]
==
'#'
)
if
(
linebuf
[
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