Compare commits

...

30 Commits

Author SHA1 Message Date
MrZ626
b04131b408 0.12.8: 皮肤调整 2020-12-19 01:34:16 +08:00
MrZ626
e93ef851ac b3b触发点和上限都减小200,变为800和1000 2020-12-19 01:33:45 +08:00
MrZ626
4d7f2e6698 修复游戏结束后两个码表显示不正确 2020-12-18 22:56:44 +08:00
MrZ626
abf827bc2b 修复每次启动游戏统计信息的消除信息必定丢失 2020-12-18 22:52:53 +08:00
MrZ626
ee25d35220 修复更新后自动删除老版本rank的代码位置错误 2020-12-18 22:06:18 +08:00
MrZ626
eef8e594a2 皮肤全部重新调整 2020-12-18 21:40:33 +08:00
MrZ626
5edeffbda4 修复手机第一次进会爆炸的问题(初始化顺序不正确) 2020-12-18 19:55:28 +08:00
MrZ626
af4df9c2e2 整理代码 2020-12-18 16:46:29 +08:00
MrZ626
ac18ad2fcd 修复使用开关式mod就报错 2020-12-17 22:03:08 +08:00
MrZ626
1d293bb186 尝试清理旧版本不计分模式的rank记录,修复选关界面报错 2020-12-17 17:37:26 +08:00
MrZ626
99611910de 交换主菜单两个按钮位置 2020-12-17 00:21:09 +08:00
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
86 changed files with 560 additions and 517 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 list_dark={"dRed","dFire","dOrange","dYellow","dLame","dGrass","dGreen","dWater","dCyan","dSky","dSea","dBlue","dPurple","dGrape","dMagenta","dPink"}
local len_list_dark=#list_dark local len_list_dark=#list_dark
function COLOR.random_bright() function COLOR.random_dark()
return COLOR[list_dark[rnd(len_list_dark)]] return COLOR[list_dark[rnd(len_list_dark)]]
end end
@@ -89,5 +89,23 @@ function COLOR.rainbow(phase)
sin(phase+2.0944)*.4+.6, sin(phase+2.0944)*.4+.6,
sin(phase-2.0944)*.4+.6 sin(phase-2.0944)*.4+.6
end 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 return COLOR

View File

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

View File

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

View File

@@ -1,25 +1,4 @@
local function langFallback(T0,T) local langList,publicText,publicWidgetText={},{},{}
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 LANG={} local LANG={}
--Call these before call LANG.init() --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.setPublicText(L)publicText=L end
function LANG.setPublicWidgetText(L)publicWidgetText=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 for i=1,#langList do
local L=langList[i] local L=langList[i]
@@ -60,8 +51,16 @@ function LANG.init()--Attention, calling this will DESTORY ALL METHODS, only lef
v.back=L.back v.back=L.back
end end
end end
LANG.init,LANG.setLangList,LANG.setPublicText,LANG.setPublicWidgetText=nil 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 end
return LANG return LANG

View File

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

View File

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

View File

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

View File

@@ -41,12 +41,12 @@ spin判定:
没有用上的额外抵挡会被丢弃,最后剩下的攻击力会发送给对手 没有用上的额外抵挡会被丢弃,最后剩下的攻击力会发送给对手
back to back(B2B)点数说明: back to back(B2B)点数说明:
B2B点数的范围在0~1200,在点数>=40时进行特殊消除为B2B,>1000时特殊消除为B3B B2B点数的范围在0~1000,在点数>=50时进行特殊消除为B2B,>800时特殊消除为B3B
普通消除:-250 普通消除:-250
spin1~5:+[50/100/180/1000/1200](mini变为原来25%) spin1~5:+[50/100/180/800/1000](mini变为原来50%)
消四/五:+[100/200] 消四/五:+[100/200]
空spin:+20,此法得到的点数不能超过1000 空spin:+20,此法得到的点数不能超过800
当点数在1000以上时空放一块-40(不低于1000) 当点数在800以上时空放一块-40(不低于800)
混战模式说明: 混战模式说明:
许多玩家同时进行一局游戏(对手都是AI,不是真人).随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加.淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力. 许多玩家同时进行一局游戏(对手都是AI,不是真人).随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加.淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力.

View File

