@@ -26,7 +26,7 @@ local trackNames=trackNames
26
26
local getHitLV = getHitLV
27
27
local function _showVolMes (v )
28
28
needSaveSetting = true
29
- MSG . new (' info' ,(' $1%' ):repD ((' %d' ):format (v * 100 )),0 )
29
+ MSG (' info' ,(' $1%' ):repD ((' %d' ):format (v * 100 )),0 )
30
30
end
31
31
32
32
local autoPlayTextObj
@@ -66,7 +66,7 @@ local game={
66
66
67
67
touches = {},
68
68
hitParticles = (function ()
69
- local p = gc .newParticleSystem (GC .load {1 , 1 ,{' clear' ,1 ,1 ,1 ,.6 }},1000 )
69
+ local p = gc .newParticleSystem (GC .load {w = 1 , h = 1 ,{' clear' ,1 ,1 ,1 ,.6 }},1000 )
70
70
p :setColors (1 ,1 ,1 ,1 ,1 ,1 ,1 ,.26 ,1 ,1 ,1 ,0 )
71
71
p :setSizes (10 ,4 ,2 ,1 )
72
72
p :setParticleLifetime (.5 ,1 )
@@ -96,9 +96,9 @@ local function _tryGoResult()
96
96
if game .needSaveSetting then saveSettings () end
97
97
if game .fullAcc > 0 and game .curAcc / game .fullAcc >= .6 then
98
98
_updateStat ()
99
- MSG . new (' check' ,Text .validScore :repD (os.date (' %Y-%m-%d %H:%M' )),6.26 )
99
+ MSG (' check' ,Text .validScore :repD (os.date (' %Y-%m-%d %H:%M' )),6.26 )
100
100
else
101
- MSG . new (' info' ,Text .invalidScore )
101
+ MSG (' info' ,Text .invalidScore )
102
102
end
103
103
applyClickFX (SET .clickFX )
104
104
SCN .swapTo (' result' ,nil ,{
@@ -148,8 +148,8 @@ local function callScriptEvent(event,...)
148
148
if love .timer .getTime ()- lastErrorTime [event ]>= 0.626 then
149
149
lastErrorTime [event ]= love .timer .getTime ()
150
150
err = err :gsub (' %b[]:' ,' ' )
151
- MSG . new (' error' ,(" <$1>$2:$3" ):repD (event ,err :match (' ^%d+' ),err :sub (err :find (' :' )+ 1 )))
152
- -- MSG.new ('error',err)
151
+ MSG (' error' ,(" <$1>$2:$3" ):repD (event ,err :match (' ^%d+' ),err :sub (err :find (' :' )+ 1 )))
152
+ -- MSG('error',err)
153
153
end
154
154
end
155
155
end
@@ -212,7 +212,7 @@ function scene.load()
212
212
if love .filesystem .getInfo (dirPath .. game .map .songFile ) then
213
213
BGM .load (game .map .qbpFilePath ,dirPath .. game .map .songFile )
214
214
elseif game .map .songFile ~= " [songFile]" then
215
- MSG . new (' error' ," <file>" .. Text .noFile )
215
+ MSG (' error' ," <file>" .. Text .noFile )
216
216
end
217
217
BGM .play (game .map .qbpFilePath ,' -preLoad' )
218
218
@@ -233,14 +233,14 @@ function scene.load()
233
233
local _
234
234
_ ,err = pcall (func )
235
235
if err then
236
- MSG . new (' error' ," <firstrun>" .. err )
236
+ MSG (' error' ," <firstrun>" .. err )
237
237
end
238
238
else
239
239
err = err :gsub (' %b[]:' ,' ' )
240
- MSG . new (' error' ,(" <syntax>$1:$2" ):repD (err :match (' ^%d+' ),err :sub (err :find (' :' )+ 1 )))
240
+ MSG (' error' ,(" <syntax>$1:$2" ):repD (err :match (' ^%d+' ),err :sub (err :find (' :' )+ 1 )))
241
241
end
242
242
else
243
- MSG . new (' error' ," <file>" .. Text .noFile )
243
+ MSG (' error' ," <file>" .. Text .noFile )
244
244
end
245
245
end
246
246
callScriptEvent (' init' )
@@ -252,7 +252,7 @@ function scene.load()
252
252
local success
253
253
success ,image = pcall (gc .newImage ,dirPath .. game .map .songImage )
254
254
if not success then
255
- MSG . new (' error' ," <file>" .. Text .noFile )
255
+ MSG (' error' ," <file>" .. Text .noFile )
256
256
image = nil
257
257
end
258
258
end
@@ -379,7 +379,7 @@ function scene.keyDown(key,isRep)
379
379
BGM .stop ()
380
380
scene .load ()
381
381
else
382
- MSG . new (' error' ,errmsg )
382
+ MSG (' error' ,errmsg )
383
383
end
384
384
elseif k == ' sfxVolDn' then SET .sfxVol = max (SET .sfxVol - .1 ,0 );_showVolMes (SET .sfxVol )
385
385
elseif k == ' sfxVolUp' then SET .sfxVol = min (SET .sfxVol + .1 ,1 );_showVolMes (SET .sfxVol )
@@ -388,18 +388,18 @@ function scene.keyDown(key,isRep)
388
388
elseif k == ' dropSpdDn' then
389
389
if game .score0 == 0 or game .curAcc ==- 1e99 then
390
390
SET .dropSpeed = max (SET .dropSpeed - 1 ,- 8 )
391
- MSG . new (' info' ,Text .dropSpeedChanged :repD (SET .dropSpeed ),0 )
391
+ MSG (' info' ,Text .dropSpeedChanged :repD (SET .dropSpeed ),0 )
392
392
game .needSaveSetting = true
393
393
else
394
- MSG . new (' warn' ,Text .cannotAdjustDropSpeed ,0 )
394
+ MSG (' warn' ,Text .cannotAdjustDropSpeed ,0 )
395
395
end
396
396
elseif k == ' dropSpdUp' then
397
397
if game .score0 == 0 or game .curAcc ==- 1e99 then
398
398
SET .dropSpeed = min (SET .dropSpeed + 1 ,8 )
399
- MSG . new (' info' ,Text .dropSpeedChanged :repD (SET .dropSpeed ),0 )
399
+ MSG (' info' ,Text .dropSpeedChanged :repD (SET .dropSpeed ),0 )
400
400
game .needSaveSetting = true
401
401
else
402
- MSG . new (' warn' ,Text .cannotAdjustDropSpeed ,0 )
402
+ MSG (' warn' ,Text .cannotAdjustDropSpeed ,0 )
403
403
end
404
404
elseif k == ' escape' then
405
405
if _tryGoResult () then
@@ -709,9 +709,9 @@ function scene.draw()
709
709
setFont (50 ,' mono' )
710
710
if game .bestChain == 5 then
711
711
SCC [3 ]= (1 - game .time / game .songLength )^ .26
712
- GC .shadedPrint ( game . combo , 0 , 0 , ' center ' ,1 ,8 , chainColors [game .bestChain ],SCC )
712
+ GC .strokePrint ( ' full ' ,1 ,chainColors [game .bestChain ],SCC , game . combo , 0 , 0 , nil , ' center ' )
713
713
else
714
- GC .shadedPrint ( game . combo , 0 , 0 , ' center ' ,1 ,8 , chainColors [game .bestChain ],COLOR .L )
714
+ GC .strokePrint ( ' full ' ,1 ,chainColors [game .bestChain ],COLOR .L , game . combo , 0 , 0 , nil , ' center ' )
715
715
end
716
716
end
717
717
@@ -748,8 +748,8 @@ function scene.draw()
748
748
gc_setColor (1 ,1 ,1 ,a )
749
749
gc_draw (game .texts .mapName ,0 ,- 260 ,nil ,min (1200 / game .texts .mapName :getWidth (),1 ),1 ,game .texts .mapName :getWidth ()* .5 )
750
750
gc_setColor (.7 ,.7 ,.7 ,a )
751
- GC .mDrawX (game .texts .musicAuth ,0 ,- 160 )
752
- GC .mDrawX (game .texts .mapAuth ,0 ,- 120 )
751
+ GC .draw (game .texts .musicAuth ,- game . texts . musicAuth : getWidth () / 2 ,- 160 )
752
+ GC .draw (game .texts .mapAuth ,- game . texts . mapAuth : getWidth () / 2 ,- 120 )
753
753
end
754
754
755
755
gc_setColor (1 ,1 ,1 )
@@ -777,7 +777,7 @@ function scene.draw()
777
777
end
778
778
779
779
scene .widgetList = {
780
- WIDGET .new {type = ' button' ,pos = {0 ,0 },x = 40 ,y = 60 ,w = 50 , sound_press = ' back' ,text = CHAR .icon .back ,code = WIDGET .c_backScn ()},
781
- WIDGET .new {type = ' button' ,pos = {0 ,0 },x = 100 ,y = 60 ,w = 50 ,sound_press = ' key' ,text = CHAR .icon .retry ,code = WIDGET .c_pressKey ' restart' },
780
+ WIDGET .new {type = ' button' ,pos = {0 ,0 },x = 40 ,y = 60 ,w = 50 , sound_press = ' back' ,text = CHAR .icon .back ,onClick = WIDGET .c_backScn ()},
781
+ WIDGET .new {type = ' button' ,pos = {0 ,0 },x = 100 ,y = 60 ,w = 50 ,sound_press = ' key' ,text = CHAR .icon .retry ,onClick = WIDGET .c_pressKey ' restart' },
782
782
}
783
783
return scene
0 commit comments