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
1
Merge Requests
1
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
nanahira
ygopro
Commits
62d11a3b
Commit
62d11a3b
authored
Mar 03, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow single ypk
parent
3fb68455
Pipeline
#43524
passed with stages
in 14 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
33 deletions
+46
-33
gframe/game.cpp
gframe/game.cpp
+46
-33
No files found.
gframe/game.cpp
View file @
62d11a3b
...
@@ -1241,39 +1241,8 @@ std::wstring Game::SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cW
...
@@ -1241,39 +1241,8 @@ std::wstring Game::SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cW
void
Game
::
LoadExpansions
(
const
char
*
expansions_path
)
{
void
Game
::
LoadExpansions
(
const
char
*
expansions_path
)
{
bool
lflist_changed
=
false
;
bool
lflist_changed
=
false
;
bool
server_list_changed
=
false
;
bool
server_list_changed
=
false
;
FileSystem
::
TraversalDir
(
expansions_path
,
[
&
](
const
char
*
name
,
bool
isdir
)
{
if
(
isdir
)
auto
processArchive
=
[
&
](
irr
::
io
::
IFileArchive
*
archiveObj
)
{
return
;
char
fpath
[
1024
];
mysnprintf
(
fpath
,
"%s/%s"
,
expansions_path
,
name
);
if
(
IsExtension
(
name
,
".cdb"
))
{
dataManager
.
LoadDB
(
fpath
);
return
;
}
if
(
IsExtension
(
name
,
".conf"
))
{
if
(
!
std
::
strcmp
(
name
,
"lflist.conf"
))
{
deckManager
.
LoadLFListSingle
(
fpath
,
true
);
lflist_changed
=
true
;
}
else
if
(
!
std
::
strcmp
(
name
,
"servers.conf"
))
{
dataManager
.
LoadServerList
(
fpath
);
server_list_changed
=
true
;
}
else
{
dataManager
.
LoadStrings
(
fpath
);
}
return
;
}
if
(
!
std
::
strcmp
(
name
,
"corres_srv.ini"
))
{
dataManager
.
LoadCorresSrvIni
(
fpath
);
server_list_changed
=
true
;
return
;
}
if
(
IsExtension
(
name
,
".zip"
)
||
IsExtension
(
name
,
".ypk"
))
{
dataManager
.
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
,
irr
::
io
::
EFAT_ZIP
);
return
;
}
});
for
(
irr
::
u32
i
=
0
;
i
<
dataManager
.
FileSystem
->
getFileArchiveCount
();
++
i
)
{
auto
archiveObj
=
dataManager
.
FileSystem
->
getFileArchive
(
i
);
auto
archive
=
archiveObj
->
getFileList
();
auto
archive
=
archiveObj
->
getFileList
();
for
(
irr
::
u32
j
=
0
;
j
<
archive
->
getFileCount
();
++
j
)
{
for
(
irr
::
u32
j
=
0
;
j
<
archive
->
getFileCount
();
++
j
)
{
const
char
*
name
=
archive
->
getFullFileName
(
j
).
c_str
();
const
char
*
name
=
archive
->
getFullFileName
(
j
).
c_str
();
...
@@ -1308,7 +1277,51 @@ void Game::LoadExpansions(const char* expansions_path) {
...
@@ -1308,7 +1277,51 @@ void Game::LoadExpansions(const char* expansions_path) {
continue
;
continue
;
}
}
}
}
};
auto
mountAndProcess
=
[
&
](
const
char
*
fpath
)
{
irr
::
u32
countBefore
=
dataManager
.
FileSystem
->
getFileArchiveCount
();
dataManager
.
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
,
irr
::
io
::
EFAT_ZIP
);
for
(
irr
::
u32
i
=
countBefore
;
i
<
dataManager
.
FileSystem
->
getFileArchiveCount
();
++
i
)
processArchive
(
dataManager
.
FileSystem
->
getFileArchive
(
i
));
};
if
(
IsExtension
(
expansions_path
,
".zip"
)
||
IsExtension
(
expansions_path
,
".ypk"
))
{
mountAndProcess
(
expansions_path
);
}
else
{
FileSystem
::
TraversalDir
(
expansions_path
,
[
&
](
const
char
*
name
,
bool
isdir
)
{
if
(
isdir
)
return
;
char
fpath
[
1024
];
mysnprintf
(
fpath
,
"%s/%s"
,
expansions_path
,
name
);
if
(
IsExtension
(
name
,
".cdb"
))
{
dataManager
.
LoadDB
(
fpath
);
return
;
}
if
(
IsExtension
(
name
,
".conf"
))
{
if
(
!
std
::
strcmp
(
name
,
"lflist.conf"
))
{
deckManager
.
LoadLFListSingle
(
fpath
,
true
);
lflist_changed
=
true
;
}
else
if
(
!
std
::
strcmp
(
name
,
"servers.conf"
))
{
dataManager
.
LoadServerList
(
fpath
);
server_list_changed
=
true
;
}
else
{
dataManager
.
LoadStrings
(
fpath
);
}
return
;
}
if
(
!
std
::
strcmp
(
name
,
"corres_srv.ini"
))
{
dataManager
.
LoadCorresSrvIni
(
fpath
);
server_list_changed
=
true
;
return
;
}
if
(
IsExtension
(
name
,
".zip"
)
||
IsExtension
(
name
,
".ypk"
))
{
mountAndProcess
(
fpath
);
return
;
}
});
}
}
if
(
lflist_changed
)
if
(
lflist_changed
)
RefreshLFList
();
RefreshLFList
();
if
(
server_list_changed
)
if
(
server_list_changed
)
...
...
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