@@ -43,12 +43,12 @@ Countering:
Any extra blocking you didn't use will be discarded, and finally the remaining attack power will be sent to your opponent. Any extra blocking you didn't use will be discarded, and finally the remaining attack power will be sent to your opponent.
Back to Back (B2B) gauge: Back to Back (B2B) gauge:
The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000. The B2B gauge ranges from 0 to 1,000. Special line clears are B2B if the gauge is >=50, B2B2B if >800.
A regular line clear -250 A regular line clear -250
Spin Single/Double/Triple/Techrash/Techrash+ +50/100/180/1000/1200 (x25% if Mini) Spin Single/Double/Triple/Techrash/Techrash+ +50/100/180/800/1000 (x50% if Mini)
Techrash/Techrash+ +100/200 Techrash/Techrash+ +100/200
Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 1000 using this method. Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 800 using this method.
When gauge is above 1,000, a drop without clearing lines decreases it by 40, but cannot drop below 1,000 When gauge is above 800, a drop without clearing lines decreases it by 40, but cannot drop below 800
Battle Royale modes: Battle Royale modes:
Many players play a game at the same time (against AI bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. Eliminate other players to gain a badge and the player's badge to increase your attack power. Many players play a game at the same time (against AI bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. Eliminate other players to gain a badge and the player's badge to increase your attack power.

201
main.lua
View File

@@ -13,6 +13,7 @@ local fs=love.filesystem
--? --?
NONE={}function NULL()end NONE={}function NULL()end
DBP=print--Use this in permanent code DBP=print--Use this in permanent code
TIME=love.timer.getTime
SYSTEM=love.system.getOS() SYSTEM=love.system.getOS()
MOBILE=SYSTEM=="Android"or SYSTEM=="iOS" MOBILE=SYSTEM=="Android"or SYSTEM=="iOS"
SAVEDIR=fs.getSaveDirectory() SAVEDIR=fs.getSaveDirectory()
@@ -30,13 +31,62 @@ love.keyboard.setKeyRepeat(true)
love.keyboard.setTextInput(false) love.keyboard.setTextInput(false)
love.mouse.setVisible(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 --Load modules
require"Zframework" require"Zframework"
require"parts/list" require"parts/list"
require"parts/globalTables" require"parts/globalTables"
require"parts/gametoolfunc" require"parts/gametoolfunc"
SCR.setSize(1280,720)--Initialize Screen size SCR.setSize(1280,720)--Initialize Screen size
FIELD[1]=newBoard()--Initialize field[1] FIELD[1]=newBoard()--Initialize field[1]
@@ -51,6 +101,16 @@ AIFUNC= require"parts/ai"
MODES= require"parts/modes" MODES= require"parts/modes"
TICK= require"parts/tick" 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
end
if SETTING.fullscreen then love.window.setFullscreen(true)end
--Initialize image libs --Initialize image libs
IMG.init{ IMG.init{
batteryImage="/mess/power.png", batteryImage="/mess/power.png",
@@ -76,27 +136,25 @@ IMG.init{
hbm="mess/hbm.png", hbm="mess/hbm.png",
} }
SKIN.init{ SKIN.init{
"normal(mrz)", "Normal(MrZ)",
"smooth(mrz)", "Contrast(MrZ)",
"contrast(mrz)", "PolkaDots(ScF)",
"glow(mrz)", "Smooth(MrZ)",
"plastic(mrz)", "Glass(ScF)",
"jelly(miya)", "Pentagon(ScF)",
"steel(kulumi)", "Pure(MrZ)",
"pure(mrz)", "Glow(MrZ)",
"ball(shaw)", "Plastic(MrZ)",
"paper(mrz)", "Paper(MrZ)",
"gem(notypey)", "CartoonCup(Earety)",
"classic(_)", "Jelly(Miya)",
"brick(notypey)", "Brick(Notypey)",
"brick_light(notypey)", "Gem(Notypey)",
"cartoon_cup(earety)", "Classic",
"crack(earety)", "Ball(Shaw)",
"retro(notypey)", "Retro(Notypey)",
"retro_grey(notypey)", "TextBone(MrZ)",
"text_bone(mrz)", "ColoredBone(MrZ)",
"colored_bone(mrz)",
"white_bone(mrz)",
"WTF", "WTF",
} }
--Initialize sound libs --Initialize sound libs
@@ -166,7 +224,10 @@ LANG.setLangList{
require"parts/language/lang_sp", require"parts/language/lang_sp",
require"parts/language/lang_symbol", require"parts/language/lang_symbol",
require"parts/language/lang_yygq", 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{ LANG.setPublicText{
block={ block={
@@ -250,76 +311,8 @@ for _,v in next,fs.getDirectoryItems("parts/scenes")do
end end
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) 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 --Update data
do do
--Check Ranks --Check Ranks
@@ -345,13 +338,7 @@ do
S.stereo>1 or S.VKSFX>1 or S.VKAlpha>1 S.stereo>1 or S.VKSFX>1 or S.VKAlpha>1
then then
NOGAME=true NOGAME=true
fs.remove("settings.dat") fs.remove("conf/settings")
end
if fs.getInfo("cold_clear.dll")then
NOGAME=true
fs.remove("cold_clear.dll")
fs.remove("CCloader.dll")
end end
--Update data file --Update data file
@@ -374,22 +361,10 @@ do
SETTING.VKCurW=SETTING.VKCurW*.1 SETTING.VKCurW=SETTING.VKCurW*.1
SETTING.VKTchW=SETTING.VKTchW*.1 SETTING.VKTchW=SETTING.VKTchW*.1
end end
newVersionLaunch=true if S.version<1208 then
SETTING.skinSet=1
--Try unlock modes which should be unlocked
for name,rank in next,RANKS do
if rank and rank>0 then
for _,mode in next,MODES do
if mode.name==name and mode.unlock then
for _,unlockName in next,mode.unlock do
if not RANKS[unlockName]then
RANKS[unlockName]=0
end
end
end
end
end
end end
newVersionLaunch=true
S.version=VERSION_CODE S.version=VERSION_CODE
FILE.save(RANKS,"conf/unlock","q") FILE.save(RANKS,"conf/unlock","q")

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

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

View File

@@ -6,18 +6,18 @@ MODOPT={--Mod options
{no=0,id="NX",name="next", {no=0,id="NX",name="next",
key="q",x=80,y=230,color="orange", key="q",x=80,y=230,color="orange",
list={0,1,2,3,4,5,6}, 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", {no=1,id="HL",name="hold",
key="w",x=200,y=230,color="orange", key="w",x=200,y=230,color="orange",
list={0,1,2,3,4,5,6}, 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, unranked=true,
}, },
{no=2,id="FL",name="hideNext", {no=2,id="FL",name="hideNext",
key="e",x=320,y=230,color="water", key="e",x=320,y=230,color="water",
list={1,2,3,4,5}, 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", {no=3,id="IH",name="infHold",
key="r",x=440,y=230,color="water", key="r",x=440,y=230,color="water",
@@ -35,48 +35,48 @@ MODOPT={--Mod options
{no=6,id="HD",name="hidden", {no=6,id="HD",name="hidden",
key="i",x=920,y=230,color="grape", key="i",x=920,y=230,color="grape",
list={"time","fast","none"}, 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, unranked=true,
}, },
{no=7,id="HB",name="hideBoard", {no=7,id="HB",name="hideBoard",
key="o",x=1040,y=230,color="grape", key="o",x=1040,y=230,color="grape",
list={"down","up","all"}, 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", {no=8,id="FB",name="flipBoard",
key="p",x=1160,y=230,color="grass", key="p",x=1160,y=230,color="grass",
list={"UD","LR","180"}, list={"U-D","L-R","180"},
func=function(P)LOG.print("该mod还没有做好!")end, func=function(P,O)P.gameEnv.flipBoard=O end,
}, },
{no=9,id="DT",name="dropDelay", {no=9,id="DT",name="dropDelay",
key="a",x=140,y=350,color="red", 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}, 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, unranked=true,
}, },
{no=10,id="LT",name="lockDelay", {no=10,id="LT",name="lockDelay",
key="s",x=260,y=350,color="red", 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}, 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, unranked=true,
}, },
{no=11,id="ST",name="waitDelay", {no=11,id="ST",name="waitDelay",
key="d",x=380,y=350,color="red", key="d",x=380,y=350,color="red",
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, 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, unranked=true,
}, },
{no=12,id="CT",name="fallDelay", {no=12,id="CT",name="fallDelay",
key="f",x=500,y=350,color="red", key="f",x=500,y=350,color="red",
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, 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, unranked=true,
}, },
{no=13,id="LF",name="life", {no=13,id="LF",name="life",
key="j",x=860,y=350,color="yellow", key="j",x=860,y=350,color="yellow",
list={0,1,2,3,5,10,15,26,42,87,500}, 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, unranked=true,
}, },
{no=14,id="FB",name="forceB2B", {no=14,id="FB",name="forceB2B",
@@ -116,19 +116,19 @@ MODOPT={--Mod options
{no=19,id="CS",name="customSeq", {no=19,id="CS",name="customSeq",
key="b",x=680,y=470,color="blue", key="b",x=680,y=470,color="blue",
list={"bag","his4","rnd","reverb"}, 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, unranked=true,
}, },
{no=20,id="PS",name="pushSpeed", {no=20,id="PS",name="pushSpeed",
key="n",x=800,y=470,color="blue", key="n",x=800,y=470,color="blue",
list={.5,1,2,3,5,15,1e99}, 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, unranked=true,
}, },
{no=21,id="BN",name="boneBlock", {no=21,id="BN",name="boneBlock",
key="m",x=920,y=470,color="blue", key="m",x=920,y=470,color="blue",
list={"on","off"}, 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 for i=1,#MODOPT do
@@ -172,6 +172,8 @@ CUSTOMENV={--gameEnv for cutsom game
highCam=false, highCam=false,
nextPos=false, nextPos=false,
bone=false, bone=false,
hideBoard=false,
flipBoard=false,
--Rule --Rule
mindas=0, mindas=0,
@@ -231,8 +233,8 @@ GAME={--Global game data
} }
--Userdata tables --Userdata tables
RANKS={sprint_10=0}--Ranks of modes RANKS=FILE.load("conf/unlock")or{sprint_10=0}--Ranks of modes
USER={--User infomation USER=FILE.load("conf/user")or{--User infomation
email=nil, email=nil,
auth_token=nil, auth_token=nil,
access_token=nil, access_token=nil,
@@ -240,6 +242,7 @@ USER={--User infomation
username=nil, username=nil,
motto=nil, motto=nil,
avatar=nil, avatar=nil,
xp=0,lv=1,
} }
SETTING={--Settings SETTING={--Settings
--Tuning --Tuning
@@ -300,28 +303,33 @@ SETTING={--Settings
VKCurW=.4,--Cur-Pos Weight VKCurW=.4,--Cur-Pos Weight
VKIcon=true,--If disp icon VKIcon=true,--If disp icon
VKAlpha=.3, VKAlpha=.3,
} }local S=FILE.load("conf/settings")if S then addToTable(S,SETTING)end
STAT={--Statistics S=FILE.load("conf/data")
version=VERSION_CODE, if S then--Statistics
run=0,game=0,time=0,frame=0, STAT=S
key=0,rotate=0,hold=0, else
extraPiece=0,finesseRate=0, STAT={
piece=0,row=0,dig=0, version=VERSION_CODE,
atk=0,digatk=0, run=0,game=0,time=0,frame=0,
send=0,recv=0,pend=0,off=0, key=0,rotate=0,hold=0,
clear={},spin={}, extraPiece=0,finesseRate=0,
pc=0,hpc=0,b2b=0,b3b=0,score=0, piece=0,row=0,dig=0,
lastPlay="sprint_10",--Last played mode ID atk=0,digatk=0,
date=nil, send=0,recv=0,pend=0,off=0,
todayTime=0, clear={},spin={},
}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 pc=0,hpc=0,b2b=0,b3b=0,score=0,
keyMap={--Key setting lastPlay="sprint_10",--Last played mode ID
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
end
keyMap=FILE.load("conf/key")or{--Key setting
{"left","right","x","z","c","up","down","space","tab","r"},{}, {"left","right","x","z","c","up","down","space","tab","r"},{},
--Keyboard --Keyboard
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{}, {"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
--Joystick --Joystick
}for i=1,#keyMap do for j=1,20 do if not keyMap[i][j]then keyMap[i][j]=""end end end }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=80, y=720-200, r=80},--moveLeft
{ava=true, x=320, y=720-200, r=80},--moveRight {ava=true, x=320, y=720-200, r=80},--moveRight
{ava=true, x=1280-80, y=720-200, r=80},--rotRight {ava=true, x=1280-80, y=720-200, r=80},--rotRight
@@ -344,4 +352,4 @@ VK_org={--Virtualkey layout, refresh all VKs' position with this before each gam
{ava=false, x=1000, y=50, r=80},--addToRight {ava=false, x=1000, y=50, r=80},--addToRight
} }
virtualkey={}for i=1,#VK_org do virtualkey[i]={}end--In-game virtualkey layout 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", "http://139.199.75.237/tos",
}, },
{"Github Repository", {"Github Repository",
"githubrepository", "githubrepository sourcecode",
"other", "other",
"Techmino's Github repository. Stars are appreciated", "Techmino's Github repository. Stars are appreciated",
"http://github.com/26F-Studio/Techmino", "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",
"sfx soundeffects", "sfx soundeffects",

View File

@@ -732,11 +732,16 @@ return{
"http://139.199.75.237/tos", "http://139.199.75.237/tos",
}, },
{"Github仓库", {"Github仓库",
"github", "github sourcecode yuandaima",
"other", "other",
"Techmino的github仓库地址欢迎star", "Techmino的github仓库地址欢迎star",
"http://github.com/26F-Studio/Techmino", "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",
"sfx", "sfx",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
local gc=love.graphics local gc=love.graphics
local Timer=love.timer.getTime local gc_rectangle,gc_setColor=gc.rectangle,gc.setColor
local TIME=love.timer.getTime
local int,ceil,rnd=math.floor,math.ceil,math.random local int,ceil,rnd=math.floor,math.ceil,math.random
local max,min,sin=math.max,math.min,math.sin local max,min,sin=math.max,math.min,math.sin
local format=string.format local format=string.format
@@ -18,7 +19,7 @@ local frameColorList={
local function drawGrid(P,alpha) local function drawGrid(P,alpha)
local FBN,FUP=P.fieldBeneath,P.fieldUp local FBN,FUP=P.fieldBeneath,P.fieldUp
gc.setLineWidth(1) gc.setLineWidth(1)
gc.setColor(1,1,1,alpha) gc_setColor(1,1,1,alpha)
for x=1,9 do for x=1,9 do
gc.line(30*x,-10,30*x,600) gc.line(30*x,-10,30*x,600)
end end
@@ -37,11 +38,11 @@ local function drawField(P)
for i=1,10 do for i=1,10 do
if F[j][i]>0 then if F[j][i]>0 then
if V[j][i]>0 then if V[j][i]>0 then
gc.setColor(1,1,1,min(V[j][i]*.05,1)) 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]) Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
elseif rep then 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) gc_rectangle("fill",30*i-30,-30*j,30,30)
end end
end end
end end
@@ -56,17 +57,17 @@ local function drawField(P)
while j==P.clearingRow[h]do while j==P.clearingRow[h]do
h=h+1 h=h+1
gc.translate(0,-stepY) gc.translate(0,-stepY)
gc.setColor(1,1,1,A) gc_setColor(1,1,1,A)
gc.rectangle("fill",0,30-30*j,300,stepY) gc_rectangle("fill",0,30-30*j,300,stepY)
end end
for i=1,10 do for i=1,10 do
if F[j][i]>0 then if F[j][i]>0 then
if V[j][i]>0 then if V[j][i]>0 then
gc.setColor(1,1,1,min(V[j][i]*.05,1)) 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]) Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
elseif rep then elseif rep then
gc.setColor(1,1,1,.2) gc_setColor(1,1,1,.2)
gc.rectangle("fill",30*i-30,-30*j,30,30) gc_rectangle("fill",30*i-30,-30*j,30,30)
end end
end end
end end
@@ -79,27 +80,27 @@ local function drawFXs(P)
for i=1,#P.lockFX do for i=1,#P.lockFX do
local S=P.lockFX[i] local S=P.lockFX[i]
if S[3]<.5 then if S[3]<.5 then
gc.setColor(1,1,1,2*S[3]) gc_setColor(1,1,1,2*S[3])
gc.rectangle("fill",S[1],S[2],60*S[3],30) gc_rectangle("fill",S[1],S[2],60*S[3],30)
else else
gc.setColor(1,1,1,2-2*S[3]) gc_setColor(1,1,1,2-2*S[3])
gc.rectangle("fill",S[1]+30,S[2],60*S[3]-60,30) gc_rectangle("fill",S[1]+30,S[2],60*S[3]-60,30)
end end
end end
--DropFX --DropFX
for i=1,#P.dropFX do for i=1,#P.dropFX do
local S=P.dropFX[i] local S=P.dropFX[i]
gc.setColor(1,1,1,.6-S[5]*.6) gc_setColor(1,1,1,.6-S[5]*.6)
local w=30*S[3]*(1-S[5]*.5) local w=30*S[3]*(1-S[5]*.5)
gc.rectangle("fill",30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4]) gc_rectangle("fill",30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4])
end end
--MoveFX --MoveFX
local texture=SKIN.curText local texture=SKIN.curText
for i=1,#P.moveFX do for i=1,#P.moveFX do
local S=P.moveFX[i] local S=P.moveFX[i]
gc.setColor(1,1,1,.6-S[4]*.6) gc_setColor(1,1,1,.6-S[4]*.6)
Draw(texture[S[1]],30*S[2]-30,-30*S[3])-- drawCell(S[3],S[2],S[1]) Draw(texture[S[1]],30*S[2]-30,-30*S[3])-- drawCell(S[3],S[2],S[1])
end end
@@ -109,12 +110,12 @@ local function drawFXs(P)
local t=S[2] local t=S[2]
local x=t<.3 and 1-(3.3333*t-1)^2 or 1 local x=t<.3 and 1-(3.3333*t-1)^2 or 1
local y=t<.2 and 5*t or 1-1.25*(t-.2) local y=t<.2 and 5*t or 1-1.25*(t-.2)
gc.setColor(1,1,1,y) gc_setColor(1,1,1,y)
gc.rectangle("fill",150-x*150,15-S[1]*30-y*15,300*x,y*30) gc_rectangle("fill",150-x*150,15-S[1]*30-y*15,300*x,y*30)
end end
end end
local function drawGhost(P,clr) local function drawGhost(P,clr)
gc.setColor(1,1,1,P.gameEnv.ghost) gc_setColor(1,1,1,P.gameEnv.ghost)
local texture=SKIN.curText local texture=SKIN.curText
for i=1,P.r do for j=1,P.c do for i=1,P.r do for j=1,P.c do
if P.cur.bk[i][j]then if P.cur.bk[i][j]then
@@ -138,7 +139,7 @@ local function drawBlockOutline(P,texture,trans)
gc.setShader() gc.setShader()
end end
local function drawBlock(P,clr) local function drawBlock(P,clr)
gc.setColor(1,1,1) gc_setColor(1,1,1)
local texture=SKIN.curText local texture=SKIN.curText
for i=1,P.r do for j=1,P.c do for i=1,P.r do for j=1,P.c do
if P.cur.bk[i][j]then if P.cur.bk[i][j]then
@@ -147,7 +148,7 @@ local function drawBlock(P,clr)
end end end end
end end
local function drawNextPreview(P,B) local function drawNextPreview(P,B)
gc.setColor(1,1,1,.8) gc_setColor(1,1,1,.8)
local x=int(6-#B[1]*.5) local x=int(6-#B[1]*.5)
local y=21+ceil(P.fieldBeneath/30) local y=21+ceil(P.fieldBeneath/30)
for i=1,#B do for j=1,#B[1]do for i=1,#B do for j=1,#B[1]do
@@ -165,8 +166,8 @@ function draw.drawNext_norm(P)
local texture=SKIN.curText local texture=SKIN.curText
gc.push("transform") gc.push("transform")
gc.translate(316,116) gc.translate(316,116)
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,N+8) gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8) gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
mText(drawableText.next,62,-131) mText(drawableText.next,62,-131)
N=1 N=1
while N<=ENV.nextCount and P.nextQueue[N]do while N<=ENV.nextCount and P.nextQueue[N]do
@@ -182,7 +183,7 @@ function draw.drawNext_norm(P)
if ENV.bagLine then if ENV.bagLine then
local L=ENV.bagLen local L=ENV.bagLen
local C=-P.pieceCount%L--Phase local C=-P.pieceCount%L--Phase
gc.setColor(.8,.5,.5) gc_setColor(.8,.5,.5)
for i=C,N-1,L do for i=C,N-1,L do
local y=72*i-77 local y=72*i-77
gc.line(2+P.fieldOff.x,y,120,y) gc.line(2+P.fieldOff.x,y,120,y)
@@ -196,8 +197,8 @@ function draw.drawNext_hidden(P)
local texture=SKIN.curText local texture=SKIN.curText
gc.push("transform") gc.push("transform")
gc.translate(316,116) gc.translate(316,116)
gc.setColor(.5,0,0,.4)gc.rectangle("fill",0,-80,124,N+8) gc_setColor(.5,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8) gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
mText(drawableText.next,62,-131) mText(drawableText.next,62,-131)
N=min(ENV.nextStartPos,P.pieceCount+1) N=min(ENV.nextStartPos,P.pieceCount+1)
while N<=ENV.nextCount and P.nextQueue[N]do while N<=ENV.nextCount and P.nextQueue[N]do
@@ -213,7 +214,7 @@ function draw.drawNext_hidden(P)
if ENV.bagLine then if ENV.bagLine then
local L=ENV.bagLen local L=ENV.bagLen
local C=-P.pieceCount%L--Phase local C=-P.pieceCount%L--Phase
gc.setColor(.8,.5,.5) gc_setColor(.8,.5,.5)
for i=C,N-1,L do for i=C,N-1,L do
local y=72*i-77 local y=72*i-77
gc.line(2+P.fieldOff.x,y,120,y) gc.line(2+P.fieldOff.x,y,120,y)
@@ -226,9 +227,9 @@ function draw.drawHold_norm(P)
local texture=SKIN.curText local texture=SKIN.curText
gc.push("transform") gc.push("transform")
gc.translate(-140,116) gc.translate(-140,116)
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,80) gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,80)
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,80) gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,80)
if P.holdTime==0 then gc.setColor(.6,.4,.4)end if P.holdTime==0 then gc_setColor(.6,.4,.4)end
mText(drawableText.hold,62,-131) mText(drawableText.hold,62,-131)
local B=P.holdQueue[1] local B=P.holdQueue[1]
@@ -248,19 +249,19 @@ function draw.drawHold_multi(P)
local texture=SKIN.curText local texture=SKIN.curText
gc.push("transform") gc.push("transform")
gc.translate(-140,116) gc.translate(-140,116)
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,N+8) gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8) gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
if P.holdTime==0 then gc.setColor(.6,.4,.4)end if P.holdTime==0 then gc_setColor(.6,.4,.4)end
mText(drawableText.hold,62,-131) mText(drawableText.hold,62,-131)
gc.setColor(1,1,1) gc_setColor(1,1,1)
if #P.holdQueue<P.gameEnv.holdCount and P.nextQueue[1]then if #P.holdQueue<P.gameEnv.holdCount and P.nextQueue[1]then
N=1 N=1
else else
N=P.holdTime+1 N=P.holdTime+1
end end
for n=1,#P.holdQueue do for n=1,#P.holdQueue do
if n==N then gc.setColor(.6,.4,.4)end if n==N then gc_setColor(.6,.4,.4)end
local bk,clr=P.holdQueue[n].bk,P.holdQueue[n].color local bk,clr=P.holdQueue[n].bk,P.holdQueue[n].color
for i=1,#bk do for j=1,#bk[1]do for i=1,#bk do for j=1,#bk[1]do
if bk[i][j]then if bk[i][j]then
@@ -274,7 +275,7 @@ end
function draw.drawTargetLine(P,r) function draw.drawTargetLine(P,r)
if r<21+(P.fieldBeneath+P.fieldUp)/30 and r>0 then if r<21+(P.fieldBeneath+P.fieldUp)/30 and r>0 then
gc.setLineWidth(4) gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5) gc_setColor(1,r>10 and 0 or rnd(),.5)
local dx,dy=150+P.fieldOff.x,P.fieldOff.y+P.fieldBeneath+P.fieldUp local dx,dy=150+P.fieldOff.x,P.fieldOff.y+P.fieldBeneath+P.fieldUp
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy) gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end end
@@ -289,24 +290,30 @@ local attackColor={
} }
local RCPB={5,33,195,33,100,5,100,60} local RCPB={5,33,195,33,100,5,100,60}
local function drawDial(x,y,speed) local function drawDial(x,y,speed)
gc.setColor(1,1,1) gc_setColor(1,1,1)
mStr(int(speed),x,y-18) mStr(int(speed),x,y-18)
gc.setLineWidth(4) gc.setLineWidth(4)
gc.setColor(1,1,1,.4) gc_setColor(1,1,1,.4)
gc.circle("line",x,y,30,10) gc.circle("line",x,y,30,10)
gc.setLineWidth(2) gc.setLineWidth(2)
gc.setColor(1,1,1,.6) gc_setColor(1,1,1,.6)
gc.circle("line",x,y,30,10) gc.circle("line",x,y,30,10)
gc.setColor(1,1,1,.8) 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) 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 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) function draw.norm(P)
local _ local _
local ENV=P.gameEnv local ENV=P.gameEnv
local FBN,FUP=P.fieldBeneath,P.fieldUp local FBN,FUP=P.fieldBeneath,P.fieldUp
local t=TIME()
gc.push("transform") gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size) gc.translate(P.x,P.y)gc.scale(P.size)
@@ -319,26 +326,38 @@ function draw.norm(P)
gc.translate(P.fieldOff.x,P.fieldOff.y) gc.translate(P.fieldOff.x,P.fieldOff.y)
--Fill field --Fill field
gc.setColor(0,0,0,.6) gc_setColor(0,0,0,.6)
gc.rectangle("fill",0,-10,300,610) gc_rectangle("fill",0,-10,300,610)
--Draw grid --Draw grid
if ENV.grid then drawGrid(P,ENV.grid)end if ENV.grid then drawGrid(P,ENV.grid)end
--In-field things --In-field things
gc.push("transform") 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.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) 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)
--Draw dangerous area --Draw dangerous area
gc.setColor(1,0,0,.3) gc_setColor(1,0,0,.3)
gc.rectangle("fill",0,-600,300,-610-FUP-FBN) gc_rectangle("fill",0,-600,300,-610-FUP-FBN)
--Draw field --Draw field
drawField(P) drawField(P)
--Draw spawn line --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.setLineWidth(4)
gc.line(0,-600-FBN,300,-600-FBN) gc.line(0,-600-FBN,300,-600-FBN)
@@ -365,12 +384,12 @@ function draw.norm(P)
--Draw rotate center --Draw rotate center
local x=30*(P.curX+P.sc[2])-15 local x=30*(P.curX+P.sc[2])-15
if ENV.center and ENV.block then if ENV.center and ENV.block then
gc.setColor(1,1,1,ENV.center) gc_setColor(1,1,1,ENV.center)
gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4) gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
end end
gc.translate(0,dy) gc.translate(0,dy)
if ENV.center and ENV.ghost then if ENV.center and ENV.ghost then
gc.setColor(1,1,1,trans*ENV.center) gc_setColor(1,1,1,trans*ENV.center)
gc.draw(IMG.spinCenter,x,-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4) gc.draw(IMG.spinCenter,x,-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
end end
end end
@@ -384,10 +403,10 @@ function draw.norm(P)
gc.pop() gc.pop()
gc.setLineWidth(2) gc.setLineWidth(2)
gc.setColor(frameColorList[P.frameColor]) gc_setColor(frameColorList[P.frameColor])
gc.rectangle("line",-1,-11,302,612)--Boarder gc_rectangle("line",-1,-11,302,612)--Boarder
gc.rectangle("line",301,-3,15,604)--AtkBuffer boarder gc_rectangle("line",301,-3,15,604)--AtkBuffer boarder
gc.rectangle("line",-16,-3,15,604)--B2b bar boarder gc_rectangle("line",-16,-3,15,604)--B2b bar boarder
--Buffer line --Buffer line
local h=0 local h=0
@@ -402,21 +421,21 @@ function draw.norm(P)
end end
if A.countdown>0 then if A.countdown>0 then
--Timing --Timing
gc.setColor(attackColor[A.lv][1]) gc_setColor(attackColor[A.lv][1])
gc.rectangle("fill",303,599-h,11,-bar) gc_rectangle("fill",303,599-h,11,-bar)
gc.setColor(attackColor[A.lv][2]) gc_setColor(attackColor[A.lv][2])
gc.rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0)) gc_rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
else else
--Warning --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] 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) gc_rectangle("fill",303,599-h,11,-bar)
end end
else else
gc.setColor(attackColor[A.lv][1]) gc_setColor(attackColor[A.lv][1])
bar=bar*(20-A.time)*.05 bar=bar*(20-A.time)*.05
gc.rectangle("fill",303,599-h,11,-bar) gc_rectangle("fill",303,599-h,11,-bar)
--Disappear --Disappear
end end
h=h+bar h=h+bar
@@ -424,27 +443,27 @@ function draw.norm(P)
--B2B indictator --B2B indictator
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
gc.setColor(.8,1,.2) gc_setColor(.8,1,.2)
gc.rectangle("fill",-14,599,11,-b*.5) gc_rectangle("fill",-14,599,11,-b*.6)
gc.setColor(P.b2b<40 and COLOR.white or P.b2b<=1e3 and COLOR.lRed or COLOR.lBlue) gc_setColor(P.b2b<40 and COLOR.white or P.b2b<=800 and COLOR.lRed or COLOR.lBlue)
gc.rectangle("fill",-14,599,11,-a*.5) gc_rectangle("fill",-14,599,11,-a*.6)
gc.setColor(1,1,1) 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) gc_rectangle("fill",-15,b<40 and 568.5 or 118.5,13,3)
end end
--LockDelay indicator --LockDelay indicator
if ENV.easyFresh then if ENV.easyFresh then
gc.setColor(1,1,1) gc_setColor(1,1,1)
else else
gc.setColor(1,.26,.26) gc_setColor(1,.26,.26)
end end
if P.lockDelay>=0 then if P.lockDelay>=0 then
gc.rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator gc_rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
end end
local x=3 local x=3
for _=1,min(P.freshTime,15)do for _=1,min(P.freshTime,15)do
gc.rectangle("fill",x,615,14,5) gc_rectangle("fill",x,615,14,5)
x=x+20 x=x+20
end end
@@ -457,16 +476,26 @@ function draw.norm(P)
--Draw target selecting pad --Draw target selecting pad
if GAME.modeEnv.royaleMode then if GAME.modeEnv.royaleMode then
if P.atkMode then if P.atkMode then
gc.setColor(1,.8,0,P.swappingAtkMode*.02) gc_setColor(1,.8,0,P.swappingAtkMode*.02)
gc.rectangle("fill",RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4) gc_rectangle("fill",RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4)
end end
gc.setColor(1,1,1,P.swappingAtkMode*.025) gc_setColor(1,1,1,P.swappingAtkMode*.025)
setFont(35) setFont(35)
for i=1,4 do for i=1,4 do
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4) gc_rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5) gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5)
end end
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() gc.pop()
--Bonus texts --Bonus texts
@@ -474,50 +503,50 @@ function draw.norm(P)
--Display Ys --Display Ys
-- gc.setLineWidth(6) -- gc.setLineWidth(6)
-- if P.curY then gc.setColor(1,.4,0,.42)gc.line(0,611-P.curY*30,300,611-P.curY*30)end -- if P.curY then gc_setColor(1,.4,0,.42)gc.line(0,611-P.curY*30,300,611-P.curY*30)end
-- if P.imgY then gc.setColor(0,1,.4,.42)gc.line(0,615-P.imgY*30,300,615-P.imgY*30)end -- if P.imgY then gc_setColor(0,1,.4,.42)gc.line(0,615-P.imgY*30,300,615-P.imgY*30)end
-- if P.minY then gc.setColor(0,.4,1,.42)gc.line(0,619-P.minY*30,300,619-P.minY*30)end -- if P.minY then gc_setColor(0,.4,1,.42)gc.line(0,619-P.minY*30,300,619-P.minY*30)end
-- gc.setColor(0,.4,1,.42)gc.line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30) -- gc_setColor(0,.4,1,.42)gc.line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30)
gc.pop() gc.pop()
--Speed dials --Speed dials
setFont(25) setFont(25)
drawDial(510,510,P.dropSpeed) drawDial(510,510,P.dropSpeed)
drawDial(555,565,P.keySpeed) drawDial(555,565,P.keySpeed)
gc.setColor(1,1,1) gc_setColor(1,1,1)
gc.draw(drawableText.bpm,540,480) gc.draw(drawableText.bpm,540,480)
gc.draw(drawableText.kpm,494,573) gc.draw(drawableText.kpm,494,573)
--Score & Time --Score & Time
setFont(25) setFont(25)
gc.setColor(0,0,0,.3) gc_setColor(0,0,0,.3)
gc.print(P.score1,18,509) gc.print(P.score1,18,509)
gc.print(format("%.2f",P.stat.time),18,539) gc.print(format("%.2f",P.stat.time),18,539)
gc.setColor(COLOR.lYellow)gc.print(P.score1,20,510) gc_setColor(COLOR.lYellow)gc.print(P.score1,20,510)
gc.setColor(COLOR.sky)gc.print(format("%.2f",P.stat.time),20,540) gc_setColor(COLOR.sky)gc.print(format("%.2f",P.stat.time),20,540)
--FinesseCombo --FinesseCombo
if P.finesseCombo>2 then if P.finesseCombo>2 then
_=P.finesseComboTime _=P.finesseComboTime
local T=P.finesseCombo.."x" local str=P.finesseCombo.."x"
if _>0 then if _>0 then
gc.setColor(1,1,1,_*.2) 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_setColor(1,1,1,1.2-_*.1)
gc.push("transform") gc.push("transform")
gc.translate(20,600) gc.translate(20,600)
gc.scale(1+_*.08) gc.scale(1+_*.08)
gc.print(T,0,-30) gc.print(str,0,-30)
gc.pop() gc.pop()
else else
gc.setColor(1,1,1) gc_setColor(1,1,1)
gc.print(T,20,570) gc.print(str,20,570)
end end
end end
--Lives --Lives
if P.life>0 then if P.life>0 then
gc.setColor(1,1,1) gc_setColor(1,1,1)
if P.life<=3 then if P.life<=3 then
for i=1,P.life do for i=1,P.life do
gc.draw(IMG.lifeIcon,450+25*i,595,nil,.8) gc.draw(IMG.lifeIcon,450+25*i,595,nil,.8)
@@ -531,7 +560,7 @@ function draw.norm(P)
end end
--Other messages --Other messages
gc.setColor(1,1,1) gc_setColor(1,1,1)
if GAME.curMode.mesDisp then if GAME.curMode.mesDisp then
GAME.curMode.mesDisp(P) GAME.curMode.mesDisp(P)
end end
@@ -544,19 +573,19 @@ function draw.norm(P)
--Draw current mission --Draw current mission
setFont(35) setFont(35)
if ENV.missionKill then 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 else
gc.setColor(1,1,1) gc_setColor(1,1,1)
end end
gc.print(missionEnum[L[P.curMission]],85,110) gc.print(missionEnum[L[P.curMission]],85,110)
--Draw next mission --Draw next mission
setFont(20) setFont(20)
for i=1,3 do for i=1,3 do
local t=L[P.curMission+i] local m=L[P.curMission+i]
if t then if m then
t=missionEnum[t] m=missionEnum[m]
gc.print(t,87-28*i,117) gc.print(m,87-28*i,117)
else else
break break
end end
@@ -564,7 +593,7 @@ function draw.norm(P)
end end
--Draw starting counter --Draw starting counter
gc.setColor(1,1,1) gc_setColor(1,1,1)
if GAME.frame<180 then if GAME.frame<180 then
local count=179-GAME.frame local count=179-GAME.frame
gc.push("transform") gc.push("transform")
@@ -586,7 +615,7 @@ function draw.small(P)
gc.clear(0,0,0,.4) gc.clear(0,0,0,.4)
gc.push("transform") gc.push("transform")
gc.origin() gc.origin()
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1) gc_setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
--Field --Field
local F=P.field local F=P.field
@@ -600,13 +629,13 @@ function draw.small(P)
--Draw boarder --Draw boarder
if P.alive then if P.alive then
gc.setLineWidth(2) gc.setLineWidth(2)
gc.setColor(frameColorList[P.frameColor]) gc_setColor(frameColorList[P.frameColor])
gc.rectangle("line",0,0,60,120) gc_rectangle("line",0,0,60,120)
end end
--Draw badge --Draw badge
if GAME.modeEnv.royaleMode then if GAME.modeEnv.royaleMode then
gc.setColor(1,1,1) gc_setColor(1,1,1)
for i=1,P.strength do for i=1,P.strength do
gc.draw(IMG.badgeIcon,12*i-7,4,nil,.5) gc.draw(IMG.badgeIcon,12*i-7,4,nil,.5)
end end
@@ -614,7 +643,7 @@ function draw.small(P)
--Draw result --Draw result
if P.result then if P.result then
gc.setColor(1,1,1,min(P.endCounter,60)*.01) gc_setColor(1,1,1,min(P.endCounter,60)*.01)
setFont(20)mStr(P.result,32,47) setFont(20)mStr(P.result,32,47)
setFont(15)mStr(P.modeData.event,30,82) setFont(15)mStr(P.modeData.event,30,82)
end end
@@ -623,11 +652,11 @@ function draw.small(P)
end end
--Draw Canvas --Draw Canvas
gc.setColor(1,1,1) gc_setColor(1,1,1)
gc.draw(P.canvas,P.x,P.y,nil,P.size*10) gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
if P.killMark then if P.killMark then
gc.setLineWidth(3) gc.setLineWidth(3)
gc.setColor(1,0,0,min(P.endCounter,25)*.04) gc_setColor(1,0,0,min(P.endCounter,25)*.04)
gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size) gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size)
end end
setFont(30) setFont(30)
@@ -646,11 +675,11 @@ function draw.demo(P)
gc.translate(P.fieldOff.x,P.fieldOff.y) gc.translate(P.fieldOff.x,P.fieldOff.y)
--Frame --Frame
gc.setColor(0,0,0,.6) gc_setColor(0,0,0,.6)
gc.rectangle("fill",0,0,300,600) gc_rectangle("fill",0,0,300,600)
gc.setLineWidth(2) gc.setLineWidth(2)
gc.setColor(1,1,1) gc_setColor(1,1,1)
gc.rectangle("line",-1,-1,302,602) gc_rectangle("line",-1,-1,302,602)
gc.push("transform") gc.push("transform")
gc.translate(0,600) gc.translate(0,600)
@@ -674,7 +703,7 @@ function draw.demo(P)
while P.holdQueue[N]do while P.holdQueue[N]do
local id=P.holdQueue[N].id local id=P.holdQueue[N].id
_=P.color[id] _=P.color[id]
gc.setColor(_[1],_[2],_[3],.3) gc_setColor(_[1],_[2],_[3],.3)
_=blockImg[id] _=blockImg[id]
gc.draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5) gc.draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
N=N+1 N=N+1
@@ -685,7 +714,7 @@ function draw.demo(P)
while N<=ENV.nextCount and P.nextQueue[N]do while N<=ENV.nextCount and P.nextQueue[N]do
local id=P.nextQueue[N].id local id=P.nextQueue[N].id
_=P.color[id] _=P.color[id]
gc.setColor(_[1],_[2],_[3],.3) gc_setColor(_[1],_[2],_[3],.3)
_=blockImg[id] _=blockImg[id]
gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5) gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
N=N+1 N=N+1

