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
xiaoye
ygopro
Commits
312c981e
"...svn:/svn.code.sf.net/p/irrlicht/code/trunk@3333" did not exist on "7446ed975731544442a1c3edb55fd1d346e56b3e"
Commit
312c981e
authored
Nov 04, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catchup
parent
b7700129
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
gframe/game.cpp
gframe/game.cpp
+7
-7
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/game.cpp
View file @
312c981e
...
...
@@ -66,17 +66,18 @@ void Game::MainTestLoop(int code) {
NetServer
::
InitTestCard
(
code
);
}
void
Game
::
LoadBetaDB
()
{
LoadExpansionDBDirectry
(
"./beta"
);
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
HANDLE
fh
=
FindFirstFileW
(
L"./beta/*
.cdb
"
,
&
fdataw
);
HANDLE
fh
=
FindFirstFileW
(
L"./beta/*"
,
&
fdataw
);
if
(
fh
!=
INVALID_HANDLE_VALUE
)
{
do
{
if
(
!
(
fdataw
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
)
{
if
(
wcscmp
(
L"."
,
fdataw
.
cFileName
)
!=
0
&&
wcscmp
(
L".."
,
fdataw
.
cFileName
)
!=
0
&&
fdataw
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./beta/%s"
,
fname
);
dataManager
.
LoadDB
(
fpath
);
LoadExpansionDBDirectry
(
fpath
);
}
}
while
(
FindNextFileW
(
fh
,
&
fdataw
));
FindClose
(
fh
);
...
...
@@ -86,12 +87,11 @@ void Game::LoadBetaDB() {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./beta/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
size_t
len
=
strlen
(
dirp
->
d_name
);
if
(
len
<
5
||
strcasecmp
(
dirp
->
d_name
+
len
-
4
,
".cdb"
)
!=
0
)
if
(
strcmp
(
"."
,
dirp
->
d_name
)
==
0
||
strcmp
(
".."
,
dirp
->
d_name
)
==
0
||
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./beta/%s"
,
dirp
->
d_name
);
dataManager
.
LoadDB
(
filepath
);
sprintf
(
filepath
,
"./beta/%s
/
"
,
dirp
->
d_name
);
LoadExpansionDBDirectry
(
filepath
);
}
closedir
(
dir
);
}
...
...
gframe/game.h
View file @
312c981e
...
...
@@ -128,6 +128,7 @@ public:
void
MainServerLoop
();
void
MainTestLoop
(
int
code
);
void
LoadExpansionDB
();
void
LoadExpansionDBDirectry
(
const
char
*
path
);
void
LoadBetaDB
();
void
AddDebugMsg
(
char
*
msgbuf
);
bool
MakeDirectory
(
const
std
::
string
folder
);
...
...
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