BRS在程序内名称改为BiRS(防止和BPS-RS歧义)

修正BiRS中Z5和S5的180度转的表使用错误
整理代码
This commit is contained in:
MrZ626
2021-07-25 22:07:01 +08:00
parent 6ae419eeee
commit 850a31d172
3 changed files with 14 additions and 15 deletions

View File

@@ -267,7 +267,7 @@ do
love.event.quit('restart')
end
if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'needSave=true end
if SETTING.RS=='ZRS'then SETTING.RS='BRS'needSave=true end
if SETTING.RS=='ZRS'or SETTING.RS=='BRS'then SETTING.RS='BiRS'needSave=true end
if not SETTING.VKSkin then SETTING.VKSkin=1 end
if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then

View File

@@ -443,7 +443,7 @@ do
for i=8,29 do SRS[i]=SRS[1]end
end
local BRS
local BiRS
do
local R=vecStrConv{'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'}
local L=vecStrConv{'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'}
@@ -457,8 +457,8 @@ do
{[02]=F,[20]=F,[13]=F,[31]=F},--O
{[02]=F,[20]=F,[13]=R,[31]=L},--I
{[02]=L,[20]=R,[13]=R,[31]=L},--Z5
{[02]=R,[20]=L,[13]=L,[31]=R},--S5
{[02]=L,[20]=L,[13]=R,[31]=R},--Z5
{[02]=R,[20]=R,[13]=L,[31]=L},--S5
{[02]=L,[20]=R,[13]=L,[31]=R},--P
{[02]=R,[20]=L,[13]=R,[31]=L},--Q
{[02]=R,[20]=L,[13]=L,[31]=R},--F
@@ -487,7 +487,7 @@ do
list[i][01]=a;list[i][10]=b;list[i][03]=b;list[i][30]=a
list[i][12]=a;list[i][21]=b;list[i][32]=b;list[i][23]=a
end
BRS=TABLE.new(function(P,d,ifpre)
BiRS=TABLE.new(function(P,d,ifpre)
local C=P.cur
local idir=(C.dir+d)%4
local kickList=list[C.id][C.dir*10+idir]
@@ -498,18 +498,17 @@ do
local pressing=P.keyPressing
if pressing[1]and P:ifoverlap(C.bk,P.curX-1,P.curY)then dx=dx-1 end
if pressing[2]and P:ifoverlap(C.bk,P.curX+1,P.curY)then dx=dx+1 end
if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy=-1 end
if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end
end
while true do
for test=1,#kickList do
local kick=kickList[test]
local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy
if
dx*(kick[1]+dx)>=0 and
math.abs(dx+kick[1])<=2 and
((dx+kick[1])^2+(dy+kick[2])^2)<=5 and
(P.freshTime>0 or kick[2]+dy<=0)
dx*fdx>=0 and
fdx^2+fdy^2<=5 and
(P.freshTime>0 or fdy<=0)
then
local x,y=ix+kick[1]+dx,iy+kick[2]+dy
local x,y=ix+fdx,iy+fdy
if not P:ifoverlap(icb,x,y)then
if P.gameEnv.moveFX and P.gameEnv.block then
P:createMoveFX()
@@ -522,7 +521,7 @@ do
if not ifpre then
P:freshBlock('move')
end
if kick[2]+dy>0 and P.freshTime==t and P.curY~=P.imgY then
if fdy>0 and P.freshTime==t and P.curY~=P.imgY then
P.freshTime=P.freshTime-1
end
@@ -651,7 +650,7 @@ for i=1,29 do None[i]=noKickSet_180 end
local RS={
TRS=TRS,
SRS=SRS,
BRS=BRS,
BiRS=BiRS,
ASC=ASC,
ASCplus=ASCplus,
C2=C2,

View File

@@ -29,7 +29,7 @@ scene.widgetList={
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene'setting_key'},
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene'setting_touch'},
WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BRS','ASC','ASCplus','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")},
WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BiRS','ASC','ASCplus','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")},
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'},
WIDGET.newSwitch{name="autoPause", x=1060, y=350, disp=SETval("autoPause"), code=SETrev("autoPause")},
WIDGET.newSwitch{name="swap", x=1060, y=460, disp=SETval("swap"), code=SETrev("swap")},