View File

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

View File

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

View File

@@ -747,7 +747,7 @@ do--Player.drop(P)--Place piece
{300,1200,1700,4000,6000},--I {300,1200,1700,4000,6000},--I
{220,800,2000,3000,8000,26000},--Else {220,800,2000,3000,8000,26000},--Else
}--B2Bmul:1.2/2.0; Mini*=.6 }--B2Bmul:1.2/2.0; Mini*=.6
local b2bPoint={50,100,180,1000,1200,9999} local b2bPoint={50,100,180,800,1000,9999}
local b2bATK={3,5,8,12,18} local b2bATK={3,5,8,12,18}
local reAtk={0,0,1,1,1,2,2,3,3} local reAtk={0,0,1,1,1,2,2,3,3}
@@ -1052,7 +1052,7 @@ do--Player.drop(P)--Place piece
cmb=cmb+1 cmb=cmb+1
if dospin then if dospin then
cscore=(spinSCR[CB.name]or spinSCR[8])[cc] cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
if P.b2b>1000 then if P.b2b>800 then
P:showText(text.b3b..text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,35,"stretch") P:showText(text.b3b..text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,35,"stretch")
atk=b2bATK[cc]+cc*.5 atk=b2bATK[cc]+cc*.5
exblock=exblock+1 exblock=exblock+1
@@ -1094,7 +1094,7 @@ do--Player.drop(P)--Place piece
end end
elseif cc>=4 then elseif cc>=4 then
cscore=cc==4 and 1000 or cc==5 and 1500 or 2000 cscore=cc==4 and 1000 or cc==5 and 1500 or 2000
if P.b2b>1000 then if P.b2b>800 then
P:showText(text.b3b..text.clear[cc],0,-30,50,"fly") P:showText(text.b3b..text.clear[cc],0,-30,50,"fly")
atk=4*cc-10 atk=4*cc-10
sendTime=100 sendTime=100
@@ -1134,7 +1134,7 @@ do--Player.drop(P)--Place piece
exblock=exblock+2 exblock=exblock+2
sendTime=sendTime+120 sendTime=sendTime+120
if STAT.row+cc>4 then if STAT.row+cc>4 then
P.b2b=1200 P.b2b=1000
cscore=cscore+300*min(6+STAT.pc,10) cscore=cscore+300*min(6+STAT.pc,10)
else else
cscore=cscore+626 cscore=cscore+626
@@ -1184,7 +1184,7 @@ do--Player.drop(P)--Place piece
cscore=cscore+min(50*cmb,500)*(2*cc-1) cscore=cscore+min(50*cmb,500)*(2*cc-1)
end end
if P.b2b>1200 then P.b2b=1200 end if P.b2b>1000 then P.b2b=1000 end
--Bonus atk/def when focused --Bonus atk/def when focused
if GAME.modeEnv.royaleMode then if GAME.modeEnv.royaleMode then
@@ -1258,8 +1258,8 @@ do--Player.drop(P)--Place piece
cscore=30 cscore=30
end end
if P.b2b>1000 then if P.b2b>800 then
P.b2b=max(P.b2b-40,1000) P.b2b=max(P.b2b-40,800)
end end
P:garbageRelease() P:garbageRelease()
end end

