再调整doGC命令集
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local cmds={
|
local cmds={
|
||||||
reset="origin",
|
origin="origin",
|
||||||
trans="translate",
|
move="translate",
|
||||||
scale="scale",
|
scale="scale",
|
||||||
rotat="rotate",
|
rotate="rotate",
|
||||||
clear="clear",
|
clear="clear",
|
||||||
|
|
||||||
setCL="setColor",
|
setCL="setColor",
|
||||||
@@ -26,14 +26,12 @@ local cmds={
|
|||||||
fPoly=function(...)gc.polygon("fill",...)end,
|
fPoly=function(...)gc.polygon("fill",...)end,
|
||||||
dPoly=function(...)gc.polygon("line",...)end,
|
dPoly=function(...)gc.polygon("line",...)end,
|
||||||
|
|
||||||
drArc=function(...)gc.arc("line",...)end,
|
dPie=function(...)gc.arc("line",...)end,
|
||||||
flArc=function(...)gc.arc("fill",...)end,
|
dArc=function(...)gc.arc("line","open",...)end,
|
||||||
dpArc=function(...)gc.arc("line","pie",...)end,
|
dBow=function(...)gc.arc("line","closed",...)end,
|
||||||
doArc=function(...)gc.arc("line","open",...)end,
|
fPie=function(...)gc.arc("fill",...)end,
|
||||||
dcArc=function(...)gc.arc("line","closed",...)end,
|
fArc=function(...)gc.arc("fill","open",...)end,
|
||||||
fpArc=function(...)gc.arc("fill","pie",...)end,
|
fBow=function(...)gc.arc("fill","closed",...)end,
|
||||||
foArc=function(...)gc.arc("fill","open",...)end,
|
|
||||||
fcArc=function(...)gc.arc("fill","closed",...)end,
|
|
||||||
}
|
}
|
||||||
return function(L)
|
return function(L)
|
||||||
gc.push()
|
gc.push()
|
||||||
@@ -46,8 +44,10 @@ return function(L)
|
|||||||
local cmd=cmds[L[i][1]]
|
local cmd=cmds[L[i][1]]
|
||||||
if type(cmd)=="string"then
|
if type(cmd)=="string"then
|
||||||
gc[cmd](unpack(L[i],2))
|
gc[cmd](unpack(L[i],2))
|
||||||
else
|
elseif cmd then
|
||||||
cmd(unpack(L[i],2))
|
cmd(unpack(L[i],2))
|
||||||
|
else
|
||||||
|
error("No gc command: "..(L[i][1]or"[nil]"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gc.setCanvas()
|
gc.setCanvas()
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ local loadingThread=coroutine.wrap(function()
|
|||||||
upFloor()
|
upFloor()
|
||||||
local modeIcons={}
|
local modeIcons={}
|
||||||
modeIcons.marathon=DOGC{32,32,
|
modeIcons.marathon=DOGC{32,32,
|
||||||
{"trans",3,1},
|
{"move",3,1},
|
||||||
{"fRect",10,4,-2,23},
|
{"fRect",10,4,-2,23},
|
||||||
{"fPoly",10,4,24,10,10,16.5},
|
{"fPoly",10,4,24,10,10,16.5},
|
||||||
{"fRect",4,24,10,3},
|
{"fRect",4,24,10,3},
|
||||||
@@ -85,7 +85,7 @@ local loadingThread=coroutine.wrap(function()
|
|||||||
{"dCirc",32,32,28},
|
{"dCirc",32,32,28},
|
||||||
{"dLine",32,32,32,14},
|
{"dLine",32,32,32,14},
|
||||||
{"dLine",32,32,41,41},
|
{"dLine",32,32,41,41},
|
||||||
{"trans",.5,.5},
|
{"move",.5,.5},
|
||||||
{"fRect",30,7,4,4},
|
{"fRect",30,7,4,4},
|
||||||
{"fRect",7,30,4,4},
|
{"fRect",7,30,4,4},
|
||||||
{"fRect",52,30,4,4},
|
{"fRect",52,30,4,4},
|
||||||
@@ -102,7 +102,7 @@ local loadingThread=coroutine.wrap(function()
|
|||||||
{"fRect",7,7,16,16},
|
{"fRect",7,7,16,16},
|
||||||
{"fRect",7,41,16,16},
|
{"fRect",7,41,16,16},
|
||||||
{"fRect",41,41,16,16},
|
{"fRect",41,41,16,16},
|
||||||
{"trans",.5,.5},
|
{"move",.5,.5},
|
||||||
{"setLW",1},
|
{"setLW",1},
|
||||||
{"dPoly",7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39},
|
{"dPoly",7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39},
|
||||||
}YIELD()
|
}YIELD()
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ scene.widgetList={
|
|||||||
{"dCirc",32,32,30},
|
{"dCirc",32,32,30},
|
||||||
{"dLine",2,31,62,31},
|
{"dLine",2,31,62,31},
|
||||||
{"dLine",31,2,31,62},
|
{"dLine",31,2,31,62},
|
||||||
{"doArc",10,31,40,-.8,.8},
|
{"dArc",10,31,40,-.8,.8},
|
||||||
{"doArc",53,31,40,2.3,3.9},
|
{"dArc",53,31,40,2.3,3.9},
|
||||||
}},
|
}},
|
||||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color="lB",font=35,align="R",edge=30,code=pressKey"x"},
|
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color="lB",font=35,align="R",edge=30,code=pressKey"x"},
|
||||||
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color="lR",font=40,align="L",edge=30,code=backScene},
|
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color="lR",font=40,align="L",edge=30,code=backScene},
|
||||||
|
|||||||
Reference in New Issue
Block a user