ff_constant_effect.lua (567B)
1 local base = string.match(..., "(.-)[^%.]+%.[^%.]+$") 2 local ff_envelope = require(base.."ev_api.ff_envelope").new 3 local ffi = require("ffi") 4 local fh = require(base.."helper.ffi_struct") 5 6 local format = string.format 7 8 local mt, index = {}, {} 9 10 fh.gen_raw_accessor(index, "level") 11 fh.gen_wrap_accessor(index, "envelope", ff_envelope) 12 13 function index:tostring() 14 return format("ff_constant_effect{level=%d, envelope=%s}", 15 self.level, self.envelope) 16 end 17 mt.__tostring = index.tostring 18 19 return fh.base(mt, index, ffi.typeof("struct ff_constant_effect"))