View File

@@ -333,8 +333,8 @@ local update={
function update.dead(P,dt) function update.dead(P,dt)
if P.keyRec then if P.keyRec then
local S=P.stat local S=P.stat
P.keySpeed=P.keySpeed*.96+S.key/S.frame*.04 P.keySpeed=P.keySpeed*.96+S.key/S.frame*144
P.dropSpeed=P.dropSpeed*.96+S.piece/S.frame*.04 P.dropSpeed=P.dropSpeed*.96+S.piece/S.frame*144
--Final average speeds --Final average speeds
if GAME.modeEnv.royaleMode then if GAME.modeEnv.royaleMode then
P.swappingAtkMode=min(P.swappingAtkMode+2,30) P.swappingAtkMode=min(P.swappingAtkMode+2,30)

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,4 @@
local gc=love.graphics local gc=love.graphics
local Timer=love.timer.getTime
local int,abs=math.floor,math.abs local int,abs=math.floor,math.abs
local min,sin=math.min,math.sin local min,sin=math.min,math.sin
@@ -39,44 +38,21 @@ local function clearResult()
for _=1,#result do rem(result)end for _=1,#result do rem(result)end
selected,scrollPos,waiting,lastSearch=1,0,0,false selected,scrollPos,waiting,lastSearch=1,0,0,false
end end
local miniGame={ local eggInput={
["15"]="15p", ["15p"]="mg_15p",
["15p"]="15p", sltg="mg_schulteG",
hrd="15p", pong="mg_pong",
huarongdao="15p", atoz="mg_AtoZ",
shuzihuarongdao="15p", uttt="mg_UTTT",
cbf="mg_cubefield",
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 function search() local function search()
if miniGame[input]then if eggInput[input]then
SCN.go("mg_"..miniGame[input]) if type(eggInput[input])=="string"then
SCN.go(eggInput[input])
elseif type(eggInput[input])=="function"then
eggInput[input]()
end
else else
clearResult() clearResult()
local first local first
@@ -172,20 +148,20 @@ function scene.draw()
local list=result[1]and result or dict local list=result[1]and result or dict
gc.setColor(1,1,1) gc.setColor(1,1,1)
local text=list[selected][4] local t=list[selected][4]
if #text>900 then if #t>900 then
setFont(15) setFont(15)
elseif #text>600 then elseif #t>600 then
setFont(20) setFont(20)
elseif #text>400 then elseif #t>400 then
setFont(25) setFont(25)
else else
setFont(30) setFont(30)
end end
gc.printf(text,306,180,950) gc.printf(t,306,180,950)
setFont(30) 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) gc.rectangle("fill",20,143+35*(selected-scrollPos),280,35)
setFont(30) setFont(30)
@@ -207,10 +183,10 @@ function scene.draw()
gc.rectangle("line",20,180,280,526) gc.rectangle("line",20,180,280,526)
if waiting>0 then if waiting>0 then
local r=Timer()*2 local r=TIME()*2
local R=int(r)%7+1 local R=int(r)%7+1
gc.setColor(1,1,1,1-abs(r%1*2-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
end end

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
local gc=love.graphics local gc=love.graphics
local tc=love.touch local tc=love.touch
local Timer=love.timer.getTime
local max,min,sin=math.max,math.min,math.sin local max,min,sin=math.max,math.min,math.sin
@@ -175,6 +174,21 @@ function scene.update()
gc.setCanvas() gc.setCanvas()
elseif phase==9 then elseif phase==9 then
SKIN.change(SETTING.skinSet) SKIN.change(SETTING.skinSet)
if newVersionLaunch then--Delete old ranks & Unlock modes which should be unlocked
for name,rank in next,RANKS do
local M=MODES[name]
if M and M.unlock and rank>0 then
for _,unlockName in next,M.unlock do
if not RANKS[unlockName]then
RANKS[unlockName]=0
end
end
end
if not(M and M.score)then
RANKS[name]=nil
end
end
end
STAT.run=STAT.run+1 STAT.run=STAT.run+1
LOADED=true LOADED=true
SFX.play("welcome_sfx") SFX.play("welcome_sfx")
@@ -224,14 +238,14 @@ function scene.draw()
gc.setColor(.4,.4,.4) gc.setColor(.4,.4,.4)
gc.rectangle("fill",0,0,440,260) gc.rectangle("fill",0,0,440,260)
local T=Timer() local t=TIME()
gc.setColor(COLOR.dCyan) gc.setColor(COLOR.dCyan)
mDraw(studioLogo,220,Y*.2-1204) mDraw(studioLogo,220,Y*.2-1204)
mDraw(studioLogo,220,-Y*.2+1476) mDraw(studioLogo,220,-Y*.2+1476)
gc.setColor(COLOR.cyan) gc.setColor(COLOR.cyan)
mDraw(studioLogo,220+4*sin(T*10),136+4*sin(T*6)) 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*12),136+4*sin(t*8))
gc.setColor(COLOR.dCyan) gc.setColor(COLOR.dCyan)
mDraw(studioLogo,219,137) mDraw(studioLogo,219,137)

View File

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

View File

@@ -73,8 +73,8 @@ function scene.draw()
gc.print(tip,50,660) gc.print(tip,50,660)
local L=text.modes[STAT.lastPlay] local L=text.modes[STAT.lastPlay]
setFont(25) setFont(25)
gc.print(L[1],700,390) gc.print(L[1],700,230)
gc.print(L[2],700,420) gc.print(L[2],700,260)
PLAYERS[1]:draw() PLAYERS[1]:draw()
end end
@@ -109,10 +109,10 @@ scene.widgetList={
SCN.go("login") SCN.go("login")
end end
end}, end},
WIDGET.newButton{name="custom", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=WIDGET.lnk_goScene("customGame")}, WIDGET.newButton{name="qplay", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=function()loadGame(STAT.lastPlay,true)end},
WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk_goScene("setting_game")}, WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk_goScene("setting_game")},
WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=WIDGET.lnk_goScene("stat")}, WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=WIDGET.lnk_goScene("stat")},
WIDGET.newButton{name="qplay", x=590,y=380,w=200,h=140,color="white", font=40,code=function()loadGame(STAT.lastPlay,true)end}, WIDGET.newButton{name="custom", x=590,y=380,w=200,h=140,color="white", font=40,code=WIDGET.lnk_goScene("customGame")},
WIDGET.newButton{name="lang", x=150,y=515,w=200,h=90,color="lYellow", font=40,code=WIDGET.lnk_goScene("lang")}, WIDGET.newButton{name="lang", x=150,y=515,w=200,h=90,color="lYellow", font=40,code=WIDGET.lnk_goScene("lang")},
WIDGET.newButton{name="help", x=370,y=515,w=200,h=90,color="dGreen", font=40,code=WIDGET.lnk_goScene("help")}, WIDGET.newButton{name="help", x=370,y=515,w=200,h=90,color="dGreen", font=40,code=WIDGET.lnk_goScene("help")},
WIDGET.newButton{name="quit", x=590,y=515,w=200,h=90,color="grey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}, WIDGET.newButton{name="quit", x=590,y=515,w=200,h=90,color="grey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,12 +1,10 @@
local gc=love.graphics local gc=love.graphics
local tc=love.touch local tc=love.touch
local Timer=love.timer.getTime local TIME=TIME
local max,sin=math.max,math.sin local max,sin=math.max,math.sin
local log=math.log
local SCR=SCR--play/pause
local SCR=SCR
local VK=virtualkey local VK=virtualkey
local function onVirtualkey(x,y) local function onVirtualkey(x,y)
local dist,nearest=1e10 local dist,nearest=1e10
@@ -24,8 +22,7 @@ local function onVirtualkey(x,y)
return nearest return nearest
end end
local noTouch local noTouch,noKey
local noKey
local scene={} local scene={}
@@ -239,7 +236,7 @@ function scene.update(dt)
end end
end end
end end
GAME.warnLVL0=log(height-15+P1.atkBuffer.sum*.8) GAME.warnLVL0=math.log(height-15+P1.atkBuffer.sum*.8)
end end
_=GAME.warnLVL _=GAME.warnLVL
if _<GAME.warnLVL0 then if _<GAME.warnLVL0 then
@@ -254,10 +251,10 @@ function scene.update(dt)
end end
local function drawAtkPointer(x,y) 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.setColor(.2,.7+t*.2,1,.6+t*.4)
gc.circle("fill",x,y,25,6) 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.setColor(0,.6,1,.8-a)
gc.circle("line",x,y,30*(1+a),6) gc.circle("line",x,y,30*(1+a),6)
end end
@@ -299,9 +296,9 @@ local function drawVirtualkey()
end end
end end
function scene.draw() function scene.draw()
local t=TIME()
if MARKING then if MARKING then
setFont(25) setFont(25)
local t=Timer()
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t))) gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
mStr(text.marking,190,60+26*sin(t)) mStr(text.marking,190,60+26*sin(t))
end end
@@ -337,7 +334,7 @@ function scene.draw()
--Replaying --Replaying
if GAME.replaying then 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) mText(drawableText.replaying,410,17)
end end
@@ -345,7 +342,6 @@ function scene.draw()
gc.push("transform") gc.push("transform")
gc.origin() gc.origin()
if GAME.warnLVL>0 then if GAME.warnLVL>0 then
gc.setColor(0,0,0,0)
SHADER.warning:send("level",GAME.warnLVL) SHADER.warning:send("level",GAME.warnLVL)
gc.setShader(SHADER.warning) gc.setShader(SHADER.warning)
gc.rectangle("fill",0,0,SCR.w,SCR.h) gc.rectangle("fill",0,0,SCR.w,SCR.h)

