新模式选择菜单原型
删除模式图标 动态加载所有模式
42
main.lua
@@ -24,7 +24,7 @@ VERSION=require"version"
|
||||
TIME=love.timer.getTime
|
||||
YIELD=coroutine.yield
|
||||
SYSTEM=love.system.getOS()if SYSTEM=='OS X'then SYSTEM='macOS'end
|
||||
FNNS=true or SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
|
||||
FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
|
||||
MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
|
||||
SAVEDIR=fs.getSaveDirectory()
|
||||
|
||||
@@ -112,7 +112,8 @@ BOT= require'parts.bot'
|
||||
RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos
|
||||
PLY= require'parts.player'
|
||||
NETPLY= require'parts.netPlayer'
|
||||
MODES= require'parts.modes'
|
||||
MODETREE= require'parts.modeTree'
|
||||
MODES={}--Loaded modes and information
|
||||
|
||||
setmetatable(TEXTURE,{__index=function(self,k)
|
||||
MES.new('warn',"No texture called: "..k)
|
||||
@@ -255,6 +256,7 @@ IMG.init{
|
||||
speedLimit='media/image/mess/speedLimit.png',--Not used, for future C2-mode
|
||||
pay1='media/image/mess/pay1.png',
|
||||
pay2='media/image/mess/pay2.png',
|
||||
drought='media/image/mess/drought.png',
|
||||
|
||||
miyaCH1='media/image/characters/miya1.png',
|
||||
miyaCH2='media/image/characters/miya2.png',
|
||||
@@ -393,24 +395,6 @@ for _,v in next,fs.getDirectoryItems('parts/scenes')do
|
||||
LANG.addScene(sceneName)
|
||||
end
|
||||
end
|
||||
--Load mode files
|
||||
for i=1,#MODES do
|
||||
local m=MODES[i]--Mode template
|
||||
if isSafeFile('parts/modes/'..m.name)then
|
||||
TABLE.complete(require('parts.modes.'..m.name),MODES[i])
|
||||
MODES[m.name],MODES[i]=MODES[i]
|
||||
end
|
||||
end
|
||||
for _,v in next,fs.getDirectoryItems('parts/modes')do
|
||||
if isSafeFile('parts/modes/'..v)and not MODES[v:sub(1,-5)]then
|
||||
local M={name=v:sub(1,-5)}
|
||||
local modeData=require('parts.modes.'..M.name)
|
||||
if modeData.env then
|
||||
TABLE.complete(modeData,M)
|
||||
MODES[M.name]=M
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
|
||||
|
||||
@@ -534,26 +518,8 @@ do
|
||||
if type(name)=='number'or type(rank)~='number'then
|
||||
RANKS[name]=nil
|
||||
needSave=true
|
||||
else
|
||||
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
|
||||
needSave=true
|
||||
end
|
||||
end
|
||||
end
|
||||
if not(M and M.x)then
|
||||
RANKS[name]=nil
|
||||
needSave=true
|
||||
end
|
||||
end
|
||||
end
|
||||
if not MODES[STAT.lastPlay]then
|
||||
STAT.lastPlay='sprint_10l'
|
||||
needSave=true
|
||||
end
|
||||
|
||||
if needSave then
|
||||
saveStats()
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 534 B |
|
Before Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 483 B |
|
Before Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 464 B |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 457 B |
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -28,7 +28,7 @@ return{
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
mDraw(IMG.drought,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -28,7 +28,7 @@ return{
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
mDraw(IMG.drought,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -28,7 +28,7 @@ return{
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
mDraw(IMG.drought,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -94,7 +94,8 @@ do--function loadFile(name,args), function saveFile(data,name,args)
|
||||
end
|
||||
end
|
||||
function isSafeFile(file,mes)
|
||||
if love.filesystem.getRealDirectory(file)~=SAVEDIR then
|
||||
local path=love.filesystem.getRealDirectory(file)
|
||||
if path and path~=SAVEDIR then
|
||||
return true
|
||||
elseif mes then
|
||||
MES.new('warn',mes)
|
||||
@@ -491,9 +492,17 @@ end
|
||||
function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
|
||||
freshDate()
|
||||
if legalGameTime()then
|
||||
if not MODES[mode]and love.filesystem.getRealDirectory('parts/modes/'..mode)~=SAVEDIR then
|
||||
MODES[mode]=require('parts.modes.'..mode)
|
||||
MODES[mode].name=mode
|
||||
if not MODES[mode]then
|
||||
if love.filesystem.getInfo('parts/modes/'..mode..'.lua')and love.filesystem.getRealDirectory('parts/modes/'..mode..'.lua')~=SAVEDIR then
|
||||
MODES[mode]=require('parts.modes.'..mode)
|
||||
MODES[mode].name=mode
|
||||
if MODES[mode].score then
|
||||
MODES[mode].records=loadFile("record/"..mode..".rec",'-luaon -canSkip')or{}
|
||||
end
|
||||
else
|
||||
MES.new('error',"No mode called "..mode)
|
||||
return
|
||||
end
|
||||
end
|
||||
if MODES[mode].score then
|
||||
STAT.lastPlay=mode
|
||||
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
loadSample="Loading instrument samples",
|
||||
loadVoice="Loading voice packs",
|
||||
loadFont="Loading fonts",
|
||||
loadModeIcon="Loading mode icons",
|
||||
loadMode="Loading modes",
|
||||
loadOther="Loading other assets",
|
||||
finish="Press any key to start!",
|
||||
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
loadSample="Memuat sampel-sampel instrumen",
|
||||
loadVoice="Memuat kumpulan suara",
|
||||
loadFont="Memuat fon",
|
||||
loadModeIcon="Memuat ikon-ikon mode",
|
||||
loadMode="Memuat mode-mode",
|
||||
loadOther="Memuat aset-aset yang lain",
|
||||
finish="Tekan tombol apapun untuk memulai!",
|
||||
|
||||
@@ -6,7 +6,6 @@ return{
|
||||
loadSample="#~#",
|
||||
loadVoice="#<()==)#",
|
||||
loadFont="#Aa#",
|
||||
loadModeIcon="#[ ]#",
|
||||
loadMode="#[…]#",
|
||||
loadOther="#…#",
|
||||
finish="&",
|
||||
|
||||
@@ -4,7 +4,6 @@ return{fallback='zh',
|
||||
loadSample="乐器",
|
||||
loadVoice="语音",
|
||||
loadFont="字体",
|
||||
loadModeIcon="模式图标",
|
||||
loadMode="模式",
|
||||
loadOther="其他",
|
||||
finish="走你",
|
||||
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
loadSample="加载乐器采样",
|
||||
loadVoice="加载语音资源",
|
||||
loadFont="缓存字体资源",
|
||||
loadModeIcon="加载模式图标",
|
||||
loadMode="加载模式",
|
||||
loadOther="加载杂项",
|
||||
finish="按任意键继续",
|
||||
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
loadSample="装载仪器样品",
|
||||
loadVoice="加载语音包",
|
||||
loadFont="加载字体",
|
||||
loadModeIcon="加载模式图标",
|
||||
loadMode="加载方式",
|
||||
loadOther="加载其他资产",
|
||||
finish="按任意按钮开始!",
|
||||
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
loadSample="加載樂器取樣",
|
||||
loadVoice="加載語音資源",
|
||||
loadFont="加載字體資源",
|
||||
loadModeIcon="加載模式圖標",
|
||||
loadMode="加載模式",
|
||||
loadOther="加載雜項",
|
||||
finish="按任意鍵繼續!",
|
||||
|
||||
160
parts/modeTree.lua
Normal file
@@ -0,0 +1,160 @@
|
||||
return{
|
||||
{folder=true,name='sprint',
|
||||
{name='sprint_10l'},
|
||||
{name='sprint_20l'},
|
||||
{name='sprint_40l'},
|
||||
{name='sprint_100l'},
|
||||
{name='sprint_400l'},
|
||||
{name='sprint_1000l'},
|
||||
},
|
||||
|
||||
{folder=true,name='sprint_special',
|
||||
{name='sprintPenta'},
|
||||
{name='sprintMPH'},
|
||||
{name='sprintSmooth'},
|
||||
{name='sprintMD'},
|
||||
{name='sprintSym'},
|
||||
{name='sprintLock'},
|
||||
{name='sprintFix'},
|
||||
},
|
||||
|
||||
{folder=true,name='drought',
|
||||
{name='drought_n'},
|
||||
{name='drought_l'},
|
||||
},
|
||||
|
||||
{folder=true,name='dig_sprint',
|
||||
{name='dig_10l'},
|
||||
{name='dig_40l'},
|
||||
{name='dig_100l'},
|
||||
{name='dig_400l'},
|
||||
},
|
||||
|
||||
{folder=true,name='marathon',
|
||||
{name='marathon_n'},
|
||||
{name='marathon_h'},
|
||||
{name='master_n'},
|
||||
{name='master_h'},
|
||||
{name='master_m'},
|
||||
{name='master_final'},
|
||||
{name='master_ph'},
|
||||
{name='master_ex'},
|
||||
{name='strategy_e'},
|
||||
{name='strategy_h'},
|
||||
{name='strategy_u'},
|
||||
{name='strategy_e_plus'},
|
||||
{name='strategy_h_plus'},
|
||||
{name='strategy_u_plus'},
|
||||
},
|
||||
|
||||
{folder=true,name='battle',
|
||||
{folder=true,name='solo',
|
||||
{name='solo_e'},
|
||||
{name='solo_n'},
|
||||
{name='solo_h'},
|
||||
{name='solo_l'},
|
||||
{name='solo_u'},
|
||||
},
|
||||
{folder=true,name='round',
|
||||
{name='round_e'},
|
||||
{name='round_n'},
|
||||
{name='round_h'},
|
||||
{name='round_l'},
|
||||
{name='round_u'},
|
||||
},
|
||||
{folder=true,name='techmino',
|
||||
{name='techmino49_e'},
|
||||
{name='techmino49_h'},
|
||||
{name='techmino49_u'},
|
||||
{name='techmino99_e'},
|
||||
{name='techmino99_h'},
|
||||
{name='techmino99_u'},
|
||||
},
|
||||
},
|
||||
|
||||
{folder=true,name='blind',
|
||||
{name='blind_e'},
|
||||
{name='blind_n'},
|
||||
{name='blind_h'},
|
||||
{name='blind_l'},
|
||||
{name='blind_u'},
|
||||
{name='blind_wtf'},
|
||||
},
|
||||
|
||||
{folder=true,name='classic',
|
||||
{name='classic_e'},
|
||||
{name='classic_h'},
|
||||
{name='classic_u'},
|
||||
},
|
||||
|
||||
{folder=true,name='survival',
|
||||
{folder=true,name='survivor',
|
||||
{name='survivor_e'},
|
||||
{name='survivor_n'},
|
||||
{name='survivor_h'},
|
||||
{name='survivor_l'},
|
||||
{name='survivor_u'},
|
||||
},
|
||||
{folder=true,name='attacker',
|
||||
{name='attacker_h'},
|
||||
{name='attacker_u'},
|
||||
},
|
||||
{folder=true,name='defender',
|
||||
{name='defender_n'},
|
||||
{name='defender_l'},
|
||||
},
|
||||
{folder=true,name='dig',
|
||||
{name='dig_h'},
|
||||
{name='dig_u'},
|
||||
},
|
||||
},
|
||||
|
||||
{folder=true,name='train',
|
||||
{name='clearRush'},
|
||||
{name='c4wtrain_n'},
|
||||
{name='c4wtrain_l'},
|
||||
{name='pctrain_n'},
|
||||
{name='pctrain_l'},
|
||||
},
|
||||
|
||||
{folder=true,name='pc',
|
||||
{name='pc_n'},
|
||||
{name='pc_h'},
|
||||
{name='pc_l'},
|
||||
{name='pc_inf'},
|
||||
},
|
||||
|
||||
{folder=true,name='tech',
|
||||
{name='sprintAtk'},
|
||||
{name='sprintEff'},
|
||||
{name='tech_n'},
|
||||
{name='tech_n_plus'},
|
||||
{name='tech_h'},
|
||||
{name='tech_h_plus'},
|
||||
{name='tech_l'},
|
||||
{name='tech_l_plus'},
|
||||
{name='tech_finesse'},
|
||||
{name='tech_finesse_f'},
|
||||
},
|
||||
|
||||
{folder=true,name='tsd',
|
||||
{name='tsd_e'},
|
||||
{name='tsd_h'},
|
||||
{name='tsd_u'},
|
||||
},
|
||||
|
||||
{folder=true,name='backfire',
|
||||
{name='backfire_n'},
|
||||
{name='backfire_h'},
|
||||
{name='backfire_l'},
|
||||
{name='backfire_u'},
|
||||
},
|
||||
|
||||
{folder=true,name='infinite',
|
||||
{name='zen'},
|
||||
{name='ultra'},
|
||||
{name='infinite'},
|
||||
{name='infinite_dig'},
|
||||
{name='marathon_inf'},
|
||||
},
|
||||
}
|
||||
119
parts/modes.lua
@@ -1,119 +0,0 @@
|
||||
return{
|
||||
{name='sprint_10l', x=0, y=0, size=40,shape=1,icon="sprint1", unlock={'sprint_20l','sprint_40l'}},
|
||||
{name='sprint_20l', x=-200, y=200, size=50,shape=1,icon="sprint1"},
|
||||
{name='sprint_40l', x=0, y=-300, size=40,shape=1,icon="sprint2", unlock={'dig_10l','sprint_100l','marathon_n','sprintPenta','sprintMPH'}},
|
||||
{name='sprint_100l', x=-200, y=0, size=50,shape=1,icon="sprint2", unlock={'sprint_400l','drought_n'}},
|
||||
{name='sprint_400l', x=-400, y=0, size=40,shape=1,icon="sprint3", unlock={'sprint_1000l'}},
|
||||
{name='sprint_1000l', x=-600, y=0, size=40,shape=1,icon="sprint3"},
|
||||
|
||||
{name='sprintPenta', x=180, y=-160, size=40,shape=3,icon="sprint2"},
|
||||
{name='sprintMPH', x=220, y=-340, size=40,shape=3,icon="sprint2"},
|
||||
|
||||
{name='drought_n', x=-400, y=200, size=40,shape=1,icon="drought", unlock={'drought_l'}},
|
||||
{name='drought_l', x=-600, y=200, size=40,shape=1,icon="drought"},
|
||||
|
||||
{name='dig_10l', x=-200, y=-200, size=40,shape=1,icon="dig_sprint", unlock={'dig_40l'}},
|
||||
{name='dig_40l', x=-400, y=-200, size=40,shape=1,icon="dig_sprint", unlock={'dig_100l'}},
|
||||
{name='dig_100l', x=-600, y=-200, size=40,shape=1,icon="dig_sprint", unlock={'dig_400l'}},
|
||||
{name='dig_400l', x=-800, y=-200, size=40,shape=1,icon="dig_sprint"},
|
||||
|
||||
{name='marathon_n', x=0, y=-600, size=60,shape=1,icon="marathon", unlock={'marathon_h','solo_e','round_e','blind_e','classic_e','survivor_e','clearRush','zen'}},
|
||||
{name='marathon_h', x=0, y=-800, size=50,shape=1,icon="marathon", unlock={'master_n','strategy_e'}},
|
||||
|
||||
{name='solo_e', x=-600, y=-1000, size=40,shape=1,icon="solo", unlock={'solo_n'}},
|
||||
{name='solo_n', x=-800, y=-1000, size=40,shape=1,icon="solo", unlock={'solo_h'}},
|
||||
{name='solo_h', x=-1000, y=-1000, size=40,shape=1,icon="solo", unlock={'solo_l','techmino49_e'}},
|
||||
{name='solo_l', x=-1200, y=-1000, size=40,shape=1,icon="solo", unlock={'solo_u'}},
|
||||
{name='solo_u', x=-1400, y=-1000, size=40,shape=1,icon="solo"},
|
||||
|
||||
{name='techmino49_e', x=-1100, y=-1200, size=40,shape=1,icon="t49", unlock={'techmino49_h','techmino99_e'}},
|
||||
{name='techmino49_h', x=-1100, y=-1400, size=40,shape=1,icon="t49", unlock={'techmino49_u'}},
|
||||
{name='techmino49_u', x=-1100, y=-1600, size=40,shape=1,icon="t49"},
|
||||
{name='techmino99_e', x=-1300, y=-1400, size=40,shape=1,icon="t99", unlock={'techmino99_h'}},
|
||||
{name='techmino99_h', x=-1300, y=-1600, size=40,shape=1,icon="t99", unlock={'techmino99_u'}},
|
||||
{name='techmino99_u', x=-1300, y=-1800, size=40,shape=1,icon="t99"},
|
||||
|
||||
{name='round_e', x=-600, y=-800, size=40,shape=1,icon="round", unlock={'round_n'}},
|
||||
{name='round_n', x=-800, y=-800, size=40,shape=1,icon="round", unlock={'round_h'}},
|
||||
{name='round_h', x=-1000, y=-800, size=40,shape=1,icon="round", unlock={'round_l'}},
|
||||
{name='round_l', x=-1200, y=-800, size=40,shape=1,icon="round", unlock={'round_u'}},
|
||||
{name='round_u', x=-1400, y=-800, size=40,shape=1,icon="round"},
|
||||
|
||||
{name='master_n', x=0, y=-1000, size=40,shape=1,icon="master", unlock={'master_h','strategy_h'}},
|
||||
{name='master_h', x=0, y=-1200, size=40,shape=3,icon="master", unlock={'master_final','master_ex','master_ph','master_m','strategy_u'}},
|
||||
{name='master_m', x=150, y=-1320, size=30,shape=3,icon="master"},
|
||||
{name='master_final', x=0, y=-1600, size=40,shape=2,icon="master"},
|
||||
{name='master_ph', x=-150, y=-1500, size=40,shape=2,icon="master"},
|
||||
{name='master_ex', x=150, y=-1500, size=40,shape=2,icon="master_ex"},
|
||||
|
||||
{name='strategy_e', x=-150, y=-1030, size=40,shape=3,icon="master"},
|
||||
{name='strategy_h', x=-200, y=-1160, size=35,shape=3,icon="master"},
|
||||
{name='strategy_u', x=-250, y=-1290, size=30,shape=2,icon="master"},
|
||||
|
||||
{name='blind_e', x=150, y=-700, size=40,shape=1,icon="hidden", unlock={'blind_n'}},
|
||||
{name='blind_n', x=150, y=-800, size=40,shape=1,icon="hidden", unlock={'blind_h'}},
|
||||
{name='blind_h', x=150, y=-900, size=35,shape=1,icon="hidden", unlock={'blind_l'}},
|
||||
{name='blind_l', x=150, y=-1000, size=35,shape=3,icon="hidden2", unlock={'blind_u'}},
|
||||
{name='blind_u', x=150, y=-1100, size=30,shape=3,icon="hidden2", unlock={'blind_wtf'}},
|
||||
{name='blind_wtf', x=150, y=-1200, size=25,shape=2,icon="hidden2"},
|
||||
|
||||
{name='classic_e', x=-200, y=-850, size=40,shape=1,icon="classic", unlock={'classic_h'}},
|
||||
{name='classic_h', x=-300, y=-950, size=35,shape=2,icon="classic", unlock={'classic_u'}},
|
||||
{name='classic_u', x=-400, y=-1050, size=30,shape=2,icon="classic"},
|
||||
|
||||
{name='survivor_e', x=300, y=-600, size=40,shape=1,icon="survivor", unlock={'survivor_n'}},
|
||||
{name='survivor_n', x=500, y=-600, size=40,shape=1,icon="survivor", unlock={'survivor_h','attacker_h','defender_n','dig_h'}},
|
||||
{name='survivor_h', x=700, y=-600, size=40,shape=1,icon="survivor", unlock={'survivor_l'}},
|
||||
{name='survivor_l', x=900, y=-600, size=40,shape=3,icon="survivor", unlock={'survivor_u'}},
|
||||
{name='survivor_u', x=1100, y=-600, size=40,shape=2,icon="survivor"},
|
||||
|
||||
{name='attacker_h', x=300, y=-800, size=40,shape=1,icon="attack", unlock={'attacker_u'}},
|
||||
{name='attacker_u', x=300, y=-1000, size=40,shape=1,icon="attack"},
|
||||
|
||||
{name='defender_n', x=500, y=-800, size=40,shape=1,icon="defend", unlock={'defender_l'}},
|
||||
{name='defender_l', x=500, y=-1000, size=40,shape=1,icon="defend"},
|
||||
|
||||
{name='dig_h', x=700, y=-800, size=40,shape=1,icon="dig", unlock={'dig_u'}},
|
||||
{name='dig_u', x=700, y=-1000, size=40,shape=1,icon="dig"},
|
||||
|
||||
{name='clearRush', x=400, y=-400, size=50,shape=1,icon="bigbang", unlock={'c4wtrain_n','pctrain_n','sprintAtk'}},
|
||||
{name='c4wtrain_n', x=700, y=-400, size=40,shape=1,icon="pc", unlock={'c4wtrain_l'}},
|
||||
{name='c4wtrain_l', x=900, y=-400, size=40,shape=1,icon="pc"},
|
||||
|
||||
{name='pctrain_n', x=700, y=-250, size=40,shape=1,icon="pc", unlock={'pctrain_l','pc_n'}},
|
||||
{name='pctrain_l', x=900, y=-250, size=40,shape=1,icon="pc"},
|
||||
|
||||
{name='pc_n', x=800, y=-110, size=40,shape=1,icon="pc", unlock={'pc_h'}},
|
||||
{name='pc_h', x=950, y=-110, size=40,shape=3,icon="pc", unlock={'pc_l','pc_inf'}},
|
||||
{name='pc_l', x=1100, y=-110, size=40,shape=3,icon="pc"},
|
||||
{name='pc_inf', x=1100, y=-250, size=40,shape=2,icon="pc"},
|
||||
|
||||
{name='sprintAtk', x=530, y=-150, size=40,shape=1,icon="sprint2", unlock={'sprintEff','tech_n','tech_finesse','tsd_e','backfire_n'}},
|
||||
|
||||
{name='sprintEff', x=360, y=-150, size=40,shape=1,icon="sprint2"},
|
||||
|
||||
{name='tech_n', x=400, y=50, size=40,shape=1,icon="tech", unlock={'tech_n_plus','tech_h'}},
|
||||
{name='tech_n_plus', x=200, y=20, size=40,shape=3,icon="tech"},
|
||||
{name='tech_h', x=400, y=200, size=40,shape=1,icon="tech", unlock={'tech_h_plus','tech_l'}},
|
||||
{name='tech_h_plus', x=200, y=170, size=35,shape=3,icon="tech"},
|
||||
{name='tech_l', x=400, y=350, size=40,shape=1,icon="tech", unlock={'tech_l_plus'}},
|
||||
{name='tech_l_plus', x=200, y=320, size=35,shape=3,icon="tech"},
|
||||
|
||||
{name='tech_finesse', x=800, y=50, size=40,shape=1,icon="tech", unlock={'tech_finesse_f'}},
|
||||
{name='tech_finesse_f',x=1000, y=50, size=40,shape=1,icon="tech"},
|
||||
|
||||
{name='tsd_e', x=720, y=200, size=40,shape=1,icon="tsd", unlock={'tsd_h'}},
|
||||
{name='tsd_h', x=960, y=200, size=40,shape=1,icon="tsd", unlock={'tsd_u'}},
|
||||
{name='tsd_u', x=1200, y=200, size=40,shape=1,icon="tsd"},
|
||||
|
||||
{name='backfire_n', x=650, y=350, size=40,shape=1,icon="backfire", unlock={'backfire_h'}},
|
||||
{name='backfire_h', x=850, y=350, size=40,shape=1,icon="backfire", unlock={'backfire_l'}},
|
||||
{name='backfire_l', x=1050, y=350, size=40,shape=3,icon="backfire", unlock={'backfire_u'}},
|
||||
{name='backfire_u', x=1250, y=350, size=35,shape=2,icon="backfire"},
|
||||
|
||||
{name='zen', x=-1000, y=-600, size=40,shape=1,icon="zen", unlock={'ultra','infinite','infinite_dig','marathon_inf'}},
|
||||
{name='ultra', x=-1200, y=-600, size=40,shape=1,icon="ultra"},
|
||||
{name='infinite', x=-1200, y=-400, size=40,shape=1,icon='infinite'},
|
||||
{name='infinite_dig', x=-1000, y=-400, size=40,shape=1,icon="dig"},
|
||||
{name='marathon_inf', x=-800, y=-400, size=40,shape=1,icon="marathon"}
|
||||
}
|
||||
@@ -37,69 +37,6 @@ local loadingThread=coroutine.wrap(function()
|
||||
YIELD('loadVoice')VOC.load('media/vocal/'..SETTING.vocPack..'/')
|
||||
YIELD('loadFont')for i=1,17 do getFont(15+5*i)getFont(15+5*i,'mono')end
|
||||
|
||||
YIELD('loadModeIcon')
|
||||
local modeIcons={}
|
||||
modeIcons.marathon=GC.DO{64,64,
|
||||
{'move',3,1},
|
||||
{'fRect',20,6,-4,42},
|
||||
{'fPoly',20,6,48,20,20,34},
|
||||
{'fRect',8,48,20,6},
|
||||
}
|
||||
modeIcons.infinite=GC.DO{64,64,
|
||||
{'setLW',4},
|
||||
{'dCirc',32,32,28},
|
||||
{'line',32,32,32,14},
|
||||
{'line',32,32,41,41},
|
||||
{'move',.5,.5},
|
||||
{'fRect',30,7,4,4},
|
||||
{'fRect',7,30,4,4},
|
||||
{'fRect',52,30,4,4},
|
||||
{'fRect',30,52,4,4},
|
||||
}
|
||||
modeIcons.classic=GC.DO{64,64,
|
||||
{'setLW',6},
|
||||
{'dRect',10,24,12,12},
|
||||
{'dRect',26,24,12,12},
|
||||
{'dRect',42,24,12,12},
|
||||
{'dRect',26,40,12,12},
|
||||
}
|
||||
modeIcons.tsd=GC.DO{64,64,
|
||||
{'fRect',7,7,16,16},
|
||||
{'fRect',7,41,16,16},
|
||||
{'fRect',41,41,16,16},
|
||||
{'move',.5,.5},
|
||||
{'setLW',1},
|
||||
{'dPoly',7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39},
|
||||
}
|
||||
modeIcons.t49=GC.DO{64,64,
|
||||
{'setLW',2},
|
||||
{'dRect',05,05,10,20},{'dRect',49,05,10,20},
|
||||
{'dRect',05,39,10,20},{'dRect',49,39,10,20},
|
||||
{'dRect',20,10,23,43},
|
||||
{'setCL',1,1,1,.7},
|
||||
{'fRect',20,10,23,43},
|
||||
}
|
||||
modeIcons.t99=GC.DO{64,64,
|
||||
{'setLW',2},
|
||||
{'dRect',02,02,6,12},{'dRect',11,02,6,12},
|
||||
{'dRect',02,18,6,12},{'dRect',11,18,6,12},
|
||||
{'dRect',02,34,6,12},{'dRect',11,34,6,12},
|
||||
{'dRect',02,50,6,12},{'dRect',11,50,6,12},
|
||||
{'dRect',47,02,6,12},{'dRect',56,02,6,12},
|
||||
{'dRect',47,18,6,12},{'dRect',56,18,6,12},
|
||||
{'dRect',47,34,6,12},{'dRect',56,34,6,12},
|
||||
{'dRect',47,50,6,12},{'dRect',56,50,6,12},
|
||||
{'dRect',20,10,23,43},
|
||||
{'setCL',1,1,1,.7},
|
||||
{'fRect',20,10,23,43},
|
||||
}
|
||||
|
||||
YIELD('loadMode')
|
||||
for _,M in next,MODES do
|
||||
M.records=loadFile("record/"..M.name..".rec",'-luaon -canSkip')or M.score and{}
|
||||
M.icon=M.icon and(modeIcons[M.icon]or gc.newImage("media/image/modeicon/"..M.icon..".png"))
|
||||
end
|
||||
|
||||
YIELD('loadOther')
|
||||
STAT.run=STAT.run+1
|
||||
|
||||
|
||||
@@ -1,337 +1,218 @@
|
||||
local gc=love.graphics
|
||||
local gc_push,gc_pop=gc.push,gc.pop
|
||||
local gc_translate,gc_scale,gc_rotate,gc_applyTransform=gc.translate,gc.scale,gc.rotate,gc.applyTransform
|
||||
local gc_translate,gc_scale,gc_rotate,gc_shear=gc.translate,gc.scale,gc.rotate,gc.shear
|
||||
local gc_setCanvas,gc_setShader,gc_setBlendMode=gc.setCanvas,gc.setShader,gc.setBlendMode
|
||||
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||
local gc_draw,gc_line=gc.draw,gc.line
|
||||
local gc_rectangle,gc_circle=gc.rectangle,gc.circle
|
||||
local gc_rectangle,gc_circle,gc_polygon=gc.rectangle,gc.circle,gc.polygon
|
||||
local gc_print,gc_printf=gc.print,gc.printf
|
||||
|
||||
local ms,kb,tc=love.mouse,love.keyboard,love.touch
|
||||
local mt=love.math
|
||||
local gc_stencil,gc_setStencilTest=gc.stencil,gc.setStencilTest
|
||||
|
||||
local max,min=math.max,math.min
|
||||
local int,abs=math.floor,math.abs
|
||||
local rnd=math.random
|
||||
|
||||
local setFont=FONT.set
|
||||
local ins=table.insert
|
||||
|
||||
local mapCam={
|
||||
sel=false,--Selected mode ID
|
||||
xOy=mt.newTransform(0,0,0,1),--Transformation for map display
|
||||
keyCtrl=false,--If controlling with key
|
||||
local setFont=setFont
|
||||
|
||||
--For auto zooming when enter/leave scene
|
||||
zoomMethod=false,
|
||||
zoomK=false,
|
||||
}
|
||||
local visibleModes
|
||||
local touchDist
|
||||
local searchText=""
|
||||
local searchTimer
|
||||
local results={}
|
||||
local selectedItem
|
||||
local path={}
|
||||
local pathStr="/"
|
||||
|
||||
local function _comp(a,b)
|
||||
return a.type~=b.type and a.type=='folder'
|
||||
end
|
||||
|
||||
local function _newItem(item,x0,y0)
|
||||
return{
|
||||
type=item.folder and'folder'or'mode',
|
||||
name=item.name,
|
||||
x0=x0,y0=y0,
|
||||
w=160,h=160,
|
||||
x=x0+rnd(-26,26),y=y0+rnd(-26,26),
|
||||
alpha=0,
|
||||
selTime=0,
|
||||
}
|
||||
end
|
||||
|
||||
local function _freshPacks()
|
||||
TABLE.cut(results)
|
||||
local t=MODETREE
|
||||
for i=1,#path do
|
||||
for j=1,#t do
|
||||
if t[j].name==path[i]then
|
||||
t=t[j]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
local count=0
|
||||
if path[1]then
|
||||
ins(results,_newItem({folder=true,name='_back'},0,0))
|
||||
count=1
|
||||
end
|
||||
for i=1,#t do
|
||||
local item=t[i]
|
||||
if #searchText==0 or item.name:find(searchText)then
|
||||
ins(results,_newItem(item,180*(count%4),200*int(count/4)))
|
||||
count=count+1
|
||||
end
|
||||
end
|
||||
table.sort(results,_comp)
|
||||
end
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set()
|
||||
mapCam.zoomK=SCN.prev=='main'and 5 or 1
|
||||
visibleModes={}--1=unlocked, 2=locked but visible
|
||||
for name,M in next,MODES do
|
||||
if RANKS[name]and M.x then
|
||||
visibleModes[name]=1
|
||||
if M.unlock then
|
||||
for i=1,#M.unlock do
|
||||
visibleModes[M.unlock[i]]=visibleModes[M.unlock[i]]or 2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
_freshPacks()
|
||||
searchTimer=0
|
||||
end
|
||||
|
||||
local function _getK()
|
||||
return abs(mapCam.xOy:transformPoint(1,0)-mapCam.xOy:transformPoint(0,0))
|
||||
end
|
||||
local function _getPos()
|
||||
return mapCam.xOy:inverseTransformPoint(0,0)
|
||||
end
|
||||
|
||||
local function _onModeRaw(x,y)
|
||||
for name,M in next,MODES do
|
||||
if visibleModes[name]and M.x then
|
||||
local s=M.size
|
||||
if M.shape==1 then
|
||||
if x>M.x-s and x<M.x+s and y>M.y-s and y<M.y+s then return name end
|
||||
elseif M.shape==2 then
|
||||
if abs(x-M.x)+abs(y-M.y)<s+12 then return name end
|
||||
elseif M.shape==3 then
|
||||
if(x-M.x)^2+(y-M.y)^2<(s+6)^2 then return name end
|
||||
end
|
||||
function scene.mouseMove(x,y)
|
||||
selectedItem=false
|
||||
x,y=x-40,y-150
|
||||
if x<-40 or x>=765 or y<-40 or y>=570 then return end
|
||||
for i=1,#results do
|
||||
local item=results[i]
|
||||
if x>item.x0 and x<item.x0+item.w and y>item.y0 and y<item.y0+item.h then
|
||||
selectedItem=item
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
local function _moveMap(dx,dy)
|
||||
local k=_getK()
|
||||
local x,y=_getPos()
|
||||
if x>1300 and dx<0 or x<-1500 and dx>0 then dx=0 end
|
||||
if y>420 and dy<0 or y<-1900 and dy>0 then dy=0 end
|
||||
mapCam.xOy:translate(dx/k,dy/k)
|
||||
end
|
||||
function scene.wheelMoved(_,dy)
|
||||
mapCam.keyCtrl=false
|
||||
local k=_getK()
|
||||
k=min(max(k+dy*.1,.3),1.6)/k
|
||||
mapCam.xOy:scale(k)
|
||||
|
||||
local x,y=_getPos()
|
||||
mapCam.xOy:translate(x*(1-k),y*(1-k))
|
||||
end
|
||||
function scene.mouseMove(_,_,dx,dy)
|
||||
if ms.isDown(1)then
|
||||
_moveMap(dx,dy)
|
||||
function scene.mouseDown(x,y,k)
|
||||
scene.mouseMove(x,y)
|
||||
if k==1 then
|
||||
scene.keyDown('return')
|
||||
end
|
||||
mapCam.keyCtrl=false
|
||||
end
|
||||
function scene.mouseClick(x,y)
|
||||
local _=mapCam.sel
|
||||
if not _ or x<920 then
|
||||
x,y=x-640,y-360
|
||||
x,y=mapCam.xOy:inverseTransformPoint(x,y)
|
||||
local SEL=_onModeRaw(x,y)
|
||||
if _~=SEL then
|
||||
if SEL then
|
||||
mapCam.moving=true
|
||||
_=MODES[SEL]
|
||||
mapCam.sel=SEL
|
||||
SFX.play('click')
|
||||
else
|
||||
mapCam.sel=false
|
||||
end
|
||||
elseif _ then
|
||||
scene.keyDown('return')
|
||||
function scene.wheelMoved(_,y)print(y)
|
||||
if results[1]then
|
||||
y=y*126
|
||||
if results[1].y0>-y then y=-results[1].y0 end
|
||||
local r=results[#results]
|
||||
if r.y0+r.h+y<540 then y=540-r.y0-r.h end
|
||||
for i=1,#results do
|
||||
local item=results[i]
|
||||
item.y0=item.y0+y
|
||||
end
|
||||
end
|
||||
mapCam.keyCtrl=false
|
||||
end
|
||||
function scene.touchDown()
|
||||
touchDist=false
|
||||
end
|
||||
function scene.touchMove(x,y,dx,dy)
|
||||
local L=tc.getTouches()
|
||||
if not L[2]then
|
||||
_moveMap(dx,dy)
|
||||
elseif not L[3]then
|
||||
x,y=SCR.xOy:inverseTransformPoint(tc.getPosition(L[1]))
|
||||
dx,dy=SCR.xOy:inverseTransformPoint(tc.getPosition(L[2]))--Not delta!!!
|
||||
local d=(x-dx)^2+(y-dy)^2
|
||||
if d>100 then
|
||||
d=d^.5
|
||||
if touchDist then
|
||||
scene.wheelMoved(nil,(d-touchDist)*.02)
|
||||
end
|
||||
touchDist=d
|
||||
end
|
||||
end
|
||||
mapCam.keyCtrl=false
|
||||
end
|
||||
function scene.touchClick(x,y)
|
||||
scene.mouseClick(x,y)
|
||||
end
|
||||
function scene.keyDown(key,isRep)
|
||||
if isRep then return end
|
||||
if key=='return'then
|
||||
if mapCam.sel then
|
||||
if visibleModes[mapCam.sel]==2 then
|
||||
MES.new('info',text.unlockHint)
|
||||
else
|
||||
mapCam.keyCtrl=false
|
||||
loadGame(mapCam.sel)
|
||||
end
|
||||
end
|
||||
if key=='up'or key=='down'or key=='left'or key=='right'then
|
||||
--Select mode with arrow keys
|
||||
elseif key=='f1'then
|
||||
SCN.go('mod')
|
||||
elseif key=='return'then
|
||||
if isRep then return end
|
||||
if selectedItem then
|
||||
if selectedItem.type=='mode'then
|
||||
loadGame(selectedItem.name)
|
||||
elseif selectedItem.type=='folder'then
|
||||
if selectedItem.name=='_back'then
|
||||
table.remove(path)
|
||||
SFX.play('uncheck')
|
||||
else
|
||||
ins(path,selectedItem.name)
|
||||
SFX.play('check')
|
||||
end
|
||||
pathStr="modes/"
|
||||
if path[1]then pathStr=pathStr..table.concat(path,'/').."/"end
|
||||
_freshPacks()
|
||||
end
|
||||
end
|
||||
elseif key=='escape'then
|
||||
if mapCam.sel then
|
||||
mapCam.sel=false
|
||||
if isRep then return end
|
||||
if #searchText>0 then
|
||||
searchText=""
|
||||
_freshPacks()
|
||||
else
|
||||
SCN.back()
|
||||
end
|
||||
elseif key=='backspace'then
|
||||
if #searchText>0 then
|
||||
searchText=searchText:sub(1,-2)
|
||||
searchTimer=.42
|
||||
end
|
||||
elseif #key==1 then
|
||||
searchText=searchText..key
|
||||
searchTimer=.42
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
local dx,dy=0,0
|
||||
local F
|
||||
if not SCN.swapping then
|
||||
if kb.isDown('up', 'w')then dy=dy+10 F=true end
|
||||
if kb.isDown('down', 's')then dy=dy-10 F=true end
|
||||
if kb.isDown('left', 'a')then dx=dx+10 F=true end
|
||||
if kb.isDown('right','d')then dx=dx-10 F=true end
|
||||
local js=Z.js[1]
|
||||
if js then
|
||||
local sx,sy=js._jsObj:getGamepadAxis('leftx'),js._jsObj:getGamepadAxis('lefty')
|
||||
if math.abs(sx)>.1 or math.abs(sy)>.1 then
|
||||
if sy<-.1 then dy=dy-12.6*sy end
|
||||
if sy>.1 then dy=dy-12.6*sy end
|
||||
if sx<-.1 then dx=dx-12.6*sx end
|
||||
if sx>.1 then dx=dx-12.6*sx end
|
||||
F=true
|
||||
end
|
||||
function scene.update(dt)
|
||||
if searchTimer>0 then
|
||||
searchTimer=searchTimer-dt
|
||||
if searchTimer<=0 then
|
||||
_freshPacks()
|
||||
end
|
||||
end
|
||||
if F then
|
||||
mapCam.keyCtrl=true
|
||||
if kb.isDown('lctrl','rctrl','lalt','ralt')then
|
||||
scene.wheelMoved(nil,(dy-dx)*.026)
|
||||
else
|
||||
_moveMap(dx,dy)
|
||||
local x,y=_getPos()
|
||||
local SEL=_onModeRaw(x,y)
|
||||
if SEL and mapCam.sel~=SEL then
|
||||
mapCam.sel=SEL
|
||||
SFX.play('click')
|
||||
end
|
||||
for i=1,#results do
|
||||
local item=results[i]
|
||||
item.x=item.x*.9+item.x0*.1
|
||||
item.y=item.y*.9+item.y0*.1
|
||||
if item.alpha<1 then
|
||||
item.alpha=min(item.alpha+dt*2.6,1)
|
||||
end
|
||||
if item==selectedItem then
|
||||
item.selTime=min(item.selTime+dt,.126)
|
||||
elseif item.selTime>0 then
|
||||
item.selTime=item.selTime-dt
|
||||
end
|
||||
end
|
||||
|
||||
local _=SCN.stat.tar
|
||||
mapCam.zoomMethod=_=="game"and 1 or _=="mode"and 2
|
||||
if mapCam.zoomMethod==1 then
|
||||
_=mapCam.zoomK
|
||||
if _<.8 then _=_*1.05 end
|
||||
if _<1.1 then _=_*1.05 end
|
||||
mapCam.zoomK=_*1.05
|
||||
elseif mapCam.zoomMethod==2 then
|
||||
mapCam.zoomK=mapCam.zoomK^.9
|
||||
end
|
||||
end
|
||||
|
||||
--noRank/B/A/S/U/X
|
||||
local baseRankColor={
|
||||
[0]={0,0,0,.3},
|
||||
{.2,.4,.6,.3},
|
||||
{.6,.85,.65,.3},
|
||||
{.85,.8,.3,.3},
|
||||
{.85,.5,.4,.3},
|
||||
{.85,.3,.8,.3},
|
||||
}
|
||||
local function _drawModeShape(M,S,drawType)
|
||||
if M.shape==1 then--Rectangle
|
||||
gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
|
||||
elseif M.shape==2 then--Diamond
|
||||
gc_circle(drawType,M.x,M.y,S+12,4)
|
||||
elseif M.shape==3 then--Octagon
|
||||
gc_circle(drawType,M.x,M.y,S+6,8)
|
||||
end
|
||||
local function _modePannelStencil()
|
||||
gc_rectangle('fill',0,0,805,610)
|
||||
end
|
||||
function scene.draw()
|
||||
local _
|
||||
gc_setLineWidth(2)
|
||||
|
||||
gc_setColor(COLOR.dX)
|
||||
gc_rectangle('fill',0,0,1280,110)
|
||||
gc_rectangle('fill',0,110,805,610)
|
||||
gc_setColor(COLOR.X)
|
||||
gc_rectangle('fill',805,110,475,610)
|
||||
gc_setColor(COLOR.Z)
|
||||
gc_line(0,110,1280,110)
|
||||
gc_line(805,110,805,720)
|
||||
|
||||
setFont(40)
|
||||
gc_print(pathStr,60,40)
|
||||
gc_print(searchText,800,40)
|
||||
|
||||
gc_push('transform')
|
||||
gc_translate(640,360)
|
||||
gc_rotate((mapCam.zoomK^.6-1))
|
||||
gc_scale(mapCam.zoomK^.7)
|
||||
gc_applyTransform(mapCam.xOy);
|
||||
|
||||
local R=RANKS
|
||||
local sel=mapCam.sel
|
||||
|
||||
--Lines connecting modes
|
||||
gc_setLineWidth(8)
|
||||
gc_setColor(1,1,1,.2)
|
||||
for name,M in next,MODES do
|
||||
if R[name]and M.unlock and M.x then
|
||||
for _=1,#M.unlock do
|
||||
local m=MODES[M.unlock[_]]
|
||||
gc_line(M.x,M.y,m.x,m.y)
|
||||
gc_translate(0,110)
|
||||
gc_stencil(_modePannelStencil,'replace',1)
|
||||
gc_setStencilTest('equal',1)
|
||||
gc_translate(40,40)
|
||||
setFont(20)
|
||||
for i=1,#results do
|
||||
local item=results[i]
|
||||
if item.type=='folder'then
|
||||
gc_setColor(1,.9,.5,item.alpha*.3)
|
||||
gc_rectangle('fill',item.x,item.y,item.w,item.h)
|
||||
end
|
||||
if item.selTime>0 then
|
||||
gc_setColor(1,1,1,item.selTime*2)
|
||||
gc_rectangle('fill',item.x,item.y,item.w,item.h,6)
|
||||
end
|
||||
gc_setColor(1,1,1,item.alpha)
|
||||
gc_rectangle('line',item.x,item.y,item.w,item.h,6)
|
||||
gc_print(item.name,item.x+10,item.y+item.h-28)
|
||||
end
|
||||
end
|
||||
|
||||
--Modes
|
||||
setFont(80)
|
||||
gc_setLineWidth(4)
|
||||
for name,M in next,MODES do
|
||||
local unlocked=visibleModes[name]
|
||||
if unlocked then
|
||||
local rank=R[name]
|
||||
local S=M.size
|
||||
|
||||
--Draw shapes on map
|
||||
if unlocked==1 then
|
||||
gc_setColor(baseRankColor[rank])
|
||||
_drawModeShape(M,S,'fill')
|
||||
end
|
||||
gc_setColor(1,1,sel==name and 0 or 1,unlocked==1 and .8 or .3)
|
||||
_drawModeShape(M,S,'line')
|
||||
|
||||
--Icon
|
||||
local icon=M.icon
|
||||
if icon then
|
||||
gc_setColor(unlocked==1 and COLOR.lH or COLOR.dH)
|
||||
local length=icon:getWidth()*.5
|
||||
gc_draw(icon,M.x,M.y,nil,S/length,nil,length,length)
|
||||
end
|
||||
|
||||
--Rank
|
||||
if unlocked==1 then
|
||||
name=RANK_CHARS[rank]
|
||||
if name then
|
||||
gc_setColor(COLOR.dX)
|
||||
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
||||
gc_setColor(RANK_COLORS[rank])
|
||||
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
gc_setStencilTest()
|
||||
gc_pop()
|
||||
|
||||
--Score board
|
||||
if sel then
|
||||
local M=MODES[sel]
|
||||
gc_setColor(COLOR.lX)
|
||||
gc_rectangle('fill',920,0,360,720,5)--Info board
|
||||
gc_setColor(COLOR.Z)
|
||||
setFont(40)mStr(text.modes[sel][1],1100,5)
|
||||
setFont(30)mStr(text.modes[sel][2],1100,50)
|
||||
setFont(25)gc_printf(text.modes[sel][3],920,110,360,'center')
|
||||
if M.slowMark then
|
||||
gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
||||
end
|
||||
if M.score then
|
||||
mText(TEXTOBJ.highScore,1100,240)
|
||||
gc_setColor(COLOR.X)
|
||||
gc_rectangle('fill',940,290,320,280,5)--Highscore board
|
||||
local L=M.records
|
||||
gc_setColor(1,1,1)
|
||||
if visibleModes[sel]==2 then
|
||||
mText(TEXTOBJ.modeLocked,1100,370)
|
||||
elseif L[1]then
|
||||
for i=1,#L do
|
||||
local t=M.scoreDisp(L[i])
|
||||
local f=int((30-#t*.5)/5)*5
|
||||
setFont(f)
|
||||
gc_print(t,955,275+25*i+17-f*.7)
|
||||
_=L[i].date
|
||||
if _ then
|
||||
setFont(10)
|
||||
gc_print(_,1155,285+25*i)
|
||||
end
|
||||
end
|
||||
else
|
||||
mText(TEXTOBJ.noScore,1100,370)
|
||||
end
|
||||
end
|
||||
end
|
||||
if mapCam.keyCtrl then
|
||||
gc_setColor(1,1,1)
|
||||
gc_setLineWidth(4)
|
||||
gc_translate(640,360)
|
||||
gc_line(-20,0,20,0)
|
||||
gc_line(0,-20,0,20)
|
||||
gc_translate(-640,-360)
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name='mod', x=140,y=655,w=220,h=80,font=35,code=goScene'mod'},
|
||||
WIDGET.newButton{name='start',x=1040,y=655,w=180,h=80,font=40,code=pressKey'return',hideF=function()return not mapCam.sel end},
|
||||
WIDGET.newButton{name='back', x=1200,y=655,w=120,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
|
||||
WIDGET.newButton{name='mod',x=890,y=655,w=140,h=80,font=25,code=goScene'mod'},
|
||||
WIDGET.newButton{name='start',x=1040,y=655,w=140,h=80,font=40,code=pressKey'return'},
|
||||
WIDGET.newButton{name='back',x=1190,y=655,w=140,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
|
||||
@@ -26,6 +26,7 @@ return[=[
|
||||
微调全局颜色表
|
||||
修复:
|
||||
自定义场地16号色的方块名位置显示错误
|
||||
自动保存会丢掉最后一个键(如果它触发了结束)
|
||||
登录界面读取本地账号密码数据错误
|
||||
策略堆叠模式评级标准不当
|
||||
云存档/读档的一处小问题
|
||||
|
||||