Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8f57f5a1c |
BIN
BGM/chlorine.ogg
Normal file
BIN
BGM/chlorine.ogg
Normal file
Binary file not shown.
14
conf.lua
14
conf.lua
@@ -1,10 +1,10 @@
|
||||
gameVersion="Alpha V0.8.8"
|
||||
gameVersion="Alpha V0.8.9"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Save directory name
|
||||
t.identity="Techmino"--SaveDir name
|
||||
t.version="11.1"
|
||||
t.console=false
|
||||
t.gammacorrect=false
|
||||
t.appendidentity=false--Search files in source before save directory
|
||||
t.appendidentity=true--Search files in source before save directory
|
||||
t.accelerometerjoystick=false--ios/android加速度计=摇杆
|
||||
t.audio.mixwithsystem=true
|
||||
|
||||
@@ -18,11 +18,11 @@ function love.conf(t)
|
||||
W.fullscreentype="desktop"--"exclusive"
|
||||
W.fullscreen=false
|
||||
W.vsync=0--0:∞fps
|
||||
W.msaa=false--The number of samples to use with multi-sampled antialiasing (number)
|
||||
W.depth=0--Bits per sample in the depth buffer
|
||||
W.stencil=1--Bits per sample in the stencil buffer
|
||||
W.msaa=false--num of samples to use with multi-sampled antialiasing
|
||||
W.depth=0--bits/samp of depth buffer
|
||||
W.stencil=1--bits/samp of stencil buffer
|
||||
W.display=1--Monitor ID
|
||||
W.highdpi=false--Enable high-dpi mode for the window on a Retina display (boolean)
|
||||
W.highdpi=false--High-dpi mode for the window on a Retina display
|
||||
W.x,W.y=nil
|
||||
|
||||
local M=t.modules
|
||||
|
||||
@@ -22,7 +22,12 @@ function AITemplate(type,speedLV,next,hold,node)
|
||||
end
|
||||
-------------------------<Events>-------------------------
|
||||
local function gameOver()
|
||||
saveStat()
|
||||
local M=curMode
|
||||
if M.pauseLimit and(pauseCount==1 and pauseTime>2.6 or pauseTime>6.26)then
|
||||
TEXT(text.invalidGame,640,260,80,"flicker",.5)
|
||||
return
|
||||
end
|
||||
local R=M.getRank
|
||||
if R then
|
||||
local P=players[1]
|
||||
@@ -36,8 +41,8 @@ local function gameOver()
|
||||
local m=M.unlock[i]
|
||||
modeRanks[m]=modes[m].score and 0 or 6
|
||||
end
|
||||
saveUnlock()
|
||||
end
|
||||
saveUnlock()
|
||||
end
|
||||
local D=M.score(P)
|
||||
local L=M.records
|
||||
|
||||
275
file.lua
Normal file
275
file.lua
Normal file
@@ -0,0 +1,275 @@
|
||||
local fs=love.filesystem
|
||||
local int,max,min=math.floor,math.max,math.min
|
||||
local sub,find=string.sub,string.find
|
||||
local toN,toS=tonumber,tostring
|
||||
local concat=table.concat
|
||||
|
||||
local function splitS(s,sep)
|
||||
local t,n={},1
|
||||
repeat
|
||||
local p=find(s,sep)or #s+1
|
||||
t[n]=sub(s,1,p-1)
|
||||
n=n+1
|
||||
s=sub(s,p+#sep)
|
||||
until #s==0
|
||||
return t
|
||||
end
|
||||
|
||||
function loadRecord(N)
|
||||
local F=fs.newFile(N..".dat")
|
||||
if F:open("r")then
|
||||
local s=loadstring(F:read())
|
||||
local T={}
|
||||
setfenv(s,T)
|
||||
T[1]=s()
|
||||
return T[1]
|
||||
end
|
||||
end
|
||||
local function dumpTable(L)
|
||||
local s="{\n"
|
||||
for k,v in next,L do
|
||||
local T
|
||||
T=type(k)
|
||||
if T=="number"then k="["..k.."]="
|
||||
elseif T=="string"then k=k.."="
|
||||
else error("Error data type!")
|
||||
end
|
||||
T=type(v)
|
||||
if T=="number"then v=tostring(v)
|
||||
elseif T=="string"then v="\""..v.."\""
|
||||
elseif T=="table"then v=dumpTable(v)
|
||||
else error("Error data type!")
|
||||
end
|
||||
s=s..k..v..",\n"
|
||||
end
|
||||
return s.."}"
|
||||
end
|
||||
function saveRecord(N,L)
|
||||
local F=fs.newFile(N..".dat")
|
||||
F:open("w")
|
||||
local _=F:write("return"..dumpTable(L))
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.recSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
function delRecord(N)
|
||||
fs.remove(N..".dat")
|
||||
end
|
||||
|
||||
function saveUnlock()
|
||||
local t={}
|
||||
local RR=modeRanks
|
||||
for i=1,#RR do
|
||||
t[i]=RR[i]or"X"
|
||||
end
|
||||
t=concat(t,",")
|
||||
local F=FILE.unlock
|
||||
F:open("w")
|
||||
local _=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.unlockSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
function loadUnlock()
|
||||
local F=FILE.unlock
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,",")
|
||||
for i=1,#modeRanks do
|
||||
local v=toN(t[i])
|
||||
if not v or v<0 or v>6 or v~=int(v)then v=false end
|
||||
modeRanks[i]=v
|
||||
end
|
||||
end
|
||||
|
||||
local statOpy={
|
||||
"run","game","time",
|
||||
"extraPiece","extraRate",
|
||||
"key","rotate","hold","piece","row",
|
||||
"atk","send","recv","pend",
|
||||
"clear_1","clear_2","clear_3","clear_4",
|
||||
"spin_0","spin_1","spin_2","spin_3",
|
||||
"b2b","b3b","pc","score",
|
||||
}
|
||||
function loadStat()
|
||||
local F=FILE.data
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,"\r\n")
|
||||
for i=1,#t do
|
||||
local p=find(t[i],"=")
|
||||
if p then
|
||||
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||
for i=1,#statOpy do
|
||||
if t==statOpy[i]then
|
||||
v=toN(v)if not v or v<0 then v=0 end
|
||||
stat[t]=v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function saveStat()
|
||||
local t={}
|
||||
for i=1,#statOpy do
|
||||
t[i]=statOpy[i].."="..toS(stat[statOpy[i]])
|
||||
end
|
||||
|
||||
t=concat(t,"\r\n")
|
||||
local F=FILE.data
|
||||
F:open("w")
|
||||
local _=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.statSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
|
||||
function loadSetting()
|
||||
local F=FILE.setting
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,"\r\n")
|
||||
for i=1,#t do
|
||||
local p=find(t[i],"=")
|
||||
if p then
|
||||
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||
if--10档的设置
|
||||
--声音
|
||||
t=="sfx"or t=="bgm"or t=="voc"or t=="stereo"or
|
||||
--三个触摸设置项
|
||||
t=="VKTchW"or t=="VKCurW"or t=="VKAlpha"or
|
||||
--重开时间
|
||||
t=="reTime"
|
||||
then
|
||||
v=toN(v)
|
||||
if v and v==int(v)and v>=0 and v<=10 then
|
||||
setting[t]=v
|
||||
end
|
||||
elseif t=="vib"then
|
||||
setting.vib=toN(v:match("[012345]"))or 0
|
||||
elseif t=="fullscreen"then
|
||||
setting.fullscreen=v=="true"
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
elseif
|
||||
--开关设置们
|
||||
t=="bg"or
|
||||
t=="ghost"or t=="center"or t=="grid"or t=="swap"or
|
||||
t=="quickR"or t=="fine"or t=="bgspace"or t=="smo"or
|
||||
t=="VKSwitch"or t=="VKTrack"or t=="VKDodge"or t=="VKIcon"
|
||||
then
|
||||
setting[t]=v=="true"
|
||||
elseif t=="frameMul"then
|
||||
setting.frameMul=min(max(toN(v)or 100,0),100)
|
||||
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
|
||||
v=toN(v)if not v or v<0 then v=0 end
|
||||
setting[t]=int(v)
|
||||
elseif t=="dropFX"or t=="shakeFX"or t=="atkFX"then
|
||||
setting[t]=toN(v:match("[012345]"))or 0
|
||||
elseif t=="lang"then
|
||||
setting[t]=toN(v:match("[123]"))or 1
|
||||
elseif t=="skin"then
|
||||
setting[t]=toN(v:match("[12345678]"))or 1
|
||||
elseif t=="keymap"then
|
||||
v=splitS(v,"/")
|
||||
for i=1,16 do
|
||||
local v1=splitS(v[i],",")
|
||||
for j=1,#v1 do
|
||||
setting.keyMap[i][j]=v1[j]
|
||||
end
|
||||
end
|
||||
elseif t=="VK"then
|
||||
v=splitS(v,"/")
|
||||
local SK
|
||||
for i=1,#v do
|
||||
if v[i]then
|
||||
SK=splitS(v[i],",")
|
||||
local K=VK_org[i]
|
||||
K.ava=SK[1]=="T"
|
||||
K.x,K.y,K.r=toN(SK[2]),toN(SK[3]),toN(SK[4])
|
||||
end
|
||||
end
|
||||
elseif t=="lastPlay"then
|
||||
v=toN(v)
|
||||
mapCam.lastPlay=v and modeRanks[v]and v or 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local saveOpt={
|
||||
"das","arr",
|
||||
"sddas","sdarr",
|
||||
"reTime",
|
||||
"quickR",
|
||||
"swap",
|
||||
"fine",
|
||||
|
||||
"ghost","center",
|
||||
"smo","grid",
|
||||
"dropFX",
|
||||
"shakeFX",
|
||||
"atkFX",
|
||||
"frameMul",
|
||||
|
||||
"fullscreen",
|
||||
"bg",
|
||||
"bgspace",
|
||||
"lang",
|
||||
"skin",
|
||||
|
||||
"sfx","bgm",
|
||||
"vib","voc",
|
||||
"stereo",
|
||||
|
||||
"VKSwitch",
|
||||
"VKTrack",
|
||||
"VKDodge",
|
||||
"VKTchW",
|
||||
"VKCurW",
|
||||
"VKIcon",
|
||||
"VKAlpha",
|
||||
}
|
||||
function saveSetting()
|
||||
local vk={}--virtualkey table
|
||||
for i=1,#VK_org do
|
||||
local V=VK_org[i]
|
||||
vk[i]=concat({
|
||||
V.ava and"T"or"F",
|
||||
int(V.x+.5),
|
||||
int(V.y+.5),
|
||||
V.r,
|
||||
},",")
|
||||
end--pre-pack virtualkey setting
|
||||
local map={}
|
||||
for i=1,16 do
|
||||
map[i]=concat(setting.keyMap[i],",")
|
||||
end
|
||||
local t={
|
||||
"keymap="..toS(concat(map,"/")),
|
||||
"VK="..toS(concat(vk,"/")),
|
||||
"lastPlay="..mapCam.lastPlay,
|
||||
}
|
||||
for i=1,#saveOpt do
|
||||
t[#t+1]=saveOpt[i].."="..toS(setting[saveOpt[i]])
|
||||
end
|
||||
t=concat(t,"\r\n")
|
||||
local F=FILE.setting
|
||||
F:open("w")
|
||||
local _,mes=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if _ then
|
||||
TEXT(text.settingSaved,370,330,30,"appear")
|
||||
else
|
||||
TEXT(text.settingSavingError.."123",370,350,20,"appear",.3)
|
||||
end
|
||||
end
|
||||
@@ -77,11 +77,11 @@ return{
|
||||
setting_sound="声音设置",
|
||||
musicRoom="音乐室",
|
||||
nowPlaying="正在播放:",
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
statSavingError="数据保存失败:",
|
||||
settingSaved="设置已保存",
|
||||
settingSavingError="设置保存失败:",
|
||||
statSavingError="数据保存失败:",
|
||||
unlockSavingError="解锁保存失败",
|
||||
copySuccess="已复制到剪切板",
|
||||
dataCorrupted="数据损坏",
|
||||
VKTchW="触摸点权重",
|
||||
@@ -90,6 +90,7 @@ return{
|
||||
noScore="暂无成绩",
|
||||
highScore="最佳成绩",
|
||||
newRecord="打破纪录",
|
||||
invalidGame="成绩无效",
|
||||
errorMsg="Techmino遇到了问题,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
|
||||
|
||||
actName=actName,
|
||||
@@ -126,6 +127,8 @@ return{
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"少女折寿中",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"(第一次才准)今日幸运数字:"..math.random(100,626),
|
||||
},
|
||||
@@ -176,12 +179,13 @@ return{
|
||||
warning="禁止直接传播游戏本体",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="言/A",
|
||||
play="开始",
|
||||
setting="设置",
|
||||
music="音乐室",
|
||||
stat="统计信息",
|
||||
help="帮助",
|
||||
qplay="快速开始",
|
||||
lang="言/A",
|
||||
quit="退出",
|
||||
},
|
||||
mode={
|
||||
|
||||
@@ -77,11 +77,11 @@ return{
|
||||
setting_sound="声音设置",
|
||||
musicRoom="音乐室",
|
||||
nowPlaying="正在播放:",
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
statSavingError="数据保存失败:",
|
||||
settingSaved="设置已保存",
|
||||
settingSavingError="设置保存失败:",
|
||||
statSavingError="数据保存失败:",
|
||||
unlockSavingError="解锁保存失败",
|
||||
copySuccess="已复制到剪切板",
|
||||
dataCorrupted="数据损坏",
|
||||
VKTchW="触摸点权重",
|
||||
@@ -90,6 +90,7 @@ return{
|
||||
noScore="暂无成绩",
|
||||
highScore="最佳成绩",
|
||||
newRecord="打破纪录",
|
||||
invalidGame="成绩无效",
|
||||
errorMsg="Techmino遇到了问题,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
|
||||
|
||||
actName=actName,
|
||||
@@ -126,6 +127,8 @@ return{
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"少女折寿中",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"(第一次才准)今日幸运数字:"..math.random(100,626),
|
||||
},
|
||||
@@ -176,12 +179,13 @@ return{
|
||||
warning="禁止直接传播游戏本体",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="言/A",
|
||||
play="开始",
|
||||
setting="设置",
|
||||
music="音乐室",
|
||||
stat="统计信息",
|
||||
help="帮助",
|
||||
qplay="快速开始",
|
||||
lang="言/A",
|
||||
quit="退出",
|
||||
},
|
||||
mode={
|
||||
|
||||
@@ -75,11 +75,11 @@ return{
|
||||
setting_sound="Sound setting",
|
||||
musicRoom="Music Room",
|
||||
nowPlaying="Now Playing:",
|
||||
recSavingError="Failed to save record:",
|
||||
settingSaved="Setting saved",
|
||||
settingSavingError="Failed to save setting:",
|
||||
statSavingError="Failed to save stat:",
|
||||
unlockSavingError="Failed to save unlock:",
|
||||
recSavingError="Failed to save record:",
|
||||
statSavingError="Failed to save stat:",
|
||||
settingSaved="Setting Saved",
|
||||
settingSavingError="Failed to save setting:",
|
||||
copySuccess="Copy Success",
|
||||
dataCorrupted="Data Corrupted",
|
||||
VKTchW="Touch weight",
|
||||
@@ -88,6 +88,7 @@ return{
|
||||
noScore="No Score Yet",
|
||||
highScore="Highscore",
|
||||
newRecord="New Rocord",
|
||||
invalidGame="Invalid Game",
|
||||
errorMsg="Techmino ran into a problem and needs to restart.\nWe collected some error info,and you can send them to author.",
|
||||
|
||||
actName=actName,
|
||||
@@ -125,6 +126,8 @@ return{
|
||||
"Techmino=Technique+Tetromino",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"Headphones for better experience",
|
||||
"少女祈禱中",
|
||||
"少女折壽中",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"(first effective)Your luck number today:"..math.random(100,626),
|
||||
},
|
||||
@@ -175,12 +178,13 @@ Lib used:
|
||||
warning="DO NOT SHARE APP",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="言/A",
|
||||
play="Play",
|
||||
setting="Settings",
|
||||
music="Music room",
|
||||
stat="Statistics",
|
||||
help="Help",
|
||||
qplay="qPlay",
|
||||
lang="言/A",
|
||||
quit="Quit",
|
||||
},
|
||||
mode={
|
||||
|
||||
1
list.lua
1
list.lua
@@ -91,6 +91,7 @@ bgm={
|
||||
"rockblock",
|
||||
"8-bit happiness",
|
||||
"shining terminal",
|
||||
"chlorine",
|
||||
"end",
|
||||
}
|
||||
voiceBank={}--{{srcs1},{srcs2},...}
|
||||
|
||||
44
main.lua
44
main.lua
@@ -28,6 +28,8 @@ scr={x=0,y=0,w=0,h=0,rad=0,k=1}--x,y,wid,hei,radius,scale K
|
||||
local scr=scr
|
||||
mapCam={
|
||||
sel=nil,--selected mode ID
|
||||
lastPlay=1,--last played mode ID
|
||||
|
||||
x=0,y=0,k=1,--camera pos/k
|
||||
x1=0,y1=0,k1=1,--camera pos/k shown
|
||||
--basic paras
|
||||
@@ -71,6 +73,7 @@ require("default_data")
|
||||
require("class")
|
||||
require("ai")
|
||||
require("toolfunc")
|
||||
require("file")
|
||||
require("sound")
|
||||
require("text")
|
||||
require("list")
|
||||
@@ -847,7 +850,7 @@ function love.mousereleased(x,y,k,t,num)
|
||||
if mouseUp[scene.cur]then
|
||||
mouseUp[scene.cur](mx,my,k)
|
||||
end
|
||||
if(mx-lastX)^2+(my-lastY)^2<26 and mouseClick[scene.cur]then
|
||||
if lastX and(mx-lastX)^2+(my-lastY)^2<26 and mouseClick[scene.cur]then
|
||||
mouseClick[scene.cur](mx,my,k)
|
||||
end
|
||||
end
|
||||
@@ -864,9 +867,10 @@ function love.touchpressed(id,x,y)
|
||||
love.touchmoved(id,x,y,0,0)
|
||||
end
|
||||
touchDist=nil--reset distance
|
||||
lastX,lastY=xOy:inverseTransformPoint(x,y)
|
||||
x,y=xOy:inverseTransformPoint(x,y)
|
||||
lastX,lastY=x,y
|
||||
if touchDown[scene.cur]then
|
||||
touchDown[scene.cur](id,lastX,lastY)
|
||||
touchDown[scene.cur](id,x,y)
|
||||
end
|
||||
end
|
||||
function love.touchmoved(id,x,y,dx,dy)
|
||||
@@ -924,8 +928,8 @@ function love.keypressed(i)
|
||||
elseif i=="q"then
|
||||
local W=widget_sel
|
||||
if W then W:getInfo()end
|
||||
elseif i=="e"then
|
||||
error("Error Test")
|
||||
elseif i=="f3"then
|
||||
error("Techmino:挂了")
|
||||
elseif widget_sel then
|
||||
local W=widget_sel
|
||||
if i=="left"then W.x=W.x-10
|
||||
@@ -1024,18 +1028,13 @@ function love.resize(w,h)
|
||||
scr.x,scr.y=(w-h*16/9)*.5,0
|
||||
end
|
||||
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
|
||||
if setting.bgspace then
|
||||
space.resize(w,h)
|
||||
space.new()
|
||||
end
|
||||
if setting.bgspace then space.new()end
|
||||
end
|
||||
function love.focus(f)
|
||||
if system~="Android" and not f and scene.cur=="play"then pauseGame()end
|
||||
end
|
||||
function love.update(dt)
|
||||
if setting.bgspace then
|
||||
space.update()
|
||||
end
|
||||
if setting.bgspace then space.update()end
|
||||
for i=#sysFX,1,-1 do
|
||||
local S=sysFX[i]
|
||||
S[2]=S[2]+1
|
||||
@@ -1100,7 +1099,7 @@ function love.update(dt)
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--播放1,准备2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])--Bug:no voice called Q[2](may fixed)
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
@@ -1113,7 +1112,7 @@ function love.update(dt)
|
||||
Q.s=Q[2]and 2 or 4
|
||||
end
|
||||
elseif Q.s==4 then--最后播放
|
||||
if not Q[1].isPlaying(Q[1])then--Bug:Q[1] is nil
|
||||
if not Q[1].isPlaying(Q[1])then
|
||||
Q[1]=nil
|
||||
Q.s=0
|
||||
end
|
||||
@@ -1146,7 +1145,7 @@ function love.errorhandler(msg)
|
||||
local CAP
|
||||
local function _(_)CAP=gc.newImage(_)end
|
||||
gc.captureScreenshot(_)
|
||||
local T=0
|
||||
local T=true
|
||||
return function()
|
||||
PUMP()
|
||||
for e,a,b in POLL()do
|
||||
@@ -1157,26 +1156,21 @@ function love.errorhandler(msg)
|
||||
destroyPlayers()
|
||||
return"restart"
|
||||
elseif e=="resize"then
|
||||
T=2
|
||||
love.resize(a,b)
|
||||
end
|
||||
end
|
||||
T=T+1
|
||||
if T==1 then
|
||||
if T then
|
||||
if sfx.error then
|
||||
SFX("error",.8)
|
||||
end
|
||||
elseif T==2 then
|
||||
T=false
|
||||
else
|
||||
gc.discard()
|
||||
gc.clear(.3,.5,.9)
|
||||
elseif T==3 then
|
||||
gc.setColor(1,1,1)
|
||||
gc.push("transform")
|
||||
gc.replaceTransform(xOy)
|
||||
gc.draw(CAP,100,365,nil,512/CAP:getWidth(),288/CAP:getHeight())
|
||||
gc.pop()
|
||||
elseif T==4 then
|
||||
gc.push("transform")
|
||||
gc.replaceTransform(xOy)
|
||||
setFont(120)
|
||||
gc.print(":(",100,40)
|
||||
setFont(38)
|
||||
@@ -1242,7 +1236,7 @@ function love.draw()
|
||||
gc.pop()
|
||||
gc.setColor(1,1,1)
|
||||
if powerInfoCanvas then
|
||||
gc.draw(powerInfoCanvas)
|
||||
gc.draw(powerInfoCanvas,0,0,0,scr.k)
|
||||
end--Power Info
|
||||
if scene.swapping then
|
||||
local _=scene.swap
|
||||
|
||||
@@ -45,7 +45,8 @@ return{
|
||||
end,
|
||||
minarr=1,
|
||||
bg="game3",bgm="shining terminal",
|
||||
},
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
players[1].modeData.event="M7"
|
||||
|
||||
@@ -52,6 +52,7 @@ return{
|
||||
end,
|
||||
bg="game3",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -60,7 +60,8 @@ return{
|
||||
end
|
||||
end,
|
||||
bg="game4",bgm="shining terminal",
|
||||
},
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -22,7 +22,7 @@ return{
|
||||
"All-spin 入门教程",
|
||||
"All-spin Tutorial!",
|
||||
},
|
||||
color=color.grey,
|
||||
color=color.lightGrey,
|
||||
env={
|
||||
drop=1e99,lock=1e99,
|
||||
hold=false,
|
||||
@@ -30,13 +30,15 @@ return{
|
||||
task=nil,
|
||||
bg="game1",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(60)
|
||||
for i=1,5 do
|
||||
mStr("UNFINISHED",120+10*i,100+50*i)
|
||||
setFont(50)
|
||||
for i=1,10 do
|
||||
mStr("UNFINISHED",-126+35*i,60*i-110)
|
||||
mStr("UNFINISHED",626-60*i,60*i-90)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.extraRate}end,
|
||||
|
||||
@@ -24,6 +24,7 @@ return{
|
||||
target=200,
|
||||
bg="glow",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -26,6 +26,7 @@ return{
|
||||
target=200,
|
||||
bg="rgb",bgm="secret7th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -26,6 +26,7 @@ return{
|
||||
target=200,
|
||||
bg="rgb",bgm="secret8th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -25,6 +25,7 @@ return{
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -27,6 +27,7 @@ return{
|
||||
target=200,
|
||||
bg="rgb",bgm="secret7th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -38,8 +38,9 @@ return{
|
||||
drop=5,lock=30,
|
||||
dropPiece=check_c4w,
|
||||
freshLimit=15,ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
bg="rgb",bgm="chlorine",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
local P=players[1]
|
||||
|
||||
@@ -36,8 +36,9 @@ return{
|
||||
drop=30,lock=60,oncehold=false,
|
||||
dropPiece=check_c4w,
|
||||
freshLimit=15,ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
bg="rgb",bgm="chlorine",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
local P=players[1]
|
||||
|
||||
@@ -40,7 +40,8 @@ return{
|
||||
target=10,dropPiece=check_LVup,
|
||||
bg="rgb",bgm="rockblock",
|
||||
},
|
||||
slowmark=true,
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -53,6 +53,7 @@ return{
|
||||
end,
|
||||
bg="game4",bgm="way",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -53,6 +53,7 @@ return{
|
||||
end,
|
||||
bg="game3",bgm="way",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -31,6 +31,7 @@ return{
|
||||
end,
|
||||
bg="game2",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -29,7 +29,8 @@ return{
|
||||
end
|
||||
end,
|
||||
bg="game2",bgm="secret7th",
|
||||
},
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -24,6 +24,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -24,6 +24,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -37,7 +37,8 @@ return{
|
||||
mindas=7,minarr=1,minsdarr=1,
|
||||
bg="strap",bgm="race",
|
||||
},
|
||||
slowmark=true,
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -37,7 +37,8 @@ return{
|
||||
minsdarr=1,
|
||||
bg="strap",bgm="way",
|
||||
},
|
||||
slowmark=true,
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -59,7 +59,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="secret7th",
|
||||
},
|
||||
slowmark=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -63,7 +63,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="strap",bgm="secret8th",
|
||||
},
|
||||
slowmark=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -59,7 +59,7 @@ return{
|
||||
easyFresh=false,bone=true,
|
||||
bg="none",bgm="shining terminal",
|
||||
},
|
||||
slowmark=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -24,6 +24,7 @@ return{
|
||||
ospin=false,
|
||||
bg="rgb",bgm="infinite",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -24,6 +24,7 @@ return{
|
||||
ospin=false,
|
||||
bg="rgb",bgm="infinite",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -23,6 +23,7 @@ return{
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -88,8 +88,9 @@ return{
|
||||
freshLimit=15,
|
||||
dropPiece=newPC,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
bg="rgb",bgm="chlorine",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPC(players[1])
|
||||
|
||||
@@ -71,8 +71,9 @@ return{
|
||||
sequence="none",
|
||||
dropPiece=newPC,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
bg="rgb",bgm="chlorine",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPC(players[1])
|
||||
|
||||
@@ -20,6 +20,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",3))
|
||||
|
||||
@@ -20,6 +20,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",5))
|
||||
|
||||
@@ -20,6 +20,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",7))
|
||||
|
||||
@@ -20,6 +20,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",8))
|
||||
|
||||
@@ -20,6 +20,7 @@ return{
|
||||
freshLimit=15,
|
||||
bg="game2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",9))
|
||||
|
||||
@@ -48,7 +48,7 @@ return{
|
||||
T<=10 and 4 or
|
||||
T<=25 and 3 or
|
||||
T<=40 and 2 or
|
||||
T<=60 and 1 or
|
||||
T<=62 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -47,8 +47,8 @@ return{
|
||||
T<=13 and 5 or
|
||||
T<=18 and 4 or
|
||||
T<=45 and 3 or
|
||||
T<=70 and 2 or
|
||||
T<=100 and 1 or
|
||||
T<=80 and 2 or
|
||||
T<=126 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -44,11 +44,11 @@ return{
|
||||
if P.stat.row<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=25 and 5 or
|
||||
T<=32 and 4 or
|
||||
T<=26 and 5 or
|
||||
T<=32.6 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=62 and 2 or
|
||||
T<=126 and 1 or
|
||||
T<=183 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -33,6 +33,7 @@ return{
|
||||
end,
|
||||
bg="glow",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -38,6 +38,7 @@ return{
|
||||
end,
|
||||
bg="glow",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -34,6 +34,7 @@ return{
|
||||
end,
|
||||
bg="glow",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -38,6 +38,7 @@ return{
|
||||
end,
|
||||
bg="glow",bgm="newera",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -40,6 +40,7 @@ return{
|
||||
end,
|
||||
bg="rgb",bgm="secret7th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -56,17 +56,17 @@ return{
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
if L[n]then
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
||||
else
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,6)-1,2,true,10000))
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
if L[n]then
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
||||
else
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,6)-1,2,true,10000))
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
|
||||
@@ -56,17 +56,17 @@ return{
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
if L[n]then
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,8)))
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
||||
else
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,8)-1,3,true,20000))
|
||||
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
if L[n]then
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,8)))
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
||||
else
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,8)-1,3,true,20000))
|
||||
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
|
||||
@@ -56,17 +56,17 @@ return{
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,8)))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
||||
else
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,8)-1,2,true,10000))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,8)))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
||||
else
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,8)-1,2,true,10000))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
|
||||
@@ -56,17 +56,17 @@ return{
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
||||
else
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,6)-1,3,true,20000))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
||||
else
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,6)-1,3,true,20000))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
|
||||
@@ -56,17 +56,17 @@ return{
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
||||
else
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,6)-1,4,true,30000))
|
||||
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,6)))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
||||
else
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,6)-1,4,true,30000))
|
||||
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
|
||||
@@ -32,6 +32,7 @@ return{
|
||||
ospin=false,
|
||||
bg="matrix",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -32,6 +32,7 @@ return{
|
||||
ospin=false,
|
||||
bg="matrix",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -32,6 +32,7 @@ return{
|
||||
ospin=false,
|
||||
bg="matrix",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
@@ -25,6 +25,7 @@ return{
|
||||
end,
|
||||
bg="matrix",bgm="infinite",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
|
||||
10
paint.lua
10
paint.lua
@@ -79,9 +79,6 @@ local Pnt={BG={}}
|
||||
function Pnt.BG.none()
|
||||
gc.clear(.15,.15,.15)
|
||||
end
|
||||
function Pnt.BG.black()
|
||||
gc.clear()
|
||||
end
|
||||
function Pnt.BG.grey()
|
||||
gc.clear(.3,.3,.3)
|
||||
end
|
||||
@@ -285,7 +282,7 @@ function Pnt.mode()
|
||||
setFont(30)mStr(M.level[lang],1100,50)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(28)gc.printf(M.info[lang],920,110,360,"center")
|
||||
if M.slowmark then
|
||||
if M.slowMark then
|
||||
gc.draw(ctrlSpeedLimit,1230,50,nil,.4)
|
||||
end
|
||||
if M.score then
|
||||
@@ -471,10 +468,13 @@ function Pnt.pause()
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
gc.pop()
|
||||
gc.setColor(1,1,1,pauseTimer*.02)
|
||||
setFont(25)
|
||||
gc.setColor(1,1,1,pauseTimer*.02)
|
||||
if pauseCount>0 then
|
||||
local _=curMode.pauseLimit and(pauseCount==1 and pauseTime>2.6 or pauseTime>6.26)
|
||||
if _ then gc.setColor(1,.4,.4,pauseTimer*.02)end
|
||||
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%0.2f",pauseTime).."s",110,150)
|
||||
if _ then gc.setColor(1,1,1,pauseTimer*.02)end
|
||||
end
|
||||
for i=1,8 do
|
||||
gc.print(text.stat[i+3],110,30*i+270)
|
||||
|
||||
@@ -11,8 +11,8 @@ local function newPlanet()
|
||||
planet.r=r
|
||||
planet.x=W*.5+cos(a)*(R+r)
|
||||
planet.y=H*.5+sin(a)*(R+r)
|
||||
planet.vx=-cos(a+rnd()-.5)*.2
|
||||
planet.vy=-sin(a+rnd()-.5)*.2
|
||||
planet.vx=-cos(a+rnd()-.5)*.126
|
||||
planet.vy=-sin(a+rnd()-.5)*.126
|
||||
planet.R=.7+rnd()*.2
|
||||
planet.G=.7+rnd()*.1
|
||||
end
|
||||
@@ -23,6 +23,7 @@ function space.resize(w,h)
|
||||
W,H=w+100,h+100
|
||||
end
|
||||
function space.new()
|
||||
if not W then space.resize(scr.w,scr.h)end
|
||||
newPlanet()
|
||||
for i=1,2600,5 do
|
||||
local s=0.75*2^(rnd()*1.5)
|
||||
@@ -97,7 +98,7 @@ function space.draw()
|
||||
gc.circle("line",planet.x,planet.y,planet.r+1)
|
||||
gc.setColor(planet.R,planet.G,.6,.5)
|
||||
gc.circle("fill",planet.x,planet.y,planet.r)
|
||||
gc.setColor(1,1,1)
|
||||
gc.setColor(.9,.9,.9)
|
||||
for i=1,2600,5 do
|
||||
local x,y=stars[i+1],stars[i+2]
|
||||
gc.circle("fill",x,y,stars[i])
|
||||
|
||||
@@ -1990,7 +1990,7 @@ function newDemoPlayer(id,x,y,size)
|
||||
|
||||
block=true,
|
||||
visible="show",
|
||||
Fkey=NULL,puzzle=false,ospin=true,
|
||||
Fkey=nil,puzzle=false,ospin=true,
|
||||
freshLimit=1e99,easyFresh=true,
|
||||
target=1e99,dropPiece=NULL,
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ local sceneInit={
|
||||
end
|
||||
end,
|
||||
mode=function()
|
||||
curBG="black"
|
||||
curBG="grey"
|
||||
BGM("blank")
|
||||
destroyPlayers()
|
||||
local cam=mapCam
|
||||
@@ -193,7 +193,6 @@ local backFunc={
|
||||
pause=function()
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
updateStat()
|
||||
saveStat()
|
||||
clearTask("play")
|
||||
end,
|
||||
setting_game= function()saveSetting()end,
|
||||
|
||||
38
timer.lua
38
timer.lua
@@ -96,6 +96,25 @@ end
|
||||
function Tmr.main(dt)
|
||||
players[1]:update(dt)
|
||||
end
|
||||
local function dumpTable(L)
|
||||
local s="{\n"
|
||||
for k,v in next,L do
|
||||
local T
|
||||
T=type(k)
|
||||
if T=="number"then k="["..k.."]="
|
||||
elseif T=="string"then k=k.."="
|
||||
else error("Error data type!")
|
||||
end
|
||||
T=type(v)
|
||||
if T=="number"then v=tostring(v)
|
||||
elseif T=="string"then v="\""..v.."\""
|
||||
elseif T=="table"then v=dumpTable(v)
|
||||
else error("Error data type!")
|
||||
end
|
||||
s=s..k..v..",\n"
|
||||
end
|
||||
return s.."}"
|
||||
end
|
||||
function Tmr.mode(dt)
|
||||
local cam=mapCam
|
||||
local F
|
||||
@@ -106,10 +125,13 @@ function Tmr.mode(dt)
|
||||
if kb.isDown("right","d")then x=x+10*k;F=true end
|
||||
local js1=joysticks[1]
|
||||
if js1 then
|
||||
if js1:isDown("dpup")then y=y-10*k;F=true end
|
||||
if js1:isDown("dpdown")then y=y+10*k;F=true end
|
||||
if js1:isDown("dpleft")then x=x-10*k;F=true end
|
||||
if js1:isDown("dpright")then x=x+10*k;F=true end
|
||||
local k=js1:getAxis(1)
|
||||
if k~="c"then
|
||||
if k=="u"or k=="ul"or k=="ur"then y=y-10*k;F=true end
|
||||
if k=="d"or k=="dl"or k=="dl"then y=y+10*k;F=true end
|
||||
if k=="l"or k=="ul"or k=="dl"then x=x-10*k;F=true end
|
||||
if k=="r"or k=="ur"or k=="dr"then x=x+10*k;F=true end
|
||||
end
|
||||
end
|
||||
if F or cam.keyCtrl and(x-cam.x1)^2+(y-cam.y1)^2>2.6 then
|
||||
if F then
|
||||
@@ -145,9 +167,11 @@ function Tmr.mode(dt)
|
||||
end
|
||||
cam.x,cam.y=x,y
|
||||
--keyboard controlling
|
||||
|
||||
space.scale(.85+k/cam.k1*.15)
|
||||
space.translate((cam.x1/cam.k1-cam.x/k)*.03*k,(cam.y1/cam.k1-cam.y/k)*.03*k)
|
||||
|
||||
if setting.bgspace then
|
||||
space.scale(.85+k/cam.k1*.15)
|
||||
space.translate((cam.x1/cam.k1-cam.x/k)*.03*k,(cam.y1/cam.k1-cam.y/k)*.03*k)
|
||||
end
|
||||
cam.x1=cam.x1*.85+x*.15
|
||||
cam.y1=cam.y1*.85+y*.15
|
||||
cam.k1=cam.k1*.85+k*.15
|
||||
|
||||
291
toolfunc.lua
291
toolfunc.lua
@@ -1,23 +1,10 @@
|
||||
local tm=love.timer
|
||||
local gc=love.graphics
|
||||
local kb=love.keyboard
|
||||
local data=love.data
|
||||
local int,abs,rnd,max,min=math.floor,math.abs,math.random,math.max,math.min
|
||||
local sub,find,format,char,byte=string.sub,string.find,string.format,string.char,string.byte
|
||||
local tm,gc=love.timer,love.graphics
|
||||
local kb,data=love.keyboard,love.data
|
||||
local int,abs,rnd=math.floor,math.abs,math.random
|
||||
local max,min=math.max,math.min
|
||||
local sub,find=string.sub,string.find
|
||||
local format,char,byte=string.format,string.char,string.byte
|
||||
local ins,rem=table.insert,table.remove
|
||||
local toN,toS=tonumber,tostring
|
||||
local concat=table.concat
|
||||
|
||||
local function splitS(s,sep)
|
||||
local t,n={},1
|
||||
repeat
|
||||
local p=find(s,sep)or #s+1
|
||||
t[n]=sub(s,1,p-1)
|
||||
n=n+1
|
||||
s=sub(s,p+#sep)
|
||||
until #s==0
|
||||
return t
|
||||
end
|
||||
|
||||
function toTime(s)
|
||||
if s<60 then
|
||||
@@ -317,6 +304,7 @@ function resumeGame()
|
||||
end
|
||||
function loadGame(M)
|
||||
--rec={}
|
||||
mapCam.lastPlay=M
|
||||
M=modes[M]
|
||||
curMode=M
|
||||
local lang=setting.lang
|
||||
@@ -400,269 +388,4 @@ function gameStart()
|
||||
P.timing=true
|
||||
P.control=true
|
||||
end
|
||||
end
|
||||
local fs=love.filesystem
|
||||
function loadRecord(N)
|
||||
local F=fs.newFile(N..".dat")
|
||||
if F:open("r")then
|
||||
local s=loadstring(F:read())
|
||||
local T={}
|
||||
setfenv(s,T)
|
||||
T[1]=s()
|
||||
return T[1]
|
||||
end
|
||||
end
|
||||
local function dumpTable(L)
|
||||
local s="{\n"
|
||||
for k,v in next,L do
|
||||
local T
|
||||
T=type(k)
|
||||
if T=="number"then k="["..k.."]="
|
||||
elseif T=="string"then k=k.."="
|
||||
else error("Error data type!")
|
||||
end
|
||||
T=type(v)
|
||||
if T=="number"then v=tostring(v)
|
||||
elseif T=="string"then v="\""..v.."\""
|
||||
elseif T=="table"then v=dumpTable(v)
|
||||
else error("Error data type!")
|
||||
end
|
||||
s=s..k..v..",\n"
|
||||
end
|
||||
print(s)
|
||||
print("---")
|
||||
return s.."}"
|
||||
end
|
||||
function saveRecord(N,L)
|
||||
local F=fs.newFile(N..".dat")
|
||||
F:open("w")
|
||||
local _=F:write("return"..dumpTable(L))
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.recSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
function delRecord(N)
|
||||
fs.remove(N..".dat")
|
||||
end
|
||||
|
||||
function saveUnlock()
|
||||
local t={}
|
||||
local RR=modeRanks
|
||||
for i=1,#RR do
|
||||
t[i]=RR[i]or"X"
|
||||
end
|
||||
t=concat(t,",")
|
||||
local F=FILE.unlock
|
||||
F:open("w")
|
||||
local _=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.unlockSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
function loadUnlock()
|
||||
local F=FILE.unlock
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,",")
|
||||
for i=1,#modeRanks do
|
||||
local v=toN(t[i])
|
||||
if not v or v<0 or v>6 or v~=int(v)then v=false end
|
||||
modeRanks[i]=v
|
||||
end
|
||||
end
|
||||
|
||||
local statOpy={
|
||||
"run","game","time",
|
||||
"extraPiece","extraRate",
|
||||
"key","rotate","hold","piece","row",
|
||||
"atk","send","recv","pend",
|
||||
"clear_1","clear_2","clear_3","clear_4",
|
||||
"spin_0","spin_1","spin_2","spin_3",
|
||||
"b2b","b3b","pc","score",
|
||||
}
|
||||
function loadStat()
|
||||
local F=FILE.data
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,"\r\n")
|
||||
for i=1,#t do
|
||||
local p=find(t[i],"=")
|
||||
if p then
|
||||
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||
for i=1,#statOpy do
|
||||
if t==statOpy[i]then
|
||||
v=toN(v)if not v or v<0 then v=0 end
|
||||
stat[t]=v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function saveStat()
|
||||
local t={}
|
||||
for i=1,#statOpy do
|
||||
t[i]=statOpy[i].."="..toS(stat[statOpy[i]])
|
||||
end
|
||||
|
||||
local R={}
|
||||
local RR=modeRanks
|
||||
for i=1,#RR do
|
||||
R[i]=RR[i]or"X"
|
||||
end
|
||||
t[#t+1]="rank="..concat(R,",")
|
||||
--Save unlock infos
|
||||
|
||||
t=concat(t,"\r\n")
|
||||
local F=FILE.data
|
||||
F:open("w")
|
||||
local _=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if not _ then
|
||||
TEXT(text.statSavingError..mes,640,480,40,"appear",.4)
|
||||
end
|
||||
end
|
||||
|
||||
function loadSetting()
|
||||
local F=FILE.setting
|
||||
F:open("r")
|
||||
local t=F:read()
|
||||
F:close()
|
||||
t=splitS(t,"\r\n")
|
||||
for i=1,#t do
|
||||
local p=find(t[i],"=")
|
||||
if p then
|
||||
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||
if--10档的设置
|
||||
--声音
|
||||
t=="sfx"or t=="bgm"or t=="voc"or t=="stereo"or
|
||||
--三个触摸设置项
|
||||
t=="VKTchW"or t=="VKCurW"or t=="VKAlpha"or
|
||||
--重开时间
|
||||
t=="reTime"
|
||||
then
|
||||
v=toN(v)
|
||||
if v and v==int(v)and v>=0 and v<=10 then
|
||||
setting[t]=v
|
||||
end
|
||||
elseif t=="vib"then
|
||||
setting.vib=toN(v:match("[012345]"))or 0
|
||||
elseif t=="fullscreen"then
|
||||
setting.fullscreen=v=="true"
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
elseif
|
||||
--开关设置们
|
||||
t=="bg"or
|
||||
t=="ghost"or t=="center"or t=="grid"or t=="swap"or
|
||||
t=="quickR"or t=="fine"or t=="bgspace"or t=="smo"or
|
||||
t=="VKSwitch"or t=="VKTrack"or t=="VKDodge"or t=="VKIcon"
|
||||
then
|
||||
setting[t]=v=="true"
|
||||
elseif t=="frameMul"then
|
||||
setting.frameMul=min(max(toN(v)or 100,0),100)
|
||||
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
|
||||
v=toN(v)if not v or v<0 then v=0 end
|
||||
setting[t]=int(v)
|
||||
elseif t=="dropFX"or t=="shakeFX"or t=="atkFX"then
|
||||
setting[t]=toN(v:match("[012345]"))or 0
|
||||
elseif t=="lang"then
|
||||
setting[t]=toN(v:match("[123]"))or 1
|
||||
elseif t=="skin"then
|
||||
setting[t]=toN(v:match("[12345678]"))or 1
|
||||
elseif t=="keymap"then
|
||||
v=splitS(v,"/")
|
||||
for i=1,16 do
|
||||
local v1=splitS(v[i],",")
|
||||
for j=1,#v1 do
|
||||
setting.keyMap[i][j]=v1[j]
|
||||
end
|
||||
end
|
||||
elseif t=="VK"then
|
||||
v=splitS(v,"/")
|
||||
local SK
|
||||
for i=1,#v do
|
||||
if v[i]then
|
||||
SK=splitS(v[i],",")
|
||||
local K=VK_org[i]
|
||||
K.ava=SK[1]=="T"
|
||||
K.x,K.y,K.r=toN(SK[2]),toN(SK[3]),toN(SK[4])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local saveOpt={
|
||||
"das","arr",
|
||||
"sddas","sdarr",
|
||||
"reTime",
|
||||
"quickR",
|
||||
"swap",
|
||||
"fine",
|
||||
|
||||
"ghost","center",
|
||||
"smo","grid",
|
||||
"dropFX",
|
||||
"shakeFX",
|
||||
"atkFX",
|
||||
"frameMul",
|
||||
|
||||
"fullscreen",
|
||||
"bg",
|
||||
"bgspace",
|
||||
"lang",
|
||||
"skin",
|
||||
|
||||
"sfx","bgm",
|
||||
"vib","voc",
|
||||
"stereo",
|
||||
|
||||
"VKSwitch",
|
||||
"VKTrack",
|
||||
"VKDodge",
|
||||
"VKTchW",
|
||||
"VKCurW",
|
||||
"VKIcon",
|
||||
"VKAlpha",
|
||||
}
|
||||
function saveSetting()
|
||||
local vk={}--virtualkey table
|
||||
for i=1,#VK_org do
|
||||
local V=VK_org[i]
|
||||
vk[i]=concat({
|
||||
V.ava and"T"or"F",
|
||||
int(V.x+.5),
|
||||
int(V.y+.5),
|
||||
V.r,
|
||||
},",")
|
||||
end--pre-pack virtualkey setting
|
||||
local map={}
|
||||
for i=1,16 do
|
||||
map[i]=concat(setting.keyMap[i],",")
|
||||
end
|
||||
local t={
|
||||
"keymap="..toS(concat(map,"/")),
|
||||
"VK="..toS(concat(vk,"/")),
|
||||
}
|
||||
for i=1,#saveOpt do
|
||||
t[#t+1]=saveOpt[i].."="..toS(setting[saveOpt[i]])
|
||||
end
|
||||
t=concat(t,"\r\n")
|
||||
local F=FILE.setting
|
||||
F:open("w")
|
||||
local _,mes=F:write(t)
|
||||
F:flush()
|
||||
F:close()
|
||||
if _ then
|
||||
TEXT(text.settingSaved,370,330,30,"appear")
|
||||
else
|
||||
TEXT(text.settingSavingError.."123",370,350,20,"appear",.3)
|
||||
end
|
||||
end
|
||||
@@ -27,9 +27,15 @@ Future outlook:
|
||||
CC smarter(think of garbage buffer)
|
||||
game recording
|
||||
new AI:task-Z
|
||||
auto GUI position in any screen size
|
||||
more FXs & 3d features & animations
|
||||
Encrypt source code(compile to byte code)
|
||||
0.8.9:
|
||||
invalid game when pause too much
|
||||
quick play re-added
|
||||
space background little changed
|
||||
bugs fixed
|
||||
0.8.8+:
|
||||
fixed many fatal bugs
|
||||
0.8.8:
|
||||
background now is cool space with planets and stars,not boring falling tetrominos!
|
||||
records with date
|
||||
@@ -38,8 +44,12 @@ Future outlook:
|
||||
new error page and a new voice
|
||||
tiny change in rotate system(JL pistol-spin)
|
||||
marked the modes with limited das/arr
|
||||
better board copy/paste
|
||||
no black side in any screen size
|
||||
an unlock-all easter egg
|
||||
cannot press invisible func key
|
||||
bugs fixed(some mode error)
|
||||
add many fatal bugs
|
||||
0.8.7:
|
||||
better user experience in mode selecting
|
||||
support 2^n G falling speed
|
||||
@@ -62,6 +72,7 @@ Future outlook:
|
||||
new mode:Big Bang
|
||||
button appearance changed
|
||||
better widget performence
|
||||
remove Qplay
|
||||
many bug fixed
|
||||
0.8.4:
|
||||
vocal more natural(important,may cause new bug)
|
||||
|
||||
@@ -139,13 +139,14 @@ local Widget={
|
||||
setting=newButton(370,280,200,160,C.lightBlue, 45,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
|
||||
music= newButton(590,280,200,160,C.lightPurple, 32,function()scene.push()scene.swapTo("music")end, nil,"help"),
|
||||
help= newButton(150,460,200,160,C.lightYellow, 50,function()scene.push()scene.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"quit"),
|
||||
quit= newButton(590,460,200,160,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"lang"),
|
||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(590,460,200,160,C.lightOrange, 43,function()scene.push()loadGame(mapCam.lastPlay)end, nil,"lang"),
|
||||
lang= newButton(150,610,160,100,C.lightGreen, 45,function()
|
||||
setting.lang=setting.lang%#langName+1
|
||||
changeLanguage(setting.lang)
|
||||
TEXT(text.lang,370,610,50,"appear",1.6)
|
||||
end,nil,"play"),
|
||||
end,nil,"quit"),
|
||||
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
||||
},
|
||||
mode={
|
||||
draw= newButton(1100, 440,220,90,C.lightYellow, 40,function()scene.push()scene.swapTo("draw")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||
|
||||
Reference in New Issue
Block a user