注释首字母大写
This commit is contained in:
@@ -28,7 +28,7 @@ back.glow={
|
||||
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
|
||||
gc.clear(t,t,t)
|
||||
end,
|
||||
}--light-dark
|
||||
}--Light-dark
|
||||
back.rgb={
|
||||
init=function()
|
||||
t=0
|
||||
@@ -57,7 +57,7 @@ back.flink={
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
end,
|
||||
}--flash after random time
|
||||
}--Flash after random time
|
||||
back.aura={
|
||||
init=function()
|
||||
t=rnd()*3600
|
||||
@@ -76,7 +76,7 @@ back.aura={
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
gc.setShader()
|
||||
end,
|
||||
}--cool liquid background
|
||||
}--Cool liquid background
|
||||
back.game1={
|
||||
init=function()
|
||||
t=0
|
||||
@@ -222,11 +222,11 @@ back.space={
|
||||
local S=stars
|
||||
for i=1,1260,5 do
|
||||
local s=rnd(26,40)*.1
|
||||
S[i]=s*scr.k --size
|
||||
S[i+1]=rnd(W)-10 --x
|
||||
S[i+2]=rnd(H)-10 --y
|
||||
S[i+3]=(rnd()-.5)*.01*s --vx
|
||||
S[i+4]=(rnd()-.5)*.01*s --vy
|
||||
S[i]=s*scr.k --Size
|
||||
S[i+1]=rnd(W)-10 --X
|
||||
S[i+2]=rnd(H)-10 --Y
|
||||
S[i+3]=(rnd()-.5)*.01*s --Vx
|
||||
S[i+4]=(rnd()-.5)*.01*s --Vy
|
||||
end--800 var
|
||||
end,
|
||||
update=function(dt)
|
||||
@@ -234,7 +234,7 @@ back.space={
|
||||
for i=1,1260,5 do
|
||||
S[i+1]=(S[i+1]+S[i+3])%W
|
||||
S[i+2]=(S[i+2]+S[i+4])%H
|
||||
end--star moving
|
||||
end--Star moving
|
||||
end,
|
||||
draw=function()
|
||||
gc.clear(.2,.2,.2)
|
||||
@@ -260,7 +260,7 @@ for _,bg in next,back do
|
||||
if not bg.update then bg.update= NULL end setfenv(bg.update ,BGvars)
|
||||
if not bg.discard then bg.discard=NULL end setfenv(bg.discard ,BGvars)
|
||||
if not bg.draw then bg.draw= NULL end setfenv(bg.draw ,BGvars)
|
||||
end--make BG vars invisible
|
||||
end--Make BG vars invisible
|
||||
|
||||
BG={
|
||||
cur="none",
|
||||
|
||||
@@ -59,7 +59,7 @@ local function dumpTable(L,t)
|
||||
end
|
||||
return s..tabs[t-1].."}"
|
||||
end
|
||||
local function addToTable(G,base)--refresh default base with G-values
|
||||
local function addToTable(G,base)--Refresh default base with G-values
|
||||
for k,v in next,G do
|
||||
if type(v)==type(base[k])then
|
||||
if type(v)=="table"then
|
||||
|
||||
@@ -351,7 +351,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="返回",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="制作人员",
|
||||
his="更新历史",
|
||||
@@ -803,7 +803,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="返回",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="制作人员",
|
||||
his="更新历史",
|
||||
@@ -1244,7 +1244,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="Back",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="Staff",
|
||||
his="History",
|
||||
@@ -1681,7 +1681,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="X",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="Orz",
|
||||
his="_&_",
|
||||
|
||||
@@ -26,7 +26,7 @@ local function draw(L)
|
||||
lightRenderShader:send("xresolution",L.size);
|
||||
shadowMapShader:send("yresolution",L.size);
|
||||
|
||||
--get up-left of light
|
||||
--Get up-left of light
|
||||
local X=L.x-L.size*.5
|
||||
local Y=L.y-L.size*.5
|
||||
|
||||
@@ -74,10 +74,10 @@ function LIGHT.add(x,y,R,F)
|
||||
--Methods
|
||||
id=id,
|
||||
x=x,y=y,size=R,
|
||||
blackCanvas=gc.newCanvas(R,R),--solid canvas
|
||||
blackCanvas=gc.newCanvas(R,R),--Solid canvas
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
|
||||
renderCanvas=gc.newCanvas(R,R),--light canvas
|
||||
blackFn=F,--solid draw funcion
|
||||
renderCanvas=gc.newCanvas(R,R),--Light canvas
|
||||
blackFn=F,--Solid draw funcion
|
||||
|
||||
|
||||
move=move,
|
||||
|
||||
@@ -66,7 +66,7 @@ local function drawVirtualkey()
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r,10)--Button outline
|
||||
_=V[i].pressTime
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--Icon
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
|
||||
@@ -195,7 +195,7 @@ function Pnt.mode()
|
||||
gc.line(M.x,M.y,m.x,m.y)
|
||||
end
|
||||
end
|
||||
end--lines connecting modes
|
||||
end--Lines connecting modes
|
||||
|
||||
for name,M in next,Modes do
|
||||
if R[name]then
|
||||
@@ -217,7 +217,7 @@ function Pnt.mode()
|
||||
gc.setLineWidth(10)
|
||||
gc.rectangle("line",M.x-S+5,M.y-S+5,2*S-10,2*S-10)
|
||||
end
|
||||
elseif M.shape==2 then--diamond
|
||||
elseif M.shape==2 then--Diamond
|
||||
gc.circle("fill",M.x,M.y,S+5,4)
|
||||
if sel==name then
|
||||
gc.setColor(1,1,1)
|
||||
|
||||
@@ -38,7 +38,7 @@ function SFX.fieldPlay(s,v,P)
|
||||
end
|
||||
function SFX.play(s,vol,pos,force)
|
||||
if setting.sfx==0 and not force then return end
|
||||
local S=SFX.list[s]--source list
|
||||
local S=SFX.list[s]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
|
||||
@@ -9,6 +9,6 @@ return{
|
||||
aura=N("aura"),
|
||||
gradient1=N("grad1"),--Horizonal red-blue gradient
|
||||
gradient2=N("grad2"),--Vertical red-green gradient
|
||||
rgb1=N("rgb1"),--colorful RGB
|
||||
rgb2=N("rgb2"),--blue RGB
|
||||
rgb1=N("rgb1"),--Colorful RGB
|
||||
rgb2=N("rgb2"),--Blue RGB
|
||||
}
|
||||
@@ -85,17 +85,17 @@ function TEXT.getText(text,x,y,font,style,spd,stop)
|
||||
stop=stop,
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style),
|
||||
}
|
||||
end--another version of TEXT()
|
||||
end--Another version of TEXT()
|
||||
function TEXT.show(text,x,y,font,style,spd,stop)
|
||||
texts[#texts+1]={
|
||||
c=0, --timer
|
||||
text=text, --string
|
||||
x=x or 0, --x
|
||||
y=y or 0, --y
|
||||
font=font or 40, --font
|
||||
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
|
||||
stop=stop, --stop time(sustained text)
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style), --draw method
|
||||
c=0, --Timer
|
||||
text=text, --String
|
||||
x=x or 0, --X
|
||||
y=y or 0, --Y
|
||||
font=font or 40, --Font
|
||||
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
|
||||
stop=stop, --Stop time(sustained text)
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style), --Draw method
|
||||
}
|
||||
end
|
||||
function TEXT.update(list)
|
||||
|
||||
@@ -18,8 +18,8 @@ function Tmr.load()
|
||||
elseif S.phase==4 then
|
||||
IMG.loadOne(S.cur)
|
||||
elseif S.phase==5 then
|
||||
local m=Modes[S.cur]--mode template
|
||||
local M=require("modes/"..m.name)--mode file
|
||||
local m=Modes[S.cur]--Mode template
|
||||
local M=require("modes/"..m.name)--Mode file
|
||||
Modes[m.name],Modes[S.cur]=M
|
||||
for k,v in next,m do
|
||||
M[k]=v
|
||||
@@ -118,7 +118,7 @@ function Tmr.mode(dt)
|
||||
elseif y<-1900*k then y=-1900*k
|
||||
end
|
||||
cam.x,cam.y=x,y
|
||||
--keyboard controlling
|
||||
--Keyboard controlling
|
||||
|
||||
cam.x1=cam.x1*.85+x*.15
|
||||
cam.y1=cam.y1*.85+y*.15
|
||||
@@ -227,7 +227,7 @@ function Tmr.play(dt)
|
||||
if game.frame%26==0 and setting.warn then
|
||||
local F=P1.field
|
||||
local M=#F
|
||||
local height=0--max height of row 4~7
|
||||
local height=0--Max height of row 4~7
|
||||
for x=4,7 do
|
||||
for y=M,1,-1 do
|
||||
if F[y][x]>0 then
|
||||
|
||||
@@ -57,7 +57,7 @@ local function getVoice(str)
|
||||
end
|
||||
end
|
||||
return L[n]
|
||||
--load voice with string
|
||||
--Load voice with string
|
||||
end
|
||||
function VOC.loadOne(_)
|
||||
local N=VOC.name[_]
|
||||
@@ -94,21 +94,21 @@ function VOC.update()
|
||||
Q[1]:setVolume(setting.voc*.1)
|
||||
Q[1]:play()
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--playing 1,ready 2
|
||||
elseif Q.s==2 then--Playing 1,ready 2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
end
|
||||
elseif Q.s==3 then--playing 12 same time
|
||||
elseif Q.s==3 then--Playing 12 same time
|
||||
if not Q[1]:isPlaying()then
|
||||
for i=1,#Q do
|
||||
Q[i]=Q[i+1]
|
||||
end
|
||||
Q.s=Q[2]and 2 or 4
|
||||
end
|
||||
elseif Q.s==4 then--playing last
|
||||
elseif Q.s==4 then--Playing last
|
||||
if not Q[1].isPlaying(Q[1])then
|
||||
Q[1]=nil
|
||||
Q.s=0
|
||||
@@ -124,10 +124,10 @@ function VOC.play(s,chn)
|
||||
if not _ then print("no VOC called:"..s)return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--add to queue[chn]
|
||||
--Add to queue[chn]
|
||||
else
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||
--create new channel & play
|
||||
--Create new channel & play
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ local EMPTY={}
|
||||
|
||||
local button={
|
||||
type="button",
|
||||
ATV=0,--activating time(0~8)
|
||||
ATV=0,--Activating time(0~8)
|
||||
}
|
||||
function button:reset()
|
||||
self.ATV=0
|
||||
@@ -59,8 +59,8 @@ end
|
||||
|
||||
local switch={
|
||||
type="switch",
|
||||
ATV=0,--activating time(0~8)
|
||||
CHK=0,--check alpha(0~6)
|
||||
ATV=0,--Activating time(0~8)
|
||||
CHK=0,--Check alpha(0~6)
|
||||
}
|
||||
function switch:reset()
|
||||
self.ATV=0
|
||||
@@ -115,8 +115,8 @@ end
|
||||
|
||||
local slider={
|
||||
type="slider",
|
||||
ATV=0,--activating time(0~8)
|
||||
pos=0,--position shown
|
||||
ATV=0,--Activating time(0~8)
|
||||
pos=0,--Position shown
|
||||
}
|
||||
function slider:reset()
|
||||
self.ATV=0
|
||||
@@ -178,8 +178,8 @@ function slider:getInfo()
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
WIDGET.active=EMPTY--table, contains all active widgets
|
||||
WIDGET.sel=nil--selected widget
|
||||
WIDGET.active=EMPTY--Table, contains all active widgets
|
||||
WIDGET.sel=nil--Selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.active=L or EMPTY
|
||||
@@ -331,7 +331,7 @@ function WIDGET.keyPressed(i)
|
||||
WIDGET.press()
|
||||
end
|
||||
elseif kb.isDown("lshift","lalt","lctrl")then
|
||||
--when hold [↑], control slider with left/right
|
||||
--When hold [↑], control slider with left/right
|
||||
if i=="left"or i=="right"then
|
||||
local W=WIDGET.sel
|
||||
if W then
|
||||
|
||||
@@ -87,7 +87,7 @@ local function VKAdisp(n) return function()return VK_org[n].ava end end
|
||||
local function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
|
||||
local function setLang(n) return function()LANG.set(n)setting.lang=n end end
|
||||
|
||||
--newXXX
|
||||
--NewXXX
|
||||
newText=WIDGET.newText
|
||||
newImage=WIDGET.newImage
|
||||
newButton=WIDGET.newButton
|
||||
@@ -333,7 +333,7 @@ local Widgets={
|
||||
newButton({name="spin3", x=410,y=540,w=90,h=65,color="white",font=30,code=nextDir(3)}),
|
||||
newButton({name="spin4", x=550,y=540,w=90,h=65,color="white",font=30,code=nextDir(4)}),
|
||||
newButton({name="spin5", x=690,y=540,w=90,h=65,color="white",font=30,code=nextDir(5)}),
|
||||
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",font=30,code=nextDir(6)}),--cannot rotate O
|
||||
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",font=30,code=nextDir(6)}),--Cannot rotate O
|
||||
newButton({name="spin7", x=970,y=540,w=90,h=65,color="white",font=30,code=nextDir(7)}),
|
||||
|
||||
newButton({name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,
|
||||
|
||||
Reference in New Issue
Block a user