Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
engine
Commits
3d7bd9c0
Commit
3d7bd9c0
authored
Jun 22, 2019
by
D-AIRY
Browse files
Options
Downloads
Patches
Plain Diff
added FS test
parent
6708ed46
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/fs_test/dir/test.txt
+0
-0
0 additions, 0 deletions
build/fs_test/dir/test.txt
source/SkyXEngine_Build/SkyXEngine_Build.cpp
+26
-0
26 additions, 0 deletions
source/SkyXEngine_Build/SkyXEngine_Build.cpp
with
26 additions
and
0 deletions
build/fs_test/dir/test.txt
0 → 100644
+
0
−
0
View file @
3d7bd9c0
This diff is collapsed.
Click to expand it.
source/SkyXEngine_Build/SkyXEngine_Build.cpp
+
26
−
0
View file @
3d7bd9c0
...
...
@@ -130,6 +130,7 @@ int main(int argc, char **argv)
#endif
IXEngine
*
pEngine
=
XEngineInit
(
argc
,
argv
,
"build"
);
INIT_OUTPUT_STREAM
(
pEngine
->
getCore
());
IXWindowSystem
*
pWindowSystem
=
XWindowInit
();
...
...
@@ -151,6 +152,31 @@ int main(int argc, char **argv)
pEngine
->
getCore
()
->
execCmd
(
"exec ../config_game.cfg"
);
pEngine
->
getCore
()
->
execCmd
(
"exec ../config_game_user.cfg"
);
#if 1
IFileSystem
*
pFS
=
pEngine
->
getCore
()
->
getFileSystem
();
pFS
->
addRoot
(
"fs_test"
);
printf
(
COLOR_LRED
"################# FILESYTEM TEST ##################
\n
"
);
IFile
*
pFile
=
pFS
->
openFile
(
"dir/test.txt"
,
FILE_MODE_READ
);
if
(
pFile
)
{
char
*
pData
=
(
char
*
)
alloca
(
sizeof
(
char
)
*
pFile
->
getSize
());
pFile
->
readBin
(
pData
,
sizeof
(
char
)
*
pFile
->
getSize
());
printf
(
"File opened! Content:
\n
%s
\n
"
,
pData
);
}
else
{
printf
(
"Unable to open file!
\n
"
);
}
printf
(
"###################################################
\n
"
COLOR_RESET
);
#endif
int
ret
=
pEngine
->
start
();
mem_release
(
pWindow
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment