From 60600dbe2f14c62b27dd4666828f2e37bb88c902 Mon Sep 17 00:00:00 2001 From: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com> Date: Wed, 4 Aug 2021 20:11:07 +0800 Subject: [PATCH 01/70] =?UTF-8?q?=E4=BF=AE=E6=AD=A3OS=20X=20CI=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加OS X签名 等证书搞好之后改一下里面的id之类的就行。 * 添加证书信息 * 修正OS X CI错误 --- .github/workflows/build.yml | 6 ++---- .github/workflows/updateOSXVersion.py | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8fb5cf3..e3e39829 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,16 +102,14 @@ jobs: python3 .github/workflows/updateOSXVersion.py mv Techmino.love Techmino.app/Contents/Resources - name: Codesign executable - # can be found at running `security find-identity -v` - # is any password you like, it is there just to create the keychain - # Add in secrets: + # In secrets: # - MACOS_CERTIFICATE: the *.p12 Developer ID Certificate, encoded in base64 # - MACOS_CERTIFICATE_PWD: The password env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} run: | - echo $MACOS_CERTIFICATE | base64 —decode > certificate.p12 + echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 security create-keychain -p Techminohaowan build.keychain security default-keychain -s build.keychain security unlock-keychain -p Techminohaowan build.keychain diff --git a/.github/workflows/updateOSXVersion.py b/.github/workflows/updateOSXVersion.py index bcab5e94..c550e324 100644 --- a/.github/workflows/updateOSXVersion.py +++ b/.github/workflows/updateOSXVersion.py @@ -59,8 +59,7 @@ info = r""" with open("conf.lua", "r") as file: data = file.read() -versionCode = re.search("build=(\\d+)", data).group(1) -# versionName = re.search('short="([^"]+)', data).group(1) -print(versionCode) +versionName = re.search('short="([^"]+)', data).group(1) +print("Updating to", versionName) with open("Techmino.app/Contents/info.plist", "w") as file: - file.write(info % (versionCode, datetime.datetime.today().year)) + file.write(info % (versionName, datetime.datetime.today().year)) From f088bdcf8b2e62ecf292f1b15e2c3fb7675374c1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 4 Aug 2021 20:15:15 +0800 Subject: [PATCH 02/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9D=BE=E5=BC=80?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E5=8F=AF=E8=83=BD=E4=B8=8D=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=86=85=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index fb83f771..28ffd7eb 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -149,10 +149,10 @@ end function love.mousereleased(x,y,k,touch) if touch or SCN.swapping then return end mx,my=ITP(xOy,x,y) + if SCN.mouseUp then SCN.mouseUp(mx,my,k)end if WIDGET.sel then WIDGET.release(mx,my) else - if SCN.mouseUp then SCN.mouseUp(mx,my,k)end if lastX and SCN.mouseClick and(mx-lastX)^2+(my-lastY)^2<62 then SCN.mouseClick(mx,my,k) end From f4c0d197346f358703bf7f807bff4539151e27b4 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 4 Aug 2021 21:24:43 +0800 Subject: [PATCH 03/70] =?UTF-8?q?=E6=88=BF=E9=97=B4=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E6=97=B6=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=BC=9A=E6=A0=B9=E6=8D=AE=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/net_rooms.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index a96d018e..60428e69 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -77,7 +77,7 @@ function scene.keyDown(key) if R.roomInfo.version==VERSION.room then NET.enterRoom(R,passwordBox.value) else - MES.new('error',"Version doesn't compatible 版本不兼容") + MES.new('error',text.versionNotMatch) end else WIDGET.keyPressed(key) From 9b1ab459a0ec3dbbc838f8bcc7dcc59a71aba490 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 4 Aug 2021 22:17:19 +0800 Subject: [PATCH 04/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E8=B5=9E=E5=8A=A9=E8=80=85=20=E4=BF=AE=E6=94=B9=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=8E=86=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/patron.lua | 2 ++ parts/updateLog.lua | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/parts/patron.lua b/parts/patron.lua index 16aa6b62..8e898b0e 100644 --- a/parts/patron.lua +++ b/parts/patron.lua @@ -23,6 +23,7 @@ return{ {font=65,name="猫宫"}, {font=65,name="Notypey"}, {font=65,name="亮君"}, + {font=65,name="柴影"}, {font=25,name="八零哥"}, {font=25,name="蕴空之灵"}, @@ -112,4 +113,5 @@ return{ {font=25,name="[*梅]"}, {font=25,name="晦风羽幕"}, {font=25,name="T9753"}, + {font=25,name="Trebor"}, } \ No newline at end of file diff --git a/parts/updateLog.lua b/parts/updateLog.lua index edf90eee..2135a134 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -1,12 +1,12 @@ return STRING.split([=[ 未来模式: - 任务生存; 对称; 拼方形; 限高无尽挖掘; 连击练习; backfire对战 - 极简教程/考试; 大爆炸; 教学关; 术语问答; 仅4lPC - OSD; 强制Misdrop; 涂色模式(模仿喷喷, designed by teatube) + 任务生存; 对称; 大爆炸; 拼方形; 限高无尽挖掘; 连击练习; backfire对战 + 经典模式分离(9/15/18/19/29); OSD; 强制Misdrop; 拼大于号; 仅4lPC + 极简教程/考试; 教学关; 术语问答; 涂色模式(模仿喷喷, designed by teatube) 未来大游戏: Puyo; Bubble; 2048; 花仙子方块 未来Mod: - 修改颜色配置; 只显示场地边框线/顶线; 骨块皮肤; 隐藏hold + 修改颜色配置; 只显示场地边框线/顶线; 隐藏hold 未来按键: 移动左4~右5(+硬降) (共18键) 临时启用瞬间移动; 临时禁用das @@ -19,8 +19,8 @@ return STRING.split([=[ Tetra-link; 速算(前缀后缀表达式,二八十六进制) 连连看; 求合体; 坦克大战; 扫雷; 接水管 其他未来内容: - 可调场地宽度; 可调攻击系统; 组队战; 实时统计数据可视化 - 重做模式选择UI; 重做模组UI; 高级自定义序列 + 大型任务树模式; 可调场地宽度; 可调攻击系统; 组队战; 实时统计数据可视化 + 重做模式选择UI; 重做模组UI; 高级自定义序列; 加速下落 方块位移/旋转动画; 更好的手柄支持; 场地格子边缘线 spike相关统计数据; 模式数据分析; 简单TAS工具 音效包; 手势操作; 特殊控件(虚拟摇杆等) @@ -29,7 +29,7 @@ return STRING.split([=[ 更细节的DAS选项; 成就系统; 拓展主题系统 工程编译到字节码; task-Z(新AI) 等级系统; 收集向抽奖玩法; 自适应UI - 自动跳帧; 多方块; 超60帧; 第一次启动相关引导 + 自动跳帧; 多方块; 超60帧 0.16.0: 空间站 Space station 新增: From 8d44046a90658ab50c13ae9f59edfc3a6fd5997a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 14:27:05 +0800 Subject: [PATCH 05/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dasc=E8=B8=A2=E5=A2=99?= =?UTF-8?q?=E8=A1=A8=E7=AC=AC=E4=B8=80=E9=A1=B9=E4=B8=8D=E6=98=AF00?= =?UTF-8?q?=E5=92=8C=E6=8C=89180=E5=BA=A6=E6=97=8B=E8=BD=AC=E4=BC=9A?= =?UTF-8?q?=E7=88=86=E7=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index b06b767c..ea384a9e 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -565,14 +565,15 @@ end local ASC do - local L={"+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} + local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} local R=flipList(L) - vecStrConv(L)vecStrConv(R) + local F={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} + vecStrConv(L)vecStrConv(R)vecStrConv(F) ASC={ { [01]=R,[10]=L,[03]=L,[30]=R, [12]=R,[21]=L,[32]=L,[23]=R, - [02]=noKickSet_180,[20]=noKickSet_180,[13]=noKickSet_180,[31]=noKickSet_180, + [02]=F,[20]=F,[13]=F,[31]=F, } } for i=2,29 do ASC[i]=ASC[1]end @@ -580,9 +581,9 @@ end local ASCplus do - local L={"+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} + local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} local R=flipList(L) - local F={"-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} + local F={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} vecStrConv(L)vecStrConv(R)vecStrConv(F) ASCplus={ { From 98385b8b569c9b56e5213052db3dd6a7c1363be8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 14:45:31 +0800 Subject: [PATCH 06/70] =?UTF-8?q?=E6=94=B9=E5=AF=B9readme=E9=87=8C?= =?UTF-8?q?=E5=AE=98=E7=BD=91=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25823f3f..cf448641 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ 集合各种现代方块规则,更多玩法,全新体验。 -官网(建设中) https://home.techmino.org +官网(建设中) http://home.techmino.org From f537b3666284bbae8568fead48e784f8f8a21f9a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 15:42:26 +0800 Subject: [PATCH 07/70] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=8D=E5=85=B8?= =?UTF-8?q?=E4=B8=ADppt=E8=AF=8D=E6=9D=A1=E8=AF=B4=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/dict_zh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/language/dict_zh.lua b/parts/language/dict_zh.lua index 6c360633..3358b5ea 100644 --- a/parts/language/dict_zh.lua +++ b/parts/language/dict_zh.lua @@ -145,7 +145,7 @@ return{ {"Puyopuyo Tetris", "噗哟方块 ppt puyopuyotetris", "game", - "简称PPT,多平台方块(steamPC版手感,网络等都不太好,不建议购买),将tetris和puyopuyo两个下落消除游戏放到一个游戏里,二者可以对战,联机单机模式都很多,很有趣", + "简称PPT,多平台方块(steamPC版相对NS版手感和网络等都不太好),将tetris和puyopuyo两个下落消除游戏放到一个游戏里,二者可以对战,联机单机模式都很多,很有趣", }, {"Tetris Online", "top tetris online study", From 43019185a8773688a5ef7b53fc11221ccd2553dd Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 15:42:53 +0800 Subject: [PATCH 08/70] =?UTF-8?q?TRS=E7=9A=84R/Y=E5=9D=97=E8=B8=A2?= =?UTF-8?q?=E5=A2=99=E8=A1=A8=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index ea384a9e..6a05e300 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -322,8 +322,8 @@ do { [01]={'-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, [10]={'-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, - [03]={'+0-1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [03]={'+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, [32]={'+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, From 450483acc7246f8db30debba4f3f5cc6a4dcc4df Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 15:43:19 +0800 Subject: [PATCH 09/70] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/background.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zframework/background.lua b/Zframework/background.lua index d9011323..4707882c 100644 --- a/Zframework/background.lua +++ b/Zframework/background.lua @@ -1,6 +1,6 @@ local gc_clear=love.graphics.clear local BGs={ - none={draw=function()gc_clear(.15,.15,.15)end} + none={draw=function()gc_clear(.08,.08,.09)end} } local BGlist={'none'} local BG={ From a9d2f097d8ae88ce428c11bc565113020bc6edac Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 17:37:16 +0800 Subject: [PATCH 10/70] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E5=86=85ui=E5=92=8C=E6=8E=A7=E4=BB=B6ui=EF=BC=9A=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=83=8C=E6=99=AF=E8=89=B2=E8=B0=83=E6=95=B4=20?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E7=BA=AF=E7=99=BD=E8=89=B2=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20=E5=87=8F=E5=B0=8F=E7=BA=BF=E5=AE=BD=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=9C=86=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/background.lua | 2 +- Zframework/color.lua | 2 +- Zframework/widget.lua | 103 +++++++++++++------------ parts/backgrounds/aura.lua | 2 +- parts/backgrounds/bg1.lua | 2 +- parts/backgrounds/bg2.lua | 2 +- parts/backgrounds/blockrain.lua | 2 +- parts/backgrounds/lanterns.lua | 2 +- parts/backgrounds/league.lua | 2 +- parts/backgrounds/rainbow.lua | 2 +- parts/backgrounds/rainbow2.lua | 2 +- parts/backgrounds/snow.lua | 2 +- parts/backgrounds/space.lua | 2 +- parts/backgrounds/tunnel.lua | 2 +- parts/backgrounds/welcome.lua | 2 +- parts/player/draw.lua | 131 ++++++++++++++++---------------- parts/scenes/game.lua | 20 ++--- parts/scenes/load.lua | 2 +- parts/scenes/mode.lua | 2 +- parts/texture.lua | 15 ++-- 20 files changed, 156 insertions(+), 145 deletions(-) diff --git a/Zframework/background.lua b/Zframework/background.lua index 4707882c..f3f5674e 100644 --- a/Zframework/background.lua +++ b/Zframework/background.lua @@ -1,6 +1,6 @@ local gc_clear=love.graphics.clear local BGs={ - none={draw=function()gc_clear(.08,.08,.09)end} + none={draw=function()gc_clear(.08,.08,.084)end} } local BGlist={'none'} local BG={ diff --git a/Zframework/color.lua b/Zframework/color.lua index 6c1069fb..6c0dca7a 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -54,7 +54,7 @@ local COLOR={ dGray= {0.3, 0.3, 0.3}, gray= {0.6, 0.6, 0.6}, lGray= {0.8, 0.8, 0.8}, - white= {1.0, 1.0, 1.0}, + white= {.97, .97, .97}, } for k,v in next,{ R='red',F='fire',O='orange',Y='yellow',L='lime',J='jade',G='green',A='aqua',C='cyan',N='navy',S='sea',B='blue',V='violet',P='purple',M='magenta',W='wine', diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 92e89d2b..6304b602 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -166,39 +166,43 @@ function button:draw() local ATV=self.ATV local c=self.color local r,g,b=c[1],c[2],c[3] - gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) - gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV) + + --Button + gc_setColor(.15+r*.7,.15+g*.7,.15+b*.7,.9) + gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV,3) if ATV>0 then - gc_setLineWidth(4) - gc_setColor(1,1,1,ATV*.125) - gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4) + gc_setLineWidth(2) + gc_setColor(.97,.97,.975,ATV*.125) + gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4,3) end + + --Object local obj=self.obj local y0=y+h*.5-ATV*.5 gc_setColor(1,1,1,.2+ATV*.05) if self.align=='M'then local x0=x+w*.5 - mDraw(obj,x0-1.5,y0-1.5) - mDraw(obj,x0-1.5,y0+1.5) - mDraw(obj,x0+1.5,y0-1.5) - mDraw(obj,x0+1.5,y0+1.5) - gc_setColor(r*.5,g*.5,b*.5) + mDraw(obj,x0-1,y0-1) + mDraw(obj,x0-1,y0+1) + mDraw(obj,x0+1,y0-1) + mDraw(obj,x0+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) mDraw(obj,x0,y0) elseif self.align=='L'then local edge=self.edge - mDraw_Y(obj,x+edge-1.5,y0-1.5) - mDraw_Y(obj,x+edge-1.5,y0+1.5) - mDraw_Y(obj,x+edge+1.5,y0-1.5) - mDraw_Y(obj,x+edge+1.5,y0+1.5) - gc_setColor(r*.5,g*.5,b*.5) + mDraw_Y(obj,x+edge-1,y0-1) + mDraw_Y(obj,x+edge-1,y0+1) + mDraw_Y(obj,x+edge+1,y0-1) + mDraw_Y(obj,x+edge+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) mDraw_Y(obj,x+edge,y0) elseif self.align=='R'then local x0=x+w-self.edge-obj:getWidth() - mDraw_Y(obj,x0-1.5,y0-1.5) - mDraw_Y(obj,x0-1.5,y0+1.5) - mDraw_Y(obj,x0+1.5,y0-1.5) - mDraw_Y(obj,x0+1.5,y0+1.5) - gc_setColor(r*.5,g*.5,b*.5) + mDraw_Y(obj,x0-1,y0-1) + mDraw_Y(obj,x0-1,y0+1) + mDraw_Y(obj,x0+1,y0-1) + mDraw_Y(obj,x0+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) mDraw_Y(obj,x0,y0) end end @@ -290,11 +294,11 @@ function key:draw() local r,g,b=c[1],c[2],c[3] gc_setColor(1,1,1,ATV*.1) - gc_rectangle('fill',x,y,w,h) + gc_rectangle('fill',x,y,w,h,3) gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) - gc_setLineWidth(4) - gc_rectangle('line',x,y,w,h) + gc_setLineWidth(2) + gc_rectangle('line',x,y,w,h,3) gc_setColor(r,g,b,1.2) if self.align=='M'then @@ -375,22 +379,22 @@ function switch:draw() local x,y=self.x,self.y-25 local ATV=self.ATV + --Frame + gc_setLineWidth(2) + gc_setColor(1,1,1,.6+ATV*.1) + gc_rectangle('line',x,y,50,50,3) + --Checked if ATV>0 then - gc_setColor(1,1,1,ATV*.08) - gc_rectangle('fill',x,y,50,50) + gc_setColor(1,1,1,ATV*.06) + gc_rectangle('fill',x,y,50,50,3) end if self.CHK>0 then gc_setColor(.9,1,.9,self.CHK/6) - gc_setLineWidth(6) + gc_setLineWidth(5) gc_line(x+5,y+25,x+18,y+38,x+45,y+11) end - --Frame - gc_setLineWidth(4) - gc_setColor(1,1,1,.6+ATV*.05) - gc_rectangle('line',x,y,50,50) - --Drawable gc_setColor(self.color) mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y+25) @@ -501,16 +505,19 @@ function slider:draw() local cx=x+(x2-x)*self.pos/self.unit local bx,by,bw,bh=cx-10-ATV*.5,y-16-ATV,20+ATV,32+2*ATV gc_setColor(.8,.8,.8) - gc_rectangle('fill',bx,by,bw,bh) + gc_rectangle('fill',bx,by,bw,bh,3) + --Glow if ATV>0 then gc_setLineWidth(2) - gc_setColor(1,1,1,ATV*.16) - gc_rectangle('line',bx+1,by+1,bw-2,bh-2) + gc_setColor(.97,.97,.975,ATV*.16) + gc_rectangle('line',bx+1,by+1,bw-2,bh-2,3) end + + --Float text if self.TAT>0 and self.show then setFont(25) - gc_setColor(1,1,1,self.TAT/180) + gc_setColor(.97,.97,.975,self.TAT/180) mStr(self:show(),cx,by-30) end @@ -657,10 +664,12 @@ function selector:draw() local w=self.w local ATV=self.ATV + --Frame gc_setColor(1,1,1,.6+ATV*.1) - gc_setLineWidth(3) - gc_rectangle('line',x,y,w,60) + gc_setLineWidth(2) + gc_rectangle('line',x,y,w,60,3) + --Arrow gc_setColor(1,1,1,.2+ATV*.1) local t=(TIME()%.5)^.5 if self.select>1 then @@ -815,11 +824,11 @@ function inputBox:draw() local ATV=self.ATV gc_setColor(1,1,1,ATV*.08) - gc_rectangle('fill',x,y,w,h) + gc_rectangle('fill',x,y,w,h,3) gc_setColor(1,1,1) gc_setLineWidth(3) - gc_rectangle('line',x,y,w,h) + gc_rectangle('line',x,y,w,h,3) --Drawable setFont(self.font) @@ -971,12 +980,12 @@ function textBox:draw() --Background gc_setColor(0,0,0,.4) - gc_rectangle('fill',x,y,w,h) + gc_rectangle('fill',x,y,w,h,3) --Frame - gc_setLineWidth(3) + gc_setLineWidth(2) gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) - gc_rectangle('line',x,y,w,h) + gc_rectangle('line',x,y,w,h,3) --Texts setFont(self.font) @@ -987,12 +996,12 @@ function textBox:draw() gc_setColor(1,1,1) if #texts>cap then local len=h*h/(#texts*lineH) - gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len) + gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len,3) end --Clear button if not self.fix then - gc_rectangle('line',w-40,0,40,40) + gc_rectangle('line',w-40,0,40,40,3) gc_draw(self.sure==0 and clearIcon or sureIcon,w-40,0) end @@ -1144,14 +1153,14 @@ function listBox:draw() --Frame gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) - gc_setLineWidth(3) - gc_rectangle('line',0,0,w,h) + gc_setLineWidth(2) + gc_rectangle('line',0,0,w,h,3) --Slider if #list>cap then gc_setColor(1,1,1) local len=h*h/(#list*lineH) - gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len) + gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len,3) end --List diff --git a/parts/backgrounds/aura.lua b/parts/backgrounds/aura.lua index f9c36d9a..3ee69ac0 100644 --- a/parts/backgrounds/aura.lua +++ b/parts/backgrounds/aura.lua @@ -16,7 +16,7 @@ function back.update(dt) t=t+dt end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) shader:send('t',t) gc.setShader(shader) gc.rectangle('fill',0,0,SCR.w,SCR.h) diff --git a/parts/backgrounds/bg1.lua b/parts/backgrounds/bg1.lua index c320b50b..a20da4c4 100644 --- a/parts/backgrounds/bg1.lua +++ b/parts/backgrounds/bg1.lua @@ -15,7 +15,7 @@ function back.update(dt) t=t+dt end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) shader:send('t',t) gc.setShader(shader) gc.rectangle('fill',0,0,SCR.w,SCR.h) diff --git a/parts/backgrounds/bg2.lua b/parts/backgrounds/bg2.lua index 1d674635..32905e58 100644 --- a/parts/backgrounds/bg2.lua +++ b/parts/backgrounds/bg2.lua @@ -15,7 +15,7 @@ function back.update(dt) t=t+dt end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) shader:send('t',t) gc.setShader(shader) gc.rectangle('fill',0,0,SCR.w,SCR.h) diff --git a/parts/backgrounds/blockrain.lua b/parts/backgrounds/blockrain.lua index e08ab18b..c0318012 100644 --- a/parts/backgrounds/blockrain.lua +++ b/parts/backgrounds/blockrain.lua @@ -40,7 +40,7 @@ function back.update() end end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) for i=1,#mino do local C=mino[i] local c=C.color diff --git a/parts/backgrounds/lanterns.lua b/parts/backgrounds/lanterns.lua index 7e526718..deb362ec 100644 --- a/parts/backgrounds/lanterns.lua +++ b/parts/backgrounds/lanterns.lua @@ -37,7 +37,7 @@ function back.update(dt) end end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) gc.setColor(1,1,1,.2) local img=IMG.lanterns for i=1,#lanterns do diff --git a/parts/backgrounds/league.lua b/parts/backgrounds/league.lua index afc4b541..521fdc04 100644 --- a/parts/backgrounds/league.lua +++ b/parts/backgrounds/league.lua @@ -29,7 +29,7 @@ end function back.update() end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) gc.draw(upCover,0,0,0,W,H*.3/64) gc.draw(downCover,0,H*.7,0,W,H*.3/64) end diff --git a/parts/backgrounds/rainbow.lua b/parts/backgrounds/rainbow.lua index 87a845bb..37bef15d 100644 --- a/parts/backgrounds/rainbow.lua +++ b/parts/backgrounds/rainbow.lua @@ -16,7 +16,7 @@ function back.update(dt) t=t+dt end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) shader:send('t',t) gc.setShader(shader) gc.rectangle('fill',0,0,SCR.w,SCR.h) diff --git a/parts/backgrounds/rainbow2.lua b/parts/backgrounds/rainbow2.lua index 3bef1d07..7c3d9605 100644 --- a/parts/backgrounds/rainbow2.lua +++ b/parts/backgrounds/rainbow2.lua @@ -16,7 +16,7 @@ function back.update(dt) t=t+dt end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) shader:send('t',t) gc.setShader(shader) gc.rectangle('fill',0,0,SCR.w,SCR.h) diff --git a/parts/backgrounds/snow.lua b/parts/backgrounds/snow.lua index 3b7fa750..dbee262c 100644 --- a/parts/backgrounds/snow.lua +++ b/parts/backgrounds/snow.lua @@ -38,7 +38,7 @@ function back.update() end end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) gc.setColor(.7,.7,.7) for i=1,#snow do local P=snow[i] diff --git a/parts/backgrounds/space.lua b/parts/backgrounds/space.lua index 21c301a4..1a755f16 100644 --- a/parts/backgrounds/space.lua +++ b/parts/backgrounds/space.lua @@ -31,7 +31,7 @@ function back.update() end end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) if not stars[1]then return end gc.translate(-10,-10) gc.setColor(1,1,1,.6) diff --git a/parts/backgrounds/tunnel.lua b/parts/backgrounds/tunnel.lua index d632c918..f3449fe5 100644 --- a/parts/backgrounds/tunnel.lua +++ b/parts/backgrounds/tunnel.lua @@ -29,7 +29,7 @@ function back.update(dt) end end function back.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) gc.setColor(1,1,1,.1) for i=1,#ring do local r=ring[i]^2/12 diff --git a/parts/backgrounds/welcome.lua b/parts/backgrounds/welcome.lua index be12b871..3604077b 100644 --- a/parts/backgrounds/welcome.lua +++ b/parts/backgrounds/welcome.lua @@ -16,7 +16,7 @@ function back.draw() if -t%13.55<.1283 then gc.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t)) else - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) end gc.push('transform') gc.translate(SCR.cx,SCR.cy+20*sin(t*.02)) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index d31f1dde..62c8af66 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -29,12 +29,14 @@ local hideBoardStencil={ down=function()gc_rectangle('fill',0,300,300,300)end, all=function()gc_rectangle('fill',0,0,300,600)end, } -local dialFrame=DOGC{70,70, +local dialFrame=DOGC{97,32, {'setLW',2}, - {'dCirc',35,35,30,6}, - {'setCL',1,1,1,.6}, - {'setLW',4}, - {'dCirc',35,35,30,6}, + {'dRect',1,1,30,30,3}, + {'dRect',36,1,60,30,3}, +} +local dialNeedle=DOGC{22,4, + {'fRect',0,1,20,2}, + {'fCirc',20,2,2}, } local multiple=DOGC{15,15, {'setLW',3}, @@ -51,11 +53,13 @@ local spinCenterImg=DOGC{9,9, {'setCL',1,1,1}, {'fRect',3,3,3,3}, } -local playerBoarders=DOGC{334,614, +local playerBoarders=DOGC{334,620, {'setLW',2}, - {'dRect',16,1,302,612}, - {'dRect',318,9,15,604}, - {'dRect',1,9,15,604}, + {'setCL',.97,.97,.975}, + {'dRect',16,1,302,618,7}, + {'fRect',17,612,300,2}, + {'dRect',318,9,15,596,3}, + {'dRect',1,9,15,596,3}, } local gridLines do local L={300,640,{'setLW',2}} @@ -63,7 +67,7 @@ local gridLines do for y=0,20 do table.insert(L,{'line',0,10+30*y,300,10+30*y})end gridLines=DOGC(L) end -local LDmarks=gc.newSpriteBatch(DOGC{14,5,{'clear',1,1,1}},15,'static') +local LDmarks=gc.newSpriteBatch(DOGC{14,5,{'fRect',0,0,14,5,3}},15,'static') for i=0,14 do LDmarks:add(3+20*i,615)end local bpmImage=DOGC{31,12, {'setFT',15}, @@ -322,7 +326,7 @@ local function drawBuffer(P) for i=1,#P.atkBuffer do local A=P.atkBuffer[i] local bar=A.amount*30 - if h+bar>600 then bar=600-h end + if h+bar>600-8 then bar=600-8-h end if not A.sent then --Appear if A.time<20 then @@ -331,24 +335,24 @@ local function drawBuffer(P) if A.countdown>0 then --Timing gc_setColor(attackColor[A.lv][1]) - gc_rectangle('fill',303,599-h,11,-bar) + gc_rectangle('fill',303,591-h-bar,11,bar,2) gc_setColor(1,1,1) for j=30,A.cd0-30,30 do - gc_rectangle('fill',303,599-h-bar*(j/A.cd0),6,2) + gc_rectangle('fill',303,591-h-bar*(j/A.cd0),6,2) end gc_setColor(attackColor[A.lv][2]) - gc_rectangle('fill',303,599-h-bar,11,bar*(1-A.countdown/A.cd0)) + gc_rectangle('fill',303,591-h-bar,11,bar*(1-A.countdown/A.cd0),2) else --Warning local a=math.sin((TIME()-i)*30)*.5+.5 local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2] gc_setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a)) - gc_rectangle('fill',303,599-h,11,-bar) + gc_rectangle('fill',303,591-h-bar,11,bar,2) end else gc_setColor(attackColor[A.lv][1]) bar=bar*(20-A.time)*.05 - gc_rectangle('fill',303,599-h,11,-bar) + gc_rectangle('fill',303,591-h-bar,11,bar,2) --Disappear end h=h+bar @@ -375,22 +379,22 @@ end local function drawB2Bbar(P) local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end gc_setColor(.8,1,.2) - gc_rectangle('fill',-14,599,11,-b*.6) - gc_setColor(P.b2b<40 and COLOR.Z or P.b2b<=800 and COLOR.lR or COLOR.lB) - gc_rectangle('fill',-14,599,11,-a*.6) + gc_rectangle('fill',-14,591,11,-b*.592) + gc_setColor(P.b2b<50 and COLOR.Z or P.b2b<=800 and COLOR.lR or COLOR.lB) + gc_rectangle('fill',-14,591,11,-a*.592) if TIME()%.5<.3 then gc_setColor(1,1,1) - gc_rectangle('fill',-15,b<40 and 568.5 or 118.5,13,3) + gc_rectangle('fill',-15,b<50 and 560 or 116,13,3,2) end end local function drawLDI(P,ENV)--Lock Delay Indicator if ENV.easyFresh then - gc_setColor(1,1,1) + gc_setColor(.97,.97,.975) else - gc_setColor(1,.26,.26) + gc_setColor(1,.5,.5) end if P.lockDelay>=0 then - gc_rectangle('fill',0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator + gc_rectangle('fill',0,602,300*P.lockDelay/ENV.lock,4) end if P.freshTime>0 then LDmarks:setDrawRange(1,min(P.freshTime,15)) @@ -404,22 +408,18 @@ local function drawHold(P) local holdQueue=P.holdQueue local N=ENV.holdCount*72 gc_push('transform') - gc_translate(-140,20) - gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,124,N+8) - gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8) - if #holdQueue2 and 2.2/#bk or 1 + local k=min(3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then @@ -434,10 +434,10 @@ local function drawHold(P) gc_pop() end local function drawDial(x,y,speed) - gc_setColor(1,1,1) - setFont(25)mStr(int(speed),x,y-18) - gc_draw(dialFrame,x,y,nil,nil,nil,35,35) - gc_draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4) + gc_setColor(.97,.97,.975) + gc_draw(dialFrame,x,y) + gc_draw(dialNeedle,x+26,y+26,speed<=175 and .00698*speed or 1.571-17.453/(speed-125),nil,nil,20,2) + setFont(25)mStr(int(speed),x+66,y-2) end local function drawFinesseCombo_norm(P) if P.finesseCombo>2 then @@ -468,13 +468,13 @@ local function drawFinesseCombo_remote(P) elseif S.maxFinesseCombo==S.piece then gc_setColor(.7,.7,1) else - gc_setColor(1,1,1) + gc_setColor(.97,.97,.975) end gc_print(P.finesseCombo.."x",20,570) end end local function drawLife(life) - gc_setColor(1,1,1) + gc_setColor(.97,.97,.975) gc_draw(IMG.lifeIcon,475,595,nil,.8) if life>3 then gc_draw(multiple,502,602) @@ -494,7 +494,7 @@ local function drawMission(P) if P.gameEnv.missionkill then gc_setColor(1,.7+.2*sin(TIME()*6.26),.4) else - gc_setColor(1,1,1) + gc_setColor(.97,.97,.975) end gc_print(missionEnum[L[cur]],85,110) @@ -538,18 +538,18 @@ draw.drawGhost=drawGhost function draw.drawNext_norm(P) local ENV=P.gameEnv local texture=P.skinLib - gc_translate(316,20) + gc_translate(488,20) local N=ENV.nextCount*72 - gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,124,N+8) - gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8) + gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) + gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,100,N+8,5) N=1 gc_push('transform') - gc_translate(62,40) + gc_translate(50,40) gc_setShader(shader_blockSatur) local queue=P.nextQueue while N<=ENV.nextCount and queue[N]do local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=#bk>2 and 2.2/#bk or 1 + local k=min(3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then @@ -566,18 +566,18 @@ function draw.drawNext_norm(P) if ENV.bagLine then gc_setColor(.8,.5,.5) for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase - gc_rectangle('fill',2,72*i+3,120,2) + gc_rectangle('fill',2,72*i+3,96,2) end end - gc_translate(-316,-20) + gc_translate(-488,-20) end function draw.drawNext_hidden(P) local ENV=P.gameEnv local texture=P.skinLib - gc_translate(316,20) + gc_translate(476,20) local N=ENV.nextCount*72 gc_setColor(.5,0,0,.4)gc_rectangle('fill',0,0,124,N+8) - gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8) + gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,124,N+8) N=min(ENV.nextStartPos,P.pieceCount+1) gc_push('transform') gc_translate(62,40) @@ -585,7 +585,7 @@ function draw.drawNext_hidden(P) local queue=P.nextQueue while N<=ENV.nextCount and queue[N]do local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=#bk>2 and 2.2/#bk or 1 + local k=min(3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then @@ -602,10 +602,10 @@ function draw.drawNext_hidden(P) if ENV.bagLine then gc_setColor(.8,.5,.5) for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase - gc_rectangle('fill',2,72*i+3,120,2) + gc_rectangle('fill',2,72*i+3,96,2) end end - gc_translate(-316,-20) + gc_translate(-476,-20) end function draw.drawTargetLine(P,r) local d=P.fieldBeneath+P.fieldUp @@ -635,7 +635,7 @@ function draw.norm(P) --Draw username setFont(30) - gc_setColor(1,1,1) + gc_setColor(.97,.97,.975) mStr(P.username,150,-60) --Fill field @@ -730,8 +730,6 @@ function draw.norm(P) gc_setStencilTest() gc_setLineWidth(2) - P:drawNext() - drawHold(P) drawBuffer(P) drawB2Bbar(P) drawLDI(P,ENV) @@ -797,6 +795,9 @@ function draw.norm(P) -- gc_line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30) gc_pop() + P:drawNext() + drawHold(P) + --Mode informations if GAME.curMode.mesDisp then gc_setColor(1,1,1) @@ -805,13 +806,13 @@ function draw.norm(P) --Speed dials & FinesseCombo if P.type=='remote'then - drawDial(535,545,P.dropSpeed) + drawDial(490,520,P.dropSpeed) drawFinesseCombo_remote(P) else - drawDial(510,515,P.dropSpeed) - drawDial(555,570,P.keySpeed) - gc_draw(bpmImage,540,490) - gc_draw(kpmImage,494,583) + drawDial(490,490,P.dropSpeed) + drawDial(490,550,P.keySpeed) + gc_draw(bpmImage,550,525) + gc_draw(kpmImage,550,585) drawFinesseCombo_norm(P) end @@ -821,8 +822,8 @@ function draw.norm(P) gc_setColor(0,0,0,.3) gc_print(P.score1,18,509) gc_print(tm,18,539) - gc_setColor(COLOR.lY)gc_print(P.score1,20,510) - gc_setColor(COLOR.N)gc_print(tm,20,540) + gc_setColor(.97,.97,.92)gc_print(P.score1,20,510) + gc_setColor(.85,.9,1)gc_print(tm,20,540) if P.life>0 then drawLife(P.life)end drawMission(P) @@ -897,10 +898,10 @@ function draw.demo(P) --Frame gc_setColor(0,0,0,.6) - gc_rectangle('fill',0,0,300,600) + gc_rectangle('fill',0,0,300,600,3) gc_setLineWidth(2) - gc_setColor(1,1,1) - gc_rectangle('line',-1,-1,302,602) + gc_setColor(.97,.97,.975) + gc_rectangle('line',-1,-1,302,602,3) gc_push('transform') gc_translate(0,600) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 7c35345e..5944d16f 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -302,7 +302,7 @@ function scene.draw() --Mode info gc.setColor(1,1,1,.8) - gc.draw(drawableText.modeName,940,0) + gc.draw(drawableText.modeName,1125-drawableText.modeName:getWidth(),10) --Replaying if replaying then @@ -318,15 +318,15 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="rep0", fText=TEXTURE.rep.rep0,x=40,y=50,w=60,code=_rep0}, - WIDGET.newKey{name="repP8", fText=TEXTURE.rep.repP8,x=105,y=50,w=60,code=_repP8}, - WIDGET.newKey{name="repP2", fText=TEXTURE.rep.repP2,x=170,y=50,w=60,code=_repP2}, - WIDGET.newKey{name="rep1", fText=TEXTURE.rep.rep1,x=235,y=50,w=60,code=_rep1}, - WIDGET.newKey{name="rep2", fText=TEXTURE.rep.rep2,x=300,y=50,w=60,code=_rep2}, - WIDGET.newKey{name="rep5", fText=TEXTURE.rep.rep5,x=365,y=50,w=60,code=_rep5}, - WIDGET.newKey{name="step", fText=TEXTURE.rep.step,x=430,y=50,w=60,code=_step}, - WIDGET.newKey{name="restart", fText="R",x=380,y=35,w=60,font=40,code=restart}, - WIDGET.newKey{name="pause", fText="II",x=900,y=35,w=60,font=40,code=pauseGame}, + WIDGET.newKey{name="rep0", x=40,y=50,w=60,code=_rep0,fText=TEXTURE.rep.rep0}, + WIDGET.newKey{name="repP8", x=105,y=50,w=60,code=_repP8,fText=TEXTURE.rep.repP8}, + WIDGET.newKey{name="repP2", x=170,y=50,w=60,code=_repP2,fText=TEXTURE.rep.repP2}, + WIDGET.newKey{name="rep1", x=235,y=50,w=60,code=_rep1,fText=TEXTURE.rep.rep1}, + WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2}, + WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5}, + WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step}, + WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText="R"}, + WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=DOGC{20,25,{'fRect',0,0,3,25},{'fRect',17,0,3,25}}}, } return scene \ No newline at end of file diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index 1a73b3a8..1b32328b 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -179,7 +179,7 @@ local titleTransform={ } local titleColor={COLOR.lP,COLOR.lC,COLOR.lB,COLOR.lO,COLOR.lF,COLOR.lM,COLOR.lG,COLOR.lY} function scene.draw() - gc.clear(.1,.1,.1) + gc.clear(.08,.08,.084) local T=(t1+110)%300 if T<30 then diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index e52a7b76..b8c8578e 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -241,7 +241,7 @@ function scene.draw() --Modes setFont(80) - gc_setLineWidth(6) + gc_setLineWidth(4) for name,M in next,MODES do if R[name]then local rank=R[name] diff --git a/parts/texture.lua b/parts/texture.lua index 878e7716..8e7c77c1 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -134,9 +134,9 @@ TEXTURE.setting=DOGC{64,64, --Music mark TEXTURE.music=DOGC{64,64, - {'setLW',7}, + {'setLW',6}, {'line',19,9,60,7}, - {'setLW',4}, + {'setLW',2}, {'line',20,9,20,49}, {'line',59,7,59,47}, {'fElps',11,49,11,8}, @@ -146,13 +146,13 @@ TEXTURE.music=DOGC{64,64, --Mute mark TEXTURE.mute=DOGC{64,64, {'mDraw',TEXTURE.music,32,32,0,.9}, - {'setLW',5}, + {'setLW',4}, {'line',6,6,57,57}, } --Language mark TEXTURE.language=DOGC{64,64, - {'setLW',4}, + {'setLW',2}, {'dCirc',32,32,30}, {'line',2,31,62,31}, {'line',31,2,31,62}, @@ -162,7 +162,7 @@ TEXTURE.language=DOGC{64,64, --Info. mark TEXTURE.info=DOGC{50,50, - {'setLW',5}, + {'setLW',3}, {'dCirc',25,25,22}, {'fRect',22,11,6,6}, {'fRect',22,20,6,20}, @@ -170,9 +170,10 @@ TEXTURE.info=DOGC{50,50, --Question mark TEXTURE.question=DOGC{50,50, - {'setLW',5}, + {'setLW',3}, {'dCirc',25,25,22}, - {'print','?',16,-6}, + {'setFT',40}, + {'print','?',17,-2}, } --More mark From 5fa3be58864cde6b7f25a87d439a76f8c5582b12 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 22:08:11 +0800 Subject: [PATCH 11/70] =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E4=B8=89=E6=A0=BC?= =?UTF-8?q?=E9=AB=98=E7=9A=84=E6=96=B9=E5=9D=97=E5=9C=A8next/hold=E9=87=8C?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/draw.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 62c8af66..553e8e28 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -419,7 +419,7 @@ local function drawHold(P) if n==N then gc_setColor(.6,.4,.4)end local bk,clr=holdQueue[n].bk,holdQueue[n].color local texture=P.skinLib[clr] - local k=min(3/#bk,3/#bk[1],.85) + local k=min(2.3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then @@ -549,7 +549,7 @@ function draw.drawNext_norm(P) local queue=P.nextQueue while N<=ENV.nextCount and queue[N]do local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=min(3/#bk,3/#bk[1],.85) + local k=min(2.3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then @@ -585,7 +585,7 @@ function draw.drawNext_hidden(P) local queue=P.nextQueue while N<=ENV.nextCount and queue[N]do local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=min(3/#bk,3/#bk[1],.85) + local k=min(2.3/#bk,3/#bk[1],.85) gc_scale(k) for i=1,#bk do for j=1,#bk[1]do if bk[i][j]then From 8a740091b3b8bf57d18a5b2ab2c631983254907b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 5 Aug 2021 22:15:03 +0800 Subject: [PATCH 12/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8DARS=E7=9A=84180?= =?UTF-8?q?=E6=9C=89=E8=B8=A2=E5=A2=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index 6a05e300..7630096d 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -567,7 +567,7 @@ local ASC do local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} local R=flipList(L) - local F={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} + local F={"+0+0"} vecStrConv(L)vecStrConv(R)vecStrConv(F) ASC={ { From fa0848c8b2dd09ff8d615265ae06aecba9573466 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 00:14:43 +0800 Subject: [PATCH 13/70] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BD=95=E5=83=8F?= =?UTF-8?q?=E5=9B=9E=E6=94=BE=E6=97=B6=E9=80=90=E5=B8=A7=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8C=89=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81=E6=9C=AA=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/game.lua | 1 + parts/texture.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 5944d16f..86815ad6 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -153,6 +153,7 @@ function scene.keyDown(key,isRep) else if key=="space"then if not isRep then replayRate=replayRate==0 and 1 or 0 end + updateRepButtons() elseif key=="right"then if replayRate==0 then _step() diff --git a/parts/texture.lua b/parts/texture.lua index 8e7c77c1..e3952245 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -221,7 +221,7 @@ TEXTURE.rep={ rep1=DOGC{50,50,{'setFT',30},{'print',"1x",7,3}}, rep2=DOGC{50,50,{'setFT',30},{'print',"2x",7,3}}, rep5=DOGC{50,50,{'setFT',30},{'print',"5x",7,3}}, - step=DOGC{50,50,{'setFT',30},{'fRect',12,5,4,40},{'setLW',4},{'line',25,14,41,25,25,36}}, + step=DOGC{50,50,{'setFT',30},{'fRect',12,7,4,36},{'setLW',4},{'line',25,14,41,25,25,36}}, } gc.setCanvas() From e7f77291e4b4680bcf115fb87b19acf5cf059e94 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 00:22:19 +0800 Subject: [PATCH 14/70] =?UTF-8?q?=E4=BF=AE=E6=B8=B8=E6=88=8F=E4=B8=ADui?= =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/draw.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 553e8e28..3db4f89f 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -795,6 +795,7 @@ function draw.norm(P) -- gc_line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30) gc_pop() + gc_setLineWidth(2) P:drawNext() drawHold(P) From 20fb2a3e92d9c72943e90474f1b35ca30654a97a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 00:22:35 +0800 Subject: [PATCH 15/70] =?UTF-8?q?=E5=A4=A7=E6=94=B9=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 186 +++++++++++++++++++++-------------------- 1 file changed, 97 insertions(+), 89 deletions(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index da8fbb85..2b6e02f1 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -29,7 +29,7 @@ local trophyColor--Current trophy color function scene.sceneInit(org) if org:find("setting")then - TEXT.show(text.needRestart,640,440,50,'fly',.6) + TEXT.show(text.needRestart,640,410,50,'fly',.6) end local P=PLAYERS[1] local S=P.stat @@ -174,7 +174,7 @@ function scene.draw() --Dark BG local _=T - if GAME.result then _=_*.7 end + if GAME.result then _=_*.76 end gc.setColor(.15,.15,.15,_) gc.replaceTransform(SCR.origin) gc.rectangle('fill',0,0,SCR.w,SCR.h) @@ -183,111 +183,91 @@ function scene.draw() --Pause Info setFont(25) if GAME.pauseCount>0 then - gc.setColor(1,.4,.4,T) - gc.print(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),40,180) + gc.setColor(.96,.92,.92,T) + mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),640,510) end - gc.setColor(1,1,1,T) + gc.setColor(.97,.97,.97,T) --Result Text setFont(35) - mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,100-10*(5-timer*.1)^1.5) + mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,90-10*(5-timer*.1)^1.5) --Mode Info - gc.draw(drawableText.modeName,40,240) - - --Infos - if PLAYERS[1].frameRun>180 then - gc.setLineWidth(2) - --Finesse rank & trophy - if rank then - gc.setColor(1,1,1,T*.2) - gc.rectangle('fill',35,305,465,405) - - setFont(60) - local c=fnsRankColor[rank] - gc.setColor(c[1],c[2],c[3],T) - gc.print(rank,420,635) - if trophy then - setFont(40) - gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1) - gc.printf(trophy,100-120*(1-T^.5),650,300,'right') - end - - gc.setColor(1,1,1,T) - gc.rectangle('line',35,305,465,405) - gc.line(35,620,500,620) - else - gc.setColor(1,1,1,T*.2) - gc.rectangle('fill',35,305,465,350) - gc.setColor(1,1,1,T) - gc.rectangle('line',35,305,465,350) - end - - _=form - setFont(25) - for i=1,10 do - gc.print(text.pauseStat[i],40,270+35*i) - gc.printf(_[i],195,270+35*i,300,'right') - end - end - - --Mods - if #GAME.mod>0 then - if scoreValid()then - gc.setColor(.7,.7,.7,T) - gc.rectangle('line',775,560,490,140) - gc.setColor(.7,.7,.7,T*.26) - gc.rectangle('fill',775,560,490,140) - else - gc.setColor(1,0,0,T) - gc.rectangle('line',775,560,490,140) - gc.setColor(1,0,0,T*.26) - gc.rectangle('fill',775,560,490,140) - end - setFont(35) - for _,M in next,MODOPT do - if M.sel>0 then - _=M.color - gc.setColor(_[1],_[2],_[3],T) - mStr(M.id,810+M.no%8*60,560+math.floor(M.no/8)*45) - end - end - end + mDraw(drawableText.modeName,640,180) --Level rank if GAME.rank>0 then - local str=text.ranks[GAME.rank] - setFont(80) - gc.setColor(0,0,0,T*.7) - gc.print(str,100*T^.5-5,-14,nil,1.8) - local L=rankColor[GAME.rank] - gc.setColor(L[1],L[2],L[3],T) - gc.print(str,100*T^.5,-10,nil,1.8) + gc.push('transform') + gc.translate(1090,50) + local str=text.ranks[GAME.rank] + setFont(80) + gc.setColor(0,0,0,T*.7) + gc.print(str,-5,-4,nil,1.5) + local L=rankColor[GAME.rank] + gc.setColor(L[1],L[2],L[3],T) + gc.print(str,0,0,nil,1.5) + gc.pop() + end + + --Infos + if PLAYERS[1].frameRun>180 then + gc.push('transform') + gc.translate(830,220) + gc.scale(.85) + gc.setLineWidth(2) + + --Frame + gc.setColor(.97,.97,.97,T*.05) + gc.rectangle('fill',-5,-5,475,360,8) + gc.setColor(.97,.97,.97,T) + gc.rectangle('line',-5,-5,475,360,8) + + --Stats + _=form + setFont(25) + for i=1,10 do + gc.print(text.pauseStat[i],5,35*(i-1)) + gc.printf(_[i],160,35*(i-1),300,'right') + end + + --Finesse rank & trophy + if rank then + setFont(40) + local c=fnsRankColor[rank] + gc.setColor(c[1],c[2],c[3],T) + gc.print(rank,440,344) + if trophy then + setFont(20) + gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1) + gc.printf(trophy,130-120*(1-T^.5),359,300,'right') + end + end + gc.pop() end --Radar Chart if T>.5 and PLAYERS[1].frameRun>180 then - T=T*2-1 + local t=T*2-1 gc.setLineWidth(2) gc.push('transform') - gc.translate(1026,370) - gc.scale(.9) + gc.translate(640,390) + gc.scale(.67) --Polygon gc.push('transform') - gc.scale((3-2*T)*T) - gc.setColor(1,1,1,T*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) - gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626) + gc.scale((3-2*t)*t) + gc.setColor(.97,.97,.97,t*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) + gc.setColor(chartColor[1],chartColor[2],chartColor[3],t*.626) for i=1,9,2 do gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) end gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(1,1,1,T)gc.polygon('line',val) + gc.setColor(.97,.97,.97,t)gc.polygon('line',val) gc.pop() --Axes - gc.setColor(1,1,1,T) + gc.setColor(.97,.97,.97,t) for i=1,3 do local x,y=hexList[2*i-1],hexList[2*i] gc.line(-x,-y,x,y) @@ -297,11 +277,11 @@ function scene.draw() local C _=TIME()%6.2832 if _>3.1416 then - gc.setColor(1,1,1,-T*sin(_)) + gc.setColor(.97,.97,.97,-t*sin(_)) setFont(35) C,_=text.radar,textPos else - gc.setColor(1,1,1,T*sin(_)) + gc.setColor(.97,.97,.97,t*sin(_)) setFont(20) C,_=radar,dataPos end @@ -310,15 +290,43 @@ function scene.draw() end gc.pop() end + + --Mods + gc.push('transform') + gc.translate(735,555) + gc.scale() + if #GAME.mod>0 then + gc.setLineWidth(2) + if scoreValid()then + gc.setColor(.7,.7,.7,T) + gc.rectangle('line',-5,-5,500,150,8) + gc.setColor(.7,.7,.7,T*.04) + gc.rectangle('fill',-5,-5,500,150,8) + else + gc.setColor(.95,0,0,T) + gc.rectangle('line',-5,-5,500,150,8) + gc.setColor(.95,0,0,T*.26) + gc.rectangle('fill',-5,-5,500,150,8) + end + setFont(35) + for _,M in next,MODOPT do + if M.sel>0 then + _=M.color + gc.setColor(_[1],_[2],_[3],T) + mStr(M.id,35+M.no%8*60,math.floor(M.no/8)*45) + end + end + end + gc.pop() end scene.widgetList={ - WIDGET.newButton{name="setting", x=1120,y=70,w=240,h=90, color='lB',code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, - WIDGET.newButton{name="replay", x=535,y=240,w=200,h=100,color='lY',code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, - WIDGET.newButton{name="save", x=745,y=240,w=200,h=100,color='lP',code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, - WIDGET.newButton{name="resume", x=640,y=357,w=240,h=100,color='lG',code=pressKey"escape"}, - WIDGET.newButton{name="restart", x=640,y=473,w=240,h=100,color='lR',code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, - WIDGET.newButton{name="quit", x=640,y=590,w=240,h=100,font=35,code=backScene}, + WIDGET.newKey{name="resume", x=290,y=240,w=300,h=70,code=pressKey"escape"}, + WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, + WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, + WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=backScene}, + WIDGET.newKey{name="replay", x=0,y=0,w=50,h=50,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, + WIDGET.newKey{name="save", x=0,y=0,w=50,h=50,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, } return scene \ No newline at end of file From f24fa81d87da1ecbad1c6f3175b78b60a1e7f698 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 00:26:11 +0800 Subject: [PATCH 16/70] =?UTF-8?q?=E5=BE=AE=E8=B0=83staff=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0=E5=8E=86=E5=8F=B2=E5=92=8C?= =?UTF-8?q?build=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf.lua | 2 +- parts/language/lang_en.lua | 2 +- parts/language/lang_es.lua | 2 +- parts/language/lang_fr.lua | 2 +- parts/language/lang_pt.lua | 2 +- parts/language/lang_zh.lua | 2 +- parts/updateLog.lua | 1 + 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf.lua b/conf.lua index 7b908fbf..0c6d9949 100644 --- a/conf.lua +++ b/conf.lua @@ -1,5 +1,5 @@ VERSION={ - build=353, + build=354, code=1600, short="V0.16.0", string="Alpha V0.16.0", diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index 4a1e3306..b021aacd 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -185,7 +185,7 @@ return{ "Powered by LÖVE", "", "Program: MrZ, Particle_G, [FinnTenzor]", - "Art: MrZ, ScF, [Gnyar, 旋律星萤, T0722]", + "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", "Music: MrZ, ERM, [T0722, Aether]", "Voice & Sound: Miya, Xiaoya, Naki, MrZ", "Performance: 模电, HBM", diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index 645c0199..921562fa 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -151,7 +151,7 @@ return{ "Creado con LÖVE", "", "Programación: MrZ, Particle_G, [FinnTenzor]", - "Artistas: MrZ, ScF, [Gnyar, 旋律星萤, T0722]", + "Artistas: MrZ, Gnyar, ScF, [旋律星萤, T0722]", "Música: MrZ, ERM, [T0722, Aether]", "Voces/Sonidos: Miya, Xiaoya, Naki, MrZ Performance: 模电, HBM", "Performance: 模电, HBM", diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 129b2f1c..739a141e 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -151,7 +151,7 @@ return{ "Powered by LÖVE", "", "Programme : MrZ, Particle_G, [FinnTenzor]", - "Art : MrZ, ScF, [Gnyar, 旋律星萤, T0722]", + "Art : MrZ, Gnyar, ScF, [旋律星萤, T0722]", "Musique : MrZ, ERM, [T0722, Aether]", "Voix & Sons: Miya, Xiaoya, Naki, MrZ Performance: 模电, HBM", "Performance: 模电, HBM", diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index cb9fd1ab..c45a5681 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -175,7 +175,7 @@ return{ "Powered by LÖVE", "", "Programa: MrZ, Particle_G, [FinnTenzor]", - "Art: MrZ, ScF, [Gnyar, 旋律星萤, T0722]", + "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", "Music: MrZ, ERM, [T0722, Aether]", "Voice & Sound: Miya, Xiaoya, Naki, MrZ", "Performance: 模电, HBM", diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index 3a2ca64b..3c99096f 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -185,7 +185,7 @@ return{ "使用LÖVE引擎", "", "程序: MrZ, Particle_G, [FinnTenzor]", - "美术: MrZ, ScF, [Gnyar, 旋律星萤, T0722]", + "美术: MrZ, Gnyar, ScF, [旋律星萤, T0722]", "音乐: MrZ, ERM, [T0722, Aether]", "音效/语音: Miya, Xiaoya, Naki, MrZ", "演出: 模电, HBM", diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 2135a134..e7db2108 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -47,6 +47,7 @@ return STRING.split([=[ 第一次启动会自动进入语言设置菜单 #150 新增noInitSZO模式参数,自动跳过开局SZO(目前仅用于马拉松/20G模式) #121 改动: + ui调整(修改游戏内和暂停的界面 减小线宽 添加圆角) 更换更简洁的加载动画,合并intro场景 调整TRS中S5和Z5的踢墙表,增加Ospin时SZ按反的尝试 回放时版面遮挡会变成半透明 #143 From e788dd543e18dcf74e22cef2ac8b63bcede1a320 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 00:47:53 +0800 Subject: [PATCH 17/70] =?UTF-8?q?=E5=86=8D=E8=B0=83=E6=95=B4=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E7=95=8C=E9=9D=A2ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 112 ++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 2b6e02f1..ab8d3305 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -184,7 +184,7 @@ function scene.draw() setFont(25) if GAME.pauseCount>0 then gc.setColor(.96,.92,.92,T) - mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),640,510) + mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),640,500) end gc.setColor(.97,.97,.97,T) @@ -199,7 +199,7 @@ function scene.draw() --Level rank if GAME.rank>0 then gc.push('transform') - gc.translate(1090,50) + gc.translate(1090,40) local str=text.ranks[GAME.rank] setFont(80) gc.setColor(0,0,0,T*.7) @@ -213,15 +213,15 @@ function scene.draw() --Infos if PLAYERS[1].frameRun>180 then gc.push('transform') - gc.translate(830,220) + gc.translate(835,210) gc.scale(.85) gc.setLineWidth(2) --Frame - gc.setColor(.97,.97,.97,T*.05) - gc.rectangle('fill',-5,-5,475,360,8) + gc.setColor(.97,.97,.97,T*.06) + gc.rectangle('fill',-5,-5,475,rank and 390 or 360,8) gc.setColor(.97,.97,.97,T) - gc.rectangle('line',-5,-5,475,360,8) + gc.rectangle('line',-5,-5,475,rank and 390 or 360,8) --Stats _=form @@ -236,76 +236,31 @@ function scene.draw() setFont(40) local c=fnsRankColor[rank] gc.setColor(c[1],c[2],c[3],T) - gc.print(rank,440,344) + gc.print(rank,435,335) if trophy then setFont(20) gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1) - gc.printf(trophy,130-120*(1-T^.5),359,300,'right') + gc.printf(trophy,125-120*(1-T^.5),350,300,'right') end end gc.pop() end - --Radar Chart - if T>.5 and PLAYERS[1].frameRun>180 then - local t=T*2-1 - gc.setLineWidth(2) - gc.push('transform') - gc.translate(640,390) - gc.scale(.67) - - --Polygon - gc.push('transform') - gc.scale((3-2*t)*t) - gc.setColor(.97,.97,.97,t*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) - gc.setColor(chartColor[1],chartColor[2],chartColor[3],t*.626) - for i=1,9,2 do - gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) - end - gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(.97,.97,.97,t)gc.polygon('line',val) - gc.pop() - - --Axes - gc.setColor(.97,.97,.97,t) - for i=1,3 do - local x,y=hexList[2*i-1],hexList[2*i] - gc.line(-x,-y,x,y) - end - - --Texts - local C - _=TIME()%6.2832 - if _>3.1416 then - gc.setColor(.97,.97,.97,-t*sin(_)) - setFont(35) - C,_=text.radar,textPos - else - gc.setColor(.97,.97,.97,t*sin(_)) - setFont(20) - C,_=radar,dataPos - end - for i=1,6 do - mStr(C[i],_[2*i-1],_[2*i]) - end - gc.pop() - end - --Mods gc.push('transform') - gc.translate(735,555) + gc.translate(740,550) gc.scale() if #GAME.mod>0 then gc.setLineWidth(2) if scoreValid()then gc.setColor(.7,.7,.7,T) gc.rectangle('line',-5,-5,500,150,8) - gc.setColor(.7,.7,.7,T*.04) + gc.setColor(.7,.7,.7,T*.05) gc.rectangle('fill',-5,-5,500,150,8) else gc.setColor(.95,0,0,T) gc.rectangle('line',-5,-5,500,150,8) - gc.setColor(.95,0,0,T*.26) + gc.setColor(.95,0,0,T*.05) gc.rectangle('fill',-5,-5,500,150,8) end setFont(35) @@ -318,6 +273,51 @@ function scene.draw() end end gc.pop() + + --Radar Chart + if T>.5 and PLAYERS[1].frameRun>180 then + T=T*2-1 + gc.setLineWidth(2) + gc.push('transform') + gc.translate(640,380) + gc.scale(.67) + + --Polygon + gc.push('transform') + gc.scale((3-2*T)*T) + gc.setColor(.97,.97,.97,T*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) + gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626) + for i=1,9,2 do + gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) + end + gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) + gc.setColor(.97,.97,.97,T)gc.polygon('line',val) + gc.pop() + + --Axes + gc.setColor(.97,.97,.97,T) + for i=1,3 do + local x,y=hexList[2*i-1],hexList[2*i] + gc.line(-x,-y,x,y) + end + + --Texts + local C + _=TIME()%6.2832 + if _>3.1416 then + gc.setColor(.97,.97,.97,-T*sin(_)) + setFont(35) + C,_=text.radar,textPos + else + gc.setColor(.97,.97,.97,T*sin(_)) + setFont(20) + C,_=radar,dataPos + end + for i=1,6 do + mStr(C[i],_[2*i-1],_[2*i]) + end + gc.pop() + end end scene.widgetList={ From a4541dd7648577c5802780a1df2d99b4441e664e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 01:07:05 +0800 Subject: [PATCH 18/70] =?UTF-8?q?=E9=87=8D=E5=BC=80=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=94=B9=E6=88=90=E5=9B=BE=E6=A0=87=EF=BC=8C=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=96=87=E5=AD=97=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/game.lua | 6 +++--- parts/texture.lua | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 86815ad6..7505fcdd 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -303,7 +303,7 @@ function scene.draw() --Mode info gc.setColor(1,1,1,.8) - gc.draw(drawableText.modeName,1125-drawableText.modeName:getWidth(),10) + gc.draw(drawableText.modeName,1120-drawableText.modeName:getWidth(),10) --Replaying if replaying then @@ -326,8 +326,8 @@ scene.widgetList={ WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2}, WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5}, WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step}, - WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText="R"}, - WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=DOGC{20,25,{'fRect',0,0,3,25},{'fRect',17,0,3,25}}}, + WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText=TEXTURE.game.restart}, + WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, } return scene \ No newline at end of file diff --git a/parts/texture.lua b/parts/texture.lua index e3952245..24c82ab4 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -213,6 +213,11 @@ TEXTURE.quit_small=DOGC{30,30, }} } +TEXTURE.game={ + restart=DOGC{32,32,{'setLW',3},{'dArc',16,16,11,.7,5.5},{'setLW',2.5},{'line',21,.7,24,8,16,11}}, + pause=DOGC{18,23,{'fRect',0,0,3,23},{'fRect',15,0,3,23}}, +} + --Replay speed buttons TEXTURE.rep={ rep0=DOGC{50,50,{'fRect',11,8,8,34},{'fRect',31,8,8,34}}, From a21d6e834daa3f5f4ed6bfe173dc68289f683941 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 01:49:28 +0800 Subject: [PATCH 19/70] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BB=8EPlayer:drop=E4=B8=AD=E6=8A=BD=E7=A6=BB?= =?UTF-8?q?=E5=87=BA=E5=87=A0=E4=B8=AA=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 189 +++++++++++++++++++++------------------- 1 file changed, 97 insertions(+), 92 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 0d2d1f4f..650ab89c 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -25,6 +25,13 @@ end function Player:showTextF(text,dx,dy,font,style,spd,stop) ins(self.bonus,TEXT.getText(text,150+dx,300+dy,font,style,spd,stop)) end +function Player:popScore(score,x,y) + self:showText( + score,x,y, + 40-600/(score+20), + 'score',2 + ) +end function Player:createLockFX() local CB=self.cur.bk local t=12-self.gameEnv.lockFX*2 @@ -316,6 +323,9 @@ end function Player:getCenterX() return self.curX+self.cur.sc[2]-5.5 end +function Player:getCenterY() + return self.curY-self.cur.sc[1] +end function Player:solid(x,y) if x<1 or x>10 or y<1 then return true end if y>#self.field then return false end @@ -538,6 +548,80 @@ function Player:lock() end end +function Player:checkClear(field,start,height,CB,CX) + local cc=0 + if self.gameEnv.fillClear then + for i=1,height do + local h=start+i-2 + + --Bomb trigger (optional, must with CB) + if CB and h>0 and field[h]and self.clearedRow[cc]~=h then + for x=1,#CB[1]do + if CB[i][x]and field[h][CX+x-1]==19 then + cc=cc+1 + self.clearingRow[cc]=h-cc+1 + self.clearedRow[cc]=h + break + end + end + end + + h=h+1 + --Row filled + for x=1,10 do + if field[h][x]<=0 then + goto CONTINUE_notFull + end + end + cc=cc+1 + ins(self.clearingRow,h-cc+1) + ins(self.clearedRow,h) + ::CONTINUE_notFull:: + end + end + return cc +end +function Player:roofCheck() + local CB=self.cur.bk + for x=1,#CB[1]do + local y=#CB + + --Find the highest y of blocks' x-th column + while not CB[y][x]do y=y-1 end + + local testX=self.curX+x-1--Optimize + + --Test the whole column of field to find roof + for testY=self.curY+y,#self.field do + if self:solid(testX,testY)then + return true + end + end + end + return false +end +function Player:removeTopClearingFX() + for i=#self.clearingRow,1,-1 do + if self.clearingRow[i]>#self.field then + rem(self.clearingRow) + else + return + end + end +end +function Player:checkMission(piece,mission) + if mission<5 then + return piece.row==mission and not piece.spin + elseif mission<9 then + return piece.row==mission-4 and piece.spin + elseif mission==9 then + return piece.pc + elseif mission<90 then + return piece.row==mission%10 and piece.name==int(mission/10)and piece.spin + end + return false +end + local spawnSFX_name={}for i=1,7 do spawnSFX_name[i]='spawn_'..i end function Player:resetBlock()--Reset Block's position and execute I*S local B=self.cur.bk @@ -1006,46 +1090,16 @@ do--Player.drop(self)--Place piece self:lock() --Clear list of cleared-rows - if self.clearedRow[1]then self.clearedRow={}end + if self.clearedRow[1]then TABLE.cut(self.clearedRow)end --Check line clear - if ENV.fillClear then - for i=1,#CB do - local h=CY+i-2 - - --Bomb trigger - if h>0 and self.field[h]and self.clearedRow[cc]~=h then - for x=1,#CB[1]do - if CB[i][x]and self.field[h][CX+x-1]==19 then - cc=cc+1 - self.clearingRow[cc]=h-cc+1 - self.clearedRow[cc]=h - break - end - end - end - - h=h+1 - --Row filled - for x=1,10 do - if self.field[h][x]<=0 then - goto CONTINUE_notFull - end - end - cc=cc+1 - self.clearingRow[cc]=h-cc+1 - self.clearedRow[cc]=h - ::CONTINUE_notFull:: - end - end + cc=cc+self:checkClear(self.field,CY,#CB,CB,CX) --Create clearing FX - if cc>0 then - for i=1,cc do - local y=self.clearedRow[i] - if ENV.clearFX then self:createClearingFX(y,7-ENV.clearFX)end - if ENV.splashFX then self:createSplashFX(y)end - end + for i=1,cc do + local y=self.clearedRow[i] + if ENV.clearFX then self:createClearingFX(y,7-ENV.clearFX)end + if ENV.splashFX then self:createSplashFX(y)end end --Create locking FX @@ -1075,28 +1129,7 @@ do--Player.drop(self)--Place piece end --Finesse: roof check - local finesse - if CY>ENV.fieldH-2 then - finesse=true - else - for x=1,#CB[1]do - local y=#CB - - --Find the highest y of blocks' x-th column - while not CB[y][x]do y=y-1 end - - local testX=CX+x-1--Optimize - - --Test the whole column of field to find roof - for testY=CY+y,#self.field do - if self:solid(testX,testY)then - finesse=true - goto BERAK_roofFound - end - end - end - ::BERAK_roofFound:: - end + local finesse=CY>ENV.fieldH-2 or self:roofCheck() --Remove rows need to be cleared if cc>0 then @@ -1112,13 +1145,7 @@ do--Player.drop(self)--Place piece end --Cancel top clearing FX - for i=#self.clearingRow,1,-1 do - if self.clearingRow[i]>#self.field then - rem(self.clearingRow) - else - break - end - end + self:removeTopClearingFX() if self.clearingRow[1]then self.falling=ENV.fall else @@ -1408,13 +1435,10 @@ do--Player.drop(self)--Place piece cscore=int(cscore) if ENV.score then - self:showText( + self:popScore( cscore, - (self.curX+C.sc[2]-5.5)*30, - (10-self.curY-C.sc[1])*30+self.fieldBeneath+self.fieldUp, - 40-600/(cscore+20), - 'score', - 2 + self:getCenterX()*30, + (10-self:getCenterY())*30+self.fieldBeneath+self.fieldUp ) end @@ -1425,26 +1449,7 @@ do--Player.drop(self)--Place piece --Check clearing task if cc>0 and self.curMission then - local t=ENV.mission[self.curMission] - local success - if t<5 then - if piece.row==t and not piece.spin then - success=true - end - elseif t<9 then - if piece.row==t-4 and piece.spin then - success=true - end - elseif t==9 then - if piece.pc then - success=true - end - elseif t<90 then - if piece.row==t%10 and piece.name==int(t/10)and piece.spin then - success=true - end - end - if success then + if self:checkMission(piece,ENV.mission[self.curMission])then self.curMission=self.curMission+1 SFX.play('reach') if self.curMission>#ENV.mission then @@ -1462,11 +1467,11 @@ do--Player.drop(self)--Place piece if cc==0 and #self.field>ENV.heightLimit then self:lose()end --Update stat - Stat.score=Stat.score+cscore Stat.piece=Stat.piece+1 Stat.row=Stat.row+cc Stat.maxFinesseCombo=max(Stat.maxFinesseCombo,self.finesseCombo) Stat.maxCombo=max(Stat.maxCombo,self.combo) + Stat.score=Stat.score+cscore if atk>0 then Stat.atk=Stat.atk+atk if send>0 then From 998c79d331a0a8bc004ad91cb92fba481785d9c2 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 09:58:26 +0800 Subject: [PATCH 20/70] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E7=A7=BB=E5=85=A5=E5=B8=B8=E7=94=A8=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?draw=E5=87=BD=E6=95=B0=E5=B9=B6=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/classic_fast.lua | 5 +---- parts/modes/marathon_bfmax.lua | 5 +---- parts/modes/marathon_h.lua | 5 +---- parts/modes/marathon_n.lua | 5 +---- parts/modes/master_final.lua | 5 +---- parts/modes/master_h.lua | 5 +---- parts/modes/master_l.lua | 5 +---- parts/modes/master_n.lua | 5 +---- parts/modes/master_ph.lua | 5 +---- parts/modes/master_u.lua | 5 +---- parts/modes/rhythm_e.lua | 5 +---- parts/modes/rhythm_h.lua | 5 +---- parts/modes/rhythm_u.lua | 5 +---- parts/player/draw.lua | 13 ++++++++++--- 14 files changed, 23 insertions(+), 55 deletions(-) diff --git a/parts/modes/classic_fast.lua b/parts/modes/classic_fast.lua index e162e70c..86429dad 100644 --- a/parts/modes/classic_fast.lua +++ b/parts/modes/classic_fast.lua @@ -38,10 +38,7 @@ return{ local r=P.modeData.target*.1 mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),69,210) mText(drawableText.speedLV,69,290) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) end, score=function(P)return{P.stat.score,P.stat.row}end, scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, diff --git a/parts/modes/marathon_bfmax.lua b/parts/modes/marathon_bfmax.lua index 42290ac6..8c85ecce 100644 --- a/parts/modes/marathon_bfmax.lua +++ b/parts/modes/marathon_bfmax.lua @@ -36,10 +36,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) PLY.draw.drawTargetLine(P,200-P.stat.row) end, getRank=function(P) diff --git a/parts/modes/marathon_h.lua b/parts/modes/marathon_h.lua index f85b8570..98acbd1d 100644 --- a/parts/modes/marathon_h.lua +++ b/parts/modes/marathon_h.lua @@ -27,10 +27,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) PLY.draw.drawTargetLine(P,200-P.stat.row) end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, diff --git a/parts/modes/marathon_n.lua b/parts/modes/marathon_n.lua index e6d465a1..3cb3f5a3 100644 --- a/parts/modes/marathon_n.lua +++ b/parts/modes/marathon_n.lua @@ -24,10 +24,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) PLY.draw.drawTargetLine(P,200-P.stat.row) end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, diff --git a/parts/modes/master_final.lua b/parts/modes/master_final.lua index f707fa70..e1225443 100644 --- a/parts/modes/master_final.lua +++ b/parts/modes/master_final.lua @@ -58,10 +58,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/master_h.lua b/parts/modes/master_h.lua index daef8b85..73dc6823 100644 --- a/parts/modes/master_h.lua +++ b/parts/modes/master_h.lua @@ -74,10 +74,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/master_l.lua b/parts/modes/master_l.lua index 48258859..bd88d001 100644 --- a/parts/modes/master_l.lua +++ b/parts/modes/master_l.lua @@ -60,10 +60,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/master_n.lua b/parts/modes/master_n.lua index 62c695bb..76988c4e 100644 --- a/parts/modes/master_n.lua +++ b/parts/modes/master_n.lua @@ -74,10 +74,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/master_ph.lua b/parts/modes/master_ph.lua index 33465418..1ac1c39d 100644 --- a/parts/modes/master_ph.lua +++ b/parts/modes/master_ph.lua @@ -147,10 +147,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.result=='win'and 260 or P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/master_u.lua b/parts/modes/master_u.lua index c536d35b..3d4b866e 100644 --- a/parts/modes/master_u.lua +++ b/parts/modes/master_u.lua @@ -69,10 +69,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.modeData.pt,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, diff --git a/parts/modes/rhythm_e.lua b/parts/modes/rhythm_e.lua index dbc44c26..5377e068 100644 --- a/parts/modes/rhythm_e.lua +++ b/parts/modes/rhythm_e.lua @@ -45,10 +45,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) mStr(P.modeData.bpm,69,178) diff --git a/parts/modes/rhythm_h.lua b/parts/modes/rhythm_h.lua index 190b84e3..585c5bbb 100644 --- a/parts/modes/rhythm_h.lua +++ b/parts/modes/rhythm_h.lua @@ -45,10 +45,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) mStr(P.modeData.bpm,69,178) diff --git a/parts/modes/rhythm_u.lua b/parts/modes/rhythm_u.lua index 158e23bd..cb957e01 100644 --- a/parts/modes/rhythm_u.lua +++ b/parts/modes/rhythm_u.lua @@ -51,10 +51,7 @@ return{ }, slowMark=true, mesDisp=function(P) - setFont(45) - mStr(P.stat.row,69,320) - mStr(P.modeData.target,69,370) - gc.rectangle('fill',25,375,90,4) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) mStr(P.modeData.bpm,69,178) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 3db4f89f..54cb065e 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -409,6 +409,7 @@ local function drawHold(P) local N=ENV.holdCount*72 gc_push('transform') gc_translate(12,20) + gc_setLineWidth(2) gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,100,N+8,5) N=#holdQueue Date: Fri, 6 Aug 2021 17:43:43 +0800 Subject: [PATCH 21/70] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=B7=B7=E6=88=98=E6=A8=A1=E5=BC=8F=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=87=BD=E6=95=B0=E7=A7=BB=E5=85=A5=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E6=A8=A1=E5=9D=97=E7=BB=9F=E4=B8=80=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/techmino49_e.lua | 14 +------------- parts/modes/techmino49_h.lua | 14 +------------- parts/modes/techmino49_u.lua | 14 +------------- parts/modes/techmino99_e.lua | 14 +------------- parts/modes/techmino99_h.lua | 14 +------------- parts/modes/techmino99_u.lua | 14 +------------- parts/player/draw.lua | 17 +++++++++++++++++ 7 files changed, 23 insertions(+), 78 deletions(-) diff --git a/parts/modes/techmino49_e.lua b/parts/modes/techmino49_e.lua index 22d9f059..78fbab3e 100644 --- a/parts/modes/techmino49_e.lua +++ b/parts/modes/techmino49_e.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/49",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/modes/techmino49_h.lua b/parts/modes/techmino49_h.lua index e7bb4954..b4197c1e 100644 --- a/parts/modes/techmino49_h.lua +++ b/parts/modes/techmino49_h.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/49",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/modes/techmino49_u.lua b/parts/modes/techmino49_u.lua index e147f838..0264f5ef 100644 --- a/parts/modes/techmino49_u.lua +++ b/parts/modes/techmino49_u.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/49",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/modes/techmino99_e.lua b/parts/modes/techmino99_e.lua index bdd80d11..c0018b79 100644 --- a/parts/modes/techmino99_e.lua +++ b/parts/modes/techmino99_e.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/99",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/modes/techmino99_h.lua b/parts/modes/techmino99_h.lua index 9e6a3080..feecfaea 100644 --- a/parts/modes/techmino99_h.lua +++ b/parts/modes/techmino99_h.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/99",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/modes/techmino99_u.lua b/parts/modes/techmino99_u.lua index 6ed61432..edee6ecc 100644 --- a/parts/modes/techmino99_u.lua +++ b/parts/modes/techmino99_u.lua @@ -54,19 +54,7 @@ return{ end end end, mesDisp=function(P) - setFont(35) - mStr(#PLY_ALIVE.."/99",69,175) - mStr(P.modeData.ko,80,215) - gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc.setColor(1,.5,0,.6) - gc.print(P.badge,103,227) - gc.setColor(1,1,1) - setFont(25) - gc.print(text.powerUp[P.strength],18,290) - for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) - end + PLY.draw.drawRoyaleInfo(P) end, score=function(P)return{P.modeData.place,P.modeData.ko}end, scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 54cb065e..8953373a 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -628,6 +628,22 @@ function draw.drawProgress(s1,s2) mStr(s2,62,376) gc.rectangle('fill',24,375,76,4) end +function draw.drawRoyaleInfo(P) + setFont(35) + mStr(#PLY_ALIVE.."/"..#PLAYERS,69,175) + mStr(P.modeData.ko,80,215) + gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) + setFont(20) + gc.setColor(1,.5,0,.6) + gc.print(P.badge,103,227) + gc.setColor(.97,.97,.97) + setFont(25) + gc.print(text.powerUp[P.strength],18,290) + gc.setColor(1,1,1) + for i=1,P.strength do + gc.draw(IMG.badgeIcon,16*i+12,260) + end +end function draw.norm(P) local ENV=P.gameEnv @@ -754,6 +770,7 @@ function draw.norm(P) end gc_setColor(1,1,1,P.swappingAtkMode*.025) setFont(35) + gc_setLineWidth(1) for i=1,4 do gc_rectangle('line',RCPB[2*i-1],RCPB[2*i],90,35,8,4) gc_printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5) From b501cd374b078053f0a46e9347aa02bc279d4a69 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 6 Aug 2021 19:16:01 +0800 Subject: [PATCH 22/70] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E5=A4=A7=E9=87=8F=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=86=85=E7=BB=98=E5=9B=BE=E7=94=A8=E7=9A=84=E7=BA=AF=E7=99=BD?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E7=BA=AF=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/color.lua | 2 +- Zframework/init.lua | 8 ++++---- Zframework/scene.lua | 25 +++++++++++++------------ parts/scenes/about.lua | 2 +- parts/scenes/app_15p.lua | 4 ++-- parts/scenes/app_AtoZ.lua | 4 ++-- parts/scenes/app_UTTT.lua | 4 ++-- parts/scenes/app_calc.lua | 4 ++-- parts/scenes/app_cannon.lua | 2 +- parts/scenes/app_cubefield.lua | 8 ++++---- parts/scenes/app_dropper.lua | 12 ++++++------ parts/scenes/app_dtw.lua | 8 ++++---- parts/scenes/app_pong.lua | 2 +- parts/scenes/app_schulteG.lua | 6 +++--- parts/scenes/app_tap.lua | 4 ++-- parts/scenes/customGame.lua | 2 +- parts/scenes/custom_field.lua | 10 +++++----- parts/scenes/custom_mission.lua | 4 ++-- parts/scenes/custom_sequence.lua | 6 +++--- parts/scenes/dict.lua | 21 +++++++++------------ parts/scenes/error.lua | 7 ++++--- parts/scenes/load.lua | 2 +- parts/scenes/main.lua | 3 ++- parts/scenes/mod.lua | 4 ++-- parts/scenes/music.lua | 4 ++-- parts/scenes/net_league.lua | 2 +- parts/scenes/net_rooms.lua | 2 +- parts/scenes/setting_control.lua | 3 ++- parts/scenes/setting_key.lua | 2 +- parts/scenes/setting_touch.lua | 2 +- parts/scenes/staff.lua | 2 +- parts/texture.lua | 10 +++++----- 32 files changed, 91 insertions(+), 90 deletions(-) diff --git a/Zframework/color.lua b/Zframework/color.lua index 6c0dca7a..67fac04c 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -50,7 +50,7 @@ local COLOR={ dMagenta= {0.6, 0.0, 0.6}, dWine= {0.6, 0.0, 0.3}, - black= {0.0, 0.0, 0.0}, + black= {.05, .05, .05}, dGray= {0.3, 0.3, 0.3}, gray= {0.6, 0.6, 0.6}, lGray= {0.8, 0.8, 0.8}, diff --git a/Zframework/init.lua b/Zframework/init.lua index 28ffd7eb..2e9c4b57 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -97,12 +97,12 @@ local function updatePowerInfo() gc.rectangle('fill',76,6,pow*.22,14) if pow<100 then setFont(15) - gc_setColor(0,0,0) + gc.setColor(COLOR.D) gc_print(pow,77,1) gc_print(pow,77,3) gc_print(pow,79,1) gc_print(pow,79,3) - gc_setColor(1,1,1) + gc_setColor(COLOR.Z) gc_print(pow,78,2) end end @@ -657,11 +657,11 @@ function love.run() gc_line(x,0,x,SCR.h) gc_line(0,y,SCR.w,y) local t=int(mx+.5)..","..int(my+.5) - gc_setColor(0,0,0) + gc.setColor(COLOR.D) gc_print(t,x+1,y) gc_print(t,x+1,y-1) gc_print(t,x+2,y-1) - gc_setColor(1,1,1) + gc_setColor(COLOR.Z) gc_print(t,x+2,y) gc_replaceTransform(SCR.xOy_dr) diff --git a/Zframework/scene.lua b/Zframework/scene.lua index accaa620..bc8cb4ef 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -10,7 +10,7 @@ local SCN={ stat={ tar=false, --Swapping target style=false,--Swapping style - mid=false, --Loading point + changeTime=false, --Loading point time=false, --Full swap time draw=false, --Swap draw func }, @@ -50,7 +50,7 @@ end function SCN.swapUpdate() local S=SCN.stat S.time=S.time-1 - if S.time==S.mid then + if S.time==S.changeTime then SCN.init(S.tar,SCN.cur) collectgarbage() --Scene swapped this moment @@ -103,36 +103,36 @@ function SCN.pop() end local swap={ - none={1,0,function()end},--swapTime, changeTime, drawFunction - flash={8,1,function()gc.clear(1,1,1)end}, - fade={30,15,function(t) + none={duration=1,changeTime=0,draw=function()end},--swapTime, changeTime, drawFunction + flash={duration=8,changeTime=1,draw=function()gc.clear(1,1,1)end}, + fade={duration=30,changeTime=15,draw=function(t) t=t>15 and 2-t/15 or t/15 gc.setColor(0,0,0,t) gc.rectangle('fill',0,0,SCR.w,SCR.h) end}, - fade_togame={120,20,function(t) + fade_togame={duration=120,changeTime=20,draw=function(t) t=t>20 and(120-t)/100 or t/20 gc.setColor(0,0,0,t) gc.rectangle('fill',0,0,SCR.w,SCR.h) end}, - slowFade={180,90,function(t) + slowFade={duration=180,changeTime=90,draw=function(t) t=t>90 and 2-t/90 or t/90 gc.setColor(0,0,0,t) gc.rectangle('fill',0,0,SCR.w,SCR.h) end}, - swipeL={30,15,function(t) + swipeL={duration=30,changeTime=15,draw=function(t) t=t/30 gc.setColor(.1,.1,.1,1-abs(t-.5)) t=t*t*(3-2*t)*2-1 gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) end}, - swipeR={30,15,function(t) + swipeR={duration=30,changeTime=15,draw=function(t) t=t/30 gc.setColor(.1,.1,.1,1-abs(t-.5)) t=t*t*(2*t-3)*2+1 gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) end}, - swipeD={30,15,function(t) + swipeD={duration=30,changeTime=15,draw=function(t) t=t/30 gc.setColor(.1,.1,.1,1-abs(t-.5)) t=t*t*(2*t-3)*2+1 @@ -146,8 +146,9 @@ function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back SCN.swapping=true local S=SCN.stat S.tar,S.style=tar,style - local s=swap[style] - S.time,S.mid,S.draw=s[1],s[2],s[3] + S.time=swap[style].duration + S.changeTime=swap[style].changeTime + S.draw=swap[style].draw end else MES.new('warn',"No Scene: "..tar) diff --git a/parts/scenes/about.lua b/parts/scenes/about.lua index b9b76261..a7d3df65 100644 --- a/parts/scenes/about.lua +++ b/parts/scenes/about.lua @@ -11,7 +11,7 @@ end function scene.draw() --Texts setFont(20) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) for i=1,#text.aboutTexts do gc.printf(text.aboutTexts[i],150,35*i+50,1000,'center') end diff --git a/parts/scenes/app_15p.lua b/parts/scenes/app_15p.lua index 899fb4c7..a69a41fa 100644 --- a/parts/scenes/app_15p.lua +++ b/parts/scenes/app_15p.lua @@ -265,7 +265,7 @@ local backColor={ } function scene.draw() setFont(40) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(("%.3f"):format(time),1026,80) gc.setColor(1,.8,.8) gc.print(move,1026,130) @@ -303,7 +303,7 @@ function scene.draw() gc.setColor(.1,.1,.1) mStr(N,j*160+240,i*160-96) mStr(N,j*160+242,i*160-98) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(N,j*160+243,i*160-95) end end diff --git a/parts/scenes/app_AtoZ.lua b/parts/scenes/app_AtoZ.lua index 104fa53e..64976e8b 100644 --- a/parts/scenes/app_AtoZ.lua +++ b/parts/scenes/app_AtoZ.lua @@ -84,7 +84,7 @@ end function scene.draw() setFont(40) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(("%.3f"):format(time),1026,80) gc.print(mistake,1026,150) @@ -103,7 +103,7 @@ function scene.draw() setFont(100) mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(targetString:sub(progress,progress),120,280,0,2) gc.print(targetString:sub(progress+1),310,380) diff --git a/parts/scenes/app_UTTT.lua b/parts/scenes/app_UTTT.lua index 9aaa125e..2e29037f 100644 --- a/parts/scenes/app_UTTT.lua +++ b/parts/scenes/app_UTTT.lua @@ -132,7 +132,7 @@ function scene.draw() elseif score[X]==1 then gc.setColor(0,0,.5) else - gc.setColor(0,0,0) + gc.setColor(COLOR.D) end gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30) end @@ -186,7 +186,7 @@ function scene.draw() --Draw current round mark gc.setColor(.8,.8,.8,.8) gc.rectangle('fill',80,80,160,160) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(6) gc.rectangle('line',80,80,160,160) diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 4f351226..4fa7afba 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -81,8 +81,8 @@ function scene.keyDown(key) end function scene.draw() - gc.setColor(1,1,1) - gc.setLineWidth(4) + gc.setColor(COLOR.Z) + gc.setLineWidth(2) gc.rectangle('line',100,80,650,150) setFont(45) if reg then gc.printf(reg,0,100,720,'right')end diff --git a/parts/scenes/app_cannon.lua b/parts/scenes/app_cannon.lua index 7dc17bdd..383a5249 100644 --- a/parts/scenes/app_cannon.lua +++ b/parts/scenes/app_cannon.lua @@ -91,7 +91,7 @@ function scene.draw() gc.rectangle('fill',85,0,190,720) --Power & Angle - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) if state~=2 then gc.setLineWidth(2) gc.rectangle('fill',x-80,y+20,pow*1.6,16) diff --git a/parts/scenes/app_cubefield.lua b/parts/scenes/app_cubefield.lua index eba75a83..49da841e 100644 --- a/parts/scenes/app_cubefield.lua +++ b/parts/scenes/app_cubefield.lua @@ -214,7 +214,7 @@ function scene.draw() --Draw player if play and inv%8<4 then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('fill',620,670,40,40) end @@ -239,7 +239,7 @@ function scene.draw() end --Draw Horizon/Direction - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.line(-942,-440,942,-440) --Draw cubes @@ -254,7 +254,7 @@ function scene.draw() gc.setColor(color) gc.rectangle('fill',x,y-485,size,size) gc.setLineWidth(size*.05) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('line',x,y-485,size,size) end end @@ -278,7 +278,7 @@ function scene.draw() end end else - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('fill',-20,-20+ct,40,40) gc.setColor(1,1,1,(1-ct/60)*.1) diff --git a/parts/scenes/app_dropper.lua b/parts/scenes/app_dropper.lua index bb71b088..90fe6dfe 100644 --- a/parts/scenes/app_dropper.lua +++ b/parts/scenes/app_dropper.lua @@ -194,7 +194,7 @@ function scene.draw() mStr("High Score - "..highScore,640,370) mStr("High Floor - "..highFloor,640,450) - gc.setColor(0,0,0) + gc.setColor(COLOR.D) setFont(35) mStr(MOBILE and"Touch to Start"or"Press space to Start",640,570) setFont(20) @@ -203,7 +203,7 @@ function scene.draw() end if state~='menu'then --High floor - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(2) local y=690+camY-30*highFloor gc.line(0,y,1280,y) @@ -216,15 +216,15 @@ function scene.draw() gc.print(floor+1,move.x+move.l+15,move.y-18) gc.print(floor,base.x+base.l+15,base.y-18) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(message,640,0) - gc.setColor(0,0,0) + gc.setColor(COLOR.D) mStr(message,643,2) setFont(70) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(score,60,40) - gc.setColor(0,0,0) + gc.setColor(COLOR.D) gc.print(score,64,43) gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30) diff --git a/parts/scenes/app_dtw.lua b/parts/scenes/app_dtw.lua index cf1fad6a..2a5173fd 100644 --- a/parts/scenes/app_dtw.lua +++ b/parts/scenes/app_dtw.lua @@ -201,7 +201,7 @@ end function scene.draw() --Draw mode - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) setFont(50) mStr(modeName[mode],155,380) @@ -213,7 +213,7 @@ function scene.draw() setFont(45) gc.setColor(1,.6,.6) mStr(("%.2f"):format(maxSpeed/60),155,460) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(("%.2f"):format(speed/60),155,520) --Progress time list @@ -224,7 +224,7 @@ function scene.draw() end --Draw time - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) setFont(45) gc.print(("%.3f"):format(time),1030,70) end @@ -245,7 +245,7 @@ function scene.draw() gc.pop() --Draw track line - gc.setColor(0,0,0) + gc.setColor(COLOR.D) gc.setLineWidth(2) for x=1,5 do x=130+170*x diff --git a/parts/scenes/app_pong.lua b/parts/scenes/app_pong.lua index 4bd83fc9..4b1a2348 100644 --- a/parts/scenes/app_pong.lua +++ b/parts/scenes/app_pong.lua @@ -153,7 +153,7 @@ function scene.draw() mStr(p2.score,810,20) --Draw boundary - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(6) gc.line(130,20,1160,20) gc.line(130,700,1160,700) diff --git a/parts/scenes/app_schulteG.lua b/parts/scenes/app_schulteG.lua index 4eb97824..d4f42084 100644 --- a/parts/scenes/app_schulteG.lua +++ b/parts/scenes/app_schulteG.lua @@ -121,7 +121,7 @@ end function scene.draw() setFont(40) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(("%.3f"):format(time),1026,80) gc.print(mistake,1026,150) @@ -153,14 +153,14 @@ function scene.draw() if not(state==1 and disappear and N<=progress)then gc.setColor(.4,.5,.6) gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width) if not mono then local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67 gc.setColor(.1,.1,.1) mStr(N,x-3,y-1) mStr(N,x-1,y-3) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(N,x,y) end end diff --git a/parts/scenes/app_tap.lua b/parts/scenes/app_tap.lua index dee13b4e..b5705ac6 100644 --- a/parts/scenes/app_tap.lua +++ b/parts/scenes/app_tap.lua @@ -43,7 +43,7 @@ function scene.draw() setFont(70)gc.setColor(1,.6,.6) mStr(("%.2f"):format(maxSpeed),640,20) - setFont(100)gc.setColor(1,1,1) + setFont(100)gc.setColor(COLOR.Z) mStr(("%.2f"):format(speed),640,150) setFont(35) @@ -64,7 +64,7 @@ function scene.draw() gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0)) end gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0)) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('line',960,360,30,-320) end diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 5f984776..d853f600 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -179,7 +179,7 @@ function scene.draw() gc.print("#"..#BAG,615,220) end - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(CUSTOMENV.sequence,610,250) --Confirm reset diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index c22e642f..3ce5fde8 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -270,7 +270,7 @@ function scene.draw() for y=0,19 do gc.line(0,30*y,300,30*y)end --Draw field - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(3) gc.rectangle('line',-2,-2,304,604) gc.setLineWidth(2) @@ -345,7 +345,7 @@ function scene.draw() --Draw page setFont(55) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(page,100,530) mStr(#FIELD,100,600) gc.rectangle('fill',50,600,100,6) @@ -364,7 +364,7 @@ function scene.draw() gc.setColor(minoColor[pens[1]]) gc.rectangle('fill',5,5,23,30) elseif pens[1]==-1 then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.line(5,5,28,35) gc.line(28,5,5,35) elseif pens[1]==-2 then @@ -385,7 +385,7 @@ function scene.draw() gc.setColor(minoColor[pens[2]]) gc.rectangle('fill',52,5,23,30) elseif pens[2]==-1 then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(3) gc.line(52,5,75,35) gc.line(75,5,52,35) @@ -407,7 +407,7 @@ function scene.draw() gc.setColor(minoColor[pens[3]]) gc.rectangle('fill',35,2,10,21) elseif pens[3]==-1 then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(2) gc.line(35,2,45,23) gc.line(45,2,35,23) diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index bfc0aad2..c8902a6b 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -123,7 +123,7 @@ end function scene.draw() --Draw frame gc.setLineWidth(4) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('line',60,110,1160,170) --Draw inputing target @@ -145,7 +145,7 @@ function scene.draw() else if count>1 then setFont(25) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print("×",x-10,y-14) gc.print(count,x+5,y-13) x=x+(count<10 and 33 or 45) diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index c9c72afd..593cde00 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -130,7 +130,7 @@ end function scene.draw() --Draw frame - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(4) gc.rectangle('line',100,110,1080,260) @@ -149,7 +149,7 @@ function scene.draw() count=count+1 else if count>1 then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print("×",x-5,y-14) gc.print(count,x+10,y-13) x=x+(count<10 and 33 or 45) @@ -178,7 +178,7 @@ function scene.draw() --Draw lenth setFont(40) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.print(#L,120,310) --Draw cursor diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index fa6862c7..3346b371 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -138,17 +138,14 @@ end function scene.draw() local list=getList() - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) local t=list[selected][4] - if #t>900 then - setFont(15) - elseif #t>600 then - setFont(20) - elseif #t>400 then - setFont(25) - else - setFont(30) - end + setFont( + #t>900 and 15 or + #t>600 and 20 or + #t>400 and 25 or + 30 + ) gc.printf(t,306,180,950) setFont(30) @@ -160,7 +157,7 @@ function scene.draw() local y=142+35*i i=i+scrollPos local item=list[i] - gc.setColor(0,0,0) + gc.setColor(COLOR.D) gc.print(item[1],29,y-1) gc.print(item[1],29,y+1) gc.print(item[1],31,y-1) @@ -170,7 +167,7 @@ function scene.draw() end gc.setLineWidth(4) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.rectangle('line',300,180,958,526) gc.rectangle('line',20,180,280,526) diff --git a/parts/scenes/error.lua b/parts/scenes/error.lua index acb65594..8984929f 100644 --- a/parts/scenes/error.lua +++ b/parts/scenes/error.lua @@ -23,11 +23,12 @@ function scene.draw() gc.clear(BGcolor) gc.setColor(1,1,1) gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight()) + gc.setColor(COLOR.Z) setFont(100)gc.print(":(",100,0,0,1.2) setFont(40)gc.printf(errorText,100,160,SCR.w0-100) setFont(20) - gc.print(stateInfo,100,640) + gc.print(stateInfo,100,640) gc.printf(errorInfo[1],626,326,1260-626) gc.print("TRACEBACK",626,390) for i=4,#errorInfo do @@ -36,8 +37,8 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=40,code=goScene'app_console'}, - WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene}, + WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=35,code=goScene'app_console'}, + WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=35,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index 1b32328b..adf72330 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -212,7 +212,7 @@ function scene.draw() gc.setColor(logoColor2[1],logoColor2[2],logoColor2[3],progress/maxProgress)for dx=-2,2,2 do for dy=-2,2,2 do mDraw(studioLogo,640+dx,400+dy)end end gc.setColor(.2,.2,.2,progress/maxProgress)mDraw(studioLogo,640,400) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) setFont(30) mStr(text.loadText[loading],640,530) end diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 99080b25..7fc91078 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -154,6 +154,7 @@ function scene.draw() mDraw(TEXTURE.title_color,640,60,nil,.43) --Tip + gc.setColor(COLOR.Z) gc.push('transform') gc.translate(260,650) gc.setLineWidth(2) @@ -176,7 +177,7 @@ function scene.draw() --Connecting mark if NET.getlock('access_and_login')then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(10) local t=TIME()*6.26%6.2832 gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26) diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index ce70fef0..bda31998 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -123,7 +123,7 @@ function scene.draw() gc.setColor(color) gc.circle('line',0,0,rad,side) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) mStr(M.id,0,-28) if M.sel>0 and M.list then setFont(25) @@ -139,7 +139,7 @@ function scene.draw() gc.pop() end - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) if selected then setFont(30) gc.printf(text.modInfo[selected.name],70,540,950) diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index d36e63b9..31719c4e 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -60,7 +60,7 @@ function scene.keyDown(key,isRep) end function scene.draw() - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) setFont(50) gc.print(bgmList[selected],320,355) @@ -90,7 +90,7 @@ function scene.draw() gc.setColor(1,1,1,.4) gc.setLineWidth(4) gc.line(500,600,900,600) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6) end end diff --git a/parts/scenes/net_league.lua b/parts/scenes/net_league.lua index 5c2ef79d..dc4f0f15 100644 --- a/parts/scenes/net_league.lua +++ b/parts/scenes/net_league.lua @@ -8,7 +8,7 @@ function scene.sceneInit() end function scene.draw() - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) setFont(100) mStr("Tech League",640,120) drawSelfProfile() diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index 60428e69..1474aba8 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -103,7 +103,7 @@ function scene.draw() --Joining mark if NET.getlock('enterRoom')then - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(15) local t=TIME()*6.26%6.2832 gc.arc('line','open',640,360,80,t,t+4.26) diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 88337113..c0d9a831 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -62,11 +62,12 @@ function scene.draw() for x=40,360,40 do gc.line(x,-10,x,90) end - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.line(0,-10,0,90) gc.line(400,-10,400,90) --O mino animation + gc.setColor(1,1,1) local O=SKIN.lib[SETTING.skinSet][SETTING.skin[6]] gc.draw(O,40*pos,0,nil,40/30) gc.draw(O,40*pos,40,nil,40/30) diff --git a/parts/scenes/setting_key.lua b/parts/scenes/setting_key.lua index 9ced9b75..268eb63f 100644 --- a/parts/scenes/setting_key.lua +++ b/parts/scenes/setting_key.lua @@ -82,7 +82,7 @@ end function scene.draw() setFont(15) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) for i=0,20 do for j=1,#keyList[i]do diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index 666475fa..8ef2370a 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -83,7 +83,7 @@ function scene.touchMove(_,_,dx,dy) end function scene.draw() - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.setLineWidth(3) gc.rectangle('line',490,65,300,610) VK.preview(selected) diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index c04aad5b..97adb349 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -85,7 +85,7 @@ function scene.draw() end gc.replaceTransform(SCR.xOy) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) local T=40*math.min(time,45) local L=text.staff setFont(40) diff --git a/parts/texture.lua b/parts/texture.lua index 24c82ab4..4b30b226 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -72,10 +72,10 @@ for i=1,8 do gc.translate(12*i,i==1 and 8 or 14) gc.setLineWidth(16) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.polygon('line',title[i]) - gc.setColor(0,0,0) + gc.setColor(.2,.2,.2) for j=1,#titleTriangles[i]do gc.polygon('fill',titleTriangles[i][j]) end @@ -88,16 +88,16 @@ for i=1,8 do gc.translate(12*i,i==1 and 8 or 14) gc.setLineWidth(16) - gc.setColor(1,1,1) + gc.setColor(COLOR.Z) gc.polygon('line',title[i]) gc.setLineWidth(4) - gc.setColor(0,0,0) + gc.setColor(COLOR.D) for j=1,#titleTriangles[i]do gc.polygon('fill',titleTriangles[i][j]) end - gc.setColor(titleColor[i]) + gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.7) gc.translate(-4,-4) for j=1,#titleTriangles[i]do gc.polygon('fill',titleTriangles[i][j]) From 1d7e58d3bf6d1d56a038481b7748328e3762121e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 01:15:51 +0800 Subject: [PATCH 23/70] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=81=94=E7=BD=91?= =?UTF-8?q?=E5=AF=B9=E6=88=98bgm=E5=88=97=E8=A1=A8=E9=87=8C=E7=9A=84warped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/netBattle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/modes/netBattle.lua b/parts/modes/netBattle.lua index b7506877..e38883de 100644 --- a/parts/modes/netBattle.lua +++ b/parts/modes/netBattle.lua @@ -10,7 +10,7 @@ return{ color=COLOR.white, env={ bg={'bg1','bg2','blackhole','blockfall','blockrain','blockspace','cubes','fan','flink','glow','lightning','matrix','rainbow','rainbow2','rgb','tunnel','welcome'}, - bgm={'battle','beat5th','cruelty','distortion','echo','far','final','here','hope','memory','moonbeam','push','rectification','secret7th remix','secret7th','secret8th remix','secret8th','shift','shining terminal','storm','super7th','there','truth','vapor','warped','waterfall'}, + bgm={'battle','beat5th','cruelty','distortion','echo','far','final','here','hope','memory','moonbeam','push','rectification','secret7th remix','secret7th','secret8th remix','secret8th','shift','shining terminal','storm','super7th','there','truth','vapor','waterfall'}, }, load=function() for k,v in next,NET.roomState.roomData do From f6e3b3548239f7f0f3b71fba10c885e2059ac1f1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 14:54:52 +0800 Subject: [PATCH 24/70] =?UTF-8?q?DOGC=E7=A7=BB=E5=85=A5GC=E6=8B=93?= =?UTF-8?q?=E5=B1=95=E6=A8=A1=E5=9D=97=EF=BC=8CGC.DO=E6=B7=BB=E5=8A=A0dRPo?= =?UTF-8?q?l(=E5=9C=86=E8=A7=92=E6=AD=A3=E5=A4=9A=E8=BE=B9=E5=BD=A2)?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/gcExtend.lua | 108 ++++++++++++++++++++++++++++++++++- Zframework/init.lua | 15 +++-- Zframework/message.lua | 12 ++-- Zframework/widget.lua | 14 ++--- parts/backgrounds/league.lua | 4 +- parts/gametoolfunc.lua | 2 +- parts/player/draw.lua | 18 +++--- parts/scenes/load.lua | 12 ++-- parts/scenes/music.lua | 6 +- parts/scenes/replays.lua | 8 +-- parts/texture.lua | 54 +++++++++--------- parts/updateLog.lua | 2 +- parts/users.lua | 4 +- parts/virtualKey.lua | 32 +++++------ 14 files changed, 196 insertions(+), 95 deletions(-) diff --git a/Zframework/gcExtend.lua b/Zframework/gcExtend.lua index be81626e..9c6a0f0b 100644 --- a/Zframework/gcExtend.lua +++ b/Zframework/gcExtend.lua @@ -1,6 +1,7 @@ -local setColor=love.graphics.setColor -local printf=love.graphics.printf -local draw=love.graphics.draw +local gc=love.graphics +local setColor=gc.setColor +local printf=gc.printf +local draw=gc.draw local GC={} function GC.str(obj,x,y)printf(obj,x-626,y,1252,'center')end function GC.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end @@ -31,4 +32,105 @@ function GC.shadedPrint(str,x,y,mode,d,clr1,clr2) setColor(clr2 or COLOR.Z) printf(str,x,y,w,mode) end +do--function GC.DO(L) + local cmds={ + origin="origin", + move="translate", + scale="scale", + rotate="rotate", + shear="shear", + clear="clear", + + setCL="setColor", + setCM="setColorMask", + setLW="setLineWidth", + setLS="setLineStyle", + setLJ="setLineJoin", + + print="print", + setFT=setFont, + mText=GC.str, + mDraw=GC.draw, + mOutDraw=GC.outDraw, + + draw="draw", + line="line", + fRect=function(...)gc.rectangle('fill',...)end, + dRect=function(...)gc.rectangle('line',...)end, + fCirc=function(...)gc.circle('fill',...)end, + dCirc=function(...)gc.circle('line',...)end, + fElps=function(...)gc.ellipse('fill',...)end, + dElps=function(...)gc.ellipse('line',...)end, + fPoly=function(...)gc.polygon('fill',...)end, + + dPoly=function(...)gc.polygon('line',...)end, + dRPol=function(x,y,R,segments,r,phase) + local X,Y={},{} + local ang=phase or 0 + local angStep=6.283185307179586/segments + for i=1,segments do + X[i]=x+R*math.cos(ang) + Y[i]=y+R*math.sin(ang) + ang=ang+angStep + end + X[segments+1]=x+R*math.cos(ang) + Y[segments+1]=y+R*math.sin(ang) + + local halfAng=6.283185307179586/segments/2 + local erasedLen=r*math.tan(halfAng) + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir)) + + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + end, + + dPie=function(...)gc.arc('line',...)end, + dArc=function(...)gc.arc('line','open',...)end, + dBow=function(...)gc.arc('line','closed',...)end, + fPie=function(...)gc.arc('fill',...)end, + fArc=function(...)gc.arc('fill','open',...)end, + fBow=function(...)gc.arc('fill','closed',...)end, + } + local sizeLimit=gc.getSystemLimits().texturesize + function GC.DO(L) + gc.push() + ::REPEAT_tryAgain:: + local success,canvas=pcall(gc.newCanvas,math.min(L[1],sizeLimit),math.min(L[2],sizeLimit)) + if not success then + sizeLimit=math.floor(sizeLimit*.8) + goto REPEAT_tryAgain + end + gc.setCanvas(canvas) + gc.origin() + gc.setColor(1,1,1) + gc.setLineWidth(1) + for i=3,#L do + local cmd=L[i][1] + if type(cmd)=='boolean'and cmd then + table.remove(L[i],1) + cmd=L[i][1] + end + if type(cmd)=='string'then + local func=cmds[cmd] + if type(func)=='string'then func=gc[func]end + if func then + func(unpack(L[i],2)) + else + error("No gc command: "..cmd) + end + end + end + gc.setCanvas() + gc.pop() + return canvas + end +end return GC \ No newline at end of file diff --git a/Zframework/init.lua b/Zframework/init.lua index 2e9c4b57..1a5967a3 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -25,7 +25,6 @@ VIB= require'Zframework.vibrate' SFX= require'Zframework.sfx' LIGHT= require'Zframework.light' -DOGC= require'Zframework.doGC' BG= require'Zframework.background' WIDGET= require'Zframework.widget' TEXT= require'Zframework.text' @@ -66,7 +65,7 @@ joysticks={} local devMode -local batteryImg=DOGC{31,20, +local batteryImg=GC.DO{31,20, {'fRect',1,0,26,2}, {'fRect',1,18,26,2}, {'fRect',0,1,2,18}, @@ -496,28 +495,28 @@ local wsBottomImage do ins(L,{'setCL',1,1,1,i*.005}) ins(L,{'fRect',i,0,1,18}) end - wsBottomImage=DOGC(L) + wsBottomImage=GC.DO(L) end -local ws_deadImg=DOGC{20,20, +local ws_deadImg=GC.DO{20,20, {'setFT',20}, {'setCL',1,.3,.3}, {'print',"X",3,-4}, } -local ws_connectingImg=DOGC{20,20, +local ws_connectingImg=GC.DO{20,20, {'setLW',3}, {'dArc',11.5,10,6.26,1,5.28}, } -local ws_runningImg=DOGC{20,20, +local ws_runningImg=GC.DO{20,20, {'setFT',20}, {'setCL',.5,1,0}, {'print',"R",3,-4}, } -local cursorImg=DOGC{16,16, +local cursorImg=GC.DO{16,16, {'fCirc',8,8,4}, {'setCL',1,1,1,.7}, {'fCirc',8,8,6}, } -local cursor_holdImg=DOGC{16,16, +local cursor_holdImg=GC.DO{16,16, {'setLW',2}, {'dCirc',8,8,7}, {'fCirc',8,8,3}, diff --git a/Zframework/message.lua b/Zframework/message.lua index 38894805..37c3375c 100644 --- a/Zframework/message.lua +++ b/Zframework/message.lua @@ -6,7 +6,7 @@ local ins,rem=table.insert,table.remove local mesList={} local mesIcon={ - check=DOGC{40,40, + check=GC.DO{40,40, {'setLW',10}, {'setCL',0,0,0}, {'line',4,19,15,30,36,9}, @@ -14,7 +14,7 @@ local mesIcon={ {'setCL',.7,1,.6}, {'line',5,20,15,30,35,10}, }, - info=DOGC{40,40, + info=GC.DO{40,40, {'setCL',.2,.25,.85}, {'fCirc',20,20,15}, {'setCL',1,1,1}, @@ -23,7 +23,7 @@ local mesIcon={ {'fRect',18,11,4,4}, {'fRect',18,17,4,12}, }, - broadcast=DOGC{40,40, + broadcast=GC.DO{40,40, {'setCL',1,1,1}, {'fRect',2,4,36,26,3}, {'fPoly',2,27,2,37,14,25}, @@ -31,7 +31,7 @@ local mesIcon={ {'fRect',6,11,4,4},{'fRect',14,11,19,4}, {'fRect',6,19,4,4},{'fRect',14,19,19,4}, }, - warn=DOGC{40,40, + warn=GC.DO{40,40, {'setCL',.95,.83,.4}, {'fPoly',20.5,1,0,38,40,38}, {'setCL',0,0,0}, @@ -42,7 +42,7 @@ local mesIcon={ {'fRect',18,11,5,16}, {'fRect',18,30,5,5}, }, - error=DOGC{40,40, + error=GC.DO{40,40, {'setCL',.95,.3,.3}, {'fCirc',20,20,19}, {'setCL',0,0,0}, @@ -92,7 +92,7 @@ function MES.new(icon,str,time) startTime=.5, endTime=.5, time=time or 3, - canvas=DOGC(L), + canvas=GC.DO(L), width=w,height=h, scale=h>400 and 1/math.min(h/400,2.6)or 1 }) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 6304b602..779d949c 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -19,22 +19,22 @@ local getFont,setFont,mStr=getFont,setFont,mStr local mDraw,mDraw_X,mDraw_Y=GC.draw,GC.simpX,GC.simpY local xOy=SCR.xOy -local downArrowIcon=DOGC{40,25,{'fPoly',0,0,20,25,40,0}} -local upArrowIcon=DOGC{40,25,{'fPoly',0,25,20,0,40,25}} -local clearIcon=DOGC{40,40, +local downArrowIcon=GC.DO{40,25,{'fPoly',0,0,20,25,40,0}} +local upArrowIcon=GC.DO{40,25,{'fPoly',0,25,20,0,40,25}} +local clearIcon=GC.DO{40,40, {'fRect',16,5,8,3}, {'fRect',8,8,24,3}, {'fRect',11,14,18,21}, } -local sureIcon=DOGC{40,40, +local sureIcon=GC.DO{40,40, {'setFT',35}, {'mText',"?",20,-6}, } -local smallerThen=DOGC{20,20, +local smallerThen=GC.DO{20,20, {'setLW',5}, {'line',18,2,1,10,18,18}, } -local largerThen=DOGC{20,20, +local largerThen=GC.DO{20,20, {'setLW',5}, {'line',2,2,19,10,2,18}, } @@ -1452,7 +1452,7 @@ local widgetCover do ins(L,{'fRect',0,i,1,2}) ins(L,{'fRect',0,360-i,1,2}) end - widgetCover=DOGC(L) + widgetCover=GC.DO(L) end local scr_w,scr_h function WIDGET.resize(w,h) diff --git a/parts/backgrounds/league.lua b/parts/backgrounds/league.lua index 521fdc04..7f85cc0e 100644 --- a/parts/backgrounds/league.lua +++ b/parts/backgrounds/league.lua @@ -8,7 +8,7 @@ local upCover do table.insert(L,{'setCL',.6,1,1,i*.01}) table.insert(L,{'fRect',0,63-i,1,1}) end - upCover=DOGC(L) + upCover=GC.DO(L) end local downCover do local L={1,64} @@ -16,7 +16,7 @@ local downCover do table.insert(L,{'setCL',1,.5,.8,i*.01}) table.insert(L,{'fRect',0,i,1,1}) end - downCover=DOGC(L) + downCover=GC.DO(L) end local W,H diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 8e253330..3f44bca1 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -598,7 +598,7 @@ do--function drawSelfProfile() ins(img,{"dRect",2,2,21,21}) --TODO: draw with lv - img=DOGC(img) + img=GC.DO(img) rawset(self,lv,img) return img end}) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 8953373a..99a7dbae 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -29,21 +29,21 @@ local hideBoardStencil={ down=function()gc_rectangle('fill',0,300,300,300)end, all=function()gc_rectangle('fill',0,0,300,600)end, } -local dialFrame=DOGC{97,32, +local dialFrame=GC.DO{97,32, {'setLW',2}, {'dRect',1,1,30,30,3}, {'dRect',36,1,60,30,3}, } -local dialNeedle=DOGC{22,4, +local dialNeedle=GC.DO{22,4, {'fRect',0,1,20,2}, {'fCirc',20,2,2}, } -local multiple=DOGC{15,15, +local multiple=GC.DO{15,15, {'setLW',3}, {'line',2,2,12,12}, {'line',2,12,12,2}, } -local spinCenterImg=DOGC{9,9, +local spinCenterImg=GC.DO{9,9, {'setCL',1,1,1,.2}, {'fRect',0,0,9,9}, {'setCL',1,1,1,.6}, @@ -53,7 +53,7 @@ local spinCenterImg=DOGC{9,9, {'setCL',1,1,1}, {'fRect',3,3,3,3}, } -local playerBoarders=DOGC{334,620, +local playerBoarders=GC.DO{334,620, {'setLW',2}, {'setCL',.97,.97,.975}, {'dRect',16,1,302,618,7}, @@ -65,15 +65,15 @@ local gridLines do local L={300,640,{'setLW',2}} for x=1,9 do table.insert(L,{'line',30*x,0,30*x,640})end for y=0,20 do table.insert(L,{'line',0,10+30*y,300,10+30*y})end - gridLines=DOGC(L) + gridLines=GC.DO(L) end -local LDmarks=gc.newSpriteBatch(DOGC{14,5,{'fRect',0,0,14,5,3}},15,'static') +local LDmarks=gc.newSpriteBatch(GC.DO{14,5,{'fRect',0,0,14,5,3}},15,'static') for i=0,14 do LDmarks:add(3+20*i,615)end -local bpmImage=DOGC{31,12, +local bpmImage=GC.DO{31,12, {'setFT',15}, {'print',"BPM",0,-5} } -local kpmImage=DOGC{31,12, +local kpmImage=GC.DO{31,12, {'setFT',15}, {'print',"KPM",0,-5} } diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index adf72330..300d0354 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -26,13 +26,13 @@ local loadingThread=coroutine.wrap(function() YIELD('loadModeIcon') local modeIcons={} - modeIcons.marathon=DOGC{32,32, + modeIcons.marathon=GC.DO{32,32, {'move',3,1}, {'fRect',10,4,-2,23}, {'fPoly',10,4,24,10,10,16.5}, {'fRect',4,24,10,3}, } - modeIcons.infinite=DOGC{64,64, + modeIcons.infinite=GC.DO{64,64, {'setLW',4}, {'dCirc',32,32,28}, {'line',32,32,32,14}, @@ -43,14 +43,14 @@ local loadingThread=coroutine.wrap(function() {'fRect',52,30,4,4}, {'fRect',30,52,4,4}, } - modeIcons.classic=DOGC{64,64, + 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=DOGC{64,64, + modeIcons.tsd=GC.DO{64,64, {'fRect',7,7,16,16}, {'fRect',7,41,16,16}, {'fRect',41,41,16,16}, @@ -58,7 +58,7 @@ local loadingThread=coroutine.wrap(function() {'setLW',1}, {'dPoly',7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39}, } - modeIcons.t49=DOGC{64,64, + 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}, @@ -66,7 +66,7 @@ local loadingThread=coroutine.wrap(function() {'setCL',1,1,1,.7}, {'fRect',20,10,23,43}, } - modeIcons.t99=DOGC{64,64, + 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}, diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index 31719c4e..9b176c59 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -100,9 +100,9 @@ scene.widgetList={ WIDGET.newText{name="arrow", x=270, y=360,font=45,align='L'}, WIDGET.newText{name="now", x=700, y=500,font=50,align='R',hideF=function()return not BGM.nowPlay end}, WIDGET.newSlider{name="bgm", x=760, y=80,w=400,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newButton{name="up", x=200, y=250,w=120,code=pressKey"up",hideF=function()return selected==1 end,fText=DOGC{32,32,{'setLW',4},{'line',2,28,16,4,30,28}}}, - WIDGET.newButton{name="play", x=200, y=390,w=120,code=pressKey"space",fText=DOGC{64,64,{'fPoly',14+3,10,14+3,54,55+3,32}}}, - WIDGET.newButton{name="down", x=200, y=530,w=120,code=pressKey"down",hideF=function()return selected==#bgmList end,fText=DOGC{32,32,{'setLW',4},{'line',2,4,16,28,30,4}}}, + WIDGET.newButton{name="up", x=200, y=250,w=120,code=pressKey"up",hideF=function()return selected==1 end,fText=GC.DO{32,32,{'setLW',4},{'line',2,28,16,4,30,28}}}, + WIDGET.newButton{name="play", x=200, y=390,w=120,code=pressKey"space",fText=GC.DO{64,64,{'fPoly',14+3,10,14+3,54,55+3,32}}}, + WIDGET.newButton{name="down", x=200, y=530,w=120,code=pressKey"down",hideF=function()return selected==#bgmList end,fText=GC.DO{32,32,{'setLW',4},{'line',2,4,16,28,30,4}}}, WIDGET.newButton{name="sound", x=1140, y=540,w=170,h=80,font=40,code=pressKey"tab"}, WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } diff --git a/parts/scenes/replays.lua b/parts/scenes/replays.lua index ac8da485..34734ee4 100644 --- a/parts/scenes/replays.lua +++ b/parts/scenes/replays.lua @@ -150,10 +150,10 @@ end scene.widgetList={ listBox, - WIDGET.newButton{name="export",x=200,y=640,w=70,color='lG',code=pressKey"cC",fText=DOGC{50,50,{'fRect',8,44,34,4},{'fRect',22,17,6,23},{'fPoly',25,5,10,20,40,20}}}, - WIDGET.newButton{name="import",x=300,y=640,w=70,color='lN',code=pressKey"cV",fText=DOGC{50,50,{'fRect',8,44,34,4},{'fRect',22,5,6,23},{'fPoly',25,40,10,25,40,25}}}, - WIDGET.newButton{name="play",x=700,y=640,w=170,h=80,color='lY',code=pressKey"return",fText=DOGC{50,50,{'fPoly',10,0,49,24,10,49}}}, - WIDGET.newButton{name="delete",x=850,y=640,w=80,h=80,color='lR',code=pressKey"delete",fText=DOGC{50,50,{'setLW',8},{'line',5,5,45,45},{'line',5,45,45,5}}}, + WIDGET.newButton{name="export",x=200,y=640,w=70,color='lG',code=pressKey"cC",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,17,6,23},{'fPoly',25,5,10,20,40,20}}}, + WIDGET.newButton{name="import",x=300,y=640,w=70,color='lN',code=pressKey"cV",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,5,6,23},{'fPoly',25,40,10,25,40,25}}}, + WIDGET.newButton{name="play",x=700,y=640,w=170,h=80,color='lY',code=pressKey"return",fText=GC.DO{50,50,{'fPoly',10,0,49,24,10,49}}}, + WIDGET.newButton{name="delete",x=850,y=640,w=80,h=80,color='lR',code=pressKey"delete",fText=GC.DO{50,50,{'setLW',8},{'line',5,5,45,45},{'line',5,45,45,5}}}, WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } diff --git a/parts/texture.lua b/parts/texture.lua index 4b30b226..02b27338 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -27,21 +27,21 @@ end gc.setLineWidth(2) TEXTURE.puzzleMark={} for i=1,17 do - TEXTURE.puzzleMark[i]=DOGC{30,30, + TEXTURE.puzzleMark[i]=GC.DO{30,30, {'setCL',minoColor[i][1],minoColor[i][2],minoColor[i][3],.6}, {'dRect',5,5,20,20}, {'dRect',10,10,10,10}, } end for i=18,24 do - TEXTURE.puzzleMark[i]=DOGC{30,30, + TEXTURE.puzzleMark[i]=GC.DO{30,30, {'setCL',minoColor[i]}, {'dRect',7,7,16,16}, } end -TEXTURE.puzzleMark[-1]=DOGC{30,30, +TEXTURE.puzzleMark[-1]=GC.DO{30,30, {'setCL',1,1,1,.8}, - {'draw',DOGC{30,30, + {'draw',GC.DO{30,30, {'setLW',3}, {'line',5,5,25,25}, {'line',5,25,25,5}, @@ -51,7 +51,7 @@ TEXTURE.puzzleMark[-1]=DOGC{30,30, --A simple pixel font TEXTURE.pixelNum={} for i=0,9 do - TEXTURE.pixelNum[i]=DOGC{5,9, + TEXTURE.pixelNum[i]=GC.DO{5,9, {('1011011111'):byte(i+1)>48,'fRect',1,0,3,1},--up {('0011111011'):byte(i+1)>48,'fRect',1,4,3,1},--middle {('1011011011'):byte(i+1)>48,'fRect',1,8,3,1},--down @@ -108,7 +108,7 @@ for i=1,8 do end --Sure mark -TEXTURE.sure=DOGC{48,64, +TEXTURE.sure=GC.DO{48,64, {'fRect',0,0,10,27}, {'fRect',0,0,48,10}, {'fRect',38,10,10,15}, @@ -118,7 +118,7 @@ TEXTURE.sure=DOGC{48,64, } --Setting icon -TEXTURE.setting=DOGC{64,64, +TEXTURE.setting=GC.DO{64,64, {'setLW',8}, {'dCirc',32,32,18}, {'setLW',10}, @@ -133,7 +133,7 @@ TEXTURE.setting=DOGC{64,64, } --Music mark -TEXTURE.music=DOGC{64,64, +TEXTURE.music=GC.DO{64,64, {'setLW',6}, {'line',19,9,60,7}, {'setLW',2}, @@ -144,14 +144,14 @@ TEXTURE.music=DOGC{64,64, } --Mute mark -TEXTURE.mute=DOGC{64,64, +TEXTURE.mute=GC.DO{64,64, {'mDraw',TEXTURE.music,32,32,0,.9}, {'setLW',4}, {'line',6,6,57,57}, } --Language mark -TEXTURE.language=DOGC{64,64, +TEXTURE.language=GC.DO{64,64, {'setLW',2}, {'dCirc',32,32,30}, {'line',2,31,62,31}, @@ -161,7 +161,7 @@ TEXTURE.language=DOGC{64,64, } --Info. mark -TEXTURE.info=DOGC{50,50, +TEXTURE.info=GC.DO{50,50, {'setLW',3}, {'dCirc',25,25,22}, {'fRect',22,11,6,6}, @@ -169,7 +169,7 @@ TEXTURE.info=DOGC{50,50, } --Question mark -TEXTURE.question=DOGC{50,50, +TEXTURE.question=GC.DO{50,50, {'setLW',3}, {'dCirc',25,25,22}, {'setFT',40}, @@ -177,14 +177,14 @@ TEXTURE.question=DOGC{50,50, } --More mark -TEXTURE.more=DOGC{60,15, +TEXTURE.more=GC.DO{60,15, {'fCirc',10,7,6}, {'fCirc',30,7,6}, {'fCirc',50,7,6}, } --Back mark -TEXTURE.back=DOGC{60,55, +TEXTURE.back=GC.DO{60,55, {'setLW',6}, {'line',11,10,40,10}, {'line',10,40,40,40}, @@ -194,9 +194,9 @@ TEXTURE.back=DOGC{60,55, } --Quit mark -TEXTURE.quit=DOGC{50,50, +TEXTURE.quit=GC.DO{50,50, {'setCL',1,1,1}, - {'draw',DOGC{50,50, + {'draw',GC.DO{50,50, {'setLW',7}, {'line',5,5,45,45}, {'line',5,45,45,5}, @@ -204,9 +204,9 @@ TEXTURE.quit=DOGC{50,50, } --Quit mark (small) -TEXTURE.quit_small=DOGC{30,30, +TEXTURE.quit_small=GC.DO{30,30, {'setCL',1,1,1}, - {'draw',DOGC{30,30, + {'draw',GC.DO{30,30, {'setLW',4}, {'line',2,2,28,28}, {'line',2,28,28,2}, @@ -214,19 +214,19 @@ TEXTURE.quit_small=DOGC{30,30, } TEXTURE.game={ - restart=DOGC{32,32,{'setLW',3},{'dArc',16,16,11,.7,5.5},{'setLW',2.5},{'line',21,.7,24,8,16,11}}, - pause=DOGC{18,23,{'fRect',0,0,3,23},{'fRect',15,0,3,23}}, + restart=GC.DO{32,32,{'setLW',3},{'dArc',16,16,11,.7,5.5},{'setLW',2.5},{'line',21,.7,24,8,16,11}}, + pause=GC.DO{18,23,{'fRect',0,0,3,23},{'fRect',15,0,3,23}}, } --Replay speed buttons TEXTURE.rep={ - rep0=DOGC{50,50,{'fRect',11,8,8,34},{'fRect',31,8,8,34}}, - repP8=DOGC{50,50,{'setFT',15},{'print',"0.125x",0,15}}, - repP2=DOGC{50,50,{'setFT',25},{'print',"0.5x",0,8}}, - rep1=DOGC{50,50,{'setFT',30},{'print',"1x",7,3}}, - rep2=DOGC{50,50,{'setFT',30},{'print',"2x",7,3}}, - rep5=DOGC{50,50,{'setFT',30},{'print',"5x",7,3}}, - step=DOGC{50,50,{'setFT',30},{'fRect',12,7,4,36},{'setLW',4},{'line',25,14,41,25,25,36}}, + rep0=GC.DO{50,50,{'fRect',11,8,8,34},{'fRect',31,8,8,34}}, + repP8=GC.DO{50,50,{'setFT',15},{'print',"0.125x",0,15}}, + repP2=GC.DO{50,50,{'setFT',25},{'print',"0.5x",0,8}}, + rep1=GC.DO{50,50,{'setFT',30},{'print',"1x",7,3}}, + rep2=GC.DO{50,50,{'setFT',30},{'print',"2x",7,3}}, + rep5=GC.DO{50,50,{'setFT',30},{'print',"5x",7,3}}, + step=GC.DO{50,50,{'setFT',30},{'fRect',12,7,4,36},{'setLW',4},{'line',25,14,41,25,25,36}}, } gc.setCanvas() diff --git a/parts/updateLog.lua b/parts/updateLog.lua index e7db2108..20dce1c8 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -142,7 +142,7 @@ return STRING.split([=[ REPLAY不再需要保存到本地的数据,每次启动自动刷新录像文件列表 字符串拓展模块和DATA模块新增方法 修复: - DOGC模块创建超过系统限制大小的画布导致报错 + GC.DO模块创建超过系统限制大小的画布导致报错 玩家退出房间时移除键错误导致崩溃 0.15.4: 近地轨道 Low Earth Orbit diff --git a/parts/users.lua b/parts/users.lua index 2e2510d5..4ec6ee73 100644 --- a/parts/users.lua +++ b/parts/users.lua @@ -9,12 +9,12 @@ local emptyUser={ local defaultAvatar={} for i=1,29 do local img=TEXTURE.miniBlock[i] - defaultAvatar[i]=DOGC{128,128, + defaultAvatar[i]=GC.DO{128,128, {'clear',.1,.1,.1}, {'draw',img,63,63,.2,30,30,img:getWidth()/2,img:getHeight()/2}, } end -local errorAvatar=DOGC{128,128, +local errorAvatar=GC.DO{128,128, {'setCL',1,.2,.15}, {'setLW',10}, {'line',10,10,117,117}, diff --git a/parts/virtualKey.lua b/parts/virtualKey.lua index 3b175263..7d2471c4 100644 --- a/parts/virtualKey.lua +++ b/parts/virtualKey.lua @@ -8,31 +8,31 @@ local VK_org=VK_org local skin=1 local buttonImages={ - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98},{'dCirc',100,100,90}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,8},{'dCirc',100,100,90,8}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,6},{'dCirc',100,100,90,6}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,4},{'dCirc',100,100,89,4}}, - DOGC{200,200,{'setLW',4},{'dRect',31,31,138,138},{'dRect',39,39,122,122}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98},{'dCirc',100,100,90}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8},{'dCirc',100,100,90,8}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6},{'dCirc',100,100,90,6}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4},{'dCirc',100,100,89,4}}, + GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138},{'dRect',39,39,122,122}}, } local rippleImages={ - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,8}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,6}}, - DOGC{200,200,{'setLW',4},{'dCirc',100,100,98,4}}, - DOGC{200,200,{'setLW',4},{'dRect',31,31,138,138}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4}}, + GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138}}, } local holdImages={ - DOGC{200,200,{'fCirc',100,100,86}}, - DOGC{200,200,{'fCirc',100,100,86,8}}, - DOGC{200,200,{'fCirc',100,100,85,6}}, - DOGC{200,200,{'fCirc',100,100,83,4}}, - DOGC{200,200,{'fRect',43,43,114,114}}, + GC.DO{200,200,{'fCirc',100,100,86}}, + GC.DO{200,200,{'fCirc',100,100,86,8}}, + GC.DO{200,200,{'fCirc',100,100,85,6}}, + GC.DO{200,200,{'fCirc',100,100,83,4}}, + GC.DO{200,200,{'fRect',43,43,114,114}}, } --Virtualkey icons local VKIcon={} gc.setDefaultFilter('nearest','nearest') local VKI=gc.newImage("media/image/virtualkey.png") -for i=1,20 do VKIcon[i]=DOGC{36,36,{'draw',VKI,(i-1)%5*-36,math.floor((i-1)*.2)*-36}}end +for i=1,20 do VKIcon[i]=GC.DO{36,36,{'draw',VKI,(i-1)%5*-36,math.floor((i-1)*.2)*-36}}end gc.setDefaultFilter('linear','linear') --In-game virtualkey layout data From 6713f48361ecab50cfdbc5d2cd21a76b0d02c840 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 15:27:38 +0800 Subject: [PATCH 25/70] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0sudo=E5=91=BD=E4=BB=A4=E7=9A=84=E4=BA=A4=E4=BA=92=20cl?= =?UTF-8?q?ose=20#171?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 14b2fbbe..2bc6de50 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -638,7 +638,15 @@ local commands={}do commands.sudo={ code=function(code) if sudomode then - local success,result=pcall(loadstring(code)) + --Filter "" + if #code==0 then log{C.R,"Usage: sudo [Lua code]"}return end + + --Check Syntax error + local func,errmsg=loadstring(code) + if errmsg then log{C.R,errmsg}return end + + --Run code + local success,result=pcall(func) if success then if result~=nil then log{C.lG,">> "..tostring(result)} From 451cf9093972f528bb19168f0b18f3ce7df97ad1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 15:42:00 +0800 Subject: [PATCH 26/70] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/setting_sound.lua | 3 +-- parts/scenes/setting_video.lua | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 67fc9b27..7488da74 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -92,8 +92,7 @@ scene.widgetList={ SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=0,0,0,0,0,0 end BGM.freshVolume() - end - }, + end}, WIDGET.newSwitch{name="fine", x=1150, y=270,disp=SETval("fine"),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, WIDGET.newSelector{name="cv", x=1100, y=380,w=200,list={'miya','naki','xiaoya'},disp=function()return cv end,code=function(i)cv=i end}, diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index 3c625f5b..b6d562e9 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -80,12 +80,12 @@ scene.widgetList={ list={'normal','soft','gray','light','color'}, disp=SETval("blockSatur"), code=function(v)SETTING.blockSatur=v;applyBlockSatur(SETTING.blockSatur)end - }, + }, WIDGET.newSelector{name="fieldSatur",x=800,y=1540,w=300,color='lN', list={'normal','soft','gray','light','color'}, disp=SETval("fieldSatur"), code=function(v)SETTING.fieldSatur=v;applyFieldSatur(SETTING.fieldSatur)end - }, + }, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } From 43710a4c4d67ef4096ca07230f0601bdc5fc6ed6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 16:55:15 +0800 Subject: [PATCH 27/70] =?UTF-8?q?GC.DO=E6=B7=BB=E5=8A=A0fRPol=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/gcExtend.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Zframework/gcExtend.lua b/Zframework/gcExtend.lua index 9c6a0f0b..a289269f 100644 --- a/Zframework/gcExtend.lua +++ b/Zframework/gcExtend.lua @@ -64,6 +64,38 @@ do--function GC.DO(L) fPoly=function(...)gc.polygon('fill',...)end, dPoly=function(...)gc.polygon('line',...)end, + fRPol=function(x,y,R,segments,r,phase) + local X,Y={},{} + local ang=phase or 0 + local angStep=6.283185307179586/segments + for i=1,segments do + X[i]=x+R*math.cos(ang) + Y[i]=y+R*math.sin(ang) + ang=ang+angStep + end + X[segments+1]=x+R*math.cos(ang) + Y[segments+1]=y+R*math.sin(ang) + + local L={} + local halfAng=6.283185307179586/segments/2 + local erasedLen=r*math.tan(halfAng) + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + table.insert(L,x1+erasedLen*math.cos(dir)) + table.insert(L,y1+erasedLen*math.sin(dir)) + table.insert(L,x2-erasedLen*math.cos(dir)) + table.insert(L,y2-erasedLen*math.sin(dir)) + + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + gc.polygon('fill',L) + end, dRPol=function(x,y,R,segments,r,phase) local X,Y={},{} local ang=phase or 0 From 336aa85cf8164765d36d4cf87130c31757e14f44 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 16:56:08 +0800 Subject: [PATCH 28/70] =?UTF-8?q?key=E6=8E=A7=E4=BB=B6=E6=96=B0=E5=A2=9EfS?= =?UTF-8?q?hade=E5=B1=9E=E6=80=A7(=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BA=AE?= =?UTF-8?q?=E8=B5=B7=E7=B4=A0=E6=9D=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 779d949c..8094c9d1 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -291,21 +291,38 @@ function key:draw() local x,y,w,h=self.x,self.y,self.w,self.h local ATV=self.ATV local c=self.color + local align=self.align local r,g,b=c[1],c[2],c[3] - gc_setColor(1,1,1,ATV*.1) - gc_rectangle('fill',x,y,w,h,3) + --Frame + if not self.noFrame then + gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) + gc_setLineWidth(2) + gc_rectangle('line',x,y,w,h,3) + end - gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) - gc_setLineWidth(2) - gc_rectangle('line',x,y,w,h,3) + --Fill + if self.fShade then + gc_setColor(r,g,b,ATV*.25) + if align=='M'then + mDraw(self.fShade,x+w*.5,y+h*.5) + elseif align=='L'then + mDraw_Y(self.fShade,x+self.edge,y+h*.5) + elseif align=='R'then + mDraw_Y(self.fShade,x+w-self.edge-self.fShade:getWidth(),y+h*.5) + end + else + gc_setColor(1,1,1,ATV*.05) + gc_rectangle('fill',x,y,w,h,3) + end - gc_setColor(r,g,b,1.2) - if self.align=='M'then + --Object + gc_setColor(r,g,b) + if align=='M'then mDraw(self.obj,x+w*.5,y+h*.5) - elseif self.align=='L'then + elseif align=='L'then mDraw_Y(self.obj,x+self.edge,y+h*.5) - elseif self.align=='R'then + elseif align=='R'then mDraw_Y(self.obj,x+w-self.edge-self.obj:getWidth(),y+h*.5) end end @@ -316,7 +333,7 @@ function key:press(_,_,k) self.code(k) if self.sound then SFX.play('key')end end -function WIDGET.newKey(D)--name,x,y,w[,h][,fText][,color][,font=30][,sound=true][,align='M'][,edge=0],code[,hideF][,hide] +function WIDGET.newKey(D)--name,x,y,w[,h][,fText][,fShade][,noFrame][,color][,font=30][,sound=true][,align='M'][,edge=0],code[,hideF][,hide] if not D.h then D.h=D.w end local _={ name= D.name or"_", @@ -335,6 +352,8 @@ function WIDGET.newKey(D)--name,x,y,w[,h][,fText][,color][,font=30][,sound=true] }, fText= D.fText, + fShade= D.fShade, + noFrame=D.noFrame, color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, font= D.font or 30, sound= D.sound~=false, From a74faca9cbd7383c097b1779fa96551a036aa50d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 16:56:17 +0800 Subject: [PATCH 29/70] =?UTF-8?q?=E5=A4=A7=E6=94=B9=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 220 +++++++++++++++++++++++------------------ 1 file changed, 124 insertions(+), 96 deletions(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index ab8d3305..dd951142 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -17,7 +17,8 @@ local fnsRankColor={ local scene={} -local timer--Animation timer +local page +local timer1,timer2--Animation timer local form--Form of clear & spins local radar--Radar chart local val--Radar chart normalizer @@ -28,13 +29,15 @@ local trophy--Current trophy local trophyColor--Current trophy color function scene.sceneInit(org) + page=0 if org:find("setting")then TEXT.show(text.needRestart,640,410,50,'fly',.6) end local P=PLAYERS[1] local S=P.stat - timer=org=='game'and 0 or 50 + timer1=org=='game'and 0 or 50 + timer2=timer1 local frameLostRate=(S.frame/S.time/60-1)*100 form={ @@ -150,6 +153,13 @@ function scene.keyDown(key,isRep) SFX.play('connected') end end + elseif key=="tab"or key=="Stab"then + if love.keyboard.isDown("lshift","rshift")or key=="Stab"then + page=(page-1)%2 + else + page=(page+1)%2 + end + timer2=0 else WIDGET.keyPressed(key) end @@ -159,9 +169,8 @@ function scene.update(dt) if not(GAME.result or GAME.replaying)then GAME.pauseTime=GAME.pauseTime+dt end - if timer<50 then - timer=timer+1 - end + if timer1<50 then timer1=timer1+1 end + if timer2<25 then timer2=timer2+1 end end local hexList={1,0,.5,1.732*.5,-.5,1.732*.5} @@ -169,7 +178,8 @@ 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.draw() - local T=timer*.02 + local T=timer1*.02 + local T2=timer2*.04 if T<1 or GAME.result then SCN.scenes.game.draw()end --Dark BG @@ -180,26 +190,18 @@ function scene.draw() gc.rectangle('fill',0,0,SCR.w,SCR.h) gc.replaceTransform(SCR.xOy) - --Pause Info - setFont(25) - if GAME.pauseCount>0 then - gc.setColor(.96,.92,.92,T) - mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),640,500) - end - gc.setColor(.97,.97,.97,T) --Result Text - setFont(35) - mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,90-10*(5-timer*.1)^1.5) + mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,80-10*(5-timer1*.1)^1.5) - --Mode Info - mDraw(drawableText.modeName,640,180) + --Mode Info (outside) + gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),133) --Level rank if GAME.rank>0 then gc.push('transform') - gc.translate(1090,40) + gc.translate(1050,-5) local str=text.ranks[GAME.rank] setFont(80) gc.setColor(0,0,0,T*.7) @@ -210,46 +212,109 @@ function scene.draw() gc.pop() end - --Infos - if PLAYERS[1].frameRun>180 then - gc.push('transform') - gc.translate(835,210) - gc.scale(.85) - gc.setLineWidth(2) + --Big info frame + gc.push('transform') + gc.translate(560,195) + gc.setLineWidth(2) - --Frame + --Pause Info (outside) + setFont(25) + if GAME.pauseCount>0 then gc.setColor(.97,.97,.97,T*.06) - gc.rectangle('fill',-5,-5,475,rank and 390 or 360,8) + gc.rectangle('fill',-5,390,620,36,8) gc.setColor(.97,.97,.97,T) - gc.rectangle('line',-5,-5,475,rank and 390 or 360,8) + gc.rectangle('line',-5,390,620,36,8) + mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),305,389) + end - --Stats - _=form - setFont(25) - for i=1,10 do - gc.print(text.pauseStat[i],5,35*(i-1)) - gc.printf(_[i],160,35*(i-1),300,'right') - end + --Frame + gc.setColor(.97,.97,.97,T*.06) + gc.rectangle('fill',-5,-5,620,380,8) + gc.setColor(.97,.97,.97,T) + gc.rectangle('line',-5,-5,620,380,8) - --Finesse rank & trophy - if rank then - setFont(40) - local c=fnsRankColor[rank] - gc.setColor(c[1],c[2],c[3],T) - gc.print(rank,435,335) - if trophy then - setFont(20) - gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1) - gc.printf(trophy,125-120*(1-T^.5),350,300,'right') - end + --Pages + if page==0 then + --Game statistics + if PLAYERS[1].frameRun>180 then + gc.push('transform') + gc.scale(.85) + gc.setLineWidth(2) + + --Stats + _=form + setFont(30) + gc.setColor(.97,.97,.97,T2) + for i=1,10 do + gc.print(text.pauseStat[i],5,43*(i-1)+2) + gc.printf(_[i],410,43*(i-1)+2,300,'right') + end + + --Finesse rank & trophy + if rank then + setFont(40) + local c=fnsRankColor[rank] + gc.setColor(c[1],c[2],c[3],T2) + gc.print(rank,405,383) + if trophy then + setFont(20) + gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T2*2-1) + gc.printf(trophy,95-120*(1-T2^.5),398,300,'right') + end + end + gc.pop() end - gc.pop() - end + elseif page==1 then + --Radar Chart + if PLAYERS[1].frameRun>180 then + gc.setLineWidth(2) + gc.push('transform') + gc.translate(310,185) + gc.scale(.9) + + --Polygon + gc.push('transform') + gc.scale((3-2*T2)*T2) + gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) + gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) + for i=1,9,2 do + gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) + end + gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) + gc.setColor(.97,.97,.97,T2)gc.polygon('line',val) + gc.pop() + + --Axes + gc.setColor(.97,.97,.97,T2) + for i=1,3 do + local x,y=hexList[2*i-1],hexList[2*i] + gc.line(-x,-y,x,y) + end + + --Texts + local C + _=TIME()%6.2832 + if _>3.142 then + gc.setColor(.97,.97,.97,-T2*sin(_)) + setFont(35) + C,_=text.radar,textPos + else + gc.setColor(.97,.97,.97,T2*sin(_)) + setFont(20) + C,_=radar,dataPos + end + for i=1,6 do + mStr(C[i],_[2*i-1],_[2*i]) + end + gc.pop() + end + end + gc.pop() --Mods gc.push('transform') - gc.translate(740,550) - gc.scale() + gc.translate(780,585) + gc.scale(.8) if #GAME.mod>0 then gc.setLineWidth(2) if scoreValid()then @@ -273,51 +338,6 @@ function scene.draw() end end gc.pop() - - --Radar Chart - if T>.5 and PLAYERS[1].frameRun>180 then - T=T*2-1 - gc.setLineWidth(2) - gc.push('transform') - gc.translate(640,380) - gc.scale(.67) - - --Polygon - gc.push('transform') - gc.scale((3-2*T)*T) - gc.setColor(.97,.97,.97,T*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) - gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626) - for i=1,9,2 do - gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) - end - gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(.97,.97,.97,T)gc.polygon('line',val) - gc.pop() - - --Axes - gc.setColor(.97,.97,.97,T) - for i=1,3 do - local x,y=hexList[2*i-1],hexList[2*i] - gc.line(-x,-y,x,y) - end - - --Texts - local C - _=TIME()%6.2832 - if _>3.1416 then - gc.setColor(.97,.97,.97,-T*sin(_)) - setFont(35) - C,_=text.radar,textPos - else - gc.setColor(.97,.97,.97,T*sin(_)) - setFont(20) - C,_=radar,dataPos - end - for i=1,6 do - mStr(C[i],_[2*i-1],_[2*i]) - end - gc.pop() - end end scene.widgetList={ @@ -325,8 +345,16 @@ scene.widgetList={ WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=backScene}, - WIDGET.newKey{name="replay", x=0,y=0,w=50,h=50,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, - WIDGET.newKey{name="save", x=0,y=0,w=50,h=50,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, + WIDGET.newKey{name="page_prev", x=500,y=380,w=70,code=pressKey"tab",noFrame=true, + fText=GC.DO{70,70,{'setLW',2}, {'dRPol',33,35,32,3,6,3.142},{'dRPol',45,35,32,3,6,3.142}}, + fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',33,35,32,3,6,3.142},{'fRPol',45,35,32,3,6,3.142}}}} + }, + WIDGET.newKey{name="page_next", x=1230,y=380,w=70,code=pressKey"Stab",noFrame=true, + fText=GC.DO{70,70,{'setLW',2}, {'dRPol',37,35,32,3,6},{'dRPol',25,35,32,3,6}}, + fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',37,35,32,3,6},{'fRPol',25,35,32,3,6}}}} + }, + WIDGET.newKey{name="replay", x=865,y=155,w=200,h=40,font=25,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, + WIDGET.newKey{name="save", x=1075,y=155,w=200,h=40,font=25,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, } return scene \ No newline at end of file From 0f8a1057dc15e9cb1a71a2deaef4a0f26941a164 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 17:09:08 +0800 Subject: [PATCH 30/70] =?UTF-8?q?=E6=89=80=E6=9C=89mod=E7=9A=84=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=8D=A2=E6=88=90=E6=B5=85=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/globalTables.lua | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/parts/globalTables.lua b/parts/globalTables.lua index ed11ec7f..18f0210c 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -4,94 +4,94 @@ local function disableKey(P,key) end MODOPT={--Mod options {no=0,id="NX",name="next", - key="q",x=80,y=230,color='O', + key="q",x=80,y=230,color='lO', list={0,1,2,3,4,5,6}, func=function(P,O)P.gameEnv.nextCount=O end, unranked=true, }, {no=1,id="HL",name="hold", - key="w",x=200,y=230,color='O', + key="w",x=200,y=230,color='lO', list={0,1,2,3,4,5,6}, func=function(P,O)P.gameEnv.holdCount=O end, unranked=true, }, {no=2,id="FL",name="hideNext", - key="e",x=320,y=230,color='A', + key="e",x=320,y=230,color='lA', list={1,2,3,4,5}, func=function(P,O)P.gameEnv.nextStartPos=O+1 end, unranked=true, }, {no=3,id="IH",name="infHold", - key="r",x=440,y=230,color='A', + key="r",x=440,y=230,color='lA', func=function(P)P.gameEnv.infHold=true end, unranked=true, }, {no=4,id="HB",name="hideBlock", - key="y",x=680,y=230,color='V', + key="y",x=680,y=230,color='lV', func=function(P)P.gameEnv.block=false end, unranked=true, }, {no=5,id="HG",name="hideGhost", - key="u",x=800,y=230,color='V', + key="u",x=800,y=230,color='lV', func=function(P)P.gameEnv.ghost=false end, unranked=true, }, {no=6,id="HD",name="hidden", - key="i",x=920,y=230,color='P', + key="i",x=920,y=230,color='lP', list={'easy','slow','medium','fast','none'}, func=function(P,O)P.gameEnv.visible=O end, unranked=true, }, {no=7,id="HB",name="hideBoard", - key="o",x=1040,y=230,color='P', + key="o",x=1040,y=230,color='lP', list={'down','up','all'}, func=function(P,O)P.gameEnv.hideBoard=O end, unranked=true, }, {no=8,id="FB",name="flipBoard", - key="p",x=1160,y=230,color='J', + key="p",x=1160,y=230,color='lJ', list={'U-D','L-R','180'}, func=function(P,O)P.gameEnv.flipBoard=O end, unranked=true, }, {no=9,id="DT",name="dropDelay", - key="a",x=140,y=350,color='R', + key="a",x=140,y=350,color='lR', list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, func=function(P,O)P.gameEnv.drop=O end, unranked=true, }, {no=10,id="LT",name="lockDelay", - key="s",x=260,y=350,color='R', + key="s",x=260,y=350,color='lR', list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, func=function(P,O)P.gameEnv.lock=O end, unranked=true, }, {no=11,id="ST",name="waitDelay", - key="d",x=380,y=350,color='R', + key="d",x=380,y=350,color='lR', list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, func=function(P,O)P.gameEnv.wait=O end, unranked=true, }, {no=12,id="CT",name="fallDelay", - key="f",x=500,y=350,color='R', + key="f",x=500,y=350,color='lR', list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, func=function(P,O)P.gameEnv.fall=O end, unranked=true, }, {no=13,id="LF",name="life", - key="j",x=860,y=350,color='Y', + key="j",x=860,y=350,color='lY', list={0,1,2,3,5,10,15,26,42,87,500}, func=function(P,O)P.gameEnv.life=O end, unranked=true, }, {no=14,id="FB",name="forceB2B", - key="k",x=980,y=350,color='Y', + key="k",x=980,y=350,color='lY', func=function(P)P.gameEnv.b2bKill=true end, unranked=true, }, {no=15,id="PF",name="forceFinesse", - key="l",x=1100,y=350,color='Y', + key="l",x=1100,y=350,color='lY', func=function(P)P.gameEnv.fineKill=true end, unranked=true, }, @@ -124,19 +124,19 @@ MODOPT={--Mod options unranked=true, }, {no=19,id="CS",name="customSeq", - key="b",x=680,y=470,color='B', + key="b",x=680,y=470,color='lB', list={'bag','his','hisPool','c2','rnd','mess','reverb'}, func=function(P,O)P.gameEnv.sequence=O end, unranked=true, }, {no=20,id="PS",name="pushSpeed", - key="n",x=800,y=470,color='B', + key="n",x=800,y=470,color='lB', list={.5,1,2,3,5,15,1e99}, func=function(P,O)P.gameEnv.pushSpeed=O end, unranked=true, }, {no=21,id="BN",name="boneBlock", - key="m",x=920,y=470,color='B', + key="m",x=920,y=470,color='lB', list={'on','off'}, func=function(P,O)P.gameEnv.bone=O=='on'end, unranked=true, From 34c14c922c384037397dcf3cb46efc1af60ed876 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 17:40:11 +0800 Subject: [PATCH 31/70] =?UTF-8?q?=E5=86=8D=E8=B0=83=E6=95=B4=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E7=95=8C=E9=9D=A2ui=EF=BC=8Cmod=E5=92=8C=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E7=BB=9F=E8=AE=A1=E4=B8=8D=E9=87=8D=E5=8F=A0=EF=BC=8C?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=B8=B8=E6=88=8F=E5=89=8D=E6=95=B4=E4=B8=AA?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E4=BF=A1=E6=81=AF=E6=A1=86=E5=92=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8C=89=E9=92=AE=E9=83=BD=E4=B8=8D=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 160 ++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index dd951142..fe6b19ec 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -196,12 +196,12 @@ function scene.draw() mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,80-10*(5-timer1*.1)^1.5) --Mode Info (outside) - gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),133) + gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),143) --Level rank if GAME.rank>0 then gc.push('transform') - gc.translate(1050,-5) + gc.translate(1050,5) local str=text.ranks[GAME.rank] setFont(80) gc.setColor(0,0,0,T*.7) @@ -213,8 +213,9 @@ function scene.draw() end --Big info frame - gc.push('transform') - gc.translate(560,195) + if PLAYERS[1].frameRun>180 then + gc.push('transform') + gc.translate(560,205) gc.setLineWidth(2) --Pause Info (outside) @@ -236,85 +237,82 @@ function scene.draw() --Pages if page==0 then --Game statistics - if PLAYERS[1].frameRun>180 then - gc.push('transform') - gc.scale(.85) - gc.setLineWidth(2) + gc.push('transform') + gc.scale(.85) + gc.setLineWidth(2) - --Stats - _=form - setFont(30) - gc.setColor(.97,.97,.97,T2) - for i=1,10 do - gc.print(text.pauseStat[i],5,43*(i-1)+2) - gc.printf(_[i],410,43*(i-1)+2,300,'right') - end - - --Finesse rank & trophy - if rank then - setFont(40) - local c=fnsRankColor[rank] - gc.setColor(c[1],c[2],c[3],T2) - gc.print(rank,405,383) - if trophy then - setFont(20) - gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T2*2-1) - gc.printf(trophy,95-120*(1-T2^.5),398,300,'right') - end - end - gc.pop() + --Stats + _=form + setFont(30) + gc.setColor(.97,.97,.97,T2) + for i=1,10 do + gc.print(text.pauseStat[i],5,43*(i-1)+2) + gc.printf(_[i],410,43*(i-1)+2,300,'right') end + + --Finesse rank & trophy + if rank then + setFont(40) + local c=fnsRankColor[rank] + gc.setColor(c[1],c[2],c[3],T2) + gc.print(rank,405,383) + if trophy then + setFont(20) + gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T2*2-1) + gc.printf(trophy,95-120*(1-T2^.5),398,300,'right') + end + end + gc.pop() elseif page==1 then --Radar Chart - if PLAYERS[1].frameRun>180 then - gc.setLineWidth(2) - gc.push('transform') - gc.translate(310,185) - gc.scale(.9) + gc.setLineWidth(2) + gc.push('transform') + gc.translate(310,185) + gc.scale(.9) - --Polygon - gc.push('transform') - gc.scale((3-2*T2)*T2) - gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) - gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) - for i=1,9,2 do - gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) - end - gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(.97,.97,.97,T2)gc.polygon('line',val) - gc.pop() + --Polygon + gc.push('transform') + gc.scale((3-2*T2)*T2) + gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) + gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) + for i=1,9,2 do + gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) + end + gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) + gc.setColor(.97,.97,.97,T2)gc.polygon('line',val) + gc.pop() - --Axes - gc.setColor(.97,.97,.97,T2) - for i=1,3 do - local x,y=hexList[2*i-1],hexList[2*i] - gc.line(-x,-y,x,y) - end - - --Texts - local C - _=TIME()%6.2832 - if _>3.142 then - gc.setColor(.97,.97,.97,-T2*sin(_)) - setFont(35) - C,_=text.radar,textPos - else - gc.setColor(.97,.97,.97,T2*sin(_)) - setFont(20) - C,_=radar,dataPos - end - for i=1,6 do - mStr(C[i],_[2*i-1],_[2*i]) - end - gc.pop() + --Axes + gc.setColor(.97,.97,.97,T2) + for i=1,3 do + local x,y=hexList[2*i-1],hexList[2*i] + gc.line(-x,-y,x,y) end + + --Texts + local C + _=TIME()%6.2832 + if _>3.142 then + gc.setColor(.97,.97,.97,-T2*sin(_)) + setFont(35) + C,_=text.radar,textPos + else + gc.setColor(.97,.97,.97,T2*sin(_)) + setFont(20) + C,_=radar,dataPos + end + for i=1,6 do + mStr(C[i],_[2*i-1],_[2*i]) + end + gc.pop() end - gc.pop() + gc.pop() + end --Mods gc.push('transform') - gc.translate(780,585) - gc.scale(.8) + gc.translate(131,600) + gc.scale(.65) if #GAME.mod>0 then gc.setLineWidth(2) if scoreValid()then @@ -323,9 +321,9 @@ function scene.draw() gc.setColor(.7,.7,.7,T*.05) gc.rectangle('fill',-5,-5,500,150,8) else - gc.setColor(.95,0,0,T) + gc.setColor(.8,0,0,T) gc.rectangle('line',-5,-5,500,150,8) - gc.setColor(.95,0,0,T*.05) + gc.setColor(1,0,0,T*.05) gc.rectangle('fill',-5,-5,500,150,8) end setFont(35) @@ -345,16 +343,18 @@ scene.widgetList={ WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=backScene}, - WIDGET.newKey{name="page_prev", x=500,y=380,w=70,code=pressKey"tab",noFrame=true, + WIDGET.newKey{name="page_prev", x=500,y=390,w=70,code=pressKey"tab",noFrame=true, fText=GC.DO{70,70,{'setLW',2}, {'dRPol',33,35,32,3,6,3.142},{'dRPol',45,35,32,3,6,3.142}}, - fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',33,35,32,3,6,3.142},{'fRPol',45,35,32,3,6,3.142}}}} + fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',33,35,32,3,6,3.142},{'fRPol',45,35,32,3,6,3.142}}}}, + hideF=function()return PLAYERS[1].frameRun<=180 end, }, - WIDGET.newKey{name="page_next", x=1230,y=380,w=70,code=pressKey"Stab",noFrame=true, + WIDGET.newKey{name="page_next", x=1230,y=390,w=70,code=pressKey"Stab",noFrame=true, fText=GC.DO{70,70,{'setLW',2}, {'dRPol',37,35,32,3,6},{'dRPol',25,35,32,3,6}}, - fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',37,35,32,3,6},{'fRPol',25,35,32,3,6}}}} + fShade=GC.DO{70,70,{'setCL',1,1,1,.6},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',37,35,32,3,6},{'fRPol',25,35,32,3,6}}}}, + hideF=function()return PLAYERS[1].frameRun<=180 end, }, - WIDGET.newKey{name="replay", x=865,y=155,w=200,h=40,font=25,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, - WIDGET.newKey{name="save", x=1075,y=155,w=200,h=40,font=25,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, + WIDGET.newKey{name="replay", x=865,y=165,w=200,h=40,font=25,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, + WIDGET.newKey{name="save", x=1075,y=165,w=200,h=40,font=25,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, } return scene \ No newline at end of file From 7fda77bd1e88313e977e4459719b7645a8cac662 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 17:54:43 +0800 Subject: [PATCH 32/70] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E9=87=8C=E9=87=8D=E8=AE=BE=E5=85=A8=E9=83=A8=E7=9A=84?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E4=B9=9F=E4=BC=9A=E6=B8=85=E7=A9=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/customGame.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index d853f600..0b8787d2 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -91,6 +91,10 @@ function scene.keyDown(key,isRep) TABLE.clear(CUSTOMENV) TABLE.complete(require"parts.customEnv0",CUSTOMENV) for _,W in next,scene.widgetList do W:reset()end + FILE.save(DATA.copyMission(),'conf/customMissions') + FILE.save(DATA.copyBoards(),'conf/customBoards') + FILE.save(DATA.copySequence(),'conf/customSequence') + FILE.save(CUSTOMENV,'conf/customEnv') sure=0 SFX.play('finesseError',.7) BG.set(CUSTOMENV.bg) From 19d090859c946ef5a23ff36455a1c998a4bb4d66 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 19:39:45 +0800 Subject: [PATCH 33/70] =?UTF-8?q?=E5=87=8F=E6=9A=97=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=9A=84=E8=83=8C=E6=99=AF=E8=89=B2=EF=BC=8C=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E6=9A=82=E5=81=9C=E7=9A=84=E5=8A=A8=E7=94=BB=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=9D=A1=E5=BD=A2=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/depause.lua | 15 ++++++++------- parts/scenes/pause.lua | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/parts/scenes/depause.lua b/parts/scenes/depause.lua index 26b1189f..5d417b8b 100644 --- a/parts/scenes/depause.lua +++ b/parts/scenes/depause.lua @@ -20,19 +20,20 @@ end function scene.draw() --Game scene - if timer*1.26<1 then - SCN.scenes.game.draw() - end + SCN.scenes.game.draw() --Gray screen cover - gc.setColor(.15,.15,.15,timer*1.26) + gc.setColor(.12,.12,.12,timer*8-7) gc.replaceTransform(SCR.origin) gc.rectangle('fill',0,0,SCR.w,SCR.h) gc.replaceTransform(SCR.xOy) - --Pie counter - gc.setColor(1,1,1,4*(1-timer)) - gc.arc('fill','pie',640,360,160,-1.5708,timer*6.2832-1.5708) + --Counter bar + gc.setLineWidth(2) + gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.6) + gc.rectangle('line',494,336,292,48,14) + gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.75) + gc.rectangle('fill',500,342,280*timer,36,10) end return scene \ No newline at end of file diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index fe6b19ec..84542a23 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -185,7 +185,7 @@ function scene.draw() --Dark BG local _=T if GAME.result then _=_*.76 end - gc.setColor(.15,.15,.15,_) + gc.setColor(.12,.12,.12,_) gc.replaceTransform(SCR.origin) gc.rectangle('fill',0,0,SCR.w,SCR.h) gc.replaceTransform(SCR.xOy) From 1970a1b47d6198f0bfd75124b45c82fb23a52e52 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 19:51:06 +0800 Subject: [PATCH 34/70] =?UTF-8?q?=E6=94=B9=E6=AD=A3=E4=B8=80=E5=A4=84?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=EF=BC=8C=E7=AE=80=E5=8C=96?= =?UTF-8?q?the=5Fbox=E8=B0=9C=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 2bc6de50..4470d1f6 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -747,7 +747,7 @@ local commands={}do log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"} end end, - description="Switch to appother host", + description="Switch to another host", details={ "Disconnect all connections and switch to another host", "", @@ -821,10 +821,6 @@ local combKey={ } --Environment for user's function -local noLog=false -local function log_user(str) - log(noLog and"CHEATER."or tostring(str)) -end local userG={ timer=TIME, @@ -833,7 +829,7 @@ local userG={ tonumber=tonumber,tostring=tostring, select=select,next=next, ipairs=ipairs,pairs=pairs, - print=log_user,type=type, + print=log,type=type, pcall=pcall,xpcall=xpcall, rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal, setfenv=setfenv,setmetatable=setmetatable, @@ -859,14 +855,10 @@ local fleg={ supw=7126, second_box="Coming soon", }setmetatable(fleg,{__tostring=function()return"The fl\97g."end}) -function userG.the_box(k,f) - if k~=first_key then log"Usage:"log"?"return end - if not f or type(f)~='function'then log"Second arg is a function"return end - noLog=true - if f()~=f then noLog=false log"Return itself"return end - if f(26)~=math.huge then noLog=false log"Lucky number → Infinity"return end - noLog=false - log"*You Lose*" +function userG.the_box(k) + if k~=first_key then log"Usage:"log"*The box is locked*"return end + log"*Breaking sound*" + userG.the_box,userG.the_key=nil,nil return fleg end userG.the_key=first_key From 9fadef2a6e60c83fe526251f5d1ccc21248bbf50 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 20:00:51 +0800 Subject: [PATCH 35/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9A=AE=E8=82=A4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=97=8B=E8=BD=AC=E6=96=B9?= =?UTF-8?q?=E5=9D=97=E5=87=A0=E5=9C=88=E5=90=8E=E9=87=8D=E8=BF=9B=E4=BC=9A?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E6=97=8B=E8=BD=AC=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/setting_skin.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 81562993..60deb217 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -10,6 +10,7 @@ local scene={} function scene.sceneInit() for i=1,7 do minoRot0[i]=SETTING.face[i]*1.57 + minoRot[i]=minoRot0[i] end end From d4523e8e1d1935417410ab9d573cee65cfb8f18c Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 20:02:43 +0800 Subject: [PATCH 36/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8Fmarathon=5Fbfmax=E7=9A=84=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E6=94=B9tip=E5=85=B3=E4=BA=8E=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=A8=A1=E5=BC=8F=E7=9A=84=E8=AF=B4=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/lang_en.lua | 4 ++-- parts/language/lang_es.lua | 2 +- parts/language/lang_fr.lua | 2 +- parts/language/lang_pt.lua | 4 ++-- parts/language/lang_zh.lua | 2 +- parts/scenes/setting_skin.lua | 3 +++ 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index b021aacd..08ccee41 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -892,7 +892,7 @@ return{ "Techmino is so fun!", "TetroDictionary is now available in English.", "The stacker future is yours in Techmino!", - "There are three hidden modes in the game.", + "There are four hidden modes in the game.", "There is a total of 18 different pentominoes.", "There is a total of 7 different tetrominoes.", "Try using multiple Hold Queues!", @@ -931,4 +931,4 @@ return{ {C.Y,"O-Spin Triple!"}, {C.Z,"What? ",C.lC,"Xspin?"}, } -} +} \ No newline at end of file diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index 921562fa..dd1f3d50 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -721,4 +721,4 @@ return{ ['custom_clear']= {"Personalizado", "Normal"}, ['custom_puzzle']= {"Personalizado", "Puzzle"}, }, -} +} \ No newline at end of file diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 739a141e..5dcc9909 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -724,4 +724,4 @@ return{ ['custom_clear']= {"Perso.", "NORMAL"}, ['custom_puzzle']= {"Perso.", "PUZZLE"}, }, -} +} \ No newline at end of file diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index c45a5681..6cd1f164 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -875,7 +875,7 @@ return{ "Techmino tem uma edição Nspire-CX!", "Techmino é legal!", "TetroDictionary está disponível em Inglês.", - "Tem 3 modos escondidos no jogo.", + "Tem 4 modos escondidos no jogo.", "Tem um total de 18 pentominoes diferentes.", "Tem um total de 7 diferentes tetrominoes.", "Tente usar dois botões de rotação. Todos três é melhor.", @@ -923,4 +923,4 @@ return{ {C.Y,"暫定段位:MV"}, {C.Y,"O-spin Triple!"}, } -} +} \ No newline at end of file diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index 3c99096f..f45e3d97 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -1032,7 +1032,7 @@ return{ "游戏也是一种艺术形式", "游戏中左下角三个信息分别是分数/时间/极简连击数", "有建议的话可以把信息反馈给作者~", - "有三个隐藏模式不能从地图进入,到处找找看吧", + "有四个隐藏模式不能从地图进入,到处找找看吧", "有疑问? 先看设置有没有你想要的", "右下角那个问号按钮是游戏说明书", "长期睡眠不足会引起不可逆的脑损伤(变傻)", diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 60deb217..1eb8f10e 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -54,6 +54,9 @@ end local function nextDir(i) SETTING.face[i]=(SETTING.face[i]+1)%4 minoRot0[i]=minoRot0[i]+1.5707963 + if minoRot0[5]>62 then + loadGame('marathon_bfmax',true) + end SFX.play('rotate') end From 6fe40e9438d3440b23649b03b03f43437a2f146b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 20:12:01 +0800 Subject: [PATCH 37/70] =?UTF-8?q?=E9=AB=98=E9=80=9F=E7=BB=8F=E5=85=B8?= =?UTF-8?q?=E5=9C=BA=E5=9C=B0=E9=AB=98=E5=BA=A6=E6=94=B9=E4=B8=BA19=20clos?= =?UTF-8?q?e=20#169?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/classic_fast.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parts/modes/classic_fast.lua b/parts/modes/classic_fast.lua index 86429dad..f14fab1c 100644 --- a/parts/modes/classic_fast.lua +++ b/parts/modes/classic_fast.lua @@ -3,17 +3,18 @@ local gc=love.graphics return{ color=COLOR.lBlue, env={ - smooth=false, - noTele=true,keyCancel={5,6}, das=16,arr=6,sddas=2,sdarr=2, irs=false,ims=false, center=0,ghost=0, + smooth=false, drop=3,lock=3,wait=10,fall=25, + fieldH=19, nextCount=1,holdCount=false, - sequence='rnd', RS='Classic', + sequence='rnd', freshLimit=0, face={0,0,2,2,2,0,0}, + noTele=true,keyCancel={5,6}, task=function(P)P.modeData.target=10 end, dropPiece=function(P) local D=P.modeData From a94a0a2f872a132f6c8c3bbb97a4864d85d55143 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 20:20:07 +0800 Subject: [PATCH 38/70] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E7=B3=BB=E7=BB=9F=E7=9A=84=E5=90=8D=E5=AD=97?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E6=97=B6=E8=87=AA=E5=8A=A8=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E6=97=8B=E8=BD=AC=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 6 +++++- parts/kickList.lua | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/main.lua b/main.lua index 6ca7aaf3..c753b398 100644 --- a/main.lua +++ b/main.lua @@ -300,7 +300,11 @@ do SETTING.dataSaving=nil if not SETTING.VKSkin then SETTING.VKSkin=1 end for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end - if SETTING.RS=='ZRS'or SETTING.RS=='BRS'then SETTING.RS='BiRS'end + if + SETTING.RS=='ZRS'or SETTING.RS=='BRS'or + SETTING.RS=='ASCplus'or SETTING.RS=='C2sym'or + SETTING.RS=='Classic' + then SETTING.RS='TRS'end if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'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 SETTING.frameMul=100 end diff --git a/parts/kickList.lua b/parts/kickList.lua index 7630096d..9dc49eaa 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -579,20 +579,20 @@ do for i=2,29 do ASC[i]=ASC[1]end end -local ASCplus +local ASC_plus do local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} local R=flipList(L) local F={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} vecStrConv(L)vecStrConv(R)vecStrConv(F) - ASCplus={ + ASC_plus={ { [01]=R,[12]=R,[23]=R,[30]=R, [10]=L,[21]=L,[32]=L,[03]=L, [02]=F,[20]=F,[13]=F,[31]=F, } } - for i=2,29 do ASCplus[i]=ASCplus[1]end + for i=2,29 do ASC_plus[i]=ASC_plus[1]end end local C2 @@ -608,7 +608,7 @@ do for i=2,29 do C2[i]=C2[1]end end -local C2sym +local C2_sym do local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} local R={'+0+0','+1+0','-1+0','+0-1','+1-1','-1-1','+2+0','-2+0'} @@ -622,7 +622,7 @@ do collectSet(Z) collectSet(S) - C2sym={ + C2_sym={ Z,S,--Z,S Z,S,--J,L Z,--T @@ -644,22 +644,22 @@ do } end -local Classic={} -for i=1,29 do Classic[i]=noKickSet end - local None={} for i=1,29 do None[i]=noKickSet_180 end +local None_plus={} +for i=1,29 do None_plus[i]=noKickSet end + local RS={ TRS=TRS, SRS=SRS, BiRS=BiRS, ASC=ASC, - ASCplus=ASCplus, + ASC_plus=ASC_plus, C2=C2, - C2sym=C2sym, - Classic=Classic, + C2_sym=C2_sym, None=None, + None_plus=None_plus, } for _,v in next,RS do From b23e32df7f006cdff72dd9afe13320c397f7a290 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 20:24:37 +0800 Subject: [PATCH 39/70] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=92=8Cbuild=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf.lua | 2 +- parts/updateLog.lua | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conf.lua b/conf.lua index 0c6d9949..e0ca5b23 100644 --- a/conf.lua +++ b/conf.lua @@ -1,5 +1,5 @@ VERSION={ - build=354, + build=355, code=1600, short="V0.16.0", string="Alpha V0.16.0", diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 20dce1c8..386efece 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -43,11 +43,12 @@ return STRING.split([=[ 新增小亚(xiaoya)语音包 旋转系统新增BiRS(Bias RS)(实验性),ASC,ASCplus(添加180度踢墙,实验性) 可以通过剪切板导入/导出录像 + 把一个隐藏模式的入口加回来 自定义游戏的序列任务场地等数据退出保存 第一次启动会自动进入语言设置菜单 #150 新增noInitSZO模式参数,自动跳过开局SZO(目前仅用于马拉松/20G模式) #121 改动: - ui调整(修改游戏内和暂停的界面 减小线宽 添加圆角) + ui调整(重做游戏内和暂停的界面,减小线宽,添加圆角) 更换更简洁的加载动画,合并intro场景 调整TRS中S5和Z5的踢墙表,增加Ospin时SZ按反的尝试 回放时版面遮挡会变成半透明 #143 @@ -60,12 +61,13 @@ return STRING.split([=[ resetall命令最后一瞬间才删除文件 #133 马拉松模式添加倒计时线 #153 旋转系统可以开关每个方块是否显示旋转中心(TRS关闭O和X的中心显示) + 调整几个旋转系统的名字 减少AI与自定义序列同开的限制 #136 修改debug模式鼠标位置显示方式 增加滑条控件测试声音的间隔 声音设置界面添加静音按钮 微调wing背景 - 更新历史开始附带github上的issue编号 + 更新历史开始附带github上的issue编号(如果有) 代码: 重构WS模块,可能解决部分联网游戏中的概率thread error问题 升级BGM/IMG/SKIN模块,资源不再需要启动时加载好,提升加载速度节约资源占用 From d2c6529d2a4a9510f7d315f8f3cdfe493a95ac47 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 22:05:02 +0800 Subject: [PATCH 40/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=99=A8=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_calc.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 4fa7afba..4084e4af 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -9,9 +9,11 @@ local sym--symbol function scene.sceneInit() BG.set('none') - reg=false - val="0" - sym=false + BGM.stop() + reg,val,sym=false,"0",false +end +function scene.sceneBack() + BGM.play() end scene.mouseDown=NULL @@ -40,7 +42,7 @@ function scene.keyDown(key) val=val.."." end elseif key=="e"then - if not val:find("e")then + if sym~="="and not val:find("e")then val=val.."e" end elseif key=="backspace"then @@ -57,15 +59,15 @@ function scene.keyDown(key) elseif key=="-"then sym="-" reg=false elseif key=="/"then sym="/" reg=false elseif key=="return"then - if val:byte(-1)==101 then val=val:sub(1,-2)end + if val:sub(-1)=="e"then val=val:sub(1,-2)end if sym and reg then - if reg:byte(-1)==101 then reg=reg:sub(1,-2)end + if reg:sub(-1)=="e"then reg=reg:sub(1,-2)end val= - sym=="+"and (tonumber(reg)or 0)+tonumber(val)or - sym=="-"and (tonumber(reg)or 0)-tonumber(val)or - sym=="*"and (tonumber(reg)or 0)*tonumber(val)or - sym=="/"and (tonumber(reg)or 0)/tonumber(val)or - -1 + sym=="+"and tostring((tonumber(reg)or 0)+tonumber(val))or + sym=="-"and tostring((tonumber(reg)or 0)-tonumber(val))or + sym=="*"and tostring((tonumber(reg)or 0)*tonumber(val))or + sym=="/"and tostring((tonumber(reg)or 0)/tonumber(val))or + "-1" end sym="=" reg=false From a2f01427128ca75f9489898fe5d4dccc931b590d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 23:28:42 +0800 Subject: [PATCH 41/70] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=A1=A8=EF=BC=8C=E9=99=8D=E4=BD=8E=E9=A5=B1?= =?UTF-8?q?=E5=92=8C=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/color.lua | 94 ++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/Zframework/color.lua b/Zframework/color.lua index 67fac04c..cf49d7ed 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -1,54 +1,54 @@ local COLOR={ - red= {1.0, 0.0, 0.0}, - fire= {1.0, 0.4, 0.0}, - orange= {1.0, 0.6, 0.0}, - yellow= {1.0, 1.0, 0.0}, - lime= {0.7, 1.0, 0.0}, - jade= {0.5, 1.0, 0.0}, - green= {0.0, 1.0, 0.0}, - aqua= {0.0, 1.0, 0.6}, - cyan= {0.0, 1.0, 1.0}, - navy= {0.0, 0.7, 1.0}, - sea= {0.0, 0.4, 1.0}, - blue= {0.2, 0.2, 1.0}, - violet= {0.4, 0.0, 1.0}, - purple= {0.7, 0.0, 1.0}, - magenta= {1.0, 0.0, 1.0}, - wine= {1.0, 0.0, 0.5}, + red= {.92, .12, .12}, + fire= {.92, 0.4, .12}, + orange= {.92, 0.6, .12}, + yellow= {.92, .92, .12}, + lime= {0.7, .92, .12}, + jade= {0.5, .92, .12}, + green= {.12, .92, .12}, + aqua= {.12, .92, 0.6}, + cyan= {.12, .92, .92}, + navy= {.12, 0.7, .92}, + sea= {.12, 0.4, .92}, + blue= {0.2, 0.2, .92}, + violet= {0.4, .12, .92}, + purple= {0.7, .12, .92}, + magenta= {.92, .12, .92}, + wine= {.92, .12, 0.5}, - lRed= {1.0, 0.5, 0.5}, - lFire= {1.0, 0.7, 0.5}, - lOrange= {1.0, 0.8, 0.3}, - lYellow= {1.0, 1.0, 0.5}, - lLime= {0.8, 1.0, 0.4}, - lJade= {0.6, 1.0, 0.4}, - lGreen= {0.5, 1.0, 0.5}, - lAqua= {0.4, 1.0, 0.7}, - lCyan= {0.5, 1.0, 1.0}, - lNavy= {0.5, 0.8, 1.0}, - lSea= {0.4, 0.7, 1.0}, - lBlue= {0.7, 0.7, 1.0}, - lViolet= {0.7, 0.4, 1.0}, - lPurple= {0.8, 0.4, 1.0}, - lMagenta= {1.0, 0.5, 1.0}, - lWine= {1.0, 0.4, 0.7}, + lRed= {.95, 0.5, 0.5}, + lFire= {.95, 0.7, 0.5}, + lOrange= {.95, 0.8, 0.3}, + lYellow= {.95, .95, 0.5}, + lLime= {0.8, .95, 0.4}, + lJade= {0.6, .95, 0.4}, + lGreen= {0.5, .95, 0.5}, + lAqua= {0.4, .95, 0.7}, + lCyan= {0.5, .95, .95}, + lNavy= {.45, 0.8, .85}, + lSea= {0.5, 0.7, .95}, + lBlue= {0.7, 0.7, .95}, + lViolet= {0.7, 0.4, .95}, + lPurple= {0.8, 0.4, .95}, + lMagenta= {.95, 0.5, .95}, + lWine= {.95, 0.4, 0.7}, - dRed= {0.6, 0.0, 0.0}, - dFire= {0.6, 0.3, 0.0}, - dOrange= {0.6, 0.4, 0.0}, - dYellow= {0.6, 0.6, 0.0}, - dLime= {0.5, 0.6, 0.0}, - dJade= {0.3, 0.6, 0.0}, - dGreen= {0.0, 0.6, 0.0}, - dAqua= {0.0, 0.6, 0.4}, - dCyan= {0.0, 0.6, 0.6}, - dNavy= {0.0, 0.4, 0.6}, - dSea= {0.0, 0.2, 0.6}, + dRed= {0.6, .08, .08}, + dFire= {0.6, 0.3, .08}, + dOrange= {0.6, 0.4, .08}, + dYellow= {0.6, 0.6, .08}, + dLime= {0.5, 0.6, .08}, + dJade= {0.3, 0.6, .08}, + dGreen= {.08, 0.6, .08}, + dAqua= {.08, 0.6, 0.4}, + dCyan= {.08, 0.6, 0.6}, + dNavy= {.08, 0.4, 0.6}, + dSea= {.08, 0.2, 0.6}, dBlue= {0.1, 0.1, 0.6}, - dViolet= {0.2, 0.0, 0.6}, - dPurple= {0.4, 0.0, 0.6}, - dMagenta= {0.6, 0.0, 0.6}, - dWine= {0.6, 0.0, 0.3}, + dViolet= {0.2, .08, 0.6}, + dPurple= {0.4, .08, 0.6}, + dMagenta= {0.6, .08, 0.6}, + dWine= {0.6, .08, 0.3}, black= {.05, .05, .05}, dGray= {0.3, 0.3, 0.3}, From 5f8cbe524edc8016366a26b74bd78b6900f5417e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 00:02:07 +0800 Subject: [PATCH 42/70] =?UTF-8?q?=E5=9C=86=E8=A7=92=E5=9C=86=E8=A7=92?= =?UTF-8?q?=E5=9C=86=E8=A7=92=E5=9C=86=E8=A7=92=E5=9C=86=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/gametoolfunc.lua | 8 ++----- parts/player/draw.lua | 8 +++---- parts/scenes/app_calc.lua | 40 ++++++++++++++++---------------- parts/scenes/app_pong.lua | 14 +++++------ parts/scenes/custom_field.lua | 16 ++++++------- parts/scenes/custom_mission.lua | 6 ++--- parts/scenes/custom_sequence.lua | 4 ++-- parts/scenes/dict.lua | 6 ++--- parts/scenes/main.lua | 2 +- parts/scenes/mode.lua | 4 ++-- parts/scenes/stat.lua | 18 +++++++------- 11 files changed, 62 insertions(+), 64 deletions(-) diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 3f44bca1..d6300422 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -595,7 +595,7 @@ do--function drawSelfProfile() ins(img,{"clear",0,0,0}) ins(img,{"setLW",4}) ins(img,{"setCL",.5,.8,1}) - ins(img,{"dRect",2,2,21,21}) + ins(img,{"dRect",2,2,21,21,2}) --TODO: draw with lv img=GC.DO(img) @@ -612,7 +612,7 @@ do--function drawSelfProfile() --Draw avatar gc_setLineWidth(2) gc_setColor(.3,.3,.3,.8)gc_rectangle('fill',0,0,-300,80) - gc_setColor(1,1,1)gc_rectangle('line',0,0,-300,80) + gc_setColor(1,1,1)gc_rectangle('line',-300,0,300,80,5) gc_rectangle('line',-73,7,66,66,2) gc_draw(selfAvatar,-72,8,nil,.5) @@ -656,10 +656,6 @@ do--function drawWarning() end end end -do--function drawSystemInfo( - --你竟然找到了这里!说明你是真的闲( - --感谢支持Techmino!!! -end diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 99a7dbae..8ebba620 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -53,10 +53,10 @@ local spinCenterImg=GC.DO{9,9, {'setCL',1,1,1}, {'fRect',3,3,3,3}, } -local playerBoarders=GC.DO{334,620, +local playerBoarder=GC.DO{334,620, {'setLW',2}, {'setCL',.97,.97,.975}, - {'dRect',16,1,302,618,7}, + {'dRect',16,1,302,618,5}, {'fRect',17,612,300,2}, {'dRect',318,9,15,596,3}, {'dRect',1,9,15,596,3}, @@ -626,7 +626,7 @@ function draw.drawProgress(s1,s2) setFont(40) mStr(s1,62,322) mStr(s2,62,376) - gc.rectangle('fill',24,375,76,4) + gc.rectangle('fill',24,375,76,4,2) end function draw.drawRoyaleInfo(P) setFont(35) @@ -760,7 +760,7 @@ function draw.norm(P) --Draw boarders gc_setColor(P.frameColor) - gc_draw(playerBoarders,-17,-12) + gc_draw(playerBoarder,-17,-12) --Draw target selecting pad if GAME.modeEnv.royaleMode then diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 4084e4af..350af816 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -85,7 +85,7 @@ end function scene.draw() gc.setColor(COLOR.Z) gc.setLineWidth(2) - gc.rectangle('line',100,80,650,150) + gc.rectangle('line',100,80,650,150,5) setFont(45) if reg then gc.printf(reg,0,100,720,'right')end if val then gc.printf(val,0,150,720,'right')end @@ -93,25 +93,25 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="_1",x=150,y=300,w=90,fText="1",font=50,code=pressKey"1"}, - WIDGET.newKey{name="_2",x=250,y=300,w=90,fText="2",font=50,code=pressKey"2"}, - WIDGET.newKey{name="_3",x=350,y=300,w=90,fText="3",font=50,code=pressKey"3"}, - WIDGET.newKey{name="_4",x=150,y=400,w=90,fText="4",font=50,code=pressKey"4"}, - WIDGET.newKey{name="_5",x=250,y=400,w=90,fText="5",font=50,code=pressKey"5"}, - WIDGET.newKey{name="_6",x=350,y=400,w=90,fText="6",font=50,code=pressKey"6"}, - WIDGET.newKey{name="_7",x=150,y=500,w=90,fText="7",font=50,code=pressKey"7"}, - WIDGET.newKey{name="_8",x=250,y=500,w=90,fText="8",font=50,code=pressKey"8"}, - WIDGET.newKey{name="_9",x=350,y=500,w=90,fText="9",font=50,code=pressKey"9"}, - WIDGET.newKey{name="_0",x=150,y=600,w=90,fText="0",font=50,code=pressKey"0"}, - WIDGET.newKey{name=".",x=250,y=600,w=90,fText=".",color='lM',font=50,code=pressKey"."}, - WIDGET.newKey{name="e",x=350,y=600,w=90,fText="e",color='lM',font=50,code=pressKey"e"}, - WIDGET.newKey{name="+",x=450,y=300,w=90,fText="+",color='lB',font=50,code=pressKey"+"}, - WIDGET.newKey{name="-",x=450,y=400,w=90,fText="-",color='lB',font=50,code=pressKey"-"}, - WIDGET.newKey{name="*",x=450,y=500,w=90,fText="*",color='lB',font=50,code=pressKey"*"}, - WIDGET.newKey{name="/",x=450,y=600,w=90,fText="/",color='lB',font=50,code=pressKey"/"}, - WIDGET.newKey{name="<",x=550,y=300,w=90,fText="<",color='lR',font=50,code=pressKey"backspace"}, - WIDGET.newKey{name="=",x=550,y=400,w=90,fText="=",color='lY',font=50,code=pressKey"return"}, - WIDGET.newKey{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="_1",x=145,y=300,w=90,fText="1",font=50,code=pressKey"1"}, + WIDGET.newKey{name="_2",x=245,y=300,w=90,fText="2",font=50,code=pressKey"2"}, + WIDGET.newKey{name="_3",x=345,y=300,w=90,fText="3",font=50,code=pressKey"3"}, + WIDGET.newKey{name="_4",x=145,y=400,w=90,fText="4",font=50,code=pressKey"4"}, + WIDGET.newKey{name="_5",x=245,y=400,w=90,fText="5",font=50,code=pressKey"5"}, + WIDGET.newKey{name="_6",x=345,y=400,w=90,fText="6",font=50,code=pressKey"6"}, + WIDGET.newKey{name="_7",x=145,y=500,w=90,fText="7",font=50,code=pressKey"7"}, + WIDGET.newKey{name="_8",x=245,y=500,w=90,fText="8",font=50,code=pressKey"8"}, + WIDGET.newKey{name="_9",x=345,y=500,w=90,fText="9",font=50,code=pressKey"9"}, + WIDGET.newKey{name="_0",x=145,y=600,w=90,fText="0",font=50,code=pressKey"0"}, + WIDGET.newKey{name=".",x=245,y=600,w=90,fText=".",color='lM',font=50,code=pressKey"."}, + WIDGET.newKey{name="e",x=345,y=600,w=90,fText="e",color='lM',font=50,code=pressKey"e"}, + WIDGET.newKey{name="+",x=445,y=300,w=90,fText="+",color='lB',font=50,code=pressKey"+"}, + WIDGET.newKey{name="-",x=445,y=400,w=90,fText="-",color='lB',font=50,code=pressKey"-"}, + WIDGET.newKey{name="*",x=445,y=500,w=90,fText="*",color='lB',font=50,code=pressKey"*"}, + WIDGET.newKey{name="/",x=445,y=600,w=90,fText="/",color='lB',font=50,code=pressKey"/"}, + WIDGET.newKey{name="<",x=545,y=300,w=90,fText="<",color='lR',font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="=",x=545,y=400,w=90,fText="=",color='lY',font=50,code=pressKey"return"}, + WIDGET.newKey{name="back",x=1135,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_pong.lua b/parts/scenes/app_pong.lua index 4b1a2348..64ad00da 100644 --- a/parts/scenes/app_pong.lua +++ b/parts/scenes/app_pong.lua @@ -78,10 +78,10 @@ function scene.update() if P.y0 then if P.y>P.y0 then P.y=max(P.y-8,P.y0,70) - P.vy=-8 + P.vy=-10 elseif P.y0 then gc.setColor(minoColor[pens[1]]) - gc.rectangle('fill',5,5,23,30) + gc.rectangle('fill',5,5,23,30,3) elseif pens[1]==-1 then gc.setColor(COLOR.Z) gc.line(5,5,28,35) @@ -371,7 +371,7 @@ function scene.draw() if penMode==0 then gc.setLineWidth(13) gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',5,5,23,30) + gc.rectangle('fill',5,5,23,30,3) else gc.setLineWidth(3) gc.setColor(1,0,0) @@ -383,7 +383,7 @@ function scene.draw() --Right button if pens[2]>0 then gc.setColor(minoColor[pens[2]]) - gc.rectangle('fill',52,5,23,30) + gc.rectangle('fill',52,5,23,30,3) elseif pens[2]==-1 then gc.setColor(COLOR.Z) gc.setLineWidth(3) @@ -393,7 +393,7 @@ function scene.draw() if penMode==0 then gc.setLineWidth(13) gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',52,5,23,30) + gc.rectangle('fill',52,5,23,30,3) else gc.setLineWidth(3) gc.setColor(1,0,0) @@ -405,7 +405,7 @@ function scene.draw() --Middle button if pens[3]>0 then gc.setColor(minoColor[pens[3]]) - gc.rectangle('fill',35,2,10,21) + gc.rectangle('fill',35,2,10,21,3) elseif pens[3]==-1 then gc.setColor(COLOR.Z) gc.setLineWidth(2) @@ -415,7 +415,7 @@ function scene.draw() if penMode==0 then gc.setLineWidth(13) gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',35,2,10,21) + gc.rectangle('fill',35,2,10,21,3) else gc.setLineWidth(3) gc.setColor(1,0,0) diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index c8902a6b..071d3c01 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -122,9 +122,9 @@ end function scene.draw() --Draw frame - gc.setLineWidth(4) + gc.setLineWidth(2) gc.setColor(COLOR.Z) - gc.rectangle('line',60,110,1160,170) + gc.rectangle('line',58,108,1164,174,5) --Draw inputing target setFont(30) @@ -237,7 +237,7 @@ scene.widgetList={ WIDGET.newKey{name="reset", x=1000, y=640,w=90, color='lY',font=50,code=pressKey"delete"}, WIDGET.newButton{name="copy", x=1140, y=440,w=170,h=80, color='lR',font=40,code=pressKey"cC",hideF=function()return #MISSION==0 end}, WIDGET.newButton{name="paste", x=1140, y=540,w=170,h=80, color='lB',font=40,code=pressKey"cV"}, - WIDGET.newSwitch{name="mission",x=1150, y=350,disp=CUSval("missionKill"),code=CUSrev("missionKill")}, + WIDGET.newSwitch{name="mission",x=1150, y=340,disp=CUSval("missionKill"),code=CUSrev("missionKill")}, WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, } diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index 593cde00..50e4403c 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -131,8 +131,8 @@ end function scene.draw() --Draw frame gc.setColor(COLOR.Z) - gc.setLineWidth(4) - gc.rectangle('line',100,110,1080,260) + gc.setLineWidth(2) + gc.rectangle('line',100,110,1080,260,5) --Draw sequence local miniBlock=TEXTURE.miniBlock diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 3346b371..526056d6 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -166,10 +166,10 @@ function scene.draw() gc.print(item[1],30,y) end - gc.setLineWidth(4) + gc.setLineWidth(2) gc.setColor(COLOR.Z) - gc.rectangle('line',300,180,958,526) - gc.rectangle('line',20,180,280,526) + gc.rectangle('line',300,180,958,526,5) + gc.rectangle('line',20,180,280,526,5) if waiting>0 then local r=TIME()*2 diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 7fc91078..44fe8bfb 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -158,7 +158,7 @@ function scene.draw() gc.push('transform') gc.translate(260,650) gc.setLineWidth(2) - gc.rectangle('line',0,0,tipLength,42) + gc.rectangle('line',0,0,tipLength,42,3) gc.stencil(tipStencil) gc.setStencilTest('equal',1) gc.draw(tip,0+scrollX,0) diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index b8c8578e..7e6ddf01 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -277,7 +277,7 @@ function scene.draw() if sel then local M=MODES[sel] gc_setColor(.5,.5,.5,.8) - gc_rectangle('fill',920,0,360,720)--Info board + gc_rectangle('fill',920,0,360,720,5)--Info board gc_setColor(M.color) setFont(40)mStr(text.modes[sel][1],1100,5) setFont(30)mStr(text.modes[sel][2],1100,50) @@ -289,7 +289,7 @@ function scene.draw() if M.score then mText(drawableText.highScore,1100,240) gc_setColor(.3,.3,.3,.7) - gc_rectangle('fill',940,290,320,280)--Highscore board + gc_rectangle('fill',940,290,320,280,5)--Highscore board local L=M.records gc_setColor(1,1,1) if L[1]then diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index a2ebe4c3..564d2efa 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -78,15 +78,17 @@ function scene.draw() gc_print(item[i],740,40*i+10) end - gc_setLineWidth(4) - for x=1,8 do - x=80*x-40 + gc_setLineWidth(2) + gc.rectangle('line',40,80,560,160,5) + gc.rectangle('line',40,320,560,160,5) + for x=1,6 do + x=80*x+40 gc_line(x,80,x,240) gc_line(x,320,x,480) end - for y=2,6 do - gc_line(40,40*y,600,40*y) - gc_line(40,240+40*y,600,240+40*y) + for y=1,3 do + gc_line(40,80+40*y,600,80+40*y) + gc_line(40,320+40*y,600,320+40*y) end local t=TIME() @@ -100,8 +102,8 @@ function scene.draw() end scene.widgetList={ - WIDGET.newButton{name="path", x=800,y=540,w=250,h=80,font=25,code=function()love.system.openURL(SAVEDIR)end,hide=MOBILE}, - WIDGET.newButton{name="save", x=800,y=640,w=250,h=80,font=25,code=goScene'savedata'}, + WIDGET.newButton{name="path", x=820,y=540,w=250,h=80,font=25,code=function()love.system.openURL(SAVEDIR)end,hide=MOBILE}, + WIDGET.newButton{name="save", x=820,y=640,w=250,h=80,font=25,code=goScene'savedata'}, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } From 30308eb3080a87e26653984f7fb3a2e9bb9215f7 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 00:02:25 +0800 Subject: [PATCH 43/70] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E5=BD=A9=E8=89=B2logo=E7=9A=84=E9=A2=9C=E8=89=B2=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/load.lua | 2 +- parts/texture.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index 300d0354..342b1832 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -199,7 +199,7 @@ function scene.draw() if dt<20 then gc.translate(0,math.abs(10-dt)-10) end - gc.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.26) + gc.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.16) gc.polygon('fill',L[i]) gc.setColor(1,1,1,min(t*.025,1)) gc.polygon('line',L[i]) diff --git a/parts/texture.lua b/parts/texture.lua index 02b27338..35ba33d9 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -97,7 +97,7 @@ for i=1,8 do gc.polygon('fill',titleTriangles[i][j]) end - gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.7) + gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.5) gc.translate(-4,-4) for j=1,#titleTriangles[i]do gc.polygon('fill',titleTriangles[i][j]) From 2a0b26f2fd5ad2f5a56d416f7b6a1d9bb558d43e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 03:08:35 +0800 Subject: [PATCH 44/70] =?UTF-8?q?GC=E6=8B=93=E5=B1=95=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E5=9C=86=E8=A7=92=E6=AD=A3=E5=A4=9A?= =?UTF-8?q?=E8=BE=B9=E5=BD=A2=E6=88=90=E4=B8=BA=E7=BB=98=E5=9B=BE=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/gcExtend.lua | 112 +++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/Zframework/gcExtend.lua b/Zframework/gcExtend.lua index a289269f..c1679335 100644 --- a/Zframework/gcExtend.lua +++ b/Zframework/gcExtend.lua @@ -32,6 +32,55 @@ function GC.shadedPrint(str,x,y,mode,d,clr1,clr2) setColor(clr2 or COLOR.Z) printf(str,x,y,w,mode) end +function GC.regularPolygon(mode,x,y,R,segments,r,phase) + local X,Y={},{} + local ang=phase or 0 + local angStep=6.283185307179586/segments + for i=1,segments do + X[i]=x+R*math.cos(ang) + Y[i]=y+R*math.sin(ang) + ang=ang+angStep + end + X[segments+1]=x+R*math.cos(ang) + Y[segments+1]=y+R*math.sin(ang) + local halfAng=6.283185307179586/segments/2 + local erasedLen=r*math.tan(halfAng) + if mode=='line'then + erasedLen=erasedLen+1--Fix 1px cover + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir)) + + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + elseif mode=='fill'then + local L={} + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + table.insert(L,x1+erasedLen*math.cos(dir)) + table.insert(L,y1+erasedLen*math.sin(dir)) + table.insert(L,x2-erasedLen*math.cos(dir)) + table.insert(L,y2-erasedLen*math.sin(dir)) + + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + gc.polygon('fill',L) + else + error("Draw mode should be 'line' or 'fill'") + end +end do--function GC.DO(L) local cmds={ origin="origin", @@ -62,67 +111,7 @@ do--function GC.DO(L) fElps=function(...)gc.ellipse('fill',...)end, dElps=function(...)gc.ellipse('line',...)end, fPoly=function(...)gc.polygon('fill',...)end, - dPoly=function(...)gc.polygon('line',...)end, - fRPol=function(x,y,R,segments,r,phase) - local X,Y={},{} - local ang=phase or 0 - local angStep=6.283185307179586/segments - for i=1,segments do - X[i]=x+R*math.cos(ang) - Y[i]=y+R*math.sin(ang) - ang=ang+angStep - end - X[segments+1]=x+R*math.cos(ang) - Y[segments+1]=y+R*math.sin(ang) - - local L={} - local halfAng=6.283185307179586/segments/2 - local erasedLen=r*math.tan(halfAng) - for i=1,segments do - --Line - local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] - local dir=math.atan2(y2-y1,x2-x1) - table.insert(L,x1+erasedLen*math.cos(dir)) - table.insert(L,y1+erasedLen*math.sin(dir)) - table.insert(L,x2-erasedLen*math.cos(dir)) - table.insert(L,y2-erasedLen*math.sin(dir)) - - --Arc - ang=ang+angStep - local R2=R-r/math.cos(halfAng) - local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) - gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) - end - gc.polygon('fill',L) - end, - dRPol=function(x,y,R,segments,r,phase) - local X,Y={},{} - local ang=phase or 0 - local angStep=6.283185307179586/segments - for i=1,segments do - X[i]=x+R*math.cos(ang) - Y[i]=y+R*math.sin(ang) - ang=ang+angStep - end - X[segments+1]=x+R*math.cos(ang) - Y[segments+1]=y+R*math.sin(ang) - - local halfAng=6.283185307179586/segments/2 - local erasedLen=r*math.tan(halfAng) - for i=1,segments do - --Line - local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] - local dir=math.atan2(y2-y1,x2-x1) - gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir)) - - --Arc - ang=ang+angStep - local R2=R-r/math.cos(halfAng) - local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) - gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) - end - end, dPie=function(...)gc.arc('line',...)end, dArc=function(...)gc.arc('line','open',...)end, @@ -130,6 +119,9 @@ do--function GC.DO(L) fPie=function(...)gc.arc('fill',...)end, fArc=function(...)gc.arc('fill','open',...)end, fBow=function(...)gc.arc('fill','closed',...)end, + + fRPol=function(...)GC.regularPolygon('fill',...)end, + dRPol=function(...)GC.regularPolygon('line',...)end, } local sizeLimit=gc.getSystemLimits().texturesize function GC.DO(L) From 4ffa88805c9ba4a808aeaeae35ff64d7cd2921c1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 03:08:51 +0800 Subject: [PATCH 45/70] =?UTF-8?q?=E5=86=8D=E8=B0=83=E6=95=B4=E6=9A=82?= =?UTF-8?q?=E5=81=9Cui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 84542a23..8e409169 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -228,14 +228,14 @@ function scene.draw() mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),305,389) end - --Frame - gc.setColor(.97,.97,.97,T*.06) - gc.rectangle('fill',-5,-5,620,380,8) - gc.setColor(.97,.97,.97,T) - gc.rectangle('line',-5,-5,620,380,8) - --Pages if page==0 then + --Frame + gc.setColor(.97,.97,.97,T2*.06) + gc.rectangle('fill',-5,-5,620,380,8) + gc.setColor(.97,.97,.97,T2) + gc.rectangle('line',-5,-5,620,380,8) + --Game statistics gc.push('transform') gc.scale(.85) @@ -265,15 +265,15 @@ function scene.draw() gc.pop() elseif page==1 then --Radar Chart - gc.setLineWidth(2) + gc.setLineWidth(1) gc.push('transform') gc.translate(310,185) - gc.scale(.9) --Polygon gc.push('transform') gc.scale((3-2*T2)*T2) - gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard) + gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26))) + GC.regularPolygon('line',0,0,120,6,8) gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) for i=1,9,2 do gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) @@ -282,13 +282,6 @@ function scene.draw() gc.setColor(.97,.97,.97,T2)gc.polygon('line',val) gc.pop() - --Axes - gc.setColor(.97,.97,.97,T2) - for i=1,3 do - local x,y=hexList[2*i-1],hexList[2*i] - gc.line(-x,-y,x,y) - end - --Texts local C _=TIME()%6.2832 From 5b4fd892ff53dd1870a2bdf0c3841236ba52d646 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 03:36:16 +0800 Subject: [PATCH 46/70] =?UTF-8?q?=E4=BF=AE=E6=AD=A3kpm=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E4=B8=80=E5=A4=84=E5=A4=9A=E4=BD=99=E7=9A=84+1=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0=E6=A0=BC=E5=AD=90=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E6=80=A7=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/update.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/parts/player/update.lua b/parts/player/update.lua index 8a26fa9b..7562bd2a 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -167,7 +167,7 @@ function update.alive(P,dt) --Calculate key speed do local v=0 - for i=2,10 do v=v+i*(i-1)*72/(P.frameRun-P.keyTime[i]+1)end + for i=2,10 do v=v+i*(i-1)*72/(P.frameRun-P.keyTime[i])end P.keySpeed=P.keySpeed*.99+v*.01 v=0 for i=2,10 do v=v+i*(i-1)*72/(P.frameRun-P.dropTime[i])end @@ -206,9 +206,13 @@ function update.alive(P,dt) --Fresh visible time if not P.keepVisible then - for j=1,#P.field do for i=1,10 do - if P.visTime[j][i]>0 then P.visTime[j][i]=P.visTime[j][i]-1 end - end end + local V=P.visTime + for j=1,#P.field do + local L=V[j] + for i=1,10 do + if L[i]>0 then L[i]=L[i]-1 end + end + end end --Moving pressed From 3858cfd9bab1c794d7ecfeebfcb9652204e83a98 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 15:04:44 +0800 Subject: [PATCH 47/70] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/net_game.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 8789a9ff..7bfac3cd 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -324,16 +324,17 @@ function scene.draw() gc_print("M",430,10) end end - +local function hideF_ingame()return hideReadyUI()or netPLY.getSelfReady()end +local function hideF_ingame2()return hideReadyUI()or not netPLY.getSelfReady()end scene.widgetList={ textBox, inputBox, - WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90, code=_gotoSetting,hideF=function()return hideReadyUI()or netPLY.getSelfReady()end}, - WIDGET.newKey{name="ready",x=1060,y=510,w=360,h=90,color='lG',font=35, code=_setReady,hideF=function()return hideReadyUI()or netPLY.getSelfReady()end}, - WIDGET.newKey{name="spectate",x=1060,y=610,w=360,h=90,color='lO',font=35, code=_setSpectate,hideF=function()return hideReadyUI()or netPLY.getSelfReady()end}, - WIDGET.newKey{name="cancel",x=1060,y=560,w=360,h=120,color='lH',font=40, code=_setCancel,hideF=function()return hideReadyUI()or not netPLY.getSelfReady()end}, - WIDGET.newKey{name="hideChat",fText="...",x=380,y=35,w=60,font=35, code=_switchChat}, - WIDGET.newKey{name="quit",fText=TEXTURE.quit_small,x=900,y=35,w=60,code=_quit}, + WIDGET.newKey{name="setting", x=1200,y=160,w=90,h=90, fText=TEXTURE.setting, code=_gotoSetting,hideF=hideF_ingame}, + WIDGET.newKey{name="ready", x=1060,y=510,w=360,h=90,color='lG',font=35, code=_setReady,hideF=hideF_ingame}, + WIDGET.newKey{name="spectate", x=1060,y=610,w=360,h=90,color='lO',font=35, code=_setSpectate,hideF=hideF_ingame}, + WIDGET.newKey{name="cancel", x=1060,y=560,w=360,h=120,color='lH',font=40, code=_setCancel,hideF=hideF_ingame2}, + WIDGET.newKey{name="chat", x=1165,y=45,w=60,fText="...",font=35, code=_switchChat,}, + WIDGET.newKey{name="quit", x=1235,y=45,w=60,fText=TEXTURE.quit_small, code=_quit}, } return scene \ No newline at end of file From a832e56b4203bcf6cc6146b045859590ea3c73eb Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 15:54:21 +0800 Subject: [PATCH 48/70] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=9B=9B=E8=BF=9E?= =?UTF-8?q?=E5=9D=97=E8=8B=B1=E6=96=87=E5=90=8D=E4=B8=BATetromino?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/dict_en.lua | 16 ++++++++-------- parts/language/lang_en.lua | 2 +- parts/language/lang_es.lua | 2 +- parts/language/lang_fr.lua | 2 +- parts/language/lang_pt.lua | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/parts/language/dict_en.lua b/parts/language/dict_en.lua index c5868f43..bf64136c 100644 --- a/parts/language/dict_en.lua +++ b/parts/language/dict_en.lua @@ -340,7 +340,7 @@ return{ {"O-Spin", "ospin", "term", - "In most cases, it's a meme.\nThe O Tetrimino (a.k.a. the Square) does not change upon rotation, thus making it lack interesting spins/kicks that other Tetriminoes have, or be stuck in a place unable to get out.\nAs a joke, some people have made heavily edited videos or even programmed games where the O piece can change shape and \"spin\" into different positions.\nTechmino also supports O-Spin in most modes.", + "In most cases, it's a meme.\nThe O Tetromino (a.k.a. the Square) does not change upon rotation, thus making it lack interesting spins/kicks that other Tetrominoes have, or be stuck in a place unable to get out.\nAs a joke, some people have made heavily edited videos or even programmed games where the O piece can change shape and \"spin\" into different positions.\nTechmino also supports O-Spin in most modes.", }, {"Rotation Systems", "wallkick rotationsystem", @@ -385,7 +385,7 @@ return{ {"SRS", "srs superrotationsystem", "term", - "Super Rotation System\nThe rotation system used in modern, official Tetris games.\nEach Tetrimino has a rotation center for the piece to rotate around. Should a Tetrimino overlap with the wall, floor or another mino on the field after rotation, a few offset positions will be checked, allowing pieces to kick off walls and floors. This also allows pieces to rotate into openings that are otherwise unreachable.\n\nMany unofficial games implement some modification of this rotation system that adds a kick for 180 spins. In Techmino, such a modification is called SRS+.", + "Super Rotation System\nThe rotation system used in modern, official Tetris games.\nEach Tetromino has a rotation center for the piece to rotate around. Should a Tetromino overlap with the wall, floor or another mino on the field after rotation, a few offset positions will be checked, allowing pieces to kick off walls and floors. This also allows pieces to rotate into openings that are otherwise unreachable.\n\nMany unofficial games implement some modification of this rotation system that adds a kick for 180 spins. In Techmino, such a modification is called SRS+.", }, {"TRS", "trs techminorotationsystem", @@ -590,12 +590,12 @@ return{ {"Bag7 generator", "bag7bag randomgenerator", "term", - "Also known as \"7-Bag Generator\". Officially known as \"Random Generator\".\nThis is the algorithm used by modern, official Tetris games to generate pieces. Starting from the beginning of a game, every 7 pieces there are guaranteed to be one of each of the 7 Tetriminoes.", + "Also known as \"7-Bag Generator\". Officially known as \"Random Generator\".\nThis is the algorithm used by modern, official Tetris games to generate pieces. Starting from the beginning of a game, every 7 pieces there are guaranteed to be one of each of the 7 Tetrominoes.", }, {"His generator", "history hisgenerator", "term", - "A way to generate pieces, notably used in Tetris: The Grand Master games. Every time a random Tetrimino is selected, but if this Tetrimino is the same as one of the few previous pieces, then reroll until a different piece is rolled or until a reroll limit is reached.\nFor example, a \"his 4 roll 6\" (h4r6) generator rerolls when the piece is the same as one of the 4 previous pieces, and rerolls up to 6 times.\nThere are other variations as well, such as \"his4 roll6 pool35\", which further reduces the randomness of the piece sequence.\n\nIn Techmino, the max. reroll count is half of the sequence length, rounded up.", + "A way to generate pieces, notably used in Tetris: The Grand Master games. Every time a random Tetromino is selected, but if this Tetromino is the same as one of the few previous pieces, then reroll until a different piece is rolled or until a reroll limit is reached.\nFor example, a \"his 4 roll 6\" (h4r6) generator rerolls when the piece is the same as one of the 4 previous pieces, and rerolls up to 6 times.\nThere are other variations as well, such as \"his4 roll6 pool35\", which further reduces the randomness of the piece sequence.\n\nIn Techmino, the max. reroll count is half of the sequence length, rounded up.", }, {"Hypertapping", "hypertapping", @@ -615,17 +615,17 @@ return{ {"C2 Generator", "cultris2generator cultrisiigenerator c2generator", "term", - "All Tetriminoes have a initial weight of 0.\nEvery time, divide all weights by 2, add a random number between 0 and 1, pick the piece with the highest weight, and divide this piece's weight by 3.5.", + "All Tetrominoes have a initial weight of 0.\nEvery time, divide all weights by 2, add a random number between 0 and 1, pick the piece with the highest weight, and divide this piece's weight by 3.5.", }, {"C2 wall kicks", "cultris2wallkicks cultrisiiwallkicks c2wallkicks cultris2kicks cultrisiikicks c2kicks", "term", - "Left, right, down, bottom-left, bottom-right, left 2, right 2. (This applies to *any* rotation of *any* Tetrimino.)", + "Left, right, down, bottom-left, bottom-right, left 2, right 2. (This applies to *any* rotation of *any* Tetromino.)", }, {"Stacking", "stacking", "term", - "Often refers to stacking Tetriminoes without leaving holes in the stack.", + "Often refers to stacking Tetrominoes without leaving holes in the stack.", }, {"Rotation buttons (1)", "doublerotation", @@ -640,7 +640,7 @@ return{ {"Drought", "drought", "term", - "A situation where a piece you want, often the I Tetrimino (a.k.a. the Long Bar), does not spawn for a long time. This often happens, and can be deadly, for classic Tetris, but it is almost impossible for modern Tetris thanks to the Random Generator.\nWith the Random Generator, there can be at most 12 other pieces between two I Tetriminoes.", + "A situation where a piece you want, often the I Tetromino (a.k.a. the Long Bar), does not spawn for a long time. This often happens, and can be deadly, for classic Tetris, but it is almost impossible for modern Tetris thanks to the Random Generator.\nWith the Random Generator, there can be at most 12 other pieces between two I Tetrominoes.", }, {"MPH mode", "mph", diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index 08ccee41..c79f28c5 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -54,7 +54,7 @@ return{ page="Page:", ai_fixed="The AI is incompatible with fixed sequences.", - ai_prebag="The AI is incompatible with custom sequences which have nontetramino.", + ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", ai_mission="The AI is incompatible with custom missions.", switchSpawnSFX="Please turn on the spawn SFX .", ranks={"D","C","B","A","S"}, diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index dd1f3d50..c0dccea9 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -44,7 +44,7 @@ return{ page="Página:", ai_fixed="La IA no es compatible con secuencias de piezas prefijadas.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetramino.",a IA no es compatible con secuencias de piezas personalizadas.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",a IA no es compatible con secuencias de piezas personalizadas.", ai_mission="La IA no es compatible con misiones personalizadas.", switchSpawnSFX="Habilita los sonidos de aparición de las piezas ;)", needRestart="Reinicia Techmino para que los cambios tengan efecto.", diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 5dcc9909..e13e3eb4 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -45,7 +45,7 @@ return{ page="Page:", ai_fixed="L'IA est incompatible avec les séquences fixes.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetramino.",'IA est incompatible avec les séquences personnalisées.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",'IA est incompatible avec les séquences personnalisées.", ai_mission="L'IA est incompatible avec les missions personnalisées.", switchSpawnSFX="Activez les effets sonores d'apparition des pièces pour jouer", needRestart="Fonctionnera dès la prochaine partie", diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index 6cd1f164..15c55486 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -45,7 +45,7 @@ return{ page="Página:", ai_fixed="A inteligência é incompatível com sequências fixas.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetramino.", inteligência é incompatível com sequências fixas.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", inteligência é incompatível com sequências fixas.", ai_mission="A inteligência é incompatível com missões costumizadas.", switchSpawnSFX="Switch on spawn SFX to play", needRestart="Funciona após reiniciar", From 1e3c2f039bcb52670edf18a345ae70a9a379142e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 22:29:52 +0800 Subject: [PATCH 49/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E9=9B=B7=E8=BE=BE=E5=9B=BE=E7=BA=BF=E6=A1=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/pause.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 8e409169..8b3b6751 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -279,7 +279,11 @@ function scene.draw() gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) end gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(.97,.97,.97,T2)gc.polygon('line',val) + gc.setColor(.97,.97,.97,T2) + for i=1,9,2 do + gc.line(val[i],val[i+1],val[i+2],val[i+3]) + end + gc.line(val[11],val[12],val[1],val[2]) gc.pop() --Texts From 7682054dea8b3b10be0b697840f5db5fda21d3ca Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 18:24:09 +0800 Subject: [PATCH 50/70] =?UTF-8?q?=E5=BE=AE=E8=B0=83lNavy=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/color.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zframework/color.lua b/Zframework/color.lua index cf49d7ed..c236ea7e 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -25,7 +25,7 @@ local COLOR={ lGreen= {0.5, .95, 0.5}, lAqua= {0.4, .95, 0.7}, lCyan= {0.5, .95, .95}, - lNavy= {.45, 0.8, .85}, + lNavy= {0.4, .85, .95}, lSea= {0.5, 0.7, .95}, lBlue= {0.7, 0.7, .95}, lViolet= {0.7, 0.4, .95}, From e50fe63e02eaaaf851b6cc87a0076d1a81ec3ba6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 18:18:11 +0800 Subject: [PATCH 51/70] =?UTF-8?q?TABLE.copy=E6=96=B0=E5=A2=9Edepth?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/tableExtend.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Zframework/tableExtend.lua b/Zframework/tableExtend.lua index be11fbe7..1c326d52 100644 --- a/Zframework/tableExtend.lua +++ b/Zframework/tableExtend.lua @@ -24,14 +24,15 @@ function TABLE.shift(org) return L end ---Get a full copy of a table -function TABLE.copy(org) +--Get a full copy of a table, depth = how many layers will be recreate, default to inf +function TABLE.copy(org,depth) + if not depth then depth=1e99 end local L={} for k,v in next,org do - if type(v)~='table'then + if type(v)~='table'or depth==0 then L[k]=v else - L[k]=TABLE.copy(v) + L[k]=TABLE.copy(v,depth-1) end end return L From 471f1076c4c6bcb1207b36d0701087f57314c6f2 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 22:30:23 +0800 Subject: [PATCH 52/70] =?UTF-8?q?TABLE.shift=E6=96=B0=E5=A2=9Edepth?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/tableExtend.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Zframework/tableExtend.lua b/Zframework/tableExtend.lua index 1c326d52..abbcd2a0 100644 --- a/Zframework/tableExtend.lua +++ b/Zframework/tableExtend.lua @@ -12,13 +12,14 @@ function TABLE.new(val,count) end --Get a copy of [1~#] elements -function TABLE.shift(org) +function TABLE.shift(org,depth) + if not depth then depth=1e99 end local L={} for i=1,#org do - if type(org[i])~='table'then + if type(org[i])~='table'or depth==0 then L[i]=org[i] else - L[i]=TABLE.shift(org[i]) + L[i]=TABLE.shift(org[i],depth-1) end end return L From b083a0801f5fc96571d192cb8cad4b9c2ce45c08 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 8 Aug 2021 18:19:43 +0800 Subject: [PATCH 53/70] =?UTF-8?q?=E6=97=8B=E8=BD=AC=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E9=87=8D=E6=9E=84=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=97=A0=E6=97=8B=E8=BD=AC=E4=B8=AD=E5=BF=83=20close=20#168?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 2 +- main.lua | 1 + parts/RSlist.lua | 709 +++++++++++++++++++++++++++++++ parts/backgrounds/lightning2.lua | 2 +- parts/kickList.lua | 671 ----------------------------- parts/list.lua | 50 +-- parts/player/player.lua | 11 +- parts/scenes/dict.lua | 2 +- parts/scenes/setting_skin.lua | 2 +- parts/scenes/stat.lua | 4 +- 10 files changed, 722 insertions(+), 732 deletions(-) create mode 100644 parts/RSlist.lua delete mode 100644 parts/kickList.lua diff --git a/Zframework/init.lua b/Zframework/init.lua index 1a5967a3..bffc26a1 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -602,7 +602,7 @@ function love.run() local R=int((time+1)/2)%7+1 _=minoColor[SETTING.skin[R]] gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3)) - _=SCS[R][0] + _=DSCP[R][0] gc_draw(TEXTURE.miniBlock[R],mx,my,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5) gc_setColor(1,1,1) gc_draw(ms.isDown(1)and cursor_holdImg or cursorImg,mx,my,nil,nil,nil,8,8) diff --git a/main.lua b/main.lua index c753b398..263f2c3a 100644 --- a/main.lua +++ b/main.lua @@ -78,6 +78,7 @@ NET= require'parts.net' VK= require'parts.virtualKey' AIFUNC= require'parts.ai' AIBUILDER= require'parts.AITemplate' +RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos PLY= require'parts.player' netPLY= require'parts.netPlayer' MODES= require'parts.modes' diff --git a/parts/RSlist.lua b/parts/RSlist.lua new file mode 100644 index 00000000..01270a84 --- /dev/null +++ b/parts/RSlist.lua @@ -0,0 +1,709 @@ +local defaultCenterPos={ + --Tetromino + {[0]={0,1},{1,0},{1,1},{1,1}},--Z + {[0]={0,1},{1,0},{1,1},{1,1}},--S + {[0]={0,1},{1,0},{1,1},{1,1}},--L + {[0]={0,1},{1,0},{1,1},{1,1}},--J + {[0]={0,1},{1,0},{1,1},{1,1}},--T + {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--O + {[0]={-.5,1.5},{1.5,-.5},{.5,1.5},{1.5,.5}},--I + + --Pentomino + {[0]={1,1},{1,1},{1,1},{1,1}},--Z5 + {[0]={1,1},{1,1},{1,1},{1,1}},--S5 + {[0]={0,1},{1,0},{1,1},{1,1}},--P + {[0]={0,1},{1,0},{1,1},{1,1}},--Q + {[0]={1,1},{1,1},{1,1},{1,1}},--F + {[0]={1,1},{1,1},{1,1},{1,1}},--E + {[0]={1,1},{1,1},{1,1},{1,1}},--T5 + {[0]={0,1},{1,0},{1,1},{1,1}},--U + {[0]={.5,1.5},{.5,.5},{1.5,.5},{1.5,1.5}},--V + {[0]={1,1},{1,1},{1,1},{1,1}},--W + {[0]={1,1},{1,1},{1,1},{1,1}},--X + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--J5 + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--L5 + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--R + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--Y + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--N + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--H + {[0]={0,2},{2,0},{0,2},{2,0}},--I5 + + --Trimino + {[0]={0,1},{1,0},{0,1},{1,0}},--I3 + {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--C + + --Domino + {[0]={-.5,.5},{.5,-.5},{.5,.5},{.5,.5}},--I2 + + --Dot + {[0]={0,0},{0,0},{0,0},{0,0}},--O1 +} + +local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end + +local noKickSet,noKickSet_180,pushZero do + local Zero={map[0][0]} + noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} + noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} + function pushZero(t) + for _,set in next,t do + if type(set)=='table'then + for _,R in next,set do + if not R[1]or type(R[1])=='string'and R[1]~='+0+0'then + table.insert(R,1,'+0+0') + end + end + end + end + end +end + +--Use this if the block is centrosymmetry, *PTR!!! +local function centroSymSet(L) + L[23]=L[01]L[32]=L[10] + L[21]=L[03]L[12]=L[30] + L[20]=L[02]L[31]=L[13] +end + +--Use this to copy a symmetry set +local function flipList(O) + if not O then return end + local L={} + for i,s in next,O do + L[i]=string.char(88-s:byte())..s:sub(2) + end + return L +end + +local function reflect(a) + return{ + [03]=flipList(a[01]), + [01]=flipList(a[03]), + [30]=flipList(a[10]), + [32]=flipList(a[12]), + [23]=flipList(a[21]), + [21]=flipList(a[23]), + [10]=flipList(a[30]), + [12]=flipList(a[32]), + [02]=flipList(a[02]), + [20]=flipList(a[20]), + [31]=flipList(a[13]), + [13]=flipList(a[31]), + } +end + +local TRS +do + local OspinList={ + {111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T + {333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T + {313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z + {131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S + {131,1,2,-1, 0,0},{131,1,2, 0,-1,0},{131,1,2, 0, 0,0},--Z(misOrder) + {313,2,2, 0, 0,0},{313,2,2,-1,-1,0},{313,2,2,-1, 0,0},--S(misOrder) + {331,3,2, 0,-1,0},--J(farDown) + {113,4,2,-1,-1,0},--L(farDown) + {113,3,2,-1,-1,0},{113,3,0, 0, 0,0},--J + {331,4,2, 0,-1,0},{331,4,0,-1, 0,0},--L + {222,7,2,-1, 0,2},{222,7,2,-2, 0,2},{222,7,2, 0, 0,2},--I + {222,7,0,-1, 1,1},{222,7,0,-2, 1,1},{222,7,0, 0, 1,1},--I(high) + {121,6,0, 1,-1,2},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O + {323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O + }--{keys, ID, dir, dx, dy, freeLevel (0=immovable, 1=U/D-immovable, 2=free)} + local XspinList={ + {{ 1,-1},{ 1, 0},{ 1, 1},{ 1,-2},{ 1, 2}}, + {{ 0,-1},{ 0,-2},{ 0, 1},{ 0,-2},{ 0, 2}}, + {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, + } + TRS={ + centerDisp=TABLE.new(true,29), + kickTable={ + { + [01]={'-1+0','-1+1','+0-2','-1+2','+0+1'}, + [10]={'+1+0','+1-1','+0+2','+1-2','+1-2'}, + [03]={'+1+0','+1+1','+0-2','+1-1','+1-2'}, + [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+1+0','+1-1','+0+2','+1+2'}, + [21]={'-1+0','-1+1','+0-2','-1-2'}, + [32]={'-1+0','-1-1','+0+2','-1+2'}, + [23]={'+1+0','+1+1','+0-2','+1-2'}, + [02]={'+1+0','-1+0','+0-1','+0+1'}, + [20]={'-1+0','+1+0','+0+1','+0-1'}, + [13]={'+0-1','+0+1','+0-2'}, + [31]={'+0+1','+0-1','+0+2'}, + },--Z + false,--S + { + [01]={'-1+0','-1+1','+1+0','+0-2','+1+1'}, + [10]={'+1+0','+1-1','-1+0','+0+2','+1+2'}, + [03]={'+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, + [30]={'-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, + [12]={'+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, + [21]={'-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, + [32]={'-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, + [23]={'+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, + [02]={'-1+0','+1+0','+0-1','+0+1'}, + [20]={'+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0-1','+0+1','+1+0'}, + [31]={'+0+1','+0-1','-1+0'}, + },--J + false,--L + { + [01]={'-1+0','-1+1','+0-2','-1-2','+0+1'}, + [10]={'+1+0','+1-1','+0+2','+1+2','+0-1'}, + [03]={'+1+0','+1+1','+0-2','+1-2','+0+1'}, + [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, + [21]={'-1+0','+0-2','-1-2','-1-1','+1+1'}, + [32]={'-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, + [23]={'+1+0','+0-2','+1-2','+1-1','-1+1'}, + [02]={'-1+0','+1+0','+0+1'}, + [20]={'+1+0','-1+0','+0-1'}, + [13]={'+0-1','+0+1','+1+0','+0-2','+0+2'}, + [31]={'+0-1','+0+1','-1+0','+0-2','+0+2'}, + },--T + function(P,d) + if P.gameEnv.easyFresh then + P:freshBlock('fresh') + end + if P.gameEnv.ospin then + local x,y=P.curX,P.curY + if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then + if P.sound then SFX.play('rotatekick',nil,P:getCenterX()*.15)end + P.spinSeq=P.spinSeq%100*10+d + if P.spinSeq<100 then return end + for i=1,#OspinList do + local L=OspinList[i] + if P.spinSeq==L[1]then + local id,dir=L[2],L[3] + local bk=BLOCKS[id][dir] + x,y=P.curX+L[4],P.curY+L[5] + if + not P:ifoverlap(bk,x,y)and( + L[6]>0 or(P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y)) + )and( + L[6]==2 or(P:ifoverlap(bk,x,y-1)and P:ifoverlap(bk,x,y+1)) + ) + then + local C=P.cur + C.id=id + C.bk=bk + P.curX,P.curY=x,y + P.cur.dir,P.cur.sc=dir,defaultCenterPos[id][dir] + P.spinLast=2 + P.stat.rotate=P.stat.rotate+1 + P:freshBlock('move') + P.spinSeq=0 + return + end + end + end + else + if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end + P.spinSeq=0 + end + else + if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end + end + end,--O + { + [01]={'+0+1','+1+0','-2+0','-2-1','+1+2'}, + [10]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, + [03]={'+0+1','-1+0','+2+0','+2-1','-1+2'}, + [30]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, + [12]={'-1+0','+2+0','+2-1','+0-1','-1+2'}, + [21]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, + [32]={'+1+0','-2+0','-2-1','+0-1','+1+2'}, + [23]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, + [02]={'-1+0','+1+0','+0-1','+0+1'}, + [20]={'+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0-1','+1+0','-1+0','+0+1'}, + },--I + { + [01]={'+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, + [10]={'+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, + [03]={'+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, + [30]={'-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, + },--Z5 + false,--S5 + { + [01]={'-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, + [10]={'+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, + [03]={'+1+0','+1+1','+0-2','+1-2'}, + [30]={'-1+0','-1-1','+0+2','-1+2'}, + [12]={'+1+0','+1-1','+0+2','+1+2','+1+1'}, + [21]={'-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, + [32]={'-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, + [23]={'+1+0','+1+1','-1+0','+0-2','+1-2'}, + [02]={'-1+0','+0-1','+0+1'}, + [20]={'+1+0','+0+1','+0-1'}, + [13]={'+1+0','+0+1','-1+0'}, + [31]={'-1+0','+0-1','+1+0'}, + },--P + false,--Q + { + [01]={'-1+0','+1+0','-1+1','+0-2','+0-3'}, + [10]={'+1+0','+1-1','-1+0','+0+2','+0+3'}, + [03]={'+1+0','+1-1','+0+1','+0-2','+0-3'}, + [30]={'-1+1','+1+0','+0-1','+0+2','+0+3'}, + [12]={'+1+0','+0-1','-1+0','+0+2'}, + [21]={'-1+0','+0+1','+1+0','+0-2'}, + [32]={'-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, + [23]={'+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, + [02]={'+1+0','-1+0','-1-1'}, + [20]={'-1+0','+1+0','+1+1'}, + [13]={'+0-1','-1+1','+0+1'}, + [31]={'+0-1','+1-1','+0+1'}, + },--F + false,--E + { + [01]={'+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, + [10]={'+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, + [03]={'+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, + [30]={'-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, + [12]={'+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, + [21]={'+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, + [32]={'-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, + [23]={'-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, + [02]={'+0-1','+0+1','+0+2'}, + [20]={'+0-1','+0+1','+0-2'}, + [13]={'+1+0','-1+1','-2+0'}, + [31]={'-1+0','+1+1','+2+0'}, + },--T5 + { + [01]={'-1+0','-1+1','+0-2','-1-2'}, + [10]={'+1+0','+1-1','+0+2','+1+2'}, + [03]={'+1+0','+1+1','+0-2','+1-2'}, + [30]={'-1+0','-1-1','+0-2','-1+2'}, + [12]={'+1+0','+1-1','+1+1'}, + [21]={'-1-1','-1+1','-1-1'}, + [32]={'-1+0','-1-1','-1+1'}, + [23]={'+1-1','+1+1','+1-1'}, + [02]={'+0+1'}, + [20]={'+0-1'}, + [13]={'+0-1','+0+1','+1+0'}, + [31]={'+0-1','+0+1','-1+0'}, + },--U + { + [01]={'+0+1','-1+0','+0-2','-1-2'}, + [10]={'+0+1','+1+0','+0-2','+1-2'}, + [03]={'+0-1','+0+1','+0+2'}, + [30]={'+0-1','+0+1','+0-2'}, + [12]={'+0-1','+0+1'}, + [21]={'+0-1','+0-2'}, + [32]={'+1+0','-1+0'}, + [23]={'-1+0','+1+0'}, + [02]={'-1+1','+1-1'}, + [20]={'+1-1','-1+1'}, + [13]={'+1+1','-1-1'}, + [31]={'-1-1','+1+1'}, + },--V + { + [01]={'+0-1','-1+0','+1+0','+1-1','+0+2'}, + [10]={'+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, + [03]={'+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, + [30]={'-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, + [12]={'+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, + [21]={'-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, + [32]={'+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, + [23]={'+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, + [02]={'+0-1','-1+0'}, + [20]={'+0+1','+1+0'}, + [13]={'+0+1','-1+0'}, + [31]={'+0-1','+1+0'}, + },--W + function(P,d) + if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end + local kickData=XspinList[d] + for test=1,#kickData do + local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2] + if not P:ifoverlap(P.cur.bk,x,y)then + P.curX,P.curY=x,y + P.spinLast=1 + P:freshBlock('move') + P.stat.rotate=P.stat.rotate+1 + return + end + end + P:freshBlock('fresh') + end,--X + { + [01]={'-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, + [10]={'-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, + [03]={'+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0-1','+1-1','-1+0','+2-1'}, + [20]={'+0+1','-1+1','+1+0','-2+1'}, + [13]={'-1+0','-1-1','+0+1','-1-2'}, + [31]={'+1+0','+1+1','+0-1','+1+2'}, + },--J5 + false,--L5 + { + [01]={'-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, + [10]={'-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, + [03]={'+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0-1','+1-1','-1+0','+2-1','+0+1'}, + [20]={'+0+1','-1+1','+1+0','-2+1','+0-1'}, + [13]={'-1+0','-1-1','+0+1','-1-2'}, + [31]={'+1+0','+1+1','+0-1','+1+2'}, + },--R + false,--Y + { + [01]={'-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, + [10]={'+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, + [03]={'-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [30]={'-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [12]={'-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [21]={'-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [32]={'-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, + [23]={'+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, + [02]={'-1+0','+0+2','+0-1'}, + [20]={'+1+0','+0-2','+0+1'}, + [13]={'-1+0','-1-1','+0+1','+1+2'}, + [31]={'+1+0','+1+1','+0-1','-1-2'}, + },--N + false,--H + { + [01]={'+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, + [10]={'-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, + [03]={'-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, + [30]={'+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, + },--I5 + { + [01]={'-1+0','-1-1','+1+1','-1+1'}, + [10]={'-1+0','+1+0','-1-1','+1+1'}, + [03]={'+1+0','+1-1','-1+1','+1+1'}, + [30]={'+1+0','-1+0','+1-1','-1+1'}, + },--I3 + { + [01]={'-1+0','+1+0'}, + [10]={'+1+0','-1+0'}, + [03]={'+0+1','+0-1'}, + [30]={'+0-1','+0+1'}, + [12]={'+0+1','+0-1'}, + [21]={'+0-1','+0+1'}, + [32]={'-1+0','+1+0'}, + [23]={'+1+0','-1+0'}, + [02]={'+0-1','+1-1','-1-1'}, + [20]={'+0+1','-1+1','+1+1'}, + [13]={'+0-1','-1-1','+1-1'}, + [31]={'+0+1','+1+1','-1+1'}, + },--C + { + [01]={'-1+0','+0+1'}, + [10]={'+1+0','+0+1'}, + [03]={'+1+0','+0+1'}, + [30]={'-1+0','+0+1'}, + [12]={'+1+0','+0+2'}, + [21]={'+0-1','-1+0'}, + [32]={'-1+0','+0+2'}, + [23]={'+0-1','-1+0'}, + [02]={'+0-1','+0+1'}, + [20]={'+0+1','+0-1'}, + [13]={'-1+0','+1+0'}, + [31]={'+1+0','-1+0'}, + },--I2 + nil,--O1 + } + } + TRS.centerDisp[6]=false + TRS.centerDisp[18]=false + TRS.kickTable[2]= reflect(TRS.kickTable[1])--SZ + TRS.kickTable[4]= reflect(TRS.kickTable[3])--LJ + TRS.kickTable[9]= reflect(TRS.kickTable[8])--S5Z5 + TRS.kickTable[11]=reflect(TRS.kickTable[10])--PQ + TRS.kickTable[13]=reflect(TRS.kickTable[12])--FE + TRS.kickTable[20]=reflect(TRS.kickTable[19])--L5J5 + TRS.kickTable[22]=reflect(TRS.kickTable[21])--RY + TRS.kickTable[24]=reflect(TRS.kickTable[23])--NH + centroSymSet(TRS.kickTable[8])centroSymSet(TRS.kickTable[9])--S5Z5 + centroSymSet(TRS.kickTable[25])centroSymSet(TRS.kickTable[26])--I5I3 + pushZero(TRS.kickTable) +end + +local SRS +do + SRS={ + kickTable={ + { + [01]={'-1+0','-1+1','+0-2','-1-2'}, + [10]={'+1+0','+1-1','+0+2','+1+2'}, + [03]={'+1+0','+1+1','+0-2','+1-2'}, + [30]={'-1+0','-1-1','+0+2','-1+2'}, + [12]={'+1+0','+1-1','+0+2','+1+2'}, + [21]={'-1+0','-1+1','+0-2','-1-2'}, + [32]={'-1+0','-1-1','+0+2','-1+2'}, + [23]={'+1+0','+1+1','+0-2','+1-2'}, + [02]={},[20]={},[13]={},[31]={}, + },--Z + false,--S + false,--J + false,--L + false,--T + noKickSet,--O + { + [01]={'-2+0','+1+0','-2-1','+1+2'}, + [10]={'+2+0','-1+0','+2+1','-1-2'}, + [12]={'-1+0','+2+0','-1+2','+2-1'}, + [21]={'+1+0','-2+0','+1-2','-2+1'}, + [23]={'+2+0','-1+0','+2+1','-1-2'}, + [32]={'-2+0','+1+0','-2-1','+1+2'}, + [30]={'+1+0','-2+0','+1-2','-2+1'}, + [03]={'-1+0','+2+0','-1+2','+2-1'}, + [02]={},[20]={},[13]={},[31]={}, + }--I + } + } + pushZero(SRS.kickTable) + for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end + for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end +end + +local BiRS +do + local R={'+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={'+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 F={'+0+0','+0-1','+0+1','+0+2'} + local list={ + {[02]=L,[20]=R,[13]=R,[31]=L},--Z + {[02]=R,[20]=L,[13]=L,[31]=R},--S + {[02]=L,[20]=R,[13]=L,[31]=R},--J + {[02]=R,[20]=L,[13]=L,[31]=R},--L + {[02]=F,[20]=F,[13]=L,[31]=R},--T + {[02]=F,[20]=F,[13]=F,[31]=F},--O + {[02]=F,[20]=F,[13]=R,[31]=L},--I + + {[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 + {[02]=L,[20]=R,[13]=R,[31]=L},--E + {[02]=F,[20]=F,[13]=L,[31]=R},--T5 + {[02]=F,[20]=F,[13]=L,[31]=R},--U + {[02]=R,[20]=L,[13]=L,[31]=R},--V + {[02]=R,[20]=L,[13]=L,[31]=R},--W + {[02]=F,[20]=F,[13]=F,[31]=F},--X + {[02]=L,[20]=R,[13]=R,[31]=L},--J5 + {[02]=R,[20]=L,[13]=L,[31]=R},--L5 + {[02]=L,[20]=R,[13]=R,[31]=L},--R + {[02]=R,[20]=L,[13]=L,[31]=R},--Y + {[02]=L,[20]=R,[13]=R,[31]=L},--N + {[02]=R,[20]=L,[13]=L,[31]=R},--H + {[02]=F,[20]=F,[13]=F,[31]=F},--I5 + + {[02]=F,[20]=F,[13]=F,[31]=F},--I3 + {[02]=R,[20]=L,[13]=L,[31]=R},--C + {[02]=F,[20]=F,[13]=R,[31]=L},--I2 + {[02]=F,[20]=F,[13]=F,[31]=F},--O1 + } + for i=1,29 do + local a,b=R,L + if i==6 or i==18 then a,b=b,a end + 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 + BiRS={} + BiRS.kickTable=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] + local icb=BLOCKS[C.id][idir] + local isc=defaultCenterPos[C.id][idir] + local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1] + local dx,dy=0,0 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 + end + while true do + for test=1,#kickList do + local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy + if + dx*fdx>=0 and + fdx^2+fdy^2<=5 and + (P.freshTime>0 or fdy<=0) + then + 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() + end + P.curX,P.curY,C.dir=x,y,idir + C.sc,C.bk=isc,icb + P.spinLast=test==2 and 0 or 1 + + local t=P.freshTime + if not ifpre then + P:freshBlock('move') + end + if fdy>0 and P.freshTime==t and P.curY~=P.imgY then + P.freshTime=P.freshTime-1 + end + + if P.sound then + local sfx + if ifpre then + sfx='prerotate' + elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then + sfx='rotatekick' + if P.gameEnv.shakeFX then + if d==1 or d==3 then + P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3 + else + P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3 + end + end + else + sfx='rotate' + end + SFX.play(sfx,nil,P:getCenterX()*.15) + end + P.stat.rotate=P.stat.rotate+1 + return + end + end + end + + --Try release left/right, then softdrop, failed to rotate otherwise + if dx~=0 then + dx=0 + elseif dy~=0 then + dy=0 + else + return + end + end + end,29) +end + +local ASC +do + local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} + local R=flipList(L) + local F={'+0+0'} + local centerPos=TABLE.shift(defaultCenterPos,0) + centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} + centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} + ASC={ + centerPos=centerPos, + kickTable=TABLE.new({ + [01]=R,[10]=L,[03]=L,[30]=R, + [12]=R,[21]=L,[32]=L,[23]=R, + [02]=F,[20]=F,[13]=F,[31]=F, + },29) + } +end + +local ASC_plus +do + local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} + local R=flipList(L) + local F={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','+0-2','-1-2','+1-2','-2+0','+2+0','-2-1','+2-1','-2+1','+2+1','+0+2','-1+2','+1+2'} + local centerPos=TABLE.shift(defaultCenterPos,0) + centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} + centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} + ASC_plus={ + centerPos=centerPos, + kickTable=TABLE.new({ + [01]=R,[12]=R,[23]=R,[30]=R, + [10]=L,[21]=L,[32]=L,[03]=L, + [02]=F,[20]=F,[13]=F,[31]=F, + },29) + } +end + +local C2 +do + local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} + C2={ + kickTable=TABLE.new({ + [01]=L,[10]=L,[12]=L,[21]=L, + [23]=L,[32]=L,[30]=L,[03]=L, + [02]=L,[20]=L,[13]=L,[31]=L, + },29) + } +end + +local C2_sym +do + local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} + local R={'+0+0','+1+0','-1+0','+0-1','+1-1','-1-1','+2+0','-2+0'} + + local Z={ + [01]=R,[10]=L,[03]=L,[30]=R, + [12]=R,[21]=L,[32]=L,[23]=R, + [02]=R,[20]=L,[13]=L,[31]=R, + } + local S=reflect(Z) + + C2_sym={ + kickTable={ + Z,S,--Z,S + Z,S,--J,L + Z,--T + noKickSet,--O + Z,--I + + Z,S,--Z5,S5 + Z,S,--P,Q + Z,S,--F,E + Z,Z,Z,Z,--T5,U,V,W + noKickSet,--X + Z,S,--J5,L5 + Z,S,--R,Y + Z,S,--N,H + Z,--I5 + + Z,Z,--I3,C + Z,Z,--I2,O1 + } + } +end + +local None={kickTable=TABLE.new(noKickSet_180,29)} + +local None_plus={kickTable=TABLE.new(noKickSet,29)} + +local RSlist={ + TRS=TRS, + SRS=SRS, + BiRS=BiRS, + ASC=ASC, + ASC_plus=ASC_plus, + C2=C2, + C2_sym=C2_sym, + None=None, + None_plus=None_plus, +} + +for _,rs in next,RSlist do + if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end + if not rs.centerPos then rs.centerPos=defaultCenterPos end + + --Make all string vec to the same table vec + for _,set in next,rs.kickTable do + if type(set)=='table'then + for _,list in next,set do + if type(list[1])=='string'then + for i,vecStr in next,list do + list[i]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))] + end + end + end + end + end +end + +return RSlist \ No newline at end of file diff --git a/parts/backgrounds/lightning2.lua b/parts/backgrounds/lightning2.lua index 1b275922..aec006ff 100644 --- a/parts/backgrounds/lightning2.lua +++ b/parts/backgrounds/lightning2.lua @@ -10,7 +10,7 @@ local scs function back.init() colorLib=minoColor blocks=BLOCKS - scs=SCS + scs=DSCP t=rnd()*2600 end function back.update(dt) diff --git a/parts/kickList.lua b/parts/kickList.lua deleted file mode 100644 index 9dc49eaa..00000000 --- a/parts/kickList.lua +++ /dev/null @@ -1,671 +0,0 @@ -local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end - -local noKickSet,noKickSet_180,pushZero do - local Zero={map[0][0]} - noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} - noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} - function pushZero(t) - for id,set in next,t do - if type(id)=='number'and type(set)=='table'then - for _,R in next,set do - if not R[1]or R[1][1]~=0 or R[1][2]~=0 then - table.insert(R,1,map[0][0]) - end - end - end - end - end -end - ---Convert vector string to table -local function vecStrConv(list) - for k,vecStr in next,list do - list[k]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))] - end - return list -end - ---Make all vec point to the same vec -local function collectSet(set) - if type(set)~='table'then return end - for _,list in next,set do - if type(list[1])=='string'then - vecStrConv(list) - end - end -end - ---Use this if the block is centrosymmetry, *PTR!!! -local function centroSymSet(L) - L[23]=L[01]L[32]=L[10] - L[21]=L[03]L[12]=L[30] - L[20]=L[02]L[31]=L[13] -end - ---Use this to copy a symmetry set -local function flipList(O) - if not O then return end - local L={} - for i,s in next,O do - L[i]=string.char(88-s:byte())..s:sub(2) - end - return L -end - -local function reflect(a) - return{ - [03]=flipList(a[01]), - [01]=flipList(a[03]), - [30]=flipList(a[10]), - [32]=flipList(a[12]), - [23]=flipList(a[21]), - [21]=flipList(a[23]), - [10]=flipList(a[30]), - [12]=flipList(a[32]), - [02]=flipList(a[02]), - [20]=flipList(a[20]), - [31]=flipList(a[13]), - [13]=flipList(a[31]), - } -end - -local TRS -do - local OspinList={ - {111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T - {333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T - {313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z - {131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S - {131,1,2,-1, 0,0},{131,1,2, 0,-1,0},{131,1,2, 0, 0,0},--Z(misOrder) - {313,2,2, 0, 0,0},{313,2,2,-1,-1,0},{313,2,2,-1, 0,0},--S(misOrder) - {331,3,2, 0,-1,0},--J(farDown) - {113,4,2,-1,-1,0},--L(farDown) - {113,3,2,-1,-1,0},{113,3,0, 0, 0,0},--J - {331,4,2, 0,-1,0},{331,4,0,-1, 0,0},--L - {222,7,2,-1, 0,2},{222,7,2,-2, 0,2},{222,7,2, 0, 0,2},--I - {222,7,0,-1, 1,1},{222,7,0,-2, 1,1},{222,7,0, 0, 1,1},--I(high) - {121,6,0, 1,-1,2},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O - {323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O - }--{keys, ID, dir, dx, dy, freeLevel (0=immovable, 1=U/D-immovable, 2=free)} - local XspinList={ - {{ 1,-1},{ 1, 0},{ 1, 1},{ 1,-2},{ 1, 2}}, - {{ 0,-1},{ 0,-2},{ 0, 1},{ 0,-2},{ 0, 2}}, - {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, - } - TRS={ - centerDisp=TABLE.new(true,29), - { - [01]={'-1+0','-1+1','+0-2','-1+2','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1-2','+1-2'}, - [03]={'+1+0','+1+1','+0-2','+1-1','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+1+0','+1-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','+0-2','+1-2'}, - [02]={'+1+0','-1+0','+0-1','+0+1'}, - [20]={'-1+0','+1+0','+0+1','+0-1'}, - [13]={'+0-1','+0+1','+0-2'}, - [31]={'+0+1','+0-1','+0+2'}, - },--Z - false,--S - { - [01]={'-1+0','-1+1','+1+0','+0-2','+1+1'}, - [10]={'+1+0','+1-1','-1+0','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, - [12]={'+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, - [23]={'+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, - [02]={'-1+0','+1+0','+0-1','+0+1'}, - [20]={'+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0-1','+0+1','+1+0'}, - [31]={'+0+1','+0-1','-1+0'}, - },--J - false,--L - { - [01]={'-1+0','-1+1','+0-2','-1-2','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1+2','+0-1'}, - [03]={'+1+0','+1+1','+0-2','+1-2','+0+1'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, - [21]={'-1+0','+0-2','-1-2','-1-1','+1+1'}, - [32]={'-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, - [23]={'+1+0','+0-2','+1-2','+1-1','-1+1'}, - [02]={'-1+0','+1+0','+0+1'}, - [20]={'+1+0','-1+0','+0-1'}, - [13]={'+0-1','+0+1','+1+0','+0-2','+0+2'}, - [31]={'+0-1','+0+1','-1+0','+0-2','+0+2'}, - },--T - function(P,d) - if P.gameEnv.easyFresh then - P:freshBlock('fresh') - end - if P.gameEnv.ospin then - local x,y=P.curX,P.curY - if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then - if P.sound then SFX.play('rotatekick',nil,P:getCenterX()*.15)end - P.spinSeq=P.spinSeq%100*10+d - if P.spinSeq<100 then return end - for i=1,#OspinList do - local L=OspinList[i] - if P.spinSeq==L[1]then - local id,dir=L[2],L[3] - local bk=BLOCKS[id][dir] - x,y=P.curX+L[4],P.curY+L[5] - if - not P:ifoverlap(bk,x,y)and( - L[6]>0 or(P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y)) - )and( - L[6]==2 or(P:ifoverlap(bk,x,y-1)and P:ifoverlap(bk,x,y+1)) - ) - then - local C=P.cur - C.id=id - C.bk=bk - P.curX,P.curY=x,y - P.cur.dir,P.cur.sc=dir,SCS[id][dir] - P.spinLast=2 - P.stat.rotate=P.stat.rotate+1 - P:freshBlock('move') - P.spinSeq=0 - return - end - end - end - else - if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end - P.spinSeq=0 - end - else - if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end - end - end,--O - { - [01]={'+0+1','+1+0','-2+0','-2-1','+1+2'}, - [10]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, - [03]={'+0+1','-1+0','+2+0','+2-1','-1+2'}, - [30]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, - [12]={'-1+0','+2+0','+2-1','+0-1','-1+2'}, - [21]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, - [32]={'+1+0','-2+0','-2-1','+0-1','+1+2'}, - [23]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, - [02]={'-1+0','+1+0','+0-1','+0+1'}, - [20]={'+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0-1','+1+0','-1+0','+0+1'}, - },--I - { - [01]={'+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, - [10]={'+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, - [03]={'+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, - [30]={'-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, - },--Z5 - false,--S5 - { - [01]={'-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2'}, - [12]={'+1+0','+1-1','+0+2','+1+2','+1+1'}, - [21]={'-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, - [32]={'-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','-1+0','+0-2','+1-2'}, - [02]={'-1+0','+0-1','+0+1'}, - [20]={'+1+0','+0+1','+0-1'}, - [13]={'+1+0','+0+1','-1+0'}, - [31]={'-1+0','+0-1','+1+0'}, - },--P - false,--Q - { - [01]={'-1+0','+1+0','-1+1','+0-2','+0-3'}, - [10]={'+1+0','+1-1','-1+0','+0+2','+0+3'}, - [03]={'+1+0','+1-1','+0+1','+0-2','+0-3'}, - [30]={'-1+1','+1+0','+0-1','+0+2','+0+3'}, - [12]={'+1+0','+0-1','-1+0','+0+2'}, - [21]={'-1+0','+0+1','+1+0','+0-2'}, - [32]={'-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, - [23]={'+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, - [02]={'+1+0','-1+0','-1-1'}, - [20]={'-1+0','+1+0','+1+1'}, - [13]={'+0-1','-1+1','+0+1'}, - [31]={'+0-1','+1-1','+0+1'}, - },--F - false,--E - { - [01]={'+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, - [10]={'+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, - [03]={'+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, - [30]={'-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, - [12]={'+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, - [21]={'+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, - [32]={'-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, - [23]={'-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, - [02]={'+0-1','+0+1','+0+2'}, - [20]={'+0-1','+0+1','+0-2'}, - [13]={'+1+0','-1+1','-2+0'}, - [31]={'-1+0','+1+1','+2+0'}, - },--T5 - { - [01]={'-1+0','-1+1','+0-2','-1-2'}, - [10]={'+1+0','+1-1','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0-2','-1+2'}, - [12]={'+1+0','+1-1','+1+1'}, - [21]={'-1-1','-1+1','-1-1'}, - [32]={'-1+0','-1-1','-1+1'}, - [23]={'+1-1','+1+1','+1-1'}, - [02]={'+0+1'}, - [20]={'+0-1'}, - [13]={'+0-1','+0+1','+1+0'}, - [31]={'+0-1','+0+1','-1+0'}, - },--U - { - [01]={'+0+1','-1+0','+0-2','-1-2'}, - [10]={'+0+1','+1+0','+0-2','+1-2'}, - [03]={'+0-1','+0+1','+0+2'}, - [30]={'+0-1','+0+1','+0-2'}, - [12]={'+0-1','+0+1'}, - [21]={'+0-1','+0-2'}, - [32]={'+1+0','-1+0'}, - [23]={'-1+0','+1+0'}, - [02]={'-1+1','+1-1'}, - [20]={'+1-1','-1+1'}, - [13]={'+1+1','-1-1'}, - [31]={'-1-1','+1+1'}, - },--V - { - [01]={'+0-1','-1+0','+1+0','+1-1','+0+2'}, - [10]={'+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, - [03]={'+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, - [30]={'-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, - [12]={'+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, - [21]={'-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, - [32]={'+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, - [23]={'+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, - [02]={'+0-1','-1+0'}, - [20]={'+0+1','+1+0'}, - [13]={'+0+1','-1+0'}, - [31]={'+0-1','+1+0'}, - },--W - function(P,d) - if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end - local kickData=XspinList[d] - for test=1,#kickData do - local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2] - if not P:ifoverlap(P.cur.bk,x,y)then - P.curX,P.curY=x,y - P.spinLast=1 - P:freshBlock('move') - P.stat.rotate=P.stat.rotate+1 - return - end - end - P:freshBlock('fresh') - end,--X - { - [01]={'-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, - [10]={'-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, - [03]={'+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0-1','+1-1','-1+0','+2-1'}, - [20]={'+0+1','-1+1','+1+0','-2+1'}, - [13]={'-1+0','-1-1','+0+1','-1-2'}, - [31]={'+1+0','+1+1','+0-1','+1+2'}, - },--J5 - false,--L5 - { - [01]={'-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, - [10]={'-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, - [03]={'+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0-1','+1-1','-1+0','+2-1','+0+1'}, - [20]={'+0+1','-1+1','+1+0','-2+1','+0-1'}, - [13]={'-1+0','-1-1','+0+1','-1-2'}, - [31]={'+1+0','+1+1','+0-1','+1+2'}, - },--R - false,--Y - { - [01]={'-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, - [10]={'+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, - [03]={'-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [30]={'-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [12]={'-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [21]={'-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [32]={'-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, - [23]={'+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, - [02]={'-1+0','+0+2','+0-1'}, - [20]={'+1+0','+0-2','+0+1'}, - [13]={'-1+0','-1-1','+0+1','+1+2'}, - [31]={'+1+0','+1+1','+0-1','-1-2'}, - },--N - false,--H - { - [01]={'+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, - [10]={'-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, - [03]={'-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, - [30]={'+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, - },--I5 - { - [01]={'-1+0','-1-1','+1+1','-1+1'}, - [10]={'-1+0','+1+0','-1-1','+1+1'}, - [03]={'+1+0','+1-1','-1+1','+1+1'}, - [30]={'+1+0','-1+0','+1-1','-1+1'}, - },--I3 - { - [01]={'-1+0','+1+0'}, - [10]={'+1+0','-1+0'}, - [03]={'+0+1','+0-1'}, - [30]={'+0-1','+0+1'}, - [12]={'+0+1','+0-1'}, - [21]={'+0-1','+0+1'}, - [32]={'-1+0','+1+0'}, - [23]={'+1+0','-1+0'}, - [02]={'+0-1','+1-1','-1-1'}, - [20]={'+0+1','-1+1','+1+1'}, - [13]={'+0-1','-1-1','+1-1'}, - [31]={'+0+1','+1+1','-1+1'}, - },--C - { - [01]={'-1+0','+0+1'}, - [10]={'+1+0','+0+1'}, - [03]={'+1+0','+0+1'}, - [30]={'-1+0','+0+1'}, - [12]={'+1+0','+0+2'}, - [21]={'+0-1','-1+0'}, - [32]={'-1+0','+0+2'}, - [23]={'+0-1','-1+0'}, - [02]={'+0-1','+0+1'}, - [20]={'+0+1','+0-1'}, - [13]={'-1+0','+1+0'}, - [31]={'+1+0','-1+0'}, - },--I2 - nil,--O1 - } - TRS.centerDisp[6]=false - TRS.centerDisp[18]=false - TRS[2]= reflect(TRS[1])--SZ - TRS[4]= reflect(TRS[3])--LJ - TRS[9]= reflect(TRS[8])--S5Z5 - TRS[11]=reflect(TRS[10])--PQ - TRS[13]=reflect(TRS[12])--FE - TRS[20]=reflect(TRS[19])--L5J5 - TRS[22]=reflect(TRS[21])--RY - TRS[24]=reflect(TRS[23])--NH - centroSymSet(TRS[8])centroSymSet(TRS[9])--S5Z5 - centroSymSet(TRS[25])centroSymSet(TRS[26])--I5I3 - for i=1,29 do collectSet(TRS[i])end - pushZero(TRS) -end - -local SRS -do - SRS={ - { - [01]={'-1+0','-1+1','+0-2','-1-2'}, - [10]={'+1+0','+1-1','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2'}, - [12]={'+1+0','+1-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','+0-2','+1-2'}, - [02]={},[20]={},[13]={},[31]={}, - },--Z - false,--S - false,--J - false,--L - false,--T - noKickSet,--O - { - [01]={'-2+0','+1+0','-2-1','+1+2'}, - [10]={'+2+0','-1+0','+2+1','-1-2'}, - [12]={'-1+0','+2+0','-1+2','+2-1'}, - [21]={'+1+0','-2+0','+1-2','-2+1'}, - [23]={'+2+0','-1+0','+2+1','-1-2'}, - [32]={'-2+0','+1+0','-2-1','+1+2'}, - [30]={'+1+0','-2+0','+1-2','-2+1'}, - [03]={'-1+0','+2+0','-1+2','+2-1'}, - [02]={},[20]={},[13]={},[31]={}, - }--I - } - collectSet(SRS[1]) - collectSet(SRS[7]) - pushZero(SRS) - for i=2,5 do SRS[i]=SRS[1]end - for i=8,29 do SRS[i]=SRS[1]end -end - -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'} - local F=vecStrConv{'+0+0','+0-1','+0+1','+0+2'} - local list={ - {[02]=L,[20]=R,[13]=R,[31]=L},--Z - {[02]=R,[20]=L,[13]=L,[31]=R},--S - {[02]=L,[20]=R,[13]=L,[31]=R},--J - {[02]=R,[20]=L,[13]=L,[31]=R},--L - {[02]=F,[20]=F,[13]=L,[31]=R},--T - {[02]=F,[20]=F,[13]=F,[31]=F},--O - {[02]=F,[20]=F,[13]=R,[31]=L},--I - - {[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 - {[02]=L,[20]=R,[13]=R,[31]=L},--E - {[02]=F,[20]=F,[13]=L,[31]=R},--T5 - {[02]=F,[20]=F,[13]=L,[31]=R},--U - {[02]=R,[20]=L,[13]=L,[31]=R},--V - {[02]=R,[20]=L,[13]=L,[31]=R},--W - {[02]=F,[20]=F,[13]=F,[31]=F},--X - {[02]=L,[20]=R,[13]=R,[31]=L},--J5 - {[02]=R,[20]=L,[13]=L,[31]=R},--L5 - {[02]=L,[20]=R,[13]=R,[31]=L},--R - {[02]=R,[20]=L,[13]=L,[31]=R},--Y - {[02]=L,[20]=R,[13]=R,[31]=L},--N - {[02]=R,[20]=L,[13]=L,[31]=R},--H - {[02]=F,[20]=F,[13]=F,[31]=F},--I5 - - {[02]=F,[20]=F,[13]=F,[31]=F},--I3 - {[02]=R,[20]=L,[13]=L,[31]=R},--C - {[02]=F,[20]=F,[13]=R,[31]=L},--I2 - {[02]=F,[20]=F,[13]=F,[31]=F},--O1 - } - for i=1,29 do - local a,b=R,L - if i==6 or i==18 then a,b=b,a end - 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 - 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] - local icb=BLOCKS[C.id][idir] - local isc=SCS[C.id][idir] - local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1] - local dx,dy=0,0 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 - end - while true do - for test=1,#kickList do - local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy - if - dx*fdx>=0 and - fdx^2+fdy^2<=5 and - (P.freshTime>0 or fdy<=0) - then - 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() - end - P.curX,P.curY,C.dir=x,y,idir - C.sc,C.bk=isc,icb - P.spinLast=test==2 and 0 or 1 - - local t=P.freshTime - if not ifpre then - P:freshBlock('move') - end - if fdy>0 and P.freshTime==t and P.curY~=P.imgY then - P.freshTime=P.freshTime-1 - end - - if P.sound then - local sfx - if ifpre then - sfx='prerotate' - elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then - sfx='rotatekick' - if P.gameEnv.shakeFX then - if d==1 or d==3 then - P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3 - else - P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3 - end - end - else - sfx='rotate' - end - SFX.play(sfx,nil,P:getCenterX()*.15) - end - P.stat.rotate=P.stat.rotate+1 - return - end - end - end - - --Try release left/right, then softdrop, failed to rotate otherwise - if dx~=0 then - dx=0 - elseif dy~=0 then - dy=0 - else - return - end - end - end,29) -end - -local ASC -do - local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} - local R=flipList(L) - local F={"+0+0"} - vecStrConv(L)vecStrConv(R)vecStrConv(F) - ASC={ - { - [01]=R,[10]=L,[03]=L,[30]=R, - [12]=R,[21]=L,[32]=L,[23]=R, - [02]=F,[20]=F,[13]=F,[31]=F, - } - } - for i=2,29 do ASC[i]=ASC[1]end -end - -local ASC_plus -do - local L={"+0+0","+1+0","+0-1","+1-1","+0-2","+1-2","+2+0","+2-1","+2-2","-1+0","-1-1","+0+1","+1+1","+2+1","-1-2","-2+0","+0+2","+1+2","+2+2","-2-1","-2-2"} - local R=flipList(L) - local F={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","+0-2","-1-2","+1-2","-2+0","+2+0","-2-1","+2-1","-2+1","+2+1","+0+2","-1+2","+1+2"} - vecStrConv(L)vecStrConv(R)vecStrConv(F) - ASC_plus={ - { - [01]=R,[12]=R,[23]=R,[30]=R, - [10]=L,[21]=L,[32]=L,[03]=L, - [02]=F,[20]=F,[13]=F,[31]=F, - } - } - for i=2,29 do ASC_plus[i]=ASC_plus[1]end -end - -local C2 -do - local L=vecStrConv{'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} - C2={ - { - [01]=L,[10]=L,[12]=L,[21]=L, - [23]=L,[32]=L,[30]=L,[03]=L, - [02]=L,[20]=L,[13]=L,[31]=L, - } - } - for i=2,29 do C2[i]=C2[1]end -end - -local C2_sym -do - local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} - local R={'+0+0','+1+0','-1+0','+0-1','+1-1','-1-1','+2+0','-2+0'} - - local Z={ - [01]=R,[10]=L,[03]=L,[30]=R, - [12]=R,[21]=L,[32]=L,[23]=R, - [02]=R,[20]=L,[13]=L,[31]=R, - } - local S=reflect(Z) - collectSet(Z) - collectSet(S) - - C2_sym={ - Z,S,--Z,S - Z,S,--J,L - Z,--T - noKickSet,--O - Z,--I - - Z,S,--Z5,S5 - Z,S,--P,Q - Z,S,--F,E - Z,Z,Z,Z,--T5,U,V,W - noKickSet,--X - Z,S,--J5,L5 - Z,S,--R,Y - Z,S,--N,H - Z,--I5 - - Z,Z,--I3,C - Z,Z,--I2,O1 - } -end - -local None={} -for i=1,29 do None[i]=noKickSet_180 end - -local None_plus={} -for i=1,29 do None_plus[i]=noKickSet end - -local RS={ - TRS=TRS, - SRS=SRS, - BiRS=BiRS, - ASC=ASC, - ASC_plus=ASC_plus, - C2=C2, - C2_sym=C2_sym, - None=None, - None_plus=None_plus, -} - -for _,v in next,RS do - if not v.centerDisp then - v.centerDisp=TABLE.new(true,29) - end -end - -return RS \ No newline at end of file diff --git a/parts/list.lua b/parts/list.lua index 3612b4c8..04ed0617 100644 --- a/parts/list.lua +++ b/parts/list.lua @@ -177,7 +177,7 @@ end do--BLOCKS local O,_=true,false BLOCKS={ - --Tetramino + --Tetromino {{_,O,O},{O,O,_}}, --Z {{O,O,_},{_,O,O}}, --S {{O,O,O},{O,_,_}}, --J @@ -236,54 +236,6 @@ do--BLOCKS end end end -do--SCS(spinCenters) - local N1,N2,N3,N4={0,1},{1,0},{1,1},{.5,.5} - local I1,I2,I3,I4={-.5,1.5},{1.5,-.5},{.5,1.5},{1.5,.5} - local V4={1.5,1.5} - local L1,L2={0,2},{2,0} - local S1,S2={-.5,.5},{.5,-.5} - local D={0,0} - SCS={ - --Tetramino - {[0]=N1,N2,N3,N3},--Z - {[0]=N1,N2,N3,N3},--S - {[0]=N1,N2,N3,N3},--L - {[0]=N1,N2,N3,N3},--J - {[0]=N1,N2,N3,N3},--T - {[0]=N4,N4,N4,N4},--O - {[0]=I1,I2,I3,I4},--I - - --Pentomino - {[0]=N3,N3,N3,N3},--Z5 - {[0]=N3,N3,N3,N3},--S5 - {[0]=N1,N2,N3,N3},--P - {[0]=N1,N2,N3,N3},--Q - {[0]=N3,N3,N3,N3},--F - {[0]=N3,N3,N3,N3},--E - {[0]=N3,N3,N3,N3},--T5 - {[0]=N1,N2,N3,N3},--U - {[0]=I3,N4,I4,V4},--V - {[0]=N3,N3,N3,N3},--W - {[0]=N3,N3,N3,N3},--X - {[0]=I3,I4,I3,I4},--J5 - {[0]=I3,I4,I3,I4},--L5 - {[0]=I3,I4,I3,I4},--R - {[0]=I3,I4,I3,I4},--Y - {[0]=I3,I4,I3,I4},--N - {[0]=I3,I4,I3,I4},--H - {[0]=L1,L2,L1,L2},--I5 - - --Trimino - {[0]=N1,N2,N1,N2},--I3 - {[0]=N4,N4,N4,N4},--C - - --Domino - {[0]=S1,S2,N4,N4},--I2 - - --Dot - {[0]=D,D,D,D},--O1 - } -end oldModeNameTable={ attacker_hard="attacker_h", attacker_ultimate="attacker_u", diff --git a/parts/player/player.lua b/parts/player/player.lua index 650ab89c..a0a3fb3f 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -12,7 +12,6 @@ local SFX,BGM,VOC,VIB,SYSFX=SFX,BGM,VOC,VIB,SYSFX local FREEROW,TABLE,TEXT,NET,TASK=FREEROW,TABLE,TEXT,NET,TASK local PLAYERS,PLY_ALIVE,GAME=PLAYERS,PLY_ALIVE,GAME -local kickList=require"parts.kickList" local ply_draw=require"parts.player.draw" local ply_update=require"parts.player.update" @@ -229,7 +228,7 @@ function Player:setInvisible(time)--Time in frames end end function Player:setRS(RSname) - self.RS=kickList[RSname]or kickList.TRS + self.RS=RSlist[RSname]or RSlist.TRS end function Player:getHolePos()--Get a good garbage-line hole position @@ -668,7 +667,7 @@ end function Player:spin(d,ifpre) local cur=self.cur - local kickData=self.RS[cur.id] + local kickData=self.RS.kickTable[cur.id] if type(kickData)=='table'then local idir=(cur.dir+d)%4 kickData=kickData[cur.dir*10+idir] @@ -678,7 +677,7 @@ function Player:spin(d,ifpre) return end local icb=BLOCKS[cur.id][idir] - local isc=SCS[cur.id][idir] + local isc=self.RS.centerPos[cur.id][idir] local ix,iy=self.curX+cur.sc[2]-isc[2],self.curY+cur.sc[1]-isc[1] for test=1,#kickData do local x,y=ix+kickData[test][1],iy+kickData[test][2] @@ -831,7 +830,7 @@ function Player:getBlock(id,name,color)--Get a block(id=n) object id=id, dir=dir, bk=BLOCKS[id][dir], - sc=SCS[id][dir], + sc=self.RS.centerPos[id][dir], name=name or id, color=E.bone and 17 or color or E.skin[id], } @@ -842,7 +841,7 @@ function Player:getNext(n)--Push a block(id=n) to nextQueue ins(self.nextQueue,{ id=n, bk=BLOCKS[n][dir], - sc=SCS[n][dir], + sc=self.RS.centerPos[n][dir], dir=dir, name=n, color=E.bone and 17 or E.skin[n], diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 526056d6..0de88c01 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -175,7 +175,7 @@ function scene.draw() local r=TIME()*2 local R=int(r)%7+1 gc.setColor(1,1,1,1-abs(r%1*2-1)) - gc.draw(TEXTURE.miniBlock[R],785,140,TIME()*10%6.2832,15,15,SCS[R][0][2]+.5,#BLOCKS[R][0]-SCS[R][0][1]-.5) + gc.draw(TEXTURE.miniBlock[R],785,140,TIME()*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) end end diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 1eb8f10e..61c67162 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -29,7 +29,7 @@ function scene.draw() gc.rotate(minoRot[n]+sin(t*3-n*.5)*.08) local color=SETTING.skin[n] local B=BLOCKS[n][0] - local x,y=-45-SCS[n][0][2]*30,15+SCS[n][0][1]*30 + local x,y=-45-DSCP[n][0][2]*30,15+DSCP[n][0][1]*30 local col=#B[1] for i=1,#B do for j=1,col do if B[i][j]then diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 564d2efa..25ef86aa 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -97,8 +97,8 @@ function scene.draw() local r=t*2 local R=int(r)%7+1 gc_setColor(1,1,1,1-abs(r%1*2-1)) - gc_draw(TEXTURE.miniBlock[R],680,50,t*10%6.2832,15,15,SCS[R][0][2]+.5,#BLOCKS[R][0]-SCS[R][0][1]-.5) - gc_draw(TEXTURE.miniBlock[R],680,300,0,15,15,SCS[R][0][2]+.5,#BLOCKS[R][0]-SCS[R][0][1]-.5) + gc_draw(TEXTURE.miniBlock[R],680,50,t*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) + gc_draw(TEXTURE.miniBlock[R],680,300,0,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) end scene.widgetList={ From eb7b637703ca70efe7afcac4b7988cf15abb7f9d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 00:13:57 +0800 Subject: [PATCH 54/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Classic=E5=92=8CClassic?= =?UTF-8?q?=5Fplus=E6=97=8B=E8=BD=AC=E7=B3=BB=E7=BB=9F=20close=20#173?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/RSlist.lua | 26 ++++++++++++++++++++++++++ parts/scenes/setting_game.lua | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/parts/RSlist.lua b/parts/RSlist.lua index 01270a84..6102fe59 100644 --- a/parts/RSlist.lua +++ b/parts/RSlist.lua @@ -672,6 +672,30 @@ do } end +local Classic do + local centerPos=TABLE.shift(defaultCenterPos,0) + centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} + Classic={ + centerDisp=TABLE.new(false,29), + centerPos=centerPos, + kickTable=TABLE.new(noKickSet,29) + } +end + +local Classic_plus do + local centerPos=TABLE.shift(defaultCenterPos,0) + centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} + Classic_plus={ + centerDisp=TABLE.new(false,29), + centerPos=centerPos, + kickTable=TABLE.new(noKickSet_180,29) + } +end + local None={kickTable=TABLE.new(noKickSet_180,29)} local None_plus={kickTable=TABLE.new(noKickSet,29)} @@ -684,6 +708,8 @@ local RSlist={ ASC_plus=ASC_plus, C2=C2, C2_sym=C2_sym, + Classic=Classic, + Classic_plus=Classic_plus, None=None, None_plus=None_plus, } diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index e31d166c..9f80d719 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -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','BiRS','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','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},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")}, From 78b15b78fa28c373f428809099c0963165ca82e0 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 01:15:04 +0800 Subject: [PATCH 55/70] =?UTF-8?q?=E6=AF=8F=E4=B8=AA=E6=97=8B=E8=BD=AC?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=9C=89=E8=87=AA=E5=B7=B1=E7=8B=AC=E7=89=B9?= =?UTF-8?q?=E7=9A=84=E6=97=8B=E8=BD=AC=E4=B8=AD=E5=BF=83=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=20=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/RSlist.lua | 661 +++++++++++++++++++++++------------------- parts/player/draw.lua | 16 +- 2 files changed, 367 insertions(+), 310 deletions(-) diff --git a/parts/RSlist.lua b/parts/RSlist.lua index 6102fe59..dd84c079 100644 --- a/parts/RSlist.lua +++ b/parts/RSlist.lua @@ -1,4 +1,5 @@ -local defaultCenterPos={ +local defaultCenterTex=GC.DO{1,1}--No texture +local defaultCenterPos={--For SRS-like RSs --Tetromino {[0]={0,1},{1,0},{1,1},{1,1}},--Z {[0]={0,1},{1,0},{1,1},{1,1}},--S @@ -41,21 +42,16 @@ local defaultCenterPos={ local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end -local noKickSet,noKickSet_180,pushZero do +local noKickSet,noKickSet_180 do local Zero={map[0][0]} noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} - function pushZero(t) - for _,set in next,t do - if type(set)=='table'then - for _,R in next,set do - if not R[1]or type(R[1])=='string'and R[1]~='+0+0'then - table.insert(R,1,'+0+0') - end - end - end - end +end +local function strToVec(list) + for i,vecStr in next,list do + list[i]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))] end + return list end --Use this if the block is centrosymmetry, *PTR!!! @@ -116,51 +112,62 @@ do {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, } TRS={ + centerTex=GC.DO{10,10, + {'clear',1,1,1,.2}, + {'setCL',1,1,1,.4}, + {'fRect',1,1,8,8}, + {'setCL',1,1,1,.6}, + {'fRect',2,2,6,6}, + {'setCL',1,1,1,.8}, + {'fRect',3,3,4,4}, + {'setCL',1,1,1}, + {'fRect',4,4,2,2}, + }, centerDisp=TABLE.new(true,29), kickTable={ { - [01]={'-1+0','-1+1','+0-2','-1+2','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1-2','+1-2'}, - [03]={'+1+0','+1+1','+0-2','+1-1','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+1+0','+1-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','+0-2','+1-2'}, - [02]={'+1+0','-1+0','+0-1','+0+1'}, - [20]={'-1+0','+1+0','+0+1','+0-1'}, - [13]={'+0-1','+0+1','+0-2'}, - [31]={'+0+1','+0-1','+0+2'}, + [01]={'+0+0','-1+0','-1+1','+0-2','-1+2','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1-2','+1-2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-1','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, + [20]={'+0+0','-1+0','+1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+0-2'}, + [31]={'+0+0','+0+1','+0-1','+0+2'}, },--Z false,--S { - [01]={'-1+0','-1+1','+1+0','+0-2','+1+1'}, - [10]={'+1+0','+1-1','-1+0','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, - [12]={'+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, - [23]={'+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, - [02]={'-1+0','+1+0','+0-1','+0+1'}, - [20]={'+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0-1','+0+1','+1+0'}, - [31]={'+0+1','+0-1','-1+0'}, + [01]={'+0+0','-1+0','-1+1','+1+0','+0-2','+1+1'}, + [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, + [12]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, + [23]={'+0+0','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0'}, + [31]={'+0+0','+0+1','+0-1','-1+0'}, },--J false,--L { - [01]={'-1+0','-1+1','+0-2','-1-2','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1+2','+0-1'}, - [03]={'+1+0','+1+1','+0-2','+1-2','+0+1'}, - [30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, - [21]={'-1+0','+0-2','-1-2','-1-1','+1+1'}, - [32]={'-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, - [23]={'+1+0','+0-2','+1-2','+1-1','-1+1'}, - [02]={'-1+0','+1+0','+0+1'}, - [20]={'+1+0','-1+0','+0-1'}, - [13]={'+0-1','+0+1','+1+0','+0-2','+0+2'}, - [31]={'+0-1','+0+1','-1+0','+0-2','+0+2'}, + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+0+1'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, + [21]={'+0+0','-1+0','+0-2','-1-2','-1-1','+1+1'}, + [32]={'+0+0','-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, + [23]={'+0+0','+1+0','+0-2','+1-2','+1-1','-1+1'}, + [02]={'+0+0','-1+0','+1+0','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0','+0-2','+0+2'}, + [31]={'+0+0','+0-1','+0+1','-1+0','+0-2','+0+2'}, },--T function(P,d) if P.gameEnv.easyFresh then @@ -207,111 +214,111 @@ do end end,--O { - [01]={'+0+1','+1+0','-2+0','-2-1','+1+2'}, - [10]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, - [03]={'+0+1','-1+0','+2+0','+2-1','-1+2'}, - [30]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, - [12]={'-1+0','+2+0','+2-1','+0-1','-1+2'}, - [21]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, - [32]={'+1+0','-2+0','-2-1','+0-1','+1+2'}, - [23]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, - [02]={'-1+0','+1+0','+0-1','+0+1'}, - [20]={'+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0-1','+1+0','-1+0','+0+1'}, + [01]={'+0+0','+0+1','+1+0','-2+0','-2-1','+1+2'}, + [10]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, + [03]={'+0+0','+0+1','-1+0','+2+0','+2-1','-1+2'}, + [30]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, + [12]={'+0+0','-1+0','+2+0','+2-1','+0-1','-1+2'}, + [21]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, + [32]={'+0+0','+1+0','-2+0','-2-1','+0-1','+1+2'}, + [23]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'}, },--I { - [01]={'+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, - [10]={'+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, - [03]={'+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, - [30]={'-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, + [01]={'+0+0','+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, + [10]={'+0+0','+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, + [03]={'+0+0','+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, + [30]={'+0+0','-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, },--Z5 false,--S5 { - [01]={'-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, - [10]={'+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2'}, - [12]={'+1+0','+1-1','+0+2','+1+2','+1+1'}, - [21]={'-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, - [32]={'-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','-1+0','+0-2','+1-2'}, - [02]={'-1+0','+0-1','+0+1'}, - [20]={'+1+0','+0+1','+0-1'}, - [13]={'+1+0','+0+1','-1+0'}, - [31]={'-1+0','+0-1','+1+0'}, + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2','+1+1'}, + [21]={'+0+0','-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, + [32]={'+0+0','-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','-1+0','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','+0+1','+0-1'}, + [13]={'+0+0','+1+0','+0+1','-1+0'}, + [31]={'+0+0','-1+0','+0-1','+1+0'}, },--P false,--Q { - [01]={'-1+0','+1+0','-1+1','+0-2','+0-3'}, - [10]={'+1+0','+1-1','-1+0','+0+2','+0+3'}, - [03]={'+1+0','+1-1','+0+1','+0-2','+0-3'}, - [30]={'-1+1','+1+0','+0-1','+0+2','+0+3'}, - [12]={'+1+0','+0-1','-1+0','+0+2'}, - [21]={'-1+0','+0+1','+1+0','+0-2'}, - [32]={'-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, - [23]={'+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, - [02]={'+1+0','-1+0','-1-1'}, - [20]={'-1+0','+1+0','+1+1'}, - [13]={'+0-1','-1+1','+0+1'}, - [31]={'+0-1','+1-1','+0+1'}, + [01]={'+0+0','-1+0','+1+0','-1+1','+0-2','+0-3'}, + [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+0+3'}, + [03]={'+0+0','+1+0','+1-1','+0+1','+0-2','+0-3'}, + [30]={'+0+0','-1+1','+1+0','+0-1','+0+2','+0+3'}, + [12]={'+0+0','+1+0','+0-1','-1+0','+0+2'}, + [21]={'+0+0','-1+0','+0+1','+1+0','+0-2'}, + [32]={'+0+0','-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, + [23]={'+0+0','+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, + [02]={'+0+0','+1+0','-1+0','-1-1'}, + [20]={'+0+0','-1+0','+1+0','+1+1'}, + [13]={'+0+0','+0-1','-1+1','+0+1'}, + [31]={'+0+0','+0-1','+1-1','+0+1'}, },--F false,--E { - [01]={'+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, - [10]={'+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, - [03]={'+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, - [30]={'-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, - [12]={'+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, - [21]={'+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, - [32]={'-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, - [23]={'-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, - [02]={'+0-1','+0+1','+0+2'}, - [20]={'+0-1','+0+1','+0-2'}, - [13]={'+1+0','-1+1','-2+0'}, - [31]={'-1+0','+1+1','+2+0'}, + [01]={'+0+0','+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, + [10]={'+0+0','+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, + [03]={'+0+0','+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, + [30]={'+0+0','-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, + [12]={'+0+0','+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, + [21]={'+0+0','+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, + [32]={'+0+0','-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, + [23]={'+0+0','-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, + [02]={'+0+0','+0-1','+0+1','+0+2'}, + [20]={'+0+0','+0-1','+0+1','+0-2'}, + [13]={'+0+0','+1+0','-1+1','-2+0'}, + [31]={'+0+0','-1+0','+1+1','+2+0'}, },--T5 { - [01]={'-1+0','-1+1','+0-2','-1-2'}, - [10]={'+1+0','+1-1','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0-2','-1+2'}, - [12]={'+1+0','+1-1','+1+1'}, - [21]={'-1-1','-1+1','-1-1'}, - [32]={'-1+0','-1-1','-1+1'}, - [23]={'+1-1','+1+1','+1-1'}, - [02]={'+0+1'}, - [20]={'+0-1'}, - [13]={'+0-1','+0+1','+1+0'}, - [31]={'+0-1','+0+1','-1+0'}, + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0-2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+1+1'}, + [21]={'+0+0','-1-1','-1+1','-1-1'}, + [32]={'+0+0','-1+0','-1-1','-1+1'}, + [23]={'+0+0','+1-1','+1+1','+1-1'}, + [02]={'+0+0','+0+1'}, + [20]={'+0+0','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0'}, + [31]={'+0+0','+0-1','+0+1','-1+0'}, },--U { - [01]={'+0+1','-1+0','+0-2','-1-2'}, - [10]={'+0+1','+1+0','+0-2','+1-2'}, - [03]={'+0-1','+0+1','+0+2'}, - [30]={'+0-1','+0+1','+0-2'}, - [12]={'+0-1','+0+1'}, - [21]={'+0-1','+0-2'}, - [32]={'+1+0','-1+0'}, - [23]={'-1+0','+1+0'}, - [02]={'-1+1','+1-1'}, - [20]={'+1-1','-1+1'}, - [13]={'+1+1','-1-1'}, - [31]={'-1-1','+1+1'}, + [01]={'+0+0','+0+1','-1+0','+0-2','-1-2'}, + [10]={'+0+0','+0+1','+1+0','+0-2','+1-2'}, + [03]={'+0+0','+0-1','+0+1','+0+2'}, + [30]={'+0+0','+0-1','+0+1','+0-2'}, + [12]={'+0+0','+0-1','+0+1'}, + [21]={'+0+0','+0-1','+0-2'}, + [32]={'+0+0','+1+0','-1+0'}, + [23]={'+0+0','-1+0','+1+0'}, + [02]={'+0+0','-1+1','+1-1'}, + [20]={'+0+0','+1-1','-1+1'}, + [13]={'+0+0','+1+1','-1-1'}, + [31]={'+0+0','-1-1','+1+1'}, },--V { - [01]={'+0-1','-1+0','+1+0','+1-1','+0+2'}, - [10]={'+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, - [03]={'+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, - [30]={'-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, - [12]={'+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, - [21]={'-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, - [32]={'+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, - [23]={'+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, - [02]={'+0-1','-1+0'}, - [20]={'+0+1','+1+0'}, - [13]={'+0+1','-1+0'}, - [31]={'+0-1','+1+0'}, + [01]={'+0+0','+0-1','-1+0','+1+0','+1-1','+0+2'}, + [10]={'+0+0','+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, + [03]={'+0+0','+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, + [30]={'+0+0','-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, + [12]={'+0+0','+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, + [21]={'+0+0','-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, + [32]={'+0+0','+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, + [23]={'+0+0','+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, + [02]={'+0+0','+0-1','-1+0'}, + [20]={'+0+0','+0+1','+1+0'}, + [13]={'+0+0','+0+1','-1+0'}, + [31]={'+0+0','+0-1','+1+0'}, },--W function(P,d) if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end @@ -329,89 +336,89 @@ do P:freshBlock('fresh') end,--X { - [01]={'-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, - [10]={'-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, - [03]={'+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0-1','+1-1','-1+0','+2-1'}, - [20]={'+0+1','-1+1','+1+0','-2+1'}, - [13]={'-1+0','-1-1','+0+1','-1-2'}, - [31]={'+1+0','+1+1','+0-1','+1+2'}, + [01]={'+0+0','-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, + [10]={'+0+0','-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, + [03]={'+0+0','+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0+0','+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0+0','+0-1','+1-1','-1+0','+2-1'}, + [20]={'+0+0','+0+1','-1+1','+1+0','-2+1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, },--J5 false,--L5 { - [01]={'-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, - [10]={'-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, - [03]={'+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0-1','+1-1','-1+0','+2-1','+0+1'}, - [20]={'+0+1','-1+1','+1+0','-2+1','+0-1'}, - [13]={'-1+0','-1-1','+0+1','-1-2'}, - [31]={'+1+0','+1+1','+0-1','+1+2'}, + [01]={'+0+0','-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, + [10]={'+0+0','-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, + [03]={'+0+0','+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0+0','+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'+0+0','+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+0+0','+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0+0','+0-1','+1-1','-1+0','+2-1','+0+1'}, + [20]={'+0+0','+0+1','-1+1','+1+0','-2+1','+0-1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, },--R false,--Y { - [01]={'-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, - [10]={'+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, - [03]={'-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [30]={'-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [12]={'-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [21]={'-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [32]={'-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, - [23]={'+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, - [02]={'-1+0','+0+2','+0-1'}, - [20]={'+1+0','+0-2','+0+1'}, - [13]={'-1+0','-1-1','+0+1','+1+2'}, - [31]={'+1+0','+1+1','+0-1','-1-2'}, + [01]={'+0+0','-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, + [10]={'+0+0','+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, + [03]={'+0+0','-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [30]={'+0+0','-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [12]={'+0+0','-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [21]={'+0+0','-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [32]={'+0+0','-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, + [23]={'+0+0','+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, + [02]={'+0+0','-1+0','+0+2','+0-1'}, + [20]={'+0+0','+1+0','+0-2','+0+1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','+1+2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','-1-2'}, },--N false,--H { - [01]={'+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, - [10]={'-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, - [03]={'-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, - [30]={'+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, + [01]={'+0+0','+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, + [10]={'+0+0','-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, + [03]={'+0+0','-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, + [30]={'+0+0','+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, },--I5 { - [01]={'-1+0','-1-1','+1+1','-1+1'}, - [10]={'-1+0','+1+0','-1-1','+1+1'}, - [03]={'+1+0','+1-1','-1+1','+1+1'}, - [30]={'+1+0','-1+0','+1-1','-1+1'}, + [01]={'+0+0','-1+0','-1-1','+1+1','-1+1'}, + [10]={'+0+0','-1+0','+1+0','-1-1','+1+1'}, + [03]={'+0+0','+1+0','+1-1','-1+1','+1+1'}, + [30]={'+0+0','+1+0','-1+0','+1-1','-1+1'}, },--I3 { - [01]={'-1+0','+1+0'}, - [10]={'+1+0','-1+0'}, - [03]={'+0+1','+0-1'}, - [30]={'+0-1','+0+1'}, - [12]={'+0+1','+0-1'}, - [21]={'+0-1','+0+1'}, - [32]={'-1+0','+1+0'}, - [23]={'+1+0','-1+0'}, - [02]={'+0-1','+1-1','-1-1'}, - [20]={'+0+1','-1+1','+1+1'}, - [13]={'+0-1','-1-1','+1-1'}, - [31]={'+0+1','+1+1','-1+1'}, + [01]={'+0+0','-1+0','+1+0'}, + [10]={'+0+0','+1+0','-1+0'}, + [03]={'+0+0','+0+1','+0-1'}, + [30]={'+0+0','+0-1','+0+1'}, + [12]={'+0+0','+0+1','+0-1'}, + [21]={'+0+0','+0-1','+0+1'}, + [32]={'+0+0','-1+0','+1+0'}, + [23]={'+0+0','+1+0','-1+0'}, + [02]={'+0+0','+0-1','+1-1','-1-1'}, + [20]={'+0+0','+0+1','-1+1','+1+1'}, + [13]={'+0+0','+0-1','-1-1','+1-1'}, + [31]={'+0+0','+0+1','+1+1','-1+1'}, },--C { - [01]={'-1+0','+0+1'}, - [10]={'+1+0','+0+1'}, - [03]={'+1+0','+0+1'}, - [30]={'-1+0','+0+1'}, - [12]={'+1+0','+0+2'}, - [21]={'+0-1','-1+0'}, - [32]={'-1+0','+0+2'}, - [23]={'+0-1','-1+0'}, - [02]={'+0-1','+0+1'}, - [20]={'+0+1','+0-1'}, - [13]={'-1+0','+1+0'}, - [31]={'+1+0','-1+0'}, + [01]={'+0+0','-1+0','+0+1'}, + [10]={'+0+0','+1+0','+0+1'}, + [03]={'+0+0','+1+0','+0+1'}, + [30]={'+0+0','-1+0','+0+1'}, + [12]={'+0+0','+1+0','+0+2'}, + [21]={'+0+0','+0-1','-1+0'}, + [32]={'+0+0','-1+0','+0+2'}, + [23]={'+0+0','+0-1','-1+0'}, + [02]={'+0+0','+0-1','+0+1'}, + [20]={'+0+0','+0+1','+0-1'}, + [13]={'+0+0','-1+0','+1+0'}, + [31]={'+0+0','+1+0','-1+0'}, },--I2 nil,--O1 } @@ -428,22 +435,31 @@ do TRS.kickTable[24]=reflect(TRS.kickTable[23])--NH centroSymSet(TRS.kickTable[8])centroSymSet(TRS.kickTable[9])--S5Z5 centroSymSet(TRS.kickTable[25])centroSymSet(TRS.kickTable[26])--I5I3 - pushZero(TRS.kickTable) end local SRS do SRS={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.2}, + {'fCirc',5,5,5}, + {'setCL',1,1,1,.6}, + {'fCirc',5,5,4}, + {'setCL',1,1,1,.8}, + {'fCirc',5,5,3}, + {'setCL',1,1,1}, + {'fCirc',5,5,2}, + }, kickTable={ { - [01]={'-1+0','-1+1','+0-2','-1-2'}, - [10]={'+1+0','+1-1','+0+2','+1+2'}, - [03]={'+1+0','+1+1','+0-2','+1-2'}, - [30]={'-1+0','-1-1','+0+2','-1+2'}, - [12]={'+1+0','+1-1','+0+2','+1+2'}, - [21]={'-1+0','-1+1','+0-2','-1-2'}, - [32]={'-1+0','-1-1','+0+2','-1+2'}, - [23]={'+1+0','+1+1','+0-2','+1-2'}, + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, [02]={},[20]={},[13]={},[31]={}, },--Z false,--S @@ -452,28 +468,27 @@ do false,--T noKickSet,--O { - [01]={'-2+0','+1+0','-2-1','+1+2'}, - [10]={'+2+0','-1+0','+2+1','-1-2'}, - [12]={'-1+0','+2+0','-1+2','+2-1'}, - [21]={'+1+0','-2+0','+1-2','-2+1'}, - [23]={'+2+0','-1+0','+2+1','-1-2'}, - [32]={'-2+0','+1+0','-2-1','+1+2'}, - [30]={'+1+0','-2+0','+1-2','-2+1'}, - [03]={'-1+0','+2+0','-1+2','+2-1'}, + [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, + [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, [02]={},[20]={},[13]={},[31]={}, }--I } } - pushZero(SRS.kickTable) for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end end local BiRS do - local R={'+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={'+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 F={'+0+0','+0-1','+0+1','+0+2'} + local R=strToVec{'+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=strToVec{'+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 F=strToVec{'+0+0','+0-1','+0+1','+0+2'} local list={ {[02]=L,[20]=R,[13]=R,[31]=L},--Z {[02]=R,[20]=L,[13]=L,[31]=R},--S @@ -513,79 +528,89 @@ 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 - BiRS={} - BiRS.kickTable=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] - local icb=BLOCKS[C.id][idir] - local isc=defaultCenterPos[C.id][idir] - local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1] - local dx,dy=0,0 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 - end - while true do - for test=1,#kickList do - local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy - if - dx*fdx>=0 and - fdx^2+fdy^2<=5 and - (P.freshTime>0 or fdy<=0) - then - 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() - end - P.curX,P.curY,C.dir=x,y,idir - C.sc,C.bk=isc,icb - P.spinLast=test==2 and 0 or 1 - - local t=P.freshTime - if not ifpre then - P:freshBlock('move') - end - if fdy>0 and P.freshTime==t and P.curY~=P.imgY then - P.freshTime=P.freshTime-1 - end - - if P.sound then - local sfx - if ifpre then - sfx='prerotate' - elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then - sfx='rotatekick' - if P.gameEnv.shakeFX then - if d==1 or d==3 then - P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3 - else - P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3 - end - end - else - sfx='rotate' + BiRS={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.6}, + {'fRect',0,3,10,4}, + {'fRect',3,0,4,10}, + {'setCL',1,1,1}, + {'fRect',1,4,8,2}, + {'fRect',4,1,2,8}, + {'fRect',3,3,4,4}, + }, + kickTable=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] + local icb=BLOCKS[C.id][idir] + local isc=defaultCenterPos[C.id][idir] + local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1] + local dx,dy=0,0 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 + end + while true do + for test=1,#kickList do + local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy + if + dx*fdx>=0 and + fdx^2+fdy^2<=5 and + (P.freshTime>0 or fdy<=0) + then + 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() end - SFX.play(sfx,nil,P:getCenterX()*.15) + P.curX,P.curY,C.dir=x,y,idir + C.sc,C.bk=isc,icb + P.spinLast=test==2 and 0 or 1 + + local t=P.freshTime + if not ifpre then + P:freshBlock('move') + end + if fdy>0 and P.freshTime==t and P.curY~=P.imgY then + P.freshTime=P.freshTime-1 + end + + if P.sound then + local sfx + if ifpre then + sfx='prerotate' + elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then + sfx='rotatekick' + if P.gameEnv.shakeFX then + if d==1 or d==3 then + P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3 + else + P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3 + end + end + else + sfx='rotate' + end + SFX.play(sfx,nil,P:getCenterX()*.15) + end + P.stat.rotate=P.stat.rotate+1 + return end - P.stat.rotate=P.stat.rotate+1 - return end end - end - --Try release left/right, then softdrop, failed to rotate otherwise - if dx~=0 then - dx=0 - elseif dy~=0 then - dy=0 - else - return + --Try release left/right, then softdrop, failed to rotate otherwise + if dx~=0 then + dx=0 + elseif dy~=0 then + dy=0 + else + return + end end - end - end,29) + end,29) + } end local ASC @@ -597,6 +622,16 @@ do centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} ASC={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.7}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'setLW',1}, + {'setCL',1,1,1}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + }, centerPos=centerPos, kickTable=TABLE.new({ [01]=R,[10]=L,[03]=L,[30]=R, @@ -615,6 +650,17 @@ do centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} ASC_plus={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.7}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'setLW',1}, + {'setCL',1,1,1}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'fCirc',5,5,3}, + }, centerPos=centerPos, kickTable=TABLE.new({ [01]=R,[12]=R,[23]=R,[30]=R, @@ -628,6 +674,10 @@ local C2 do local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} C2={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'dRect',2,2,6,6}, + }, kickTable=TABLE.new({ [01]=L,[10]=L,[12]=L,[21]=L, [23]=L,[32]=L,[30]=L,[03]=L, @@ -649,6 +699,11 @@ do local S=reflect(Z) C2_sym={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'dRect',1,1,8,8}, + {'fRect',3,3,4,4}, + }, kickTable={ Z,S,--Z,S Z,S,--J,L @@ -696,9 +751,22 @@ local Classic_plus do } end -local None={kickTable=TABLE.new(noKickSet_180,29)} +local None={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'line',2,2,6,6}, + }, + kickTable=TABLE.new(noKickSet_180,29) +} -local None_plus={kickTable=TABLE.new(noKickSet,29)} +local None_plus={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'line',1,1,7,7}, + {'fRect',2,2,4,4}, + }, + kickTable=TABLE.new(noKickSet,29) +} local RSlist={ TRS=TRS, @@ -717,15 +785,14 @@ local RSlist={ for _,rs in next,RSlist do if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end if not rs.centerPos then rs.centerPos=defaultCenterPos end + if not rs.centerTex then rs.centerTex=defaultCenterTex end --Make all string vec to the same table vec for _,set in next,rs.kickTable do if type(set)=='table'then for _,list in next,set do if type(list[1])=='string'then - for i,vecStr in next,list do - list[i]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))] - end + strToVec(list) end end end diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 8ebba620..98e878cd 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -43,16 +43,6 @@ local multiple=GC.DO{15,15, {'line',2,2,12,12}, {'line',2,12,12,2}, } -local spinCenterImg=GC.DO{9,9, - {'setCL',1,1,1,.2}, - {'fRect',0,0,9,9}, - {'setCL',1,1,1,.6}, - {'fRect',1,1,7,7}, - {'setCL',1,1,1,.8}, - {'fRect',2,2,5,5}, - {'setCL',1,1,1}, - {'fRect',3,3,3,3}, -} local playerBoarder=GC.DO{334,620, {'setLW',2}, {'setCL',.97,.97,.975}, @@ -708,7 +698,7 @@ function draw.norm(P) local curColor=C.color local trans=P.lockDelay/ENV.lock - local centerX=30*(P.curX+C.sc[2])-15 + local centerX=30*(P.curX+C.sc[2])-20 --Draw ghost & rotation center local centerDisp=ENV.center and P.RS.centerDisp[C.id] @@ -716,7 +706,7 @@ function draw.norm(P) drawGhost[ENV.ghostType](P,curColor,ENV.ghost) if centerDisp then gc_setColor(1,1,1,ENV.center) - gc_draw(spinCenterImg,centerX,-30*(P.ghoY+C.sc[1])+15,nil,nil,nil,4,4) + gc_draw(P.RS.centerTex,centerX,-30*(P.ghoY+C.sc[1])+10) end elseif replaying then drawGhost.gray(P,nil,.15) @@ -730,7 +720,7 @@ function draw.norm(P) drawBlock(P,curColor) if centerDisp then gc_setColor(1,1,1,ENV.center) - gc_draw(spinCenterImg,centerX,-30*(P.curY+C.sc[1])+15,nil,nil,nil,4,4) + gc_draw(P.RS.centerTex,centerX,-30*(P.curY+C.sc[1])+10) end elseif replaying then drawBlockShade(P,trans*.3) From 2ad336b13abebe92f46ee118b0ba4a18e9125ea9 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 01:39:18 +0800 Subject: [PATCH 56/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E4=B8=AD=E8=8F=9C=E5=8D=95=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E8=AE=BE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/globalTables.lua | 1 + parts/language/lang_en.lua | 1 + parts/language/lang_es.lua | 1 + parts/language/lang_fr.lua | 1 + parts/language/lang_pt.lua | 1 + parts/language/lang_symbol.lua | 1 + parts/language/lang_zh.lua | 1 + parts/scenes/game.lua | 26 ++++++++++++++++++++------ parts/scenes/setting_game.lua | 5 +++-- 9 files changed, 30 insertions(+), 8 deletions(-) diff --git a/parts/globalTables.lua b/parts/globalTables.lua index 18f0210c..0a22c185 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -250,6 +250,7 @@ SETTING={--Settings --System reTime=4, autoPause=true, + menuPos='right', fine=false, simpMode=false, lang=1, diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index c79f28c5..79b294d3 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -312,6 +312,7 @@ return{ RS="Rotation System", layout="Layout", autoPause="Pause while unfocused", + menuPos="Menu button pos.", swap="Key Combination (Change Atk. Mode)", simpMode="Simplistic Style", }, diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index c0dccea9..988c5ba7 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -278,6 +278,7 @@ return{ RS="Sistema de Rotación", layout="Diseño", autoPause="Pausar cuando la ventana no está enfocada", + -- menuPos="Menu button pos.", swap="Combinación de Teclas (Cambiar Modo de Ataque)", simpMode="Modo Sencillo", }, diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index e13e3eb4..15a2e670 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -275,6 +275,7 @@ return{ RS="Système de rotation", layout="Disposition", autoPause="Mettre en pause en cas de perte de focus", + -- menuPos="Menu button pos.", swap="Combinaison de touches (changer le mode d'attaque)", -- simpMode="Simple mode", }, diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index 15c55486..90e3cce7 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -302,6 +302,7 @@ return{ RS="Sistema de rotação", layout="Layout", autoPause="Pausar quando foco for perco", + -- menuPos="Menu button pos.", swap="Combinação de tecla(Mudar modo de atk)", -- simpMode="Simple mode", }, diff --git a/parts/language/lang_symbol.lua b/parts/language/lang_symbol.lua index 7ee3a585..8c427a79 100644 --- a/parts/language/lang_symbol.lua +++ b/parts/language/lang_symbol.lua @@ -135,6 +135,7 @@ return{ RS="''?", layout="=-=-=", autoPause="A||", + menuPos="←M→?", swap="=+=+=", simpMode=".", }, diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index f45e3d97..0c9467ef 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -312,6 +312,7 @@ return{ RS="旋转系统", layout="外观", autoPause="失去焦点自动暂停", + menuPos="菜单按钮位置", swap="组合键切换攻击模式", simpMode="简洁模式", }, diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 7505fcdd..be79e948 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -6,6 +6,7 @@ local GAME=GAME local noTouch,noKey=false,false local touchMoveLastFrame=false local floatRepRate,replayRate +local modeTextPos local replaying local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"} @@ -69,6 +70,9 @@ local function _step()floatRepRate=floatRepRate+1 end function scene.sceneInit(org) + noKey=replaying + noTouch=not SETTING.VKSwitch or noKey + if GAME.init then resetGameData() GAME.init=false @@ -79,10 +83,20 @@ function scene.sceneInit(org) floatRepRate,replayRate=0,1 end updateRepButtons() - - noKey=replaying - noTouch=not SETTING.VKSwitch or noKey WIDGET.active.restart.hide=replaying + if SETTING.menuPos=='right'then + WIDGET.active.restart.x=1125 + WIDGET.active.pause.x=1195 + modeTextPos=1100-drawableText.modeName:getWidth() + elseif SETTING.menuPos=='middle'then + WIDGET.active.restart.x=360 + WIDGET.active.pause.x=860 + modeTextPos=940 + elseif SETTING.menuPos=='left'then + WIDGET.active.restart.x=120 + WIDGET.active.pause.x=190 + modeTextPos=1200-drawableText.modeName:getWidth() + end end function scene.sceneBack() destroyPlayers() @@ -303,7 +317,7 @@ function scene.draw() --Mode info gc.setColor(1,1,1,.8) - gc.draw(drawableText.modeName,1120-drawableText.modeName:getWidth(),10) + gc.draw(drawableText.modeName,modeTextPos,10) --Replaying if replaying then @@ -326,8 +340,8 @@ scene.widgetList={ WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2}, WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5}, WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step}, - WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText=TEXTURE.game.restart}, - WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, + WIDGET.newKey{name="restart", x=0,y=45,w=60,code=restart,fText=TEXTURE.game.restart}, + WIDGET.newKey{name="pause", x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 9f80d719..61691f81 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -31,8 +31,9 @@ scene.widgetList={ 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','BiRS','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},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")}, + WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval("autoPause"), code=SETrev("autoPause")}, + WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval("menuPos"),code=SETsto("menuPos")}, + WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval("swap"), code=SETrev("swap")}, WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"), code=function() SETTING.simpMode=not SETTING.simpMode From 3452ae1d661b2bc96c3b44a905edbf19df04558c Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 01:40:00 +0800 Subject: [PATCH 57/70] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=92=8C=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf.lua | 2 +- parts/updateLog.lua | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/conf.lua b/conf.lua index e0ca5b23..66be900e 100644 --- a/conf.lua +++ b/conf.lua @@ -1,5 +1,5 @@ VERSION={ - build=355, + build=356, code=1600, short="V0.16.0", string="Alpha V0.16.0", diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 386efece..2949b088 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -33,22 +33,30 @@ return STRING.split([=[ 0.16.0: 空间站 Space station 新增: - 新模式:TSD-Ultimate - 新模式:Stack #142 - 新BGM:Beat5th(用于竞速五连块) - 新BGM:Here(用于生存第四/五难度) - 新BGM:Shift(用于挖掘) - 新BGM:There(用于堆积) - 新BGM:Secret8th Remix(用于master-hard) + 新模式: + TSD-Ultimate + Stack #142 + 新BGM: + Beat5th(用于竞速五连块) + Here(用于生存第四/五难度) + Shift(用于挖掘) + There(用于堆积) + Secret8th Remix(用于master-hard) + 重构旋转系统模块,支持非标/无旋转中心,新增: + BiRS(Bias RS,实验性) + ASC,ASCplus(添加实验性180度踢墙) + Classic,Classic_plus(添加180度旋转) #173 + 每个旋转系统有自己独特的旋转中心样式 新增小亚(xiaoya)语音包 - 旋转系统新增BiRS(Bias RS)(实验性),ASC,ASCplus(添加180度踢墙,实验性) + 添加重开/暂停按钮位置设定 可以通过剪切板导入/导出录像 - 把一个隐藏模式的入口加回来 - 自定义游戏的序列任务场地等数据退出保存 第一次启动会自动进入语言设置菜单 #150 新增noInitSZO模式参数,自动跳过开局SZO(目前仅用于马拉松/20G模式) #121 + 自定义游戏的序列任务场地等数据退出保存 + 把一个隐藏模式的入口加回来 改动: - ui调整(重做游戏内和暂停的界面,减小线宽,添加圆角) + 游戏内和暂停的界面重做 + ui整体调整(添加圆角,减小线宽,减小饱和度) 更换更简洁的加载动画,合并intro场景 调整TRS中S5和Z5的踢墙表,增加Ospin时SZ按反的尝试 回放时版面遮挡会变成半透明 #143 From e7e568f67a7a709f74fac5e1c6b43c2f764ecdbc Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 02:22:15 +0800 Subject: [PATCH 58/70] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E5=87=A0=E4=B9=8E?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=A8=A1=E5=BC=8F=E5=B7=A6=E4=BE=A7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=AF=B9=E9=BD=90hold?= =?UTF-8?q?=E6=A1=86=E4=B8=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- document/mode.txt | 2 +- parts/modes/attacker_h.lua | 8 ++++---- parts/modes/attacker_u.lua | 8 ++++---- parts/modes/backfire_h.lua | 4 ++-- parts/modes/backfire_l.lua | 4 ++-- parts/modes/backfire_n.lua | 4 ++-- parts/modes/backfire_u.lua | 4 ++-- parts/modes/blind_e.lua | 8 ++++---- parts/modes/blind_h.lua | 8 ++++---- parts/modes/blind_l.lua | 8 ++++---- parts/modes/blind_n.lua | 8 ++++---- parts/modes/blind_u.lua | 8 ++++---- parts/modes/blind_wtf.lua | 8 ++++---- parts/modes/c4wtrain_l.lua | 8 ++++---- parts/modes/c4wtrain_n.lua | 8 ++++---- parts/modes/classic_fast.lua | 6 ++---- parts/modes/custom_clear.lua | 4 ++-- parts/modes/custom_puzzle.lua | 4 ++-- parts/modes/defender_l.lua | 8 ++++---- parts/modes/defender_n.lua | 8 ++++---- parts/modes/dig_100l.lua | 2 +- parts/modes/dig_10l.lua | 2 +- parts/modes/dig_400l.lua | 2 +- parts/modes/dig_40l.lua | 2 +- parts/modes/dig_h.lua | 4 ++-- parts/modes/dig_u.lua | 4 ++-- parts/modes/drought_l.lua | 8 +++++--- parts/modes/drought_n.lua | 8 +++++--- parts/modes/infinite.lua | 8 ++++---- parts/modes/infinite_dig.lua | 12 ++++++------ parts/modes/marathon_bfmax.lua | 1 - parts/modes/marathon_h.lua | 2 -- parts/modes/marathon_n.lua | 1 - parts/modes/master_ex.lua | 14 +++++++------- parts/modes/master_final.lua | 1 - parts/modes/master_h.lua | 1 - parts/modes/master_l.lua | 1 - parts/modes/master_n.lua | 1 - parts/modes/master_ph.lua | 2 -- parts/modes/master_u.lua | 1 - parts/modes/pc_h.lua | 12 +++++++----- parts/modes/pc_inf.lua | 4 ++-- parts/modes/pc_l.lua | 12 +++++++----- parts/modes/pc_n.lua | 12 +++++++----- parts/modes/pctrain_l.lua | 4 ++-- parts/modes/pctrain_n.lua | 4 ++-- parts/modes/rhythm_e.lua | 6 +++--- parts/modes/rhythm_h.lua | 6 +++--- parts/modes/rhythm_u.lua | 6 +++--- parts/modes/sprintAtk.lua | 8 ++++---- parts/modes/sprintFix.lua | 2 +- parts/modes/sprintLock.lua | 2 +- parts/modes/sprintMPH.lua | 2 +- parts/modes/sprintPenta.lua | 2 +- parts/modes/sprintSmooth.lua | 2 +- parts/modes/sprint_1000l.lua | 2 +- parts/modes/sprint_100l.lua | 2 +- parts/modes/sprint_10l.lua | 2 +- parts/modes/sprint_20l.lua | 2 +- parts/modes/sprint_400l.lua | 2 +- parts/modes/sprint_40l.lua | 2 +- parts/modes/stack_100l.lua | 2 +- parts/modes/stack_20l.lua | 2 +- parts/modes/stack_40l.lua | 2 +- parts/modes/survivor_e.lua | 4 ++-- parts/modes/survivor_h.lua | 4 ++-- parts/modes/survivor_l.lua | 4 ++-- parts/modes/survivor_n.lua | 4 ++-- parts/modes/survivor_u.lua | 4 ++-- parts/modes/tech_finesse.lua | 8 ++++---- parts/modes/tech_finesse_f.lua | 8 ++++---- parts/modes/tech_h.lua | 8 ++++---- parts/modes/tech_h_plus.lua | 8 ++++---- parts/modes/tech_l.lua | 8 ++++---- parts/modes/tech_l_plus.lua | 8 ++++---- parts/modes/tech_n.lua | 8 ++++---- parts/modes/tech_n_plus.lua | 8 ++++---- parts/modes/tsd_e.lua | 4 ++-- parts/modes/tsd_h.lua | 4 ++-- parts/modes/tsd_u.lua | 4 ++-- parts/modes/zen.lua | 2 +- parts/player/draw.lua | 6 +++--- 82 files changed, 204 insertions(+), 207 deletions(-) diff --git a/document/mode.txt b/document/mode.txt index 0488c86c..e0f52a1e 100644 --- a/document/mode.txt +++ b/document/mode.txt @@ -138,7 +138,7 @@ return{--返回一个table,你也可以在之前定义一些常量或者函数 setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265)--把计算出来的剩余行数r显示出来 + mStr(r,63,265)--把计算出来的剩余行数r显示出来 PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数 end, score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息 diff --git a/parts/modes/attacker_h.lua b/parts/modes/attacker_h.lua index b0ac1bdd..86dfc81a 100644 --- a/parts/modes/attacker_h.lua +++ b/parts/modes/attacker_h.lua @@ -37,10 +37,10 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.modeData.wave,69,200) - mStr("22",69,320) - mText(drawableText.wave,69,260) - mText(drawableText.nextWave,69,380) + mStr(P.modeData.wave,63,200) + mStr("22",63,320) + mText(drawableText.wave,63,260) + mText(drawableText.nextWave,63,380) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/attacker_u.lua b/parts/modes/attacker_u.lua index be816881..eddc0e1c 100644 --- a/parts/modes/attacker_u.lua +++ b/parts/modes/attacker_u.lua @@ -45,10 +45,10 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.modeData.wave,69,200) - mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),69,320) - mText(drawableText.wave,69,260) - mText(drawableText.nextWave,69,380) + mStr(P.modeData.wave,63,200) + mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320) + mText(drawableText.wave,63,260) + mText(drawableText.nextWave,63,380) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_h.lua b/parts/modes/backfire_h.lua index 15413353..931f5d72 100644 --- a/parts/modes/backfire_h.lua +++ b/parts/modes/backfire_h.lua @@ -15,8 +15,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.stat.atk,69,310) - mText(drawableText.atk,69,380) + mStr(P.stat.atk,63,310) + mText(drawableText.atk,63,380) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_l.lua b/parts/modes/backfire_l.lua index 9c1ccd4d..2169bdec 100644 --- a/parts/modes/backfire_l.lua +++ b/parts/modes/backfire_l.lua @@ -15,8 +15,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.stat.atk,69,310) - mText(drawableText.atk,69,380) + mStr(P.stat.atk,63,310) + mText(drawableText.atk,63,380) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_n.lua b/parts/modes/backfire_n.lua index f984e392..6f458ec6 100644 --- a/parts/modes/backfire_n.lua +++ b/parts/modes/backfire_n.lua @@ -14,8 +14,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.stat.atk,69,310) - mText(drawableText.atk,69,380) + mStr(P.stat.atk,63,310) + mText(drawableText.atk,63,380) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_u.lua b/parts/modes/backfire_u.lua index 364d383c..febac3fd 100644 --- a/parts/modes/backfire_u.lua +++ b/parts/modes/backfire_u.lua @@ -15,8 +15,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.stat.atk,69,310) - mText(drawableText.atk,69,380) + mStr(P.stat.atk,63,310) + mText(drawableText.atk,63,380) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/blind_e.lua b/parts/modes/blind_e.lua index 1b3ca9f4..3a73486c 100644 --- a/parts/modes/blind_e.lua +++ b/parts/modes/blind_e.lua @@ -9,11 +9,11 @@ return{ bg='glow',bgm='push', }, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) end, score=function(P)return{min(P.stat.row,200),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/blind_h.lua b/parts/modes/blind_h.lua index 24bba924..3a0a7e07 100644 --- a/parts/modes/blind_h.lua +++ b/parts/modes/blind_h.lua @@ -13,11 +13,11 @@ return{ bg='rgb',bgm='push', }, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) gc.push('transform') PLY.draw.applyFieldOffset(P) gc.setColor(1,1,1,.1) diff --git a/parts/modes/blind_l.lua b/parts/modes/blind_l.lua index 1ba350bc..c013d299 100644 --- a/parts/modes/blind_l.lua +++ b/parts/modes/blind_l.lua @@ -14,11 +14,11 @@ return{ bg='rgb',bgm='push', }, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) gc.push('transform') PLY.draw.applyFieldOffset(P) gc.setColor(1,1,1,.1) diff --git a/parts/modes/blind_n.lua b/parts/modes/blind_n.lua index 63758eb2..1cea28a1 100644 --- a/parts/modes/blind_n.lua +++ b/parts/modes/blind_n.lua @@ -10,11 +10,11 @@ return{ bg='glow',bgm='push', }, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) gc.push('transform') PLY.draw.applyFieldOffset(P) gc.setColor(1,1,1,.1) diff --git a/parts/modes/blind_u.lua b/parts/modes/blind_u.lua index 60cbd15d..020b954c 100644 --- a/parts/modes/blind_u.lua +++ b/parts/modes/blind_u.lua @@ -13,11 +13,11 @@ return{ bg='rgb',bgm='far', }, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) gc.push('transform') PLY.draw.applyFieldOffset(P) gc.setColor(1,1,1,.1) diff --git a/parts/modes/blind_wtf.lua b/parts/modes/blind_wtf.lua index 674f37f5..a092d610 100644 --- a/parts/modes/blind_wtf.lua +++ b/parts/modes/blind_wtf.lua @@ -45,11 +45,11 @@ return{ --Texts gc.setColor(.8,.8,.8) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) end, score=function(P)return{min(P.stat.row,40),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/c4wtrain_l.lua b/parts/modes/c4wtrain_l.lua index 0543de6e..7381c557 100644 --- a/parts/modes/c4wtrain_l.lua +++ b/parts/modes/c4wtrain_l.lua @@ -54,10 +54,10 @@ return{ end, mesDisp=function(P) setFont(45) - mStr(P.combo,69,310) - mStr(P.modeData.maxCombo,69,400) - mText(drawableText.combo,69,358) - mText(drawableText.maxcmb,69,450) + mStr(P.combo,63,310) + mStr(P.modeData.maxCombo,63,400) + mText(drawableText.combo,63,358) + mText(drawableText.maxcmb,63,450) end, score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end, scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end, diff --git a/parts/modes/c4wtrain_n.lua b/parts/modes/c4wtrain_n.lua index 9b956b79..fc814f03 100644 --- a/parts/modes/c4wtrain_n.lua +++ b/parts/modes/c4wtrain_n.lua @@ -52,10 +52,10 @@ return{ end, mesDisp=function(P) setFont(45) - mStr(P.combo,69,310) - mStr(P.modeData.maxCombo,69,400) - mText(drawableText.combo,69,358) - mText(drawableText.maxcmb,69,450) + mStr(P.combo,63,310) + mStr(P.modeData.maxCombo,63,400) + mText(drawableText.combo,63,358) + mText(drawableText.maxcmb,63,450) end, score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end, scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end, diff --git a/parts/modes/classic_fast.lua b/parts/modes/classic_fast.lua index f14fab1c..caa780eb 100644 --- a/parts/modes/classic_fast.lua +++ b/parts/modes/classic_fast.lua @@ -1,5 +1,3 @@ -local gc=love.graphics - return{ color=COLOR.lBlue, env={ @@ -37,8 +35,8 @@ return{ mesDisp=function(P) setFont(75) local r=P.modeData.target*.1 - mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),69,210) - mText(drawableText.speedLV,69,290) + mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210) + mText(drawableText.speedLV,63,290) PLY.draw.drawProgress(P.stat.row,P.modeData.target) end, score=function(P)return{P.stat.score,P.stat.row}end, diff --git a/parts/modes/custom_clear.lua b/parts/modes/custom_clear.lua index ca1d3e26..0baff7bd 100644 --- a/parts/modes/custom_clear.lua +++ b/parts/modes/custom_clear.lua @@ -74,7 +74,7 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(P.stat.row,69,225) - mText(drawableText.line,69,290) + mStr(P.stat.row,63,225) + mText(drawableText.line,63,290) end, } \ No newline at end of file diff --git a/parts/modes/custom_puzzle.lua b/parts/modes/custom_puzzle.lua index 3b1e3b64..c80d232e 100644 --- a/parts/modes/custom_puzzle.lua +++ b/parts/modes/custom_puzzle.lua @@ -50,8 +50,8 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(P.stat.row,69,225) - mText(drawableText.line,69,290) + mStr(P.stat.row,63,225) + mText(drawableText.line,63,290) gc.push('transform') PLY.draw.applyFieldOffset(P) if P.modeData.showMark==0 then diff --git a/parts/modes/defender_l.lua b/parts/modes/defender_l.lua index d9359056..72873cbb 100644 --- a/parts/modes/defender_l.lua +++ b/parts/modes/defender_l.lua @@ -44,10 +44,10 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.modeData.wave,69,200) - mStr(P.modeData.rpm,69,320) - mText(drawableText.wave,69,260) - mText(drawableText.rpm,69,380) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/defender_n.lua b/parts/modes/defender_n.lua index be0a3912..1537075d 100644 --- a/parts/modes/defender_n.lua +++ b/parts/modes/defender_n.lua @@ -44,10 +44,10 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.modeData.wave,69,200) - mStr(P.modeData.rpm,69,320) - mText(drawableText.wave,69,260) - mText(drawableText.rpm,69,380) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/dig_100l.lua b/parts/modes/dig_100l.lua index a12979a3..3947c1ac 100644 --- a/parts/modes/dig_100l.lua +++ b/parts/modes/dig_100l.lua @@ -24,7 +24,7 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(100-P.stat.dig,69,265) + mStr(100-P.stat.dig,63,265) end, score=function(P)return{P.stat.time,P.stat.piece}end, scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, diff --git a/parts/modes/dig_10l.lua b/parts/modes/dig_10l.lua index 813715ec..94b5182f 100644 --- a/parts/modes/dig_10l.lua +++ b/parts/modes/dig_10l.lua @@ -21,7 +21,7 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(10-P.stat.dig,69,265) + mStr(10-P.stat.dig,63,265) end, score=function(P)return{P.stat.time,P.stat.piece}end, scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, diff --git a/parts/modes/dig_400l.lua b/parts/modes/dig_400l.lua index 1e15f49c..e1cc86b1 100644 --- a/parts/modes/dig_400l.lua +++ b/parts/modes/dig_400l.lua @@ -24,7 +24,7 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(400-P.stat.dig,69,265) + mStr(400-P.stat.dig,63,265) end, score=function(P)return{P.stat.time,P.stat.piece}end, scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, diff --git a/parts/modes/dig_40l.lua b/parts/modes/dig_40l.lua index 40afde95..8e153e48 100644 --- a/parts/modes/dig_40l.lua +++ b/parts/modes/dig_40l.lua @@ -24,7 +24,7 @@ return{ end, mesDisp=function(P) setFont(55) - mStr(40-P.stat.dig,69,265) + mStr(40-P.stat.dig,63,265) end, score=function(P)return{P.stat.time,P.stat.piece}end, scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, diff --git a/parts/modes/dig_h.lua b/parts/modes/dig_h.lua index cd14aac6..9f38ccb2 100644 --- a/parts/modes/dig_h.lua +++ b/parts/modes/dig_h.lua @@ -23,8 +23,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.row}end, scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end, diff --git a/parts/modes/dig_u.lua b/parts/modes/dig_u.lua index 911a08c5..f8d7f325 100644 --- a/parts/modes/dig_u.lua +++ b/parts/modes/dig_u.lua @@ -22,8 +22,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.row}end, scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end, diff --git a/parts/modes/drought_l.lua b/parts/modes/drought_l.lua index 3322002b..7f5d4790 100644 --- a/parts/modes/drought_l.lua +++ b/parts/modes/drought_l.lua @@ -82,9 +82,11 @@ return{ bg='blockfall',bgm='reason', }, mesDisp=function(P) - setFont(70) - local R=100-P.stat.row - mStr(R>=0 and R or 0,69,265) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) end, score=function(P)return{math.min(P.stat.row,100),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/drought_n.lua b/parts/modes/drought_n.lua index 5f092a27..242d5c7c 100644 --- a/parts/modes/drought_n.lua +++ b/parts/modes/drought_n.lua @@ -12,9 +12,11 @@ return{ bg='blockfall',bgm='reason', }, mesDisp=function(P) - setFont(70) - local R=100-P.stat.row - mStr(R>=0 and R or 0,69,265) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) end, score=function(P)return{min(P.stat.row,100),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/infinite.lua b/parts/modes/infinite.lua index 2bb2a07a..2fecb62d 100644 --- a/parts/modes/infinite.lua +++ b/parts/modes/infinite.lua @@ -7,9 +7,9 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, } \ No newline at end of file diff --git a/parts/modes/infinite_dig.lua b/parts/modes/infinite_dig.lua index fa6d043c..be1d59e5 100644 --- a/parts/modes/infinite_dig.lua +++ b/parts/modes/infinite_dig.lua @@ -44,11 +44,11 @@ return{ end, mesDisp=function(P) setFont(45) - mStr(P.stat.dig,69,190) - mStr(P.stat.atk,69,310) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,420) - mText(drawableText.line,69,243) - mText(drawableText.atk,69,363) - mText(drawableText.eff,69,475) + mStr(P.stat.dig,63,190) + mStr(P.stat.atk,63,310) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420) + mText(drawableText.line,63,243) + mText(drawableText.atk,63,363) + mText(drawableText.eff,63,475) end, } \ No newline at end of file diff --git a/parts/modes/marathon_bfmax.lua b/parts/modes/marathon_bfmax.lua index 8c85ecce..2362983a 100644 --- a/parts/modes/marathon_bfmax.lua +++ b/parts/modes/marathon_bfmax.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25} return{ diff --git a/parts/modes/marathon_h.lua b/parts/modes/marathon_h.lua index 98acbd1d..6c23fb86 100644 --- a/parts/modes/marathon_h.lua +++ b/parts/modes/marathon_h.lua @@ -1,5 +1,3 @@ -local gc=love.graphics - return{ color=COLOR.magenta, env={ diff --git a/parts/modes/marathon_n.lua b/parts/modes/marathon_n.lua index 3cb3f5a3..4cce1bb3 100644 --- a/parts/modes/marathon_n.lua +++ b/parts/modes/marathon_n.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local dropSpeed={50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25} return{ diff --git a/parts/modes/master_ex.lua b/parts/modes/master_ex.lua index 263d93c9..e7bd328e 100644 --- a/parts/modes/master_ex.lua +++ b/parts/modes/master_ex.lua @@ -41,16 +41,16 @@ return{ }, slowMark=true, mesDisp=function(P) - mText(drawableText.line,69,300) - mText(drawableText.techrash,69,420) - mText(drawableText.grade,69,170) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + mText(drawableText.grade,63,170) setFont(55) - mStr(P.modeData.rankName,69,110) + mStr(P.modeData.rankName,63,110) setFont(20) - mStr(("%.1f"):format(P.modeData.rankPoint/10),69,198) + mStr(("%.1f"):format(P.modeData.rankPoint/10),63,198) setFont(75) - mStr(P.stat.row,69,220) - mStr(P.stat.clears[4],69,340) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) end, score=function(P)return{P.modeData.rankPoint,P.stat.score}end, scoreDisp=function(D)return sectionName[math.floor(D[1]/10)+1].." "..D[2]end, diff --git a/parts/modes/master_final.lua b/parts/modes/master_final.lua index e1225443..27422231 100644 --- a/parts/modes/master_final.lua +++ b/parts/modes/master_final.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local function score(P) local D=P.modeData diff --git a/parts/modes/master_h.lua b/parts/modes/master_h.lua index 73dc6823..4b40ee12 100644 --- a/parts/modes/master_h.lua +++ b/parts/modes/master_h.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local death_lock={12,11,10,9,8, 7,7,7,7,6} local death_wait={10,9, 8, 7,6, 6,6,5,5,4} local death_fall={10,9, 8, 7,6, 6,5,5,4,4} diff --git a/parts/modes/master_l.lua b/parts/modes/master_l.lua index bd88d001..0895b134 100644 --- a/parts/modes/master_l.lua +++ b/parts/modes/master_l.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local rush_lock={20,18,16,15,14} local rush_wait={12,10, 9, 8, 7} local rush_fall={18,16,14,13,12} diff --git a/parts/modes/master_n.lua b/parts/modes/master_n.lua index 76988c4e..0c27a229 100644 --- a/parts/modes/master_n.lua +++ b/parts/modes/master_n.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local rush_lock={20,18,16,15,14, 14,13,12,11,11} local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9} local rush_fall={18,16,14,13,12, 12,11,11,10,10} diff --git a/parts/modes/master_ph.lua b/parts/modes/master_ph.lua index 1ac1c39d..477b3407 100644 --- a/parts/modes/master_ph.lua +++ b/parts/modes/master_ph.lua @@ -1,5 +1,3 @@ -local gc=love.graphics - return{ color=COLOR.black, env={ diff --git a/parts/modes/master_u.lua b/parts/modes/master_u.lua index 3d4b866e..89a8b013 100644 --- a/parts/modes/master_u.lua +++ b/parts/modes/master_u.lua @@ -1,4 +1,3 @@ -local gc=love.graphics local death_lock={12,11,10,9,8, 7,7,7,6,6} local death_wait={10, 9, 8,7,6, 6,5,4,4,3} local death_fall={10, 9, 8,7,6, 5,5,4,3,3} diff --git a/parts/modes/pc_h.lua b/parts/modes/pc_h.lua index 2b57960d..3c208b45 100644 --- a/parts/modes/pc_h.lua +++ b/parts/modes/pc_h.lua @@ -9,13 +9,15 @@ return{ bg='rgb',bgm='truth', }, mesDisp=function(P) - setFont(45) - local R=100-P.stat.row - mStr(R>=0 and R or 0,69,220) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_inf.lua b/parts/modes/pc_inf.lua index 14a1afcb..13dc0351 100644 --- a/parts/modes/pc_inf.lua +++ b/parts/modes/pc_inf.lua @@ -23,8 +23,8 @@ return{ }, mesDisp=function(P) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_l.lua b/parts/modes/pc_l.lua index 4ecb20ef..0fc7d396 100644 --- a/parts/modes/pc_l.lua +++ b/parts/modes/pc_l.lua @@ -9,13 +9,15 @@ return{ bg='rgb',bgm='moonbeam', }, mesDisp=function(P) - setFont(45) - local R=100-P.stat.row - mStr(R>=0 and R or 0,69,220) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_n.lua b/parts/modes/pc_n.lua index 6c0b0b74..c1046437 100644 --- a/parts/modes/pc_n.lua +++ b/parts/modes/pc_n.lua @@ -7,13 +7,15 @@ return{ bg='rgb',bgm='truth', }, mesDisp=function(P) - setFont(45) - local R=100-P.stat.row - mStr(R>=0 and R or 0,69,220) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pctrain_l.lua b/parts/modes/pctrain_l.lua index 95f476f8..083e066d 100644 --- a/parts/modes/pctrain_l.lua +++ b/parts/modes/pctrain_l.lua @@ -58,8 +58,8 @@ return{ end, mesDisp=function(P) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pctrain_n.lua b/parts/modes/pctrain_n.lua index 199de097..78185629 100644 --- a/parts/modes/pctrain_n.lua +++ b/parts/modes/pctrain_n.lua @@ -49,8 +49,8 @@ return{ end, mesDisp=function(P) setFont(70) - mStr(P.stat.pc,69,300) - mText(drawableText.pc,69,380) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,380) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/rhythm_e.lua b/parts/modes/rhythm_e.lua index 5377e068..bd766a9e 100644 --- a/parts/modes/rhythm_e.lua +++ b/parts/modes/rhythm_e.lua @@ -48,15 +48,15 @@ return{ PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) - mStr(P.modeData.bpm,69,178) + mStr(P.modeData.bpm,63,178) gc.setLineWidth(4) - gc.circle('line',69,200,30) + gc.circle('line',63,200,30) local beat=P.modeData.counter/P.modeData.beatFrame gc.setColor(1,1,1,1-beat) gc.setLineWidth(3) - gc.circle('line',69,200,30+45*beat) + gc.circle('line',63,200,30+45*beat) end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/rhythm_h.lua b/parts/modes/rhythm_h.lua index 585c5bbb..078001b0 100644 --- a/parts/modes/rhythm_h.lua +++ b/parts/modes/rhythm_h.lua @@ -48,15 +48,15 @@ return{ PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) - mStr(P.modeData.bpm,69,178) + mStr(P.modeData.bpm,63,178) gc.setLineWidth(4) - gc.circle('line',69,200,30) + gc.circle('line',63,200,30) local beat=P.modeData.counter/P.modeData.beatFrame gc.setColor(1,1,1,1-beat) gc.setLineWidth(3) - gc.circle('line',69,200,30+45*beat) + gc.circle('line',63,200,30+45*beat) end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/rhythm_u.lua b/parts/modes/rhythm_u.lua index cb957e01..eae0ae3d 100644 --- a/parts/modes/rhythm_u.lua +++ b/parts/modes/rhythm_u.lua @@ -54,15 +54,15 @@ return{ PLY.draw.drawProgress(P.stat.row,P.modeData.target) setFont(30) - mStr(P.modeData.bpm,69,178) + mStr(P.modeData.bpm,63,178) gc.setLineWidth(4) - gc.circle('line',69,200,30) + gc.circle('line',63,200,30) local beat=P.modeData.counter/P.modeData.beatFrame gc.setColor(1,1,1,1-beat) gc.setLineWidth(3) - gc.circle('line',69,200,30+45*beat) + gc.circle('line',63,200,30+45*beat) end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, diff --git a/parts/modes/sprintAtk.lua b/parts/modes/sprintAtk.lua index bb07eaa1..b43354a1 100644 --- a/parts/modes/sprintAtk.lua +++ b/parts/modes/sprintAtk.lua @@ -8,10 +8,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/sprintFix.lua b/parts/modes/sprintFix.lua index 276d1af0..140c85f2 100644 --- a/parts/modes/sprintFix.lua +++ b/parts/modes/sprintFix.lua @@ -11,7 +11,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, getRank=function(P) diff --git a/parts/modes/sprintLock.lua b/parts/modes/sprintLock.lua index 37c319c9..f9142fb8 100644 --- a/parts/modes/sprintLock.lua +++ b/parts/modes/sprintLock.lua @@ -10,7 +10,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, getRank=function(P) diff --git a/parts/modes/sprintMPH.lua b/parts/modes/sprintMPH.lua index 791e4f85..1c1ee4aa 100644 --- a/parts/modes/sprintMPH.lua +++ b/parts/modes/sprintMPH.lua @@ -11,7 +11,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprintPenta.lua b/parts/modes/sprintPenta.lua index ce0ae362..5213a8f7 100644 --- a/parts/modes/sprintPenta.lua +++ b/parts/modes/sprintPenta.lua @@ -10,7 +10,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprintSmooth.lua b/parts/modes/sprintSmooth.lua index 7f302a29..8824789b 100644 --- a/parts/modes/sprintSmooth.lua +++ b/parts/modes/sprintSmooth.lua @@ -11,7 +11,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, getRank=function(P) diff --git a/parts/modes/sprint_1000l.lua b/parts/modes/sprint_1000l.lua index eade5306..b75d3df3 100644 --- a/parts/modes/sprint_1000l.lua +++ b/parts/modes/sprint_1000l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=1000-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprint_100l.lua b/parts/modes/sprint_100l.lua index f5aeb342..b8347e6e 100644 --- a/parts/modes/sprint_100l.lua +++ b/parts/modes/sprint_100l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=100-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprint_10l.lua b/parts/modes/sprint_10l.lua index c704abf7..9731553d 100644 --- a/parts/modes/sprint_10l.lua +++ b/parts/modes/sprint_10l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=10-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprint_20l.lua b/parts/modes/sprint_20l.lua index d3dc2d78..e41fa588 100644 --- a/parts/modes/sprint_20l.lua +++ b/parts/modes/sprint_20l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=20-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprint_400l.lua b/parts/modes/sprint_400l.lua index 1dff7de2..df3ec0c3 100644 --- a/parts/modes/sprint_400l.lua +++ b/parts/modes/sprint_400l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=400-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/sprint_40l.lua b/parts/modes/sprint_40l.lua index 9c7ece23..358595c1 100644 --- a/parts/modes/sprint_40l.lua +++ b/parts/modes/sprint_40l.lua @@ -9,7 +9,7 @@ return{ setFont(55) local r=40-P.stat.row if r<0 then r=0 end - mStr(r,69,265) + mStr(r,63,265) PLY.draw.drawTargetLine(P,r) end, score=function(P)return{P.stat.time,P.stat.piece}end, diff --git a/parts/modes/stack_100l.lua b/parts/modes/stack_100l.lua index e4008211..20db7651 100644 --- a/parts/modes/stack_100l.lua +++ b/parts/modes/stack_100l.lua @@ -12,7 +12,7 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.stat.piece,69,265) + mStr(P.stat.piece,63,265) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/stack_20l.lua b/parts/modes/stack_20l.lua index 1a4e3d39..022bc470 100644 --- a/parts/modes/stack_20l.lua +++ b/parts/modes/stack_20l.lua @@ -9,7 +9,7 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.stat.piece,69,265) + mStr(P.stat.piece,63,265) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/stack_40l.lua b/parts/modes/stack_40l.lua index 02229a66..987c1794 100644 --- a/parts/modes/stack_40l.lua +++ b/parts/modes/stack_40l.lua @@ -11,7 +11,7 @@ return{ }, mesDisp=function(P) setFont(55) - mStr(P.stat.piece,69,265) + mStr(P.stat.piece,63,265) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_e.lua b/parts/modes/survivor_e.lua index c31681ee..d63b4e3e 100644 --- a/parts/modes/survivor_e.lua +++ b/parts/modes/survivor_e.lua @@ -24,8 +24,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_h.lua b/parts/modes/survivor_h.lua index 0a57bc47..fcb9bf74 100644 --- a/parts/modes/survivor_h.lua +++ b/parts/modes/survivor_h.lua @@ -31,8 +31,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_l.lua b/parts/modes/survivor_l.lua index 6fee0efa..f05c5e26 100644 --- a/parts/modes/survivor_l.lua +++ b/parts/modes/survivor_l.lua @@ -25,8 +25,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_n.lua b/parts/modes/survivor_n.lua index 692c643e..22492d5c 100644 --- a/parts/modes/survivor_n.lua +++ b/parts/modes/survivor_n.lua @@ -30,8 +30,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_u.lua b/parts/modes/survivor_u.lua index f39f03a5..ec44eaaa 100644 --- a/parts/modes/survivor_u.lua +++ b/parts/modes/survivor_u.lua @@ -30,8 +30,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.wave,69,310) - mText(drawableText.wave,69,375) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, diff --git a/parts/modes/tech_finesse.lua b/parts/modes/tech_finesse.lua index 9e604b63..57f918af 100644 --- a/parts/modes/tech_finesse.lua +++ b/parts/modes/tech_finesse.lua @@ -11,10 +11,10 @@ return{ slowMark=true, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_finesse_f.lua b/parts/modes/tech_finesse_f.lua index 03aafaf7..9c3cc051 100644 --- a/parts/modes/tech_finesse_f.lua +++ b/parts/modes/tech_finesse_f.lua @@ -24,10 +24,10 @@ return{ slowMark=true, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_h.lua b/parts/modes/tech_h.lua index 2d92df01..ceaefb21 100644 --- a/parts/modes/tech_h.lua +++ b/parts/modes/tech_h.lua @@ -9,10 +9,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_h_plus.lua b/parts/modes/tech_h_plus.lua index 171733e4..3936f171 100644 --- a/parts/modes/tech_h_plus.lua +++ b/parts/modes/tech_h_plus.lua @@ -21,10 +21,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_l.lua b/parts/modes/tech_l.lua index 2cfe4332..ded89a66 100644 --- a/parts/modes/tech_l.lua +++ b/parts/modes/tech_l.lua @@ -9,10 +9,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_l_plus.lua b/parts/modes/tech_l_plus.lua index eb7081a7..72af918d 100644 --- a/parts/modes/tech_l_plus.lua +++ b/parts/modes/tech_l_plus.lua @@ -21,10 +21,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_n.lua b/parts/modes/tech_n.lua index 773c5784..6b803579 100644 --- a/parts/modes/tech_n.lua +++ b/parts/modes/tech_n.lua @@ -9,10 +9,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tech_n_plus.lua b/parts/modes/tech_n_plus.lua index 432ebe81..c7894020 100644 --- a/parts/modes/tech_n_plus.lua +++ b/parts/modes/tech_n_plus.lua @@ -21,10 +21,10 @@ return{ }, mesDisp=function(P) setFont(45) - mStr(("%.1f"):format(P.stat.atk),69,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310) - mText(drawableText.atk,69,243) - mText(drawableText.eff,69,363) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) end, score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/tsd_e.lua b/parts/modes/tsd_e.lua index b8ee45cd..3e80eeb3 100644 --- a/parts/modes/tsd_e.lua +++ b/parts/modes/tsd_e.lua @@ -20,8 +20,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.tsd,69,250) - mText(drawableText.tsd,69,315) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) end, score=function(P)return{P.modeData.tsd,P.stat.time}end, scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, diff --git a/parts/modes/tsd_h.lua b/parts/modes/tsd_h.lua index 3f2570f8..ef761fe2 100644 --- a/parts/modes/tsd_h.lua +++ b/parts/modes/tsd_h.lua @@ -20,8 +20,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.tsd,69,250) - mText(drawableText.tsd,69,315) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) end, score=function(P)return{P.modeData.tsd,P.stat.time}end, scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, diff --git a/parts/modes/tsd_u.lua b/parts/modes/tsd_u.lua index 6dd46e5c..84816f5d 100644 --- a/parts/modes/tsd_u.lua +++ b/parts/modes/tsd_u.lua @@ -29,8 +29,8 @@ return{ }, mesDisp=function(P) setFont(65) - mStr(P.modeData.tsd,69,250) - mText(drawableText.tsd,69,315) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) gc.push('transform') PLY.draw.applyFieldOffset(P) gc.translate(0,P.fieldBeneath+P.fieldUp) diff --git a/parts/modes/zen.lua b/parts/modes/zen.lua index 454ac5b9..87664cbd 100644 --- a/parts/modes/zen.lua +++ b/parts/modes/zen.lua @@ -9,7 +9,7 @@ return{ mesDisp=function(P) setFont(70) local R=200-P.stat.row - mStr(R>=0 and R or 0,69,265) + mStr(R>=0 and R or 0,63,265) end, score=function(P)return{P.stat.score}end, scoreDisp=function(D)return tostring(D[1])end, diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 98e878cd..f74b9255 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -620,7 +620,7 @@ function draw.drawProgress(s1,s2) end function draw.drawRoyaleInfo(P) setFont(35) - mStr(#PLY_ALIVE.."/"..#PLAYERS,69,175) + mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175) mStr(P.modeData.ko,80,215) gc.draw(drawableText.ko,60-drawableText.ko:getWidth(),222) setFont(20) @@ -628,10 +628,10 @@ function draw.drawRoyaleInfo(P) gc.print(P.badge,103,227) gc.setColor(.97,.97,.97) setFont(25) - gc.print(text.powerUp[P.strength],18,290) + mDraw(text.powerUp[P.strength],63,290) gc.setColor(1,1,1) for i=1,P.strength do - gc.draw(IMG.badgeIcon,16*i+12,260) + gc.draw(IMG.badgeIcon,16*i+6,260) end end From 70bbb12285f433a522c1bd0760acf0d3319d856b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 02:23:39 +0800 Subject: [PATCH 59/70] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=B8=B8=E9=A9=BB=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4short=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf.lua b/conf.lua index 66be900e..310b0717 100644 --- a/conf.lua +++ b/conf.lua @@ -1,8 +1,7 @@ VERSION={ build=356, code=1600, - short="V0.16.0", - string="Alpha V0.16.0", + string="V0.16.0@DEV", room="V1.1", name="空间站 Space station", } From ac889dcba92a37d3f53427d2ee7d8ca43e53d3ab Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 02:33:05 +0800 Subject: [PATCH 60/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=9C=BA=E6=99=AF=E6=97=B6=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81=E9=A1=BA=E5=BA=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/game.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index be79e948..3a7ceaf1 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -70,18 +70,18 @@ local function _step()floatRepRate=floatRepRate+1 end function scene.sceneInit(org) + replaying=GAME.replaying noKey=replaying noTouch=not SETTING.VKSwitch or noKey + if org~='depause'and org~='pause'then + floatRepRate,replayRate=0,1 + end if GAME.init then resetGameData() GAME.init=false end - replaying=GAME.replaying - if org~='depause'and org~='pause'then - floatRepRate,replayRate=0,1 - end updateRepButtons() WIDGET.active.restart.hide=replaying if SETTING.menuPos=='right'then From 20cd27d7f6eaa05ac8083b09fb223ae127549db8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 03:16:40 +0800 Subject: [PATCH 61/70] =?UTF-8?q?=E5=86=8D=E5=BE=AE=E8=B0=83=E5=A4=A7?= =?UTF-8?q?=E9=87=8F=E6=A8=A1=E5=BC=8F=E7=9A=84=E5=B7=A6=E4=BE=A7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA=20stack=E6=A8=A1=E5=BC=8F=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0"=E5=9D=97?= =?UTF-8?q?=E6=95=B0"=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/lang_en.lua | 2 +- parts/language/lang_es.lua | 2 +- parts/language/lang_fr.lua | 2 +- parts/language/lang_pt.lua | 2 +- parts/language/lang_yygq.lua | 2 +- parts/language/lang_zh.lua | 2 +- parts/language/lang_zh2.lua | 2 +- parts/list.lua | 2 +- parts/modes/backfire_h.lua | 6 +++--- parts/modes/backfire_l.lua | 6 +++--- parts/modes/backfire_n.lua | 6 +++--- parts/modes/backfire_u.lua | 6 +++--- parts/modes/blind_wtf.lua | 12 +++++++++--- parts/modes/dig_h.lua | 2 +- parts/modes/dig_u.lua | 2 +- parts/modes/pc_h.lua | 2 +- parts/modes/pc_inf.lua | 2 +- parts/modes/pc_l.lua | 2 +- parts/modes/pc_n.lua | 2 +- parts/modes/pctrain_l.lua | 2 +- parts/modes/pctrain_n.lua | 2 +- parts/modes/stack_100l.lua | 5 +++-- parts/modes/stack_20l.lua | 5 +++-- parts/modes/stack_40l.lua | 5 +++-- parts/modes/survivor_e.lua | 4 ++-- parts/modes/survivor_h.lua | 4 ++-- parts/modes/survivor_l.lua | 4 ++-- parts/modes/survivor_n.lua | 4 ++-- parts/modes/survivor_u.lua | 4 ++-- parts/modes/tsd_e.lua | 2 +- parts/modes/tsd_h.lua | 2 +- parts/modes/tsd_u.lua | 2 +- parts/player/draw.lua | 14 +++++++------- 33 files changed, 66 insertions(+), 57 deletions(-) diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index 79b294d3..bc9af1f8 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -34,7 +34,7 @@ return{ missionFailed="Wrong Clear", speedLV="Speed Level", - line="Lines",atk="Attack",eff="Efficiency", + piece="Piece",line="Lines",atk="Attack",eff="Efficiency", rpm="RPM",tsd="TSD", grade="Grade",techrash="Techrash", wave="Wave",nextWave="Next", diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index 988c5ba7..8b0ed306 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -24,7 +24,7 @@ return{ missionFailed="Misión Fallida", speedLV="Vel. de juego", - line="Líneas",atk="Ataque",eff="Eficiencia", + piece="Piezas",line="Líneas",atk="Ataque",eff="Eficiencia", rpm="RPM",tsd="TSD", grade="Grado",techrash="Techrash", wave="Ronda",nextWave="Sig. ronda", diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 15a2e670..84334940 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -24,7 +24,7 @@ return{ missionFailed="Mission échouée", speedLV="niveau de vitesse", - line="Lignes",atk="Attaque",eff="Efficacité", + piece="Pièce",line="Lignes",atk="Attaque",eff="Efficacité", rpm="RPM",tsd="TSD", grade="Grade",techrash="Techrash", wave="Vague",nextWave="Prochain", diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index 90e3cce7..88f182a3 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -25,7 +25,7 @@ return{ missionFailed="Missão falha", speedLV="Nível de velocidade", - line="Linhas",atk="Ataque",eff="Eficiência", + piece="Peça",line="Linhas",atk="Ataque",eff="Eficiência", rpm="RPM",tsd="TSD", grade="Grade",techrash="Techrash", wave="Onda",nextWave="Próxima", diff --git a/parts/language/lang_yygq.lua b/parts/language/lang_yygq.lua index e360e3b8..020a420a 100644 --- a/parts/language/lang_yygq.lua +++ b/parts/language/lang_yygq.lua @@ -25,7 +25,7 @@ return{ maxspeed="速度封顶", speedLV="速度等级", - line="行数",atk="攻",eff="效", + piece="块数",line="行数",atk="攻",eff="效", rpm="收每分",tsd="T2", grade="段位",techrash="消四", wave="波数",nextWave="下一波", diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index 0c9467ef..8d06beb9 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -34,7 +34,7 @@ return{ missionFailed="非任务消除", speedLV="速度等级", - line="行数",atk="攻击",eff="效率", + piece="块数",line="行数",atk="攻击",eff="效率", rpm="RPM",tsd="T2", grade="段位",techrash="Techrash", wave="波数",nextWave="下一波", diff --git a/parts/language/lang_zh2.lua b/parts/language/lang_zh2.lua index 23b256a8..89a0b1de 100644 --- a/parts/language/lang_zh2.lua +++ b/parts/language/lang_zh2.lua @@ -11,7 +11,7 @@ return{ continue="继续。", speedLV="速度等级", - line="行数",atk="攻击",eff="效率", + piece="块数",line="行数",atk="攻击",eff="效率", rpm="收每分",tsd="T2", grade="段位",techrash="消四", wave="波数",nextWave="下一波", diff --git a/parts/list.lua b/parts/list.lua index 04ed0617..f049eb96 100644 --- a/parts/list.lua +++ b/parts/list.lua @@ -164,7 +164,7 @@ do--drawableText gamewin=T(100),gameover=T(100),pause=T(120), speedLV=T(20), - line=T(25),atk=T(20),eff=T(20), + piece=T(25),line=T(25),atk=T(20),eff=T(20), rpm=T(35),tsd=T(35), grade=T(25),techrash=T(25), wave=T(30),nextWave=T(30), diff --git a/parts/modes/backfire_h.lua b/parts/modes/backfire_h.lua index 931f5d72..633d3100 100644 --- a/parts/modes/backfire_h.lua +++ b/parts/modes/backfire_h.lua @@ -14,9 +14,9 @@ return{ bg='tunnel',bgm='echo', }, mesDisp=function(P) - setFont(65) - mStr(P.stat.atk,63,310) - mText(drawableText.atk,63,380) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_l.lua b/parts/modes/backfire_l.lua index 2169bdec..7bda39c2 100644 --- a/parts/modes/backfire_l.lua +++ b/parts/modes/backfire_l.lua @@ -14,9 +14,9 @@ return{ bg='blackhole',bgm='echo', }, mesDisp=function(P) - setFont(65) - mStr(P.stat.atk,63,310) - mText(drawableText.atk,63,380) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_n.lua b/parts/modes/backfire_n.lua index 6f458ec6..6f6aaddc 100644 --- a/parts/modes/backfire_n.lua +++ b/parts/modes/backfire_n.lua @@ -13,9 +13,9 @@ return{ bg='tunnel',bgm='echo', }, mesDisp=function(P) - setFont(65) - mStr(P.stat.atk,63,310) - mText(drawableText.atk,63,380) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/backfire_u.lua b/parts/modes/backfire_u.lua index febac3fd..fd00889c 100644 --- a/parts/modes/backfire_u.lua +++ b/parts/modes/backfire_u.lua @@ -14,9 +14,9 @@ return{ bg='blackhole',bgm='echo', }, mesDisp=function(P) - setFont(65) - mStr(P.stat.atk,63,310) - mText(drawableText.atk,63,380) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) end, score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, diff --git a/parts/modes/blind_wtf.lua b/parts/modes/blind_wtf.lua index a092d610..dc9f74e9 100644 --- a/parts/modes/blind_wtf.lua +++ b/parts/modes/blind_wtf.lua @@ -1,3 +1,11 @@ +local boarder=GC.DO{334,620, +{'setLW',2}, +{'setCL',.97,.97,.975}, +{'dRect',16,1,302,618,5}, +{'fRect',17,612,300,2}, +{'dRect',318,9,15,596,3}, +{'dRect',1,9,15,596,3}, +} local gc=love.graphics local sin,min=math.sin,math.min return{ @@ -30,9 +38,7 @@ return{ gc.translate(150,0) gc.setColor(.5,.5,.5) --Frame - gc.rectangle('line',-1,-11,302,612)--Boarder - gc.rectangle('line',301,-3,15,604)--AtkBuffer boarder - gc.rectangle('line',-16,-3,15,604)--B2b bar boarder + gc.draw(boarder,-17,-12) end gc.pop() end diff --git a/parts/modes/dig_h.lua b/parts/modes/dig_h.lua index 9f38ccb2..32950406 100644 --- a/parts/modes/dig_h.lua +++ b/parts/modes/dig_h.lua @@ -22,7 +22,7 @@ return{ bg='bg2',bgm='shift', }, mesDisp=function(P) - setFont(65) + setFont(60) mStr(P.modeData.wave,63,310) mText(drawableText.wave,63,375) end, diff --git a/parts/modes/dig_u.lua b/parts/modes/dig_u.lua index f8d7f325..255da6c0 100644 --- a/parts/modes/dig_u.lua +++ b/parts/modes/dig_u.lua @@ -21,7 +21,7 @@ return{ bg='bg2',bgm='shift', }, mesDisp=function(P) - setFont(65) + setFont(60) mStr(P.modeData.wave,63,310) mText(drawableText.wave,63,375) end, diff --git a/parts/modes/pc_h.lua b/parts/modes/pc_h.lua index 3c208b45..01156184 100644 --- a/parts/modes/pc_h.lua +++ b/parts/modes/pc_h.lua @@ -17,7 +17,7 @@ return{ setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_inf.lua b/parts/modes/pc_inf.lua index 13dc0351..46ee7754 100644 --- a/parts/modes/pc_inf.lua +++ b/parts/modes/pc_inf.lua @@ -24,7 +24,7 @@ return{ mesDisp=function(P) setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_l.lua b/parts/modes/pc_l.lua index 0fc7d396..14b9f11b 100644 --- a/parts/modes/pc_l.lua +++ b/parts/modes/pc_l.lua @@ -17,7 +17,7 @@ return{ setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pc_n.lua b/parts/modes/pc_n.lua index c1046437..a6c81cbd 100644 --- a/parts/modes/pc_n.lua +++ b/parts/modes/pc_n.lua @@ -15,7 +15,7 @@ return{ setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pctrain_l.lua b/parts/modes/pctrain_l.lua index 083e066d..be30fb96 100644 --- a/parts/modes/pctrain_l.lua +++ b/parts/modes/pctrain_l.lua @@ -59,7 +59,7 @@ return{ mesDisp=function(P) setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/pctrain_n.lua b/parts/modes/pctrain_n.lua index 78185629..8f57f3de 100644 --- a/parts/modes/pctrain_n.lua +++ b/parts/modes/pctrain_n.lua @@ -50,7 +50,7 @@ return{ mesDisp=function(P) setFont(70) mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,380) + mText(drawableText.pc,63,350) end, score=function(P)return{P.stat.pc,P.stat.time}end, scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, diff --git a/parts/modes/stack_100l.lua b/parts/modes/stack_100l.lua index 20db7651..f15c60f4 100644 --- a/parts/modes/stack_100l.lua +++ b/parts/modes/stack_100l.lua @@ -11,8 +11,9 @@ return{ bg='none',bgm='there', }, mesDisp=function(P) - setFont(55) - mStr(P.stat.piece,63,265) + setFont(60) + mStr(P.stat.piece,63,280) + mText(drawableText.piece,63,350) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/stack_20l.lua b/parts/modes/stack_20l.lua index 022bc470..f4066d58 100644 --- a/parts/modes/stack_20l.lua +++ b/parts/modes/stack_20l.lua @@ -8,8 +8,9 @@ return{ bg='none',bgm='there', }, mesDisp=function(P) - setFont(55) - mStr(P.stat.piece,63,265) + setFont(60) + mStr(P.stat.piece,63,280) + mText(drawableText.piece,63,350) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/stack_40l.lua b/parts/modes/stack_40l.lua index 987c1794..02893d8e 100644 --- a/parts/modes/stack_40l.lua +++ b/parts/modes/stack_40l.lua @@ -10,8 +10,9 @@ return{ bg='none',bgm='there', }, mesDisp=function(P) - setFont(55) - mStr(P.stat.piece,63,265) + setFont(60) + mStr(P.stat.piece,63,280) + mText(drawableText.piece,63,350) end, score=function(P)return{P.stat.piece,P.stat.time}end, scoreDisp=function(D)return D[1].." Pieces".." "..STRING.time(D[2])end, diff --git a/parts/modes/survivor_e.lua b/parts/modes/survivor_e.lua index d63b4e3e..9ebb206a 100644 --- a/parts/modes/survivor_e.lua +++ b/parts/modes/survivor_e.lua @@ -23,8 +23,8 @@ return{ bg='glow',bgm='new era', }, mesDisp=function(P) - setFont(65) - mStr(P.modeData.wave,63,310) + setFont(60) + mStr(P.modeData.wave,63,280) mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, diff --git a/parts/modes/survivor_h.lua b/parts/modes/survivor_h.lua index fcb9bf74..93a692f3 100644 --- a/parts/modes/survivor_h.lua +++ b/parts/modes/survivor_h.lua @@ -30,8 +30,8 @@ return{ bg='glow',bgm='new era', }, mesDisp=function(P) - setFont(65) - mStr(P.modeData.wave,63,310) + setFont(60) + mStr(P.modeData.wave,63,280) mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, diff --git a/parts/modes/survivor_l.lua b/parts/modes/survivor_l.lua index f05c5e26..8257e80c 100644 --- a/parts/modes/survivor_l.lua +++ b/parts/modes/survivor_l.lua @@ -24,8 +24,8 @@ return{ bg='glow',bgm='here', }, mesDisp=function(P) - setFont(65) - mStr(P.modeData.wave,63,310) + setFont(60) + mStr(P.modeData.wave,63,280) mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, diff --git a/parts/modes/survivor_n.lua b/parts/modes/survivor_n.lua index 22492d5c..32e4330c 100644 --- a/parts/modes/survivor_n.lua +++ b/parts/modes/survivor_n.lua @@ -29,8 +29,8 @@ return{ bg='glow',bgm='new era', }, mesDisp=function(P) - setFont(65) - mStr(P.modeData.wave,63,310) + setFont(60) + mStr(P.modeData.wave,63,280) mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, diff --git a/parts/modes/survivor_u.lua b/parts/modes/survivor_u.lua index ec44eaaa..d15e89d3 100644 --- a/parts/modes/survivor_u.lua +++ b/parts/modes/survivor_u.lua @@ -29,8 +29,8 @@ return{ bg='welcome',bgm='here', }, mesDisp=function(P) - setFont(65) - mStr(P.modeData.wave,63,310) + setFont(60) + mStr(P.modeData.wave,63,280) mText(drawableText.wave,63,375) end, score=function(P)return{P.modeData.wave,P.stat.time}end, diff --git a/parts/modes/tsd_e.lua b/parts/modes/tsd_e.lua index 3e80eeb3..4855c132 100644 --- a/parts/modes/tsd_e.lua +++ b/parts/modes/tsd_e.lua @@ -19,7 +19,7 @@ return{ bg='matrix',bgm='vapor', }, mesDisp=function(P) - setFont(65) + setFont(60) mStr(P.modeData.tsd,63,250) mText(drawableText.tsd,63,315) end, diff --git a/parts/modes/tsd_h.lua b/parts/modes/tsd_h.lua index ef761fe2..92fa6989 100644 --- a/parts/modes/tsd_h.lua +++ b/parts/modes/tsd_h.lua @@ -19,7 +19,7 @@ return{ bg='matrix',bgm='vapor', }, mesDisp=function(P) - setFont(65) + setFont(60) mStr(P.modeData.tsd,63,250) mText(drawableText.tsd,63,315) end, diff --git a/parts/modes/tsd_u.lua b/parts/modes/tsd_u.lua index 84816f5d..16f7cbdc 100644 --- a/parts/modes/tsd_u.lua +++ b/parts/modes/tsd_u.lua @@ -28,7 +28,7 @@ return{ bg='matrix',bgm='vapor', }, mesDisp=function(P) - setFont(65) + setFont(60) mStr(P.modeData.tsd,63,250) mText(drawableText.tsd,63,315) gc.push('transform') diff --git a/parts/player/draw.lua b/parts/player/draw.lua index f74b9255..75201f2f 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -628,7 +628,7 @@ function draw.drawRoyaleInfo(P) gc.print(P.badge,103,227) gc.setColor(.97,.97,.97) setFont(25) - mDraw(text.powerUp[P.strength],63,290) + mStr(text.powerUp[P.strength],63,290) gc.setColor(1,1,1) for i=1,P.strength do gc.draw(IMG.badgeIcon,16*i+6,260) @@ -813,12 +813,6 @@ function draw.norm(P) P:drawNext() drawHold(P) - --Mode informations - if GAME.curMode.mesDisp then - gc_setColor(.97,.97,.97) - GAME.curMode.mesDisp(P) - end - --Speed dials & FinesseCombo if P.type=='remote'then drawDial(490,520,P.dropSpeed) @@ -831,6 +825,12 @@ function draw.norm(P) drawFinesseCombo_norm(P) end + --Mode informations + if GAME.curMode.mesDisp then + gc_setColor(.97,.97,.97) + GAME.curMode.mesDisp(P) + end + --Score & Time setFont(25) local tm=int(P.stat.time*100)*.01 From a71b5045894c085f2b92d077e2fd93305e01cdbf Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 07:10:40 +0800 Subject: [PATCH 62/70] =?UTF-8?q?=E4=BF=AE=E6=94=B9actions=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=90=8D=E7=A7=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=97=B6=E4=BE=9D=E8=B5=96=E7=9A=84python=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 69 ++++++++++++++----- .github/workflows/getVersion.bat | 2 + .github/workflows/getVersion.py | 11 +++ ...dateVersion.py => updateAndroidVersion.py} | 10 +-- .github/workflows/updateOSXVersion.py | 8 +-- 5 files changed, 75 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/getVersion.bat create mode 100644 .github/workflows/getVersion.py rename .github/workflows/{updateVersion.py => updateAndroidVersion.py} (57%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3e39829..d185e613 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,21 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - name: GetCommitID + #这里找不到好办法用git获取CommitID,就直接截取了 + #如果有好办法的话欢迎pr( + #之前尝试用的: + #for /F %%i in ('git rev-parse --short "${{ GITHUB.SHA }}"') do (set CommitID=%%i) + #失败原因: + #直接powershell运行报错,使用bat运行会获取不到${{ GITHUB.SHA }} + run: | + $CommitID="${{ GITHUB.SHA }}".Substring(0,7) + echo $CommitID > test.txt + echo "CommitID=$CommitID" + echo "CommitID=$CommitID" >> $env:GITHUB_ENV + - name: GetVersion + run: | + .\.github\workflows\getVersion.bat - name: Download love run: | curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip @@ -26,16 +41,24 @@ jobs: copy /b love-11.3-win64\love.exe + game.love love-11.3-win64\Techmino.exe del love-11.3-win64\love.exe del love-11.3-win64\lovec.exe - - name: Artifact - uses: actions/upload-artifact@v1.0.0 + - name: Upload + uses: actions/upload-artifact@v2 with: - name: Windows + name: Techmino_${{ env.Version }}_${{ env.CommitID }}_Windows path: love-11.3-win64 build-linux: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + - name: GetCommitID + run: | + CommitID=$(git rev-parse --short "${{ GITHUB.SHA }}") + echo "CommitID=${CommitID}" >> $GITHUB_ENV + - name: GetVersion + run: | + Version=$(python3 getVersion.py) + echo "Version=${Version}" >> $GITHUB_ENV - name: Download AppImageKit run: curl -OL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage - name: Unpack and Repack @@ -49,16 +72,24 @@ jobs: cd ../../../.. cp -r document media parts Zframework conf.lua font.ttf main.lua squashfs-root/usr/share/Techmino ./appimagetool-x86_64.AppImage squashfs-root Techmino.AppImage - - name: Artifact + - name: Upload uses: actions/upload-artifact@v2 with: - name: Linux + name: Techmino_${{ env.Version }}_${{ env.CommitID }}_Linux path: Techmino.AppImage build-android: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + - name: GetCommitID + run: | + CommitID=$(git rev-parse --short "${{ GITHUB.SHA }}") + echo "CommitID=${CommitID}" >> $GITHUB_ENV + - name: GetVersion + run: | + Version=$(python3 getVersion.py) + echo "Version=${Version}" >> $GITHUB_ENV - name: Download Apktool run: curl -OL https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar - name: Unpack and Repack @@ -68,7 +99,7 @@ jobs: 7z x -o. apk/assets/game.love libAndroid rm apk/assets/game.love Techmino.apk 7z a -tzip apk/assets/game.love document libAndroid media parts Zframework conf.lua font.ttf main.lua - python3 .github/workflows/updateVersion.py + python3 .github/workflows/updateAndroidVersion.py java -jar apktool_2.5.0.jar b -o Techmino.apk apk - uses: 26F-Studio/sign-android-release@master name: Sign app APK @@ -81,18 +112,27 @@ jobs: keyPassword: ${{ secrets.KEY_PASSWORD }} env: BUILD_TOOLS_VERSION: "30.0.2" - - name: Artifact + - name: Upload uses: actions/upload-artifact@v2 with: - name: Android + name: Techmino_${{ env.Version }}_${{ env.CommitID }}_Android path: ${{steps.sign_app.outputs.signedReleaseFile}} build-macOS: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 + - name: GetCommitID + run: | + CommitID=$(git rev-parse --short "${{ GITHUB.SHA }}") + echo "CommitID=${CommitID}" >> $GITHUB_ENV + - name: GetVersion + run: | + Version=$(python3 getVersion.py) + echo "Version=${Version}" >> $GITHUB_ENV - name: Pack love - run : zip -r Techmino.love document media parts Zframework conf.lua font.ttf main.lua + run: | + zip -r Techmino.love document media parts Zframework conf.lua font.ttf main.lua - name: Download template run: | curl -OL https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.app.zip @@ -116,11 +156,8 @@ jobs: security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k Techminohaowan build.keychain /usr/bin/codesign --force --deep -s 79B81FC5EA155243C973B5417B0996501F00EF55 ./Techmino.app -v - - name: Pack Techmino - run: | - zip -r -y Techmino-Packed.app.zip Techmino.app - - name: Artifact - uses: actions/upload-artifact@v1.0.0 + - name: Upload + uses: actions/upload-artifact@v2 with: - name: macOS - path: Techmino-Packed.app.zip + name: Techmino_${{ env.Version }}_${{ env.CommitID }}_macOS + path: Techmino-Packed.app \ No newline at end of file diff --git a/.github/workflows/getVersion.bat b/.github/workflows/getVersion.bat new file mode 100644 index 00000000..6f052321 --- /dev/null +++ b/.github/workflows/getVersion.bat @@ -0,0 +1,2 @@ +for /F %%i in ('python .github/workflows/getVersion.py') do (set Version=%%i) +echo Version=%Version% \ No newline at end of file diff --git a/.github/workflows/getVersion.py b/.github/workflows/getVersion.py new file mode 100644 index 00000000..772c2b3a --- /dev/null +++ b/.github/workflows/getVersion.py @@ -0,0 +1,11 @@ +import re +def getVersion(): + with open("conf.lua", "r", encoding="utf-8") as file: + data = file.read() + versionCode = re.search("build=(\\d+)", data).group() + versionName = re.search('(?<=string=").*(?=@)', data).group() + return versionCode, versionName + +if __name__ == "__main__": + versionCode, versionName = getVersion() + print (versionName) \ No newline at end of file diff --git a/.github/workflows/updateVersion.py b/.github/workflows/updateAndroidVersion.py similarity index 57% rename from .github/workflows/updateVersion.py rename to .github/workflows/updateAndroidVersion.py index 6d34ddbe..e785d166 100644 --- a/.github/workflows/updateVersion.py +++ b/.github/workflows/updateAndroidVersion.py @@ -1,12 +1,12 @@ import re -with open("conf.lua", "r") as file: - data = file.read() -versionCode = re.search("build=(\\d+)", data).group(1) -versionName = re.search('short="([^"]+)', data).group(1) +import getVersion + +versionCode, versionName = getVersion.getVersion() + with open("apk/apktool.yml", "r+") as file: data = file.read() data = re.sub("versionCode:.+", f"versionCode: '{versionCode}'", data) data = re.sub("versionName:.+", f"versionName: {versionName}", data) file.seek(0) file.truncate() - file.write(data) + file.write(data) \ No newline at end of file diff --git a/.github/workflows/updateOSXVersion.py b/.github/workflows/updateOSXVersion.py index c550e324..f3281a5c 100644 --- a/.github/workflows/updateOSXVersion.py +++ b/.github/workflows/updateOSXVersion.py @@ -1,4 +1,5 @@ import re, datetime +import getVersion info = r""" @@ -57,9 +58,8 @@ info = r""" """ -with open("conf.lua", "r") as file: - data = file.read() -versionName = re.search('short="([^"]+)', data).group(1) +versionCode, versionName = getVersion.getVersion() + print("Updating to", versionName) with open("Techmino.app/Contents/info.plist", "w") as file: - file.write(info % (versionName, datetime.datetime.today().year)) + file.write(info % (versionName, datetime.datetime.today().year)) \ No newline at end of file From a37e164c0b1d9bb57a93d97e26b4cecc24a8b242 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 07:12:43 +0800 Subject: [PATCH 63/70] =?UTF-8?q?=E4=BF=AE=E6=AD=A3python=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d185e613..3be0413b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: echo "CommitID=${CommitID}" >> $GITHUB_ENV - name: GetVersion run: | - Version=$(python3 getVersion.py) + Version=$(python3 .github/workflows/getVersion.py) echo "Version=${Version}" >> $GITHUB_ENV - name: Download AppImageKit run: curl -OL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage @@ -88,7 +88,7 @@ jobs: echo "CommitID=${CommitID}" >> $GITHUB_ENV - name: GetVersion run: | - Version=$(python3 getVersion.py) + Version=$(python3 .github/workflows/getVersion.py) echo "Version=${Version}" >> $GITHUB_ENV - name: Download Apktool run: curl -OL https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar @@ -128,7 +128,7 @@ jobs: echo "CommitID=${CommitID}" >> $GITHUB_ENV - name: GetVersion run: | - Version=$(python3 getVersion.py) + Version=$(python3 .github/workflows/getVersion.py) echo "Version=${Version}" >> $GITHUB_ENV - name: Pack love run: | From 8d74a35f29a5f758849742d8a210d532ac408723 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 07:17:19 +0800 Subject: [PATCH 64/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0version=E8=87=B3?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/getVersion.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/getVersion.bat b/.github/workflows/getVersion.bat index 6f052321..102a7731 100644 --- a/.github/workflows/getVersion.bat +++ b/.github/workflows/getVersion.bat @@ -1,2 +1,2 @@ for /F %%i in ('python .github/workflows/getVersion.py') do (set Version=%%i) -echo Version=%Version% \ No newline at end of file +echo Version=%Version% >> $env:GITHUB_ENV \ No newline at end of file From ebc4e08986c38978f00764383231301d5592d97b Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 07:39:26 +0800 Subject: [PATCH 65/70] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BD=BF=E7=94=A8pytho?= =?UTF-8?q?n=E8=A7=A3=E5=86=B3bat=E6=97=A0=E6=B3=95=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- .github/workflows/windowsGetVersion.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/windowsGetVersion.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3be0413b..729fbcdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: echo "CommitID=$CommitID" >> $env:GITHUB_ENV - name: GetVersion run: | - .\.github\workflows\getVersion.bat + python .github/workflows/windowsGetVersion.py - name: Download love run: | curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip diff --git a/.github/workflows/windowsGetVersion.py b/.github/workflows/windowsGetVersion.py new file mode 100644 index 00000000..13c447ce --- /dev/null +++ b/.github/workflows/windowsGetVersion.py @@ -0,0 +1,6 @@ +import os +import getVersion + +versionCode, versionName = getVersion.getVersion() + +os.system(f'echo Version={versionName} >> $env:GITHUB_ENV') \ No newline at end of file From b3ef90237fa0a468b2bd2b533338a1f79dbb0ff0 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 07:52:42 +0800 Subject: [PATCH 66/70] =?UTF-8?q?=E5=8F=88=E6=8D=A2=E5=9B=9E=E4=BA=86bat?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=A7=A3=E5=86=B3=E6=97=A0=E6=B3=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=98=E9=87=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- .github/workflows/getVersion.bat | 2 +- .github/workflows/windowsGetVersion.py | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 .github/workflows/windowsGetVersion.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 729fbcdb..3be0413b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: echo "CommitID=$CommitID" >> $env:GITHUB_ENV - name: GetVersion run: | - python .github/workflows/windowsGetVersion.py + .\.github\workflows\getVersion.bat - name: Download love run: | curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip diff --git a/.github/workflows/getVersion.bat b/.github/workflows/getVersion.bat index 102a7731..26ae5276 100644 --- a/.github/workflows/getVersion.bat +++ b/.github/workflows/getVersion.bat @@ -1,2 +1,2 @@ for /F %%i in ('python .github/workflows/getVersion.py') do (set Version=%%i) -echo Version=%Version% >> $env:GITHUB_ENV \ No newline at end of file +powershell -Command echo "Version=%Version%" >> $env:GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/windowsGetVersion.py b/.github/workflows/windowsGetVersion.py deleted file mode 100644 index 13c447ce..00000000 --- a/.github/workflows/windowsGetVersion.py +++ /dev/null @@ -1,6 +0,0 @@ -import os -import getVersion - -versionCode, versionName = getVersion.getVersion() - -os.system(f'echo Version={versionName} >> $env:GITHUB_ENV') \ No newline at end of file From e28894549cb89199c35e32017827de8b4bf0a2db Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 08:16:11 +0800 Subject: [PATCH 67/70] =?UTF-8?q?C=20M=20D=20=E5=AE=B3=20=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 13 +++---------- .github/workflows/getVersion.bat | 2 -- 2 files changed, 3 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/getVersion.bat diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3be0413b..982ead21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,20 +10,13 @@ jobs: steps: - uses: actions/checkout@v2 - name: GetCommitID - #这里找不到好办法用git获取CommitID,就直接截取了 - #如果有好办法的话欢迎pr( - #之前尝试用的: - #for /F %%i in ('git rev-parse --short "${{ GITHUB.SHA }}"') do (set CommitID=%%i) - #失败原因: - #直接powershell运行报错,使用bat运行会获取不到${{ GITHUB.SHA }} run: | - $CommitID="${{ GITHUB.SHA }}".Substring(0,7) - echo $CommitID > test.txt - echo "CommitID=$CommitID" + $CommitID=git rev-parse --short "${{ GITHUB.SHA }}" echo "CommitID=$CommitID" >> $env:GITHUB_ENV - name: GetVersion run: | - .\.github\workflows\getVersion.bat + $Version=python .github/workflows/getVersion.py + echo "Version=$Version" >> $env:GITHUB_ENV - name: Download love run: | curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip diff --git a/.github/workflows/getVersion.bat b/.github/workflows/getVersion.bat deleted file mode 100644 index 26ae5276..00000000 --- a/.github/workflows/getVersion.bat +++ /dev/null @@ -1,2 +0,0 @@ -for /F %%i in ('python .github/workflows/getVersion.py') do (set Version=%%i) -powershell -Command echo "Version=%Version%" >> $env:GITHUB_ENV \ No newline at end of file From d649a0caa1c0440e807756fbb435289ce98a615a Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 9 Aug 2021 08:21:31 +0800 Subject: [PATCH 68/70] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 982ead21..40c2836e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,11 @@ jobs: - name: GetCommitID run: | $CommitID=git rev-parse --short "${{ GITHUB.SHA }}" - echo "CommitID=$CommitID" >> $env:GITHUB_ENV + echo "CommitID=${CommitID}" >> $env:GITHUB_ENV - name: GetVersion run: | $Version=python .github/workflows/getVersion.py - echo "Version=$Version" >> $env:GITHUB_ENV + echo "Version=${Version}" >> $env:GITHUB_ENV - name: Download love run: | curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip From 02189c42627eaa36478f16881756709d72bf5ea1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 11:35:04 +0800 Subject: [PATCH 69/70] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BF=AE=E6=94=B9O?= =?UTF-8?q?=E5=9D=97=E5=88=9D=E5=A7=8B=E6=96=B9=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/lang_zh2.lua | 8 +------- parts/scenes/setting_skin.lua | 10 +++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/parts/language/lang_zh2.lua b/parts/language/lang_zh2.lua index 89a0b1de..8a7e3d03 100644 --- a/parts/language/lang_zh2.lua +++ b/parts/language/lang_zh2.lua @@ -62,13 +62,7 @@ return{ ihs="提前暂存", }, setting_skin={ - spin1="转", - spin2="转", - spin3="转", - spin4="转", - spin5="转", - spin6="转", - spin7="转", + spin1="转",spin2="转",spin3="转",spin4="转",spin5="转",spin6="转",spin7="转", }, customGame={ mod="模组(F1)", diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 61c67162..720cc5a4 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -2,12 +2,14 @@ local gc=love.graphics local int=math.floor local sin=math.sin +local selRS local minoRot={0,0,0,0,0,0,0} local minoRot0={} local scene={} function scene.sceneInit() + selRS=RSlist[SETTING.RS] for i=1,7 do minoRot0[i]=SETTING.face[i]*1.57 minoRot[i]=minoRot0[i] @@ -29,14 +31,16 @@ function scene.draw() gc.rotate(minoRot[n]+sin(t*3-n*.5)*.08) local color=SETTING.skin[n] local B=BLOCKS[n][0] - local x,y=-45-DSCP[n][0][2]*30,15+DSCP[n][0][1]*30 + local x,y=-45-selRS.centerPos[n][0][2]*30,15+selRS.centerPos[n][0][1]*30 local col=#B[1] for i=1,#B do for j=1,col do if B[i][j]then gc.draw(texture[color],x+30*j,y-30*i) end end end - gc.circle('fill',0,0,sin(t*10)+5) + if selRS.centerDisp[n]then + mDraw(selRS.centerTex) + end gc.pop() end for i=1,5 do @@ -85,7 +89,7 @@ scene.widgetList={ WIDGET.newButton{name="spin3", x=410,y=540,w=90,h=65,code=function()nextDir(3)end}, WIDGET.newButton{name="spin4", x=550,y=540,w=90,h=65,code=function()nextDir(4)end}, WIDGET.newButton{name="spin5", x=690,y=540,w=90,h=65,code=function()nextDir(5)end}, - --WIDGET.newButton{name="spin6",x=825,y=540,w=90,h=65,code=function()nextDir(6)end},--Cannot rotate O + WIDGET.newButton{name="spin6", x=825,y=540,w=90,h=65,code=function()nextDir(6)end}, WIDGET.newButton{name="spin7", x=970,y=540,w=90,h=65,code=function()nextDir(7)end}, WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color='lV',font=35, From 2eae6cdfda64a9f0965f10e032d1017c52699cce Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 9 Aug 2021 11:53:56 +0800 Subject: [PATCH 70/70] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=99=A8=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98=20close?= =?UTF-8?q?=20#178=20close=20#179?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_calc.lua | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 350af816..5bb98806 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -34,15 +34,22 @@ function scene.keyDown(key) elseif key:sub(1,2)=="kp"then scene.keyDown(key:sub(3)) elseif key=="."then - if not(val:find(".",nil,true)or val:find("e"))then + if sym=="="then + sym,reg=false,false + val="0." + elseif not(val:find(".",nil,true)or val:find("e"))then if sym and not reg then reg=val val="0." + else + val=val.."." end - val=val.."." end elseif key=="e"then - if sym~="="and not val:find("e")then + if sym=="="then + sym,reg=false + val="0e" + elseif not val:find("e")then val=val.."e" end elseif key=="backspace"then @@ -54,10 +61,14 @@ function scene.keyDown(key) val=val:sub(1,-2) end if val==""then val="0"end - elseif key=="+"or key=="="and kb.isDown("lshift","rshift")then sym="+" reg=false - elseif key=="*"or key=="8"and kb.isDown("lshift","rshift")then sym="*" reg=false - elseif key=="-"then sym="-" reg=false - elseif key=="/"then sym="/" reg=false + elseif key=="+"or key=="="and kb.isDown("lshift","rshift")then + if reg and sym then scene.keyDown("return")else reg=false end sym="+" + elseif key=="*"or key=="8"and kb.isDown("lshift","rshift")then + if reg and sym then scene.keyDown("return")else reg=false end sym="*" + elseif key=="-"then + if reg and sym then scene.keyDown("return")else reg=false end sym="-" + elseif key=="/"then + if reg and sym then scene.keyDown("return")else reg=false end sym="/" elseif key=="return"then if val:sub(-1)=="e"then val=val:sub(1,-2)end if sym and reg then @@ -73,7 +84,8 @@ function scene.keyDown(key) reg=false elseif key=="escape"then if val~="0"then - val,reg,sym="0" + reg,sym=false,false + val="0" else SCN.back() end