mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 08:30:58 +00:00
1682eae693
Going to extremes to avoid code duplication like the plague, but at least it's great to learn about the whole function environment business. git-svn-id: https://svn.eduke32.com/eduke32@3060 1a8010ca-5511-0410-912e-c29ae57300e0
34 lines
731 B
Text
34 lines
731 B
Text
-- INTERNAL
|
|
-- definitions of BUILD and game types for the Lunatic Interpreter
|
|
|
|
local ffi = require("ffi")
|
|
local ffiC = ffi.C
|
|
|
|
--== First, load the definitions common to the game's and editor's Lua interface.
|
|
decl = ffi.cdef
|
|
local defs_c = require("defs_common")
|
|
|
|
defs_c.create_globals(_G)
|
|
|
|
|
|
--== Mapster32-specific initialization
|
|
|
|
ffi.cdef "char *listsearchpath(int32_t initp);"
|
|
|
|
-- Add the search path directories to the Lua load path.
|
|
local initp = 1
|
|
while (true) do
|
|
local sp_c = ffiC.listsearchpath(initp)
|
|
|
|
if (sp_c == nil) then
|
|
break
|
|
end
|
|
|
|
local sp = ffi.string(sp_c)
|
|
assert(sp:sub(-1)=='/')
|
|
package.path = sp..'?.lua;'..package.path
|
|
|
|
initp = 0
|
|
end
|
|
|
|
--print('Lua load path: '..package.path)
|