View File

@@ -1,6 +1,4 @@
local gc=love.graphics local gc=love.graphics
local Timer=love.timer.getTime
local int=math.floor local int=math.floor
local scene={} local scene={}
@@ -14,7 +12,7 @@ end
function scene.draw() function scene.draw()
gc.setColor(1,1,1) 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 end
scene.widgetList={ scene.widgetList={

View File

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

View File

@@ -1,5 +1,4 @@
local gc=love.graphics local gc=love.graphics
local Timer=love.timer.getTime
local sin=math.sin local sin=math.sin
local scene={} local scene={}
@@ -18,7 +17,7 @@ function scene.draw()
gc.draw(texture[color],x+30*j,y-30*i) gc.draw(texture[color],x+30*j,y-30*i)
end end
end 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 end
gc.draw(texture[17],930,610,nil,2) gc.draw(texture[17],930,610,nil,2)
for i=1,5 do for i=1,5 do

View File

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

View File

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

View File

@@ -1,9 +1,7 @@
local gc=love.graphics local gc=love.graphics
local Timer=love.timer.getTime
local abs,int,sin=math.abs,math.floor,math.sin local abs,int,sin=math.abs,math.floor,math.sin
local format=string.format local format=string.format
local mStr=mStr local mStr=mStr
local scene={} local scene={}
@@ -88,17 +86,18 @@ function scene.draw()
gc.line(40,240+40*y,600,240+40*y) gc.line(40,240+40*y,600,240+40*y)
end 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 local R=int(r)%7+1
gc.setColor(1,1,1,1-abs(r%1*2-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) gc.draw(TEXTURE.miniBlock[R],680,300,0,15,15,spinCenters[R][0][2]+.5,#BLOCKS[R][0]-spinCenters[R][0][1]-.5)
end end
scene.widgetList={ 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="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}, 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 if res then
LOG.print(text.accessSuccessed) LOG.print(text.accessSuccessed)
USER.access_token=res.access_token USER.access_token=res.access_token
FILE.save(USER,"conf/account") FILE.save(USER,"conf/user")
SCN.swapTo("netgame") SCN.swapTo("netgame")
else else
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn") LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")

View File

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