Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Game Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Game Development
Game Library
Commits
9afe7868
Commit
9afe7868
authored
1 year ago
by
Joseph Walton-Rivers
Browse files
Options
Downloads
Patches
Plain Diff
deal with crash when unknown types are encounted
parent
44d98299
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/fggl/ds/graph.hpp
+9
-10
9 additions, 10 deletions
include/fggl/ds/graph.hpp
integrations/lua/include/fggl/script/lua/module.hpp
+1
-0
1 addition, 0 deletions
integrations/lua/include/fggl/script/lua/module.hpp
integrations/lua/src/module.cpp
+5
-4
5 additions, 4 deletions
integrations/lua/src/module.cpp
with
15 additions
and
14 deletions
include/fggl/ds/graph.hpp
+
9
−
10
View file @
9afe7868
...
...
@@ -142,20 +142,19 @@ namespace fggl::ds {
auto
myDeps
=
m_edges
.
at
(
idx
);
for
(
auto
&
dep
:
myDeps
)
{
if
(
m_edges
.
find
(
dep
)
==
m_edges
.
end
()
)
{
debug
::
warning
(
"dependency was in graph, but does not exist as vertex: {}"
,
dep
.
get
());
continue
;
}
assert
(
m_edges
.
contains
(
dep
)
);
// ensure dependency loops don't cause errors
if
(
visited
.
contains
(
dep
)
)
{
debug
::
warning
(
"Dependency loop detected, aborting"
);
continue
;
}
sortUtilRev
(
dep
,
visited
,
stack
);
// if this node exists in the graph, fetch its dependencies to
if
(
m_edges
.
contains
(
dep
)
)
{
sortUtilRev
(
dep
,
visited
,
stack
);
}
else
{
// !? we don't know about this asset but someone wants it, stick it in the queue
// this will probably cause an error when chain loading, but then it will let people
// know it's missing.
stack
.
push
(
dep
);
}
}
stack
.
push
(
idx
);
...
...
This diff is collapsed.
Click to expand it.
integrations/lua/include/fggl/script/lua/module.hpp
+
1
−
0
View file @
9afe7868
...
...
@@ -37,6 +37,7 @@ namespace fggl::script::lua {
struct
Lua
:
public
services
::
Module
{
FGGL_MODULE
(
fggl
::
script
::
Lua
,
fggl
::
filesystem
::
API
)
void
setup
(
services
::
Generator
*
)
override
;
void
wireServices
(
services
::
ModuleBinder
&
binder
)
override
;
};
...
...
This diff is collapsed.
Click to expand it.
integrations/lua/src/module.cpp
+
5
−
4
View file @
9afe7868
...
...
@@ -28,12 +28,13 @@ namespace fggl::script::lua {
return
assets
::
INVALID_ASSET_TYPE
;
}
void
Lua
::
setup
(
fggl
::
services
::
Generator
*
generator
)
{
auto
adapted
=
generator
->
getLazy
<
assets
::
CheckinAdapted
>
();
adapted
->
setLoader
(
MIME_LUA
,
assets
::
NEEDS_CHECKIN
,
is_lua
);
}
void
Lua
::
wireServices
(
services
::
ModuleBinder
&
binder
)
{
binder
.
bind
<
ScriptProvider
>
().
to
<
LuaScriptProvider
,
fggl
::
filesystem
::
Locator
>
();
//TODO
//auto *assetPacker = serviceManager.get<assets::CheckinAdapted>();
//assetPacker->setLoader(MIME_LUA, assets::NEEDS_CHECKIN, is_lua);
}
}
\ No newline at end of file
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