-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for loading configs and persistence in conf.lua
Program title is now set in conf.lua rather than in selene_main Moved common "lua setup" code into own file, is used in main.lua and conf.lua This sets up require paths and Selene Adjusted some files to prevent crashes with love.system not being loaded yet in conf.lua
- Loading branch information
Showing
7 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Setting up globals for a new Lua environment (main.lua or conf.lua) | ||
|
||
local ffi = require("ffi") | ||
|
||
local path = "selene/selene/lib/?.lua;selene/selene/lib/?/init.lua;?/?.lua;" .. love.filesystem.getRequirePath() | ||
love.filesystem.setRequirePath(path) | ||
|
||
-- love.system might not exist yet | ||
if ffi and ffi.os == "OSX" then | ||
package.cpath = package.cpath .. ";" .. love.filesystem.getSourceBaseDirectory() .. "/?.so" | ||
end | ||
|
||
-- Load faster unpack function | ||
require("lib.fast_unpack") | ||
|
||
-- Keeping it here since it is an option, and seems to make a difference at some points | ||
-- Attempt to expose to config option at some point | ||
--[[ | ||
_G._selene = {} | ||
_G._selene.notypecheck = true | ||
]] | ||
|
||
require("selene").load() | ||
require("selene/selene/wrappers/searcher/love2d/searcher").load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters