Compare commits

...

19 Commits

Author SHA1 Message Date
MrZ626
632c88c5f8 0.12.7: 视野 Sight 2020-12-16 23:34:09 +08:00
MrZ626
a3d6155096 修复一个手滑小问题 2020-12-16 20:02:57 +08:00
MrZ626
af3fc34098 小游戏关键词修改,词典加上说明 2020-12-16 17:33:46 +08:00
MrZ626
dbd261fbf1 调整小游戏背景 2020-12-16 17:32:42 +08:00
MrZ626
19a7a322c5 兼容老版本设置文件 2020-12-16 16:48:01 +08:00
MrZ626
36cf0aaf8e 修复一个跨版本存档更新失败问题,删除dll不再需要重启 2020-12-16 11:24:11 +08:00
MrZ626
32b0937ad9 修复conf/account没改完导致账户信息存不上文件 2020-12-16 00:35:10 +08:00
MrZ626
13b176d515 场地遮挡和场地反转的mod完成 2020-12-16 00:08:13 +08:00
MrZ626
81aab6bdb3 COLOR模块增加几个没卵用的(大概)rainbow拓展函数 2020-12-16 00:08:13 +08:00
MrZ626
23abf14888 修复COLOR模块函数名打错 2020-12-16 00:08:13 +08:00
MrZ626
79f49fab4d 新增两个皮肤,作者:ScF 2020-12-16 00:08:13 +08:00
MrZ626
e732aae87b 整理代码 2020-12-16 00:08:13 +08:00
MrZ626
cf3ca2e9e0 整理代码 2020-12-16 00:08:13 +08:00
MrZ626
1030330add win和linux缺库也许不会再闪退了 2020-12-16 00:08:13 +08:00
MrZ626
b82e3b873b 调整转换存档/加载文件的逻辑 2020-12-16 00:08:13 +08:00
MrZ626
b0f885ab2c LANG模块代码整理,增加添加语言的说明 2020-12-16 00:08:13 +08:00
MrZ626
2758a2eb03 FILE.load失败时不再返回空表,直接返回空值 2020-12-16 00:08:13 +08:00
MrZ626
6c012aa0ad 回合制模式垃圾上涨速度调快 2020-12-16 00:08:13 +08:00
MrZ626
52a3c01829 增强词典的彩蛋文本功能
增强词典的彩蛋文本功能
2020-12-16 00:07:56 +08:00
48 changed files with 378 additions and 347 deletions

View File

@@ -78,7 +78,7 @@ end
local list_dark={"dRed","dFire","dOrange","dYellow","dLame","dGrass","dGreen","dWater","dCyan","dSky","dSea","dBlue","dPurple","dGrape","dMagenta","dPink"}
local len_list_dark=#list_dark
function COLOR.random_bright()
function COLOR.random_dark()
return COLOR[list_dark[rnd(len_list_dark)]]
end
@@ -89,5 +89,23 @@ function COLOR.rainbow(phase)
sin(phase+2.0944)*.4+.6,
sin(phase-2.0944)*.4+.6
end
function COLOR.rainbow_light(phase)
return
sin(phase)*.2+.7,
sin(phase+2.0944)*.2+.7,
sin(phase-2.0944)*.2+.7
end
function COLOR.rainbow_dark(phase)
return
sin(phase)*.2+.4,
sin(phase+2.0944)*.2+.4,
sin(phase-2.0944)*.2+.4
end
function COLOR.rainbow_grey(phase)
return
sin(phase)*.16+.5,
sin(phase+2.0944)*.16+.5,
sin(phase-2.0944)*.16+.5
end
return COLOR

View File

@@ -12,7 +12,7 @@ function FILE.load(name)
return s()
else
LOG.print(name.." "..text.loadError,COLOR.red)
return{}
return
end
else
local res=json.decode(s)
@@ -20,7 +20,7 @@ function FILE.load(name)
return res
else
LOG.print(name.." "..text.loadError,COLOR.red)
return{}
return
end
end
end

View File

@@ -29,7 +29,6 @@ local int,rnd,abs=math.floor,math.random,math.abs
local min=math.min
local ins,rem=table.insert,table.remove
local SCR=SCR
local setFont=setFont
local mx,my,mouseShow=-20,-20,false
local touching=nil--First touching ID(userdata)
@@ -306,7 +305,7 @@ function love.receiveData(id,data)end
local lastGCtime=0
function love.lowmemory()
if love.timer.getTime()-lastGCtime>2.6 then
lastGCtime=love.timer.getTime
lastGCtime=TIME()
collectgarbage()
LOG.print("[Auto GC] Low Memory!","warn")
end
@@ -418,7 +417,7 @@ function love.run()
local SCN=SCN
local SETTING=SETTING
local Timer=love.timer.getTime
local TIME=love.timer.getTime
local STEP,WAIT=love.timer.step,love.timer.sleep
local MINI=love.window.isMinimized
local PUMP,POLL=love.event.pump,love.event.poll
@@ -427,7 +426,7 @@ function love.run()
local frameTimeList={}
local lastFrame=Timer()
local lastFrame=TIME()
local lastFreshPow=lastFrame
local FCT=0--Framedraw counter, from 0~99
@@ -443,9 +442,9 @@ function love.run()
return function()
local _
local T=Timer()
local dt=T-lastFrame
lastFrame=T
local t=TIME()
local dt=t-lastFrame
lastFrame=t
--EVENT
PUMP()
@@ -490,11 +489,11 @@ function love.run()
--Draw cursor
if mouseShow then
local r=T*.5
local r=t*.5
local R=int(r)%7+1
_=SKIN.libColor[SETTING.skin[R]]
gc.setColor(_[1],_[2],_[3],min(1-abs(1-r%1*2),.3))
gc.draw(TEXTURE.miniBlock[R],mx,my,T%3.1416*4,20,20,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
gc.draw(TEXTURE.miniBlock[R],mx,my,t%3.1416*4,20,20,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
end
@@ -517,8 +516,8 @@ function love.run()
--Draw network working
if TASK.netTaskCount>0 then
setFont(30)
gc.setColor(COLOR.rainbow(T*5))
gc.print("E",1250,0,.26+.355*math.sin(T*6.26))
gc.setColor(COLOR.rainbow(t*5))
gc.print("E",SCR.safeW-18,17,.26+.355*math.sin(t*6.26),nil,nil,8,20)
end
--Draw FPS
@@ -552,10 +551,10 @@ function love.run()
end
--Fresh power info.
if Timer()-lastFreshPow>2.6 then
if TIME()-lastFreshPow>2.6 then
if SETTING.powerInfo and LOADED then
updatePowerInfo()
lastFreshPow=Timer()
lastFreshPow=TIME()
end
if gc.getWidth()~=SCR.w then
love.resize(gc.getWidth(),gc.getHeight())
@@ -563,8 +562,8 @@ function love.run()
end
--Keep 60fps
_=Timer()-lastFrame
_=TIME()-lastFrame
if _<.016 then WAIT(.016-_)end
while Timer()-lastFrame<1/60-5e-6 do WAIT(0)end
while TIME()-lastFrame<1/60-5e-6 do WAIT(0)end
end
end

View File

@@ -1,25 +1,4 @@
local function langFallback(T0,T)
for k,v in next,T0 do
if type(v)=="table"and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
if not T[k]then T[k]={}end
if type(T[k])=="table"then langFallback(v,T[k])end
elseif not T[k]then
T[k]=v
end
end
end
local tipMeta={__call=function(L)return L[math.random(#L)]end}
local langList={}
local publicText,publicWidgetText={},{}
local function lang_set(l)
text=langList[l]
WIDGET.setLang(text.WidgetText)
for _,s in next,drawableTextLoad do
drawableText[s]:set(text[s])
end
end
local langList,publicText,publicWidgetText={},{},{}
local LANG={}
--Call these before call LANG.init()
@@ -27,7 +6,19 @@ function LANG.setLangList(list)langList=list end
function LANG.setPublicText(L)publicText=L end
function LANG.setPublicWidgetText(L)publicWidgetText=L end
function LANG.init()--Attention, calling this will DESTORY ALL METHODS, only left LANG.set()!
function LANG.init()--Attention, calling this will destory all initializing methods, create a LANG.set()!
local function langFallback(T0,T)
for k,v in next,T0 do
if type(v)=="table"and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
if not T[k]then T[k]={}end
if type(T[k])=="table"then langFallback(v,T[k])end
elseif not T[k]then
T[k]=v
end
end
end
local tipMeta={__call=function(L)return L[math.random(#L)]end}
for i=1,#langList do
local L=langList[i]
@@ -60,8 +51,16 @@ function LANG.init()--Attention, calling this will DESTORY ALL METHODS, only lef
v.back=L.back
end
end
LANG.init,LANG.setLangList,LANG.setPublicText,LANG.setPublicWidgetText=nil
LANG.set=lang_set
function LANG.set(l)
text=langList[l]
WIDGET.setLang(text.WidgetText)
for _,s in next,drawableTextLoad do
drawableText[s]:set(text[s])
end
end
end
return LANG

View File

@@ -21,11 +21,11 @@ do--LOADLIB
function LOADLIB(name)
local libName=libs[name]
if SYSTEM=="Windows"or SYSTEM=="Linux"then
local success,message=require(libName[SYSTEM])
if success then
return success
local r1,r2,r3=pcall(require,libName[SYSTEM])
if r1 and r2 then
return r2
else
LOG.print("Cannot load "..name..": "..message,"warn",COLOR.red)
LOG.print("Cannot load "..name..": "..(r2 or r3),"warn",COLOR.red)
end
elseif SYSTEM=="Android"then
local fs=love.filesystem
@@ -36,7 +36,7 @@ do--LOADLIB
if soFile then
local success,message=fs.write(libName.Android,soFile,size)
if success then
libFunc,message=package.loadlib(table.concat({fs.getSaveDirectory(),libName.Android},"/"),libName.libFunc)
libFunc,message=package.loadlib(table.concat({SAVEDIR,libName.Android},"/"),libName.libFunc)
if libFunc then
LOG.print(name.." lib loaded","warn",COLOR.green)
break
@@ -51,7 +51,7 @@ do--LOADLIB
end
end
if not libFunc then
LOG.print("failed to load "..name,"warn",COLOR.red)
LOG.print("Cannot load "..name,"warn",COLOR.red)
return
end
return libFunc()

View File

@@ -1,10 +1,9 @@
local gc=love.graphics
local kb=love.keyboard
local int,abs=math.floor,math.abs
local max,min=math.max,math.min
local sub,format=string.sub,string.format
local Timer=love.timer.getTime
local setFont,mStr=setFont,mStr
local WIDGET={}
@@ -463,8 +462,8 @@ function slider:drag(x)
if p~=P then
self.code(P)
end
if self.change and Timer()-self.lastTime>.18 then
self.lastTime=Timer()
if self.change and TIME()-self.lastTime>.18 then
self.lastTime=TIME()
self.change()
end
end
@@ -478,8 +477,8 @@ function slider:arrowKey(isLeft)
local P=isLeft and max(p-u,0)or min(p+u,self.unit)
if p==P or not P then return end
self.code(P)
if self.change and Timer()-self.lastTime>.18 then
self.lastTime=Timer()
if self.change and TIME()-self.lastTime>.18 then
self.lastTime=TIME()
self.change()
end
end
@@ -584,7 +583,7 @@ function selector:draw()
gc.rectangle("line",x,y,w,60)
gc.setColor(1,1,1,.2+ATV*.1)
local t=(Timer()%.5)^.5
local t=(TIME()%.5)^.5
if self.select>1 then
gc.draw(drawableText.small,x+6,y+20)
if ATV>0 then
@@ -946,8 +945,8 @@ function WIDGET.gamepadPressed(i)
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
if p==P or not P then return end
W.code(P)
if W.change and Timer()-W.lastTime>.18 then
W.lastTime=Timer()
if W.change and TIME()-W.lastTime>.18 then
W.lastTime=TIME()
W.change()
end
end

View File

@@ -1,5 +1,5 @@
VERSION_CODE=1206
VERSION_NAME="Alpha V0.12.6"
VERSION_CODE=1207
VERSION_NAME="Alpha V0.12.7"
love.setDeprecationOutput(false)
function love.conf(t)
t.identity="Techmino"--Saving folder

157
main.lua
View File

@@ -13,6 +13,7 @@ local fs=love.filesystem
--?
NONE={}function NULL()end
DBP=print--Use this in permanent code
TIME=love.timer.getTime
SYSTEM=love.system.getOS()
MOBILE=SYSTEM=="Android"or SYSTEM=="iOS"
SAVEDIR=fs.getSaveDirectory()
@@ -30,13 +31,62 @@ love.keyboard.setKeyRepeat(true)
love.keyboard.setTextInput(false)
love.mouse.setVisible(false)
--Create directories
for _,v in next,{"conf","record","replay"}do
local info=fs.getInfo(v)
if info then
if info.type=="directory"then goto NEXT end
fs.remove(v)
end
fs.createDirectory(v)
::NEXT::
end
--Delete useless files
for _,v in next,{
"cold_clear.dll",
"CCloader.dll",
"tech_ultimate.dat",
"tech_ultimate+.dat",
"sprintFix.dat",
"sprintLock.dat",
"marathon_ultimate.dat",
"infinite.dat",
"infinite_dig.dat",
"conf/account",
}do
if fs.getInfo(v)then fs.remove(v)end
end
--Collect files of old version
if fs.getInfo("data.dat")or fs.getInfo("key.dat")or fs.getInfo("settings.dat")then
for k,v in next,{
["settings.dat"]="conf/settings",
["unlock.dat"]="conf/unlock",
["data.dat"]="conf/data",
["key.dat"]="conf/key",
["virtualkey.dat"]="conf/virtualkey",
["account.dat"]="conf/user",
}do
if fs.getInfo(k)then
fs.write(v,fs.read(k))
fs.remove(k)
end
end
for _,name in next,fs.getDirectoryItems("")do
if name:sub(-4)==".dat"then
fs.write("record/"..name:sub(1,-4).."rec",fs.read(name))
fs.remove(name)
end
end
end
--Load modules
require"Zframework"
require"parts/list"
require"parts/globalTables"
require"parts/gametoolfunc"
SCR.setSize(1280,720)--Initialize Screen size
FIELD[1]=newBoard()--Initialize field[1]
@@ -51,6 +101,18 @@ AIFUNC= require"parts/ai"
MODES= require"parts/modes"
TICK= require"parts/tick"
--First start for phones
if not fs.getInfo("conf/settings")and MOBILE then
SETTING.VKSwitch=true
SETTING.swap=false
SETTING.vib=2
SETTING.powerInfo=true
SETTING.fullscreen=true
love.window.setFullscreen(true)
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
end
if SETTING.fullscreen then love.window.setFullscreen(true)end
--Initialize image libs
IMG.init{
batteryImage="/mess/power.png",
@@ -81,16 +143,18 @@ SKIN.init{
"contrast(mrz)",
"glow(mrz)",
"plastic(mrz)",
"jelly(miya)",
"steel(kulumi)",
"pure(mrz)",
"ball(shaw)",
"glass(ScF)",
"paper(mrz)",
"gem(notypey)",
"classic(_)",
"jelly(miya)",
"polka_dots(ScF)",
"brick(notypey)",
"brick_light(notypey)",
"cartoon_cup(earety)",
"ball(shaw)",
"steel(kulumi)",
"gem(notypey)",
"classic(_)",
"crack(earety)",
"retro(notypey)",
"retro_grey(notypey)",
@@ -166,7 +230,10 @@ LANG.setLangList{
require"parts/language/lang_sp",
require"parts/language/lang_symbol",
require"parts/language/lang_yygq",
--Add new language file to LANG folder. Attention, new language won't show in-game when you add language
--1. Add language file to LANG folder;
--2. Require it;
--3. Add a button in parts/scenes/setting_lang.lua;
--4. Set button name at LANG.setPublicWidgetText.lang beneath.
}
LANG.setPublicText{
block={
@@ -250,76 +317,8 @@ for _,v in next,fs.getDirectoryItems("parts/scenes")do
end
end
--Create directories
for _,v in next,{"conf","record","replay"}do
local info=fs.getInfo(v)
if info then
if info.type=="directory"then goto NEXT end
fs.remove(v)
end
fs.createDirectory(v)
::NEXT::
end
--Collect files
if fs.getInfo("data.dat")or fs.getInfo("key.dat")or fs.getInfo("settings.dat")then
for k,v in next,{
["settings.dat"]="conf/settings",
["unlock.dat"]="conf/unlock",
["data.dat"]="conf/data",
["key.dat"]="conf/key",
["virtualkey.dat"]="conf/virtualkey",
["account.dat"]="conf/user",
}do
if fs.getInfo(k)then
fs.write(v,fs.read(k))
fs.remove(k)
end
end
for _,name in next,fs.getDirectoryItems("")do
if name:sub(-4)==".dat"then
fs.write("record/"..name:sub(1,-4).."rec",fs.read(name))
fs.remove(name)
end
end
end
--Load files
if fs.getInfo("conf/settings")then
addToTable(FILE.load("conf/settings"),SETTING)
else
if MOBILE then
SETTING.VKSwitch=true
SETTING.swap=false
SETTING.vib=2
SETTING.powerInfo=true
SETTING.fullscreen=true
love.window.setFullscreen(true)
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
end
end
if SETTING.fullscreen then love.window.setFullscreen(true)end
LANG.set(SETTING.lang)
if fs.getInfo("conf/unlock")then RANKS=FILE.load("conf/unlock")end
if fs.getInfo("conf/data")then STAT=FILE.load("conf/data")end
if fs.getInfo("conf/key")then keyMap=FILE.load("conf/key")end
if fs.getInfo("conf/virtualkey")then VK_org=FILE.load("conf/virtualkey")end
if fs.getInfo("conf/user")then USER=FILE.load("conf/user")end
if fs.getInfo("conf/replay")then REPLAY=FILE.load("conf/replay")end
for _,v in next,{
"tech_ultimate.dat",
"tech_ultimate+.dat",
"sprintFix.dat",
"sprintLock.dat",
"marathon_ultimate.dat",
"infinite.dat",
"infinite_dig.dat",
}do
if fs.getInfo(v)then fs.remove(v)end
end
--Update data
do
--Check Ranks
@@ -345,13 +344,7 @@ do
S.stereo>1 or S.VKSFX>1 or S.VKAlpha>1
then
NOGAME=true
fs.remove("settings.dat")
end
if fs.getInfo("cold_clear.dll")then
NOGAME=true
fs.remove("cold_clear.dll")
fs.remove("CCloader.dll")
fs.remove("conf/settings")
end
--Update data file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -699,7 +699,7 @@ end
local noRecList={"custom","solo","round","techmino"}
local function getModList()
local res={}
for k,v in next,GAME.mod do
for _,v in next,GAME.mod do
if v.sel>0 then
ins(res,{v.no,v.sel})
end

View File

@@ -6,18 +6,18 @@ MODOPT={--Mod options
{no=0,id="NX",name="next",
key="q",x=80,y=230,color="orange",
list={0,1,2,3,4,5,6},
func=function(P,M)P.gameEnv.nextCount=M.list[M.sel]end,
func=function(P,O)P.gameEnv.nextCount=O end,
},
{no=1,id="HL",name="hold",
key="w",x=200,y=230,color="orange",
list={0,1,2,3,4,5,6},
func=function(P,M)P.gameEnv.holdCount=M.list[M.sel]end,
func=function(P,O)P.gameEnv.holdCount=O end,
unranked=true,
},
{no=2,id="FL",name="hideNext",
key="e",x=320,y=230,color="water",
list={1,2,3,4,5},
func=function(P,M)P.gameEnv.nextStartPos=M.list[M.sel]+1 end,
func=function(P,O)P.gameEnv.nextStartPos=O +1 end,
},
{no=3,id="IH",name="infHold",
key="r",x=440,y=230,color="water",
@@ -35,48 +35,48 @@ MODOPT={--Mod options
{no=6,id="HD",name="hidden",
key="i",x=920,y=230,color="grape",
list={"time","fast","none"},
func=function(P,M)P.gameEnv.visible=M.list[M.sel]end,
func=function(P,O)P.gameEnv.visible=O end,
unranked=true,
},
{no=7,id="HB",name="hideBoard",
key="o",x=1040,y=230,color="grape",
list={"down","up","all"},
func=function(P)LOG.print("该mod还没有做好!")end,
func=function(P,O)P.gameEnv.hideBoard=O end,
},
{no=8,id="FB",name="flipBoard",
key="p",x=1160,y=230,color="grass",
list={"UD","LR","180"},
func=function(P)LOG.print("该mod还没有做好!")end,
list={"U-D","L-R","180"},
func=function(P,O)P.gameEnv.flipBoard=O end,
},
{no=9,id="DT",name="dropDelay",
key="a",x=140,y=350,color="red",
list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
func=function(P,M)P.gameEnv.drop=M.list[M.sel]end,
func=function(P,O)P.gameEnv.drop=O end,
unranked=true,
},
{no=10,id="LT",name="lockDelay",
key="s",x=260,y=350,color="red",
list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
func=function(P,M)P.gameEnv.lock=M.list[M.sel]end,
func=function(P,O)P.gameEnv.lock=O end,
unranked=true,
},
{no=11,id="ST",name="waitDelay",
key="d",x=380,y=350,color="red",
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
func=function(P,M)P.gameEnv.wait=M.list[M.sel]end,
func=function(P,O)P.gameEnv.wait=O end,
unranked=true,
},
{no=12,id="CT",name="fallDelay",
key="f",x=500,y=350,color="red",
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
func=function(P,M)P.gameEnv.fall=M.list[M.sel]end,
func=function(P,O)P.gameEnv.fall=O end,
unranked=true,
},
{no=13,id="LF",name="life",
key="j",x=860,y=350,color="yellow",
list={0,1,2,3,5,10,15,26,42,87,500},
func=function(P,M)P.gameEnv.life=M.list[M.sel]end,
func=function(P,O)P.gameEnv.life=O end,
unranked=true,
},
{no=14,id="FB",name="forceB2B",
@@ -116,19 +116,19 @@ MODOPT={--Mod options
{no=19,id="CS",name="customSeq",
key="b",x=680,y=470,color="blue",
list={"bag","his4","rnd","reverb"},
func=function(P,M)P.gameEnv.sequence=M.list[M.sel]end,
func=function(P,O)P.gameEnv.sequence=O end,
unranked=true,
},
{no=20,id="PS",name="pushSpeed",
key="n",x=800,y=470,color="blue",
list={.5,1,2,3,5,15,1e99},
func=function(P,M)P.gameEnv.pushSpeed=M.list[M.sel]end,
func=function(P,O)P.gameEnv.pushSpeed=O end,
unranked=true,
},
{no=21,id="BN",name="boneBlock",
key="m",x=920,y=470,color="blue",
list={"on","off"},
func=function(P,M)P.gameEnv.bone=M.sel==1 end,
func=function(P,O)P.gameEnv.bone=O=="on"end,
},
}
for i=1,#MODOPT do
@@ -172,6 +172,8 @@ CUSTOMENV={--gameEnv for cutsom game
highCam=false,
nextPos=false,
bone=false,
hideBoard=false,
flipBoard=false,
--Rule
mindas=0,
@@ -231,8 +233,8 @@ GAME={--Global game data
}
--Userdata tables
RANKS={sprint_10=0}--Ranks of modes
USER={--User infomation
RANKS=FILE.load("conf/unlock")or{sprint_10=0}--Ranks of modes
USER=FILE.load("conf/user")or{--User infomation
email=nil,
auth_token=nil,
access_token=nil,
@@ -240,6 +242,7 @@ USER={--User infomation
username=nil,
motto=nil,
avatar=nil,
xp=0,lv=1,
}
SETTING={--Settings
--Tuning
@@ -300,8 +303,8 @@ SETTING={--Settings
VKCurW=.4,--Cur-Pos Weight
VKIcon=true,--If disp icon
VKAlpha=.3,
}
STAT={--Statistics
}local S=FILE.load("conf/settings")if S then addToTable(S,SETTING)end
STAT=FILE.load("conf/data")or{--Statistics
version=VERSION_CODE,
run=0,game=0,time=0,frame=0,
key=0,rotate=0,hold=0,
@@ -315,13 +318,13 @@ STAT={--Statistics
date=nil,
todayTime=0,
}for i=1,25 do STAT.clear[i]={0,0,0,0,0,0}STAT.spin[i]={0,0,0,0,0,0,0}end
keyMap={--Key setting
keyMap=FILE.load("conf/key")or{--Key setting
{"left","right","x","z","c","up","down","space","tab","r"},{},
--Keyboard
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
--Joystick
}for i=1,#keyMap do for j=1,20 do if not keyMap[i][j]then keyMap[i][j]=""end end end
VK_org={--Virtualkey layout, refresh all VKs' position with this before each game
VK_org=FILE.load("conf/virtualkey")or{--Virtualkey layout, refresh all VKs' position with this before each game
{ava=true, x=80, y=720-200, r=80},--moveLeft
{ava=true, x=320, y=720-200, r=80},--moveRight
{ava=true, x=1280-80, y=720-200, r=80},--rotRight
@@ -344,4 +347,4 @@ VK_org={--Virtualkey layout, refresh all VKs' position with this before each gam
{ava=false, x=1000, y=50, r=80},--addToRight
}
virtualkey={}for i=1,#VK_org do virtualkey[i]={}end--In-game virtualkey layout
REPLAY={}
REPLAY=FILE.load("conf/replay")or{}

View File

@@ -730,11 +730,17 @@ return{
"http://139.199.75.237/tos",
},
{"Github Repository",
"githubrepository",
"githubrepository sourcecode",
"other",
"Techmino's Github repository. Stars are appreciated",
"http://github.com/26F-Studio/Techmino",
},
{"Minigame",
"minigame",
"other",
"Input these to play free minigames!\n\n15-Puzzle: 15p\nSchulte Grid: sltg\nPong: pong\nAtoZ: atoz\nUltimate Tic-tac-toe: uttt\ncubefield: cbf",
},
{"SFX",
"sfx soundeffects",

View File

@@ -732,11 +732,16 @@ return{
"http://139.199.75.237/tos",
},
{"Github仓库",
"github",
"github sourcecode yuandaima",
"other",
"Techmino的github仓库地址欢迎star",
"http://github.com/26F-Studio/Techmino",
},
{"小游戏",
"minigame xiaoyouxi",
"other",
"输入以下词语,小游戏免费玩!\n\n15-Puzzle: 15p\nSchulte Grid: sltg\nPong: pong\nAtoZ: atoz\nUltimate Tic-tac-toe: uttt\ncubefield: cbf",
},
{"SFX",
"sfx",

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local sin,min=math.sin,math.min
local Timer=love.timer.getTime
return{
color=COLOR.red,
env={
@@ -43,7 +42,7 @@ return{
end
--Figures
local t=Timer()
local t=TIME()
gc.setColor(1,1,1,.5+.2*sin(t))
gc.draw(IMG.hbm,-276,-86,0,1.5)
gc.draw(IMG.electric,476,142,0,2.6)

View File

@@ -16,6 +16,7 @@ return{
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg="rainbow",bgm="push",
},

View File

@@ -16,6 +16,7 @@ return{
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg="rainbow",bgm="push",
},

View File

@@ -16,6 +16,7 @@ return{
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg="rainbow",bgm="push",
},

View File

@@ -16,6 +16,7 @@ return{
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg="rainbow",bgm="push",
},

View File

@@ -16,6 +16,7 @@ return{
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg="rainbow",bgm="push",
},

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local Timer=love.timer.getTime
local TIME=love.timer.getTime
local int,ceil,rnd=math.floor,math.ceil,math.random
local max,min,sin=math.max,math.min,math.sin
local format=string.format
@@ -40,7 +40,7 @@ local function drawField(P)
gc.setColor(1,1,1,min(V[j][i]*.05,1))
Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
elseif rep then
gc.setColor(1,1,1,.3+.08*sin(.5*(j-i)+Timer()*4))
gc.setColor(1,1,1,.3+.08*sin(.5*(j-i)+TIME()*4))
gc.rectangle("fill",30*i-30,-30*j,30,30)
end
end
@@ -303,10 +303,16 @@ local function drawDial(x,y,speed)
gc.setColor(1,1,1,.8)
gc.draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
end
local hideBoardStencil={
up=function()gc.rectangle("fill",0,0,300,300)end,
down=function()gc.rectangle("fill",0,300,300,300)end,
all=function()gc.rectangle("fill",0,0,300,600)end,
}
function draw.norm(P)
local _
local ENV=P.gameEnv
local FBN,FUP=P.fieldBeneath,P.fieldUp
local t=TIME()
gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size)
@@ -327,6 +333,18 @@ function draw.norm(P)
--In-field things
gc.push("transform")
if ENV.flipBoard then
if ENV.flipBoard=="U-D"then
gc.translate(0,590)
gc.scale(1,-1)
elseif ENV.flipBoard=="L-R"then
gc.translate(300,0)
gc.scale(-1,1)
elseif ENV.flipBoard=="180"then
gc.translate(300,590)
gc.scale(-1,-1)
end
end
gc.translate(0,600+FBN+FUP)
gc.setScissor(SCR.x+(P.absFieldX+P.fieldOff.x)*SCR.k,SCR.y+(P.absFieldY+P.fieldOff.y)*SCR.k,300*P.size*SCR.k,610*P.size*SCR.k)
@@ -338,7 +356,7 @@ function draw.norm(P)
drawField(P)
--Draw spawn line
gc.setColor(1,sin(Timer())*.4+.5,0,.5)
gc.setColor(1,sin(t)*.4+.5,0,.5)
gc.setLineWidth(4)
gc.line(0,-600-FBN,300,-600-FBN)
@@ -408,9 +426,9 @@ function draw.norm(P)
gc.rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
else
--Warning
local t=math.sin((Timer()-i)*30)*.5+.5
local a=math.sin((t-i)*30)*.5+.5
local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2]
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
gc.setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a))
gc.rectangle("fill",303,599-h,11,-bar)
end
else
@@ -429,7 +447,7 @@ function draw.norm(P)
gc.setColor(P.b2b<40 and COLOR.white or P.b2b<=1e3 and COLOR.lRed or COLOR.lBlue)
gc.rectangle("fill",-14,599,11,-a*.5)
gc.setColor(1,1,1)
if Timer()%.5<.3 then
if t%.5<.3 then
gc.rectangle("fill",-15,b<40 and 578.5 or 98.5,13,3)
end
@@ -467,6 +485,16 @@ function draw.norm(P)
gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5)
end
end
if ENV.hideBoard then
gc.stencil(hideBoardStencil[ENV.hideBoard],"replace",1)
gc.setStencilTest("equal",1)
gc.setLineWidth(20)
for i=0,24 do
gc.setColor(COLOR.rainbow_grey(t*.626+i*.1))
gc.line(20*i-190,-2,20*i+10,602)
end
gc.setStencilTest()
end
gc.pop()
--Bonus texts
@@ -499,19 +527,19 @@ function draw.norm(P)
--FinesseCombo
if P.finesseCombo>2 then
_=P.finesseComboTime
local T=P.finesseCombo.."x"
local str=P.finesseCombo.."x"
if _>0 then
gc.setColor(1,1,1,_*.2)
gc.print(T,20,570)
gc.print(str,20,570)
gc.setColor(1,1,1,1.2-_*.1)
gc.push("transform")
gc.translate(20,600)
gc.scale(1+_*.08)
gc.print(T,0,-30)
gc.print(str,0,-30)
gc.pop()
else
gc.setColor(1,1,1)
gc.print(T,20,570)
gc.print(str,20,570)
end
end
@@ -544,7 +572,7 @@ function draw.norm(P)
--Draw current mission
setFont(35)
if ENV.missionKill then
gc.setColor(1,.7+.2*sin(Timer()*6.26),.4)
gc.setColor(1,.7+.2*sin(t*6.26),.4)
else
gc.setColor(1,1,1)
end
@@ -553,10 +581,10 @@ function draw.norm(P)
--Draw next mission
setFont(20)
for i=1,3 do
local t=L[P.curMission+i]
if t then
t=missionEnum[t]
gc.print(t,87-28*i,117)
local m=L[P.curMission+i]
if m then
m=missionEnum[m]
gc.print(m,87-28*i,117)
else
break
end

View File

@@ -24,6 +24,8 @@ return{
highCam=false,
nextPos=false,
hideBoard=false,
flipBoard=false,
drop=60,lock=60,
wait=0,fall=0,

View File

@@ -3,7 +3,7 @@ local prepareSequence=require"parts/player/prepareSequence"
local gameEnv0=require"parts/player/gameEnv0"
local mt=love.math
local rnd,max,min=math.random,math.max,math.min
local rnd,max=math.random,math.max
local ins=table.insert
local PLY={
@@ -216,7 +216,7 @@ local function loadGameEnv(P)--Load gameEnv
end
if not ENV.noMod then
for _,M in next,GAME.mod do
M.func(P,M)
M.func(P,M.list[M.sel])
end
end
end

View File

@@ -1,12 +1,11 @@
local gc=love.graphics
local Timer=love.timer.getTime
local ins,rem=table.insert,table.remove
local max,min=math.max,math.min
local texts={}
local remain--People in chat room
local scroll--Bottom message no.
local scrollPos--Scroll up length
local newMessage=false--If there is a new message
local heartBeatTimer
local escapeTimer=0
@@ -23,7 +22,7 @@ local function sendMessage()
end
local function clearHistory()
while #texts>1 do rem(texts)end
scroll=1
scrollPos=1
SFX.play("fall")
collectgarbage()
end
@@ -39,7 +38,7 @@ function scene.sceneInit()
elseif #texts>1 and texts[#texts][1]~=COLOR.dG then
ins(texts,{COLOR.dG,text.chatHistory})
end
scroll=#texts
scrollPos=#texts
TASK.new(focusAtTextbox)--Widgets are not initialized, so active after 1 frame
BG.set("none")
wsConnect(
@@ -58,19 +57,19 @@ function scene.wheelMoved(_,y)
end
function scene.keyDown(k)
if k=="up"then
scroll=max(scroll-1,min(#texts,12))
scrollPos=max(scrollPos-1,min(#texts,12))
elseif k=="down"then
scroll=min(scroll+1,#texts)
if scroll==#texts then
scrollPos=min(scrollPos+1,#texts)
if scrollPos==#texts then
newMessage=false
end
elseif k=="return"then
sendMessage()
elseif k=="escape"then
if Timer()-escapeTimer<.6 then
if TIME()-escapeTimer<.6 then
SCN.back()
else
escapeTimer=Timer()
escapeTimer=TIME()
LOG.print(text.chatQuit,COLOR.orange)
end
else
@@ -102,8 +101,8 @@ function scene.socketRead(mes)
COLOR.sky,mes:sub(sep+1),
})
end
if scroll==#texts-1 then
scroll=scroll+1
if scrollPos==#texts-1 then
scrollPos=scrollPos+1
else
SFX.play("spin_0",.8)
newMessage=true
@@ -124,8 +123,8 @@ function scene.draw()
gc.print(remain or"?",1205,10)
setFont(30)
for i=max(scroll-11,1),scroll do
gc.printf(texts[i],40,416-36*(scroll-i),1240)
for i=max(scrollPos-11,1),scrollPos do
gc.printf(texts[i],40,416-36*(scrollPos-i),1240)
end
--Slider
@@ -133,13 +132,13 @@ function scene.draw()
gc.setLineWidth(2)
gc.rectangle("line",10,30,20,420)
local len=420*12/#texts
gc.rectangle("fill",13,33+(414-len)*(scroll-12)/(#texts-12),14,len)
gc.rectangle("fill",13,33+(414-len)*(scrollPos-12)/(#texts-12),14,len)
end
--Draw
if newMessage and scroll~=#texts then
if newMessage and scrollPos~=#texts then
setFont(40)
gc.setColor(1,Timer()%.4<.2 and 1 or 0,0)
gc.setColor(1,TIME()%.4<.2 and 1 or 0,0)
gc.print("v",8,480)
end
end

View File

@@ -1,6 +1,5 @@
local gc,sys=love.graphics,love.system
local kb=love.keyboard
local Timer=love.timer.getTime
local int=math.floor
local find,sub=string.find,string.sub
@@ -132,14 +131,14 @@ function scene.draw()
--Field
setFont(40)
if initField and #FIELD>1 then
gc.setColor(1,1,int(Timer()*6.26)%2)
gc.setColor(1,1,int(TIME()*6.26)%2)
gc.print("+",275,300)
gc.print(#FIELD-1,300,300)
end
--Sequence
if #BAG>0 then
gc.setColor(1,1,int(Timer()*6.26)%2)
gc.setColor(1,1,int(TIME()*6.26)%2)
gc.print("#",330,545)
gc.print(#BAG,360,545)
end
@@ -149,7 +148,7 @@ function scene.draw()
--Sequence
if #MISSION>0 then
gc.setColor(1,CUSTOMENV.missionKill and 0 or 1,int(Timer()*6.26)%2)
gc.setColor(1,CUSTOMENV.missionKill and 0 or 1,int(TIME()*6.26)%2)
gc.print("#",610,545)
gc.print(#MISSION,640,545)
end

View File

@@ -1,6 +1,5 @@
local gc,sys=love.graphics,love.system
local kb=love.keyboard
local Timer=love.timer.getTime
local int,sin=math.floor,math.sin
local ins,rem=table.insert,table.remove
@@ -160,7 +159,7 @@ function scene.draw()
if N>0 then
gc.setColor(libColor[set[N]])
elseif L[i]>4 then
gc.setColor(COLOR.rainbow(i+Timer()*6.26))
gc.setColor(COLOR.rainbow(i+TIME()*6.26))
else
gc.setColor(COLOR.grey)
end
@@ -175,7 +174,7 @@ function scene.draw()
until i>j+1
--Draw cursor
gc.setColor(1,1,.4,.6+.4*sin(Timer()*6.26))
gc.setColor(1,1,.4,.6+.4*sin(TIME()*6.26))
gc.line(cx-5,cy-20,cx-5,cy+20)
--Confirm reset

View File

@@ -1,6 +1,5 @@
local gc,sys=love.graphics,love.system
local kb=love.keyboard
local Timer=love.timer.getTime
local sin=math.sin
local ins,rem=table.insert,table.remove
@@ -171,7 +170,7 @@ function scene.draw()
gc.print(#L,120,310)
--Draw cursor
gc.setColor(.5,1,.5,.6+.4*sin(Timer()*6.26))
gc.setColor(.5,1,.5,.6+.4*sin(TIME()*6.26))
gc.line(cx-5,cy-20,cx-5,cy+20)
--Confirm reset

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local int,abs=math.floor,math.abs
local min,sin=math.min,math.sin
@@ -39,44 +38,21 @@ local function clearResult()
for _=1,#result do rem(result)end
selected,scrollPos,waiting,lastSearch=1,0,0,false
end
local miniGame={
["15"]="15p",
["15p"]="15p",
hrd="15p",
huarongdao="15p",
shuzihuarongdao="15p",
schulte="schulteG",
schulteg="schulteG",
schultegrid="schulteG",
shuerte="schulteG",
shuertefangge="schulteG",
ping="pong",
pong="pong",
tanqiu="pong",
abc="AtoZ",
abcde="AtoZ",
abcdefg="AtoZ",
atoz="AtoZ",
AtoZ="AtoZ",
dazi="AtoZ",
uttt="UTTT",
tictactoe="UTTT",
ultimatetictactoe="UTTT",
ultimateTicTacToe="UTTT",
jingziqi="UTTT",
zhanluejingziqi="UTTT",
cf="cubefield",
cbfd="cubefield",
cubefield="cubefield",
local eggInput={
["15p"]="mg_15p",
sltg="mg_schulteG",
pong="mg_pong",
atoz="mg_AtoZ",
uttt="mg_UTTT",
cbf="mg_cubefield",
}
local function search()
if miniGame[input]then
SCN.go("mg_"..miniGame[input])
if eggInput[input]then
if type(eggInput[input])=="string"then
SCN.go(eggInput[input])
elseif type(eggInput[input])=="function"then
eggInput[input]()
end
else
clearResult()
local first
@@ -172,20 +148,20 @@ function scene.draw()
local list=result[1]and result or dict
gc.setColor(1,1,1)
local text=list[selected][4]
if #text>900 then
local t=list[selected][4]
if #t>900 then
setFont(15)
elseif #text>600 then
elseif #t>600 then
setFont(20)
elseif #text>400 then
elseif #t>400 then
setFont(25)
else
setFont(30)
end
gc.printf(text,306,180,950)
gc.printf(t,306,180,950)
setFont(30)
gc.setColor(1,1,1,.4+.2*sin(Timer()*4))
gc.setColor(1,1,1,.4+.2*sin(TIME()*4))
gc.rectangle("fill",20,143+35*(selected-scrollPos),280,35)
setFont(30)
@@ -207,10 +183,10 @@ function scene.draw()
gc.rectangle("line",20,180,280,526)
if waiting>0 then
local r=Timer()*2
local r=TIME()*2
local R=int(r)%7+1
gc.setColor(1,1,1,1-abs(r%1*2-1))
gc.draw(TEXTURE.miniBlock[R],785,140,Timer()*10%6.2832,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
gc.draw(TEXTURE.miniBlock[R],785,140,TIME()*10%6.2832,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
end
end

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local sin=math.sin
@@ -10,23 +9,33 @@ function scene.sceneInit()
end
function scene.draw()
--Draw all texts
setFont(20)
gc.setColor(1,1,1)
for i=1,#text.help do
gc.printf(text.help[i],150,35*i+40,1000,"center")
end
--Lib used
setFont(15)
gc.print(text.used,30,330)
gc.draw(IMG.title,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
local t=TIME()
--Sponsor code
gc.draw(IMG.title,280,610,.1,1+.05*sin(t*2.6),nil,206,35)
gc.setLineWidth(3)
gc.rectangle("line",18,18,263,263)
gc.rectangle("line",1012,18,250,250)
--Group code
setFont(20)
mStr(text.group,640,490)
gc.setColor(1,1,1,sin(Timer()*20)*.3+.6)
--Support text
gc.setColor(1,1,1,sin(t*20)*.3+.6)
setFont(30)
mStr(text.support,150+sin(Timer()*4)*20,283)
mStr(text.support,1138-sin(Timer()*4)*20,270)
mStr(text.support,150+sin(t*4)*20,283)
mStr(text.support,1138-sin(t*4)*20,270)
end
scene.widgetList={

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local abs=math.abs
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
@@ -59,11 +58,11 @@ local titleTransform={
end,
function(t,i)
local d=max(50-t,0)
gc.translate(sin(Timer()*3+626*i)*d,cos(Timer()*3+626*i)*d)
gc.translate(sin(TIME()*3+626*i)*d,cos(TIME()*3+626*i)*d)
end,
function(t,i)
local d=max(50-t,0)
gc.translate(sin(Timer()*3+626*i)*d,-cos(Timer()*3+626*i)*d)
gc.translate(sin(TIME()*3+626*i)*d,-cos(TIME()*3+626*i)*d)
end,
function(t)
gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2)
@@ -96,7 +95,7 @@ function scene.draw()
gc.pop()
if t2>=80 then
gc.setColor(1,1,1,.6+sin((t2-80)*.0626)*.3)
mText(drawableText.anykey,640,615+sin(Timer()*3)*5)
mText(drawableText.anykey,640,615+sin(TIME()*3)*5)
end
end

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local tc=love.touch
local Timer=love.timer.getTime
local max,min,sin=math.max,math.min,math.sin
@@ -224,14 +223,14 @@ function scene.draw()
gc.setColor(.4,.4,.4)
gc.rectangle("fill",0,0,440,260)
local T=Timer()
local t=TIME()
gc.setColor(COLOR.dCyan)
mDraw(studioLogo,220,Y*.2-1204)
mDraw(studioLogo,220,-Y*.2+1476)
gc.setColor(COLOR.cyan)
mDraw(studioLogo,220+4*sin(T*10),136+4*sin(T*6))
mDraw(studioLogo,220+4*sin(T*12),136+4*sin(T*8))
mDraw(studioLogo,220+4*sin(t*10),136+4*sin(t*6))
mDraw(studioLogo,220+4*sin(t*12),136+4*sin(t*8))
gc.setColor(COLOR.dCyan)
mDraw(studioLogo,219,137)

View File

@@ -11,7 +11,7 @@ local function tick_httpREQ_newLogin(task)
LOG.print(text.loginSuccessed)
USER.email=res.email
USER.auth_token=res.auth_token
FILE.save(USER,"conf/account","q")
FILE.save(USER,"conf/user","q")
httpRequest(
TICK.httpREQ_getAccessToken,

View File

@@ -1,11 +1,8 @@
local gc=love.graphics
local Timer=love.timer.getTime
local mStr=mStr
local int=math.floor
local rnd=math.random
local int,rnd=math.floor,math.random
local format=string.format
local mStr=mStr
local scene={}
@@ -23,7 +20,7 @@ local pathVis
local revKB
function scene.sceneInit()
BG.set("rainbow")
BG.set("rainbow2")
BGM.play("push")
board={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}}
cx,cy=4,4
@@ -120,11 +117,11 @@ local function tapBoard(x,y,key)
move=move+moves
if state==0 then
state=1
startTime=Timer()
startTime=TIME()
end
if checkBoard(b)then
state=2
time=Timer()-startTime
time=TIME()-startTime
if time<1 then LOG.print("不是人",COLOR.lBlue)
elseif time<2 then LOG.print("还是人",COLOR.lBlue)
elseif time<3 then LOG.print("神仙",COLOR.lBlue)
@@ -203,7 +200,7 @@ end
function scene.update()
if state==1 then
time=Timer()-startTime
time=TIME()-startTime
end
end

View File

@@ -1,8 +1,6 @@
local gc=love.graphics
local Timer=love.timer.getTime
local rnd=math.random
local format=string.format
local mStr=mStr
local levels={
@@ -63,9 +61,9 @@ function scene.keyDown(key)
SFX.play("move")
if progress==2 then
state=1
startTime=Timer()
startTime=TIME()
elseif progress>#targetString then
time=Timer()-startTime
time=TIME()-startTime
state=2
SFX.play("reach")
end
@@ -87,7 +85,7 @@ end
function scene.update()
if state==1 then
frameKeyCount=0
time=Timer()-startTime
time=TIME()-startTime
end
end

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local int=math.floor
local Timer=love.timer.getTime
local lines={
{1,2,3},
@@ -28,7 +27,7 @@ local function restart()
curX,curx=nil
round=0
target=false
placeTime=Timer()
placeTime=TIME()
gameover=false
for X=1,9 do
score[X]=false
@@ -61,7 +60,7 @@ local function place(X,x)
SFX.play("move")
lastX,lastx=X,x
curX,curx=nil
placeTime=Timer()
placeTime=TIME()
if checkBoard(board[X],round)then
score[X]=round
if checkBoard(score,round)then
@@ -98,7 +97,7 @@ local scene={}
function scene.sceneInit()
restart()
BGM.play("truth")
BG.set("bg2")
BG.set("rainbow")
end
function scene.draw()
@@ -112,7 +111,7 @@ function scene.draw()
gc.rectangle("fill",0,0,90,90)
--Draw target area
gc.setColor(1,1,1,math.sin((Timer()-placeTime)*5)/5+.2)
gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)/5+.2)
if target then
gc.rectangle("fill",(target-1)%3*30,int((target-1)/3)*30,30,30)
elseif not gameover then
@@ -165,7 +164,7 @@ function scene.draw()
--Draw last pos
if lastX then
gc.setColor(.5,1,.4,.8)
local r=.5+.5*math.sin(Timer()*6.26)
local r=.5+.5*math.sin(TIME()*6.26)
gc.rectangle("line",(lastX-1)%3*30+(lastx-1)%3*10-r,int((lastX-1)/3)*30+int((lastx-1)/3)*10-r,10+2*r,10+2*r)
end
gc.pop()

View File

@@ -1,14 +1,11 @@
local gc=love.graphics
local ms=love.mouse
local Timer=love.timer.getTime
local setFont=setFont
local mStr=mStr
local int=math.floor
local rnd=math.random
local int,rnd=math.floor,math.random
local format=string.format
local rem=table.remove
local setFont=setFont
local mStr=mStr
local scene={}
@@ -23,6 +20,7 @@ local mistake
local state
local progress
function scene.sceneInit()
BG.set("space")
BGM.play("way")
board={}
rank=3
@@ -52,7 +50,7 @@ local function tapBoard(x,y)
if state==0 then
newBoard()
state=1
startTime=Timer()
startTime=TIME()
progress=0
elseif state==1 then
local X=int((x-320)/640*R)
@@ -63,7 +61,7 @@ local function tapBoard(x,y)
if progress<R^2 then
SFX.play("lock")
else
time=Timer()-startTime+mistake
time=TIME()-startTime+mistake
state=2
SFX.play("reach")
end
@@ -121,7 +119,7 @@ end
function scene.update()
if state==1 then
time=Timer()-startTime+mistake
time=TIME()-startTime+mistake
end
end

View File

@@ -1,7 +1,6 @@
local mt=love.math
local gc=love.graphics
local ms,kb,tc=love.mouse,love.keyboard,love.touch
local Timer=love.timer.getTime
local max,min=math.max,math.min
local int,abs=math.floor,math.abs
@@ -217,7 +216,7 @@ function scene.draw()
if c then
gc.setColor(c)
else
c=.5+sin(Timer()*6.26)*.2
c=.5+sin(TIME()*6.26)*.2
gc.setColor(c,c,c)
end

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local sin=math.sin
@@ -63,13 +62,14 @@ function scene.draw()
gc.draw(IMG.title,840,220,nil,1.5,nil,206,35)
if BGM.nowPlay then
setFont(50)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
local t=TIME()
gc.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
gc.print(BGM.nowPlay,710,500)
local t=-Timer()%2.3/2
if t<1 then
gc.setColor(1,1,1,t)
gc.draw(IMG.title_color,840,220,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
local a=-t%2.3/2
if a<1 then
gc.setColor(1,1,1,a)
gc.draw(IMG.title_color,840,220,nil,1.5+.1-.1*a,1.5+.3-.3*a,206,35)
end
end
end

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local int=math.floor
local sin,log=math.sin,math.log10
@@ -269,7 +268,7 @@ function scene.draw()
--Polygon
gc.push("transform")
gc.scale((3-2*T)*T)
gc.setColor(1,1,1,T*(.5+.3*sin(Timer()*6.26)))gc.polygon("line",standard)
gc.setColor(1,1,1,T*(.5+.3*sin(TIME()*6.26)))gc.polygon("line",standard)
gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626)
for i=1,9,2 do
gc.polygon("fill",0,0,val[i],val[i+1],val[i+2],val[i+3])
@@ -287,7 +286,7 @@ function scene.draw()
--Texts
local C
_=Timer()%6.2832
_=TIME()%6.2832
if _>3.1416 then
gc.setColor(1,1,1,-T*sin(_))
setFont(35)

View File

@@ -1,6 +1,6 @@
local gc=love.graphics
local tc=love.touch
local Timer=love.timer.getTime
local TIME=TIME
local max,sin=math.max,math.sin
local log=math.log
@@ -254,10 +254,10 @@ function scene.update(dt)
end
local function drawAtkPointer(x,y)
local t=sin(Timer()*20)
local t=sin(TIME()*20)
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
gc.circle("fill",x,y,25,6)
local a=Timer()*3%1*.8
local a=TIME()*3%1*.8
gc.setColor(0,.6,1,.8-a)
gc.circle("line",x,y,30*(1+a),6)
end
@@ -299,9 +299,9 @@ local function drawVirtualkey()
end
end
function scene.draw()
local t=TIME()
if MARKING then
setFont(25)
local t=Timer()
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
mStr(text.marking,190,60+26*sin(t))
end
@@ -337,7 +337,7 @@ function scene.draw()
--Replaying
if GAME.replaying then
gc.setColor(1,1,Timer()%1>.5 and 1 or 0)
gc.setColor(1,1,t%1>.5 and 1 or 0)
mText(drawableText.replaying,410,17)
end

View File

@@ -1,6 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local int=math.floor
local scene={}
@@ -14,7 +12,7 @@ end
function scene.draw()
gc.setColor(1,1,1)
gc.draw(SKIN.curText[int(Timer()*2)%16+1],740,540,Timer()%6.28319,2,nil,15,15)
gc.draw(SKIN.curText[int(TIME()*2)%16+1],740,540,TIME()%6.28319,2,nil,15,15)
end
scene.widgetList={

View File

@@ -1,9 +1,6 @@
local gc=love.graphics
local Timer=love.timer.getTime
local mStr=mStr
local int,sin=math.floor,math.sin
local mStr=mStr
local scene={}
@@ -92,7 +89,7 @@ function scene.gamepadDown(key)
end
function scene.draw()
local a=.3+sin(Timer()*15)*.1
local a=.3+sin(TIME()*15)*.1
if kS then gc.setColor(1,.3,.3,a)else gc.setColor(1,.7,.7,a)end
gc.rectangle("fill",
kb<11 and 240 or 840,

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local sin=math.sin
local scene={}
@@ -18,7 +17,7 @@ function scene.draw()
gc.draw(texture[color],x+30*j,y-30*i)
end
end end
gc.circle("fill",-10+140*N,340,sin(Timer()*10)+5)
gc.circle("fill",-10+140*N,340,sin(TIME()*10)+5)
end
gc.draw(texture[17],930,610,nil,2)
for i=1,5 do

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local Timer=love.timer.getTime
local sin=math.sin
local rnd=math.random
@@ -23,10 +22,10 @@ end
function scene.mouseDown(x,y)
if x>780 and x<980 and y>470 and jump==0 then
jump=10
local t=Timer()-last
local t=TIME()-last
if t>1 then
VOC.play((t<1.5 or t>15)and"doubt"or rnd()<.8 and"happy"or"egg")
last=Timer()
last=TIME()
end
end
end
@@ -43,7 +42,7 @@ end
function scene.draw()
gc.setColor(1,1,1)
local t=Timer()
local t=TIME()
local _=jump
local x,y=800,340+10*sin(t*.5)+(_-10)*_*.3
gc.translate(x,y)

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local ms=love.mouse
local Timer=love.timer.getTime
local int,sin=math.floor,math.sin
@@ -91,7 +90,7 @@ function scene.draw()
local d=snapUnit
if d>=10 then
gc.setLineWidth(3)
gc.setColor(1,1,1,sin(Timer()*4)*.1+.1)
gc.setColor(1,1,1,sin(TIME()*4)*.1+.1)
for i=1,1280/d-1 do
gc.line(d*i,0,d*i,720)
end

View File

@@ -1,9 +1,7 @@
local gc=love.graphics
local Timer=love.timer.getTime
local abs,int,sin=math.abs,math.floor,math.sin
local format=string.format
local mStr=mStr
local scene={}
@@ -88,17 +86,18 @@ function scene.draw()
gc.line(40,240+40*y,600,240+40*y)
end
gc.draw(IMG.title,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
local t=TIME()
gc.draw(IMG.title,260,615,.2+.04*sin(t*3),nil,nil,206,35)
local r=Timer()*2
local r=t*2
local R=int(r)%7+1
gc.setColor(1,1,1,1-abs(r%1*2-1))
gc.draw(TEXTURE.miniBlock[R],680,50,Timer()*10%6.2832,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
gc.draw(TEXTURE.miniBlock[R],680,50,t*10%6.2832,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
gc.draw(TEXTURE.miniBlock[R],680,300,0,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
end
scene.widgetList={
WIDGET.newButton{name="path",x=1000,y=540,w=250,h=80,font=25,code=function()love.system.openURL(love.filesystem.getSaveDirectory())end,hide=MOBILE},
WIDGET.newButton{name="path",x=1000,y=540,w=250,h=80,font=25,code=function()love.system.openURL(SAVEDIR)end,hide=MOBILE},
WIDGET.newButton{name="save",x=1000,y=640,w=250,h=80,font=25,code=WIDGET.lnk_goScene("savedata")},
WIDGET.newButton{name="back",x=640,y=620,w=200,h=80,font=35,code=WIDGET.lnk_BACK},
}

View File

@@ -10,7 +10,7 @@ function Tick.httpREQ_getAccessToken(task)
if res then
LOG.print(text.accessSuccessed)
USER.access_token=res.access_token
FILE.save(USER,"conf/account")
FILE.save(USER,"conf/user")
SCN.swapTo("netgame")
else
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")

View File

@@ -3,12 +3,12 @@ local S=[=[
<<<<<<<<<<rmb1000+>>>>>>>>>>
★☆白羽☆★
<<<rmb100+>>>
\那没事了(T6300)/ \加油啊,钉钉动了的大哥哥(T3228)/
\那没事了(T6300)/ \加油啊,钉钉动了的大哥哥(T3228)/
\弥佑瑶/ \Alan/ \幽灵3383/
\靏鸖龘龘/ \込余/ \saki/
\模电/ \吃水榴莲/ \世界沃德/
\Petris/ \Zakeru/ \镝/
\HitachiMako/ \我慌死了/ \JogsIntang/
\HitachiMako/ \我慌死了/ \PESWGGL/
<rmb10+>
八零哥 蕴空之灵 gggf127 dtg ThTsOd Fireboos 金巧 10元
立斐 Deep_Sea 时雪 yyangdid sfqr 心痕 Sasoric 夏小亚
@@ -31,17 +31,31 @@ local S=[=[
OSD
其他:
小游戏:
Tetro-1010(四连块,next,hold,20G)
2048 (带预览; 后妈发牌)
Tetro-1010(四/五连块, 2cur, 2next, 随机重力)
2048 (1next, 固定规则发牌(轮格,移动顺/反方向...))
扫雷; 坦克大战
打砖块; 速算; 各种计算器小游戏移植
录像保存/导出; 联网游戏; 全新模式选择; 游戏内文档
机器人调试模式; 按块回放录像; 跳帧开关
隔断消除; 混合消除; 彩色消除; 物理hold; 多方块; 自由场地尺寸
自定义游戏按各种目标复制数据; 画图智能画笔
录像保存/导出; 按块回放录像; 联网游戏
重制菜单UI; 游戏内文档
隔断消除; 架空消除; 混合消除; 彩色消除
物理hold; 多方块; 自由场地尺寸
画图智能画笔; 自定义游戏按各种目标复制数据
任意尺寸屏幕的UI; 3D背景; 1/2/3连块
移动n格+硬降复合操作键; 手柄操作; 手势操作; 特殊控件(虚拟摇杆等)
task-Z(新AI); 热更新; 工程编译到字节码; 超60帧
移动n格+硬降复合操作键; 手柄操作; 手势操作
特殊控件(虚拟摇杆等); task-Z(新AI); 机器人调试模式
热更新; 工程编译到字节码; 超60帧; 跳帧开关
0.12.7: 视野 Sight
新增:
场地遮挡和场地反转的mod完成
改动:
回合制模式垃圾上涨速度调快
代码:
调整转换存档/加载文件的逻辑
COLOR模块小升级
修复:
win和linux缺库不会再闪退了
许多神秘小错误
0.12.6: 系统升级 System Update
新增:
@@ -52,6 +66,7 @@ local S=[=[
游戏开始开始两秒后或者确实结束后才计入统计数据
所有小游戏入口移至词典
极限马拉松入口隐藏
移除maxNext设置项
代码:
FILE模块修改,将所有文件换后缀放文件夹分类整理方便管理
"远程玩家"进入可用测试阶段