You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
567 B
Lua

local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
local ff_envelope = require(base.."ev_api.ff_envelope").new
local ffi = require("ffi")
local fh = require(base.."helper.ffi_struct")
local format = string.format
local mt, index = {}, {}
fh.gen_raw_accessor(index, "level")
fh.gen_wrap_accessor(index, "envelope", ff_envelope)
function index:tostring()
return format("ff_constant_effect{level=%d, envelope=%s}",
self.level, self.envelope)
end
mt.__tostring = index.tostring
return fh.base(mt, index, ffi.typeof("struct ff_constant_effect"))