diff --git a/Zframework/init.lua b/Zframework/init.lua index 95fc5e11..f95eabe6 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -479,7 +479,7 @@ function love.run() BG.update(dt) SYSFX.update(dt) TEXT.update() - if SCN.Tmr then SCN.Tmr(dt)end--Scene Updater + if SCN.update then SCN.update(dt)end--Scene Updater if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation WIDGET.update()--Widgets animation LOG.update() @@ -497,7 +497,7 @@ function love.run() gc.replaceTransform(xOy) --Draw scene contents - if SCN.Pnt then SCN.Pnt()end + if SCN.draw then SCN.draw()end --Draw widgets WIDGET.draw() diff --git a/Zframework/scene.lua b/Zframework/scene.lua index 3fbef242..eaf39a3a 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -18,8 +18,8 @@ local SCN={ seq={"quit","slowFade"},--Back sequence --Events - Tmr=nil, - Pnt=nil, + update=nil, + draw=nil, mouseClick=nil, touchClick=nil, mouseDown=nil, @@ -57,8 +57,8 @@ function SCN.init(s,org) local S=scenes[s] SCN.sceneInit=S.sceneInit SCN.sceneBack=S.sceneBack - SCN.Tmr=S.Tmr - SCN.Pnt=S.Pnt + SCN.update=S.update + SCN.draw=S.draw SCN.mouseClick=S.mouseClick SCN.touchClick=S.touchClick SCN.mouseDown=S.mouseDown diff --git a/parts/scenes/calculator.lua b/parts/scenes/calculator.lua index b9d607c1..46dcde83 100644 --- a/parts/scenes/calculator.lua +++ b/parts/scenes/calculator.lua @@ -114,7 +114,7 @@ function scene.keyDown(k) end end -function scene.Pnt() +function scene.draw() local S=sceneTemp gc.setColor(1,1,1) gc.setLineWidth(4) diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index fe21de54..5b0b8ad4 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -104,7 +104,7 @@ function scene.keyDown(key) end end -function scene.Pnt() +function scene.draw() --Field content if sceneTemp.initField then gc.push("transform") diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index c56e0a63..da08a3dc 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -152,11 +152,11 @@ function scene.keyDown(key) S.x,S.y,S.pen=sx,sy,pen end -function scene.Tmr() +function scene.update() if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end end -function scene.Pnt() +function scene.draw() local S=sceneTemp local sx,sy=S.x,S.y diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index 93e1fad7..80a23f9f 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -113,11 +113,11 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end end -function scene.Pnt() +function scene.draw() local S=sceneTemp --Draw frame diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index 492f8c6b..5f8a3877 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -111,11 +111,11 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end end -function scene.Pnt() +function scene.draw() local S=sceneTemp --Draw frame diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 5d09117e..b03740f9 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -103,7 +103,7 @@ function scene.keyDown(key) S.url=(S.result[1]and S.result or S.dict)[S.select][5] end -function scene.Tmr(dt) +function scene.update(dt) local S=sceneTemp if S.waiting>0 then S.waiting=S.waiting-dt @@ -123,7 +123,7 @@ local typeColor={ english=COLOR.green, name=COLOR.lPurple, } -function scene.Pnt() +function scene.draw() local S=sceneTemp gc.setLineWidth(4) diff --git a/parts/scenes/help.lua b/parts/scenes/help.lua index a391eed7..4e96864a 100644 --- a/parts/scenes/help.lua +++ b/parts/scenes/help.lua @@ -9,7 +9,7 @@ function scene.sceneInit() BG.set("space") end -function scene.Pnt() +function scene.draw() setFont(20) gc.setColor(1,1,1) for i=1,#text.help do diff --git a/parts/scenes/history.lua b/parts/scenes/history.lua index 9d2f40c2..4c2348d8 100644 --- a/parts/scenes/history.lua +++ b/parts/scenes/history.lua @@ -47,7 +47,7 @@ function scene.keyDown(key) end end -function scene.Pnt() +function scene.draw() gc.setColor(.2,.2,.2,.7) gc.rectangle("fill",30,45,1000,632) gc.setColor(1,1,1) diff --git a/parts/scenes/intro.lua b/parts/scenes/intro.lua index a8ec19eb..f8b39f7b 100644 --- a/parts/scenes/intro.lua +++ b/parts/scenes/intro.lua @@ -48,7 +48,7 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() local S=sceneTemp S.t1=S.t1+1 S.t2=S.t2+1 @@ -73,7 +73,7 @@ local titleTransform={ gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2) end, } -function scene.Pnt() +function scene.draw() local S=sceneTemp local T=(S.t1+110)%300 if T<30 then diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index 32363707..884357c3 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -49,7 +49,7 @@ function scene.touchDown() end end -function scene.Tmr() +function scene.update() local S=sceneTemp if S.time==400 then return end repeat @@ -148,7 +148,7 @@ function scene.Tmr() until not S.skip end -function scene.Pnt() +function scene.draw() local S=sceneTemp gc.push("transform") diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index b6ccd4b3..847f6d70 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -16,12 +16,12 @@ function scene.sceneInit() PLY.newDemoPlayer(1,900,35,1.1) end -function scene.Tmr(dt) +function scene.update(dt) GAME.frame=GAME.frame+1 PLAYERS[1]:update(dt) end -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) gc.draw(IMG.title_color,60,30,nil,1.3) setFont(30) diff --git a/parts/scenes/mg_15p.lua b/parts/scenes/mg_15p.lua index 1c449f03..5373caae 100644 --- a/parts/scenes/mg_15p.lua +++ b/parts/scenes/mg_15p.lua @@ -192,7 +192,7 @@ function scene.touchMove(_,x,y) end end -function scene.Tmr() +function scene.update() local S=sceneTemp if S.state==1 then S.time=Timer()-S.startTime @@ -263,7 +263,7 @@ local backColor={ COLOR.black,COLOR.black,COLOR.black,COLOR.black, },--Black } -function scene.Pnt() +function scene.draw() local S=sceneTemp setFont(40) diff --git a/parts/scenes/mg_AtoZ.lua b/parts/scenes/mg_AtoZ.lua index c01d604a..89127cdf 100644 --- a/parts/scenes/mg_AtoZ.lua +++ b/parts/scenes/mg_AtoZ.lua @@ -78,7 +78,7 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() local S=sceneTemp if S.state==1 then S.frameKeyCount=0 @@ -86,7 +86,7 @@ function scene.Tmr() end end -function scene.Pnt() +function scene.draw() local S=sceneTemp setFont(40) diff --git a/parts/scenes/mg_UTTT.lua b/parts/scenes/mg_UTTT.lua index 6ddddc03..88e147c1 100644 --- a/parts/scenes/mg_UTTT.lua +++ b/parts/scenes/mg_UTTT.lua @@ -101,7 +101,7 @@ function scene.sceneInit() BG.set("bg2") end -function scene.Pnt() +function scene.draw() gc.push("transform") --origin pos:0,140; scale:4 gc.translate(280,0) diff --git a/parts/scenes/mg_cubefield.lua b/parts/scenes/mg_cubefield.lua index 9f0da3e9..c1788a75 100644 --- a/parts/scenes/mg_cubefield.lua +++ b/parts/scenes/mg_cubefield.lua @@ -126,7 +126,7 @@ function scene.keyUp(key) end end -function scene.Tmr(dt) +function scene.update(dt) dt=dt*600 --Update cubes' position @@ -189,7 +189,7 @@ function scene.Tmr(dt) end end -function scene.Pnt() +function scene.draw() --Health bar if life1>0 then gc.setColor(1,0,0) diff --git a/parts/scenes/mg_pong.lua b/parts/scenes/mg_pong.lua index daafa33a..4f79af0b 100644 --- a/parts/scenes/mg_pong.lua +++ b/parts/scenes/mg_pong.lua @@ -71,7 +71,7 @@ function scene.mouseMove(x,y) end --Rect Area X:150~1130 Y:20~700 -function scene.Tmr() +function scene.update() local S=sceneTemp --Update pads @@ -148,7 +148,7 @@ function scene.Tmr() S.x,S.y,S.vx,S.vy,S.ry=x,y,vx,vy,ry end -function scene.Pnt() +function scene.draw() local S=sceneTemp --Draw score diff --git a/parts/scenes/mg_schulteG.lua b/parts/scenes/mg_schulteG.lua index c4923587..a2912ae0 100644 --- a/parts/scenes/mg_schulteG.lua +++ b/parts/scenes/mg_schulteG.lua @@ -114,14 +114,14 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() local S=sceneTemp if S.state==1 then S.time=Timer()-S.startTime+S.error end end -function scene.Pnt() +function scene.draw() local S=sceneTemp setFont(40) diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index 8365f5b1..b9f8c3b8 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -93,7 +93,7 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() for _,M in next,MODOPT do if M.sel==0 then if M.time>0 then @@ -106,7 +106,7 @@ function scene.Tmr() end end end -function scene.Pnt() +function scene.draw() setFont(40) gc.setLineWidth(5) for _,M in next,MODOPT do diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index 3f93f09c..f9ea2d9a 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -133,7 +133,7 @@ function scene.keyDown(key) end end -function scene.Tmr() +function scene.update() local dx,dy=0,0 local F if not SCN.swapping then @@ -187,7 +187,7 @@ function scene.Tmr() end end -function scene.Pnt() +function scene.draw() local _ gc.push("transform") gc.translate(640,360) diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index 47415b01..3a8e5a16 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -66,7 +66,7 @@ function scene.keyDown(key) end end -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) setFont(50) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index a2506ca6..fc1cf0de 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -143,7 +143,7 @@ function scene.keyDown(key) end end -function scene.Tmr(dt) +function scene.update(dt) if not GAME.result then GAME.pauseTime=GAME.pauseTime+dt end @@ -156,10 +156,10 @@ local hexList={1,0,.5,1.732*.5,-.5,1.732*.5} for i=1,6 do hexList[i]=hexList[i]*150 end local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25} local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13} -function scene.Pnt() +function scene.draw() local S=sceneTemp local T=S.timer*.02 - if T<1 or GAME.result then SCN.scenes.play.Pnt()end + if T<1 or GAME.result then SCN.scenes.play.draw()end --Dark BG local _=T diff --git a/parts/scenes/play.lua b/parts/scenes/play.lua index 6b527c80..76da66ac 100644 --- a/parts/scenes/play.lua +++ b/parts/scenes/play.lua @@ -145,7 +145,7 @@ function scene.gamepadUp(key) end end -function scene.Tmr(dt) +function scene.update(dt) local _ local P1=PLAYERS[1] local GAME=GAME @@ -294,7 +294,7 @@ local function drawVirtualkey() end end end -function scene.Pnt() +function scene.draw() if MARKING then setFont(25) local t=Timer() diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 20ae3363..5a1a7b95 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -14,7 +14,7 @@ function scene.sceneInit() BG.set("bg1") end -function scene.Tmr() +function scene.update() local T=sceneTemp if T.wait>0 then T.wait=T.wait-1 @@ -54,7 +54,7 @@ function scene.Tmr() end end -function scene.Pnt() +function scene.draw() --Testing grid line gc.setLineWidth(4) gc.setColor(1,1,1,.4) diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 688b4b9d..8f088142 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -12,7 +12,7 @@ function scene.sceneBack() FILE.save(SETTING,"settings") end -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) gc.draw(SKIN.curText[int(Timer()*2)%16+1],740,540,Timer()%6.28319,2,nil,15,15) end diff --git a/parts/scenes/setting_key.lua b/parts/scenes/setting_key.lua index 9fee39ac..c88b29fd 100644 --- a/parts/scenes/setting_key.lua +++ b/parts/scenes/setting_key.lua @@ -91,7 +91,7 @@ function scene.gamepadDown(key) end end -function scene.Pnt() +function scene.draw() local S=sceneTemp local a=.3+sin(Timer()*15)*.1 if S.kS then gc.setColor(1,.3,.3,a)else gc.setColor(1,.7,.7,a)end diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 4345dc1f..d88b6795 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -4,7 +4,7 @@ local sin=math.sin local scene={} -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) local texture=SKIN.curText for N=1,7 do diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 9c8e5146..18f77736 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -33,14 +33,14 @@ function scene.touchDown(_,x,y) scene.mouseDown(x,y) end -function scene.Tmr() +function scene.update() local t=sceneTemp.jump if t>0 then sceneTemp.jump=t-1 end end -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) local t=Timer() local _=sceneTemp.jump diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index d7592187..80a9da70 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -81,7 +81,7 @@ local function VirtualkeyPreview() end end end -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) gc.setLineWidth(7)gc.rectangle("line",340,15,600,690) gc.setLineWidth(3)gc.rectangle("line",490,85,300,600) diff --git a/parts/scenes/setting_trackSetting.lua b/parts/scenes/setting_trackSetting.lua index 4457a43d..ae2f03a6 100644 --- a/parts/scenes/setting_trackSetting.lua +++ b/parts/scenes/setting_trackSetting.lua @@ -2,7 +2,7 @@ local gc=love.graphics local scene={} -function scene.Pnt() +function scene.draw() gc.setColor(1,1,1) mText(drawableText.VKTchW,140+50*SETTING.VKTchW,260) mText(drawableText.VKOrgW,140+50*SETTING.VKTchW+50*SETTING.VKCurW,320) diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index 0240438d..9773f407 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -39,7 +39,7 @@ function scene.keyDown(k) end end -function scene.Tmr(dt) +function scene.update(dt) local S=sceneTemp if(kb.isDown("space","return")or tc.getTouches()[1])and S.v<6.26 then S.v=S.v+.26 @@ -52,7 +52,7 @@ function scene.Tmr(dt) end end -function scene.Pnt() +function scene.draw() local L=text.staff local t=sceneTemp.time setFont(40) diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 21504b23..661bc1c0 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -45,7 +45,7 @@ function scene.sceneInit() end end -function scene.Pnt() +function scene.draw() local chart=sceneTemp.chart setFont(25) local _,__=SKIN.libColor,SETTING.skin