add sprite flipping, cleanup some lua things
This commit is contained in:
parent
15041984f1
commit
b659523d69
8 changed files with 48 additions and 27 deletions
|
|
@ -1,5 +1,3 @@
|
|||
local ffi = require("ffi")
|
||||
|
||||
local core = require("pxl8.core")
|
||||
local gfx2d = require("pxl8.gfx2d")
|
||||
local input = require("pxl8.input")
|
||||
|
|
@ -13,11 +11,10 @@ local world = require("pxl8.world")
|
|||
local transition = require("pxl8.transition")
|
||||
local anim = require("pxl8.anim")
|
||||
local sfx = require("pxl8.sfx")
|
||||
|
||||
core.init(_pxl8_gfx, _pxl8_input, _pxl8_rng, _pxl8_sfx_mixer, _pxl8_sys)
|
||||
|
||||
local pxl8 = {}
|
||||
|
||||
core.init(pxl8_gfx, pxl8_input, pxl8_rng, pxl8_sfx, pxl8_sys)
|
||||
|
||||
pxl8.get_fps = core.get_fps
|
||||
pxl8.get_height = core.get_height
|
||||
pxl8.get_title = core.get_title
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ local C = ffi.C
|
|||
|
||||
local core = {}
|
||||
|
||||
function core.init(gfx, input, rng, sfx_mixer, sys)
|
||||
function core.init(gfx, input, rng, sfx, sys)
|
||||
core.gfx = gfx
|
||||
core.input = input
|
||||
core.rng = rng
|
||||
core.sfx_mixer = sfx_mixer
|
||||
core.sfx = sfx
|
||||
core.sys = sys
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -105,15 +105,15 @@ function sfx.delay_set_time(node, time_l, time_r)
|
|||
end
|
||||
|
||||
function sfx.get_master_volume()
|
||||
return C.pxl8_sfx_mixer_get_master_volume(core.sfx_mixer)
|
||||
return C.pxl8_sfx_mixer_get_master_volume(core.sfx)
|
||||
end
|
||||
|
||||
function sfx.mixer_attach(ctx)
|
||||
C.pxl8_sfx_mixer_attach(core.sfx_mixer, ctx)
|
||||
C.pxl8_sfx_mixer_attach(core.sfx, ctx)
|
||||
end
|
||||
|
||||
function sfx.mixer_detach(ctx)
|
||||
C.pxl8_sfx_mixer_detach(core.sfx_mixer, ctx)
|
||||
C.pxl8_sfx_mixer_detach(core.sfx, ctx)
|
||||
end
|
||||
|
||||
function sfx.node_destroy(node)
|
||||
|
|
@ -154,7 +154,7 @@ function sfx.reverb_set_room(node, room)
|
|||
end
|
||||
|
||||
function sfx.set_master_volume(volume)
|
||||
C.pxl8_sfx_mixer_set_master_volume(core.sfx_mixer, volume)
|
||||
C.pxl8_sfx_mixer_set_master_volume(core.sfx, volume)
|
||||
end
|
||||
|
||||
function sfx.stop_all(ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue