Engine 0.0.6
Game engine in lua
Loading...
Searching...
No Matches
game.lua
Go to the documentation of this file.
1local os = require('os')
2local zeebo_meta = require('src/lib/cli/meta')
3
4local function init(args)
5 return false, 'not implemented!'
6end
7
8local function run(args)
9 if args.core == 'repl' then
10 arg = {args.game}
11 require('src/engine/core/repl/main')
12 return true
13 elseif args.core == 'love' then
14 if BOOTSTRAP then
15 return false, 'core love2d is not avaliable in bootstraped CLI.'
16 end
17 local love = 'love'
18 local screen = args['screen'] and '-screen '..args.screen or ''
19 local command = love..' src/engine/core/love -'..screen..' '..args.game
20 if not os or not os.execute then
21 return false, 'cannot can execute'
22 end
23 return os.execute(command)
24 end
25 return false, 'this core cannot be runned!'
26end
27
28local function meta(args)
29 arg = nil -- prevent infinite loop
30 zeebo_meta.current(args.game):stdout(args.format):run()
31 return true
32end
33
34local P = {
35 run = run,
36 meta = meta,
37 init = init
38}
39
40return P
local function meta()
local function stdout(self, format)
local function current(game, application)
local function require(std, game, application)
local function init(std, game)
local function loop(std, game)
local zeebo_meta
Definition game.lua:2
local function run(args)
local os
Definition game.lua:1
local command
Definition main.lua:12
local game
Definition main.lua:17