2 if not
object or not func then
return func end
3 return function(a, b, c, d)
4 return func(
object, a, b, c, d)
9 return function(mode, verts)
11 while index <=
#verts do
12 func_draw_line(verts[index - 3], verts[index - 2], verts[index - 1], verts[index])
19 return function (engine_mode, verts, x, y, scale, angle, ox, oy)
20 if #verts < 6 or #verts % 2 ~= 0 then
return end
21 local mode = modes and modes[engine_mode + 1] or engine_mode
22 local rotated =
std.math.cos and angle and angle ~= 0
26 if repeats and repeats[engine_mode + 1] then
27 verts[#verts + 1] = verts[1]
28 verts[#verts + 1] = verts[2]
31 if x and y and not rotated then
36 while index <= #verts
do
37 if index % 2 ~= 0 then
38 verts2[index] = x + (verts[index] * scale)
40 verts2[index] = y + (verts[index] * scale)
44 func_draw_poly(mode, verts2)
48 while index < #verts
do
49 local px = verts[index]
50 local py = verts[index + 1]
51 local xx = x + ((ox - px) * -scale *
std.math.cos(angle)) - ((ox - py) * -scale *
std.math.sin(angle))
52 local yy = y + ((oy - px) * -scale *
std.math.sin(angle)) + ((oy - py) * -scale *
std.math.cos(angle))
54 verts2[index + 1] = yy
57 func_draw_poly(mode, verts2)
59 func_draw_poly(mode, verts)
70 return {poly=
std.draw.poly}
local function decorator_poly(func_draw_poly, std, modes, repeats)
local function decorator_poo(object, func)
local function install(std, game, application, config)
local function decorator_line(func_draw_line)