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.
21 lines
647 B
Lua
21 lines
647 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, "start_level")
|
|
fh.gen_raw_accessor(index, "end_level")
|
|
fh.gen_wrap_accessor(index, "envelope", ff_envelope)
|
|
|
|
function index:tostring()
|
|
return format("ff_ramp_effect{start_level=%d, end_level=%d, envelope=%s}",
|
|
self.start_level, self.end_level, self.envelope)
|
|
end
|
|
mt.__tostring = index.tostring
|
|
|
|
return fh.base(mt, index, ffi.typeof("struct ff_ramp_effect"))
|