in-progress map things...
This commit is contained in:
parent
cfe7501fe2
commit
3c54e379d4
10 changed files with 753 additions and 14 deletions
|
|
@ -4,8 +4,6 @@ local gfx = _pxl8_gfx
|
|||
local input = _pxl8_input
|
||||
local ui = _pxl8_ui
|
||||
|
||||
-- pxl8 lua api
|
||||
--
|
||||
local pxl8 = {}
|
||||
|
||||
function pxl8.clr(color)
|
||||
|
|
@ -86,7 +84,6 @@ function pxl8.upload_atlas()
|
|||
C.pxl8_gfx_upload_atlas(gfx)
|
||||
end
|
||||
|
||||
-- log
|
||||
function pxl8.info(msg)
|
||||
C.pxl8_lua_info(msg)
|
||||
end
|
||||
|
|
@ -419,4 +416,29 @@ function pxl8.ui_window_set_open(title, open)
|
|||
C.pxl8_ui_window_set_open(ui, title, open)
|
||||
end
|
||||
|
||||
function pxl8.world_new()
|
||||
return C.pxl8_world_create()
|
||||
end
|
||||
|
||||
function pxl8.world_destroy(world)
|
||||
C.pxl8_world_destroy(world)
|
||||
end
|
||||
|
||||
function pxl8.world_load(world, filepath)
|
||||
return C.pxl8_world_load(world, filepath)
|
||||
end
|
||||
|
||||
function pxl8.world_render(world, camera_pos)
|
||||
local vec = ffi.new("pxl8_vec3", {x = camera_pos[1], y = camera_pos[2], z = camera_pos[3]})
|
||||
C.pxl8_world_render(world, gfx, vec)
|
||||
end
|
||||
|
||||
function pxl8.world_unload(world)
|
||||
C.pxl8_world_unload(world)
|
||||
end
|
||||
|
||||
function pxl8.world_is_loaded(world)
|
||||
return C.pxl8_world_is_loaded(world)
|
||||
end
|
||||
|
||||
return pxl8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue