puzzleMark素材初始化移出load过程
This commit is contained in:
@@ -57,12 +57,12 @@ return{
|
|||||||
mStr(P.stat.row,69,225)
|
mStr(P.stat.row,69,225)
|
||||||
mText(drawableText.line,69,290)
|
mText(drawableText.line,69,290)
|
||||||
if P.modeData.event==0 then
|
if P.modeData.event==0 then
|
||||||
local m=puzzleMark
|
local mark=TEXTURE.puzzleMark
|
||||||
local F=FIELD[P.modeData.point+1]
|
local F=FIELD[P.modeData.point+1]
|
||||||
for y=1,20 do for x=1,10 do
|
for y=1,20 do for x=1,10 do
|
||||||
local T=F[y][x]
|
local T=F[y][x]
|
||||||
if T~=0 then
|
if T~=0 then
|
||||||
gc.draw(m[T],150+30*x-30+dx,600-30*y+dy)
|
gc.draw(mark[T],150+30*x-30+dx,600-30*y+dy)
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -215,9 +215,10 @@ local function drawNextPreview(P,B)
|
|||||||
local y=int(P.gameEnv.fieldH+1-modf(B.sc[1]))+ceil(P.fieldBeneath/30)
|
local y=int(P.gameEnv.fieldH+1-modf(B.sc[1]))+ceil(P.fieldBeneath/30)
|
||||||
B=B.bk
|
B=B.bk
|
||||||
local x=int(6-#B[1]*.5)
|
local x=int(6-#B[1]*.5)
|
||||||
|
local cross=TEXTURE.puzzleMark[-1]
|
||||||
for i=1,#B do for j=1,#B[1]do
|
for i=1,#B do for j=1,#B[1]do
|
||||||
if B[i][j]then
|
if B[i][j]then
|
||||||
gc_draw(puzzleMark[-1],30*(x+j-2),30*(1-y-i))
|
gc_draw(cross,30*(x+j-2),30*(1-y-i))
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function scene.draw()
|
|||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle("line",-2,-2,304,604)
|
gc.rectangle("line",-2,-2,304,604)
|
||||||
local F=FIELD[1]
|
local F=FIELD[1]
|
||||||
local cross=puzzleMark[-1]
|
local cross=TEXTURE.puzzleMark[-1]
|
||||||
local texture=SKIN.curText
|
local texture=SKIN.curText
|
||||||
for y=1,20 do for x=1,10 do
|
for y=1,20 do for x=1,10 do
|
||||||
local B=F[y][x]
|
local B=F[y][x]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ function scene.draw()
|
|||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle("line",-2,-2,304,604)
|
gc.rectangle("line",-2,-2,304,604)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
local cross=puzzleMark[-1]
|
local cross=TEXTURE.puzzleMark[-1]
|
||||||
local F=FIELD[page]
|
local F=FIELD[page]
|
||||||
local texture=SKIN.curText
|
local texture=SKIN.curText
|
||||||
for y=1,20 do for x=1,10 do
|
for y=1,20 do for x=1,10 do
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ function scene.sceneInit()
|
|||||||
SKIN.getCount(),
|
SKIN.getCount(),
|
||||||
#MODES,
|
#MODES,
|
||||||
1,
|
1,
|
||||||
1,
|
|
||||||
}
|
}
|
||||||
studioLogo=gc.newText(getFont(80),"26F Studio")
|
studioLogo=gc.newText(getFont(80),"26F Studio")
|
||||||
skip=false--If skipped
|
skip=false--If skipped
|
||||||
@@ -78,36 +77,6 @@ function scene.update()
|
|||||||
-- M.icon=gc.newImage("media/image/modeIcon/"..m.icon..".png")
|
-- M.icon=gc.newImage("media/image/modeIcon/"..m.icon..".png")
|
||||||
-- M.icon=gc.newImage("media/image/modeIcon/custom.png")
|
-- M.icon=gc.newImage("media/image/modeIcon/custom.png")
|
||||||
elseif phase==8 then
|
elseif phase==8 then
|
||||||
local function C(x,y)
|
|
||||||
local _=gc.newCanvas(x,y)
|
|
||||||
gc.setCanvas(_)
|
|
||||||
return _
|
|
||||||
end
|
|
||||||
|
|
||||||
puzzleMark={}
|
|
||||||
gc.setLineWidth(3)
|
|
||||||
for i=1,17 do
|
|
||||||
puzzleMark[i]=C(30,30)
|
|
||||||
local _=SKIN.libColor[i]
|
|
||||||
gc.setColor(_[1],_[2],_[3],.6)
|
|
||||||
gc.rectangle("line",5,5,20,20)
|
|
||||||
gc.rectangle("line",10,10,10,10)
|
|
||||||
end
|
|
||||||
for i=18,24 do
|
|
||||||
puzzleMark[i]=C(30,30)
|
|
||||||
gc.setColor(SKIN.libColor[i])
|
|
||||||
gc.rectangle("line",7,7,16,16)
|
|
||||||
end
|
|
||||||
local _=C(30,30)
|
|
||||||
gc.setColor(1,1,1)
|
|
||||||
gc.line(5,5,25,25)
|
|
||||||
gc.line(5,25,25,5)
|
|
||||||
puzzleMark[-1]=C(30,30)
|
|
||||||
gc.setColor(1,1,1,.8)
|
|
||||||
gc.draw(_)
|
|
||||||
_:release()
|
|
||||||
gc.setCanvas()
|
|
||||||
elseif phase==9 then
|
|
||||||
SKIN.change(SETTING.skinSet)
|
SKIN.change(SETTING.skinSet)
|
||||||
if newVersionLaunch then--Delete old ranks & Unlock modes which should be unlocked
|
if newVersionLaunch then--Delete old ranks & Unlock modes which should be unlocked
|
||||||
for name,rank in next,RANKS do
|
for name,rank in next,RANKS do
|
||||||
|
|||||||
@@ -27,6 +27,30 @@ for i=1,29 do
|
|||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
TEXTURE.puzzleMark={}
|
||||||
|
gc.setLineWidth(3)
|
||||||
|
for i=1,17 do
|
||||||
|
TEXTURE.puzzleMark[i]=C(30,30)
|
||||||
|
local _=SKIN.libColor[i]
|
||||||
|
gc.setColor(_[1],_[2],_[3],.6)
|
||||||
|
gc.rectangle("line",5,5,20,20)
|
||||||
|
gc.rectangle("line",10,10,10,10)
|
||||||
|
end
|
||||||
|
for i=18,24 do
|
||||||
|
TEXTURE.puzzleMark[i]=C(30,30)
|
||||||
|
gc.setColor(SKIN.libColor[i])
|
||||||
|
gc.rectangle("line",7,7,16,16)
|
||||||
|
end
|
||||||
|
local _=C(30,30)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
gc.line(5,5,25,25)
|
||||||
|
gc.line(5,25,25,5)
|
||||||
|
TEXTURE.puzzleMark[-1]=C(30,30)
|
||||||
|
gc.setColor(1,1,1,.8)
|
||||||
|
gc.draw(_)
|
||||||
|
_:release()
|
||||||
|
gc.setCanvas()
|
||||||
|
|
||||||
TEXTURE.mapCross=C(40,40)
|
TEXTURE.mapCross=C(40,40)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
|
|||||||
Reference in New Issue
Block a user