--track0:僒僀僘,5,200,10
--track1:僞僀僾,0,1,0,1
--track2:霓柧搙,0,200,50
--track3:霓摟柧搙,0,100,0
--dialog:尦夋憸傪昞帵/chk,local moto=1;儌僲僋儘偵偡傞/chk,mono=0;霓恾宍(庬椶)/fig,local fig="墌";霓奼戝棪[%],local ss=100;霓恾宍夞揮[亱],local rr=0;暥帤/chk,local tex=0;暥帤(暥帤),local text="亄";暥帤(font),local font="MS UI Gothic";

local w=obj.w*100/obj.getvalue("zoom")
local h=obj.h*100/obj.getvalue("zoom")
local s=math.min(obj.track0,w,h)
local type=obj.track1
local bliteness=obj.track2
local alpha = obj.track3/100
local x={};y={};k={};o_col={};idx=0;

local nx=math.floor(w/s/2)
local ny=math.floor(h/s/2)
for j=-ny-1,ny do
  dot_y=h/2+(j+0.5)*s
  y0=j*s
  for i=-nx-1,nx do
    if type==0 then
      if j%2==0 then
        dot_x=w/2+(i+0.5)*s
        x0=i*s
      else
        dot_x=w/2+(i)*s
        x0=(i-0.5)*s
      end
    elseif type==1 then
      dot_x=w/2+(i+0.5)*s
      x0=i*s
    end
    kido,cb,cr,alp=obj.getpixel(dot_x,dot_y,"yc")
    color2=obj.getpixel(dot_x,dot_y,"col")
    idx=idx+1; x[idx]=x0; y[idx]=y0;o_col[idx]=color2;
  end
end

obj.setoption("dst","tmp",w,h)
if moto==1 then obj.draw() end
for i=1,idx do

    sk=1
    aa=1

  if(sk>0 and aa>0) then    
      col0=o_col[i]

    if(tex<1) then
      obj.load("figure",fig,col0,s*sk)
    else
      obj.setfont(font,s*sk,0,col0)
      obj.load("text",text)
    end

    obj.effect("怓挷曗惓","柧傞偝",bliteness)
    obj.draw(x[i]+s/2,y[i]+s/2,0,ss/100,aa*(1-alpha),0,0,rr)
  end
end
obj.load("tempbuffer")
if mono==1 then obj.effect("扨怓壔") end