Compare commits

...

1469 Commits

Author SHA1 Message Date
MrZ626
707bcca368 Merge commit 'f8f115de10b4ef7818cf58bc03c9d75700e425b0' into test-new-mode-system 2021-12-27 14:26:32 +08:00
MrZ626
f8f115de10 更新字体 2021-12-27 14:19:39 +08:00
MrZ626
b07c4dc53a 优化滑条控件和列表框控件 2021-12-26 02:57:57 +08:00
NOT_A_ROBOT
6eeddba773 Remove dictionary and legal page conflict (#563)
Dictionary: "A 🤔 game developed using LÖVE."
Legal page: "TECHMINO is not a fan game of Tetris."

This commit edits the dictionary to follow the legal page into:
"A block stacker game developed using LÖVE."
2021-12-25 19:24:51 +08:00
MrZ626
0cfe4df468 新BGM:lounge(暂未使用, by Hailey (cudsys) & MrZ) 2021-12-24 18:50:30 +08:00
MrZ626
eb5c3c3be5 版本推进 2021-12-24 00:08:46 +08:00
MrZ626
a5b9206694 修正联网对战结算的l'pm公式算的其实是lpm 2021-12-24 00:06:43 +08:00
MrZ626
375e67bdc4 微调框架坐标系相关细节 2021-12-24 00:06:40 +08:00
MrZ626
724a576aa3 跟进框架更新 2021-12-23 21:03:11 +08:00
MrZ626
ed47dcb90c 框架新增onResize 2021-12-23 21:03:05 +08:00
MrZ626
64b08a5a4d 修复录像界面导入导出按钮隐藏状态错误 2021-12-23 14:00:30 +08:00
MrZ626
baed0153a2 两个节日主题颜色浅一些 2021-12-23 13:48:39 +08:00
MrZ626
46d95b33e4 播放立体声音效限制输入值范围 2021-12-23 13:19:01 +08:00
MrZ626
200d270fee 框架会给场景提供触摸id 2021-12-22 21:22:19 +08:00
MrZ626
a8628275a0 大量指数接近动画改为基于时间而不是帧 2021-12-22 02:19:42 +08:00
MrZ626
20a1d2bcc1 修正框架主循环刷新率控制 2021-12-21 23:35:32 +08:00
MrZ626
b887a1f096 版本推进 2021-12-21 23:24:01 +08:00
MrZ626
9bf0e9f28d 调整一行hpc判定为“消除后最高行是垃圾行”,避免自定义场地的空气行争议 2021-12-21 23:18:49 +08:00
MrZ626
dfc724767b 调整帧率控制算法 2021-12-21 10:23:16 +08:00
MrZ626
f0e66e9dc5 框架添加设置最大帧率的入口 2021-12-21 00:16:29 +08:00
MrZ626
0932335f0b 微调游戏设置菜单 2021-12-20 23:21:02 +08:00
MrZ626
a9b39e396a BGM.play新增预加载参数 2021-12-20 16:01:19 +08:00
MrZ626
2e0ceaae72 math扩展库新增interval方法 2021-12-20 16:01:19 +08:00
MrZ626
04f38d2eb6 微调新模式pr的小问题 2021-12-20 14:55:42 +08:00
MrZ626
fc1ed4dff6 修正英文词典小问题 2021-12-20 14:52:40 +08:00
NOT_A_ROBOT
f8935d3dd7 Add Master Instinct mode (#545)
* Add Inverse Invisible mode

A mode where the locked pieces doesn't become invisible, but your active piece does.

[NOTE: I haven't added the mode to the map yet because the mode selection screen is changing]

* Renamed to Master Instinct
2021-12-20 14:51:30 +08:00
user670
a86228677f Update dict_en.lua (#556)
- Un-confused the support entries. Patreon processing fee assumes your account uses the 5% tier.
- TGM games are arcade games, NOT Windows games, despite their now most common versions found in China are Windows ports.
2021-12-20 14:47:45 +08:00
MrZ626
79df9f7876 前两个tsd模式有很小的重力 2021-12-19 20:22:02 +08:00
MrZ626
12ea2d76be 修正profile模块小问题 2021-12-19 17:06:44 +08:00
MrZ626
485bd72241 重构bgm模块 2021-12-19 16:29:50 +08:00
MrZ626
7240275075 修复一个bgm模块小问题 2021-12-19 15:26:16 +08:00
MrZ626
29ef9b8d15 ai种子会根据id变化 2021-12-19 00:59:01 +08:00
MrZ626
97f4795d4e 修正一处框架修改没改完导致地图报错 2021-12-19 00:50:42 +08:00
MrZ626
226e45b24d 整理代码 2021-12-18 16:08:45 +08:00
MrZ626
d6ab7e72b2 调整某个无关紧要的小东西 2021-12-18 01:15:04 +08:00
MrZ626
168f44b8b3 修正一处框架方法名修改没改完 2021-12-18 00:37:32 +08:00
MrZ626
b73f646a4c 作者要求mono语音包暂时消失一段时间 2021-12-18 00:25:05 +08:00
MrZ626
36cefcc000 太空背景支持任意帧率 2021-12-17 21:57:33 +08:00
MrZ626
f901c25c87 修正一些地方move音效没改touch 2021-12-17 21:12:50 +08:00
MrZ626
6d8478b029 string扩展模块新增一个按字符数读+截取的方法 2021-12-17 13:54:27 +08:00
MrZ626
9bcb040019 bgm模块新增isPlaying方法 2021-12-16 17:47:57 +08:00
MrZ626
d977087fc0 调整上一个pr的小问题 2021-12-16 14:35:57 +08:00
C₂₉H₂₅N₃O₅
1a330771d7 大改词典 (#553)
* 大修中文词典

`dict_zh`:
* 术语和专有名词大小写修正
* 日期格式标准化
* 增加评论注释
* 增加更多关键词索引
* 删除重复内容
* 英文使用半角标点
* 修改一些写错的名词
* 修改一个链接

* Updated `dict_en`

`dict_en`
* Added more search indexes
* Added many contents from `dict_zh`, especially the games
* Changed some URL links (from the teatube version to the original websites, if possible)
* Corrected the names of the wrongly-spelled proper nouns
* Rearranged the order of some entries
2021-12-16 13:48:02 +08:00
MrZ626
9c8c9f2106 涉及框架的设置项统一应用,不再细分时机
修改errData的获得方式
WIDGET新增setOnChange方法,不再依赖THEME
2021-12-16 12:39:42 +08:00
MrZ626
0498beecdf 特化新的模式选择场景名 2021-12-16 03:04:35 +08:00
MrZ626
8e075adf8f 新增一个简易秒表小程序 2021-12-16 02:58:36 +08:00
MrZ626
60f2a0e647 更新ios无法自动退出的界面细节 2021-12-16 02:37:25 +08:00
MrZ626
b642f2b5c4 Merge branch 'main' into test-new-mode-system 2021-12-16 02:32:51 +08:00
MrZ626
2b80f72c6b 移除框架内几处对SETTING的依赖 2021-12-16 02:31:53 +08:00
MrZ626
462720881a 支持鼠标滚动模式列表 2021-12-16 02:07:49 +08:00
MrZ626
3dda0254a8 调整中文词典的游戏介绍词条及顺序
Co-authored-by: C₂₉H₂₅N₃O₅ <cgu52@wisc.edu>
2021-12-16 00:22:32 +08:00
MrZ626
054a52a445 版本推进 2021-12-15 14:28:44 +08:00
MrZ626
85242d808b 修复语言文件小问题 2021-12-15 14:28:05 +08:00
MrZ626
57241677a9 修复混战 2021-12-15 14:26:40 +08:00
MrZ626
6ccdee2a53 bgm模块新增瞬间开/关功能
字符串扩展模块不再直接修改全局的string,需要外部自己补充
2021-12-15 11:28:25 +08:00
MrFaq2018
a3d2b7b7f3 Update lang_es.lua (#552) 2021-12-14 12:41:45 +08:00
MrZ626
b7b28b4ae3 修复经典模式h和u难度没有干旱计数器 close #546 2021-12-13 03:52:19 +08:00
MrZ626
30748200dd 修复自定义场地界面按超过第三个的鼠标键会报错 2021-12-11 19:38:24 +08:00
MrZ626
c9f8240234 添加模式搜索的帮助文本 2021-12-10 13:22:42 +08:00
MrZ626
5c7082e886 修复不能deepdrop 2021-12-10 12:50:57 +08:00
MrZ626
9a3c889a9d 修改词典和tip 2021-12-10 09:31:07 +08:00
MrZ626
f41f58e13f 模式文件夹可以显示作者 2021-12-10 01:49:05 +08:00
MrZ626
e81f25c216 修正段位更新条件
模式列表显示获得的段位
2021-12-10 01:37:14 +08:00
MrZ626
36fc681fbf 项目名太长会压缩显示 2021-12-09 20:10:46 +08:00
MrZ626
87e5e29129 彩蛋模式补充进模式树 2021-12-09 20:10:17 +08:00
MrZ626
b432fdf90a 部分语言的模式说明添加换行 2021-12-09 19:43:36 +08:00
MrZ626
6e78a3fedd 选择模式后右侧显示排行榜等信息 2021-12-09 19:41:42 +08:00
MrZ626
24760801af 增加模式图标显示,等待添加素材 2021-12-09 17:26:37 +08:00
MrZ626
f5e8e0f7a5 Merge commit 'df089a2f04fc44774e8dc722cc5d9948f94e5de5' into HEAD 2021-12-09 17:26:31 +08:00
MrZ626
df089a2f04 框架新增1*1空白画布变量PAPER 2021-12-09 17:26:02 +08:00
user670
6600713f4b Update lang_en.lua (#540) 2021-12-09 16:04:24 +08:00
NOT_A_ROBOT
96dad762b2 Update lang_en.lua (#544)
BiRS now allows you to spin the O1 piece.
2021-12-09 16:03:57 +08:00
MrZ626
5470387685 优化滚动
增加触摸控制
2021-12-09 15:55:09 +08:00
MrZ626
fa64c868b9 调整一些tip 2021-12-09 15:21:51 +08:00
MrZ626
2f4a416353 整理代码
调整模式排列顺序
2021-12-09 15:13:09 +08:00
MrZ626
3dbafb042c 进一步优化 2021-12-09 15:04:17 +08:00
MrZ626
97e7b019dd TRS的N/H块补充一个踢墙 2021-12-09 03:21:28 +08:00
MrZ626
28103ad952 新模式选择菜单原型
删除模式图标
动态加载所有模式
2021-12-09 03:20:57 +08:00
MrZ626
1826ca6f2f fix 2021-12-09 01:03:27 +08:00
MrZ626
db490a6c6c FILE.load新增-lua方式(直接运行,无环境限制) 2021-12-09 01:01:24 +08:00
MrZ626
421fdef4f9 调整两个群友词条的关键词 2021-12-09 01:00:40 +08:00
MrZ626
d717ce842d 调整tip 2021-12-08 09:19:58 +08:00
MrZ626
f13c9792af 调整把按键添加到录像的时机
修复触发了自动保存的最后一个按键本身不会保存到录像里
2021-12-08 08:40:24 +08:00
MrZ626
41e7b8e0f4 版本推进 2021-12-07 22:43:53 +08:00
MrZ626
4bd723a7ee 整理代码 2021-12-07 22:43:48 +08:00
MrZ626
66d5bd5490 更多场景的大标题添加最大显示长度 2021-12-07 22:40:16 +08:00
MrZ626
351d0258b2 再优化miya立绘 2021-12-07 22:40:16 +08:00
NOT_A_ROBOT
26fb9a7052 Add Strategy+ (#539) 2021-12-07 22:39:00 +08:00
MrZ626
307fd637fa 换新miya立绘
给不同立绘添加不同点击动画
2021-12-07 20:25:14 +08:00
MrZ626
93fb716f89 fix 2021-12-07 17:10:02 +08:00
MrZ626
7b41551e2d xitonglai 2021-12-07 16:57:47 +08:00
MrZ626
4806af5f7d 重做关于页面,赞助二维码搬家 2021-12-07 16:00:52 +08:00
MrZ626
85cb55cdd0 文本控件也支持设置最大宽度了 2021-12-07 15:51:19 +08:00
MrZ626
27a9697e47 修改scene模块,支持在切换场景的时候传参了 2021-12-07 15:04:27 +08:00
MrZ626
7d230cc3b0 修正印尼语按钮文本错误 close #536 2021-12-07 14:33:04 +08:00
MrZ626
0db2fffad1 版本推进 2021-12-07 01:43:17 +08:00
MrZ626
2a3296a0e8 调整pixel皮肤,修改x块的默认色为黄色 2021-12-07 01:26:46 +08:00
MrZ626
941b875afa 再微调语言设置界面
整理代码
2021-12-07 01:05:46 +08:00
MrZ626
99155bb9cf 更新macOS安装包用图
Co-authored-by: C₂₉H₂₅N₃O₅ <cgu52@wisc.edu>
2021-12-07 01:00:22 +08:00
MrZ626
0701dd2ad3 新皮肤:pixel(by C₂₉H₂₅N₃O₅) 2021-12-07 00:59:19 +08:00
MrZ626
5570c19e1f 调整颜色表
调整语言选择菜单
整理代码
2021-12-07 00:59:19 +08:00
NOT_A_ROBOT
a728c91476 Add Indonesian Translation (#535)
- Added Indonesian language file
- Added Indonesian button in language select menu
- Added Indonesian variant of the word "language" on the language select menu
- Added credit to me for translating (applies to all languages)
2021-12-07 00:00:51 +08:00
MrZ626
6a43481067 优化小程序triple体验 2021-12-06 22:42:49 +08:00
MrZ626
29a049fe4e 版本推进 2021-12-06 22:20:59 +08:00
MrZ626
b5a9c8e1bb 修正一处手柄事件可能爆炸 2021-12-06 21:17:30 +08:00
MrZ626
bb9a35c161 修复云存档/读档的一处小问题 2021-12-06 21:11:54 +08:00
MrZ626
b25a345b42 更换click音效,音乐室播放按钮声音调整 2021-12-06 20:33:41 +08:00
MrZ626
b22b0e0194 修正文件加载模块参数识别的小问题 2021-12-06 19:52:00 +08:00
MrZ626
55cf95f218 修正策略堆叠模式评级标准不当 2021-12-06 19:24:24 +08:00
MrZ626
225ddbcfac 调整几个tip 2021-12-06 16:43:46 +08:00
MrZ626
9377090c7c 【bug风险较大,需要测试】解耦玩家代码中的部分混战模式代码 2021-12-06 16:00:46 +08:00
MrZ626
ed002ec2e1 略微降低master-h模式骨块出现后的难度 2021-12-06 13:49:51 +08:00
MrZ626
e33036d9ec 调整几个词条的关键词 2021-12-06 12:46:17 +08:00
MrZ626
ef03e7c009 layout菜单名改为style 2021-12-06 12:46:11 +08:00
MrZ626
aef4220ac0 修复自定义场地16号颜色的方块名位置显示错误
优化皮肤设置页面交互效果
2021-12-06 03:25:39 +08:00
MrZ626
46223e38cd STRING模块新增一个简易摘要算法,未来保护用户密码明文可能用到 2021-12-06 03:18:41 +08:00
MrZ626
4bafa4bffe 版本推进 2021-12-05 22:01:16 +08:00
MrZ626
2b3dd877dd 修正100攻击竞速模式没有重力 2021-12-05 18:13:47 +08:00
MrZ626
0553e5c45e 调整中文tip 2021-12-05 18:11:12 +08:00
MrZ626
4d93374cf6 微调暂停界面和语言选择界面 2021-12-05 00:54:42 +08:00
MrZ626
4e421bf9ba 微调一些场景细节 2021-12-04 22:29:38 +08:00
user670
8b2a9d7c01 Update lang_en.lua (#534) 2021-12-04 22:17:43 +08:00
C₂₉H₂₅N₃O₅
5a3244d345 更改语言选择界面布局 (#532)
* 再更改语言选择布局
2021-12-04 19:56:24 +08:00
MrZ626
f1b9d0c5e4 新增返回按钮音效 2021-12-03 17:15:32 +08:00
MrZ626
6493e0e623 创建button和key控件时的sound参数可以指定音效名了 2021-12-03 16:45:37 +08:00
MrZ626
e71ba17f9f 微调一个中文词典词条 2021-12-03 11:57:21 +08:00
MrZ626
e656363e20 录像回放菜单对键盘支持更好 2021-12-03 11:23:44 +08:00
MrZ626
0826a748ae 版本推进 2021-12-03 11:04:51 +08:00
MrZ626
a595fe99ef 大规模整理中文tip 2021-12-03 10:50:05 +08:00
MrZ626
9dbc7942e3 调整语言菜单标题 2021-12-03 10:49:57 +08:00
C₂₉H₂₅N₃O₅
845d8ae32e 字体增加谚文/语言滚动菜单丰富 (#530)
* 字体支持谚文显示

* 语言选择界面滚动菜单增加一堆语言
2021-12-03 08:26:09 +08:00
MrZ626
5c524e138c 语言选择菜单会轮流显示不同语言的“语言” 2021-12-02 22:06:06 +08:00
MrZ626
86d9265ff9 修复最后一个hold的死锁问题 close #528 2021-12-02 18:42:03 +08:00
MrZ626
6994a5d6d3 调整tip 2021-12-02 18:16:59 +08:00
MrZ626
e6213b00c1 修复无尽挖掘规则包会对非指定背景做不好的事情 close #525 2021-12-02 14:07:52 +08:00
MrZ626
43e2caa30e 修正进入登录场景时本地没保存过账户信息文件时会弹出文件读取错误 2021-12-02 10:04:38 +08:00
MrZ626
97ca245dfc 修复放录像的时候虚拟按键不会自己动 2021-12-02 08:58:35 +08:00
MrZ626
36de1c0751 版本推进 2021-12-02 01:40:01 +08:00
MrZ626
704341fd15 修正软降在sddas/sdarr很小的时候行为不正确 2021-12-02 01:33:50 +08:00
MrZ626
22b61bc9c3 修正暂停界面数据显示条件为>=180帧而不是>180帧
key控件微调
2021-12-02 00:30:21 +08:00
MrZ626
f4cbbc0a2a 修复cc看不到初始场地 2021-12-01 22:15:54 +08:00
MrZ626
dc99187b9d 修改三个音效名称 2021-12-01 22:03:22 +08:00
MrZ626
915598dec4 整理代码,SFX模块load时会提示缺失多少音效 2021-12-01 19:23:39 +08:00
MrZ626
e7b4518d73 【警告:需要测试】
调整玩家能hold/移动/旋转方块的条件
修复cc复活后小bug
整理代码
2021-12-01 15:46:12 +08:00
NOT_A_ROBOT
9603a78e87 Halved field height for Big mode (#520)
* Halved field height for big mode

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-12-01 09:29:57 +08:00
MrZ626
bd90e051d4 版本推进 2021-12-01 02:41:18 +08:00
MrZ626
26e66b313f 继续收拾各种ui相关
空心控件统一加上灰色背景方便观察
按钮样式调整
2021-12-01 02:40:11 +08:00
MrZ626
c534bbd12a 微调马拉松和混战的速度曲线 2021-12-01 00:39:21 +08:00
NOT_A_ROBOT
83b5e217e5 Add Big Mode (#515)
I even halved the gravity :)
2021-12-01 00:10:00 +08:00
MrZ626
c0adf5bf0b COLOR模块新增三个半透明灰色并大量应用
微调颜色V和lV的hue值
2021-11-30 23:36:04 +08:00
MrZ626
4ff737a4ac 减小语音随机偏差范围 2021-11-30 23:20:59 +08:00
MrZ626
5af0706c09 普通消1不再有single语音 2021-11-30 22:52:27 +08:00
MrZ626
4ccee0f1de 修改小程序trp的next生成 2021-11-30 22:31:46 +08:00
MrZ626
9b752d540e 修正慢速下落有拖影不好看
测试代码忘删
2021-11-30 22:24:58 +08:00
MrZ626
e860c7b7ec 大改重力和软降的结算逻辑,两个值接近的时候不会看起来不自然了 close #438 2021-11-30 19:40:53 +08:00
C29H25N3O5
8a1fd9531f 修复NH块搞反的问题 2021-11-30 15:54:54 +08:00
C29H25N3O5
5fd6e0ee99 再更新虚拟按键贴图, 使用Plex字体 2021-11-30 15:54:52 +08:00
MrZ626
53b2b81fe0 再新增几个tip 2021-11-30 14:51:04 +08:00
MrZ626
6ccc811b46 微调tip 2021-11-30 12:56:32 +08:00
MrZ626
962a61567a OS X系统名称字符串强制改为macOS close #513 2021-11-30 12:25:59 +08:00
MrZ626
58f05e1cec 控制台sudo命令改名su 2021-11-30 12:22:14 +08:00
MrZ626
6b426790c7 调整小程序triple 2021-11-30 11:49:48 +08:00
MrZ626
d4fc578673 词典添加穿透词条 2021-11-30 11:17:17 +08:00
MrZ626
51b567b8db app -list输出美化 2021-11-30 03:53:22 +08:00
MrZ626
07b47dee3f 版本推进 2021-11-30 01:50:13 +08:00
MrZ626
4431a906b9 整理代码 2021-11-30 01:44:21 +08:00
NOT_A_ROBOT
2bb6852e3e Added multiple bg and bgm to Strategy Mode (#506)
(excluding strategy_e for the bgm)
2021-11-30 01:42:39 +08:00
user670
1948ed3e16 Update gameTables.lua (#508)
On an XBox controller, B is on the right and A is on the bottom (unlike a Nintendo controller), and it makes more sense to default B to rotate right and A to rotate left.
2021-11-30 01:42:02 +08:00
MrZ626
81b5ccae30 修复检测第一次启动失败 2021-11-30 01:40:53 +08:00
MrZ626
5543ff0d29 新小程序:Triple 2021-11-30 01:40:49 +08:00
MrZ626
cd567e9e98 删除添加作者qq按钮 2021-11-30 01:40:01 +08:00
MrZ626
5d86925a8a 大多数菜单的二次确认统一用tryXXX管理 2021-11-30 01:40:01 +08:00
MrZ626
e3db564a4b 整理代码,返回需要二次确认的小程序统一用一个函数 2021-11-30 01:40:01 +08:00
MrZ626
a4293624ab 微调wine颜色 2021-11-29 22:24:17 +08:00
MrZ626
367e2dc81a 新增几个tip 2021-11-29 21:32:09 +08:00
MrZ626
9ec33c6eef 修改BGM: sugar fairy的作者标注 2021-11-29 21:32:08 +08:00
MrZ626
9c9b8d36f2 小程序mem平衡调整 2021-11-29 21:32:08 +08:00
MrZ626
4fc6f335c7 新增小程序:Memorize 2021-11-29 15:40:55 +08:00
MrZ626
d2f4123d08 修改两个有数字键盘的小程序的退格键图标 2021-11-29 15:40:40 +08:00
MrZ626
b29d352a1b 把主菜单快捷键加回来 2021-11-29 12:57:17 +08:00
MrZ626
cd5a71cd12 更新赞助名单 2021-11-29 12:49:58 +08:00
MrZ626
cdd68e985d 修正键位设置菜单里mac的del键符号错误 2021-11-29 11:15:24 +08:00
MrZ626
8cf4d4280c 修正Ospin变O后操作序列不清空
Ospin变远端朝下JL时允许水平可移动
2021-11-29 11:11:54 +08:00
C29H25N3O5
cd29bf8702 调整字体
* Monospaced字体简中字库使用大陆标准字形, 日语部分仍然使用日语字形
* 调整自定义图标手柄和键盘部分的文字字体
* 修复proportional字体a的变音符没对齐的问题
* 修复Monospaced字体ij连字的问题
* 修复Monospaced字体slash还用的是plex字体的问题
2021-11-28 18:24:11 -06:00
MrZ626
13d98be051 版本推进 2021-11-29 04:23:05 +08:00
MrZ626
a350ff3182 微调背景模块,自定义模式设置背景的时候访问不到特殊背景了 2021-11-29 04:22:08 +08:00
MrZ626
e0360cc7eb 修正一处模块更新错误(傻了) 2021-11-29 03:57:18 +08:00
MrZ626
4249a29b63 继续优化键位设置菜单 2021-11-29 03:38:05 +08:00
MrZ626
43b2a0a8c8 优化键位设置菜单各种键的显示 2021-11-29 03:27:57 +08:00
MrZ626
6d6584f99e 修改按钮音效,给复选框和选择器添加新音效 2021-11-29 02:48:41 +08:00
MrZ626
077c651226 微调键位设置菜单 2021-11-29 01:16:22 +08:00
MrZ626
3fc872aa76 微调几个隐藏模式入口点击范围 2021-11-28 22:39:49 +08:00
MrZ626
cb0b347a38 更新赞助名单 2021-11-28 22:21:10 +08:00
MrZ626
d08967c688 整理词典 2021-11-28 22:02:39 +08:00
MrZ626
3666c0caa9 修复更换自定义背景图片时没有更新尺寸 2021-11-28 20:52:12 +08:00
MrZ626
4ef179fccb 控制台场景向全局环境添加一个输出到控制台的函数 close #499 2021-11-28 19:51:46 +08:00
MrZ626
861f9b3caa 继续完善手柄控制 2021-11-28 19:40:26 +08:00
MrZ626
05292df456 模式地图上读取手柄按键时不再报错 2021-11-28 17:43:36 +08:00
MrZ626
9fed692223 控制台help命令输出美化 close #502 2021-11-28 16:53:24 +08:00
MrZ626
b1c04c1fea 修复自定义模式用按钮开始游戏会报错 2021-11-28 16:21:27 +08:00
MrZ626
bc9adc2cd3 调整扳机键的默认触发阈值 2021-11-28 16:16:44 +08:00
MrZ626
cdf149afca 略微优化自定义背景绘制性能 2021-11-28 05:20:29 +08:00
MrZ626
73145b4e5e 自定义背景拖入无法识别的格式时会提示 2021-11-28 05:20:18 +08:00
MrZ626
f8b9f30fd6 修改框架的光标默认位置 2021-11-28 05:02:29 +08:00
MrZ626
e6bc567b12 两种按钮上的文本也会挤压绘制了
优化控件绘制性能
修正两个背景设置按钮位置错误
调整之前忘了同步的语言
2021-11-28 04:56:55 +08:00
MrZ626
fe004a72f0 版本推进 2021-11-28 04:17:44 +08:00
MrZ626
0433fd3d9d 三个高难隐形使用不同模式图标 close #493 2021-11-28 04:10:42 +08:00
MrZ626
1c18060570 尝试修复地图菜单读取手柄摇杆位置错误 2021-11-28 04:06:37 +08:00
MrZ626
be54c0e641 关闭背景时亮度可调
新增自定义图片背景功能(可调透明度,目前仅电脑可用)
2021-11-28 03:56:53 +08:00
MrZ626
0be2eb9107 修正一处可能未改回材质缩放模式 2021-11-28 03:30:34 +08:00
MrZ626
4859faf1e7 创建控件允许留空code域,什么都不会发生 2021-11-28 02:03:52 +08:00
MrZ626
c25d40c67d 启动加载数据文件时允许不存在,不会提醒 close #495 2021-11-28 01:59:24 +08:00
MrZ626
b6c37a5c9f 框架keyDown事件机制微调,重构框架主循环和控件相关代码
可以用键盘和手柄控制光标(手柄不完善)
整理代码和部分语言文件细节
2021-11-27 23:16:21 +08:00
MrZ626
f6b4c1b109 整理代码,表示键盘按键的字符串使用单引号 2021-11-27 19:01:32 +08:00
MrZ626
841faeede4 版本推进 2021-11-27 14:33:38 +08:00
MrZ626
e61b9b23a0 修复右侧c/s/a+方向键不能触发控件功能 close #492 2021-11-27 14:33:36 +08:00
MrZ626
72a826ef0a 微调报错界面,日志使用等宽字体 2021-11-27 14:25:13 +08:00
MrZ626
f070b8f295 修正svg标题的小问题 2021-11-27 14:20:05 +08:00
MrZ626
1646b75520 修正TRS的v块1<->2比0<->3少一个踢墙 2021-11-27 14:20:05 +08:00
C29H25N3O5
241617e31a 微调字体
* Monospaced的CJK字体也调整为思源
* 改动几个新元素汉字
* 精简Monospaced字符集
2021-11-26 22:58:40 -06:00
MrZ626
5de2893e07 帮0.17前的版本自动调大1帧的das打断,尝试维持手感 2021-11-27 05:52:35 +08:00
MrZ626
030e894040 theme移出框架,大改通常bgm的配置 2021-11-27 05:35:55 +08:00
MrZ626
e7b9a4ba87 添加DRS_weak旋转系统 close #441 2021-11-27 05:09:02 +08:00
MrZ626
617bae67c6 修正matt的一些翻译修改和控制台代码 2021-11-27 04:47:48 +08:00
MattMayuga
64d2d08820 Update English translation (#487)
* Update readme.md

* Update lang_en.lua

* Update app_console.lua

* Update error.lua

* Add warnings and extended time to 10s for resetall

When you use the resetall command, you will now get a message that there is no way to recover the saved data when it is deleted.
2021-11-27 04:28:08 +08:00
NOT_A_ROBOT
037b33c99a Update theme list (#489) 2021-11-27 04:26:40 +08:00
MrZ626
afa69ce9a4 版本推进 2021-11-27 04:24:41 +08:00
MrZ626
3226c0c831 重构字体模块,支持多字体
控制台应用等宽字体
2021-11-27 04:24:40 +08:00
MrZ626
4e759cad4c ultra模式重开时会重新播放bgm 2021-11-27 02:05:48 +08:00
MrZ626
291795928d 更多的设置修改的时候会触发警告 2021-11-26 21:52:10 +08:00
MrZ626
a1315e7f7f 修复一处遗留逻辑hold和序列生成相关的错误 2021-11-26 21:24:34 +08:00
MrZ626
657bc2b4e0 修正加载文件的时候会因为没有应用语言没法弹出消息而报错 2021-11-26 14:15:42 +08:00
MrZ626
d8b12fc55d 版本推进 2021-11-26 01:48:23 +08:00
MrZ626
6d11367ea4 新BGM:malate(暂未使用) 2021-11-26 01:47:14 +08:00
MrZ626
eb9e741b4f 关于界面的对称40行入口换成堆积模式 2021-11-26 00:59:23 +08:00
MrZ626
c47546d501 微调一些玩家动作逻辑
修复零ARE+非零lineARE的时候ihs失效
2021-11-26 00:55:29 +08:00
MrZ626
11aa178fc1 ultra模式计时器样式改为数字 2021-11-25 19:58:22 +08:00
MrZ626
f3a88ef269 游戏内再次封装saveFile和loadFile函数
原本的FILE模块更独立,不基于全局text变量和报错信息而是直接报错
2021-11-25 17:38:09 +08:00
MrZ626
720dc2131f 字符串扩展模块给默认string库补充两个方法repD和sArg 2021-11-25 17:37:46 +08:00
MrZ626
701ef17ae1 大爆炸改名清版竞速 2021-11-25 14:03:36 +08:00
MrZ626
1a689a5f07 修正当前方块显示条件 2021-11-25 09:57:45 +08:00
MrZ626
ef12ab0cee 版本推进 2021-11-25 02:43:57 +08:00
MrZ626
3d26db7a01 整理代码,修复消行延迟和出块延迟在极小时的错误行为 2021-11-25 02:42:25 +08:00
MrZ626
dd3df9981b TRS的J/L新增一个踢墙 2021-11-25 02:08:53 +08:00
MrZ626
5d04e83529 修正一个赞助id 2021-11-25 01:13:55 +08:00
MrZ626
7ed4626d71 微调logo 2021-11-24 21:34:26 +08:00
MrZ626
ecf5a29a71 添加一个赞助人 2021-11-24 20:36:52 +08:00
MrZ626
1a24b346a0 修正英文文本缺一个holdMode 2021-11-24 20:36:47 +08:00
MrZ626
72d06c7a02 软降n格的键也可以触发深降 2021-11-24 20:26:24 +08:00
MrZ626
26fde8c694 微调默认摇杆参数 2021-11-24 20:17:53 +08:00
MrZ626
8adeb99be7 修正标题图像素材首字母偏低 close #485 2021-11-24 19:39:38 +08:00
MrZ626
c92f15156b 虚拟按键显示开关移至菜单第一页
修改部分不常用设置时会显示警告
2021-11-24 19:33:08 +08:00
MrZ626
63f69d712b 修复自定义房间改不了锁外即死规则 close #484 2021-11-24 11:20:49 +08:00
MrZ626
55a1bd06f3 版本推进 2021-11-24 06:41:51 +08:00
MrZ626
6a29abf7f0 自定义hold数量为0时不显示hold模式选择器,顺便更新创建房间参数ui遗漏 close #483 2021-11-23 22:30:43 +08:00
MrZ626
83bdd9f2c4 【警告:可能有bug,需要测试】
较大规模整理玩家相关代码
较大规模整理玩家相关代码,重构出块延迟和消行延迟逻辑,现在0是真的无延迟,不再有1帧等待了
添加出块延迟打断(即ARE打断)(不包括消行延迟,默认为打断至无穷大,相当于无此功能)
自定义游戏和自定义房间ui跟进
close #471
2021-11-23 20:26:31 +08:00
MrZ626
95879827c8 调整游戏大logo为正体字 2021-11-23 18:13:45 +08:00
MrZ626
2ade518207 调整tip 2021-11-23 00:48:49 +08:00
MrZ626
36c8449e4d 内存过低的提示每次启动最多出现三次 2021-11-23 00:28:08 +08:00
MrZ626
3c04df69f3 移除手柄时自动松开所有按下了的键,整理代码 2021-11-23 00:27:57 +08:00
MrZ626
1224ee9a67 词典的新人引导条目链接向user670的翻译版本 close #482 2021-11-22 23:45:54 +08:00
MrZ626
fdd1d4463a 版本推进 2021-11-22 21:55:58 +08:00
MrZ626
940ac3736c 整理框架代码
整理手柄的摇杆/扳机支持代码
2021-11-22 15:59:57 +08:00
user670
d38897b54d (Experimental) Support controller axises, closes #466 (#477)
* (Experimental) Support controller axises

* Remove redundant variable; use more readable key event names

* Remove redundant comment; fix typo
2021-11-22 15:52:51 +08:00
MrZ626
90848c6654 全局默认使用5帧窒息延迟 2021-11-22 12:48:02 +08:00
NOT_A_ROBOT
0220d5aefc Make Strategy Ultimate have rhombus outline (#481) 2021-11-22 11:08:13 +08:00
MrZ626
f42032df07 更新赞助名单 2021-11-22 11:04:32 +08:00
MrZ626
05d7eb60bc 修正一处拼写问题导致报错消息识别错误 2021-11-21 21:45:37 +08:00
MrZ626
942416317c 小程序arm添加计时器和重置按钮,删除测试用的跳过按钮 2021-11-21 20:18:42 +08:00
MrZ626
576de945fb 添加一打tip 2021-11-21 05:25:55 +08:00
MrZ626
8b02084428 修复bgm模块清缓存导致报错 2021-11-21 05:11:01 +08:00
MrZ626
9f666d69db 调整大爆炸模式模板 2021-11-21 03:52:13 +08:00
MrZ626
a4c52d9162 修正玩家创建任务第一次初始化运行的时候报错没有任何提示 2021-11-21 03:08:34 +08:00
MrZ626
592b11366e table扩展模块新增两个去重方法和反转方法 2021-11-21 03:06:00 +08:00
MrZ626
07f50b9243 调整一些文本文件 2021-11-20 03:39:05 +08:00
MrZ626
ec74d55686 整理代码 2021-11-20 03:28:58 +08:00
MrZ626
4518513e87 应用1的语音偏移半径 2021-11-20 03:28:19 +08:00
MrZ626
7df4e2144f 语音模块支持设置轻微随机音调偏移半径(默认关闭) 2021-11-20 03:27:53 +08:00
MrZ626
7f9c9248ce 版本推进 2021-11-19 17:36:12 +08:00
MrZ626
9c1db48804 整理代码 2021-11-19 17:35:53 +08:00
C₂₉H₂₅N₃O₅
0628830f0c 继续调词典(嗯) 2021-11-19 01:21:48 -06:00
C₂₉H₂₅N₃O₅
9436f2f5fb 微调词典 大改legals (#472) 2021-11-19 01:17:12 -06:00
MrZ626
c5e1b5617f 再调整词典两个词条 2021-11-19 14:21:42 +08:00
MrZ626
298c417aa3 更新部分词条(英文待翻译) 2021-11-19 02:40:46 +08:00
MrZ626
fc74831700 添加lockout判负规则(默认关闭) 2021-11-19 02:33:21 +08:00
MrZ626
d9db55de44 整理代码,修正一处多余代码忘了删 2021-11-19 02:16:34 +08:00
MrZ626
3fd205e8c2 bgm模块添加可调节的最大加载数限制,更不容易达到引擎加载音频数上限 close #447 2021-11-19 01:47:14 +08:00
MrZ626
5cb828fb92 修改策略堆叠模式的解锁路径 2021-11-19 00:59:16 +08:00
MrZ626
5f7a3fd53f 版本推进 2021-11-18 19:54:31 +08:00
MrZ626
8e3e598753 词典添加cambridge词条(翻译自tetris wiki) 2021-11-18 19:52:42 +08:00
MrZ626
2a0a0f60f8 策略堆叠的das和arr参数移到规则包 2021-11-18 19:43:18 +08:00
MrZ626
6b7d1fdf9f 策略堆叠模式添加到地图 2021-11-18 19:41:27 +08:00
MrZ626
65199a40f7 修复40行效率左侧信息颜色问题 2021-11-18 19:27:27 +08:00
MrZ626
f9082a8800 整理代码 2021-11-18 19:16:06 +08:00
NOT_A_ROBOT
1670c6e7d6 Add strategy modes (#468)
* Add strategy mode
2021-11-18 19:08:46 +08:00
NOT_A_ROBOT
ff2073ed4d fix numpadenter on console (#469)
made numpadenter do the same thing as enter on console
2021-11-18 19:08:46 +08:00
MrZ626
f14aaac635 微调staff页面 close #470 2021-11-18 19:08:46 +08:00
MrZ626
c709fa622f 修正hold模式没有英文文本 2021-11-18 19:08:45 +08:00
MrZ626
c752556bf3 微调pc联系模式左侧信息位置
继续推进大爆炸模式框架
2021-11-18 03:54:42 +08:00
MrZ626
e7d9703fcc 修复向玩家场地里塞入垃圾行时如果不存在当前方块会报错 2021-11-18 03:54:42 +08:00
C29H25N3O5
1ed52a84b0 增加半隐和全隐的英文词条 2021-11-17 11:50:04 -06:00
C29H25N3O5
4fdb278751 微调dmg背景图片 2021-11-17 11:29:41 -06:00
MrZ626
8318803923 修改一首bgm名称和一个赞助id 2021-11-18 01:07:27 +08:00
MrZ626
42de7e3676 纠正一个帮助开发的网友id 2021-11-17 22:14:40 +08:00
MrZ626
3efa646ee3 再增加堆积模式的窒息延迟 2021-11-17 22:11:50 +08:00
MrZ626
b414c2ab42 版本推进 2021-11-17 22:08:00 +08:00
MrZ626
205dea3db7 TRS的S/Z添加四个踢墙防止在一些地方卡死 2021-11-17 21:49:37 +08:00
MrZ626
6cac688555 完善提前移动词条 2021-11-17 20:48:40 +08:00
MrZ626
09b1b08c1e 堆积模式添加8f窒息延迟 2021-11-17 20:29:42 +08:00
MrZ626
b61a1270e9 生成位置预览开启后hold的生成位置也可见 2021-11-17 16:47:25 +08:00
MrZ626
b85cee7e1f 修复机翻语言超级消除没有行数显示 close #462 2021-11-17 16:30:00 +08:00
MrZ626
8e674e3e29 版本推进 2021-11-17 16:25:38 +08:00
MrZ626
aa2812c874 大爆炸模式框架完成,等待具体关卡生成算法 2021-11-17 16:24:18 +08:00
MrZ626
6f282431c4 pc训练的序列模式和旋转系统参数放入规则包 2021-11-17 16:01:09 +08:00
MrZ626
470e54cdd0 两个pc练习模式添加胜利条件,不再无尽
略微降低pc练习-普通的X评级标准
2021-11-17 16:01:08 +08:00
MrZ626
da3ef1c2a6 pc训练代码整理,开局就能看到关卡并且没有提前硬降不会死的bug了 2021-11-17 16:01:08 +08:00
MrZ626
9efe0e62d5 词典添加半隐和全隐词条(英文待翻译) 2021-11-17 16:01:08 +08:00
MrZ626
7038f81b46 调整一些tip
整理代码
2021-11-17 10:59:38 +08:00
MrZ626
de972a60df blackhole背景改名blockhole 2021-11-17 10:59:34 +08:00
MrZ626
6a87787d6f 微调github issue模板 2021-11-17 10:59:30 +08:00
MrZ626
6dc9a4b507 安全,安全!(嗯嗯嗯 2021-11-17 10:59:27 +08:00
MrZ626
5b7c888d57 修正经典模式显示的速度等级 2021-11-17 10:59:01 +08:00
MrZ626
a1f761b83e 修正一处拼写错误 2021-11-17 10:58:51 +08:00
C₂₉H₂₅N₃O₅
c40a6bfaa0 换行 (#463) 2021-11-16 14:28:30 -06:00
MrZ626
441c6f7667 再次修复安全漏洞(嗯 2021-11-17 01:15:03 +08:00
MrZ626
a07d57cf71 版本推进 2021-11-16 20:39:29 +08:00
MrZ626
a467f972f9 调整死亡延迟的称呼 2021-11-16 20:39:19 +08:00
MrZ626
3f455ee360 整理代码 2021-11-16 20:29:55 +08:00
MrZ626
7a0b913768 修复安全漏洞(确信 2021-11-16 14:47:42 +08:00
MrZ626
a7b240ade8 微调符号语言 2021-11-16 14:00:09 +08:00
C₂₉H₂₅N₃O₅
bb64404821 完善字体和符号文本 (#460) 2021-11-15 22:27:40 -06:00
MrZ626
caf92eb3c8 修正几处全半角括号 2021-11-16 11:25:16 +08:00
MrZ626
6a117a0fab 词典添加死亡延迟词条 2021-11-16 11:18:33 +08:00
MrZ626
26682509f7 添加防止死亡延时 close #459 2021-11-16 11:18:32 +08:00
C₂₉H₂₅N₃O₅
d85d92fb43 添加几种语言的赞助说明 (#458) 2021-11-15 17:06:49 -06:00
MrZ626
c412003cb3 调整关于页面信息
词典添加patreon词条
2021-11-16 03:55:57 +08:00
MrZ626
e39b5dbd51 修改中文词典的官网词条 2021-11-16 03:27:46 +08:00
MrZ626
db162ea66f 微调about信息 2021-11-16 03:27:46 +08:00
Not-A-Normal-Robot
f9f9fde368 修改 legals.md 一处拼写错误 (#457) 2021-11-15 10:57:16 -06:00
MrZ626
4b221c2eb5 版本推进 2021-11-15 15:52:16 +08:00
MrZ626
ed45bebfa0 添加转盘模块和实验性每日转盘小程序 2021-11-15 15:47:05 +08:00
MrZ626
fa0bc3805f 整理代码,Zframework添加数学扩展模块 2021-11-15 15:46:57 +08:00
MrZ626
7710f0b70f 修正词典 2021-11-15 02:13:56 +08:00
C₂₉H₂₅N₃O₅
0277ddadb5 微调词典 (#456) 2021-11-14 12:05:00 -06:00
MrZ626
88e23e32f5 piano小程序支持shift/ctrl升降半音,左右alt变调,补充更多键位 2021-11-15 02:00:04 +08:00
MrZ626
8ab5b4a17a SFX模块新增音高获取音名的方法
整理代码
2021-11-15 02:00:04 +08:00
MrZ626
503dfd69ef 再调整SFX.playSample方法,支持用数字代表绝对音高,但是移除最后的音量参数 2021-11-15 01:40:53 +08:00
ParticleG
ae61ec26c0 - Remove upload to server 2021-11-15 01:39:37 +08:00
MrZ626
00bc24bd50 新增piano小程序(目前只支持键盘操作) 2021-11-14 22:19:45 +08:00
MrZ626
abd15d6307 table扩展模块新增一个函数 2021-11-14 22:09:44 +08:00
MrZ626
c01ac546d1 再修正播放采样的超音域问题 2021-11-14 21:48:02 +08:00
MrZ626
af77221ba2 修复换准备音效播放方式后ultra模式倒计时没声 2021-11-14 17:34:41 +08:00
MrZ626
204f0938d3 播放准备音效的函数可调音量 2021-11-14 17:32:10 +08:00
MrZ626
ad39d1408c 音乐室输入首字母自动跳转 2021-11-14 17:31:49 +08:00
MrZ626
ed011173f6 版本推进 2021-11-14 16:53:43 +08:00
MrZ626
491fcb5860 添加缓冲区和消失区两个词条
Co-authored-by: C₂₉H₂₅N₃O₅ <cgu52@wisc.edu>
2021-11-14 16:45:53 +08:00
MrZ626
c2d5537d8d 经典模式添加干旱计数器 close #452 2021-11-14 16:45:50 +08:00
MrZ626
7d5037ae87 竞速-效率显示剩余行数 2021-11-14 12:37:39 +08:00
MrZ626
07d7714317 修正无尽模式标题首字母大小写错误 close #454 2021-11-14 12:19:26 +08:00
MrZ626
2cab97f37d 修复0arr时自动移动时声音特别响 2021-11-14 11:49:41 +08:00
MrZ626
d184778c9a 修正string扩展模块时间转换函数可能出现1分60(截断小数点后两位防止被向上取整) 2021-11-14 11:24:11 +08:00
MrZ626
9fd3b3008d 新增物品数据,每日登录新增加一个zTicket 2021-11-13 22:33:25 +08:00
MrZ626
71aa35b214 修正统计里的日期每次启动都被刷新了导致单日统计时间不对 2021-11-13 17:32:54 +08:00
MrZ626
4443dc9d3e table扩展模块添加一个方法(未来会整理类似数据表更新函数) 2021-11-13 17:29:17 +08:00
MrZ626
839e357301 修改更新历史 2021-11-13 16:31:46 +08:00
MrZ626
ac56c5a415 修改竞速-效率左侧信息栏 2021-11-13 16:23:27 +08:00
MrZ626
36e3343341 TRS的J5和L5新增一个180度踢墙 2021-11-13 16:14:36 +08:00
MrZ626
510f7d7513 版本推进 2021-11-13 05:42:36 +08:00
MrZ626
3128eb38c0 再调整一些模式的bgm 2021-11-13 05:41:27 +08:00
MrZ626
14ef654612 混战模式信息绘制从玩家类移到规则包 2021-11-13 05:21:59 +08:00
MrZ626
bc5193f95e 落块事件改名落块钩子
添加死亡钩子(仅在窒息和超高触发)
堆积模式消行动作挂到死亡钩子上
2021-11-13 05:20:32 +08:00
MrZ626
8cbb4a38bc dropPiece事件改名hook_drop 2021-11-12 23:20:29 +08:00
MrZ626
fce08c83ef 堆积模式移出地图,删除h难度 2021-11-12 21:17:30 +08:00
MrZ626
018e99f9e6 修正改评级文本后tip没改 2021-11-12 16:39:30 +08:00
MrZ626
7fe390b34b 赞助名单添加三位 2021-11-12 16:28:37 +08:00
MrZ626
8c7202c569 版本推进 2021-11-12 03:35:54 +08:00
MrZ626
ab386bb53c 整理代码 2021-11-12 03:30:52 +08:00
MrZ626
87c791b8c7 tips新增几个好玩的游戏 2021-11-12 02:58:17 +08:00
MrZ626
00e3e2d19d 取消准备按钮不再只显示取消两个字 2021-11-12 02:54:14 +08:00
MrZ626
8d7d5c7b04 新BGM:peak(暂未使用) 2021-11-11 19:22:45 +08:00
MrZ626
849a18e159 移除模式的颜色 2021-11-11 19:14:37 +08:00
MrZ626
a4357d0843 移除节奏模式,准备之后添加音游模式 2021-11-11 18:59:04 +08:00
MrZ626
e2b4a78b59 修正超音源音域音符处理方法 2021-11-10 21:15:50 +08:00
MrZ626
01387b5488 版本推进(修改更新历史和build号) 2021-11-10 18:30:34 +08:00
MrZ626
168e2f80b8 SFX.play新增pitch参数,playSample方法允许超过音源范围(差太多了效果不好) 2021-11-10 17:52:48 +08:00
MrZ626
4f79ef8708 改进一处材质缺失后的报错 2021-11-10 16:40:00 +08:00
MrZ626
16497833df 修正COLOR.hsv函数s小于0时漏返回透明度 close #445 2021-11-10 14:35:22 +08:00
MrZ626
cd6a50d5a0 修复词典导出词条保留了替换敏感词的特殊字符 2021-11-10 14:35:22 +08:00
C₂₉H₂₅N₃O₅
4c5a61f2d8 修改License相关内容 (#444) 2021-11-09 21:38:45 -06:00
C29H25N3O5
1fd8d39970 更换中文字形 2021-11-09 18:57:35 -06:00
MrZ626
d133d64890 目标分数显示器分割线长度微调 2021-11-09 23:16:33 +08:00
MrZ626
b27aa8b60d freeRow模块改名line模块并暂时在“行”的管理上不再那么节约地使用内存 2021-11-09 20:14:08 +08:00
MrZ626
230d67492e 测试场景左上文本从最晚的开始显示 close #437 2021-11-09 16:04:08 +08:00
MrZ626
4f9d5b282c 修正一个开发者id写法问题 2021-11-09 16:04:08 +08:00
ParticleG
a2955e8722 - Fix wrong action name 2021-11-09 16:04:07 +08:00
MrZ626
df892671d5 修改更新历史和build号 2021-11-09 16:04:07 +08:00
MrZ626
7fa96eee1a 被攻击时场地会抖动 2021-11-09 16:04:07 +08:00
MrZ626
a1030906c7 场地晃动改名swing
添加场地抖动特效(跟场地晃动使用同一个设置值)
2021-11-09 16:04:07 +08:00
MrZ626
e6a9a4f4be 微调wine颜色,dark颜色更dark 2021-11-09 16:04:07 +08:00
MrZ626
efa1247596 颜色表的灰色饱和度更低并改为偏暖 2021-11-09 16:04:07 +08:00
MrZ626
069fcee721 整理代码
移除旧的切换攻击模式代码
旋转导致场地倾斜封装成玩家方法
调整瞬移到左右的场地晃动程度
调整场地平移晃动的恢复速度
软降触地时也会播放触地音效
2021-11-09 16:04:07 +08:00
C₂₉H₂₅N₃O₅
66621404f1 Changed the colours and the fonts in the game (#435)
* 微调字体

* 调整配色, 微调字体
2021-11-09 16:04:06 +08:00
ParticleG
e09609ea21 - Use Python 3.9 2021-11-09 16:04:06 +08:00
ParticleG
d02ae67bc0 - Add logs to upload-artifact 2021-11-09 16:04:06 +08:00
ParticleG
27327d57c4 - Test Windows with curl 2021-11-09 16:04:06 +08:00
MrZ626
cce93b6df9 整理代码 2021-11-09 16:04:06 +08:00
ParticleG
546104ba5b - Add Upload Action 2021-11-09 16:04:06 +08:00
MrZ626
ca5816ba14 进入newRoom菜单时不会试图修改背景和bgm 2021-11-09 16:04:06 +08:00
MrZ626
e5bd16476e 修改更新历史和build号 2021-11-09 16:04:05 +08:00
MrZ626
94431d4c2e 只在更新后触发自动转换以旧版本模式名存储的数据文件 2021-11-09 16:04:05 +08:00
MrZ626
f98d6892f1 颜色表改用hsv生成 2021-11-09 16:04:05 +08:00
MrZ626
1fe436cbe3 微调词典
微调两个小程序
整理代码
2021-11-09 16:04:05 +08:00
MrZ626
c5a37a9920 微调中文词典两个词条 2021-11-09 16:04:05 +08:00
MrZ626
eed7e96096 无尽马拉松的are每300行减小一次,line are每100行减小一次 2021-11-09 16:04:05 +08:00
MrZ626
a7f36a4162 无尽马拉松添加1700行的终点 2021-11-09 16:04:05 +08:00
MrZ626
8ba872d45d 微调排行榜字体大小 2021-11-09 16:04:04 +08:00
MrZ626
7a55451faa 无尽马拉松添加排行榜 2021-11-09 16:04:04 +08:00
MrZ626
372571bd80 修改更新历史
整理代码
2021-11-09 16:04:04 +08:00
MrZ626
77120c0b90 调整无尽马拉松的难度曲线 2021-11-09 16:04:04 +08:00
Not-A-Normal-Robot
01d1e44644 Decrease lock delay when level up above lvl20 2021-11-09 16:04:04 +08:00
Not-A-Normal-Robot
0ad8cddefe Added Infinite Marathon 2021-11-09 16:04:03 +08:00
MrZ626
ce67253502 修改更新历史 2021-11-09 16:04:03 +08:00
MrZ626
cb9f2c0617 修改mph模式的bgm 2021-11-09 16:04:03 +08:00
MrZ626
635d9407ed 新模式:竞速-效率 2021-11-09 16:04:03 +08:00
MrZ626
0f9f6565f1 修复超级消除结算时分数计算变量写错导致报错 2021-11-09 16:04:03 +08:00
MrZ626
a45b6ad57e move音效在方块因重力或旋转触地时也会播放,而不只是移动后
move音效名改为touch
2021-11-09 16:04:03 +08:00
MrZ626
a5de06dedb 修改更新历史 2021-11-09 16:04:03 +08:00
MrZ626
fbfbd1ed98 修正pr的一个符号错误 2021-11-09 16:04:02 +08:00
C₂₉H₂₅N₃O₅
8f06b3bd1a Changed the font and CN tips (#433)
* 补全英文词典翻译

* 大改字体

- 西文部分采用IBM Plex
- 全角标点样式采用西文样式
- 添加类Plex的IPA符号

* 微调中文tips

* 更新 Legals

* 修正一个语法错误
2021-11-09 16:04:02 +08:00
C₂₉H₂₅N₃O₅
7e0dbceefc 补全英文词典翻译 (#431) 2021-11-09 16:04:02 +08:00
MrZ626
7e3db1de17 新BGM:1989(用于几个经典模式)
重新安排一些模式的BGM
2021-11-09 16:04:02 +08:00
MrZ626
111790fdab 修正自动打包没有把legals.md和license.txt文件放进去 2021-11-06 03:27:09 +08:00
MrZ626
bec03de7b8 纠正几个错别字 2021-11-06 00:50:12 +08:00
MrZ626
f5dfae3a6c 词典新增deepdrop词条 2021-11-06 00:40:04 +08:00
MrZ626
d3dec2b5f1 更新版本号为0.17.0,追加更新历史 2021-11-06 00:39:50 +08:00
MrZ626
f083136998 整理代码 2021-11-05 11:02:45 +08:00
MrZ626
cd3d0b370c 修改一些词典词条 2021-11-05 10:36:49 +08:00
MrZ626
f4c6632941 降低无旋转40L评级标准 2021-11-04 21:57:24 +08:00
MrZ626
750cb9a669 调整繁中一些用词
微调语言菜单按钮文本大小
2021-11-04 21:50:05 +08:00
C₂₉H₂₅N₃O₅
62a198a017 添加繁体中文语言, 语言切换界面变更颜色和布局 (#429) 2021-11-04 21:39:05 +08:00
MrZ626
5780ba0f3e 词典other分类改为org并移到开始的help版块后
词典新增一个词条等待翻译
2021-11-04 19:40:42 +08:00
ParticleG
86edeb1e0c - Fix wrong upload file suffix 2021-11-04 16:12:48 +08:00
Particle_G
53b1852f28 Rel ios test (#427)
* - Test Release note

* - Test ios changelog

* - Finish touching
2021-11-04 04:01:12 +08:00
MrZ626
e3c385693b 修改更新历史和build号 2021-11-03 19:45:23 +08:00
MrZ626
572c0fbfa1 调整方块朝向菜单彩蛋模式进入方式 2021-11-03 19:43:36 +08:00
MrZ626
bbdf71167a 调整录像回放菜单按钮尺寸 2021-11-03 19:14:43 +08:00
MrZ626
2136ccd9a2 更新词典中的一些玩家信息 2021-11-03 15:46:46 +08:00
MrZ626
2131aea575 玩家类添加一个目标线绘制函数
堆叠模式添加需要填满的高度线
2021-11-03 15:41:13 +08:00
MrZ626
32b21c7d29 修改更新历史 2021-11-03 13:37:58 +08:00
MrZ626
8f6f6f316f 微调倒计时动画 2021-11-03 13:33:44 +08:00
MrZ626
66f9ac2791 修复无尽挖掘开局垃圾行可能会在同一列 2021-11-03 13:21:51 +08:00
MrZ626
ac0ba90438 修复wing背景颜色配置问题 2021-11-03 13:21:37 +08:00
MrZ626
990659ce91 修改更新历史和build号 2021-11-03 02:42:38 +08:00
MrZ626
00c602c844 再调整超级消除音效
调整launchpad
2021-11-03 02:40:21 +08:00
MrZ626
9db62ffc39 调整堆叠模式平衡 2021-11-03 02:33:31 +08:00
MrZ626
e7c777e502 超级消除有分数了
再调整超级消除的声音
2021-11-02 22:17:44 +08:00
MrZ626
4991e8cea2 优化堆叠模式体验,微调难度和评级 2021-11-02 20:15:23 +08:00
MrZ626
111d4e991f 微调单次超大消除相关的文本和效果 2021-11-02 19:37:50 +08:00
MrZ626
bedfa74a32 整理代码 2021-11-02 19:34:46 +08:00
MrZ626
f6944dc223 微调test模块 2021-11-02 17:39:23 +08:00
MrZ626
a34a3051a3 Merge remote-tracking branch 'tech/ci-autotest' into HEAD 2021-11-02 17:39:13 +08:00
MrZ626
0e13883faf 修改更新历史和build号 2021-11-02 17:21:36 +08:00
MrZ626
e8860eda1b 消除超过6行时部分语言会小字显示消的行数 2021-11-02 17:21:36 +08:00
MrZ626
33ba4820b3 音效室补充消除音效 2021-11-02 17:21:36 +08:00
MrZ626
5ed0dda8ab 修改一处中文语言里的BGM忘了改 2021-11-02 17:21:36 +08:00
MrZ626
bd260b2c6f 消除所有填满行的函数整理为玩家类的clearFilledLines方法
添加消7~20和20+的消除文本与消除音效
播放消n音效打包为函数移至gameFuncs文件
2021-11-02 17:21:36 +08:00
MrZ626
aa01ab07f7 英文词典补充一条翻译
Co-authored-by: C29H25N3O5 <a1228465111@163.com>
2021-11-02 17:21:35 +08:00
MrZ626
684cb90a7d 修改堆叠模式玩法(自动清除之前记录)
修改更新历史和build号
2021-11-02 03:38:43 +08:00
MrZ626
172101ed55 整理玩家类代码,再分离出一个方法 2021-11-02 02:27:08 +08:00
MrZ626
98b5914726 移除机翻语言的tips 2021-11-02 02:15:34 +08:00
MrZ626
d1518e7ba4 词典新增研究群下属mew词条 2021-11-02 00:31:43 +08:00
MrZ626
72d4faa52a 微调进控制台音效力度 2021-11-01 21:56:57 +08:00
MrZ626
862dcbf806 准备&开始音效改为函数整理到gameFuncs文件里
launchpad可以执行任意函数,添加准备-开始音效
2021-11-01 20:30:04 +08:00
MrZ626
3db28f5136 再修正ci替换版本号的问题 2021-11-01 17:33:42 +08:00
MrZ626
f9e37f3c6a 修正ci替换版本号的小问题 2021-11-01 17:24:47 +08:00
MrZ626
457681e6ec 中英tips调整 2021-11-01 16:26:34 +08:00
MrZ626
904bcf6852 版本号改为0.16.4,移除@DEV标记(需要测试) 2021-11-01 15:52:23 +08:00
MrZ626
e21e57ff84 添加tip命令方便看tips 2021-11-01 14:51:40 +08:00
MrZ626
562a69831a 给中英tip排序 2021-11-01 14:32:26 +08:00
C29H25N3O5
706a683540 修正标点, .gitignore添加几个文件类型 2021-11-01 14:13:08 +08:00
C29H25N3O5
8e2aee5e84 再改语言文件 2021-11-01 14:13:08 +08:00
Trebor-Huang
c009893377 New part in Zframework 2021-11-01 10:14:09 +08:00
Trebor-Huang
3ae128d4c3 Revert init.lua 2021-11-01 10:00:39 +08:00
Trebor-Huang
cb2164c21d Fix string bug 2021-11-01 09:57:12 +08:00
Trebor-Huang
951b7407fc Keep up the pace 2021-11-01 09:52:41 +08:00
MrZ626
f68facbe0e 检测到启动参数有--test时启动测试脚本(需要更多测试)
Co-authored-by: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com>
2021-11-01 03:41:19 +08:00
MrZ626
5535366bb1 TASK模块创建任务第一次执行的时候也用assert保证错误被捕捉 2021-11-01 03:23:00 +08:00
Imple Lee
d75b709f23 Move Python code from updateVersion.py into action.ymls directly (#423)
* test python3

* try use `python` instead of `python3`

* use `update-version` everywhere

* fix variable injection

* fix python2vs3

* move `updateVersion.py` into action files
2021-11-01 02:12:32 +08:00
Trebor Huang
5a1fd0ca4d Correct semantic merge 2021-11-01 01:43:05 +08:00
Trebor Huang
f4b85e0dbb Merge branch 'main' into ci-autotest 2021-10-31 23:51:40 +08:00
Trebor-Huang
c38bceb87e Yay it works 2021-10-31 23:38:15 +08:00
Trebor-Huang
2569e8844e Test dummy failure 2021-10-31 23:36:44 +08:00
Trebor-Huang
e42fa8351e Can't get xvfb to return the correct value? 2021-10-31 23:35:12 +08:00
Trebor-Huang
9582a625ff Add shell 2021-10-31 23:20:33 +08:00
Trebor-Huang
81abb06f7b Add shell 2021-10-31 23:19:04 +08:00
Trebor-Huang
7cfea0eebe Try using composite 2021-10-31 23:15:57 +08:00
Trebor-Huang
01c2bfe955 Remove uneccesary needs 2021-10-31 22:51:12 +08:00
Trebor-Huang
70242e6a07 Add some more utils 2021-10-31 21:23:54 +08:00
Trebor-Huang
c1edba974f Maybe update first 2021-10-31 20:47:23 +08:00
Trebor-Huang
546b3f230d Prepare PulseAudio 2021-10-31 20:45:23 +08:00
Trebor-Huang
14593eb487 Okay ubuntu doesn't allow gui either 2021-10-31 20:27:03 +08:00
Trebor-Huang
838621a3ae Try without xvfb first 2021-10-31 20:23:34 +08:00
Trebor-Huang
283d4a5fce Test xvfb 2021-10-31 20:04:54 +08:00
Trebor-Huang
490cf44132 Change iOS ci condition 2021-10-31 19:41:36 +08:00
Trebor-Huang
9dcbd86fc3 Implement auto test 2021-10-31 19:03:05 +08:00
MrZ626
0a15011ec7 修复模式目录下非完整模式文件也会被当成模式加载 2021-10-31 02:03:54 +08:00
ParticleG
f7dfe1d869 - Re-enable other workflows 2021-10-31 00:39:54 +08:00
ParticleG
5e9c9cb5fa - Try use discordrb 2021-10-31 00:39:52 +08:00
MrZ626
c485c26c93 修改更新历史和build号 2021-10-31 00:34:49 +08:00
MrZ626
137d9296cd 移除一个TODO的注释 2021-10-30 15:57:34 +08:00
MrZ626
11b144da74 词典场景按键也会自动开始输入 2021-10-30 15:36:56 +08:00
MrZ626
25ef9d9886 再调整中英两个词典 2021-10-30 15:02:11 +08:00
MrZ626
0e1e279209 游戏界面布局微调:录像播放时单独一套;模式名文本太长的时候会横向压缩 2021-10-30 14:48:19 +08:00
C29H25N3O5
a960897a83 字体加几个新的 Unicode 字符 2021-10-30 14:33:03 +08:00
C29H25N3O5
69ab7849c5 英文词典补完 2021-10-30 14:33:03 +08:00
MrZ626
bc55c3d892 中文词典添加are和line are两个词条,英文词典添加几个todo 2021-10-29 16:01:42 +08:00
MrZ626
cee1c41c35 修改更新历史和build号 2021-10-29 02:24:34 +08:00
MrZ626
6c5fe2463e 微调评级图标颜色 2021-10-29 02:24:15 +08:00
MrZ626
880ce376b3 next槽上方会显示序列模式的标记 2021-10-29 02:07:24 +08:00
MrZ626
5a8b573bb7 修正SFX播放采样低了两个半音 2021-10-29 01:01:54 +08:00
C₂₉H₂₅N₃O₅
ab1e750fa4 微调 yygq 文本 (#419) 2021-10-28 23:56:36 +08:00
MrZ626
f6f4e1cd1a 游戏设置菜单按钮颜色根据平台引导 2021-10-28 15:04:00 +08:00
MrZ626
2a9549b106 自定义场地消行按钮可以消除20行以上的部分
移除测试用代码
2021-10-28 14:49:13 +08:00
MrZ626
1ed7ee3952 整理代码 2021-10-28 14:34:28 +08:00
MrZ626
a69fc35f5a 修改TRS的JL踢墙表的0-R和R-0最后几项 2021-10-28 12:08:38 +08:00
MrZ626
28e83dcf02 词典两个按钮改为图标 2021-10-28 02:34:57 +08:00
MrZ626
8c6df74237 计算器可以弹琴了 2021-10-28 02:34:57 +08:00
C₂₉H₂₅N₃O₅
d86cd6a8c6 Updated English Zintionary and legals.md (#417)
* 更改词典, 调整苹果设备基线不对的问题

* 微调字体

* 添加复制符号, 可用于词典

* 添加新符号定义

* 更新词典和 legals

* 再更新 legals

* Update legals.md

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-10-28 02:18:42 +08:00
ParticleG
c40d411d63 - Finished touching 2021-10-27 17:14:42 +08:00
C₂₉H₂₅N₃O₅
aca63abf49 Multiple Enhancements (See Comments) (#415)
* 更改词典, 调整苹果设备基线不对的问题

* 微调字体

* 添加复制符号, 可用于词典

* 添加新符号定义

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-10-27 13:17:36 +08:00
MrZ626
4733615c4b 中文词典添加欠债词条
修正一处小错误
2021-10-27 13:11:57 +08:00
MrZ626
80e5469653 修复第二次进词典就爆炸 2021-10-27 02:18:39 +08:00
MrZ626
4ea2cb18c7 整理代码,修复应用语言加载TEXTOBJ时有个特殊的文本对象会弹出警告 2021-10-27 01:21:15 +08:00
MrZ626
840be65198 修改ios退出提示文本 2021-10-27 01:14:52 +08:00
MrZ626
5a568df6cd 控件名字符串改用单引号 2021-10-27 01:03:15 +08:00
MrZ626
cf57161174 移除语言模块里有个默认返回按钮文本 2021-10-26 20:55:18 +08:00
MrZ626
7847e72f63 语言文件真正缺失文本时不会蓝屏了 2021-10-26 20:54:41 +08:00
MrZ626
00999426b9 关闭主页机器人追帧,防止挂后台回来后失去同步 2021-10-26 16:33:19 +08:00
MrZ626
188da8b6ff 修改更新历史和build号 2021-10-26 14:21:27 +08:00
MrZ626
59182b0ec8 第一帧启动时间可以通过控制台log命令查看 2021-10-26 14:17:25 +08:00
MrZ626
6ced935c22 修正log模块时间格式不好 2021-10-26 14:16:52 +08:00
MrZ626
ad50475bb6 修正计算器键盘不能输入乘号和符号e不能正常工作的问题 2021-10-26 13:54:00 +08:00
MrZ626
9c40f4918c 修正uttt小程序触屏不响应 2021-10-26 11:26:12 +08:00
MrZ626
62c802d2c3 暂时取消存档导入时的版本限制 2021-10-26 11:12:33 +08:00
MrZ626
3294760f6d 中文语言标点修改 2021-10-26 11:04:22 +08:00
MrZ626
85d72a1ee5 再微调wing背景 2021-10-26 11:04:21 +08:00
C29H25N3O5
e02bb0f23c Multiple Enhancements (See comment) (#413)
* 更改wings背景, 看起来更像翅膀

* 规范中文标点(顺便改不对的tips)

* 字体添加缺少的几个拼音字母
2021-10-26 11:04:21 +08:00
MrZ626
b0465775dc fix ios subversion 2021-10-26 02:15:43 +08:00
Particle_G
bd4b28e052 Rel ci test (#412)
* - Test iOS release

* - Fix wrong grammar

* - Try release CI

* - Modify window size

* - Try with discord webhook

* - Finish test
2021-10-26 01:33:50 +08:00
Trebor Huang
c6c5c849b4 Dmg ameliorate (#408)
* Add `dmg` background

* Eyeball coordinates

* Add dmg icon

* Delete dmg-background.png

* Change background

* Change resources

* Fix line break

* 词典的命令行词条补充一些

* 屏蔽词典敏感词
词典场景代码简化(无需性能场景,更易读)

* Update dict_en.lua (#410)

I've personally never seen the game being referred to as Tetris Tour. In most places, including Tetris.com, it's referred to as Tetris Journey; TapTap once referred to it as Tetris Adventure.

* 修复生成AI玩家时没刷新20G开关

* 再减少一点框架依赖

* 修改BGM模块的初始化log
简单统计启动第一帧各个阶段加载时间

* 修改更新历史和build号

* - Testing CI

* - Change CI name

* - Update badge

* - Pass version number to fastlane

* - Modify build number

* - Try more dots

* - Add send email support

* - Give up using email to notify

* -  Only test macos

* - Skip sign and notarize

* - Change position

* - Modify window size

* - Slighty move icons

* - Re-enables other stuffs

Co-authored-by: MrZ626 <1046101471@qq.com>
Co-authored-by: user670 <22617255+user670@users.noreply.github.com>
Co-authored-by: ParticleG <particle_g@outlook.com>
2021-10-25 21:06:11 +08:00
MrZ_26
cc5c3db1c1 Merge pull request #411 from 26F-Studio/pre-ci-test
iOS Testing workflow
2021-10-25 16:57:19 +08:00
MrZ626
f60236f06e 修改更新历史和build号 2021-10-25 16:19:59 +08:00
MrZ626
bd63584207 修改BGM模块的初始化log
简单统计启动第一帧各个阶段加载时间
2021-10-25 16:00:56 +08:00
ParticleG
e5fd3f6c9f - Give up using email to notify 2021-10-25 15:58:03 +08:00
MrZ626
423173413f 再减少一点框架依赖 2021-10-25 15:45:20 +08:00
MrZ626
a136d01da5 修复生成AI玩家时没刷新20G开关 2021-10-25 15:37:20 +08:00
user670
8ab675baf0 Update dict_en.lua (#410)
I've personally never seen the game being referred to as Tetris Tour. In most places, including Tetris.com, it's referred to as Tetris Journey; TapTap once referred to it as Tetris Adventure.
2021-10-25 15:23:29 +08:00
ParticleG
8d8e537cd4 - Add send email support 2021-10-25 14:15:48 +08:00
MrZ626
d3b117a23f 屏蔽词典敏感词
词典场景代码简化(无需性能场景,更易读)
2021-10-25 13:01:34 +08:00
MrZ626
007982c481 词典的命令行词条补充一些 2021-10-25 11:19:37 +08:00
MrZ626
ff9b0abfc7 两个manual文件改为txt格式
说明书和法律信息场景找不到文件不会爆炸了
2021-10-25 05:09:32 +08:00
MrZ626
275e983f55 错误场景的退出按钮改为直接强制退出游戏 2021-10-25 05:02:46 +08:00
MrZ626
bccb0b9976 添加legals页面 2021-10-25 04:57:29 +08:00
MrZ626
d5f01537f8 iOS设备不显示收款码 2021-10-25 04:56:47 +08:00
MrZ626
6029363af8 微调launchpad的ui 2021-10-25 04:31:33 +08:00
MrZ626
cde61a57b8 修正两个词典的格式问题 2021-10-25 04:31:33 +08:00
C29H25N3O5
2fc1768a7a 更新词典和 legals (#407) 2021-10-25 04:28:46 +08:00
ParticleG
50d73bcc1e - Try more dots 2021-10-25 00:28:41 +08:00
ParticleG
0f570be7e5 - Modify build number 2021-10-24 23:54:16 +08:00
ParticleG
658e6f7fdd - Pass version number to fastlane 2021-10-24 22:06:30 +08:00
MrZ626
d651932d9a 修改更新历史和build号 2021-10-24 21:52:46 +08:00
ParticleG
6167c9f317 - Update badge 2021-10-24 20:45:45 +08:00
ParticleG
33acf06a71 - Change CI name 2021-10-24 20:19:18 +08:00
ParticleG
9833e759cc - Testing CI 2021-10-24 20:15:43 +08:00
ParticleG
918bb09d54 - Update CI badge 2021-10-24 19:38:10 +08:00
MrZ_26
9a0a396872 Merge pull request #406 from 26F-Studio/ci-dmg
CI functionality for iOS and macOS
2021-10-24 19:09:13 +08:00
MrZ626
6c6dc654e6 修正一处容易歧义的设置文本 2021-10-24 17:30:54 +08:00
MrZ626
00c0cc3d9e 修正之前不小心把电脑隐藏翻页按钮删了没改回去 2021-10-24 17:14:58 +08:00
MrZ626
0eb0fd3311 中文词典添加新词条
整理部分标点
2021-10-24 17:14:40 +08:00
ParticleG
4e3823616d - Update variables 2021-10-24 16:06:23 +08:00
ParticleG
7450bae6d2 [no ci] Rearrange names and descriptions 2021-10-24 15:37:33 +08:00
ParticleG
a2ddaf5341 [no ci] Modify variable names 2021-10-24 15:00:06 +08:00
Trebor-Huang
b266a0ae57 Dubious Bundle ID 2021-10-24 13:18:07 +08:00
Trebor-Huang
ac9e649e02 Integration into current CI files 2021-10-24 13:06:29 +08:00
Trebor-Huang
506e1a4c1d Use *.dmg format to distribute on macOS
Pack up dmg files

Cooperate with fastlane config

Fix directory

Put off notarization

Diagnose dmg

Try notarize

Check notarize

Duh Fix

Better codesigning

Last try
2021-10-24 13:06:11 +08:00
YunyushuLiu
c9d74a4cdf Follow up macOS CI
- Update macOS CI to use flatlane

- Test macOS

- Use Github tokens

- Pass MATCH_PASSWORD

- Fix wrong path

- Update keychain file

- Change keychain path

- Update macOS release

- Triggered on release, not main

- Try notarize macOS app

- Triggered on test branch

- Triggered by release

- Rename lane names to avoid infinite recurse

- Init dev workflow

- Triggered by tags

- Rename workflow name

- Update workflows

- Allow all tags

- Fix on

- Add codesign options

- Add missing =

- Update options

- Test sign

- Fix options

- Update macOS template
- Use identifier

- Fix minor issues

- Try not notarize

- try not sign package

- Try sign without runtime option

- Try notarize without runtime option

- Use entitlements

- Add back runtime option

- Pack the whole directory to see what happened

- Chmod +x love

- Try with strict and print app info

- Change step order

- Break into two step

Zip first with `ditto`.

Push back zipping

Don't check the `zip` file

Stop zipping it over and over and over and over

Try zipping right
2021-10-24 13:05:51 +08:00
YunyushuLiu
0ff2e6e273 Implement iOS CI
- Update for multiple targets

- Fix wrong lane

- Update Dev CI

- Rename scheme

- Test ad-hoc

- Enable other runs

- Try use if

- Fix missing shell property

- Fix if

- Add change log support

- Update apple key

- Test Release

[no ci] fix grammar

- Release test

- Only test release

- New build

- Test rename in fastfile

- Move right ipa

- Finish touching
2021-10-24 13:05:35 +08:00
MrZ626
c4c6ab3130 删除ci中对不存在的document文件夹的操作 2021-10-24 04:46:51 +08:00
MrZ626
bc5b7638db 修改更新历史 2021-10-24 04:45:56 +08:00
MrZ626
2db147461c iOS设备震动函数改为输入1|2|3三档而不是时间(适配自改love,原版love都是固定振动)
框架不再使用不属于自己的SYSTEM的变量
2021-10-24 04:45:34 +08:00
MrZ626
716c44746b wing背景优化(水晶比例设计:C29H25N3O5) 2021-10-24 04:31:05 +08:00
MrZ626
0278a3ad47 miku语音小修正 2021-10-24 03:33:24 +08:00
MrZ626
3601047ffb 调整模式地图右下角区域 2021-10-24 03:05:56 +08:00
MrZ626
8013319c14 完善词典的复制按钮 2021-10-24 02:46:04 +08:00
MrZ626
b4f14bcb5b das介绍和设置指导词条拆成两段 2021-10-24 02:09:31 +08:00
MrZ626
406beab9d6 词典新增复制页面功能,方便查好发送给别人 2021-10-24 01:51:41 +08:00
MrZ626
58a8828503 赞助列表加一个人 2021-10-24 01:47:22 +08:00
MrZ626
fd563b732c 整理代码 2021-10-24 00:48:51 +08:00
MrZ626
30093f9db5 readme添加github维基页面 2021-10-22 19:56:50 +08:00
MrZ626
2f16c54cde legals文件放到根目录 2021-10-22 17:42:37 +08:00
MrZ626
bca7f2e19b 整理代码
修改更新历史
2021-10-22 16:56:42 +08:00
MrZ626
2696106f96 文档移至github的wiki功能 2021-10-22 16:54:58 +08:00
MrZ626
9f7692f91c skin模块升级 2021-10-22 16:09:56 +08:00
MrZ626
48b2ff5416 微调TRS的R块踢墙表 2021-10-22 16:06:05 +08:00
MrZ626
81104d7004 修改更新历史 2021-10-22 02:08:23 +08:00
MrZ626
b56103f247 新增简单等级图标组(暂时显示不出其他) 2021-10-22 01:47:58 +08:00
MrZ626
0923cf3acf 修改部分语言的id
修正原yygq语言词典是英文的问题
2021-10-21 23:58:11 +08:00
MrZ626
fffb7d0188 极简率评级改为灰色 2021-10-21 21:45:41 +08:00
MrZ626
f02124de0c 再调整准备开始音效 2021-10-21 21:39:47 +08:00
MrZ626
a1a77f291b 几个文件的中文标点换成全角 2021-10-21 20:52:26 +08:00
MrZ626
31bb7f62c6 移除打击垫的准备&开始音效 2021-10-21 20:20:25 +08:00
MrZ626
bfb5fc3f5e 游戏设置场景不再需要滚动 2021-10-21 16:37:16 +08:00
MrZ626
ac2e53adc7 修复“应用全屏”函数实际含义为反转全屏状态 2021-10-21 16:33:46 +08:00
MrZ626
46e8e161d0 修改版本号和更新历史 2021-10-21 15:51:51 +08:00
MrZ626
68e2255e1b 修改进控制台音效 2021-10-21 15:51:51 +08:00
MrZ626
222c1b5bba SFX.playSample支持同时播放多个采样(两种参数格式) 2021-10-21 15:51:51 +08:00
MrZ626
59c63da36f 整理代码
添加一个小工具函数
2021-10-21 15:51:51 +08:00
MrZ626
89fb7a7659 微调资源加载,整理代码,多一点点log 2021-10-21 15:51:50 +08:00
C29H25N3O5
ea02bc470a Added IPA Symbols and optimised CJK punctuations (#401)
* 增加控制器符号

* 增加新符号, 所有标点改成半角

* 剩余两个文档也都改成 Markdown 格式

* 字体新增基础 IPA 符号

* 增加 IPA 字符, 中文标点使用开明式
2021-10-21 13:54:23 +08:00
MrZ626
361dc576f3 准备-开始音效使用乐器采样 2021-10-21 02:53:51 +08:00
MrZ626
395ad907b8 添加三个简单乐器采样包并加载(之后用于替换部分音效) 2021-10-21 02:53:51 +08:00
MrZ626
bf5cdb1b99 SFX模块新增采样功能(初步)
添加loadSample和playSample方法
2021-10-21 02:53:50 +08:00
MrZ626
45f9c80888 重做连击音效
重新导出部分音效
2021-10-21 02:53:49 +08:00
Particle_G
b80a72785b Ci ios (#399)
*Bunch of ci-ios thing*

Co-authored-by: Imple Lee <80144331+ImpleLee@users.noreply.github.com>
Co-authored-by: Trebor-Huang <2300936257@qq.com>
Co-authored-by: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com>
Co-authored-by: YunyushuLiu <kunluntree@qq.com>
Co-authored-by: MrZ626 <1046101471@qq.com>
Co-authored-by: 梦飞翔 <1149761294@qq.com>
2021-10-21 02:49:29 +08:00
MrZ626
20ab916f9c SFX模块升级 2021-10-20 16:43:07 +08:00
MrZ626
76bfaa870e 控件模块不再依赖TABLE扩展模块 2021-10-20 16:18:04 +08:00
C29H25N3O5
10ed702c2e Changed the other two documents to markdown format (#396)
* 剩余两个文档也都改成 Markdown 格式
2021-10-20 13:09:48 +08:00
Particle_G
e236be7a62 Ci ios (#395)
* merge get-cc-url into get-version

* add `get-cc`

* remove `apt update`

* rename `get-version` -> `get-info`

* rm unnecessary file

* - Add support for ios
- Fix missing top folder for macos

* - Fix directory names

* - Fix with binary r/w

* iOS的plist文件先转换为明文

* add IOS

* 整合新action

* Finishing touch

* Update action.yml

* Test chmod

* - Xcode build test

* - Build with default keychain

* - Test iOS only

* - Use macos-11

* - Change keychain operations' sequence

* - Allow provisioning updates

* - Set build directory

* - Specify build path

* - Pack bare app

* - Add quiet option

* 测试:输出touchrelease位置

* - Test with ad hoc cert

* - Fix wrong variable

* - Use Release instead of Distribution

* - Chmod CCloader to add execute permission

* 继续测试ios触屏问题

* 继续测试ios触屏问题

* - Use macos latest
- Re-enable other runs

* - Sign CCloader after build

* - Remove redundant inputs in build.yml

* - Install test

* - Export test

* - install test

* - Try fastlane

* - Use builtin ruby

* - CI Test

* - Update python script to fix ios versioning

* - Use static lib

* - Test static cc

* - Fix locations

* Update readme.md

Co-authored-by: Imple Lee <80144331+ImpleLee@users.noreply.github.com>
Co-authored-by: Trebor-Huang <2300936257@qq.com>
Co-authored-by: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com>
Co-authored-by: YunyushuLiu <kunluntree@qq.com>
Co-authored-by: MrZ626 <1046101471@qq.com>
Co-authored-by: 梦飞翔 <1149761294@qq.com>
2021-10-20 13:07:51 +08:00
MrZ626
2fbd183322 整理代码
规范更多全局变量名
语音包/音效包列表声明放到main开头
2021-10-20 01:21:01 +08:00
MrZ626
14df29ce21 修正中文词典一处词条名错误 2021-10-19 19:22:12 +08:00
MrZ626
cb3d9e4862 整理代码 2021-10-19 19:19:12 +08:00
MrZ626
d9a82878bf 移除组合键切换攻击模式功能,固定为单点切换
微调游戏设置菜单
2021-10-19 19:00:02 +08:00
MrZ626
e484bef6df md语法翻新voice文档
Co-authored-by: C29H25N3O5 <87485746+C29H25N3O5@users.noreply.github.com>
2021-10-19 17:12:11 +08:00
MrZ626
c8d358cc64 新增两条中英tip 2021-10-19 00:01:18 +08:00
MrZ626
013765d5d2 touching变量移入SCN模块
修复iOS上经常卡掉第一个触摸导致后续不能和控件交互
2021-10-18 23:45:03 +08:00
MrZ626
ed2b07d5cf 自定义场地的按钮应用定制字体 2021-10-18 19:49:34 +08:00
C29H25N3O5
8d0780cef4 Added more symbols to the font and changed all the punctuations to half-width (#392)
* 增加控制器符号

* 增加新符号, 所有标点改成半角
2021-10-18 19:21:54 +08:00
MrZ626
2ba25014c6 utf8解码报错后会提示windows用户换一个游戏版本 2021-10-18 16:33:50 +08:00
MrZ626
033a770759 更多全局变量改为全大写 2021-10-18 15:12:56 +08:00
MrZ626
b7832c133a 微调代码规范变量名格式说明 2021-10-18 15:12:56 +08:00
MrZ626
93af618fa0 启动时会遍历所有模式文件补充不在地图上的模式 2021-10-18 15:05:35 +08:00
MrZ626
d4539c3a23 修改加载SHADER的时机 2021-10-18 15:05:35 +08:00
MrZ626
3d70a5ac79 检测资源文件是否来自工程的过程改为函数 2021-10-18 15:05:34 +08:00
Trebor Huang
f40b2f75bd Move help file to correct place 2021-10-18 02:16:41 +08:00
Trebor Huang
46a49050b9 Fix vulneribility 2021-10-18 02:00:26 +08:00
Imple Lee
fb4fd15687 fix release name in release.yml (#390) 2021-10-18 01:27:16 +08:00
MrZ626
f3e18de45f release note符合markdown语法,方便阅读 2021-10-18 00:28:12 +08:00
MrZ626
fd3b187d32 修正文本框控件长度限制判定问题 2021-10-18 00:20:15 +08:00
MrZ626
820b555924 修改更新历史和build号 2021-10-18 00:13:15 +08:00
MrZ626
f8a0e67a2e 添加一堆tips 2021-10-18 00:10:15 +08:00
MrZ626
99e77969ad 给一些联网相关的输入框添加输入长度限制 2021-10-17 23:44:49 +08:00
MrZ626
fdb6276869 输入框控件可以设置长度限制了 2021-10-17 23:39:34 +08:00
MrZ626
221e252acb 修改一处无意义代码
移除忘了删的调试代码
2021-10-17 23:25:57 +08:00
MrZ_26
dea01ffed6 Ci getversion (#389)
* 修正release获取版本名的小错误

* 整理getVersion.lua
tab换成空格后没有修改
2021-10-17 23:13:16 +08:00
MrZ626
166769e7e1 修改更新历史和build号 2021-10-17 18:34:07 +08:00
MrZ626
86d3314cb2 取消单挑模式垃圾行缓冲上限 2021-10-17 18:12:12 +08:00
MrZ626
13a08298b7 cubefield小游戏不再能卡时间间隔 2021-10-17 17:02:33 +08:00
MrZ626
66d2323626 修改单挑l和u难度的评级条件为剩余命数 2021-10-17 16:01:10 +08:00
C29H25N3O5
cd432e3b3f 增加控制器符号 (#388) 2021-10-17 14:48:53 +08:00
MrZ626
cbf73f5194 添加启动时自动登录开关 2021-10-17 14:24:43 +08:00
C29H25N3O5
5cd03f40f6 更新legals, 增加 S 评级符号 (#385) 2021-10-17 14:24:40 +08:00
Imple Lee
25b5f53f34 update cc-related CI (#387)
* merge get-cc-url into get-version

* add `get-cc`

* fix

* fix again

* fix

* fix

* fix macos

* remove `apt update`

* fix macos

* rename `get-version` -> `get-info`

* rm unnecessary file
2021-10-17 14:23:36 +08:00
MrZ626
f9902a6ea5 框架允许自定义失去焦点时执行的操作 2021-10-17 01:13:10 +08:00
MrZ626
0099bf53cb 整理代码,框架更独立 2021-10-17 00:49:35 +08:00
MrZ626
e6a8cf7a10 三个音频模块升级不再依赖全局变量SETTING
但更新音量的时候必须需手动调用setVol
整理代码
2021-10-16 23:10:15 +08:00
MrZ626
9b6855b424 修正玩家时间计算错误 2021-10-16 18:24:14 +08:00
MrZ626
6df8383580 中文添加一些tips 2021-10-16 17:26:27 +08:00
MrZ626
b12663f404 应用新的定制字符
移除不需要的贴图素材
2021-10-16 15:23:47 +08:00
C29H25N3O5
66d3df0c10 Added more symbols to the customised font (#376)
* 字体新增评级字符, 调整 staff 表, 更新 legals

* 增加新符号定义

* 增加回放速度相关的字符
2021-10-16 14:53:01 +08:00
MrZ626
a61e74c004 移除一个不再需要的小贴图 2021-10-16 03:37:43 +08:00
MrZ626
3d0a39dd34 所有要二次确认的按钮都改为左上角提示而不是显示问号
移除确认用问号贴图
2021-10-16 02:59:07 +08:00
MrZ626
6f643b8a1b 自定义序列文本框渲染改用定制字符,略微优化性能 2021-10-16 02:50:37 +08:00
MrZ626
d39cc71240 29个方块名字的列表上升为全局变量 2021-10-16 02:47:34 +08:00
C29H25N3O5
501fab147d 字体新增评级字符, 调整 staff 表, 更新 legals (#375) 2021-10-16 02:21:49 +08:00
MrZ626
6ee6cd7a1e 修改techrash_u,tsd_h,tsd_u的列标记颜色 2021-10-16 02:05:01 +08:00
MrZ626
7d5586d9a1 补充中文词典next和hold的词条 2021-10-16 01:46:38 +08:00
MrZ626
db78d713e7 调整统计界面
修正词典几处°用成了上标o
2021-10-15 22:26:26 +08:00
MrZ626
ece5dfb799 微调简洁主菜单 2021-10-15 01:43:48 +08:00
MrZ626
1cb6b82f25 小程序atoz支持仅键盘操作 2021-10-15 01:31:41 +08:00
MrZ626
b0728650df 修改自定义序列随机包的按钮
修改一个定制字符名
整理代码
2021-10-15 01:27:48 +08:00
MrZ626
48b4049d90 英文词典第一个词条添加参与翻译的github链接
Co-authored-by: user670 <22617255+user670@users.noreply.github.com>
2021-10-15 01:16:49 +08:00
Imple Lee
7f8efcdf41 move some work into independent jobs (#366)
* change build branch in build.yml

* try with get-version

* fix get-version

* fix get-version again

* try use get-version everywhere

* use apt upgrade again

* fix get-version again

* fix get-version again

* fix get-version again

* fix get-version again

* independent get-cc-url

* fix get-cc-url

* remove 2 useless commands

* try action

* try fix action

* try action

* use get-unzip

* try windows build

* fix build-windows

* fix build-love

* try build-linux

* add shell in build-linux

* put `commit id` into `get-version`

* fix `updateVersion.py -T Version`

* try build-android

* add shell into `build-android`

* move away android signing from build-android

* apply build-android on android mini

* gain snapshot action

* fixes

* fix build-love

* use build-macos

* put more into build-android

* fix build-android

* put more into build-macos

* fix

* fix

* ci: use preinstalled ndk (#367)

* fix apk location

* move `rename` into `build-android`

* fix `build-android`

* rename variable; remove a level of zips in macOS

* shallow clone

* remove tons of `./`s

* fix icon in windows and linux

* reorganize build-android

Co-authored-by: 梦飞翔 <1149761294@qq.com>
2021-10-15 01:06:17 +08:00
MrZ626
dfa356e9d9 完善FILE.load的使用
重点修正几个string模式保存的文件的读取,以防刚好符合其他格式自动判断的条件
2021-10-15 01:04:00 +08:00
MrZ626
964537219a FILE.load函数可以指定读取方法,建议使用以防自动识别失效 2021-10-15 01:01:11 +08:00
MrZ626
07eecc860f 继续替换一些菜单里的图标为字体内图标 2021-10-15 00:47:06 +08:00
MrZ626
faf25008f9 退出房间的时候不再等待服务器返回成功消息 2021-10-15 00:15:48 +08:00
MrZ626
116a3563bb 再整理更新历史 2021-10-14 20:16:48 +08:00
MrZ626
6880c88301 微调staff表 2021-10-14 20:16:30 +08:00
MrZ626
8590f4c383 继续替换一些菜单里的图标为字体内图标 2021-10-14 20:06:31 +08:00
MrZ626
ff1e034a87 添加两个新bgm,修改一些模式的bgm配置 2021-10-14 19:43:18 +08:00
C29H25N3O5
b36948cf30 Add more symbols to the font (#374)
* 微调旧符号, 新增缺少符号

* 对齐, 对齐
2021-10-14 19:43:56 +08:00
MrZ626
c01df71fd4 修改更新历史和build号 2021-10-14 02:34:49 +08:00
MrZ626
7d90571d50 替换大量图标和一些文本为定制字体里的字符,移除TEXTURE模块对应画布 2021-10-14 02:26:39 +08:00
MrZ626
0cc7e121c8 添加一个版权说明文件(不是最终确定版,未来可能会补充或改动) 2021-10-14 01:17:10 +08:00
MrZ626
060cdbbf51 调整launchpad按钮样式 2021-10-14 00:56:13 +08:00
C29H25N3O5
769a654ed6 增加字体内其他字符的定义 (#373) 2021-10-14 00:55:49 +08:00
C29H25N3O5
469899e8eb Added new characters in Private Use Area A in the font file (#372)
* 新字体私用区A增加游戏内字符

* 增加缺少的字符
2021-10-13 23:39:04 +08:00
MrZ626
024e0df8e1 launchpad添加显示标签选项 close #365 2021-10-13 12:58:17 +08:00
MrZ626
7603829942 修正每次进入主菜单时部分参数未完全重置(例如设置的方块颜色) close #368 2021-10-13 12:11:02 +08:00
MrZ626
ad91ac9c93 LOG模块会顺便print一下 2021-10-13 11:39:28 +08:00
MrZ626
7a22dead81 添加一个自制字体要用到的字符集合小模块(非框架模块,顺序未最终确定) 2021-10-13 11:25:36 +08:00
MrZ626
73bc5dd30e 调整string扩展模块utf8转码函数 2021-10-13 09:07:59 +08:00
MrZ626
154157b976 字符串扩展模块新增hex转utf8方法 2021-10-13 01:08:06 +08:00
MrZ626
c5551a1b64 减少内部next到十个 2021-10-12 19:31:22 +08:00
MrZ626
0d292446a2 修正显示额外next时用的颜色为那个方块真正的颜色(而不是玩家当前设置) close #370 2021-10-12 19:31:08 +08:00
MrZ626
7ba0d0d3a0 修复使用过tas后mod菜单会显示unranked close #371
优化mod菜单unrank刷新时机计算
2021-10-12 19:16:17 +08:00
MrZ626
88bd9216d0 微调配音参考文档 2021-10-12 13:55:34 +08:00
MrZ626
d8b728a6b3 框架添加setOnFnKeys方法允许重定义devmode下功能键的功能(仅限F1~F7) 2021-10-12 13:49:27 +08:00
MrZ626
26acecb8e4 修改更新历史和build号 2021-10-12 02:23:44 +08:00
MrZ626
b64234a7a3 添加techrash_n模式入口 2021-10-12 02:23:09 +08:00
MrZ626
1ca5fd7204 添加一个无位置限制的消四模式 2021-10-12 02:19:06 +08:00
MrZ626
6868d53224 允许运行中加载模式文件(仅限不在地图上的,故目前只用于彩蛋模式)
移除所有隐藏模式的名称翻译,只认内部名
2021-10-12 01:59:42 +08:00
MrZ626
993866ab5b 大量master模式参数移入规则包
彻底移除历史遗留的L和U难度
2021-10-11 02:00:30 +08:00
MrZ626
3eddb524d0 修改防守模式难度曲线(之前的录像不再能正常播放) 2021-10-11 01:43:34 +08:00
MrZ626
956316c327 生存模式和进攻模式添加胜利条件 2021-10-11 01:37:36 +08:00
MrZ626
88ff734ec7 修改更新历史和build号 2021-10-10 03:36:04 +08:00
MrZ626
3fb6b34a1e 添加techrash_u模式入口 2021-10-10 03:35:18 +08:00
MrZ626
81a4429767 落块超出场地高度后死亡不直接调用lose 2021-10-10 03:30:15 +08:00
MrZ626
73bf974b1c 添加一个禁同列消四的模式 2021-10-10 03:29:16 +08:00
MrZ626
693fb9f43f 修正评级字母改了后解锁提示忘了改 2021-10-10 00:37:22 +08:00
MrZ626
b3e65aea9f 修正加载模式图标的一处错误 2021-10-09 19:36:16 +08:00
MrZ626
bb149f9890 微调马拉松图标,整理代码 2021-10-09 14:25:41 +08:00
MrZ626
26d2c8188d 中文词典添加/修改几个序列生成的词条
修改几处标点
2021-10-09 12:04:57 +08:00
MrZ626
051d45edce 整理代码 2021-10-09 11:19:36 +08:00
C29H25N3O5
6e35d7683c 修改字体缺少字符, 添加 Licence, 更正 baseline (#364) 2021-10-09 10:54:27 +08:00
MrZ626
da405793da 修改更新历史和build号 2021-10-09 01:58:33 +08:00
MrZ626
ef9aa8e195 新增序列模式bagES(easy start),第一块不会是那些不好安排的块
使用标准包+noInitSZO序列的模式改为使用新的bagES【警告:旧的录像都会坏】
2021-10-09 01:58:33 +08:00
MrZ626
7899c3a49f 自定义序列界面移除单引号输入c的键位 2021-10-09 01:11:04 +08:00
MrZ626
3394409183 调整模式评级的文本,看起来不打击一些
调整模式评级对应的颜色
2021-10-08 18:13:28 +08:00
MrZ626
300cf10413 所有的“完成目标”胜利将会杀死其他玩家,使联网房间能进行部分单机模式的竞技 2021-10-08 17:16:38 +08:00
MrZ626
8203f75cc9 修复远程玩家update流程错误 2021-10-08 16:48:31 +08:00
MrZ626
10e0453a54 调整部分中文tip 2021-10-08 15:40:10 +08:00
MrZ626
b131c34717 调整物理hold失败音效 2021-10-08 15:40:09 +08:00
MrZ626
94a0f44fc5 降低小程序arm一个题型难度 2021-10-08 15:40:09 +08:00
MrZ626
8a47d7dc0f 几个项目说明文件移到根目录 2021-10-07 21:32:07 +08:00
MrZ626
7a18c86927 修改一处ide认为有问题的写法 2021-10-07 18:59:04 +08:00
MrZ626
958a296662 先临时恢复使用之前的字体文件等新字体确认没有问题 2021-10-07 18:49:57 +08:00
MrZ626
d932a0a990 修正解除自定义场地绘制高度限制后出现的其他衍生问题
“自定义场地页面”使用元表实现自动补充尺寸(编辑之后需要手动清空多余空行,目前仅一处)
2021-10-06 22:27:02 +08:00
Imple Lee
3060d89ed4 rename solidLine to notEmptyLine (#362)
Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-10-06 17:23:38 +08:00
Imple Lee
54447e187a remove restriction on field height in custom mode (#361) 2021-10-06 17:18:47 +08:00
C29H25N3O5
e4d62cc4af Fixed the problems about the baseline of the fonts (again) (#359)
* 再次更改 baseline 不对的问题

* Update version.lua
2021-10-06 17:11:55 +08:00
MrZ626
83a1770bac 修复字体 baseline 不对的问题
更新字体, 把少的几个字符加上
使用CHNO整理的字体文件,删除原来的

Co-authored-by: C29H25N3O5 <87485746+C29H25N3O5@users.noreply.github.com>
2021-10-06 01:09:50 +08:00
MrZ626
fd9793a42f 调整几个中文tip 2021-10-05 18:48:32 +08:00
MrZ626
47ba8fe0af Zframework支持自定义onQuit触发的函数,destroyPlayers移出框架代码 2021-10-04 01:10:34 +08:00
MrZ626
639df50a31 lang模块初始化可以不提供后面两个参数 2021-10-04 01:02:34 +08:00
MrZ626
bded1eab15 整理代码 2021-10-04 00:57:14 +08:00
MrZ626
4a06c7b0bb 修改更新历史和build号 2021-10-04 00:42:36 +08:00
MrZ626
08775dcca9 整理代码 2021-10-04 00:39:35 +08:00
C29H25N3O5
011fd8d175 Added 3 new entries for English Zictionary (#354)
* 英文词典增加三个词条

* 增加一个换行符
2021-10-04 00:19:19 +08:00
MrZ626
f2ef3644aa 修正远程玩家startStreaming时录像数组被删除导致开始游戏直接爆炸 2021-10-04 00:16:39 +08:00
MrZ626
b3a319b336 中文词典加入形状和颜色两个词条 2021-10-03 23:18:48 +08:00
MrZ626
667a39dfd3 修改编辑自定义序列时删除两组相同块中间块的时候的行为 2021-10-03 22:43:05 +08:00
MrZ626
8f9b9952ea 整理文件结构
list和globalTables文件合并为gameTables
gametoolfunc改名gameFuncs
2021-10-03 01:37:45 +08:00
MrZ626
444e39ce33 修复统计场景按键爆炸 2021-10-01 20:33:53 +08:00
MrZ626
74ad038f21 微调语言文件 2021-10-01 15:55:26 +08:00
MrZ626
00401befca 更加离谱/生草的机翻文本
Co-authored-by: C29H25N3O5 <87485746+C29H25N3O5@users.noreply.github.com>
2021-10-01 15:49:00 +08:00
MrZ626
f5bffd6f74 单人游戏模式文本下显示最佳纪录(如果有)
整理代码,略微优化游戏中性能
close #348
2021-09-30 22:49:40 +08:00
MrZ626
63ac23a999 修改更新历史 2021-09-30 22:36:49 +08:00
MrZ626
41e4cacdd8 dtw小程序初速度设置支持小数 2021-09-30 22:32:23 +08:00
MrZ626
a61e0086e0 CC不能和swap的暂存模式一起开 2021-09-30 21:13:08 +08:00
MrZ626
6f7ebb4cbf 修正有两个彩蛋模式纯键盘进不去 2021-09-30 01:14:25 +08:00
MrZ626
43db02f97d 新增一个彩蛋模式 2021-09-30 01:13:43 +08:00
MrZ626
3d4c51c532 震动小模块不再引用游戏变量SETTING 2021-09-30 00:19:25 +08:00
Trebor Huang
45718eb41a Include a help file (#345) 2021-09-29 17:36:16 +08:00
MrZ626
90d51b979a 修正玩家计时器不正确 2021-09-29 15:13:32 +08:00
C29H25N3O5
6261256dea 增加 macOS 第一次无法打开的解决方法的说明文档 (#344) 2021-09-29 09:24:33 +08:00
MrZ626
b1a508f209 微调声音设置ui 2021-09-29 00:51:39 +08:00
MrZ626
17eedeaf38 修复挖掘100行放一块就死 2021-09-29 00:05:37 +08:00
MrZ626
733919e1df 修正规则表里有不再存在的模式 close #342 2021-09-28 23:26:55 +08:00
MrZ626
7f7eec18bc 调整加载和主菜单界面的logo颜色 2021-09-28 17:53:39 +08:00
MrZ626
7c70f8c9bc 修改更新历史 2021-09-28 17:14:11 +08:00
MrZ626
9473364fde 调整master_m模式文本颜色,添加15次锁定延迟刷新限制 2021-09-28 17:01:49 +08:00
MrZ626
f8fc909fe6 launchpad新增一页播放bgm 2021-09-28 16:47:21 +08:00
MrZ626
d5a42f2316 修复暂停界面点回放时没有向玩家发送录像数据 close #340 2021-09-28 12:54:43 +08:00
MrZ626
9837330be0 修改更新历史和build号 2021-09-28 02:20:30 +08:00
MrZ626
c99bc2c38d 词典添加swap词条 2021-09-28 02:20:30 +08:00
MrZ626
9896918c35 修复自定义游戏菜单holdMode选项问题 2021-09-28 02:08:19 +08:00
MrZ626
0e605c66c4 新增消5/6音效 2021-09-28 02:05:23 +08:00
MrZ626
4bf7ef0e25 完善玩家刷新机制 close #335 2021-09-28 01:55:57 +08:00
MrZ626
438fef9f26 调整staff表 2021-09-28 00:29:43 +08:00
C29H25N3O5
489a00e2d2 更正英文 Zictionary 语法和拼写 (#338) 2021-09-28 00:17:20 +08:00
Trebor Huang
a1dd5b4188 添加一屏便于操作的launchpad (#337) 2021-09-27 22:29:26 +08:00
MrZ626
3b5c66d192 打击垫允许音效跟语音一起响,同时允许设置音效的音量 2021-09-27 21:43:22 +08:00
MrZ626
10df10abfd 补充FTLock设置的英文文本 2021-09-27 16:54:15 +08:00
MrZ626
4e0607b09c 放宽dtw街机模式初始速度范围 2021-09-27 16:53:35 +08:00
MrZ626
96f8f2cb28 小程序dtw添加一个秘密内容 2021-09-27 01:27:46 +08:00
MrZ626
4d91b92a33 小程序cubefield添加一个秘密内容 2021-09-27 01:24:14 +08:00
MrZ626
9ad96608cf 修改更新历史 2021-09-27 01:04:51 +08:00
MrZ626
73f4dcd828 更换mono的立绘 2021-09-27 00:50:13 +08:00
MrZ626
95cff8b986 音效室场景改名launchpad
zx可以代替鼠标
2021-09-27 00:41:32 +08:00
MrZ626
f2ffdc9e58 整理代码,修复新的彩蛋模式触屏进不去 2021-09-27 00:31:56 +08:00
MrZ626
702abbf7b1 修改更新历史和build号 2021-09-26 22:25:07 +08:00
MrZ626
cc0076a204 暂时禁止自定义模式和联网模式选择回合制 2021-09-26 22:24:41 +08:00
MrZ626
3f64d1044b 尝试修复回合制的回合计算问题 2021-09-26 22:05:42 +08:00
MrZ626
28a0dd8b97 调整远程玩家更新的时间逻辑 2021-09-26 22:03:27 +08:00
MrZ626
1787dbde4d 微调虚拟按键新素材,平衡部分贴图的位置
修正贴图裁剪区域
2021-09-26 21:34:54 +08:00
C29H25N3O5
6c10bff565 Changed the look of the virtual keys (#333)
* Delete virtualkey.png

* 更新虚拟按键外观
2021-09-26 21:21:29 +08:00
MrZ626
479fec4c59 优化音效室的launchpad代码
加入键盘控制(人类不太能用)
2021-09-26 19:55:45 +08:00
MrZ626
1533e0fe74 修复两个小程序按括号爆炸 2021-09-26 19:55:02 +08:00
MrZ626
242416a25d 音乐室改为launchpad(暂时只有两页) 2021-09-26 18:58:40 +08:00
MrZ626
03689c6a0b 调整要加载的语音列表
微调音乐室ui
2021-09-26 18:58:21 +08:00
MrZ626
2e9f1c18e5 更改pc音效文件名 2021-09-26 14:41:27 +08:00
MrZ626
c405cd93be 更新中文词典的极简词条,概述学习和练习的方法 2021-09-26 14:35:52 +08:00
MrZ626
99bbff0d34 英文的SE改回SFX,微调staff表 2021-09-26 11:51:45 +08:00
MrZ626
653debbbc2 回合制模式使用玩家sid处理回合顺序
本地玩家也有sid了(跟id相同)
2021-09-26 11:37:49 +08:00
MrZ626
2279eb8e31 修改更新历史和build号 2021-09-26 01:27:44 +08:00
MrZ626
f475fafbf1 新增一个彩蛋模式 2021-09-26 01:18:18 +08:00
MrZ626
52bb86ad78 调整主菜单快速开始按钮文本生成逻辑,找不到不会报错了 2021-09-26 01:11:19 +08:00
MrZ626
535a590ffd 微调关于界面的ui 2021-09-26 01:05:32 +08:00
MrZ626
b2143557bd 给两个词典的几个wiki词条重新排了序
添加four.lol词条
2021-09-25 19:29:24 +08:00
MrZ626
a6c47f5122 微调键位设置ui和交互逻辑,添加说明文本 2021-09-25 19:29:21 +08:00
MrZ626
fddb2db8c7 整理代码
更多帧更新改为时间更新
微调cubes背景
微调音乐室ui
2021-09-25 19:29:09 +08:00
MrZ626
da58578d33 修改更新历史 2021-09-25 03:03:55 +08:00
MrZ626
391821bf16 Zframework的控件/场景/文本/任务模块支持基于时间更新
修改几处其他地方基于时间update
2021-09-25 02:59:38 +08:00
MrZ626
7ae314fb2c 更新英文翻译
Co-authored-by: C29H25N3O5 <87485746+C29H25N3O5@users.noreply.github.com>
2021-09-24 23:33:36 +08:00
Trebor Huang
7b141a5eaa [no ci] Change icon, temporary fix for dylib loading (#328)
* Move build directory

* Move build folder

* Move the build folder

* Update Mac OS icon

* Use snapshot icon

* Use icon file

* Temporary fix for Mac OS dylib loading

* Update require.lua

* Update require.lua

* Update require.lua

* Update require.lua

Remember to squash this.

* “简化”require模块对于OS X环境的处理方法

Co-authored-by: MrZ626 <1046101471@qq.com>
2021-09-24 21:00:03 +08:00
MrZ626
0b1357c2ee 修改更新历史和build号 2021-09-24 19:58:56 +08:00
C29H25N3O5
417072bf00 Update icon_snapshot.icns on macOS (#325)
* Delete icon_snapshot.icns

* 更新macOS上icon_snapshot的外观
2021-09-24 19:58:09 +08:00
Not-A-Normal-Robot
ff0fa1802d Fix repeating stage completion text bug (#326)
Previously, if you play master phantasm and complete the line requirements of the dig section, but have not dug all the blocks, the "Stage (n) complete" text will still appear. This pull request makes it so that it checks the dig condition *before* making the text appear.
2021-09-24 19:57:58 +08:00
MrZ626
07e07e61ee 修改FL mod的画面表现
修改hold设为swap时不可hold的块标记方式和普通hold的一样
2021-09-24 14:49:17 +08:00
MrZ626
4f939d7ea4 drawNext系列函数整理合并(略微牺牲性能),玩家用的绘制函数完全放入draw.lua
游戏参数新增holdMode
默认'hold'为普通hold模式
'swap'为跟next第一个交换(跟物理hold/多hold均兼容)
2021-09-24 13:35:17 +08:00
MrZ626
9fa4b97e5e 整理代码 2021-09-24 08:27:40 +08:00
MrZ626
b890813732 BGM模块新增seek方法 2021-09-24 02:33:09 +08:00
MrZ626
f9650c565c 刷新玩家stat时间和帧数的代码移到update函数外部 2021-09-24 02:28:51 +08:00
MrZ626
6eca35759f Revert "降低 Shiny 皮肤饱和度 (#318)"
This reverts commit 1de11365c1.
2021-09-24 02:15:32 +08:00
MrZ626
c927e58ce4 添加逻辑追帧功能,设置默认关闭,联网强制打开防止低帧率设备影响游戏体验 2021-09-24 02:08:00 +08:00
MrZ626
4c7ba04274 整理Player类代码,准备将玩家更新改为基于时间 2021-09-24 00:39:42 +08:00
MrZ626
bb60813323 修改Ospin的实现,O的旋转历史不再直接记录在玩家对象里而是放在方块数据中伴随方块刷新自动重置
两种方法各有缺点,暂时选择旋转系统不污染玩家的属性
2021-09-24 00:38:54 +08:00
MrZ626
4fc7dd447e 修改两处变量名,“累计值然后进行若干次操作”的变量使用trigXXX的格式 2021-09-24 00:37:59 +08:00
MrZ626
dc0b39d6b5 移除语言文件里多余的挖掘1000行模式信息 close #324 2021-09-23 15:45:21 +08:00
MrZ626
84058f9833 修正一处变量名漏改
整理代码
2021-09-23 15:16:58 +08:00
MrZ626
d78fc5bf9c 移动打包相关文件目录,等待修改ci
【警告】ci暂时不可用
2021-09-23 13:46:03 +08:00
MrZ626
d839037c09 修改gitigore 2021-09-23 12:13:00 +08:00
MrZ626
cfe0ef8864 把游戏logo的图片加回media文件夹以备不时之需 2021-09-23 12:06:55 +08:00
MrZ626
e2d12d766f 修正一处拼写错误 2021-09-23 11:54:52 +08:00
C29H25N3O5
e73647780c 增加 macOS 专用圆角图标 (#321) 2021-09-23 11:54:32 +08:00
C29H25N3O5
1de11365c1 降低 Shiny 皮肤饱和度 (#318)
* Delete shiny_cho.png

* Add files via upload

* Delete shiny_cho.png

* 降低 Shiny 皮肤的饱和度, 看起来不那么刺眼
2021-09-23 11:53:39 +08:00
MrZ626
7ebf8aca5b 修改更新历史和build号 2021-09-23 01:24:29 +08:00
MrZ626
58b8f354e0 无尽pc模式要求必须4行一次,两行pc不重置pc限制线 2021-09-23 01:23:42 +08:00
MrZ626
2bfcc7e0f2 统一管理玩家update函数而不是在特定时候切换,方便之后把帧步进改为时间同步 2021-09-23 01:18:01 +08:00
MrZ626
a7ddc69679 修正音效室mini和b2b(b3b)顺序不对 2021-09-23 01:00:37 +08:00
MrZ626
86d1f9470e 修正之前新公告解析的小问题 2021-09-22 19:34:45 +08:00
MrZ626
57a233d51b 降低高速经典-极限的评级标准 2021-09-22 14:18:19 +08:00
MrZ626
a021fcd951 HB和HG改回之前的无开关状态,等待之后重做mod close #317 2021-09-22 14:04:53 +08:00
MrZ626
3bfa49236e 更新仓库readme 2021-09-22 11:21:21 +08:00
MrZ626
0e52416a9b 整理代码,部分玩家绘制材质移动到TEXTURE模块
触屏设置界面绘制完整的玩家边框
2021-09-22 11:07:09 +08:00
MrZ626
a0f8258cad 修复重构语言模块后说明书场景爆炸 2021-09-22 11:03:55 +08:00
MrZ626
a2da057581 调整公告解析,自制一个简单的分语言公告格式 2021-09-22 11:03:55 +08:00
MrZ626
56cbe4c5b6 添加log模块,用于代替之前缺少音频文件弹出的消息框
也给缺少图片和加载错误语言等地方添加了日志
控制台添加log命令输出日志
2021-09-22 11:03:55 +08:00
MrZ626
48c9bd6dfd 调整小程序arm题目顺序 2021-09-22 11:03:54 +08:00
MrZ626
a30b69db4c 调整未来计划上面的版块,个别内容移至私密笔记 2021-09-22 11:03:54 +08:00
Not-A-Normal-Robot
e57ddbb6eb Fix dig 10l, 40l, and 100l (#310)
Previously, it didn't find eventsets named "dig_(n)L" because there were only "dig_(n)l" (capitalization). This fixes that.
2021-09-22 11:03:54 +08:00
MrZ626
f1068eacd8 再次修正之前整理小程序代码把FONT.set打成FONT.get close #312 2021-09-22 11:03:54 +08:00
huaji2369
b762741a6e 修改机翻的回滚语言为中文 (#314) 2021-09-22 11:03:54 +08:00
MrZ626
1f59aaca43 微调机翻语言 2021-09-22 11:03:53 +08:00
MrZ626
53d4fd8547 修正之前整理小程序代码把FONT.set打成FONT.get 2021-09-22 11:03:53 +08:00
MrZ626
0eea1ae0c6 经典模式全部换新,只保留三个从9/18/29开始的模式
注意:提速的行数和分数显示不完全和原版一致
2021-09-22 11:03:53 +08:00
MrZ626
43a2ca9407 把经典模式减少到三个(平衡还未调整) 2021-09-22 11:03:53 +08:00
Not-A-Normal-Robot
30ed4179d6 Add easier Classic modes (#302)
* Remove SDARR limitation on Rhythm

* Remove SDARR limitation on Rhythm

* Remove SDARR limitation on Rhythm

* Revert "Remove SDARR limitation on Rhythm"

This reverts commit 1a0a56bbf6.

* Add classic modes: easy and normal

(Easy: lvl9 start, Normal: lvl15 start)

* fixed typos

* Updated map
2021-09-22 11:03:52 +08:00
MrZ626
6f715a663a 整理代码,略微提升部分小程序的性能 2021-09-22 11:03:52 +08:00
MrZ626
1d30623222 微调语言相关 2021-09-22 11:03:52 +08:00
MrZ626
4db71b4b0d 修正一处要加载的文件大小写错误导致部分系统会找不到文件 2021-09-22 11:03:52 +08:00
MrZ626
fe6d698b74 修改更新历史和build号 2021-09-22 11:03:52 +08:00
MrZ626
7393b3c716 新语言:机翻
语言模块升级
支持更自由地添加语言(不再使用语言序号)
给getTip设置metatable的代码移出模块
2021-09-22 11:03:51 +08:00
MrZ626
493fcb2f05 修正曾经语音和音效未区分时欢迎音效和欢迎语音文件名不同导致分开后看起来很奇怪 2021-09-22 11:03:51 +08:00
MrZ626
47c509c0a7 移除工程文件内图标,不用love自带设置图标,让每个平台自己决定 2021-09-22 11:03:51 +08:00
MrZ626
c98783d33f 调整无移动模式规则,不再禁止软降n格了 2021-09-22 11:03:51 +08:00
MrZ626
b71c9d7bf3 小程序arithmetic支持小键盘,调整部分题目数量 2021-09-22 11:03:51 +08:00
MrZ626
25ed49f1a6 微调小程序arithmetic的ui,修复按钮重叠 close #304 2021-09-22 11:03:50 +08:00
MrZ626
cb0a3314b6 修改更新历史和build号 2021-09-22 11:03:50 +08:00
MrZ626
3880197d02 新增小程序:Arithmetic(未完成) 2021-09-19 04:23:37 +08:00
MrZ626
ec04da06d7 整理代码 2021-09-19 04:20:16 +08:00
MrZ626
4654e9f7c7 移除sad和egg两条语音
修正之前有个语音包文件夹名忘了改
2021-09-18 22:10:47 +08:00
MrZ626
fc3517584d 大改配音说明文档 2021-09-18 22:07:10 +08:00
MrZ626
8677e98a24 触发防沉迷的两个时间点降低到为2小时和4小时 2021-09-16 20:17:06 +08:00
MrZ626
152dc13ded 微调声音设置页面 2021-09-16 20:14:33 +08:00
MrZ626
76ab6282a9 删除测试ios退出相关的临时代码 2021-09-16 13:21:25 +08:00
MrZ626
61b264cd70 给几乎所有滑条和复选框控件添加文本限制宽度 2021-09-16 02:31:13 +08:00
MrZ626
3714fea994 滑条和复选框控件支持lim属性限制文本宽度 2021-09-16 02:29:58 +08:00
MrZ626
e1a820d1f9 给GC扩展模块的对齐draw们添加注释 2021-09-16 02:07:59 +08:00
MrZ626
3f94dadcef 小程序link:
修复第16关统计数据看不到
修复红色和黄色格子的图案一样
略微减淡图案
添加最大连击数显示
FC奖励分数直接乘*1.1
2021-09-16 02:07:38 +08:00
MrZ626
e67d6ce53c 小程序link加上图案 2021-09-15 22:58:19 +08:00
MrZ626
13cf53e885 移除小程序15p完成后文本提示 2021-09-15 22:20:14 +08:00
MrZ626
f95be0996d 调整mini打包流程(因为修改了媒体文件目录) 2021-09-15 01:31:35 +08:00
MrZ626
dbc5a1e45c 修改更新历史 2021-09-15 01:24:03 +08:00
MrZ626
dd30e4b3ec iOS退出失败会提示 close #273 2021-09-15 01:22:48 +08:00
MrZ626
9468c0435a 添加音效包选择(暂无其他音效包)
整理音频文件目录(文件夹名都小写)
2021-09-15 00:25:47 +08:00
user670
4be5933dc8 Update app_console.lua (#294)
update description of Link. Shisen-Sho (四川省) is the Japanese name of this game, for there is no other names accepted in the English language. No, I'm not accepting "Link link go" as an acceptable name. No, Mahjong Solitaire is a totally different game.
2021-09-14 17:26:36 +08:00
user670
fe5ba06328 Update updateLog.lua (#298)
remove duplicate line
2021-09-14 17:26:18 +08:00
user670
a2f5db8d3c Update dict_en.lua (#293)
wtf is with Naki/Mono?

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-09-14 17:25:46 +08:00
MrZ626
b48e65a9d8 Zframework允许外部设置开关电量显示的条件函数 2021-09-14 17:24:37 +08:00
MrZ626
18471a201f 设置新增是否使用系统光标的选项(系统光标不受按键即隐藏的影响) close #295 2021-09-14 17:24:15 +08:00
MrZ626
1d61a3af8b 调整词典mono词条 2021-09-14 13:07:52 +08:00
Not-A-Normal-Robot
e4f5b8f95c Invis --> Invisible (#299)
* Invis --> Invisible

For modes, "Invisible" still fits, so the shortened version is not needed. This is untrue for modes with invis modes though, they might not fit.

* Lined up text
2021-09-14 12:56:57 +08:00
MrZ626
d31ab133f4 小程序Link微调ui 2021-09-14 04:04:38 +08:00
MrZ626
dcc15dd42b 修改更新历史和build号 2021-09-14 03:45:08 +08:00
MrZ626
280f2c0af5 小程序Link移除速打,添加FC机制 2021-09-14 03:44:15 +08:00
MrZ626
890264ef7d 小程序Link添加连击和分数系统 2021-09-14 03:01:20 +08:00
MrZ626
e9d58a4f74 新增小程序:Link 2021-09-14 01:09:19 +08:00
MrZ626
9020798f90 dtw小程序按key音改成锁定音 2021-09-13 21:11:19 +08:00
MrZ626
7167df10e6 修复cannon小程序单击左键没用 2021-09-12 21:14:55 +08:00
MrZ626
8bedd7aa2a 加快切后台自动静音速度 2021-09-12 21:14:06 +08:00
MrZ626
357e747391 微调中文词典sub词条,说法更严谨 2021-09-12 20:25:53 +08:00
MrZ626
8c11721c75 世界线变动(游戏内容无关修改) 2021-09-12 14:27:18 +08:00
MrZ626
da13235c88 可以设置失去焦点后自动静音 close #281 2021-09-12 03:50:29 +08:00
MrZ626
aababce74c 取消静音按钮,添加总音量滑条 2021-09-11 23:03:49 +08:00
MrZ626
a395004027 bgm模块新增continue方法可以继续播放之前stop的音乐(未使用) 2021-09-11 22:49:46 +08:00
MrZ626
0489394d67 静音首页机器人 2021-09-11 22:47:42 +08:00
MrZ626
4cde774cc2 Zframework框架文件会返回一个table了
可以在框架文件之外使用setCursor方法在外部设置绘制光标的函数
2021-09-11 22:15:29 +08:00
MrZ626
baa2b105d3 添加miku立绘(据vocaloidvictory说这张图可以使用) 2021-09-11 21:42:28 +08:00
MrZ626
9667d9ffa8 修改更新历史 2021-09-11 20:33:22 +08:00
MrZ626
b8b85b569c 把方便改的blind都换成invis,防止冒犯到盲人
模式名里的blind没有改,会影响存档数据不方便,不会在游戏里直接显示 close #291
(好奇真的有盲人玩吗)
2021-09-11 20:32:12 +08:00
MrZ626
27f2d05c56 马拉松bfmax模式pc不再会死 2021-09-11 19:57:08 +08:00
MrZ626
49e1c0758d 调整选择器控件出错时的行为
修复没有音乐文件的时候dtw小程序报错
2021-09-11 19:44:13 +08:00
MrZ626
2299eb0e33 节奏模式代码直接调用硬降,而不是帮玩家按硬降键 2021-09-11 17:25:33 +08:00
MrZ626
b6e17594c6 修正换回字体后mod菜单文本没对齐 2021-09-11 16:32:25 +08:00
MrZ626
19c2724e8b TEXT模块会生成文本对象用于绘制
优化绘制方式,略微提升性能
2021-09-11 16:32:06 +08:00
MrZ626
7f4591bcec 关闭方块和影子的mod也可以强制开启 close #289 2021-09-11 16:09:51 +08:00
MrZ626
4de7ee4ce0 调整触屏和控件交互的细节,滑条可以拖出范围但不失去焦点 close #279 2021-09-11 04:39:45 +08:00
MrZ626
eb6f1718a8 修复小程序dtw切换模式的时候不会自动重置谱面 2021-09-10 22:44:15 +08:00
MrZ626
36ce09c4f1 修复暂停不会松开虚拟按键的(动画,玩家逻辑上其实松开了) close #280 2021-09-10 22:28:27 +08:00
MrZ626
1994a615c2 节奏模式取消禁止瞬移的设置 close #287 2021-09-10 22:05:25 +08:00
MrZ626
82b75a5aa9 修复miku语音包b2b和b3b结束太短的问题 2021-09-10 18:32:49 +08:00
MrZ626
2ec91f58ae 暂时注释掉bgm和voice模块缺失文件时弹出消息的代码 close #288 2021-09-10 17:38:22 +08:00
MrZ626
e9cd7ef5ca 补充miku语音包的胜利语音 2021-09-10 17:19:10 +08:00
MrZ626
29aff06b1d 新增bgm:Null(用于zday节日,替换原来的blank) 2021-09-10 16:59:45 +08:00
MrZ626
18f3414f34 修复master-ex时间指示条结束的时候绘制错误,略微增加alpha 2021-09-10 16:59:12 +08:00
MrZ626
a7b236d528 master-ex添加一个时间指示器 close #286 2021-09-09 22:09:33 +08:00
MrZ626
46fdf03925 自定义游戏和自定义房间的eventSet列表移至list.lua统一为一个表 2021-09-09 21:20:05 +08:00
MrZ626
f67f31baa2 修改更新历史和build号和房间版本名 2021-09-09 21:10:17 +08:00
MrZ626
1fcbb8ea7d 添加miku语音包
所有方块spin都可以有对应语音
修正部分PQ方块名弄反
修正RSlist文件里旋转中心表的JL注释弄反
2021-09-09 20:15:40 +08:00
MrZ626
60ef682c80 玩家添加弹出过关文本的方法,大师模式统一使用该方法
大师-虚幻添加过关文本close #282
2021-09-09 19:45:52 +08:00
MrZ626
c668a22345 修正关卡完成时文本的不合适(其他语言等待翻译) close #283 2021-09-09 15:35:08 +08:00
MrZ626
cb69f011e5 两个可以选规则包的地方补充master_m close #284 2021-09-09 15:29:05 +08:00
MrZ626
176e96fd1f 所有打错的hexcrash和pentcrash重新加回a 2021-09-09 15:05:05 +08:00
MrZ626
43e550b9b2 修正经典模式系列相关 2021-09-09 15:04:50 +08:00
Not-A-Normal-Robot
ee139d5ff0 Add lvl19 and lvl29 starts for Classic mode, rename from classic_fast to classic_hard (#285)
* Add more Lvl19 Classic start

* Add lvl29 Classic start

* Rename classic_fast.lua to classic_hard.lua

* Update and rename classic_fast.lua to classic_hard.lua

* Add Classic Lunatic mode (lvl19 start)

* Rename classic_hard.lua to classic_h.lua

* Rename classic_lunatic.lua to classic_l.lua

* Rename classic_ultimate.lua to classic_u.lua

* Rename classic_hard.lua to classic_h.lua

* Add lvl19 and lvl29 start

* Update modes.lua

* Update classic_h.lua

* Create classic_u.lua

* Update classic_u.lua

* Update english language to add Classic text

* Added more space between Classic modes

* Add compatibility for old replays

* Update lang_en.lua

* deleted classic ultimate and master m21 overlap

* Added Classic modes into spanish

I do not speak spanish, I just copied from the other entries, hopefully it's right....

* Update lang_fr.lua

* Update lang_pt.lua

* Update lang_yygq.lua

sorry if wrong, i don't really know much chinese

* Update lang_zh.lua

* Update lang_zh2.lua

* added a single = sign

i forgot to add this, whoops!

* added a single comma

yes, i'm that dumb.
2021-09-09 15:04:28 +08:00
MrZ626
5c5ec3e16c 恢复之前字体的电量显示ui 2021-09-09 04:11:53 +08:00
MrZ626
da82d679ce 修正语音说明文档两个拼写问题 2021-09-08 17:01:19 +08:00
MrZ626
834a08d58d 词典更新捐赠的说明,中文添加挖掘词条 2021-09-08 17:00:02 +08:00
MrZ626
395485527e 整理代码规范说明 2021-09-05 18:07:45 +08:00
MrZ626
8c9fd45fcc 修复2048小程序自动重复器点不动 2021-09-05 17:46:27 +08:00
MrZ626
59356b9f28 移除barlow字体 2021-09-04 22:16:23 +08:00
MrZ626
bb3cc84ca4 统计场景表格字体对齐 2021-09-03 01:36:30 +08:00
MrZ626
ac2c708d01 更新代码规范 2021-09-03 00:28:08 +08:00
MrZ626
57497dbd74 整理代码,较复杂的单行if-then-end拆成多行 2021-09-03 00:28:08 +08:00
MrZ626
827d0cdf5a mod场景字体对齐 2021-09-03 00:28:08 +08:00
Not-A-Normal-Robot
e3539f17bd Tool Assisted Supergaming --> Superplay (#278)
On the English wikipedia, it is listed as Superplay, not Supergaming.
2021-09-03 00:22:53 +08:00
MrZ626
b88580ad9a 补充英语词典两个词条 2021-09-02 17:39:28 +08:00
MrZ626
8d8cceaeea 微调框架两个模块细节 2021-09-02 17:39:28 +08:00
MrZ626
290c7988b2 string扩展模块新增一个简单的浮点转大数字格式函数 2021-09-02 17:15:24 +08:00
MrZ626
f97767aff4 玩家左下角时间显示改用时分秒格式 close #271 2021-09-01 04:09:10 +08:00
MrZ626
fae14d4f9b 修正联网游戏按钮位置偏了一点 2021-09-01 03:41:45 +08:00
MrZ626
699247266e 修复录像菜单文字没对齐 2021-09-01 03:15:16 +08:00
MrZ626
5c8b80741f 挖掘模式也使用独立规则包,可以对战使用 2021-09-01 03:14:37 +08:00
MrZ626
e5287d876b 修改staff表 2021-08-31 05:23:22 +08:00
MrZ626
b3e6e42790 修正联网模式可以F8+F4
整理代码,游戏场景不再有自己的tasUsed变量
2021-08-31 05:14:00 +08:00
MrZ626
fce5b9696f 微调词典
整理代码
修改更新历史和build号
2021-08-31 04:33:56 +08:00
MrZ626
f252ed63d5 eventSet可以修改所有参数
整理代码
2021-08-31 00:42:52 +08:00
C29H25N3O5
3114d3a27d Added a new block skin "cho_shiny" (#266)
* 添加一款新皮肤

* Update main.lua
2021-08-30 10:46:31 +08:00
MrZ626
e186bfe80d 修复set20G禁用n格软降键逻辑问题 2021-08-30 00:22:38 +08:00
MrZ626
3db2a4b30d 修改两处在GC.DO里使用print,防止更换字体后明显不对齐 2021-08-29 23:25:38 +08:00
MrZ626
1c25138eaf 修复master-ex左侧信息 close #260 2021-08-29 23:05:08 +08:00
MrZ626
1807c95c53 修正tas大字位置不正确(之前默认了一个字体的尺寸所以换完字体爆了) 2021-08-29 22:48:46 +08:00
MrZ626
7ea78ee48a 移除自定义默认显示行数的设定 close #262 2021-08-29 22:45:46 +08:00
MrZ626
5d57feaea5 修正49和99左侧信息不见了 2021-08-29 21:58:35 +08:00
MrZ626
f4583e46bf 微调极简奖杯字号和位置 2021-08-29 21:58:19 +08:00
MrZ626
5ed00a67c4 修复下4和下10的严重问题 2021-08-29 21:57:08 +08:00
MrZ626
0148c539be 修复默认按键布局数据错误 2021-08-29 21:01:07 +08:00
MrZ626
51cdf864be 修复字符串扩展模块时间转换方法问题
微调音乐室ui
修复更换字体后左上时间歪了
2021-08-29 17:40:32 +08:00
MrZ626
bd9ee49255 调整字体相关的一些东西
整理代码
2021-08-29 16:08:51 +08:00
MrZ626
16c377427a setFont改为font模块,字体文件放到parts/fonts内,调整打包ci对应处 2021-08-29 14:17:52 +08:00
scdhh
66dcfa40b0 更改字体文件存放位置,并对应修正ci (#254) 2021-08-29 12:15:40 +08:00
MrZ626
e726ef505f 修改代码规范说明文件
并和license/readme一起更换目录
2021-08-29 12:12:10 +08:00
MrZ626
a686a2e9d1 添加代码规范文件 2021-08-29 04:11:25 +08:00
MrZ626
720ee71f8b 词典加回T3055(因为在开发nanamino)
词典添加Nanamino词条
2021-08-29 04:10:14 +08:00
MrZ626
557cdf6cfb 添加barlow-condense字体作为首选英文字体(免费商用) 2021-08-29 04:10:10 +08:00
MrZ626
6b93675ec1 2021-08-29 03:11:34 +08:00
Not-A-Normal-Robot
9419c4c639 Change description of Turn-based mode (#247)
Might need some line breaks in there, but idk where so I'll leave it like this
2021-08-29 01:37:28 +08:00
MrZ626
7eb243a18f 整理代码 2021-08-28 23:23:51 +08:00
MrZ626
3a2b531d4c 修复blind-wtf绘制元素缺少 close #248 2021-08-28 22:49:04 +08:00
MrZ626
05068f8df5 修正更换mesDisp机制后忘了给repMode参数 2021-08-28 22:32:15 +08:00
MrZ626
a6d80667c1 减慢使用默认update模板函数的bot线程结束后拍硬降的速度 2021-08-28 22:25:35 +08:00
MrZ626
a0dccadfd7 修正高速经典开局锁延条不对 2021-08-28 22:24:28 +08:00
MrZ626
7992eab16c 新增master_m模式 2021-08-28 22:23:17 +08:00
MrZ626
a1c6f720a2 代码规范:所有文件以空行结尾 2021-08-28 16:46:10 +08:00
MrZ626
a1162f1b0f 修改TRS中S5和Z5的踢墙表 2021-08-28 16:22:03 +08:00
MrZ626
80f21ae2f0 修复自定义房间选项规则包设置值取错 2021-08-28 15:44:32 +08:00
flaribbit
fce8623595 Update require.lua (#245) 2021-08-28 15:43:43 +08:00
MrZ626
e82a5c8026 自定义游戏和创建房间可选规则包,微调附近控件位置
补充??语言联网菜单的文本
房间版本改为1.a
2021-08-28 15:04:10 +08:00
MrZ626
517d4cfc82 每个mesDisp开始都会重新设置画笔为白色 2021-08-28 15:04:00 +08:00
MrZ626
7f7f7e752e mesDisp加入eventSet
eventSet中的规则不在覆盖,而是全部同时生效
调整部分模式的信息显示
自定义游戏可以选择部分eventSet
整理代码
警告:可能部分模式有问题,需要测试
2021-08-28 04:01:58 +08:00
MrZ626
5963db479e 【eventSet系统修正】修正节奏模式模板并
调整节奏模式h难度速度曲线
2021-08-28 01:19:30 +08:00
MrZ626
96266ab310 【eventSet系统修正】修正无尽pc爆炸 2021-08-28 01:12:15 +08:00
MrZ626
c7f6b396e0 修复require模块在安卓获取架构错误 2021-08-28 00:05:16 +08:00
MrZ626
b7ca91f9e2 修改build号和更新历史 2021-08-27 23:25:36 +08:00
MrZ626
9ec7cdb070 控制台添加删除模式排行榜的命令 2021-08-27 23:25:11 +08:00
MrZ626
3e1220fa0e 控制台执行lua代码时sudo模式开关会影响输出文本颜色 2021-08-27 22:42:47 +08:00
MrZ626
660946215e tab缩进换成空格 2021-08-27 22:40:03 +08:00
MrZ626
a7b38335c9 微调自定义游戏和音乐室ui
整理代码
2021-08-27 22:29:32 +08:00
MrZ626
e4803cc89d 音乐室显示bgm的进度,添加可拖进度条 2021-08-27 20:59:25 +08:00
MrZ626
b104298c7d 修正string扩展模块的time方法的取整问题
新增time_simp方法
2021-08-27 20:58:41 +08:00
MrZ626
e049375bbc 修正所有语言文件的spin文本多了一个空格 2021-08-27 18:53:54 +08:00
MrFaq2018
f48bd550b7 Updated Spanish lang (#238)
* Update lang_es.lua

* Update lang_es.lua
2021-08-27 18:46:36 +08:00
MrZ626
00ec064dc3 下载云存档时会更强力地覆盖原来的数据
修复下载云存档时进度不会完全恢复 close #240
2021-08-27 18:13:05 +08:00
MrZ626
4c5409aa01 补充消200行的配置小模块 2021-08-27 14:16:32 +08:00
MrZ626
6166c87e16 修正部分地方玩家的small属性没有改成新的miniMode导致一些坐标计算错误 2021-08-27 00:17:20 +08:00
scdhh
159cd74c28 动态获取CC版本号 (#237)
* 动态获取CC版本号
release CI使用latest
snapshot 使用 pre-release(如果有的话)

* Windows 添加安装 requests 模块步骤
Linux及macOS 修正python版本和路径

* macOS 添加安装 requests 步骤
修正命令参数位置

* getLatest接收Repo,使其不止能用在CC上

* 修正macOS使用的pip版本
2021-08-27 00:04:34 +08:00
MrZ626
60ef83dd34 修复混战模式9S显示模式错误 2021-08-27 00:03:59 +08:00
MrZ626
3c02c5957e 加载cc失败的时候不会报错了 2021-08-27 00:02:24 +08:00
MrZ626
bbef071931 loadlib模块改名require模块 2021-08-27 00:02:08 +08:00
MrZ626
726928aadc 挖掘模式开局10的行也使用eventSet 2021-08-26 23:58:40 +08:00
MrZ626
7ad386d28f 重构模式环境的dropPiece和task事件为更强大的自定义和未来联网任意模式做准备
整理出所有模式的这两个事件独立到一个文件夹并整理所有模式引用它们的方式
警告:很可能有错误,需要他人帮助测试
2021-08-26 23:49:20 +08:00
MrZ626
a4c9bdef4a 修复包分界线关不掉
包分界线颜色改成透明灰
2021-08-26 19:38:47 +08:00
MrZ626
a64edc70ed 整理代码,修复birs报错 2021-08-26 17:13:01 +08:00
MrZ626
f6826432d0 修正主界面cc的bag模式为true
cc移动加速
2021-08-26 17:09:16 +08:00
Trebor Huang
f29efa8f60 Update cc ci (#235)
* 将CCwrapper更新到最新版本

* 修笔误

* 更新release.yml
2021-08-26 16:43:10 +08:00
MrZ626
e7bcf489eb 降低回合制难度和评级标准 2021-08-26 16:35:06 +08:00
MrZ626
15d43f6313 修复机器人更新协程结束后不会让机器人进入自杀模式 2021-08-26 15:46:50 +08:00
MrZ626
a7f7374f96 修复loadlib小模块在安卓上会一直复制so库文件 2021-08-26 15:20:15 +08:00
MrZ626
de1a1cbe9a 修正cc初始化时的一些小问题 2021-08-26 15:19:40 +08:00
MrZ626
27a0e8ee3a 整理代码 2021-08-26 15:08:24 +08:00
Trebor Huang
db4f193046 适配CC API (#233)
* 适配CC API

* 修正上游代码
2021-08-26 14:29:41 +08:00
MrZ626
118182a6cc 修改更新历史和build号 2021-08-26 03:39:30 +08:00
MrZ626
442b3bd233 BGM模块新增setChange方法可以设置切换BGM的时候会触发的事件
切换BGM时弹出BGM名称
2021-08-26 03:37:06 +08:00
MrZ626
12c96f321b 新BGM:Jazz nihilism(用于节日主题,by Trebor) 2021-08-26 03:09:46 +08:00
MrZ626
f77d8d5219 修改/添加bot的api
更新ccBot相关代码(需要修正)
2021-08-26 02:43:16 +08:00
MrZ626
b7d5a3f9c6 string扩展模块新增16进制颜色解析函数 2021-08-26 00:45:48 +08:00
MrZ626
b887ca01d0 修复之前整理代码有个if写错了导致移动特效不见了 2021-08-25 23:19:45 +08:00
MrZ626
179ff9b10a 整理代码,跟进之前的整理玩家方法 2021-08-25 14:01:11 +08:00
MrZ626
4c18629cd7 修正之前玩家showTextF方法改名但用的地方漏改了 2021-08-25 13:51:20 +08:00
MrZ626
295e79984f 代码规范:把所有的tab换成空格 2021-08-25 04:28:52 +08:00
MrZ626
8f910f95f4 整理代码,调整local函数名规范(较边缘的代码不必遵守,比如外部的库和小程序):
特别临时性的用全大写字母缩写或者单字母
TASK模块用到的任务函数和检查函数开头分别为task_和check_
其他函数开头添加下划线作为指示
2021-08-25 02:40:01 +08:00
MrZ626
ee55055385 消除目标线高度会在消行时跟随平滑下落动画 close #208 2021-08-25 02:13:17 +08:00
MrZ626
674edfc330 开启平滑下落且有消行延迟时的消行动画曲线拉直一些 2021-08-25 02:09:05 +08:00
MrZ626
c33e5029df 重新封装控制台非sudomode的print函数并支持多参数分行输出
修复非sudomode下控制台执行#print非字符串内容会报错(之前print被直接接入了log没有做类型转换)
close #231
2021-08-25 01:55:41 +08:00
MrZ626
a2f205362a 重新组织玩家各种生成特效的方法,使用的地方不传入各种参数更简洁易读
有特殊需要越过设置显示请使用几个_XXX方法(注释了Not used)
2021-08-25 01:41:39 +08:00
MrZ626
3d6771b3d2 整理代码 2021-08-25 01:29:19 +08:00
MrZ626
fe9ff0c337 修改更新历史和build号 2021-08-24 19:32:51 +08:00
MrZ626
754545cc40 简单封装保存统计、进度、设置的三个函数方便阅读代码
f11开关全屏时会自动保存设置
close #230
2021-08-24 18:29:45 +08:00
MrZ626
aab45b1b14 显示模式信息的函数也可以拿到“回放状态”变量
隐形wtf模式在tas模式下不会完全遮挡
2021-08-24 18:14:04 +08:00
MrZ626
9eaa00e878 调整loadLib加载安卓so库的策略(需要等待后续测试) 2021-08-24 18:01:29 +08:00
MrZ626
8520ca44ee 修复退出联网游戏界面时会因为太早销毁玩家导致场景切换之前仍需要绘制的时候报错 close #228 2021-08-24 17:56:10 +08:00
scdhh
6b8ac5e939 添加pr触发actions (#227) 2021-08-24 17:18:28 +08:00
MrZ626
5767acb5bf 完善词典T283词条 2021-08-24 17:15:07 +08:00
MrZ626
9e3fc97727 修复master-ph模式部分随机没有使用玩家的随机器导致录像回放不一致 close #226 2021-08-24 17:12:50 +08:00
MrZ626
7817499da7 AITemplate小模块合并至BOT模块并优化参数样式
修改所有之前的AITemplate至新格式
启用9s的hold开关(之前有开关但是没用)
准备好cc对接相关代码模板(不能用所以注释了,需要修改)
2021-08-24 05:15:27 +08:00
MrZ626
1c43e92577 增加尝试接入CC的代码模板(注释),等待后续修改 2021-08-24 01:46:59 +08:00
MrZ626
3e4f945d56 修复触屏退出游戏的按钮没有取消游戏中状态导致进不去隐藏模式 2021-08-24 00:46:48 +08:00
MrZ626
491c4d25d7 重构ai模块,等待使用新wrapper接入cc,bot数据结构未定 2021-08-23 23:02:35 +08:00
MrZ626
2432d57d70 整理代码 2021-08-23 20:03:25 +08:00
MrZ626
9408b592fd 修改更新历史 2021-08-23 04:39:14 +08:00
MrZ626
743f192d85 调整限60fps代码,让出时间更接近一帧 2021-08-23 04:30:43 +08:00
MrZ626
4e47b0acb7 再整理cc相关代码 2021-08-23 04:29:46 +08:00
MrZ626
43ab4e1e42 回合制改为7块一回合和两条命 2021-08-23 04:08:41 +08:00
MrZ626
9b28cdbcd2 方块对象里不再存旋转中心了,直接存旋转系统
修复玩家初始化时cc的初始几块中心位置不正确导致崩溃(好像是超级远古bug,终于修了)
2021-08-23 03:33:37 +08:00
MrZ626
acb29c33d3 调整destroyPlayers过程对cc特殊处理的代码 2021-08-22 17:41:01 +08:00
MrZ626
e3eee3dc02 微调table扩展 2021-08-22 17:31:36 +08:00
MrZ626
e3eae25caa 修复cc出故障后非lua对象不会自动回收导致内存泄漏 2021-08-22 16:17:49 +08:00
MrZ626
cc23869128 把检测ai是否放到目标位置的代码独立出玩家lock方法,略微提升性能 2021-08-22 15:35:40 +08:00
MrZ626
36c11961b6 修改更新历史版本号build号 2021-08-22 02:09:43 +08:00
MrZ626
f21dc94979 修改ARS_Z的中心样式 2021-08-22 02:07:35 +08:00
MrZ626
d4ab850e7b 补充修复之前15p盲打报错的一个小问题 2021-08-22 02:04:23 +08:00
MrZ626
edf6e075f2 修复复活时命数减少动画位置不正确 2021-08-22 02:02:12 +08:00
MrZ626
92c3b8314d 修复回放模式下强制显示ghost时报错 2021-08-22 00:27:15 +08:00
MrZ626
33260fc820 修复15p开盲打报错,调整紫色格子的颜色更清晰 2021-08-22 00:17:29 +08:00
MrZ626
5b5afec84d 调整ai尤其是cc相关代码,捕获窒息的时候可能会有实心行错误并让cc进入自杀模式 2021-08-21 23:43:12 +08:00
MrZ626
d818e697e9 尝试保存数据的时候添加“p1是人类玩家”的条件 2021-08-21 21:22:00 +08:00
MrZ626
03edb20265 修改主循环帧率控制代码,尝试修复love的wait(0)导致部分设备的巨大误差 2021-08-21 21:16:45 +08:00
MrZ626
4157062442 增大场地晃动的阻力,不再会在原点来回晃 2021-08-21 16:52:52 +08:00
MrZ626
2f46645149 补充ARS_Z, Classic, Classic_plus三个旋转系统的中心并启用中心显示 2021-08-21 03:09:32 +08:00
MrZ626
31f4576acd 添加SRS_X旋转系统 close #175 2021-08-21 03:00:03 +08:00
MrZ626
e1d85b0a04 新增ARS_Z旋转系统 close #141 2021-08-21 02:40:56 +08:00
MrZ626
961cf347da 整理场地晃动相关代码 2021-08-21 01:56:29 +08:00
MrZ626
02c4655f0d 更新issue模板 2021-08-21 01:34:14 +08:00
MrZ626
b7b94ca900 修复旋转时场地晃动的逻辑会跟玩家sound有关 2021-08-21 01:15:54 +08:00
MrZ626
8671b52cbb Update CI
Co-authored-by: scdhh <51957264+shoucandanghehe@users.noreply.github.com>
2021-08-21 01:15:14 +08:00
MrZ626
9fe045b916 修复混战模式的被攻击线位置错误 2021-08-20 22:19:51 +08:00
MrZ626
4d2a914719 词典添加asc词条,英文等待翻译 2021-08-20 03:02:16 +08:00
MrZ626
1cfcf03ede 修改连接的服务器地址
修改更新历史和build号
2021-08-20 01:40:22 +08:00
MrZ626
a81d2e9ccc 修复tas的时候重开游戏会有问题 2021-08-20 01:34:04 +08:00
MrZ626
d7cf2c19ab 降低堆积模式CD评级/上榜的难度 2021-08-20 00:00:20 +08:00
MrZ626
42c72349dd 修改更新历史 2021-08-19 22:03:59 +08:00
MrZ626
027a228734 修复绘制任务会报错 2021-08-19 20:45:15 +08:00
MrZ626
543aed0350 控制台sudo模式开启后用#执行命令就可以,不需要一直输入sudo了 2021-08-19 20:43:46 +08:00
scdhh
fa704c5d66 添加自动Release CI,并重构现在Snapshot CI的一些步骤 #204 (#217)
* 修改updateConfVersion.py

* 添加更新conf.lua时修改存档目录的步骤

* Add files via upload

* 更改ci脚本以适配新版版本信息

* 修正问题

* 打包时添加version.lua

* 更新updateVersion.py以适配新版版本信息

* 删除被替换的py文件

* 同步release分支

* 修复Windows CI的bug

* 修正路径

* 修正Linux权限错误

* 尝试修复Windows CI错误

* 尝试修复Windows CI的bug

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-08-19 20:31:27 +08:00
MrZ626
ad6adb221c 修复进画面设置报错 close #216 2021-08-19 20:15:50 +08:00
MrZ626
5978a80b46 修复版面遮挡位置错误并把遮挡区域改为灰色 2021-08-19 17:05:00 +08:00
MrZ626
8c4f380d73 整理代码,大量绘制玩家组件的函数可以传入具体参数而不是就一个玩家对象 2021-08-18 23:40:11 +08:00
MrZ626
273de18ae3 控制台开启tas的时候会提示热键 2021-08-18 21:14:25 +08:00
MrZ626
44082fe78e 修改更新历史 2021-08-18 15:33:47 +08:00
MrZ626
9e6295e008 控制台输入布尔值的两个命令改成on/off,tas会修改设置,重启游戏依然生效 2021-08-18 15:33:28 +08:00
MrZ626
eaf4e3d71e 将.97,.97,.975的白色改为.97,.97,.97 2021-08-18 15:22:14 +08:00
MrZ626
bd52f1bb3c 调整行号显示,更加清晰 2021-08-18 15:21:49 +08:00
MrZ626
6682355c1b 新增SRS_plus旋转系统,添加简单的180度踢墙表
除了I块使用TRS表外其他块使用一个简单表
2021-08-18 15:12:32 +08:00
MrZ626
f76b08ab27 游戏设置页面同时显示方块的旋转中心样式 2021-08-18 15:09:44 +08:00
MrZ626
1943a55bcc GC.DO的画布初始颜色从#00000000改为#FFFFFF00,不再整体偏暗
部分素材会因此变化,故一起调整
2021-08-18 15:09:20 +08:00
MrZ626
9ec822a095 修复SRS连180度空转都没有 2021-08-18 14:08:59 +08:00
MrZ626
04f67d4052 支持双语公告根据设置语言选择性显示 close #78 2021-08-18 03:33:36 +08:00
MrZ626
d9251f16db 修改更新历史 2021-08-18 03:23:58 +08:00
MrZ626
f268ed8427 修复行号显示不正确(最后一次,大概) 2021-08-18 03:23:39 +08:00
MrZ626
58881f8ef5 再调整堆积模式:
三个难度都用100高度场地
第二个难度四/五连块2包:1包混合
第三个难度纯五连块
2021-08-18 03:21:28 +08:00
MrZ626
addc68b5f1 修复从剪切板导入地图不会解锁没解锁的模式 2021-08-18 02:50:02 +08:00
MrZ626
79368af6ee 修复MES模块弹出消息时卡顿会导致消息浮空 close #182 2021-08-18 00:04:56 +08:00
MrZ626
9f64d84c5a 完善截取release note的格式转换 2021-08-17 23:44:48 +08:00
MrZ626
bafc8abfc0 整理代码
预设虚拟按键的键位移入virtualkey模块
2021-08-17 18:35:26 +08:00
MrZ626
abaa962531 设置新增破纪录自动保存录像的开关(第一页往下拉) close #195 2021-08-17 15:57:55 +08:00
MrZ626
8049792dc4 玩家next序列长度增加至12(内部)
录像回放模式下会尝试显示至多12个next
2021-08-17 14:01:00 +08:00
MrZ626
7dbd5de980 词典新增骨块词条,英文等待更新 2021-08-17 12:51:47 +08:00
MrZ626
36a965a1c3 修改版本号和更新历史 2021-08-17 02:37:58 +08:00
MrZ626
d382bad8e1 tas模式下玩家会以回放模式绘制 2021-08-17 02:37:58 +08:00
MrZ626
186f18f4d2 tas模式下背景会有TAS大字 2021-08-17 02:21:54 +08:00
MrZ626
c777fc969a 优化切换到游戏场景时重置播放速度的逻辑 2021-08-17 02:12:16 +08:00
MrZ626
1b176ed5ad tas录像在录像列表会有标记 2021-08-17 02:12:03 +08:00
MrZ626
2654c8a614 优化tas工具的使用体验
暂时禁止录像中途进入tas模式
2021-08-17 01:45:43 +08:00
MrZ626
23e3dc465d tas功能需要到控制台使用tas命令开启,退出前有效 2021-08-16 23:38:17 +08:00
MrZ626
132cb89b90 整理代码,玩家的“录像绘制模式”不再自己决定而由外部传入 2021-08-16 23:15:46 +08:00
MrZ626
39ca55fd84 暂停界面会显示是否启用过TAS 2021-08-16 23:05:51 +08:00
MrZ626
d457fb0011 新增简易TAS工具,ctrl+T进入,f1暂停/开始,f2减速,f3加速/下一帧 2021-08-16 23:05:34 +08:00
MrZ626
42620bf739 整理Zframework代码
给所有模块进行更合理的分类
解除部分模块之间的依赖
修复image和bgm模块两个一般不会触发的小问题
close #209
2021-08-16 13:43:51 +08:00
MrZ626
fc8d19756d 修复皮肤设置菜单和联网对战菜单背景可能错误 2021-08-16 01:30:03 +08:00
MrZ626
45dce3210a 修复暂停时设置能进入彩蛋模式 close #206 2021-08-16 01:27:11 +08:00
MrZ626
9dbb32c982 修复退出自定义场地菜单重进后画笔设置会被恢复 close #213 2021-08-16 00:38:53 +08:00
MrZ626
cf84ab5921 修复自定义游戏可以在一些情况下同时打开ai和任务 close #211 2021-08-16 00:16:33 +08:00
MrZ626
05d01bbcc5 调整玩家两侧两个条的位置细节 2021-08-16 00:11:31 +08:00
scdhh
64b8058dc6 更新ci以适配新的版本信息文件 (#214)
* 修改updateConfVersion.py

* 添加更新conf.lua时修改存档目录的步骤

* Add files via upload

* 更改ci脚本以适配新版版本信息

* 修正问题

* 打包时添加version.lua

* 更新updateVersion.py以适配新版版本信息

* 删除被替换的py文件

Co-authored-by: MrZ_26 <1046101471@qq.com>
2021-08-15 22:19:10 +08:00
MrZ626
ba09d9440f 微调staff滚动速度
提升一位赞助人
2021-08-15 16:13:27 +08:00
MrZ626
21fc6505ff 修正极简连击显示尺寸没固定 2021-08-15 16:08:29 +08:00
user670
5a27de7550 Update dict_en.lua (#205)
- Added translation to the harddrop lock thing
- Changed SDF because Tetris Effect and Tetris 99 don't have strict 20x SDF
2021-08-15 15:54:08 +08:00
MrZ626
9c9324e7d9 修复next hold等图层在消除文本之上 2021-08-15 15:09:31 +08:00
MrZ626
e938621996 修正堆积模式数洞函数变量名错误 2021-08-15 00:25:07 +08:00
MrZ626
4cf1f4ba15 启动时如果是安卓系统就设置窗口resizable=false,防止未来更新SDL2后屏幕乱转 2021-08-15 00:13:02 +08:00
MrZ626
ce937bd0bb updateLog文件不再返回分行好的数据,方便ci截取段落作为release note 2021-08-14 22:55:00 +08:00
MrZ626
3e4963e56c 把当前版本信息从conf里独立出来,方便ci读取信息 2021-08-14 22:15:43 +08:00
MrZ626
adb205d8fa 移除堆积模式左侧信息 2021-08-14 17:54:53 +08:00
MrZ626
c4f6a6823d 版本号改为0.16.1,修改更新历史和build号 2021-08-14 14:29:19 +08:00
MrZ626
f53a37c496 调整堆积模式:
评判标准改为洞数
使用blockrain背景
检测到0.16.0版本会自动清除该模式记录
2021-08-14 14:28:19 +08:00
MrZ626
fbc1c6b60a 新增行号显示(设置可调透明度) close #196 2021-08-14 13:25:34 +08:00
MrZ626
6559a405e1 修复选中listBox时按空格会报错 2021-08-13 22:22:11 +08:00
MrZ626
45ec45c206 修复录像回放的时候如果设置暂停按钮在左边就会重叠 2021-08-13 21:45:37 +08:00
MrZ626
a0ff754464 微调皮肤设置页面布局 2021-08-13 21:43:22 +08:00
MrZ626
a7f0f30af2 词典添加防误硬降词条(英文待翻译) 2021-08-13 20:20:26 +08:00
MrZ626
c48d8f9a45 加载界面第一帧不显示底部文本,解决文字尺寸错误的不明问题 2021-08-13 19:51:49 +08:00
scdhh
276cbd6aa1 修改updateConfVersion.py > 在ci运行的时候修改游戏存档目录 (#202)
* 修改updateConfVersion.py

* 添加更新conf.lua时修改存档目录的步骤
2021-08-13 01:54:36 +08:00
MrZ626
6f1ba85869 小程序别踩白块使用stencil防止格子画到版面外面去 2021-08-13 01:48:48 +08:00
MrZ626
9bba05f26c 调整小程序别踩白块控件代码,修复显隐时机不正确并略微提升性能 2021-08-13 01:43:06 +08:00
MrZ626
5d75e11679 his序列生成算法最终返回结果的时候漏索引seqData导致返回的方块不正确 2021-08-13 01:25:15 +08:00
MrZ626
d58a67012d rnd序列生成算法在序列只有一个块的时候行为不正确 2021-08-13 01:22:23 +08:00
MrZ626
7e41b747dd 小程序别踩白块加入自定义颜色/音乐和一些练习用4k键型模式 2021-08-13 01:14:54 +08:00
MrZ626
4dd23b8e76 调整打开存档文件夹的按钮功能 2021-08-12 19:58:27 +08:00
MrZ626
19403e0ae5 升级一个赞助人 2021-08-12 19:54:47 +08:00
MrZ626
2ff87a0655 添加其他语言的模式锁定提示文本 2021-08-12 19:32:20 +08:00
MrZ626
f0b12799b8 修复合并的pr里一些小问题,整理代码,美化未解锁的模式图标显示 2021-08-12 19:30:06 +08:00
Trebor Huang
c81850cb36 显示即将解锁的关卡 closes #194 (#198)
* 显示即将解锁的关卡, closes #194

除了中文和英文之外的语言我还没处理。

* 成绩从Grade改为Rank
2021-08-12 19:06:45 +08:00
MrZ626
d7fe8bfeee 微调自定义序列的按键位置
整理代码
2021-08-12 17:50:09 +08:00
MrZ626
06c5beae7d 修复加载语言信息没有文本的模式时不会因为取不到模式名而报错 2021-08-12 17:50:06 +08:00
MrZ626
c929ddbe97 修复几个pc模式的左侧信息文本重叠 2021-08-12 17:50:03 +08:00
scdhh
77b557fb13 在actions产物文件名里添加ci编号 (#193)
* 删除不需要的re模块

* 添加编译过程中向源码添加提交hash的步骤

* 修正变量

* 整理代码

* 修正Android的CI问题

* actions产物名添加ci编号

* 修正变量名

* 修改文件名格式

* 修改CI文件名格式,避免在bash上出问题

* 更改CI文件名格式,优化观感

* 或许适当缩短更好些
2021-08-12 17:21:18 +08:00
MrZ626
dbc58e0bc9 修复暂停时数据出现换行问题 2021-08-12 16:04:15 +08:00
MrZ626
1bb5e0c056 调整结算词的尺寸,添加一个tip 2021-08-12 01:32:35 +08:00
MrZ626
31c03681fa 添加一个赞助人 2021-08-12 01:12:08 +08:00
MrZ626
742dc43c5d 移除kpm速度表
bpm表样式改回类c2
整理代码
2021-08-12 01:12:03 +08:00
MrZ626
a9a241cc41 修复场地顶线(方块出生线)在垃圾行升起过程中显示不正确 2021-08-11 22:02:52 +08:00
MrZ626
3ffaeed317 修复生存模式左侧文本没对齐 2021-08-11 22:02:24 +08:00
MrZ626
8950cf9533 修复场地顶线之上的红色区域绘制范围不正确 close #191
略微减小该红色区域透明度
2021-08-11 21:20:40 +08:00
MrZ626
21bdb374d0 修复混战模式攻击模式指示器不见了 2021-08-11 19:08:37 +08:00
MrZ626
3b2ce1e85a 修正两个皮肤文件名变化后初始化时尝试加载的文件名没改 2021-08-11 18:47:06 +08:00
MrZ626
ffc84334bf 修改两个皮肤文件的文件名,解决git文件大小写敏感导致的小问题 2021-08-11 17:16:36 +08:00
MrZ626
c37370a50a 整理代码 2021-08-11 16:17:12 +08:00
MrZ626
43c8218a14 单机游戏默认菜单按钮位置设为middle 2021-08-11 16:17:12 +08:00
MrZ626
625c859e0d 修复小程序cubefield遮挡方块颜色问题 2021-08-11 16:17:12 +08:00
MrZ626
2ee2eb4274 切换场景后自动触发一次控件的cursorMove 2021-08-11 16:17:12 +08:00
MrZ626
6262ad637d 由于卡顿,关闭msaa 2021-08-11 16:17:12 +08:00
MrZ626
df78225114 移除三个不必要的collectgarbage 2021-08-11 16:17:12 +08:00
MrZ626
130de57d1a 移除对战背景列表里两个不合适的 2021-08-11 16:17:12 +08:00
MrZ_26
d7aba9bb64 Delete Classic.png 2021-08-11 02:55:14 +08:00
MrZ_26
77bf9c6f16 Delete WTF.png 2021-08-11 02:55:06 +08:00
MrZ626
b44d144b26 特别感谢添加一位
赞助添加一位
2021-08-11 01:38:10 +08:00
MrZ626
376a528fac 选择语言时会先清除上一个文本然后再生成新的 close #189 2021-08-10 23:47:00 +08:00
MrZ626
6dec156d4d 修改日志和build号 2021-08-10 20:27:07 +08:00
MrZ626
372f27b6ac 提升puzzleMark材质透明度
略微提升自定义-拼图性能
2021-08-10 20:09:47 +08:00
MrZ626
d6d2d394bc 修改玩家绘制流程,修复镜头平移和遮罩的一些冲突 2021-08-10 19:54:51 +08:00
MrZ626
7c326ce0d7 修复联网游戏房间内菜单按钮位置不正确 2021-08-10 17:59:52 +08:00
MrZ626
1ae26d39c2 再次修复进入游戏场景时初始化代码顺序错误 2021-08-10 16:13:36 +08:00
scdhh
702d427183 修正Android的CI问题 (#185)
* 删除不需要的re模块

* 添加编译过程中向源码添加提交hash的步骤

* 修正变量

* 整理代码

* 修正Android的CI问题
2021-08-10 15:41:20 +08:00
MrZ626
432ba338b7 添加issue模板 close #187 2021-08-10 15:37:40 +08:00
scdhh
c1ce09ac52 在自动打包的时候添加提交hash #176 (#184)
* 删除不需要的re模块

* 添加编译过程中向源码添加提交hash的步骤

* 修正变量

* 整理代码
2021-08-10 03:38:59 +08:00
MrZ626
57982d3c43 修改更新历史 2021-08-10 03:34:41 +08:00
MrZ626
c168a6c685 整理代码 2021-08-10 03:33:25 +08:00
MrZ626
17479ac08b 玩家绘制模块改动,applyFieldOffset函数改为applyField,组合更多功能
修复部分模式往场地内部绘制信息时偏移问题
close #181
2021-08-10 03:32:07 +08:00
MrZ626
a73819214b 修改更新历史和build号 2021-08-10 02:51:33 +08:00
MrZ626
c5730b31f7 tsd困难在同一列只允许连续做最多三个T2,微调参数 2021-08-10 02:50:51 +08:00
MrZ626
4bfebdea13 整理旋转相关代码,希望能进一步解决神秘的旋转时报错问题 2021-08-10 02:02:47 +08:00
MrZ626
d040754d8c 取消暂停过程中允许再次暂停 2021-08-10 01:09:34 +08:00
MrZ626
7943ebc8f8 略微减轻lightning2背景瞎眼程度 2021-08-10 00:01:14 +08:00
MrZ626
5ce0b90d9f 所有踢墙表数据和旋转中心位置数据完全独立,希望能解决神秘的旋转时报错问题,需要再研究 2021-08-09 23:56:19 +08:00
MrZ626
e97d892926 降低隐形n/h/l的S和A评级标准 2021-08-09 22:57:37 +08:00
MrZ626
3b026ce204 降低无尽pc的S线至50,同时加快速度提升 2021-08-09 22:48:08 +08:00
MrZ626
d269828924 删除一个已经合并到TABLE模块的无用文件 2021-08-09 22:34:42 +08:00
MrZ626
1e1560651a 修复debug模式下f4可能引起报错 close #183 2021-08-09 22:34:16 +08:00
MrZ_26
782e1ef506 Merge pull request #180 from Trebor-Huang/main
修正Android与OS X的CI问题
2021-08-09 19:55:02 +08:00
Trebor-Huang
3a3c805792 修正Android与OS X的CI问题 2021-08-09 14:22:37 +08:00
Trebor-Huang
51235a61ad Merge branch '26F-Studio-main' 2021-08-09 14:16:00 +08:00
Trebor-Huang
f493de998c Merge branch 'main' of https://github.com/26F-Studio/Techmino into 26F-Studio-main 2021-08-09 14:15:33 +08:00
MrZ626
72b5acfece 修正旋转系统设置重置条件 2021-08-09 14:02:43 +08:00
MrZ626
176ddf6abb 完善xiaoya语音包 2021-08-09 12:45:41 +08:00
MrZ626
44c52300e4 更新世界纪录 2021-08-09 12:36:12 +08:00
MrZ626
2eae6cdfda 修复计算器的一些问题 close #178 close #179 2021-08-09 11:53:56 +08:00
MrZ_26
0f896d0a4f Merge pull request #177 from shoucandanghehe/main
实时更新的actions产物文件名
2021-08-09 11:37:18 +08:00
MrZ626
02189c4262 可以修改O块初始方向 2021-08-09 11:35:04 +08:00
d649a0caa1 统一代码风格 2021-08-09 08:21:31 +08:00
e28894549c C M D 害 人 2021-08-09 08:16:11 +08:00
b3ef90237f 又换回了bat尝试解决无法添加变量的问题 2021-08-09 07:52:42 +08:00
ebc4e08986 尝试使用python解决bat无法添加变量的问题 2021-08-09 07:39:26 +08:00
8d74a35f29 添加version至环境变量 2021-08-09 07:17:19 +08:00
a37e164c0b 修正python脚本路径 2021-08-09 07:12:43 +08:00
a71b504589 修改actions上传名称,修改编译时依赖的python脚本 2021-08-09 07:10:40 +08:00
MrZ626
20cd27d7f6 再微调大量模式的左侧信息显示
stack模式左侧信息添加"块数"标签
2021-08-09 03:16:40 +08:00
MrZ626
ac889dcba9 修复进入游戏场景时初始化代码顺序错误 2021-08-09 02:33:05 +08:00
MrZ626
70bbb12285 调整游戏底部常驻版本号,移除short项 2021-08-09 02:23:39 +08:00
MrZ626
e7e568f67a 微调几乎所有模式左侧信息位置,对齐hold框中间 2021-08-09 02:22:15 +08:00
MrZ626
3452ae1d66 修改更新历史和版本号 2021-08-09 01:40:00 +08:00
MrZ626
2ad336b13a 添加游戏中菜单按钮位置设定 2021-08-09 01:39:18 +08:00
MrZ626
78b15b78fa 每个旋转系统有自己独特的旋转中心样式
整理代码
2021-08-09 01:15:04 +08:00
MrZ626
eb7b637703 添加Classic和Classic_plus旋转系统 close #173 2021-08-09 00:13:57 +08:00
MrZ626
b083a0801f 旋转系统模块重构,支持无旋转中心 close #168 2021-08-08 23:51:46 +08:00
MrZ626
471f1076c4 TABLE.shift新增depth参数 2021-08-08 23:51:46 +08:00
MrZ626
e50fe63e02 TABLE.copy新增depth参数 2021-08-08 23:51:45 +08:00
MrZ626
7682054dea 微调lNavy颜色 2021-08-08 23:51:45 +08:00
MrZ626
1e3c2f039b 修复暂停界面雷达图线框显示问题 2021-08-08 23:51:45 +08:00
MrZ626
a832e56b42 统一四连块英文名为Tetromino 2021-08-08 15:54:21 +08:00
MrZ626
3858cfd9ba 整理代码 2021-08-08 15:04:44 +08:00
MrZ626
5b4fd892ff 修正kpm计算一处多余的+1,优化更新格子可见性代码 2021-08-08 03:36:16 +08:00
MrZ626
4ffa88805c 再调整暂停ui 2021-08-08 03:08:51 +08:00
MrZ626
2a0b26f2fd GC拓展模块调整,圆角正多边形成为绘图函数 2021-08-08 03:08:35 +08:00
MrZ626
30308eb308 调整两个彩色logo的颜色量 2021-08-08 00:02:25 +08:00
MrZ626
5f8cbe524e 圆角圆角圆角圆角圆角 2021-08-08 00:02:07 +08:00
MrZ626
a2f0142712 调整全局颜色表,降低饱和度 2021-08-07 23:37:50 +08:00
MrZ626
d2c6529d2a 修复计算器的一些小bug 2021-08-07 22:05:02 +08:00
MrZ626
b23e32df7f 修改更新历史和build号 2021-08-07 20:24:37 +08:00
MrZ626
a94a0a2f87 修改几个旋转系统的名字,更新时自动重置旋转系统设置 2021-08-07 20:20:07 +08:00
MrZ626
6fe40e9438 高速经典场地高度改为19 close #169 2021-08-07 20:12:01 +08:00
MrZ626
d4523e8e1d 添加隐藏模式marathon_bfmax的入口并修改tip关于隐藏模式的说法 2021-08-07 20:02:43 +08:00
MrZ626
9fadef2a6e 修复皮肤设置界面旋转方块几圈后重进会看到旋转动画 2021-08-07 20:00:51 +08:00
MrZ626
1970a1b47d 改正一处拼写错误,简化the_box谜题 2021-08-07 19:51:06 +08:00
MrZ626
19d090859c 减暗暂停的背景色,取消暂停的动画改成条形计时器 2021-08-07 19:51:02 +08:00
MrZ626
7fda77bd1e 自定义游戏里重设全部的同时也会清空数据文件 2021-08-07 19:39:31 +08:00
MrZ626
34c14c922c 再调整暂停界面ui,mod和暂停统计不重叠,开始游戏前整个右侧信息框和相关按钮都不出现 2021-08-07 17:40:11 +08:00
MrZ626
0f8a1057dc 所有mod的颜色换成浅色 2021-08-07 17:09:08 +08:00
MrZ626
a74faca9cb 大改暂停界面ui 2021-08-07 17:09:01 +08:00
MrZ626
336aa85cf8 key控件新增fShade属性(自定义亮起素材) 2021-08-07 16:56:08 +08:00
MrZ626
43710a4c4d GC.DO添加fRPol命令 2021-08-07 16:55:15 +08:00
MrZ626
451cf90939 整理代码 2021-08-07 15:42:00 +08:00
MrZ626
6713f48361 优化控制台sudo命令的交互 close #171 2021-08-07 15:27:38 +08:00
MrZ626
f6e3b35482 DOGC移入GC拓展模块,GC.DO添加dRPol(圆角正多边形)命令 2021-08-07 14:55:19 +08:00
MrZ626
1d7e58d3bf 移除联网对战bgm列表里的warped 2021-08-07 01:15:51 +08:00
MrZ626
b501cd374b 整理代码,调整大量场景内绘图用的纯白色和纯黑色 2021-08-06 19:16:01 +08:00
MrZ626
e6f5723ecc 整理代码,混战模式信息显示函数移入玩家模块统一调用 2021-08-06 17:43:43 +08:00
MrZ626
998c79d331 进度显示器移入常用玩家draw函数并微调 2021-08-06 09:58:26 +08:00
MrZ626
a21d6e834d 整理代码,从Player:drop中抽离出几个过程 2021-08-06 01:49:28 +08:00
MrZ626
a4541dd764 重开按钮改成图标,微调模式文字位置 2021-08-06 01:07:05 +08:00
MrZ626
e788dd543e 再调整暂停界面ui 2021-08-06 00:47:53 +08:00
MrZ626
f24fa81d87 微调staff表,修改更新历史和build号 2021-08-06 00:26:49 +08:00
MrZ626
20fb2a3e92 大改暂停界面ui 2021-08-06 00:22:35 +08:00
MrZ626
e7f77291e4 修游戏中ui小问题 2021-08-06 00:22:19 +08:00
MrZ626
fa0848c8b2 调整录像回放时逐帧按钮图标,修复按空格按钮状态未切换 2021-08-06 00:14:43 +08:00
MrZ626
8a740091b3 修复ARS的180有踢墙 2021-08-05 22:15:03 +08:00
MrZ626
5fa3be5886 缩小三格高的方块在next/hold里的显示尺寸 2021-08-05 22:08:11 +08:00
MrZ626
a9d2f097d8 调整游戏内ui和控件ui:
默认背景色调整
减少纯白色使用
减小线宽
增加圆角
2021-08-05 17:58:09 +08:00
MrZ626
450483acc7 关闭背景的默认颜色修改 2021-08-05 15:43:19 +08:00
MrZ626
43019185a8 TRS的R/Y块踢墙表添加一项 2021-08-05 15:42:53 +08:00
MrZ626
f537b36662 修改词典中ppt词条说法 2021-08-05 15:42:26 +08:00
MrZ626
98385b8b56 改对readme里官网链接 2021-08-05 14:45:31 +08:00
MrZ626
8d44046a90 修复asc踢墙表第一项不是00和按180度旋转会爆炸 2021-08-05 14:27:05 +08:00
MrZ626
9b1ab459a0 添加两个赞助者
修改更新历史
2021-08-05 13:42:50 +08:00
MrZ626
f4c0d19734 房间版本不一致时显示的文本会根据设置语言变化 2021-08-04 21:24:43 +08:00
MrZ626
f088bdcf8b 修复松开鼠标可能不触发场景内事件 2021-08-04 20:15:15 +08:00
Trebor Huang
60600dbe2f 修正OS X CI错误 (#166)
* 增加OS X签名

等证书搞好之后改一下里面的id之类的就行。

* 添加证书信息

* 修正OS X CI错误
2021-08-04 20:11:07 +08:00
Trebor-Huang
eb95cc4b47 修正OS X CI错误 2021-08-04 19:57:51 +08:00
Trebor Huang
57dfdacffa Merge branch '26F-Studio:main' into main 2021-08-04 19:53:03 +08:00
scdhh
0c839790fe 修正actions使用的macos版本 2021-08-04 19:47:18 +08:00
scdhh
1f29916e09 修正actions使用的macos版本 2021-08-04 19:45:16 +08:00
MrZ626
310023dc94 修复长按hold成功后会触发IHS close #165 2021-08-04 18:33:39 +08:00
Trebor Huang
9448dcefb4 增加OS X签名 (#161)
* 增加OS X签名

等证书搞好之后改一下里面的id之类的就行。

* 添加证书信息
2021-08-04 18:33:06 +08:00
MrZ626
167e77ddf2 修正ws模块连接成功后没有把timeout设为0 2021-08-04 00:31:31 +08:00
MrZ626
dc586ad82e 修复回放录像时显示的玩家名不正确 2021-08-04 00:27:52 +08:00
MrZ626
6d331f882f 修改更新历史和build号 2021-08-03 23:59:20 +08:00
MrZ626
b945760c72 再调整堆积模式参数 2021-08-03 23:57:59 +08:00
MrZ626
98aa49c2c3 导入录像时会先检测重复文件名 2021-08-03 23:50:46 +08:00
MrZ626
78feab88bf 文件模块save方法新增d参数 2021-08-03 23:50:33 +08:00
MrZ626
6f005d467d 微调语言文件一两条 2021-08-03 23:50:01 +08:00
MrZ626
324011f01b 回放列表添加导出到剪切板/从剪切板导入的按钮 2021-08-03 23:13:01 +08:00
Trebor-Huang
0d97d2a02d 添加证书信息 2021-08-03 22:23:40 +08:00
MrZ626
37bec38524 添加几个中文tip 2021-08-03 20:59:10 +08:00
MrZ626
847795c0ef 调整堆积模式规则 2021-08-03 20:52:00 +08:00
Trebor-Huang
aa1a5a1550 增加OS X签名
等证书搞好之后改一下里面的id之类的就行。
2021-08-03 17:48:37 +08:00
MrZ626
997b3cbecd 整理代码,添加回放文件格式说明 2021-08-03 16:31:19 +08:00
MrZ626
652aced790 点击进入房间后一段时间不能进行其他操作 2021-08-03 16:30:27 +08:00
MrZ626
47af067c03 修复房间列表输密码的时候部分按键还会有其他功能 2021-08-03 15:48:35 +08:00
MrZ626
5b31e3eb87 调整确认删除的提醒问号时间计算方法和位置 2021-08-03 15:35:51 +08:00
MrZ626
0bb4b069e7 更换堆积40/100模式的序列 2021-08-03 15:22:53 +08:00
MrZ626
eded658d38 修正序列设置有错误时弹出信息有误 2021-08-03 15:22:37 +08:00
MrZ626
1caeb0ed6b 修改更新历史 2021-08-03 03:18:37 +08:00
MrZ626
611a1f0a04 更换挖掘和生存-3/4模式的bgm 2021-08-03 03:18:35 +08:00
MrZ626
13e58e6f80 新增三个堆叠模式 close #142 2021-08-03 03:11:21 +08:00
MrZ626
d6853d381f 修正tsd_u模式的标志光柱位置小bug 2021-08-03 02:38:26 +08:00
MrZ626
b6cc14fe2f 更新模式文件说明文档
修改更新历史
2021-08-03 02:09:15 +08:00
MrZ626
9b1f9fa9dd 整理模式代码:
移除无用的pauseLimit
移除重复的模式load函数(自动创建一个玩家)
2021-08-03 02:05:13 +08:00
MrZ626
cca53b6376 第一次启动会自动进入语言设置菜单 close #150 2021-08-03 01:57:18 +08:00
MrZ626
1aa991f89f 静音按钮再次点击可以重新开启声音了 2021-08-03 01:27:13 +08:00
MrZ626
7407bbefdf tsd_u中结束游戏的重复T2不计入成绩 2021-08-03 00:37:49 +08:00
MrZ626
40fb835d9c 大量调整中文tip 2021-08-03 00:34:14 +08:00
MrZ626
e4df92fb54 更新世界纪录
语音staff添加Xiaoya
2021-08-03 00:10:22 +08:00
MrZ626
7b9760e376 修正加载小问题 2021-08-02 23:47:54 +08:00
MrZ626
52607545fa 修改更新历史和build号 2021-08-02 23:34:33 +08:00
MrZ626
849756531d 从暂停界面回到游戏界面不改变回放速度 2021-08-02 23:34:32 +08:00
MrZ626
2e16240fb8 新增tsd极限模式(填坑) close #157 2021-08-02 23:34:32 +08:00
MrZ626
181beda455 提升tsd困难的难度,调整评分标准 2021-08-02 23:34:32 +08:00
MrZ626
d0f77f4b78 lastPiece新增放置的方块位置、中心位置和朝向信息 2021-08-02 23:34:32 +08:00
MrZ626
dea2f6c8d7 修复录像回放速度和按钮状态刷新问题 close #159 close #160 2021-08-02 22:09:50 +08:00
MrZ626
615fd414ec 恢复刷新在线玩家人数并且降低请求频率 2021-08-02 21:12:01 +08:00
MrZ626
7296498410 调整几个中文tip 2021-08-02 21:05:11 +08:00
MrZ626
554970c036 修复wing背景水晶尺寸没有跟随屏幕尺寸调整,微调水晶颜色 2021-08-02 21:01:28 +08:00
MrZ626
057abe6ba5 整理代码,加载设置和统计的代码移至main.lua 2021-08-02 16:58:21 +08:00
MrZ626
3b215eb7af TABLE扩展模块新增一个函数 2021-08-02 16:58:21 +08:00
MrZ626
1abaa0e5c5 添加一个赞助者 2021-08-02 16:53:16 +08:00
MrZ626
0c5cb1686e 更新特别感谢名单 2021-08-02 15:00:00 +08:00
MrZ626
21f0aabae0 取消加载完成时的emit音效 2021-08-02 03:30:10 +08:00
MrZ626
e5458c1ab9 升级STRING.readLine功能 2021-08-02 03:13:51 +08:00
MrZ626
a30c0395aa 对战房间背景和音乐不再能自定义,都改为列表随机 2021-08-01 19:47:59 +08:00
MrZ626
0b9006faf3 修复读取到本地没有的旋转系统会直接蓝屏
升级房间版本号
整理代码
2021-08-01 19:47:59 +08:00
MrZ626
adefb776fe 修复加载自定义模式参数文件时可能报错 2021-08-01 19:47:59 +08:00
MrZ626
ee089b0f31 master_ph模式更换背景 close #158 2021-08-01 19:47:58 +08:00
flaribbit
44200458c5 Merge pull request #156 from Trebor-Huang/main
add CI for macOS
2021-08-01 11:35:00 +08:00
flaribbit
5d2d4eae17 Update build.yml
add download link, remove blank lines
2021-08-01 11:33:44 +08:00
Trebor Huang
25f87cae53 [no ci] CI for OS X
依赖于一个还没上传的模板,还没决定这个要放在哪,所以链接留空。
2021-08-01 03:05:48 +08:00
Trebor Huang
1e4f11a6ce Merge branch 'main' of https://github.com/Trebor-Huang/Techmino into main 2021-08-01 02:03:57 +08:00
MrZ626
36b9dcaf43 修复没有自定义游戏的场地数据等文件在启动时会直接报错 2021-08-01 01:25:33 +08:00
MrZ626
ad3aff6a50 修改更新历史,整理代码 2021-08-01 00:49:20 +08:00
MrZ626
3bd6da6276 鼠标松开时如果有选中的控件就不触发场景的鼠标松开/点击事件 2021-08-01 00:44:09 +08:00
Trebor Huang
3ccc8cdd7b 增加OS X支持 (#154)
需要CCloader.dylib以及*.icns格式的图标。同时要按照love官网的教程打包游戏为*.app形态,修改Info.plist。
我暂时没有办法让游戏在*.love的形态下加载dylib。但是以文件夹形式可以直接将dylib文件放在根目录;app形式可以放在Framworks处。
我稍后会在 https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper 详细描述得到CCloader.dylib的办法。
2021-07-31 23:42:41 +08:00
Trebor Huang
501f3a4eec 增加OS X支持
需要CCloader.dylib以及*.icns格式的图标。同时要按照love官网的教程打包游戏为*.app形态,修改Info.plist。
我暂时没有办法让游戏在*.love的形态下加载dylib。但是以文件夹形式可以直接将dylib文件放在根目录;app形式可以放在Framworks处。
我稍后会在 https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper 详细描述得到CCloader.dylib的办法。
2021-07-31 23:00:16 +08:00
MrZ626
cfc6f65da5 游戏启动的时候检测配色不能为炸弹格 close #147 2021-07-31 21:49:40 +08:00
MrZ626
5853ac1823 马拉松模式添加倒计时线 close #153 2021-07-31 20:24:44 +08:00
MrZ626
3057b2a12f master-ex新增段位点显示 close #149 2021-07-31 20:00:13 +08:00
MrZ626
9ce90b76a4 应本人要求修改一个赞助id 2021-07-30 00:00:10 +08:00
MrZ626
e016a20c21 STRING模块新增两个编解码函数 2021-07-29 15:26:37 +08:00
user670
8fb8352c8d Update dict_en.lua (#145) 2021-07-28 03:16:52 +08:00
MrZ626
ed7ecd98c4 整理代码,修改更新历史 2021-07-28 03:15:05 +08:00
MrZ626
512c78e192 自定义游戏的序列任务场地等数据退出后会保存 2021-07-28 03:10:29 +08:00
MrZ626
81b3082087 修复数据升级时两个20G模式不正确 2021-07-27 14:52:03 +08:00
MrZ626
6fff929856 更新框架,aDraw模块改名gcExtend 2021-07-26 17:30:35 +08:00
MrZ626
e636deb08e 修改更新历史 2021-07-26 17:07:28 +08:00
MrZ626
464d5bedda 完善控制台内部分命令的描述文本 2021-07-26 17:07:13 +08:00
MrZ626
9cc70d4212 微调两个文档 2021-07-26 03:10:11 +08:00
MrZ626
737cdb74bd 中文词典添加(修改)旋转系统与说明并给英文词典留好位置 2021-07-26 03:02:18 +08:00
MrZ626
a833139e13 修改更新历史和build号 2021-07-26 01:25:29 +08:00
MrZ626
4ec9377f78 整理代码 2021-07-26 01:25:26 +08:00
MrZ626
e9e96f287f 修复image模块加载图片组会报错 2021-07-26 01:25:18 +08:00
MrZ626
57745f5d0a 回放时版面遮挡会变成半透明 close #143 2021-07-25 23:33:04 +08:00
MrZ626
515c2d1f60 COLOR模块的彩虹函数支持补充alpha参数(直接返回,保证格式) 2021-07-25 23:32:29 +08:00
MrZ626
decbde8d63 修复BiRS的J和L的1/3状态180度旋转用表错误 2021-07-25 23:16:38 +08:00
MrZ626
08c892d4ff TRS的Ospin表增加SZ按反时的尝试 2021-07-25 22:20:41 +08:00
MrZ626
850a31d172 BRS在程序内名称改为BiRS(防止和BPS-RS歧义)
修正BiRS中Z5和S5的180度转的表使用错误
整理代码
2021-07-25 22:07:01 +08:00
MrZ626
6ae419eeee 特别感谢名单添加yuhao7370 2021-07-25 03:00:33 +08:00
MrZ626
40bae13411 移除badapple背景 2021-07-25 02:54:47 +08:00
MrZ626
61946fe52e 整理代码 2021-07-25 02:54:47 +08:00
MrZ626
27cede0fad 优化游戏场景性能,移除回放按钮hideF函数 2021-07-25 01:43:22 +08:00
MrZ626
adae63eabb 修改更新历史和build号 2021-07-25 01:14:03 +08:00
MrZ626
3ff5f74af7 BRS改名BRS(Bias RS)
调整BRS的O的0→2,2→0踢墙表为无水平踢表
再调整BRS踢墙过滤条件,有偏移时不再禁止上踢,水平方向上偏移和踢墙偏移允许反向,但偏移和总位移不能反向
2021-07-25 00:53:04 +08:00
MrZ626
c3c151b375 小程序cubefield的碰撞判定移出draw,解决低绘制帧率导致漏判定的问题 close #138
(低逻辑帧率还是会漏)
2021-07-24 18:23:21 +08:00
MrZ626
2163d09c08 修复序列和任务超长导致渲染开销太大卡死 close #137 2021-07-24 16:42:31 +08:00
MrZ626
ea70c2ef9e 修改更新历史和赞助者名单 2021-07-24 15:52:47 +08:00
MrZ626
53f949571e ZRS改名BRS(Boost RS) 2021-07-24 15:49:24 +08:00
MrZ626
1d64a6b799 再调整ZRS(修改过滤条件,最终位移距离不超过√5并且禁止踢墙方向和水平偏移反向) 2021-07-24 15:49:21 +08:00
MrZ626
84b5790ab2 再升级websocket模块 2021-07-24 15:49:17 +08:00
MrZ626
6aa8de3506 调整zrs踢墙表 2021-07-24 15:49:14 +08:00
MrZ626
c1b55139b6 整理代码 2021-07-24 15:49:09 +08:00
MrZ626
670417dc6a 修改更新历史和build号 2021-07-24 15:49:06 +08:00
MrZ626
bd1d1f8ae4 添加应用所有设置的函数,修复导入设置后部分设置不生效 2021-07-24 15:49:03 +08:00
MrZ626
29a922e41f 大师l/u改为n/h(两个旧模式文件为看录像保留)
n难度新增500~1000,使用新bgm:secret8th remix
h难度降低时间门槛
2021-07-24 15:48:59 +08:00
MrZ626
ac9fd5e618 调整五首bgm 2021-07-24 15:48:48 +08:00
MrZ626
9d6a74680a 调整TRS中S5和Z5的踢墙表 2021-07-22 22:27:04 +08:00
MrZ626
9d52cf27d8 整理代码 2021-07-22 00:14:24 +08:00
huaji2369
35c38387e1 在不爆炸的前提下减少AI与自定义序列同开的限制 (#136) 2021-07-22 00:11:25 +08:00
MrZ626
908997ddef 调整生存n的bgm 2021-07-22 00:09:14 +08:00
MrZ626
cf0b95e955 新BGM:there(用于挖掘) 2021-07-22 00:08:47 +08:00
MrZ626
5bf5d44c96 旋转系统可以开关每个方块是否显示旋转中心 2021-07-21 16:29:04 +08:00
MrZ626
854776dac0 继续微调ZRS(修复合成dx绝对值最大限制计算错误) 2021-07-21 16:24:52 +08:00
MrZ626
6e1ba35ca3 修改更新历史和build号 2021-07-21 15:53:01 +08:00
MrZ626
a5a41e3b0c 修复触屏设置在窗口非默认长宽比时边缘网格缺失 2021-07-21 15:52:35 +08:00
MrZ626
e78114dd53 改进debug模式下光标位置显示 2021-07-21 15:33:07 +08:00
MrZ626
6174f3709c 修复视频设置里影子预览导致的报错 2021-07-21 15:10:36 +08:00
MrZ626
7f1f9b0221 修复有屏幕滚动的场景按住鼠标拖动时控件会失去焦点 2021-07-21 15:03:31 +08:00
MrZ626
0af4e2adb9 修改更新历史和build号 2021-07-21 04:44:51 +08:00
MrZ626
d5ab596749 移除SFX和VOC模块的loadOne方法 2021-07-21 04:40:20 +08:00
MrZ626
3d128d4850 删除多余的加载文本 2021-07-21 04:39:53 +08:00
MrZ626
46aa6fcc48 新BGM:beat5th(用于竞速五连块) 2021-07-21 04:39:33 +08:00
MrZ626
60d1eb4e3c 升级SKIN模块,不再需要在启动时就加载好方块贴图资源 2021-07-21 04:37:35 +08:00
MrZ626
4b2c55d90e 升级image模块,不再需要在启动时就加载好图片资源 2021-07-21 02:45:56 +08:00
MrZ626
0023c0a4c6 升级bgm模块,不再需要在启动时就加载好音乐资源 2021-07-21 02:36:11 +08:00
MrZ626
0265793a3f 整理socket库代码 2021-07-21 00:52:06 +08:00
MrZ626
b99d247ba5 大型重构websocket模块 2021-07-20 21:20:47 +08:00
MrZ626
bdc1e592a7 控制台移除移除水印的命令 2021-07-20 20:11:43 +08:00
MrZ626
d3ef7e7f81 整理代码 2021-07-20 15:16:52 +08:00
user670
78dfec15d6 Adjust the English in a console command 2021-07-20 15:07:10 +08:00
MrZ626
7a824e09a3 控制台resetall命令删除文件时机改为退出前最后一瞬间 close #133 2021-07-20 14:03:30 +08:00
MrZ626
7c58355048 调整中文和yygq加载完成文本 2021-07-20 14:01:59 +08:00
user670
89662e7e2c adjust lang_en -> loadText.finish 2021-07-20 14:00:15 +08:00
MrZ626
718fc750d9 websocket的子线程代码分离至单独文件并移除debugMode 2021-07-20 02:44:01 +08:00
MrZ626
9e143fbb73 整理代码 2021-07-20 02:39:15 +08:00
MrZ626
c561181bdf NET模块收到closeMessage时弹出的断开消息格式修改 2021-07-20 01:04:16 +08:00
MrZ626
b45920109f 尝试捕捉一个错误的具体位置 2021-07-19 16:51:08 +08:00
MrZ626
07290fe7ce 调整中英tip 2021-07-19 16:14:26 +08:00
MrZ626
944f57b04a 微调main文件开头说明 2021-07-19 15:37:56 +08:00
MrZ626
4079c6596e 调整中文tip 2021-07-19 15:36:05 +08:00
MrZ626
defe6c4f26 合并load和intro场景 2021-07-19 15:34:28 +08:00
MrZ626
ed2a46e059 intro动画加入一点颜色 2021-07-19 02:12:05 +08:00
MrZ626
498a0ef7e8 几个音频模块和skin模块load附加必须先init的条件 2021-07-18 23:33:45 +08:00
MrZ626
06d34d8c55 优化加载动画 2021-07-18 17:17:28 +08:00
MrZ626
cd670212a2 修改更新历史,补上部分issue编号 2021-07-18 16:36:52 +08:00
MrZ626
41e58e0bd6 修复marathon_bfmax死亡判定不合适 close #127 2021-07-18 16:16:39 +08:00
MrZ626
b0af47a422 master-u模式的500限制时间为183秒 2021-07-18 02:02:06 +08:00
MrZ626
ccfb0c72dd dropper添加一个请勿修改语法错误的注释(纪念意义) 2021-07-18 01:39:10 +08:00
MrZ626
be1b87a1af 修改特别感谢列表 2021-07-18 00:52:05 +08:00
user670
33ffb80241 Make languages directly use plrual for "X players remaining" (#128) 2021-07-18 00:47:39 +08:00
MrZ_26
42b61af93d Merge pull request #125 from 26F-Studio/user670-patch-20210717-eng-lang-fix
Update lang_en.lua
2021-07-17 05:23:04 +08:00
user670
cfdba225e0 Update lang_en.lua
updated the loadtext thing
2021-07-17 05:17:25 +08:00
user670
8c0b3fd31d Update lang_en.lua
Remove an extra full stop
2021-07-17 04:32:42 +08:00
MrZ626
ef88d3e437 新增noInitSZO模式参数 close #121 2021-07-17 02:29:33 +08:00
MrZ626
cbbb04655b 修复加载场景点鼠标报错 2021-07-17 02:23:42 +08:00
MrZ626
956b768475 再调整ZRS系统(新增±2,0踢墙),整理代码 2021-07-17 02:02:53 +08:00
MrZ626
51768a5a27 限制最大自定义序列长度(2600) close #122 2021-07-17 01:48:36 +08:00
MrZ626
4a58967590 修改更新历史和build号 2021-07-17 01:44:01 +08:00
MrZ626
bc879ee8e2 修复粘贴序列检测到损坏时没有重置光标位置导致后续操作出现问题 close #89 2021-07-17 01:41:16 +08:00
MrZ626
d3046fa588 完全取消加载动画 2021-07-17 01:38:27 +08:00
MrZ626
ce8fefe9f8 再调整ZRS系统(启用偏移条件改为当前状态是否顶墙而不是空转后状态) 2021-07-17 01:38:21 +08:00
MrZ626
f7369ef4ae 修复SKIN模块加载完成后忘了删除loadAll函数 2021-07-17 00:25:50 +08:00
MrZ626
c0cfb97034 移除水印 2021-07-17 00:24:07 +08:00
MrZ626
c742e9fd31 新增ASC和ASCplus(添加180度踢墙,实验性)旋转系统 2021-07-17 00:00:17 +08:00
MrZ626
1d1522a9c4 再微调ZRS踢墙表(修改有偏移时只允许y<0踢为允许y<=0踢) 2021-07-16 23:01:07 +08:00
MrZ626
a9925b3f15 再微调ZRS踢墙表(添加±1,2) 2021-07-16 21:47:39 +08:00
MrZ626
2ea9a58a41 新BGM:here(用于生存第五难度) 2021-07-16 17:02:35 +08:00
MrZ626
9abf7bb45b 修复控制台print命令输入非文件报错 close #124 2021-07-16 16:54:48 +08:00
MrZ626
6afaf462f8 再微调ZRS踢墙表 2021-07-15 23:54:48 +08:00
MrZ626
b1ac913dd8 更新ZRS,修改O和X的旋转踢墙方向 2021-07-14 23:24:43 +08:00
MrZ626
4e5b16c0e2 更新ZRS,移动键顶墙才会增加额外偏移 2021-07-14 22:26:20 +08:00
MrZ626
56b2a41eee 增加滑条控件测试声音的间隔 2021-07-14 18:58:37 +08:00
MrZ626
8b32f29c2a 控制台的flag添加sudo密码 2021-07-14 18:56:54 +08:00
MrZ626
52ad2e2ddc 修正只有屏幕宽度异常时自动刷新窗口尺寸 2021-07-14 18:51:13 +08:00
MrZ626
2edd5542f8 整理代码 2021-07-14 17:35:33 +08:00
MrZ626
cb27f145a3 开启msaa(实验性),修改更新历史和版本名 2021-07-14 17:09:05 +08:00
MrZ626
44cbe58486 控制台新增sudo(su)命令 2021-07-14 16:19:56 +08:00
MrZ626
1c8844c3c4 选择系统新增ZRS(实验性) 2021-07-14 00:06:22 +08:00
MrZ626
6c864ea59a 修正c2sym旋转系统一个内部小问题 2021-07-13 23:06:57 +08:00
MrZ626
9818685856 整理代码 2021-07-13 22:26:10 +08:00
MrZ626
51e709acf6 修复地图上两个无尽模式每次启动都会消失 2021-07-13 22:25:50 +08:00
MrZ626
f826899f45 修改debug模式鼠标位置显示方式 2021-07-13 16:08:49 +08:00
MrZ626
b3f9aa3d28 声音设置界面添加静音按钮 2021-07-13 15:25:00 +08:00
MrZ626
d9c31f6661 修复转换弄反20G模式数据时可能报错 2021-07-13 01:22:22 +08:00
MrZ626
2af3f15997 修复das为0时预览动画不正确 2021-07-13 00:34:45 +08:00
MrZ626
701e4bbdbb 新增小亚语音包(立绘等待更新) 2021-07-13 00:29:16 +08:00
MrZ626
ce8e2597fe 修复存档转换时两个20G模式数据弄反,更新版本号至0.16.0 2021-07-11 17:05:16 +08:00
MrZ626
b185852271 不再自动转换0.15.0以前存档 2021-07-11 16:58:13 +08:00
MrZ626
7a2ac914df 修复20G不会禁用各种软降键 2021-07-11 16:35:49 +08:00
MrZ626
a0e3eb21c5 主菜单按esc可以返回intro 2021-07-11 15:14:02 +08:00
MrZ626
c9132b02a4 修复更新存档时两个master内部名弄反 2021-07-11 15:00:44 +08:00
MrZ626
0e81b0f8c8 bgm nil微调 2021-07-11 15:00:44 +08:00
MrZ626
de3bd91d4d 新增bgm:shift(用于生存后三个难度) 2021-07-11 15:00:17 +08:00
969 changed files with 46051 additions and 36348 deletions

View File

@@ -0,0 +1,8 @@
---
name: Bug report (bluescreen crash) Bug报告 (蓝屏报错)
about: Create a report of problems which made the crash with a bluescreen
---
Screenshot with crash information (*Image(s) Here*):
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button (*Details Here*)

View File

@@ -0,0 +1,8 @@
---
name: Bug report (unintended behaviors) Bug报告 (奇怪的现象)
about: Create a report of unintended behaviors
---
Screenshot with unintended behaviors (*Image(s) Here*):
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button (*Details Here*):

View File

@@ -0,0 +1,4 @@
---
name: Feature Request 添加新功能
about: Suggest an idea that may improve Techmino 提一些有意思的新想法,让Techmino越来越好!
---

View File

@@ -0,0 +1,24 @@
name: 'Automatic Test'
description: 'Check for obvious errors.'
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-love
with:
file-path: Techmino.love
- name: Download love
shell: bash
run: |
curl -L https://github.com/love2d/love/releases/download/11.3/love-11.3-linux-x86_64.tar.gz | tar xz
- name: Prepare PulseAudio
shell: bash
run: |
sudo apt-get update
sudo apt-get install pulseaudio pulseaudio-utils pavucontrol alsa-oss alsa-utils -y
- name: Run automated test
uses: GabrielBB/xvfb-action@v1
with:
run: |
./dest/love Techmino.love --test

102
.github/actions/build-android/action.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: 'build Android'
description: 'build Android package'
inputs:
type:
required: true
apkCode:
required: true
name:
required: true
file-path:
required: true
SIGNING_KEY:
required: true
KEY_STORE_PASSWORD:
required: true
ALIAS:
required: true
KEY_PASSWORD:
required: true
runs:
using: "composite"
steps:
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Clone love-android
shell: bash
run: |
git clone --recurse-submodules https://github.com/26F-Studio/love-android -b CI --depth 1 --shallow-submodules
- uses: ./.github/actions/build-love
with:
file-path: love-android/app/src/main/assets/game.love
- name: Download ColdClear arm64-v8a
uses: ./.github/actions/get-cc
with:
arch: android_aarch64
dir: ColdClear/arm64-v8a
- name: Process ColdClear arm64-v8a
shell: bash
run: |
mkdir -p love-android/app/libs/arm64-v8a
mv ColdClear/arm64-v8a/love-11.3-android/lib/arm64-v8a/libcold_clear.so love-android/app/libs/arm64-v8a
mkdir -p libAndroid/arm64-v8a
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
- name: Download ColdClear armeabi-v7a
uses: ./.github/actions/get-cc
with:
arch: android_armv7
dir: ColdClear/armeabi-v7a
- name: Process ColdClear armeabi-v7a
shell: bash
run: |
mkdir -p love-android/app/libs/armeabi-v7a
mv ColdClear/armeabi-v7a/love-11.3-android/lib/armeabi-v7a/libcold_clear.so love-android/app/libs/armeabi-v7a
mkdir -p libAndroid/armeabi-v7a
mv ColdClear/armeabi-v7a/libs/armeabi-v7a/libCCloader.so libAndroid/armeabi-v7a
- name: Pack ColdClear
shell: bash
run: |
7z a -tzip love-android/app/src/main/assets/game.love libAndroid
- name: update Android information
shell: python
run: |
if '${{ inputs.type }}' == 'Release':
appName = 'Techmino'
packageName = 'org.love2d.MrZ.Techmino'
edition = 'release'
elif '${{ inputs.type }}' == 'Snapshot':
appName = 'Techmino_Snapshot'
packageName = 'org.love2d.MrZ.Techmino.Snapshot'
edition = 'snapshot'
with open('./love-android/app/src/main/AndroidManifest.xml', "r+", encoding='utf-8') as file:
data = file.read()
data = data\
.replace('@appName', appName)\
.replace('@edition', edition)
file.seek(0)
file.truncate()
file.write(data)
with open("./love-android/app/build.gradle", "r+", encoding='utf-8') as file:
data = file.read()
data = data\
.replace('@packageName', packageName)\
.replace('@versionCode', '${{ inputs.apkCode }}')\
.replace('@versionName', '${{ inputs.name }}')\
.replace('@storePassword', '${{ inputs.KEY_STORE_PASSWORD }}')\
.replace('@keyAlias', '${{ inputs.ALIAS }}')\
.replace('@keyPassword', '${{ inputs.KEY_PASSWORD }}')
file.seek(0)
file.truncate()
file.write(data)
- name: Build Techmino
shell: bash
run: |
echo "${{ inputs.SIGNING_KEY }}" | base64 -d > love-android/app/android.keystore
chmod 777 love-android/gradlew
cd love-android/
./gradlew assembleRelease
- name: rename apk
shell: bash
run: mv love-android/app/build/outputs/apk/release/app-release.apk ${{ inputs.file-path }}

96
.github/actions/build-ios/action.yml vendored Normal file
View File

@@ -0,0 +1,96 @@
name: 'build iOS'
description: 'build iOS package'
inputs:
name:
required: true
description: "Version name"
type:
required: true
description: "Build type"
APPLE_API_ID:
required: true
description: "API key ID"
APPLE_API_ISSUER:
required: true
description: "API issuer ID"
APPLE_API_KEY:
required: true
description: "API key content"
APPLE_APP_BUILD:
required: true
description: "Build number"
APPLE_APP_CHANGELOG:
required: true
description: "Changelog"
APPLE_APP_ID:
required: true
description: "AppStore Apple ID"
APPLE_APP_IDENTIFIER:
required: true
description: "Bundle ID"
APPLE_APP_PROFILE:
required: true
description: "Provisioning Profile specifer"
APPLE_KEYCHAIN_NAME:
required: true
description: "Temporary keychain name"
APPLE_KEYCHAIN_PWD:
required: true
description: "Temporary keychain password"
FASTLANE_DISCORD_WEBHOOK:
required: true
description: "Fastlane Discord webhook"
FASTLANE_ACTION_ID:
required: true
description: "Fastlane Action ID"
FASTLANE_MATCH_PWD:
required: true
description: "Fastlane Match description password"
FASTLANE_MATCH_TOKEN:
required: true
description: "Fastlane Match Github token"
runs:
using: "composite"
steps:
- uses: ./.github/actions/build-love
- name: Checkout source codes
uses: actions/checkout@v2
with:
repository: '26F-Studio/Techmino-iOS'
path: 'Techmino-iOS'
- name: Download CCloader
uses: ./.github/actions/get-cc
with:
arch: iOS
- name: Update source codes
shell: bash
run: |
mv Techmino.love Techmino-iOS/platform/xcode
mv libcold_clear.a Techmino-iOS/platform/xcode
mv libCCloader.a Techmino-iOS/platform/xcode
- name: Run fastlane
uses: maierj/fastlane-action@v2.0.1
with:
lane: '${{ inputs.type }}'
subdirectory: 'Techmino-iOS/platform/xcode'
env:
ACTION_ID: '${{ inputs.FASTLANE_ACTION_ID }}'
API_ID: '${{ inputs.APPLE_API_ID }}'
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
API_KEY: '${{ inputs.APPLE_API_KEY }}'
APP_BUILD: '${{ inputs.APPLE_APP_BUILD }}'
APP_CHANGELOG: '${{ inputs.APPLE_APP_CHANGELOG }}'
APP_ID: '${{ inputs.APPLE_APP_ID }}'
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
APP_PROFILE: '${{ inputs.APPLE_APP_PROFILE }}'
APP_VERSION: '${{ inputs.name }}'
DISCORD_WEBHOOK: '${{ inputs.FASTLANE_DISCORD_WEBHOOK }}'
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
- name: Move ipa
shell: bash
run: |
mv Techmino-iOS/platform/xcode/Techmino.ipa Techmino.ipa

40
.github/actions/build-linux/action.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: 'build Linux'
description: 'build Linux package'
inputs:
file-path:
required: false
default: Techmino.AppImage
icon:
required: true
runs:
using: "composite"
steps:
- name: Download AppImageKit
shell: bash
run: |
curl -OL https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
- name: Download love
shell: bash
run: |
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-x86_64.AppImage
chmod 777 love-11.3-x86_64.AppImage
./love-11.3-x86_64.AppImage --appimage-extract
- name: Download ColdClear
uses: ./.github/actions/get-cc
with:
arch: linux
- name: Pack Techmino
shell: bash
run: |
rm -rf squashfs-root/love squashfs-root/love.desktop squashfs-root/love.svg squashfs-root/.DirIcon
mv .github/build/Linux/love.template squashfs-root/love
mv .github/build/Linux/Techmino.desktop.template squashfs-root/Techmino.desktop
mv ${{ inputs.icon }} squashfs-root/icon.png
cp squashfs-root/icon.png squashfs-root/.DirIcon
chmod 777 squashfs-root/love
mkdir -p squashfs-root/usr/share/Techmino
mv media parts Zframework conf.lua main.lua version.lua legals.md license.txt squashfs-root/usr/share/Techmino
mv CCloader.so squashfs-root/usr/share/Techmino
mv libcold_clear.so squashfs-root/usr/lib
chmod 777 appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage squashfs-root ${{ inputs.file-path }}

11
.github/actions/build-love/action.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: 'build love'
description: 'build love file'
inputs:
file-path:
required: true
default: Techmino.love
runs:
using: "composite"
steps:
- run: 7z a -tzip ${{ inputs.file-path }} media parts Zframework conf.lua main.lua version.lua legals.md license.txt
shell: bash

152
.github/actions/build-macos/action.yml vendored Normal file
View File

@@ -0,0 +1,152 @@
name: 'build Mac OS'
description: 'build Mac OS package'
inputs:
name:
required: true
description: "Version name"
icon:
required: true
description: "App icons (.icns)"
APPLE_API_ID:
required: true
description: "API key ID"
APPLE_API_ISSUER:
required: true
description: "API issuer ID"
APPLE_API_KEY:
required: true
description: "API key content"
APPLE_APP_IDENTIFIER:
required: true
description: "Bundle ID"
APPLE_KEYCHAIN_NAME:
required: true
description: "Temporary keychain name"
APPLE_KEYCHAIN_PWD:
required: true
description: "Temporary keychain password"
FASTLANE_MATCH_PWD:
required: true
description: "Fastlane Match description password"
FASTLANE_MATCH_TOKEN:
required: true
description: "Fastlane Match Github token"
runs:
using: "composite"
steps:
- uses: ./.github/actions/build-love
- name: Checkout template
uses: actions/checkout@v2
with:
repository: '26F-Studio/Techmino-macOS'
path: 'Techmino-macOS'
- name: Download ColdClear
uses: ./.github/actions/get-cc
with:
arch: macOS
- name: Fastlane match
uses: maierj/fastlane-action@v2.0.1
with:
lane: 'get_cert'
subdirectory: 'Techmino-macOS'
env:
API_ID: '${{ inputs.APPLE_API_ID }}'
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
API_KEY: '${{ inputs.APPLE_API_KEY }}'
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
- name: Modify template
shell: python
run: |
import datetime
from io import open
thisYear = str(datetime.datetime.today().year)
with open('./.github/build/macOS/info.plist.template', 'r', encoding='utf-8') as file:
data = file.read()
data = data\
.replace('@versionName', '${{ inputs.name }}'[1:])\
.replace('@thisYear', thisYear)\
.replace('@bundleId', '${{ inputs.APPLE_APP_IDENTIFIER }}')
with open('./Techmino-macOS/Techmino.app/Contents/info.plist', 'w+', encoding='utf-8') as file:
file.write(data)
- name: Pack
shell: bash
run: |
mv Techmino.love Techmino-macOS/Techmino.app/Contents/Resources
mv CCloader.dylib Techmino-macOS/Techmino.app/Contents/Frameworks
mv ${{ inputs.icon }} Techmino-macOS/Techmino.app/Contents/Resources/iconfile.icns
chmod +x Techmino-macOS/Techmino.app/Contents/Frameworks/CCloader.dylib
chmod +x Techmino-macOS/Techmino.app/Contents/MacOS/love
- name: Codesign executable
shell: bash
run: |
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
codesign --timestamp --force --strict --deep -v \
--options runtime \
-s ${BASH_REMATCH[1]} \
--entitlements Techmino-macOS/love.entitlements \
Techmino-macOS/Techmino.app
- name: Fastlane notarize
uses: maierj/fastlane-action@v2.0.1
with:
lane: 'make_safe'
subdirectory: 'Techmino-macOS'
env:
API_ID: '${{ inputs.APPLE_API_ID }}'
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
API_KEY: '${{ inputs.APPLE_API_KEY }}'
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
NOTARIZE_OBJECT: 'Techmino.app'
- name: Create DMG file
shell: bash
run: |
brew install create-dmg
create-dmg \
--volname "Techmino for MacOS" \
--volicon "./.github/build/macOS/Techminodisk.icns" \
--window-pos 200 120 \
--window-size 800 500 \
--icon-size 100 \
--icon "Techmino.app" 239 203 \
--background ".github/build/macOS/backgroundImage.tiff" \
--hide-extension "Techmino.app" \
--app-drop-link 565 203 \
"Techmino-macOS/Techmino-macOS.dmg" \
"Techmino-macOS/Techmino.app/"
- name: Codesign DMG
shell: bash
run: |
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
codesign --timestamp --force --strict --deep -v \
--options runtime \
-s ${BASH_REMATCH[1]} \
--entitlements Techmino-macOS/love.entitlements \
Techmino-macOS/Techmino-macOS.dmg
- name: Fastlane notarize
uses: maierj/fastlane-action@v2.0.1
with:
lane: 'make_safe'
subdirectory: 'Techmino-macOS'
env:
API_ID: '${{ inputs.APPLE_API_ID }}'
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
API_KEY: '${{ inputs.APPLE_API_KEY }}'
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
NOTARIZE_OBJECT: 'Techmino-macOS.dmg'
- name: Finalize
shell: bash
run: |
mv Techmino-macOS/Techmino-macOS.dmg Techmino.dmg
spctl -a -t open --context context:primary-signature -vv Techmino.dmg

View File

@@ -0,0 +1,60 @@
name: 'build Windows'
description: 'build Windows package'
inputs:
love-url:
required: true
love-dir:
required: true
arch:
required: true
version:
required: true
icon:
required: true
runs:
using: "composite"
steps:
- name: Download love
uses: ./.github/actions/get-unzip
with:
url: ${{ inputs.love-url }}
- name: move love
shell: bash
run: mv ${{ inputs.love-dir }} love
- name: Download ColdClear
uses: ./.github/actions/get-cc
with:
arch: ${{ inputs.arch }}
- name: Download ResourceHacker
uses: ./.github/actions/get-unzip
with:
url: http://www.angusj.com/resourcehacker/resource_hacker.zip
- uses: ./.github/actions/build-love
- name: update Windows template
shell: python
run: |
Version = '${{ inputs.version }}'.replace('V', '')
FileVersion = (f"{Version.replace('.', ',')},0")
with open('./.github/build/Windows/Techmino.rc.template', 'r', encoding='utf8') as file:
data = file.read()
data = data\
.replace('@FileVersion', FileVersion)\
.replace('@Version', Version)
with open('Techmino.rc', 'w+', encoding='utf8') as file:
file.write(data)
- name: Pack Techmino
shell: pwsh
run: |
cmd /c copy /b .\love\love.exe + .\Techmino.love .\love\Techmino.exe
del .\love\love.exe
del .\love\lovec.exe
del .\love\game.ico
del .\love\love.ico
del .\love\changes.txt
del .\love\readme.txt
move .\cold_clear.dll .\love
move .\CCloader.dll .\love
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action delete -mask ICONGROUP,,'
cmd /c '.\ResourceHacker.exe -open .\Techmino.rc -save .\Techmino.res -action compile'
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res "${{ inputs.icon }}" -mask ICONGROUP,1,'
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res ".\Techmino.res" -mask VERSIONINFO,1,'

32
.github/actions/get-cc/action.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: 'get cc'
description: 'download cc into specific dir'
inputs:
tag:
required: false
default:
arch:
required: true
dir:
required: false
default: '.'
repo:
required: false
default: 26F-Studio/cold_clear_ai_love2d_wrapper
temp-file:
required: false
default: temp.zip
runs:
using: "composite"
steps:
- run: |
echo "::set-output name=tag::"$(if [ -z "${{ inputs.tag }}" ]
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
else echo ${{ inputs.tag }}
fi)
id: get-tag
shell: bash
- uses: ./.github/actions/get-unzip
with:
url: https://github.com/${{ inputs.repo }}/releases/download/${{ steps.get-tag.outputs.tag }}/${{ inputs.arch }}.zip
dir: ${{ inputs.dir }}
temp-file: ${{ inputs.temp-file }}

18
.github/actions/get-unzip/action.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: 'get and unzip'
description: 'cURL and then 7-zip x'
inputs:
url:
required: true
dir:
required: false
default: '.'
temp-file:
required: false
default: temp.zip
runs:
using: "composite"
steps:
- run: curl -L ${{ inputs.url }} -o ${{ inputs.temp-file }}
shell: bash
- run: 7z x ${{ inputs.temp-file }} -o${{ inputs.dir }}
shell: bash

View File

@@ -0,0 +1,37 @@
name: 'update version'
description: 'common update logic for snapshot and release'
inputs:
commit:
required: false
type:
required: true
runs:
using: "composite"
steps:
- shell: python
name: update snapshot saving folder
run: |
from io import open
if '${{ inputs.type }}'.lower() != 'snapshot':
exit(0)
with open('conf.lua', 'r+', encoding='utf-8') as file:
data = file.read()
data = data.replace("t.identity='Techmino'--Saving folder", "t.identity='Techmino_Snapshot'--Saving folder")
file.seek(0)
file.truncate()
file.flush()
file.write(data)
- shell: python
run: |
from io import open
import re
with open('version.lua', 'r+', encoding='utf-8') as file:
commitHash = '${{ inputs.commit }}'
if commitHash != '':
commitHash = '@' + commitHash[0:4]
data = file.read()
data = re.sub('(\d)"', r'\1' + commitHash + '"', data, 1)
file.seek(0)
file.truncate()
file.flush()
file.write(data)

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Techmino Alpha
Comment=Techmino is fun!
Exec=wrapper-love %f
Type=Application
Categories=Game;
Terminal=false
Icon=icon

BIN
.github/build/Linux/icon.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
.github/build/Linux/icon_snapshot.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

5
.github/build/Linux/love.template vendored Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
export LOVE_LAUNCHER_LOCATION="$(dirname "$(which "$0")")"
export LD_LIBRARY_PATH="${LOVE_LAUNCHER_LOCATION}/lib/x86_64-linux-gnu:${LOVE_LAUNCHER_LOCATION}/usr/bin:${LOVE_LAUNCHER_LOCATION}/usr/lib:${LOVE_LAUNCHER_LOCATION}/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
/sbin/ldconfig -p | grep -q libstdc++ || export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LOVE_LAUNCHER_LOCATION}/libstdc++/"
exec ${LOVE_BIN_WRAPPER} "${LOVE_LAUNCHER_LOCATION}/usr/bin/love" "${LOVE_LAUNCHER_LOCATION}/usr/share/Techmino"

View File

@@ -0,0 +1,23 @@
1 VERSIONINFO
FILEVERSION @FileVersion
PRODUCTVERSION @FileVersion
FILEOS 0x40004
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Techmino Alpha"
VALUE "CompanyName", "26F Studio"
VALUE "LegalCopyright", "Copyright @ 26F Studio"
VALUE "ProductName", "Techmino"
VALUE "ProductVersion", "@Version"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409 0x04E4
}
}

BIN
.github/build/Windows/icon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
.github/build/Windows/icon_snapshot.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
.github/build/macOS/Techminodisk.icns vendored Normal file

Binary file not shown.

BIN
.github/build/macOS/backgroundImage.tiff vendored Normal file

Binary file not shown.

BIN
.github/build/macOS/icon.icns vendored Normal file

Binary file not shown.

BIN
.github/build/macOS/icon_snapshot.icns vendored Normal file

Binary file not shown.

56
.github/build/macOS/info.plist.template vendored Normal file
View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19B88</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>love</string>
<key>CFBundleIconFile</key>
<string>iconfile</string>
<key>CFBundleIdentifier</key>
<string>@bundleId</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Techmino</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@versionName</string>
<key>CFBundleSignature</key>
<string>LoVe</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C504</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>
<string>10.7</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>©2020-@thisYear 26F Studio, GNU LGPLv3.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<false/>
</dict>
</plist>

View File

@@ -1,88 +0,0 @@
name: Techmino CI
on:
push:
branches: [ main, ci ]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Download love
run: |
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
7z x love-11.3-win64.zip
- name: Download ColdClear
run: |
curl -OL https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper/releases/download/20210520/win64.zip
7z x win64.zip -ocoldclear
move coldclear\cold_clear.dll love-11.3-win64
move coldclear\CCloader.dll love-11.3-win64
- name: Pack Techmino
shell: cmd
run: |
7z a -tzip game.love document media parts Zframework conf.lua font.ttf main.lua
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
with:
name: Windows
path: love-11.3-win64
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Download AppImageKit
run: curl -OL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
- name: Unpack and Repack
run: |
curl -OL https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.AppImage
chmod +x Techmino.AppImage appimagetool-x86_64.AppImage
./Techmino.AppImage --appimage-extract
rm Techmino.AppImage
cd squashfs-root/usr/share/Techmino
rm -rf document media parts Zframework conf.lua font.ttf main.lua
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
uses: actions/upload-artifact@v2
with:
name: Linux
path: Techmino.AppImage
build-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Download Apktool
run: curl -OL https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar
- name: Unpack and Repack
run: |
curl -OL https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.apk
java -jar apktool_2.5.0.jar d -s -o apk Techmino.apk
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
java -jar apktool_2.5.0.jar b -o Techmino.apk apk
- uses: 26F-Studio/sign-android-release@master
name: Sign app APK
id: sign_app
with:
releaseDirectory: .
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "30.0.2"
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: Android
path: ${{steps.sign_app.outputs.signedReleaseFile}}

203
.github/workflows/dev.yml vendored Normal file
View File

@@ -0,0 +1,203 @@
name: Techmino Develop CI
on:
push:
branches: [ main, ci* ]
pull_request:
branches: [ main ]
jobs:
get-info:
runs-on: ubuntu-20.04
outputs:
name: ${{ steps.actual-get-info.outputs.name }}
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
code: ${{ steps.actual-get-info.outputs.code }}
commit: ${{ steps.actual-get-info.outputs.commit }}
steps:
- uses: actions/checkout@v2
- name: Install lua
run: |
sudo apt-get install lua5.3 -y
- name: Get Version
id: actual-get-info
run: |
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
automatic-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/automatic-test
build-windows:
runs-on: windows-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-windows
with:
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
love-dir: love-11.3-win64
arch: win64
version: ${{ needs.get-info.outputs.name }}
icon: .\.github\build\Windows\icon_snapshot.ico
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Windows
path: love
build-linux:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-linux
with:
icon: .github/build/Linux/icon_snapshot.png
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Linux
path: Techmino.AppImage
build-android:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-android
with:
type: Snapshot
apkCode: ${{ needs.get-info.outputs.apkCode }}
name: ${{ needs.get-info.outputs.name }}
file-path: Techmino_Snapshot.apk
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
path: Techmino_Snapshot.apk
build-android-mini:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- name: remove media
run: |
rm -rf media/music media/effect media/vocal
- uses: ./.github/actions/build-android
with:
type: Snapshot
apkCode: ${{ needs.get-info.outputs.apkCode }}
name: ${{ needs.get-info.outputs.name }}
file-path: Techmino_Snapshot_Mini.apk
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android_Mini
path: Techmino_Snapshot_Mini.apk
build-macOS:
runs-on: macos-10.15
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-macos
with:
name: ${{ needs.get-info.outputs.name }}
icon: .github/build/macOS/icon_snapshot.icns
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
path: Techmino.dmg
build-iOS:
runs-on: macos-latest
if: (!startsWith( github.ref , 'refs/heads/ci-')) || startsWith( github.ref , 'refs/heads/ci-ios-')
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-ios
with:
name: ${{ needs.get-info.outputs.name }}
type: 'dev'
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.2.${{ github.run_number }}.${{ github.run_attempt }}'
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
FASTLANE_ACTION_ID: '${{ github.run_id }}'
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_iOS
path: Techmino.ipa
build-love:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-love
with:
file-path: Techmino.love
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Love
path: Techmino.love

28
.github/workflows/getVersion.lua vendored Normal file
View File

@@ -0,0 +1,28 @@
local arg=arg[1]
if arg=="-apkCode"then
local code=require"version".apkCode
print(code)
elseif arg=="-code"then
local str=require"version".code
print(str)
elseif arg=="-name"then
local str=require"version".string
print(str)
elseif arg=="-release"then
local str=require"version".string:gsub("V","",1)
print(str)
elseif arg=="-updateTitle"then
local note=require"parts.updateLog"
local p1=note:find("\n%d")+1
local p2=note:find("\n",p1)-1
note=note:sub(p1,p2)
print(note)
elseif arg=="-updateNote"then
local note=require"parts.updateLog"
local p1=note:find("\n",note:find("\n%d")+1)+1
local p2=note:find("\n%d",p1+1)
note=note:sub(p1,p2-2)
:gsub(" ","- ")
:gsub(" ","# ")
print(note)
end

189
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,189 @@
name: Techmino Release CI
on:
push:
tags:
- "v*"
jobs:
get-info:
runs-on: ubuntu-20.04
outputs:
name: ${{ steps.actual-get-info.outputs.name }}
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
code: ${{ steps.actual-get-info.outputs.code }}
release: ${{ steps.actual-get-info.outputs.release }}
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
updateNote: ${{ steps.actual-get-info.outputs.updateNote }}
commit: ${{ steps.actual-get-info.outputs.commit }}
steps:
- uses: actions/checkout@v2
- name: Install lua
run: |
sudo apt-get install lua5.3 -y
- name: Get Version
id: actual-get-info
run: |
UPDATE_NOTE=$(lua .github/workflows/getVersion.lua -updateNote)
UPDATE_NOTE="${UPDATE_NOTE//'%'/'%25'}"
UPDATE_NOTE="${UPDATE_NOTE//$'\n'/'%0A'}"
UPDATE_NOTE="${UPDATE_NOTE//$'\r'/'%0D'}"
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
echo "::set-output name=updateNote::$UPDATE_NOTE"
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
build-windows-x64:
runs-on: windows-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-windows
with:
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
love-dir: love-11.3-win64
arch: win64
version: ${{ needs.get-info.outputs.release }}
icon: .\.github\build\Windows\icon.ico
- name: Pack Techmino
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip .\love
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip
build-windows-x86:
runs-on: windows-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-windows
with:
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
love-dir: love-11.3-win32
arch: win32
version: ${{ needs.get-info.outputs.release }}
icon: .\.github\build\Windows\icon.ico
- name: Pack Techmino
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip .\love
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip
build-linux:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-linux
with:
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
icon: .github/build/Linux/icon.png
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
build-android:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-android
with:
type: Release
apkCode: ${{ needs.get-info.outputs.apkCode }}
name: ${{ needs.get-info.outputs.name }}
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
build-macOS:
runs-on: macos-10.15
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-macos
with:
name: ${{ needs.get-info.outputs.name }}
icon: .github/build/macOS/icon.icns
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
- name: Pack Techmino
run: |
mv Techmino.dmg Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
build-iOS:
runs-on: macos-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
- uses: ./.github/actions/build-ios
with:
name: ${{ needs.get-info.outputs.name }}
type: "release"
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
APPLE_APP_BUILD: "${{ needs.get-info.outputs.code }}.0.${{ github.run_number }}.${{ github.run_attempt }}"
APPLE_APP_CHANGELOG: "${{ needs.get-info.outputs.updateNote }}"
APPLE_APP_ID: "${{ secrets.APPLE_APP_ID }}"
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
APPLE_APP_PROFILE: "${{ secrets.APPLE_APP_PROFILE }}"
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
FASTLANE_ACTION_ID: "${{ github.run_id }}"
FASTLANE_DISCORD_WEBHOOK: "${{ secrets.FASTLANE_DISCORD_WEBHOOK }}"
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
- name: Rename ipa
shell: bash
run: |
mv Techmino.ipa Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
files: Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
Add-Release-note:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.get-info.outputs.updateTitle }}
body: ${{ needs.get-info.outputs.updateNote }}

154
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,154 @@
name: Techmino Test CI
on:
push:
tags:
- 'pre*'
jobs:
get-info:
runs-on: ubuntu-20.04
outputs:
name: ${{ steps.actual-get-info.outputs.name }}
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
code: ${{ steps.actual-get-info.outputs.code }}
release: ${{ steps.actual-get-info.outputs.release }}
commit: ${{ steps.actual-get-info.outputs.commit }}
steps:
- uses: actions/checkout@v2
- name: Install lua
run: |
sudo apt-get install lua5.3 -y
- name: Get Version
id: actual-get-info
run: |
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
build-windows:
runs-on: windows-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-windows
with:
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
love-dir: love-11.3-win64
arch: win64
version: ${{ needs.get-info.outputs.name }}
icon: .\.github\build\Windows\icon_snapshot.ico
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
path: love
build-linux:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-linux
with:
icon: .github/build/Linux/icon_snapshot.png
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Linux
path: Techmino.AppImage
build-android:
runs-on: ubuntu-20.04
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-android
with:
type: Snapshot
apkCode: ${{ needs.get-info.outputs.apkCode }}
name: ${{ needs.get-info.outputs.name }}
file-path: Techmino_Snapshot.apk
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Android
path: Techmino_Snapshot.apk
build-macOS:
runs-on: macos-10.15
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-macos
with:
name: ${{ needs.get-info.outputs.name }}
icon: .github/build/macOS/icon_snapshot.icns
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_MacOS
path: Techmino.dmg
build-iOS:
runs-on: macos-latest
needs: get-info
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/update-version
with:
commit: ${{ needs.get-info.outputs.commit }}
type: snapshot
- uses: ./.github/actions/build-ios
with:
name: ${{ needs.get-info.outputs.name }}
type: 'test'
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.1.${{ github.run_number }}.${{ github.run_attempt }}'
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
FASTLANE_ACTION_ID: '${{ github.run_id }}'
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_iOS
path: Techmino.ipa

View File

@@ -1,12 +0,0 @@
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)
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)

8
.gitignore vendored
View File

@@ -1,4 +1,8 @@
.vscode
libAndroid
font.ttf
note.lua
*.ini
.DS_Store
Thumbs.db
Icon?
.Trash
.file

165
LICENSE
View File

@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1,8 +0,0 @@
# Techmino
《Techmino:方块研究所》
——Github & Gitee 官方仓库 Official Repository
集合各种现代方块规则,更多玩法,全新体验。
官网(建设中) https://home.techmino.org

View File

@@ -1,17 +0,0 @@
local printf=love.graphics.printf
local draw=love.graphics.draw
local aDraw={}
function aDraw.str(obj,x,y)printf(obj,x-626,y,1252,'center')end
function aDraw.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end
function aDraw.simpY(obj,x,y)draw(obj,x,y-obj:getHeight()*.5)end
function aDraw.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end
function aDraw.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end
function aDraw.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end
function aDraw.outDraw(obj,div,x,y,a,k)
local w,h=obj:getWidth()*.5,obj:getHeight()*.5
draw(obj,x-div,y-div,a,k,nil,w,h)
draw(obj,x-div,y+div,a,k,nil,w,h)
draw(obj,x+div,y-div,a,k,nil,w,h)
draw(obj,x+div,y+div,a,k,nil,w,h)
end
return aDraw

View File

@@ -1,50 +1,56 @@
local gc_clear=love.graphics.clear
local BGs={
none={draw=function()gc_clear(.15,.15,.15)end}
none={draw=function()gc_clear(.08,.08,.084)end}
}
local BGlist={'none'}
local BG={
cur='none',
default='none',
init=false,
resize=false,
update=NULL,
draw=BGs.none.draw,
event=false,
discard=NULL,
default='none',
locked=false,
cur='none',
init=false,
resize=false,
update=NULL,
draw=BGs.none.draw,
event=false,
discard=NULL,
}
function BG.lock()BG.locked=true end
function BG.unlock()BG.locked=false end
function BG.add(name,bg)
BGs[name]=bg
BGlist[#BGlist+1]=name
BGs[name]=bg
BGlist[#BGlist+1]=name
end
function BG.getList()
return BGlist
return BGlist
end
function BG.remList(name)
table.remove(BGlist,TABLE.find(BGlist,name))
end
function BG.send(...)
if BG.event then
BG.event(...)
end
if BG.event then
BG.event(...)
end
end
function BG.setDefault(bg)
BG.default=bg
BG.default=bg
end
function BG.set(background)
if not background then background=BG.default end
if not BGs[background]or not SETTING.bg then return end
if background~=BG.cur then
BG.discard()
BG.cur=background
background=BGs[background]
function BG.set(name)
name=name or BG.default
if not BGs[name]or BG.locked then return end
if name~=BG.cur then
BG.discard()
BG.cur=name
local bg=BGs[name]
BG.init= background.init or NULL
BG.resize= background.resize or NULL
BG.update= background.update or NULL
BG.draw= background.draw or NULL
BG.event= background.event or NULL
BG.discard= background.discard or NULL
BG.init()
end
return true
BG.init= bg.init or NULL
BG.resize= bg.resize or NULL
BG.update= bg.update or NULL
BG.draw= bg.draw or NULL
BG.event= bg.event or NULL
BG.discard=bg.discard or NULL
BG.init()
end
return true
end
return BG
return BG

View File

@@ -1,103 +1,182 @@
local lastLoaded={}
local maxLoadedCount=3
local nameList={}
local SourceObjList={}
local volume=1
local BGM={
default=false,
getList=function()error("Can't getList before initialized!")end,
getCount=function()return 0 end,
play=NULL,
freshVolume=NULL,
stop=NULL,
--nowPlay=[str:playing ID]
--playing=[src:playing SRC]
default=false,
onChange=NULL,
--nowPlay=[str:playing ID]
--playing=[src:playing SRC]
--lastPlayed=[str:lastPlayed ID]
}
function BGM.getList()return nameList end
function BGM.getCount()return #nameList end
local function _addFile(name,path)
if not SourceObjList[name]then
table.insert(nameList,name)
SourceObjList[name]={path=path,source=false}
end
end
function BGM.load(name,path)
if type(name)=='table'then
for k,v in next,name do
_addFile(k,v)
end
else
_addFile(name,path)
end
table.sort(nameList)
LOG(BGM.getCount().." BGM files added")
end
local function _tryReleaseSources()
local n=#lastLoaded
while #lastLoaded>maxLoadedCount do
local name=lastLoaded[n]
if SourceObjList[name].source:isPlaying()then
n=n-1
if n<=0 then return end
else
SourceObjList[name].source=SourceObjList[name].source:release()and nil
table.remove(lastLoaded,n)
return
end
end
end
function BGM.setDefault(bgm)
BGM.default=bgm
BGM.default=bgm
end
function BGM.init(list)
BGM.init=nil
local min=math.min
local Sources={}function BGM.getList()return list end
local count=#list function BGM.getCount()return count end
local function fadeOut(src)
while true do
coroutine.yield()
local v=src:getVolume()-.025*SETTING.bgm
src:setVolume(v>0 and v or 0)
if v<=0 then
src:stop()
return true
end
end
end
local function fadeIn(src)
while true do
coroutine.yield()
local v=SETTING.bgm
v=min(v,src:getVolume()+.025*v)
src:setVolume(v)
if v>=SETTING.bgm then
return true
end
end
end
local function removeCurFadeOut(task,code,src)
return task.code==code and task.args[1]==src
end
local function load(skip)
for i=1,count do
local file='media/BGM/'..list[i]..'.ogg'
if love.filesystem.getInfo(file)then
Sources[list[i]]=love.audio.newSource(file,'stream')
Sources[list[i]]:setLooping(true)
Sources[list[i]]:setVolume(0)
else
MES.new('warn',"No BGM file: "..list[i],5)
end
if not skip and i~=count then
coroutine.yield()
end
end
BGM.loadOne=nil
function BGM.play(s)
if not s then s=BGM.default end
if SETTING.bgm==0 then
BGM.nowPlay=s
BGM.playing=Sources[s]
return true
end
if s and Sources[s]then
if BGM.nowPlay~=s then
if BGM.nowPlay then TASK.new(fadeOut,BGM.playing)end
TASK.removeTask_iterate(removeCurFadeOut,fadeOut,Sources[s])
TASK.removeTask_code(fadeIn)
TASK.new(fadeIn,Sources[s])
BGM.nowPlay=s
BGM.playing=Sources[s]
BGM.playing:play()
end
return true
end
end
function BGM.freshVolume()
if BGM.playing then
local v=SETTING.bgm
if v>0 then
BGM.playing:setVolume(v)
BGM.playing:play()
elseif BGM.nowPlay then
BGM.playing:pause()
end
end
end
function BGM.stop()
TASK.removeTask_code(fadeIn)
if BGM.nowPlay then TASK.new(fadeOut,BGM.playing)end
BGM.nowPlay,BGM.playing=nil
end
end
BGM.loadOne=coroutine.wrap(load)
function BGM.loadAll()load(true)end
function BGM.setMaxSources(count)
maxLoadedCount=count
_tryReleaseSources()
end
return BGM
function BGM.setChange(func)
BGM.onChange=func
end
function BGM.setVol(v)
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
volume=v
if BGM.playing then
if volume>0 then
BGM.playing:setVolume(volume)
BGM.playing:play()
elseif BGM.nowPlay then
BGM.playing:pause()
end
end
end
local function task_fadeOut(src)
while true do
coroutine.yield()
local v=src:getVolume()-.025*volume
src:setVolume(v>0 and v or 0)
if v<=0 then
src:pause()
return true
end
end
end
local function task_fadeIn(src)
while true do
coroutine.yield()
local v=volume
v=math.min(v,src:getVolume()+.025*v)
src:setVolume(v)
if v>=volume then
return true
end
end
end
local function check_curFadeOut(task,code,src)
return task.code==code and task.args[1]==src
end
local function _tryLoad(name)
if SourceObjList[name]then
if SourceObjList[name].source then
return true
elseif love.filesystem.getInfo(SourceObjList[name].path)then
SourceObjList[name].source=love.audio.newSource(SourceObjList[name].path,'stream')
SourceObjList[name].source:setVolume(0)
table.insert(lastLoaded,1,name)
_tryReleaseSources()
return true
else
LOG("No BGM: "..SourceObjList[name],5)
end
elseif name then
LOG("No BGM: "..name,5)
end
end
function BGM.play(name,args)
name=name or BGM.default
args=args or""
if not _tryLoad(name)or args:sArg('-preLoad')then return end
if volume==0 then
BGM.nowPlay=name
BGM.playing=SourceObjList[name].source
return true
end
if name and SourceObjList[name].source then
if BGM.nowPlay~=name then
if BGM.nowPlay then
if not args:sArg('-sdout')then
TASK.new(task_fadeOut,BGM.playing)
else
BGM.playing:pause()
end
end
TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,SourceObjList[name].source)
TASK.removeTask_code(task_fadeIn)
BGM.nowPlay=name
BGM.playing=SourceObjList[name].source
if not args:sArg('-sdin')then
BGM.playing:setVolume(0)
TASK.new(task_fadeIn,BGM.playing)
else
BGM.playing:setVolume(volume)
BGM.playing:play()
end
SourceObjList[name].source:setLooping(not args:sArg('-noloop'))
BGM.lastPlayed=BGM.nowPlay
BGM.playing:seek(0)
BGM.playing:play()
BGM.onChange(name)
end
return true
end
end
function BGM.seek(t)
if BGM.playing then
BGM.playing:seek(t)
end
end
function BGM.isPlaying()
return BGM.playing and BGM.playing:isPlaying()
end
function BGM.continue()
if BGM.lastPlayed then
BGM.nowPlay,BGM.playing=BGM.lastPlayed,SourceObjList[BGM.lastPlayed].source
TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,SourceObjList[BGM.nowPlay].source)
TASK.removeTask_code(task_fadeIn)
TASK.new(task_fadeIn,BGM.playing)
BGM.playing:play()
end
end
function BGM.stop(args)
args=args or""
TASK.removeTask_code(task_fadeIn)
if not args:sArg('-s')then
if BGM.nowPlay then
TASK.new(task_fadeOut,BGM.playing)
end
elseif BGM.playing then
BGM.playing:pause()
end
BGM.nowPlay,BGM.playing=nil
end
return BGM

View File

@@ -1,122 +1,148 @@
local abs=math.abs
local function hsv(h,s,v,a)--Color type, Color amount, Light
if s<=0 then return v,v,v,a end
h=h*6
local c=v*s
local x=abs((h-1)%2-1)*c
if h<1 then return v,x+v-c,v-c,a
elseif h<2 then return x+v-c,v,v-c,a
elseif h<3 then return v-c,v,x+v-c,a
elseif h<4 then return v-c,x+v-c,v,a
elseif h<5 then return x+v-c,v-c,v,a
else return v,v-c,x+v-c,a
end
end
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},
hsv=hsv,
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},
red= {hsv(0.00, 0.89, 0.91)},
fire= {hsv(0.04, 0.93, 0.94)},
orange= {hsv(0.09, 0.99, 0.96)},
yellow= {hsv(0.15, 0.82, 0.90)},
lime= {hsv(0.20, 0.89, 0.88)},
jade= {hsv(0.25, 1.00, 0.82)},
green= {hsv(0.33, 1.00, 0.81)},
aqua= {hsv(0.47, 1.00, 0.76)},
cyan= {hsv(0.53, 1.00, 0.88)},
navy= {hsv(0.56, 1.00, 1.00)},
sea= {hsv(0.61, 1.00, 1.00)},
blue= {hsv(0.64, 1.00, 0.95)},
violet= {hsv(0.74, 1.00, 0.91)},
purple= {hsv(0.80, 1.00, 0.81)},
magenta= {hsv(0.86, 1.00, 0.78)},
wine= {hsv(0.92, 0.98, 0.91)},
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},
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},
lRed= {hsv(0.00, 0.38, 0.93)},
lFire= {hsv(0.04, 0.45, 0.91)},
lOrange= {hsv(0.10, 0.53, 0.92)},
lYellow= {hsv(0.14, 0.61, 0.95)},
lLime= {hsv(0.20, 0.66, 0.92)},
lJade= {hsv(0.26, 0.56, 0.90)},
lGreen= {hsv(0.34, 0.49, 0.89)},
lAqua= {hsv(0.47, 0.59, 0.86)},
lCyan= {hsv(0.51, 0.77, 0.88)},
lNavy= {hsv(0.54, 0.80, 0.95)},
lSea= {hsv(0.57, 0.72, 0.97)},
lBlue= {hsv(0.64, 0.44, 0.96)},
lViolet= {hsv(0.72, 0.47, 0.95)},
lPurple= {hsv(0.80, 0.62, 0.89)},
lMagenta= {hsv(0.86, 0.61, 0.89)},
lWine= {hsv(0.93, 0.57, 0.92)},
black= {0.0, 0.0, 0.0},
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},
dRed= {hsv(0.00, 0.80, 0.48)},
dFire= {hsv(0.04, 0.80, 0.34)},
dOrange= {hsv(0.07, 0.80, 0.39)},
dYellow= {hsv(0.12, 0.80, 0.37)},
dLime= {hsv(0.20, 0.80, 0.26)},
dJade= {hsv(0.29, 0.80, 0.27)},
dGreen= {hsv(0.33, 0.80, 0.26)},
dAqua= {hsv(0.46, 0.80, 0.24)},
dCyan= {hsv(0.50, 0.80, 0.30)},
dNavy= {hsv(0.58, 0.80, 0.42)},
dSea= {hsv(0.64, 0.80, 0.40)},
dBlue= {hsv(0.67, 0.80, 0.34)},
dViolet= {hsv(0.71, 0.80, 0.35)},
dPurple= {hsv(0.76, 0.80, 0.32)},
dMagenta= {hsv(0.87, 0.80, 0.28)},
dWine= {hsv(0.92, 0.80, 0.28)},
black= {hsv(0.04, 0.04, 0.14)},
dGray= {hsv(0.02, 0.05, 0.44)},
gray= {hsv(0.02, 0.05, 0.65)},
lGray= {hsv(0.02, 0.06, 0.86)},
white= {hsv(0.01, 0.02, 0.99)},
xGray= {hsv(0.00, 0.00, 0.35,.8)},
lxGray= {hsv(0.00, 0.00, 0.62,.8)},
dxGray= {hsv(0.00, 0.00, 0.16,.8)},
}
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',
lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine',
dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine',
D='black',dH='dGray',H='gray',lH='lGray',Z='white',
--Remain letter: EIKQTUX
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',
lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine',
dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine',
D='black',dH='dGray',H='gray',lH='lGray',Z='white',
X='xGray',lX='lxGray',dX='dxGray',
--Remain letter: EIKQTUX
}do
COLOR[k]=COLOR[v]
COLOR[k]=COLOR[v]
end
setmetatable(COLOR,{__index=function(_,k)
error("No color: "..tostring(k))
error("No color: "..tostring(k))
end})
do--Random generators
local rnd=math.random
local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'}
local len_list_norm=#list_norm
function COLOR.random_norm()
return COLOR[list_norm[rnd(len_list_norm)]]
end
local rnd=math.random
local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'}
local len_list_norm=#list_norm
function COLOR.random_norm()
return COLOR[list_norm[rnd(len_list_norm)]]
end
local list_bright={'lRed','lFire','lOrange','lYellow','lLime','lJade','lGreen','lAqua','lCyan','lNavy','lSea','lBlue','lViolet','lPurple','lMagenta','lWine'}
local len_list_bright=#list_bright
function COLOR.random_bright()
return COLOR[list_bright[rnd(len_list_bright)]]
end
local list_bright={'lRed','lFire','lOrange','lYellow','lLime','lJade','lGreen','lAqua','lCyan','lNavy','lSea','lBlue','lViolet','lPurple','lMagenta','lWine'}
local len_list_bright=#list_bright
function COLOR.random_bright()
return COLOR[list_bright[rnd(len_list_bright)]]
end
local list_dark={'dRed','dFire','dOrange','dYellow','dLime','dJade','dGreen','dAqua','dCyan','dNavy','dSea','dBlue','dViolet','dPurple','dMagenta','dWine'}
local len_list_dark=#list_dark
function COLOR.random_dark()
return COLOR[list_dark[rnd(len_list_dark)]]
end
local list_dark={'dRed','dFire','dOrange','dYellow','dLime','dJade','dGreen','dAqua','dCyan','dNavy','dSea','dBlue','dViolet','dPurple','dMagenta','dWine'}
local len_list_dark=#list_dark
function COLOR.random_dark()
return COLOR[list_dark[rnd(len_list_dark)]]
end
end
do--Rainbow generators
local sin=math.sin
function COLOR.rainbow(phase)
return
sin(phase)*.4+.6,
sin(phase+2.0944)*.4+.6,
sin(phase-2.0944)*.4+.6
end
function COLOR.rainbow_light(phase)
return
sin(phase)*.2+.7,
sin(phase+2.0944)*.2+.7,
sin(phase-2.0944)*.2+.7
end
function COLOR.rainbow_dark(phase)
return
sin(phase)*.2+.4,
sin(phase+2.0944)*.2+.4,
sin(phase-2.0944)*.2+.4
end
function COLOR.rainbow_gray(phase)
return
sin(phase)*.16+.5,
sin(phase+2.0944)*.16+.5,
sin(phase-2.0944)*.16+.5
end
local sin=math.sin
function COLOR.rainbow(phase,a)
return
sin(phase)*.4+.6,
sin(phase+2.0944)*.4+.6,
sin(phase-2.0944)*.4+.6,
a
end
function COLOR.rainbow_light(phase,a)
return
sin(phase)*.2+.7,
sin(phase+2.0944)*.2+.7,
sin(phase-2.0944)*.2+.7,
a
end
function COLOR.rainbow_dark(phase,a)
return
sin(phase)*.2+.4,
sin(phase+2.0944)*.2+.4,
sin(phase-2.0944)*.2+.4,
a
end
function COLOR.rainbow_gray(phase,a)
return
sin(phase)*.16+.5,
sin(phase+2.0944)*.16+.5,
sin(phase-2.0944)*.16+.5,
a
end
end
return COLOR
return COLOR

View File

@@ -1,72 +0,0 @@
local gc=love.graphics
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=ADRAW.str,
mDraw=ADRAW.draw,
mOutDraw=ADRAW.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,
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
return function(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

View File

@@ -1,50 +0,0 @@
local find=string.find
local tabs={
[0]="",
"\t",
"\t\t",
"\t\t\t",
"\t\t\t\t",
"\t\t\t\t\t",
}
return function(L,t)
local s
if t then
s="{\n"
else
s="return{\n"
t=1
if type(L)~='table'then
return
end
end
local count=1
for k,v in next,L do
local T=type(k)
if T=='number'then
if k==count then
k=""
count=count+1
else
k="["..k.."]="
end
elseif T=='string'then
if find(k,"[^0-9a-zA-Z_]")then
k="[\""..k.."\"]="
else
k=k.."="
end
elseif T=='boolean'then k="["..k.."]="
else error("Error key type!")
end
T=type(v)
if T=='number'then v=tostring(v)
elseif T=='string'then v="\""..v.."\""
elseif T=='table'then v=TABLE.dump(v,t+1)
elseif T=='boolean'then v=tostring(v)
else error("Error data type!")
end
s=s..tabs[t]..k..v..",\n"
end
return s..tabs[t-1].."}"
end

View File

@@ -1,85 +1,105 @@
local fs=love.filesystem
local FILE={}
function FILE.load(name)
if fs.getInfo(name)then
local F=fs.newFile(name)
if F:open'r'then
local s=F:read()
F:close()
if s:sub(1,6)=="return"then
s=loadstring(s)
if s then
setfenv(s,{})
return s()
end
elseif s:sub(1,1)=="["or s:sub(1,1)=="{"then
local res=JSON.decode(s)
if res then
return res
end
else
return s
end
end
MES.new('error',name.." "..text.loadError)
end
function FILE.load(name,args)
if not args then args=''end
if fs.getInfo(name)then
local F=fs.newFile(name)
assert(F:open'r','open error')
local s=F:read()F:close()
local mode=
STRING.sArg(args,'-luaon')and'luaon'or
STRING.sArg(args,'-lua')and'lua'or
STRING.sArg(args,'-json')and'json'or
STRING.sArg(args,'-string')and'string'or
s:sub(1,6)=='return{'and'luaon'or
(s:sub(1,1)=='['and s:sub(-1)==']'or s:sub(1,1)=='{'and s:sub(-1)=='}')and'json'or
'string'
if mode=='luaon'then
local func,err_mes=loadstring(s)
if func then
setfenv(func,{})
local res=func()
return assert(res,'decode error')
else
error('decode error: '..err_mes)
end
elseif mode=='lua'then
local func,err_mes=loadstring(s)
if func then
local res=func()
return assert(res,'run error')
else
error('compile error: '..err_mes)
end
elseif mode=='json'then
local res=JSON.decode(s)
if res then
return res
end
error('decode error')
elseif mode=='string'then
return s
else
error('unknown mode')
end
else
error('no file')
end
end
function FILE.save(data,name,mode)
if not mode then mode=""end
if type(data)=='table'then
if mode:find'l'then
data=TABLE.dump(data)
if not data then
MES.new('error',name.." "..text.saveError.."dump error")
return
end
else
data=JSON.encode(data)
if not data then
MES.new('error',name.." "..text.saveError.."json error")
return
end
end
else
data=tostring(data)
end
function FILE.save(data,name,args)
if not args then args=''end
if STRING.sArg(args,'-d')and fs.getInfo(name)then
error('duplicate')
end
local F=fs.newFile(name)
F:open'w'
local success,mes=F:write(data)
F:flush()F:close()
if not success then
MES.new('error',text.saveError..(mes or"unknown error"))
MES.traceback()
end
return success
if type(data)=='table'then
if STRING.sArg(args,'-luaon')then
data=TABLE.dump(data)
if not data then
error('encode error')
end
else
data=JSON.encode(data)
if not data then
error('encode error')
end
end
else
data=tostring(data)
end
local F=fs.newFile(name)
assert(F:open('w'),'open error')
F:write(data)F:flush()F:close()
end
function FILE.clear(path)
if fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory'then return end
for _,name in next,fs.getDirectoryItems(path)do
name=path..'/'..name
if fs.getRealDirectory(name)==SAVEDIR then
local t=fs.getInfo(name).type
if t=='file'then
fs.remove(name)
end
end
end
if fs.getRealDirectory(path)==SAVEDIR and fs.getInfo(path).type=='directory'then
for _,name in next,fs.getDirectoryItems(path)do
name=path..'/'..name
if fs.getRealDirectory(name)==SAVEDIR then
local t=fs.getInfo(name).type
if t=='file'then
fs.remove(name)
end
end
end
end
end
function FILE.clear_s(path)
if path~=''and(fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory')then return end
for _,name in next,fs.getDirectoryItems(path)do
name=path..'/'..name
if fs.getRealDirectory(name)==SAVEDIR then
local t=fs.getInfo(name).type
if t=='file'then
fs.remove(name)
elseif t=='directory'then
FILE.clear_s(name)
fs.remove(name)
end
end
end
fs.remove(path)
if path==''or(fs.getRealDirectory(path)==SAVEDIR and fs.getInfo(path).type=='directory')then
for _,name in next,fs.getDirectoryItems(path)do
name=path..'/'..name
if fs.getRealDirectory(name)==SAVEDIR then
local t=fs.getInfo(name).type
if t=='file'then
fs.remove(name)
elseif t=='directory'then
FILE.clear_s(name)
fs.remove(name)
end
end
end
fs.remove(path)
end
end
return FILE
return FILE

60
Zframework/font.lua Normal file
View File

@@ -0,0 +1,60 @@
local gc=love.graphics
local set=gc.setFont
local fontFiles,fontCache={},{}
local defaultFont,defaultFallBack
local curFont=false--Current using font object
local FONT={}
function FONT.setDefault(name)defaultFont=name end
function FONT.setFallback(name)defaultFallBack=name end
function FONT.rawget(s)
if not fontCache[s]then
fontCache[s]=gc.setNewFont(s,'light',gc.getDPIScale()*SCR.k*2)
end
return fontCache[s]
end
function FONT.rawset(s)
set(fontCache[s]or FONT.rawget(s))
end
function FONT.load(fonts)
for name,path in next,fonts do
assert(love.filesystem.getInfo(path),STRING.repD("Font file $1($2) not exist!",name,path))
fontFiles[name]=love.filesystem.newFile(path)
fontCache[name]={}
end
FONT.reset()
end
function FONT.get(size,name)
if not name then name=defaultFont end
local f=fontCache[name][size]
if not f then
f=gc.setNewFont(fontFiles[name],size,'light',gc.getDPIScale()*SCR.k*2)
if defaultFallBack and name~=defaultFallBack then
f:setFallbacks(FONT.get(size,defaultFallBack))
end
fontCache[name][size]=f
end
return f
end
function FONT.set(size,name)
if not name then name=defaultFont end
local f=fontCache[name][size]
if f~=curFont then
curFont=f or FONT.get(size,name)
set(curFont)
end
end
function FONT.reset()
for name,cache in next,fontCache do
if type(cache)=='table'then
for size in next,cache do
cache[size]=FONT.get(size,name)
end
else
fontCache[name]=FONT.rawget(name)
end
end
end
return FONT

164
Zframework/gcExtend.lua Normal file
View File

@@ -0,0 +1,164 @@
local gc=love.graphics
local setColor,printf,draw=gc.setColor,gc.printf,gc.draw
local GC={}
function GC.mStr(obj,x,y)printf(obj,x-626,y,1252,'center')end--Printf a string with 'center'
function GC.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end--Simply draw an obj with x=obj:getWidth()/2
function GC.simpY(obj,x,y)draw(obj,x,y-obj:getHeight()*.5)end--Simply draw an obj with y=obj:getWidth()/2
function GC.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end--Draw an obj with x=obj:getWidth()/2
function GC.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end--Draw an obj with y=obj:getWidth()/2
function GC.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end--Draw an obj with both middle X & Y
function GC.outDraw(obj,div,x,y,a,k)
local w,h=obj:getWidth()*.5,obj:getHeight()*.5
draw(obj,x-div,y-div,a,k,nil,w,h)
draw(obj,x-div,y+div,a,k,nil,w,h)
draw(obj,x+div,y-div,a,k,nil,w,h)
draw(obj,x+div,y+div,a,k,nil,w,h)
end
function GC.shadedPrint(str,x,y,mode,d,clr1,clr2)
local w=1280
if mode=='center'then
x=x-w*.5
elseif mode=='right'then
x=x-w
end
if not d then d=1 end
setColor(clr1 or COLOR.D)
printf(str,x-d,y-d,w,mode)
printf(str,x-d,y+d,w,mode)
printf(str,x+d,y-d,w,mode)
printf(str,x+d,y+d,w,mode)
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",
move="translate",
scale="scale",
rotate="rotate",
shear="shear",
clear="clear",
setCL="setColor",
setCM="setColorMask",
setLW="setLineWidth",
setLS="setLineStyle",
setLJ="setLineJoin",
print="print",
rawFT=function(...)FONT.rawset(...)end,
setFT=function(...)FONT.set(...)end,
mText=GC.mStr,
mDraw=GC.draw,
mDrawX=GC.X,
mDrawY=GC.Y,
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,
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,
fRPol=function(...)GC.regularPolygon('fill',...)end,
dRPol=function(...)GC.regularPolygon('line',...)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.clear(1,1,1,0)
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

View File

@@ -1,35 +1,25 @@
local IMG={
getCount=function()return 0 end,
}
local IMG={}
function IMG.init(list)
IMG.init=nil
local count=0
for k,v in next,list do
count=count+1
IMG[k]=v
end
function IMG.getCount()return count end
local function load(skip)
local loaded=0
for k,v in next,list do
if type(v)=='string'then
IMG[k]=love.graphics.newImage('media/image/'..v)
else
for i=1,#v do
v[i]=love.graphics.newImage('media/image/'..v[i])
end
IMG[k]=v
end
loaded=loaded+1
if not skip and loaded~=count then
coroutine.yield()
end
end
IMG.loadOne=nil
IMG.loadAll=nil
end
IMG.init=nil
IMG.loadOne=coroutine.wrap(load)
function IMG.loadAll()load(true)end
setmetatable(IMG,{__index=function(self,name)
if type(list[name])=='table'then
self[name]={}
for i=1,#list[name]do
self[name][i]=love.graphics.newImage(list[name][i])
end
elseif type(list[name])=='string'then
self[name]=love.graphics.newImage(list[name])
else
LOG("No IMG: "..name)
self[name]=PAPER
end
return self[name]
end})
function IMG.loadAll()
for k in next,list do local _=IMG[k]end
IMG.loadAll=nil
end
end
return IMG
return IMG

File diff suppressed because it is too large Load Diff

View File

@@ -29,99 +29,92 @@ local json = {}
-- Encode
-------------------------------------------------------------------------------
local encode
local _encode
local escape_char_map = {
["\\"] = "\\",
["\""] = "\"",
["\b"] = "b",
["\f"] = "f",
["\n"] = "n",
["\r"] = "r",
["\t"] = "t"
["\\"] = "\\",
["\""] = "\"",
["\b"] = "b",
["\f"] = "f",
["\n"] = "n",
["\r"] = "r",
["\t"] = "t"
}
local escape_char_map_inv = {["/"] = "/"}
for k, v in pairs(escape_char_map) do escape_char_map_inv[v] = k end
local function escape_char(c)
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
end
local function encode_nil() return "null" end
local function encode_table(val, stack)
local res = {}
stack = stack or {}
local res = {}
stack = stack or {}
-- Circular reference?
if stack[val] then error("circular reference") end
-- Circular reference?
if stack[val] then error("circular reference") end
stack[val] = true
stack[val] = true
if rawget(val, 1) ~= nil or next(val) == nil then
-- Treat as array -- check keys are valid and it is not sparse
local n = 0
for k in pairs(val) do
if type(k) ~= 'number' then
error("invalid table: mixed or invalid key types")
end
n = n + 1
end
if n ~= #val then error("invalid table: sparse array") end
-- Encode
for _, v in ipairs(val) do ins(res, encode(v, stack)) end
stack[val] = nil
return "[" .. table.concat(res, ",") .. "]"
if rawget(val, 1) ~= nil or next(val) == nil then
-- Treat as array -- check keys are valid and it is not sparse
local n = 0
for k in pairs(val) do
if type(k) ~= 'number' then
error("invalid table: mixed or invalid key types")
end
n = n + 1
end
if n ~= #val then error("invalid table: sparse array") end
-- Encode
for _, v in ipairs(val) do ins(res, _encode(v, stack)) end
stack[val] = nil
return "[" .. table.concat(res, ",") .. "]"
else
-- Treat as an object
for k, v in pairs(val) do
if type(k) ~= 'string' then
error("invalid table: mixed or invalid key types")
end
ins(res, encode(k, stack) .. ":" .. encode(v, stack))
end
stack[val] = nil
return "{" .. table.concat(res, ",") .. "}"
end
else
-- Treat as an object
for k, v in pairs(val) do
if type(k) ~= 'string' then
error("invalid table: mixed or invalid key types")
end
ins(res, _encode(k, stack) .. ":" .. _encode(v, stack))
end
stack[val] = nil
return "{" .. table.concat(res, ",") .. "}"
end
end
local function encode_string(val)
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
end
local function encode_number(val)
-- Check for NaN, -inf and inf
if val ~= val or val <= -math.huge or val >= math.huge then
error("unexpected number value '" .. tostring(val) .. "'")
end
return string.format("%.14g", val)
-- Check for NaN, -inf and inf
if val ~= val or val <= -math.huge or val >= math.huge then
error("unexpected number value '" .. tostring(val) .. "'")
end
return string.format("%.14g", val)
end
local type_func_map = {
['nil'] = encode_nil,
['table'] = encode_table,
['string'] = encode_string,
['number'] = encode_number,
['boolean'] = tostring
['nil'] = encode_nil,
['table'] = encode_table,
['string'] = encode_string,
['number'] = encode_number,
['boolean'] = tostring
}
encode = function(val, stack)
local t = type(val)
local f = type_func_map[t]
if f then return f(val, stack) end
error("unexpected type '" .. t .. "'")
_encode = function(val, stack)
local t = type(val)
local f = type_func_map[t]
if f then return f(val, stack) end
error("unexpected type '" .. t .. "'")
end
function json.encode(val)
local a,b=pcall(encode,val)
if a then
return b
elseif MES then
MES.traceback()
end
end
json.encode=_encode
-------------------------------------------------------------------------------
-- Decode
@@ -130,9 +123,9 @@ end
local parse
local function create_set(...)
local res = {}
for i = 1, select("#", ...) do res[select(i, ...)] = true end
return res
local res = {}
for i = 1, select("#", ...) do res[select(i, ...)] = true end
return res
end
local space_chars = create_set(" ", "\t", "\r", "\n")
@@ -143,213 +136,205 @@ local literals = create_set("true", "false", "null")
local literal_map = {["true"] = true, ["false"] = false, ["null"] = nil}
local function next_char(str, idx, set, negate)
for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end
return #str + 1
for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end
return #str + 1
end
local function decode_error(str, idx, msg)
local line_count = 1
local col_count = 1
for i = 1, idx - 1 do
col_count = col_count + 1
if str:sub(i, i) == "\n" then
line_count = line_count + 1
col_count = 1
end
end
error(string.format("%s at line %d col %d", msg, line_count, col_count))
local line_count = 1
local col_count = 1
for i = 1, idx - 1 do
col_count = col_count + 1
if str:sub(i, i) == "\n" then
line_count = line_count + 1
col_count = 1
end
end
error(string.format("%s at line %d col %d", msg, line_count, col_count))
end
local function codepoint_to_utf8(n)
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
local f = bit.rshift
if n <= 0x7f then
return char(n)
elseif n <= 0x7ff then
return char(f(n, 6) + 192, n % 64 + 128)
elseif n <= 0xffff then
return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128)
elseif n <= 0x10ffff then
return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128)
end
error(string.format("invalid unicode codepoint '%x'", n))
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
local f = bit.rshift
if n <= 0x7f then
return char(n)
elseif n <= 0x7ff then
return char(f(n, 6) + 192, n % 64 + 128)
elseif n <= 0xffff then
return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128)
elseif n <= 0x10ffff then
return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128)
end
error(string.format("invalid unicode codepoint '%x'", n))
end
local function parse_unicode_escape(s)
local n1 = tonumber(s:sub(1, 4), 16)
local n2 = tonumber(s:sub(7, 10), 16)
-- Surrogate pair?
if n2 then
return
codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
else
return codepoint_to_utf8(n1)
end
local n1 = tonumber(s:sub(1, 4), 16)
local n2 = tonumber(s:sub(7, 10), 16)
-- Surrogate pair?
if n2 then
return
codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
else
return codepoint_to_utf8(n1)
end
end
local function parse_string(str, i)
local res = ""
local j = i + 1
local k = j
local res = ""
local j = i + 1
local k = j
while j <= #str do
local x = str:byte(j)
while j <= #str do
local x = str:byte(j)
if x < 32 then
decode_error(str, j, "control character in string")
if x < 32 then
decode_error(str, j, "control character in string")
elseif x == 92 then -- `\`: Escape
res = res .. str:sub(k, j - 1)
j = j + 1
local c = str:sub(j, j)
if c == "u" then
local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or
str:match("^%x%x%x%x", j + 1) or
decode_error(str, j - 1,
"invalid unicode escape in string")
res = res .. parse_unicode_escape(hex)
j = j + #hex
else
if not escape_chars[c] then
decode_error(str, j - 1,
"invalid escape char '" .. c .. "' in string")
end
res = res .. escape_char_map_inv[c]
end
k = j + 1
elseif x == 92 then -- `\`: Escape
res = res .. str:sub(k, j - 1)
j = j + 1
local c = str:sub(j, j)
if c == "u" then
local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or
str:match("^%x%x%x%x", j + 1) or
decode_error(str, j - 1,
"invalid unicode escape in string")
res = res .. parse_unicode_escape(hex)
j = j + #hex
else
if not escape_chars[c] then
decode_error(str, j - 1,
"invalid escape char '" .. c .. "' in string")
end
res = res .. escape_char_map_inv[c]
end
k = j + 1
elseif x == 34 then -- `"`: End of string
res = res .. str:sub(k, j - 1)
return res, j + 1
end
elseif x == 34 then -- `"`: End of string
res = res .. str:sub(k, j - 1)
return res, j + 1
end
j = j + 1
end
j = j + 1
end
decode_error(str, i, "expected closing quote for string")
decode_error(str, i, "expected closing quote for string")
end
local function parse_number(str, i)
local x = next_char(str, i, delim_chars)
local s = str:sub(i, x - 1)
local n = tonumber(s)
if not n then decode_error(str, i, "invalid number '" .. s .. "'") end
return n, x
local x = next_char(str, i, delim_chars)
local s = str:sub(i, x - 1)
local n = tonumber(s)
if not n then decode_error(str, i, "invalid number '" .. s .. "'") end
return n, x
end
local function parse_literal(str, i)
local x = next_char(str, i, delim_chars)
local word = str:sub(i, x - 1)
if not literals[word] then
decode_error(str, i, "invalid literal '" .. word .. "'")
end
return literal_map[word], x
local x = next_char(str, i, delim_chars)
local word = str:sub(i, x - 1)
if not literals[word] then
decode_error(str, i, "invalid literal '" .. word .. "'")
end
return literal_map[word], x
end
local function parse_array(str, i)
local res = {}
local n = 1
i = i + 1
while 1 do
local x
i = next_char(str, i, space_chars, true)
-- Empty / end of array?
if str:sub(i, i) == "]" then
i = i + 1
break
end
-- Read token
x, i = parse(str, i)
res[n] = x
n = n + 1
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "]" then break end
if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
end
return res, i
local res = {}
local n = 1
i = i + 1
while 1 do
local x
i = next_char(str, i, space_chars, true)
-- Empty / end of array?
if str:sub(i, i) == "]" then
i = i + 1
break
end
-- Read token
x, i = parse(str, i)
res[n] = x
n = n + 1
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "]" then break end
if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
end
return res, i
end
local function parse_object(str, i)
local res = {}
i = i + 1
while 1 do
local key, val
i = next_char(str, i, space_chars, true)
-- Empty / end of object?
if str:sub(i, i) == "}" then
i = i + 1
break
end
-- Read key
if str:sub(i, i) ~= '"' then
decode_error(str, i, "expected string for key")
end
key, i = parse(str, i)
-- Read ':' delimiter
i = next_char(str, i, space_chars, true)
if str:sub(i, i) ~= ":" then
decode_error(str, i, "expected ':' after key")
end
i = next_char(str, i + 1, space_chars, true)
-- Read value
val, i = parse(str, i)
-- Set
res[key] = val
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "}" then break end
if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
end
return res, i
local res = {}
i = i + 1
while 1 do
local key, val
i = next_char(str, i, space_chars, true)
-- Empty / end of object?
if str:sub(i, i) == "}" then
i = i + 1
break
end
-- Read key
if str:sub(i, i) ~= '"' then
decode_error(str, i, "expected string for key")
end
key, i = parse(str, i)
-- Read ':' delimiter
i = next_char(str, i, space_chars, true)
if str:sub(i, i) ~= ":" then
decode_error(str, i, "expected ':' after key")
end
i = next_char(str, i + 1, space_chars, true)
-- Read value
val, i = parse(str, i)
-- Set
res[key] = val
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "}" then break end
if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
end
return res, i
end
local char_func_map = {
['"'] = parse_string,
["0"] = parse_number,
["1"] = parse_number,
["2"] = parse_number,
["3"] = parse_number,
["4"] = parse_number,
["5"] = parse_number,
["6"] = parse_number,
["7"] = parse_number,
["8"] = parse_number,
["9"] = parse_number,
["-"] = parse_number,
["t"] = parse_literal,
["f"] = parse_literal,
["n"] = parse_literal,
["["] = parse_array,
["{"] = parse_object
['"'] = parse_string,
["0"] = parse_number,
["1"] = parse_number,
["2"] = parse_number,
["3"] = parse_number,
["4"] = parse_number,
["5"] = parse_number,
["6"] = parse_number,
["7"] = parse_number,
["8"] = parse_number,
["9"] = parse_number,
["-"] = parse_number,
["t"] = parse_literal,
["f"] = parse_literal,
["n"] = parse_literal,
["["] = parse_array,
["{"] = parse_object
}
function parse(str, idx)
local chr = str:sub(idx, idx)
local f = char_func_map[chr]
if f then return f(str, idx) end
decode_error(str, idx, "unexpected character '" .. chr .. "'")
local chr = str:sub(idx, idx)
local f = char_func_map[chr]
if f then return f(str, idx) end
decode_error(str, idx, "unexpected character '" .. chr .. "'")
end
local function decode(str)
if type(str) ~= 'string' then
error("expected argument of type string, got " .. type(str))
end
local res, idx = parse(str, next_char(str, 1, space_chars, true))
idx = next_char(str, idx, space_chars, true)
if idx <= #str then decode_error(str, idx, "trailing garbage") end
return res
end
function json.decode(str)
local a,b=pcall(decode,str)
if a then
return b
elseif MES then
MES.traceback()
end
if type(str) ~= 'string' then
error("expected argument of type string, got " .. type(str))
end
local res, idx = parse(str, next_char(str, 1, space_chars, true))
idx = next_char(str, idx, space_chars, true)
if idx <= #str then decode_error(str, idx, "trailing garbage") end
return res
end
return json
return json

View File

@@ -1,56 +1,57 @@
local LANG={}
function LANG.init(langList,publicText)--Attention, calling this will destory all initializing methods, create a LANG.set()!
local function langFallback(T0,T)
for k,v in next,T0 do
if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
if not T[k]then T[k]={}end
if type(T[k])=='table'then langFallback(v,T[k])end
elseif not T[k]then
T[k]=v
end
end
end
local tipMeta={__call=function(L)return L[math.random(#L)]end}
--ONLY FIRST CALL MAKE SENSE
--Create LANG.get() and LANG.addScene()
function LANG.init(defaultLang,langList,publicText,pretreatFunc)
local function _langFallback(T0,T)
for k,v in next,T0 do
if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
if not T[k]then T[k]={}end
if type(T[k])=='table'then
_langFallback(v,T[k])
end
elseif not T[k]then
T[k]=v
end
end
end
for i=1,#langList do
local L=langList[i]
--Set public text
if publicText then
for _,L in next,langList do
for key,list in next,publicText do L[key]=list end
end
end
--Set public text
for key,list in next,publicText do
L[key]=list
end
--Fallback to default language
for name,L in next,langList do
if name~=defaultLang then
_langFallback(langList[L.fallback or defaultLang],L)
end
end
--Fallback to other language, default zh
if i>1 then
langFallback(langList[L.fallback or 1],L)
end
--Custom pretreatment for each language
if pretreatFunc then
for _,L in next,langList do
pretreatFunc(L)
end
end
--Metatable:__call for table:getTip
if type(rawget(L,'getTip'))=='table'then
setmetatable(L.getTip,tipMeta)
end
end
function LANG.get(l)
if not langList[l]then
LOG("Wrong language: "..tostring(l))
l=defaultLang
end
return langList[l]
end
LANG.init,LANG.setLangList,LANG.setPublicText=nil
function LANG.addScene(name)
for _,L in next,langList do
if L.WidgetText and not L.WidgetText[name]then
L.WidgetText[name]={}
end
end
end
function LANG.set(l)
if text~=langList[l]then
text=langList[l]
WIDGET.setLang(text.WidgetText)
for k,v in next,drawableText do
if text[k]then
v:set(text[k])
end
end
end
end
function LANG.addScene(name)
for i=1,#langList do
if langList[i].WidgetText and not langList[i].WidgetText[name]then
langList[i].WidgetText[name]={back=langList[i].back}
end
end
end
function LANG.init()end
end
return LANG
return LANG

View File

@@ -10,77 +10,77 @@ local shadowMapShader=gc.newShader('Zframework/light/shadowMap.glsl')--Shader fo
local lightRenderShader=gc.newShader('Zframework/light/lightRender.glsl')--Shader for rendering blurred lights and shadows.
local Lights={}--Lightsource objects
local function move(L,x,y)
L.x,L.y=x,y
L.x,L.y=x,y
end
local function setPow(L,pow)
L.size=pow
L.size=pow
end
local function drawLight(L)
local s=L.size
local s=L.size
--Initialization
gc_setCanvas(L.blackCanvas)clear()
gc_setCanvas(L.shadowCanvas)clear()
gc_setCanvas(L.renderCanvas)clear()
lightRenderShader:send('xresolution',s)
shadowMapShader:send('yresolution',s)
--Initialization
gc_setCanvas(L.blackCanvas)clear()
gc_setCanvas(L.shadowCanvas)clear()
gc_setCanvas(L.renderCanvas)clear()
lightRenderShader:send('xresolution',s)
shadowMapShader:send('yresolution',s)
--Get up-left of light
local X=L.x-s*.5
local Y=L.y-s*.5
--Get up-left of light
local X=L.x-s*.5
local Y=L.y-s*.5
--Render solid
gc_translate(-X,-Y)
L.blackCanvas:renderTo(L.blackFn)
gc_translate(X,Y)
--Render solid
gc_translate(-X,-Y)
L.blackCanvas:renderTo(L.blackFn)
gc_translate(X,Y)
--Render shade canvas by solid
gc_setShader(shadowMapShader)
gc_setCanvas(L.shadowCanvas)
gc_draw(L.blackCanvas)
--Render shade canvas by solid
gc_setShader(shadowMapShader)
gc_setCanvas(L.shadowCanvas)
gc_draw(L.blackCanvas)
--Render light canvas by shade
gc_setShader(lightRenderShader)
gc_setCanvas(L.renderCanvas)
gc_draw(L.shadowCanvas,0,0,0,1,s)
--Render light canvas by shade
gc_setShader(lightRenderShader)
gc_setCanvas(L.renderCanvas)
gc_draw(L.shadowCanvas,0,0,0,1,s)
--Ready to final render
gc_setShader()gc_setCanvas()gc.setBlendMode('add')
--Ready to final render
gc_setShader()gc_setCanvas()gc.setBlendMode('add')
--Render to screen
gc_draw(L.renderCanvas,X,Y+s,0,1,-1)
--Render to screen
gc_draw(L.renderCanvas,X,Y+s,0,1,-1)
--Reset
gc.setBlendMode('alpha')
--Reset
gc.setBlendMode('alpha')
end
local LIGHT={}
function LIGHT.draw()
gc_setColor(1,1,1)
for i=1,#Lights do
drawLight(Lights[i])
end
gc_setColor(1,1,1)
for i=1,#Lights do
drawLight(Lights[i])
end
end
function LIGHT.clear()
for i=#Lights,1,-1 do
Lights[i].blackCanvas:release()
Lights[i].shadowCanvas:release()
Lights[i].renderCanvas:release()
Lights[i]=nil
end
for i=1,#Lights do
Lights[i].blackCanvas:release()
Lights[i].shadowCanvas:release()
Lights[i].renderCanvas:release()
Lights[i]=nil
end
end
function LIGHT.add(x,y,radius,solidFunc)
local id=#Lights+1
Lights[id]={
id=id,
x=x,y=y,size=radius,
blackCanvas=gc.newCanvas(radius,radius),--Solid canvas
shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas
renderCanvas=gc.newCanvas(radius,radius),--Light canvas
blackFn=solidFunc,--Solid draw function
local id=#Lights+1
Lights[id]={
id=id,
x=x,y=y,size=radius,
blackCanvas=gc.newCanvas(radius,radius),--Solid canvas
shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas
renderCanvas=gc.newCanvas(radius,radius),--Light canvas
blackFn=solidFunc,--Solid draw function
move=move,
setPow=setPow,
}
move=move,
setPow=setPow,
}
end
return LIGHT
return LIGHT

View File

@@ -2,28 +2,28 @@
extern float xresolution;
// Sample from 1D vis-depth map
float samp(vec2 coord,float r,Image u_texture){
return step(r,Texel(u_texture,coord).r);
return step(r,Texel(u_texture,coord).r);
}
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
// Cartesian to polar, y of 1D sample is always 0
vec2 norm=tex_coords.st*2.-1.;
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
float r=length(norm);
// Cartesian to polar, y of 1D sample is always 0
vec2 norm=tex_coords.st*2.-1.;
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
float r=length(norm);
// Enlarge blur parameter by distance, light scattering simulation
float blur=(1./xresolution)*smoothstep(0.3,1.,r);
// Enlarge blur parameter by distance, light scattering simulation
float blur=(1./xresolution)*smoothstep(0.3,1.,r);
// Simple Gaussian blur
float sum=// Brightness(0~1)
samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1
+samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13
+samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17
// Simple Gaussian blur
float sum=// Brightness(0~1)
samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1
+samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13
+samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17
+samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows.
+samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17
+samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13
+samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1;
+samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows.
+samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17
+samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13
+samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1;
// Multiply the distance to get a soft fading
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
}
// Multiply the distance to get a soft fading
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
}

View File

@@ -1,20 +1,20 @@
#define PI 3.14
extern float yresolution;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
// Iterate through the occluder map's y-axis.
for(float y=0.;y<yresolution;y++){
// Cartesian to polar
// y/yresolution=distance to light source(0~1)
vec2 norm=vec2(tex_coords.s,y/yresolution)*2.-1.;
float theta=PI*1.5+norm.x*PI;
float r=(1.+norm.y)*0.5;
// Iterate through the occluder map's y-axis.
for(float y=0.;y<yresolution;y++){
// Cartesian to polar
// y/yresolution=distance to light source(0~1)
vec2 norm=vec2(tex_coords.s,y/yresolution)*2.-1.;
float theta=PI*1.5+norm.x*PI;
float r=(1.+norm.y)*0.5;
//sample from solid
if(
Texel(tex,(
vec2(-r*sin(theta),-r*cos(theta))*0.5+0.5// Coord of solid sampling
)).a>0.1
)return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent
}
return vec4(1.);// Return max distance 1
}
//sample from solid
if(
Texel(tex,(
vec2(-r*sin(theta),-r*cos(theta))*0.5+0.5// Coord of solid sampling
)).a>0.1
)return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent
}
return vec4(1.);// Return max distance 1
}

View File

@@ -1,42 +0,0 @@
return function(name,libName)
if SYSTEM=='Windows'or SYSTEM=='Linux'then
local r1,r2,r3=pcall(require,libName[SYSTEM])
if r1 and r2 then
return r2
else
MES.new('error',"Cannot load "..name..": "..(r2 or r3))
end
elseif SYSTEM=='Android'then
local fs=love.filesystem
local platform={'arm64-v8a','armeabi-v7a'}
for i=1,#platform do
local soFile,_,_,mes1=fs.read('data','libAndroid/'..platform[i]..'/'..libName.Android)
if soFile then
local success,mes2=fs.write('lib/'..libName.Android,soFile)
if success then
libFunc,mes2=package.loadlib(SAVEDIR..'/lib/'..libName.Android,libName.libFunc)
if libFunc then
MES.new('check',name.." lib loaded")
break
else
MES.new('error',"Cannot load "..name..": "..mes2)
end
else
MES.new('error',("Write %s-%s to saving failed: %s"):format(name,platform[i],mes2))
end
else
MES.new('error',("Read %s-%s to saving failed: %s"):format(name,platform[i],mes1))
end
end
if not libFunc then
MES.new('error',"Cannot load "..name)
return
end
return libFunc()
else
MES.new('error',"No "..name.." for "..SYSTEM)
return
end
return true
end

20
Zframework/log.lua Normal file
View File

@@ -0,0 +1,20 @@
local ins=table.insert
local logs={os.date("Techmino logs %Y/%m/%d %A")}
local function log(message)
ins(logs,os.date("[%H:%M:%S] ")..message)
end
local LOG=setmetatable({logs=logs},{
__call=function(_,message)
print(message)
log(message)
end
})
function LOG.read()
return table.concat(logs,"\n")
end
return LOG

37
Zframework/mathExtend.lua Normal file
View File

@@ -0,0 +1,37 @@
local MATH={}for k,v in next,math do MATH[k]=v end
local rnd=math.random
MATH.tau=2*math.pi
function MATH.sign(a)
return a>0 and 1 or a<0 and -1 or 0
end
function MATH.roll(chance)
return rnd()<(chance or .5)
end
function MATH.coin(a,b)
if rnd()<.5 then
return a
else
return b
end
end
function MATH.interval(v,low,high)
if v<=low then
return low
elseif v>=high then
return high
else
return v
end
end
function MATH.expApproach(a,b,k)
return b+(a-b)*2.718281828459045^-k
end
return MATH

View File

@@ -3,140 +3,146 @@ local gc_push,gc_pop=gc.push,gc.pop
local gc_translate,gc_setColor,gc_draw=gc.translate,gc.setColor,gc.draw
local ins,rem=table.insert,table.remove
local max=math.max
local mesList={}
local mesIcon={
check=DOGC{40,40,
{'setLW',10},
{'setCL',0,0,0},
{'line',4,19,15,30,36,9},
{'setLW',6},
{'setCL',.7,1,.6},
{'line',5,20,15,30,35,10},
},
info=DOGC{40,40,
{'setCL',.2,.25,.85},
{'fCirc',20,20,15},
{'setCL',1,1,1},
{'setLW',2},
{'dCirc',20,20,15},
{'fRect',18,11,4,4},
{'fRect',18,17,4,12},
},
broadcast=DOGC{40,40,
{'setCL',1,1,1},
{'fRect',2,4,36,26,3},
{'fPoly',2,27,2,37,14,25},
{'setCL',.5,.5,.5},
{'fRect',6,11,4,4},{'fRect',14,11,19,4},
{'fRect',6,19,4,4},{'fRect',14,19,19,4},
},
warn=DOGC{40,40,
{'setCL',.95,.83,.4},
{'fPoly',20.5,1,0,38,40,38},
{'setCL',0,0,0},
{'dPoly',20.5,1,0,38,40,38},
{'fRect',17,10,7,18},
{'fRect',17,29,7,7},
{'setCL',1,1,1},
{'fRect',18,11,5,16},
{'fRect',18,30,5,5},
},
error=DOGC{40,40,
{'setCL',.95,.3,.3},
{'fCirc',20,20,19},
{'setCL',0,0,0},
{'dCirc',20,20,19},
{'setLW',6},
{'line',10.2,10.2,29.8,29.8},
{'line',10.2,29.8,29.8,10.2},
{'setLW',4},
{'setCL',1,1,1},
{'line',11,11,29,29},
{'line',11,29,29,11},
},
check=GC.DO{40,40,
{'setLW',10},
{'setCL',0,0,0},
{'line',4,19,15,30,36,9},
{'setLW',6},
{'setCL',.7,1,.6},
{'line',5,20,15,30,35,10},
},
info=GC.DO{40,40,
{'setCL',.2,.25,.85},
{'fCirc',20,20,15},
{'setCL',1,1,1},
{'setLW',2},
{'dCirc',20,20,15},
{'fRect',18,11,4,4},
{'fRect',18,17,4,12},
},
broadcast=GC.DO{40,40,
{'setCL',1,1,1},
{'fRect',2,4,36,26,3},
{'fPoly',2,27,2,37,14,25},
{'setCL',.5,.5,.5},
{'fRect',6,11,4,4,1},{'fRect',14,11,19,4,1},
{'fRect',6,19,4,4,1},{'fRect',14,19,19,4,1},
},
warn=GC.DO{40,40,
{'setCL',.95,.83,.4},
{'fPoly',20.5,1,0,38,40,38},
{'setCL',0,0,0},
{'dPoly',20.5,1,0,38,40,38},
{'fRect',17,10,7,18,2},
{'fRect',17,29,7,7,2},
{'setCL',1,1,1},
{'fRect',18,11,5,16,2},
{'fRect',18,30,5,5,2},
},
error=GC.DO{40,40,
{'setCL',.95,.3,.3},
{'fCirc',20,20,19},
{'setCL',0,0,0},
{'dCirc',20,20,19},
{'setLW',6},
{'line',10.2,10.2,29.8,29.8},
{'line',10.2,29.8,29.8,10.2},
{'setLW',4},
{'setCL',1,1,1},
{'line',11,11,29,29},
{'line',11,29,29,11},
},
music=GC.DO{40,40,
{'setLW',2},
{'dRect',1,3,38,34,3},
{'setLW',4},
{'line',21,26,21,10,28,10},
{'fElps',17,26,6,5},
},
}
local MES={}
local backColors={
check={.3,.6,.3,.7},
broadcast={.3,.3,.6,.8},
warn={.4,.4,.2,.9},
error={.4,.2,.2,.9},
music={.2,.4,.4,.9},
}
function MES.new(icon,str,time)
local backColor={.5,.5,.5,.7}
if type(icon)=='string'then
if icon=='check'then
backColor={.3,.6,.3,.7}
elseif icon=='broadcast'then
backColor={.3,.3,.6,.8}
elseif icon=='warn'then
backColor={.4,.4,.2,.9}
elseif icon=='error'then
backColor={.4,.2,.2,.9}
end
icon=mesIcon[icon]
end
local t=gc.newText(getFont(30),str)
local w=math.max(t:getWidth()+(icon and 45 or 5),200)+20
local h=math.max(t:getHeight(),46)+3
local L={w,h,
{'clear',backColor},
{'setCL',.7,.7,.7},
{'setLW',2},
{'dRect',1,1,w-2,h-2},
{'setCL',1,1,1},
}
if icon then
ins(L,{'draw',icon,4,4,nil,40/icon:getWidth(),40/icon:getHeight()})
end
ins(L,{'draw',t,icon and 50 or 10,2})
local backColor={.5,.5,.5,.7}
if type(icon)=='string'then
backColor=backColors[icon]or backColor
icon=mesIcon[icon]
end
local t=gc.newText(FONT.get(30),str)
local w=math.max(t:getWidth()+(icon and 45 or 5),200)+15
local h=math.max(t:getHeight(),46)+2
local L={w,h,
{'clear',backColor},
{'setCL',.7,.7,.7},
{'setLW',2},
{'dRect',1,1,w-2,h-2},
{'setCL',1,1,1},
}
if icon then
ins(L,{'draw',icon,4,4,nil,40/icon:getWidth(),40/icon:getHeight()})
end
ins(L,{'mDrawY',t,icon and 50 or 10,h/2})
ins(mesList,{
startTime=.5,
endTime=.5,
time=time or 3,
canvas=DOGC(L),
width=w,height=h,
scale=h>400 and 1/math.min(h/400,2.6)or 1
})
ins(mesList,{
startTime=.5,
endTime=.5,
time=time or 3,
canvas=GC.DO(L),
width=w,height=h,
scale=h>400 and 1/math.min(h/400,2.6)or 1
})
end
function MES.update(dt)
for i=#mesList,1,-1 do
local m=mesList[i]
if m.startTime>0 then
m.startTime=m.startTime-dt
elseif m.time>0 then
m.time=m.time-dt
elseif m.endTime>0 then
m.endTime=m.endTime-dt
else
rem(mesList,i)
end
end
for i=#mesList,1,-1 do
local m=mesList[i]
if m.startTime>0 then
m.startTime=max(m.startTime-dt,0)
elseif m.time>0 then
m.time=max(m.time-dt,0)
elseif m.endTime>0 then
m.endTime=m.endTime-dt
else
rem(mesList,i)
end
end
end
function MES.draw()
gc_push('transform')
if #mesList>0 then
gc_translate(SCR.safeX,30)
for i=1,#mesList do
local m=mesList[i]
gc_setColor(1,1,1,2*(m.endTime-m.startTime))
gc_draw(m.canvas,40-80*(m.endTime+m.startTime),0,nil,m.scale)
gc_translate(0,m.height*m.scale+4)
end
end
gc_pop()
gc_push('transform')
if #mesList>0 then
gc_translate(SCR.safeX,30)
for i=1,#mesList do
local m=mesList[i]
gc_setColor(1,1,1,2*(m.endTime-m.startTime))
gc_draw(m.canvas,40-80*(m.endTime+m.startTime),0,nil,m.scale)
gc_translate(0,m.height*m.scale+2)
end
end
gc_pop()
end
function MES.traceback()
local mes=
debug.traceback('',1)
:gsub(': in function',', in')
:gsub(':',' ')
:gsub('\t','')
MES.new('error',mes:sub(
mes:find("\n",2)+1,
mes:find("\n%[C%], in 'xpcall'")
),5)
local mes=
debug.traceback('',1)
:gsub(': in function',', in')
:gsub(':',' ')
:gsub('\t','')
MES.new('error',mes:sub(
mes:find("\n",2)+1,
mes:find("\n%[C%], in 'xpcall'")
),5)
end
return MES
return MES

View File

@@ -2,156 +2,156 @@ local clock=os.clock
local profile={}
local _labeled={} -- function labels
local _defined={} -- function definitions
local _tcalled={} -- time of last call
local _labeled={} -- function labels
local _defined={} -- function definitions
local _tcalled={} -- time of last call
local _telapsed={}-- total execution time
local _ncalls={} -- number of calls
local _ncalls={} -- number of calls
local _internal={}-- list of internal profiler functions
local getInfo=debug.getinfo
function profile.hooker(event,line,info)
info=info or getInfo(2,'fnS')
local f=info.func
if _internal[f]then return end-- ignore the profiler itself
if info.name then _labeled[f]=info.name end-- get the function name if available
-- find the line definition
if not _defined[f]then
_defined[f]=info.short_src..":"..info.linedefined
_ncalls[f]=0
_telapsed[f]=0
end
if _tcalled[f]then
local dt=clock()-_tcalled[f]
_telapsed[f]=_telapsed[f]+dt
_tcalled[f]=nil
end
if event=='tail call'then
local prev=getInfo(3,'fnS')
profile.hooker('return',line,prev)
profile.hooker('call',line,info)
elseif event=='call'then
_tcalled[f]=clock()
else
_ncalls[f]=_ncalls[f]+1
end
info=info or getInfo(2,'fnS')
local f=info.func
if _internal[f]then return end-- ignore the profiler itself
if info.name then _labeled[f]=info.name end-- get the function name if available
-- find the line definition
if not _defined[f]then
_defined[f]=info.short_src..":"..info.linedefined
_ncalls[f]=0
_telapsed[f]=0
end
if _tcalled[f]then
local dt=clock()-_tcalled[f]
_telapsed[f]=_telapsed[f]+dt
_tcalled[f]=nil
end
if event=='tail call'then
local prev=getInfo(3,'fnS')
profile.hooker('return',line,prev)
profile.hooker('call',line,info)
elseif event=='call'then
_tcalled[f]=clock()
else
_ncalls[f]=_ncalls[f]+1
end
end
--- Starts collecting data.
function profile.start()
if jit then
jit.off()
jit.flush()
end
debug.sethook(profile.hooker,'cr')
if jit then
jit.off()
jit.flush()
end
debug.sethook(profile.hooker,'cr')
end
--- Stops collecting data.
function profile.stop()
debug.sethook()
for f in next,_tcalled do
local dt=clock()-_tcalled[f]
_telapsed[f]=_telapsed[f]+dt
_tcalled[f]=nil
end
-- merge closures
local lookup={}
for f,d in next,_defined do
local id=(_labeled[f]or"?")..d
local f2=lookup[id]
if f2 then
_ncalls[f2]=_ncalls[f2]+(_ncalls[f]or 0)
_telapsed[f2]=_telapsed[f2]+(_telapsed[f]or 0)
_defined[f],_labeled[f]=nil,nil
_ncalls[f],_telapsed[f]=nil,nil
else
lookup[id]=f
end
end
collectgarbage()
debug.sethook()
for f in next,_tcalled do
local dt=clock()-_tcalled[f]
_telapsed[f]=_telapsed[f]+dt
_tcalled[f]=nil
end
-- merge closures
local lookup={}
for f,d in next,_defined do
local id=(_labeled[f]or"?")..d
local f2=lookup[id]
if f2 then
_ncalls[f2]=_ncalls[f2]+(_ncalls[f]or 0)
_telapsed[f2]=_telapsed[f2]+(_telapsed[f]or 0)
_defined[f],_labeled[f]=nil,nil
_ncalls[f],_telapsed[f]=nil,nil
else
lookup[id]=f
end
end
collectgarbage()
end
--- Resets all collected data.
function profile.reset()
for f in next,_ncalls do
_ncalls[f]=0
_telapsed[f]=0
_tcalled[f]=nil
end
collectgarbage()
for f in next,_ncalls do
_ncalls[f]=0
_telapsed[f]=0
_tcalled[f]=nil
end
collectgarbage()
end
local function _comp(a,b)
local dt=_telapsed[b]-_telapsed[a]
return dt==0 and _ncalls[b]<_ncalls[a]or dt<0
local dt=_telapsed[b]-_telapsed[a]
return dt==0 and _ncalls[b]<_ncalls[a]or dt<0
end
--- Iterates all functions that have been called since the profile was started.
function profile.query(limit)
local t={}
for f,n in next,_ncalls do
if n>0 then
t[#t+1]=f
end
end
table.sort(t,_comp)
local t={}
for f,n in next,_ncalls do
if n>0 then
t[#t+1]=f
end
end
table.sort(t,_comp)
if limit then while #t>limit do table.remove(t)end end
if limit then while #t>limit do table.remove(t)end end
for i,f in ipairs(t)do
local dt=0
if _tcalled[f]then
dt=clock()-_tcalled[f]
end
t[i]={i,_labeled[f]or"?",math.floor((_telapsed[f]+dt)*1e6)/1e6,_ncalls[f],_defined[f]}
end
return t
for i,f in ipairs(t)do
local dt=0
if _tcalled[f]then
dt=clock()-_tcalled[f]
end
t[i]={i,_labeled[f]or"?",math.floor((_telapsed[f]+dt)*1e6)/1e6,_ncalls[f],_defined[f]}
end
return t
end
local cols={3,20,8,6,32}
function profile.report(n)
local out={}
local report=profile.query(n)
for i,row in ipairs(report)do
for j=1,5 do
local s=tostring(row[j])
local l1,l2=#s,cols[j]
if l1<l2 then
s=s..(" "):rep(l2-l1)
elseif l1>l2 then
s=s:sub(l1-l2+1,l1)
end
row[j]=s
end
out[i]=table.concat(row," | ")
end
local out={}
local report=profile.query(n)
for i,row in ipairs(report)do
for j=1,5 do
local s=tostring(row[j])
local l1,l2=#s,cols[j]
if l1<l2 then
s=s..(" "):rep(l2-l1)
elseif l1>l2 then
s=s:sub(l1-l2+1,l1)
end
row[j]=s
end
out[i]=table.concat(row," | ")
end
local row=" +-----+----------------------+----------+--------+----------------------------------+ \n"
local col=" | # | Function | Time | Calls | Code | \n"
local sz=row..col..row
if #out>0 then
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
end
return "\n"..sz..row
local row=" +-----+----------------------+----------+--------+----------------------------------+ \n"
local col=" | # | Function | Time | Calls | Code | \n"
local sz=row..col..row
if #out>0 then
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
end
return "\n"..sz..row
end
local switch=false
function profile.switch()
switch=not switch
if not switch then
profile.stop()
love.system.setClipboardText(PROFILE.report())
PROFILE.reset()
return false
else
PROFILE.start()
return true
end
switch=not switch
if not switch then
profile.stop()
love.system.setClipboardText(profile.report())
profile.reset()
return false
else
profile.start()
return true
end
end
-- store all internal profiler functions
for _,v in next,profile do
_internal[v]=type(v)=='function'
_internal[v]=type(v)=='function'
end
return profile

33
Zframework/require.lua Normal file
View File

@@ -0,0 +1,33 @@
package.cpath=package.cpath..';'..SAVEDIR..'/lib/lib?.so;'..'?.dylib'
local loaded={}
return function(libName)
local require=require
if love.system.getOS()=='OS X'then
require=package.loadlib(libName..'.dylib','luaopen_'..libName)
libname=nil
elseif love.system.getOS()=='Android'then
if not loaded[libName]then
local platform=(function()
local p=io.popen('uname -m')
local arch=p:read('*a'):lower()
p:close()
if arch:find('v8')or arch:find('64')then
return'arm64-v8a'
else
return'armeabi-v7a'
end
end)()
love.filesystem.write(
'lib/libCCloader.so',
love.filesystem.read('data','libAndroid/'..platform..'/libCCloader.so')
)
loaded[libName]=true
end
end
local success,res=pcall(require,libName)
if success and res then
return res
else
MES.new('error',"Cannot load "..libName..": "..res)
end
end

View File

@@ -1,177 +1,210 @@
local gc=love.graphics
local abs=math.abs
local SCR=SCR
local scenes={}
local SCN={
cur='NULL',--Current scene name
swapping=false,--If Swapping
stat={
tar=false, --Swapping target
style=false,--Swapping style
mid=false, --Loading point
time=false, --Full swap time
draw=false, --Swap draw func
},
stack={},--Scene stack
mainTouchID=nil, --First touching ID(userdata)
cur='NULL', --Current scene name
swapping=false, --If Swapping
stat={
tar=false, --Swapping target
style=false, --Swapping style
changeTime=false,--Loading point
time=false, --Full swap time
draw=false, --Swap draw func
},
stack={},--Scene stack
prev=false,
args={},--Arguments from previous scene
scenes=scenes,
scenes=scenes,
--Events
update=false,
draw=false,
mouseClick=false,
touchClick=false,
mouseDown=false,
mouseMove=false,
mouseUp=false,
wheelMoved=false,
touchDown=false,
touchUp=false,
touchMove=false,
keyDown=false,
keyUp=false,
gamepadDown=false,
gamepadUp=false,
fileDropped=false,
directoryDropped=false,
resize=false,
socketRead=false,
--Events
update=false,
draw=false,
mouseClick=false,
touchClick=false,
mouseDown=false,
mouseMove=false,
mouseUp=false,
wheelMoved=false,
touchDown=false,
touchUp=false,
touchMove=false,
keyDown=false,
keyUp=false,
gamepadDown=false,
gamepadUp=false,
fileDropped=false,
directoryDropped=false,
resize=false,
socketRead=false,
}--Scene datas, returned
function SCN.add(name,scene)
scenes[name]=scene
if scene.widgetList then
setmetatable(scene.widgetList,WIDGET.indexMeta)
end
scenes[name]=scene
if scene.widgetList then
setmetatable(scene.widgetList,WIDGET.indexMeta)
end
end
function SCN.swapUpdate()
local S=SCN.stat
S.time=S.time-1
if S.time==S.mid then
SCN.init(S.tar,SCN.cur)
collectgarbage()
--Scene swapped this moment
end
if S.time==0 then
SCN.swapping=false
end
function SCN.swapUpdate(dt)
local S=SCN.stat
S.time=S.time-dt
if S.time<S.changeTime and S.time+dt>=S.changeTime then
--Scene swapped this frame
SCN.prev=SCN.cur
SCN.init(S.tar)
SCN.mainTouchID=nil
end
if S.time<0 then
SCN.swapping=false
end
end
function SCN.init(s,org)
love.keyboard.setTextInput(false)
function SCN.init(s)
love.keyboard.setTextInput(false)
local S=scenes[s]
SCN.cur=s
local S=scenes[s]
SCN.cur=s
WIDGET.setScrollHeight(S.widgetScrollHeight)
WIDGET.setWidgetList(S.widgetList)
SCN.sceneInit=S.sceneInit
SCN.sceneBack=S.sceneBack
SCN.update=S.update
SCN.draw=S.draw
SCN.mouseClick=S.mouseClick
SCN.touchClick=S.touchClick
SCN.mouseDown=S.mouseDown
SCN.mouseMove=S.mouseMove
SCN.mouseUp=S.mouseUp
SCN.wheelMoved=S.wheelMoved
SCN.touchDown=S.touchDown
SCN.touchUp=S.touchUp
SCN.touchMove=S.touchMove
SCN.keyDown=S.keyDown
SCN.keyUp=S.keyUp
SCN.gamepadDown=S.gamepadDown
SCN.gamepadUp=S.gamepadUp
SCN.fileDropped=S.fileDropped
SCN.directoryDropped=S.directoryDropped
SCN.resize=S.resize
SCN.socketRead=S.socketRead
if S.sceneInit then S.sceneInit(org)end
WIDGET.setScrollHeight(S.widgetScrollHeight)
WIDGET.setWidgetList(S.widgetList)
SCN.sceneInit=S.sceneInit
SCN.sceneBack=S.sceneBack
SCN.mouseDown=S.mouseDown
SCN.mouseMove=S.mouseMove
SCN.mouseUp=S.mouseUp
SCN.mouseClick=S.mouseClick
SCN.wheelMoved=S.wheelMoved
SCN.touchDown=S.touchDown
SCN.touchUp=S.touchUp
SCN.touchMove=S.touchMove
SCN.touchClick=S.touchClick
SCN.keyDown=S.keyDown
SCN.keyUp=S.keyUp
SCN.gamepadDown=S.gamepadDown
SCN.gamepadUp=S.gamepadUp
SCN.fileDropped=S.fileDropped
SCN.directoryDropped=S.directoryDropped
SCN.resize=S.resize
SCN.socketRead=S.socketRead
SCN.update=S.update
SCN.draw=S.draw
if S.sceneInit then
S.sceneInit()
end
end
function SCN.push(tar,style)
if not SCN.swapping then
local m=#SCN.stack
SCN.stack[m+1]=tar or SCN.cur
SCN.stack[m+2]=style or'fade'
end
if not SCN.swapping then
local m=#SCN.stack
SCN.stack[m+1]=tar or SCN.cur
SCN.stack[m+2]=style or'fade'
end
end
function SCN.pop()
local _=SCN.stack
_[#_],_[#_-1]=nil
local s=SCN.stack
s[#s],s[#s-1]=nil
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)
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)
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)
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)
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)
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)
t=t/30
gc.setColor(.1,.1,.1,1-abs(t-.5))
t=t*t*(2*t-3)*2+1
gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h)
end},
none={
duration=0,changeTime=0,
draw=function()end
},
flash={
duration=.16,changeTime=.08,
draw=function()gc.clear(1,1,1)end
},
fade={
duration=.5,changeTime=.25,
draw=function(t)
t=t>.25 and 2-t*4 or t*4
gc.setColor(0,0,0,t)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
end
},
fade_togame={
duration=2,changeTime=.5,
draw=function(t)
t=t>.5 and(2-t)/1.5 or t*.5
gc.setColor(0,0,0,t)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
end
},
slowFade={
duration=3,changeTime=1.5,
draw=function(t)
t=t>1.5 and (3-t)/1.5 or t/1.5
gc.setColor(0,0,0,t)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
end
},
swipeL={
duration=.5,changeTime=.25,
draw=function(t)
t=t*2
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={
duration=.5,changeTime=.25,
draw=function(t)
t=t*2
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={
duration=.5,changeTime=.25,
draw=function(t)
t=t*2
gc.setColor(.1,.1,.1,1-abs(t-.5))
t=t*t*(2*t-3)*2+1
gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h)
end
},
}--Scene swapping animations
function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
if scenes[tar]then
if not SCN.swapping and tar~=SCN.cur then
if not style then style='fade'end
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]
end
else
MES.new('warn',"No Scene: "..tar)
end
function SCN.swapTo(tar,style,...)--Parallel scene swapping, cannot back
if scenes[tar]then
if not SCN.swapping and tar~=SCN.cur then
style=style or'fade'
SCN.swapping=true
SCN.args={...}
local S=SCN.stat
S.tar,S.style=tar,style
S.time=swap[style].duration
S.changeTime=swap[style].changeTime
S.draw=swap[style].draw
end
else
MES.new('warn',"No Scene: "..tar)
end
end
function SCN.go(tar,style)--Normal scene swapping, can back
if scenes[tar]then
SCN.push()
SCN.swapTo(tar,style)
else
MES.new('warn',"No Scene: "..tar)
end
function SCN.go(tar,style,...)--Normal scene swapping, can back
if scenes[tar]then
SCN.push()
SCN.swapTo(tar,style,...)
else
MES.new('warn',"No Scene: "..tar)
end
end
function SCN.back()
if SCN.swapping then return end
function SCN.back(...)
if SCN.swapping then return end
--Leave scene
if SCN.sceneBack then SCN.sceneBack()end
--Leave scene
if SCN.sceneBack then
SCN.sceneBack()
end
--Poll&Back to previous Scene
local m=#SCN.stack
if m>0 then
SCN.swapTo(SCN.stack[m-1],SCN.stack[m])
SCN.stack[m],SCN.stack[m-1]=nil
end
--Poll&Back to previous Scene
local m=#SCN.stack
if m>0 then
SCN.swapTo(SCN.stack[m-1],SCN.stack[m],...)
SCN.stack[m],SCN.stack[m-1]=nil
end
end
return SCN
return SCN

View File

@@ -1,73 +1,73 @@
local SCR={
w0=1280,h0=720, --Default Screen Size
x=0,y=0, --Up-left Coord on screen
cx=0,cy=0, --Center Coord on screen (Center X/Y)
ex=0,ey=0, --Down-right Coord on screen (End X/Y)
w=0,h=0, --Fullscreen w/h for graphic functions
W=0,H=0, --Fullscreen w/h for shader
safeX=0,safeY=0,--Safe area
safeW=0,safeH=0,--Safe area
rad=0, --Radius
k=1, --Scale size
dpi=1, --DPI from gc.getDPIScale()
w0=1280,h0=720, --Default Screen Size
x=0,y=0, --Up-left Coord on screen
cx=0,cy=0, --Center Coord on screen (Center X/Y)
ex=0,ey=0, --Down-right Coord on screen (End X/Y)
w=0,h=0, --Fullscreen w/h for graphic functions
W=0,H=0, --Fullscreen w/h for shader
safeX=0,safeY=0,--Safe area
safeW=0,safeH=0,--Safe area
rad=0, --Radius
k=1, --Scale size
dpi=1, --DPI from gc.getDPIScale()
--Screen transformation objects
origin=love.math.newTransform(),
xOy=love.math.newTransform(),
xOy_m=love.math.newTransform(),
xOy_ul=love.math.newTransform(),
xOy_u=love.math.newTransform(),
xOy_ur=love.math.newTransform(),
xOy_l=love.math.newTransform(),
xOy_r=love.math.newTransform(),
xOy_dl=love.math.newTransform(),
xOy_d=love.math.newTransform(),
xOy_dr=love.math.newTransform(),
--Screen transformation objects
origin=love.math.newTransform(),
xOy=love.math.newTransform(),
xOy_m=love.math.newTransform(),
xOy_ul=love.math.newTransform(),
xOy_u=love.math.newTransform(),
xOy_ur=love.math.newTransform(),
xOy_l=love.math.newTransform(),
xOy_r=love.math.newTransform(),
xOy_dl=love.math.newTransform(),
xOy_d=love.math.newTransform(),
xOy_dr=love.math.newTransform(),
}
function SCR.setSize(w,h)
SCR.w0,SCR.h0=w,h
SCR.w0,SCR.h0=w,h
end
function SCR.resize(w,h)
SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale()
SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi
SCR.r=h/w
SCR.rad=(w^2+h^2)^.5
SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale()
SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi
SCR.r=h/w
SCR.rad=(w^2+h^2)^.5
SCR.x,SCR.y=0,0
if SCR.r>=SCR.h0/SCR.w0 then
SCR.k=w/SCR.w0
SCR.y=(h-SCR.h0*SCR.k)/2
else
SCR.k=h/SCR.h0
SCR.x=(w-SCR.w0*SCR.k)/2
end
SCR.cx,SCR.cy=SCR.w/2,SCR.h/2
SCR.ex,SCR.ey=SCR.w-SCR.x,SCR.h-SCR.y
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
SCR.x,SCR.y=0,0
if SCR.r>=SCR.h0/SCR.w0 then
SCR.k=w/SCR.w0
SCR.y=(h-SCR.h0*SCR.k)/2
else
SCR.k=h/SCR.h0
SCR.x=(w-SCR.w0*SCR.k)/2
end
SCR.cx,SCR.cy=SCR.w/2,SCR.h/2
SCR.ex,SCR.ey=SCR.w-SCR.x,SCR.h-SCR.y
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
SCR.origin:setTransformation(0,0)
SCR.xOy:setTransformation(SCR.x,SCR.y,0,SCR.k)
SCR.xOy_m:setTransformation(w/2,h/2,0,SCR.k)
SCR.xOy_ul:setTransformation(0,0,0,SCR.k)
SCR.xOy_u:setTransformation(w/2,0,0,SCR.k)
SCR.xOy_ur:setTransformation(w,0,0,SCR.k)
SCR.xOy_l:setTransformation(0,h/2,0,SCR.k)
SCR.xOy_r:setTransformation(w,h/2,0,SCR.k)
SCR.xOy_dl:setTransformation(0,h,0,SCR.k)
SCR.xOy_d:setTransformation(w/2,h,0,SCR.k)
SCR.xOy_dr:setTransformation(w,h,0,SCR.k)
SCR.origin:setTransformation(0,0)
SCR.xOy:setTransformation(SCR.x,SCR.y,0,SCR.k)
SCR.xOy_m:setTransformation(w/2,h/2,0,SCR.k)
SCR.xOy_ul:setTransformation(0,0,0,SCR.k)
SCR.xOy_u:setTransformation(w/2,0,0,SCR.k)
SCR.xOy_ur:setTransformation(w,0,0,SCR.k)
SCR.xOy_l:setTransformation(0,h/2,0,SCR.k)
SCR.xOy_r:setTransformation(w,h/2,0,SCR.k)
SCR.xOy_dl:setTransformation(0,h,0,SCR.k)
SCR.xOy_d:setTransformation(w/2,h,0,SCR.k)
SCR.xOy_dr:setTransformation(w,h,0,SCR.k)
end
function SCR.info()
return{
("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0),
("x,y : %d, %d"):format(SCR.x,SCR.y),
("cx,cy : %d, %d"):format(SCR.cx,SCR.cy),
("ex,ey : %d, %d"):format(SCR.ex,SCR.ey),
("w,h : %d, %d"):format(SCR.w,SCR.h),
("W,H : %d, %d"):format(SCR.W,SCR.H),
("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY),
("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH),
("k,dpi,rad : %.2f, %d, %.2f"):format(SCR.k,SCR.dpi,SCR.rad),
}
return{
("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0),
("x,y : %d, %d"):format(SCR.x,SCR.y),
("cx,cy : %d, %d"):format(SCR.cx,SCR.cy),
("ex,ey : %d, %d"):format(SCR.ex,SCR.ey),
("w,h : %d, %d"):format(SCR.w,SCR.h),
("W,H : %d, %d"):format(SCR.W,SCR.H),
("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY),
("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH),
("k,dpi,rad : %.2f, %d, %.2f"):format(SCR.k,SCR.dpi,SCR.rad),
}
end
return SCR
return SCR

View File

@@ -1,38 +0,0 @@
local gc=love.graphics
local newFont=gc.setNewFont
local setNewFont=gc.setFont
local fontCache,currentFontSize={}
if love.filesystem.getInfo('font.ttf')then
local fontData=love.filesystem.newFile('font.ttf')
function setFont(s)
if s~=currentFontSize then
if not fontCache[s]then
fontCache[s]=newFont(fontData,s)
end
setNewFont(fontCache[s])
currentFontSize=s
end
end
function getFont(s)
if not fontCache[s]then
fontCache[s]=newFont(fontData,s)
end
return fontCache[s]
end
else
function setFont(s)
if s~=currentFontSize then
if not fontCache[s]then
fontCache[s]=newFont(s)
end
setNewFont(fontCache[s])
currentFontSize=s
end
end
function getFont(s)
if not fontCache[s]then
fontCache[s]=newFont(s)
end
return fontCache[s]
end
end

View File

@@ -1,93 +1,170 @@
local SFX={
getCount=function()return 0 end,
fieldPlay=NULL,
play=NULL,
fplay=NULL,
reset=NULL,
local type,rem=type,table.remove
local int,rnd=math.floor,math.random
local interval=MATH.interval
local sfxList={}
local packSetting={}
local Sources={}
local volume=1
local stereo=1
local noteVal={
C=1,c=1,
D=3,d=3,
E=5,e=5,
F=6,f=6,
G=8,g=8,
A=10,a=10,
B=12,b=12,
}
function SFX.init(list)
SFX.init=nil
local rem=table.remove
local Sources={}
local count=#list function SFX.getCount()return count end
local function load(skip)
for i=1,count do
local N='media/SFX/'..list[i]..'.ogg'
if love.filesystem.getInfo(N)then
Sources[list[i]]={love.audio.newSource(N,'static')}
else
MES.new('warn',"No SFX file: "..N,.1)
end
if not skip and i~=count then
coroutine.yield()
end
end
SFX.loadOne=nil
function SFX.play(s,vol,pos)
if SETTING.sfx==0 or vol==0 then return end
local S=Sources[s]--Source list
if not S then return end
local n=1
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[1]:clone()
S[n]:seek(0)
break
end
end
S=S[n]--AU_SRC
if S:getChannelCount()==1 then
if pos then
pos=pos*SETTING.stereo
S:setPosition(pos,1-pos^2,0)
else
S:setPosition(0,0,0)
end
end
S:setVolume(((vol or 1)*SETTING.sfx)^1.626)
S:play()
end
function SFX.fplay(s,vol,pos)
local S=Sources[s]--Source list
if not S then return end
local n=1
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[1]:clone()
S[n]:seek(0)
break
end
end
S=S[n]--AU_SRC
if S:getChannelCount()==1 then
if pos then
pos=pos*SETTING.stereo
S:setPosition(pos,1-pos^2,0)
else
S:setPosition(0,0,0)
end
end
S:setVolume(vol^1.626)
S:play()
end
function SFX.reset()
for _,L in next,Sources do
if type(L)=='table'then
for i=#L,1,-1 do
if not L[i]:isPlaying()then
rem(L,i)
end
end
end
end
end
end
SFX.loadOne=coroutine.wrap(load)
function SFX.loadAll()load(true)end
local noteName={'C','C#','D','D#','E','F','F#','G','G#','A','A#','B'}
local function _getTuneHeight(tune)
local octave=tonumber(tune:sub(-1,-1))
if octave then
local tuneHeight=noteVal[tune:sub(1,1)]
if tuneHeight then
tuneHeight=tuneHeight+(octave-1)*12
local s=tune:sub(2,2)
if s=='s'or s=='#'then
tuneHeight=tuneHeight+1
elseif s=='f'or s=='b'then
tuneHeight=tuneHeight-1
end
return tuneHeight
end
end
end
return SFX
local SFX={}
function SFX.init(list)
assert(type(list)=='table',"Initialize SFX lib with a list of filenames!")
for i=1,#list do table.insert(sfxList,list[i])end
end
function SFX.load(path)
local c=0
local missing=0
for i=1,#sfxList do
local fullPath=path..sfxList[i]..'.ogg'
if love.filesystem.getInfo(fullPath)then
if Sources[sfxList[i]]then
for j=1,#Sources[sfxList[i]]do
Sources[sfxList[i]][j]:release()
end
end
Sources[sfxList[i]]={love.audio.newSource(fullPath,'static')}
c=c+1
else
LOG("No SFX: "..sfxList[i]..'.ogg',.1)
missing=missing+1
end
end
LOG(c.."/"..#sfxList.." SFX files loaded")
LOG(missing.." SFX files missing")
if missing>0 then
MES.new('info',missing.." SFX files missing")
end
collectgarbage()
end
function SFX.loadSample(pack)
assert(type(pack)=='table',"Usage: SFX.loadsample([table])")
assert(pack.name,"No field: name")
assert(pack.path,"No field: path")
local num=1
while love.filesystem.getInfo(pack.path..'/'..num..'.ogg')do
Sources[pack.name..num]={love.audio.newSource(pack.path..'/'..num..'.ogg','static')}
num=num+1
end
local base=(_getTuneHeight(pack.base)or 37)-1
local top=base+num-1
packSetting[pack.name]={base=base,top=top}
LOG((num-1).." "..pack.name.." samples loaded")
end
function SFX.getCount()
return #sfxList
end
function SFX.setVol(v)
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
volume=v
end
function SFX.setStereo(v)
assert(type(v)=='number'and v>=0 and v<=1,'Wrong stereo')
stereo=v
end
function SFX.getNoteName(note)
if note<1 then
return'---'
else
note=note-1
local octave=int(note/12)+1
return noteName[note%12+1]..octave
end
end
function SFX.playSample(pack,...)--vol-1, sampSet1, vol-2, sampSet2
if ... then
local arg={...}
local vol
for i=1,#arg do
local a=arg[i]
if type(a)=='number'and a<=1 then
vol=a
else
local base=packSetting[pack].base
local top=packSetting[pack].top
local tune=type(a)=='string'and _getTuneHeight(a)or a--Absolute tune in number
local playTune=tune+rnd(-2,2)
if playTune<=base then--Too low notes
playTune=base+1
elseif playTune>top then--Too high notes
playTune=top
end
SFX.play(pack..playTune-base,vol,nil,tune-playTune)
end
end
end
end
local function _play(name,vol,pos,pitch)
if volume==0 or vol==0 then return end
local S=Sources[name]--Source list
if not S then return end
local n=1
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[1]:clone()
S[n]:seek(0)
break
end
end
S=S[n]--AU_SRC
if S:getChannelCount()==1 then
if pos then
pos=interval(pos,-1,1)*stereo
S:setPosition(pos,1-pos^2,0)
else
S:setPosition(0,0,0)
end
end
S:setVolume(vol^1.626)
S:setPitch(pitch and 1.0594630943592953^pitch or 1)
S:play()
end
SFX.fplay=_play--Play sounds without apply module's volume setting
function SFX.play(name,vol,pos,pitch)
_play(name,(vol or 1)*volume,pos,pitch)
end
function SFX.reset()
for _,L in next,Sources do
if type(L)=='table'then
for i=#L,1,-1 do
if not L[i]:isPlaying()then
rem(L,i)
end
end
end
end
end
return SFX

View File

@@ -1,116 +1,231 @@
local data=love.data
local STRING={}
local assert,tostring,tonumber=assert,tostring,tonumber
local int,format=math.floor,string.format
local find,sub,upper=string.find,string.sub,string.upper
local find,sub,gsub,upper=string.find,string.sub,string.gsub,string.upper
local char,byte=string.char,string.byte
--"Replace dollars", replace all $n with ...
function STRING.repD(str,...)
local l={...}
for i=#l,1,-1 do
str=gsub(str,'$'..i,l[i])
end
return str
end
--"Scan arg", scan if str has the arg (format of str is like "-json -q", arg is like "-q")
function STRING.sArg(str,switch)
if find(str.." ",switch.." ")then
return true
end
end
do--function STRING.shiftChar(c)
local shiftMap={
['1']='!',['2']='@',['3']='#',['4']='$',['5']='%',
['6']='^',['7']='&',['8']='*',['9']='(',['0']=')',
['`']='~',['-']='_',['=']='+',
['[']='{',[']']='}',['\\']='|',
[';']=':',['\'']='"',
[',']='<',['.']='>',['/']='?',
}
function STRING.shiftChar(c)
return shiftMap[c]or upper(c)
end
local shiftMap={
['1']='!',['2']='@',['3']='#',['4']='$',['5']='%',
['6']='^',['7']='&',['8']='*',['9']='(',['0']=')',
['`']='~',['-']='_',['=']='+',
['[']='{',[']']='}',['\\']='|',
[';']=':',['\'']='"',
[',']='<',['.']='>',['/']='?',
}
function STRING.shiftChar(c)
return shiftMap[c]or upper(c)
end
end
function STRING.trim(s)
if not s:find("%S")then return""end
s=s:sub((s:find("%S"))):reverse()
return s:sub((s:find("%S"))):reverse()
if not s:find("%S")then return""end
s=s:sub((s:find("%S"))):reverse()
return s:sub((s:find("%S"))):reverse()
end
function STRING.split(s,sep,regex)
local L={}
local p1,p2=1--start,target
if regex then
while p1<=#s do
p2=find(s,sep,p1)or #s+1
L[#L+1]=sub(s,p1,p2-1)
p1=p2+#sep
end
else
while p1<=#s do
p2=find(s,sep,p1,true)or #s+1
L[#L+1]=sub(s,p1,p2-1)
p1=p2+#sep
end
end
return L
local L={}
local p1,p2=1--start,target
if regex then
while p1<=#s do
p2=find(s,sep,p1)or #s+1
L[#L+1]=sub(s,p1,p2-1)
p1=p2+#sep
end
else
while p1<=#s do
p2=find(s,sep,p1,true)or #s+1
L[#L+1]=sub(s,p1,p2-1)
p1=p2+#sep
end
end
return L
end
function STRING.simpEmailCheck(e)
e=STRING.split(e,"@")
if #e~=2 then return false end
if e[1]:sub(-1)=="."or e[2]:sub(-1)=="."then return false end
local e1,e2=STRING.split(e[1],"."),STRING.split(e[2],".")
if #e1*#e2==0 then return false end
for _,v in next,e1 do if #v==0 then return false end end
for _,v in next,e2 do if #v==0 then return false end end
return true
e=STRING.split(e,"@")
if #e~=2 then return false end
if e[1]:sub(-1)=="."or e[2]:sub(-1)=="."then return false end
local e1,e2=STRING.split(e[1],"."),STRING.split(e[2],".")
if #e1*#e2==0 then return false end
for _,v in next,e1 do if #v==0 then return false end end
for _,v in next,e2 do if #v==0 then return false end end
return true
end
function STRING.time(s)
if s<60 then
return format("%.3f\"",s)
elseif s<3600 then
return format("%d'%05.2f\"",int(s/60),s%60)
else
local h=int(s/3600)
return format("%d:%.2d'%05.2f\"",h,int(s/60%60),s%60)
end
function STRING.time_simp(t)
return format("%02d:%02d",int(t/60),int(t%60))
end
function STRING.time(t)
if t<60 then
return format("%.3f\"",t)
elseif t<3600 then
return format("%d'%05.2f\"",int(t/60),int(t%60*100)/100)
else
return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),int(t%60*100)/100)
end
end
function STRING.UTF8(n)--Simple utf8 coding
assert(type(n)=='number',"Wrong type ("..type(n)..")")
assert(n>=0 and n<2^31,"Out of range ("..n..")")
if n<2^7 then return char(n)
elseif n<2^11 then return char(192+int(n/2^06),128+n%2^6)
elseif n<2^16 then return char(224+int(n/2^12),128+int(n/2^06)%2^6,128+n%2^6)
elseif n<2^21 then return char(240+int(n/2^18),128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
elseif n<2^26 then return char(248+int(n/2^24),128+int(n/2^18)%2^6,128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
elseif n<2^31 then return char(252+int(n/2^30),128+int(n/2^24)%2^6,128+int(n/2^18)%2^6,128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
end
end
do--function STRING.bigInt(t)
local lg=math.log10
local units={"","K","M","B","T","Qa","Qt","Sx","Sp","Oc","No"}
local preUnits={"","U","D","T","Qa","Qt","Sx","Sp","O","N"}
local secUnits={"Dc","Vg","Tg","Qd","Qi","Se","St","Og","Nn","Ce"}--Ce is next-level unit, but DcCe is not used so used here
for _,preU in next,preUnits do for _,secU in next,secUnits do table.insert(units,preU..secU)end end
function STRING.bigInt(t)
if t<1000 then
return tostring(t)
elseif t~=1e999 then
local e=int(lg(t)/3)
return(t/10^(e*3))..units[e+1]
else
return"INF"
end
end
end
function STRING.hexColor(str)--[LOW PERFORMENCE]
assert(type(str)=='string')
if str:sub(1,1)=="#"then str=str:sub(2)end
assert(#str<=8)
local r=(tonumber(str:sub(1,2),16)or 0)/255
local g=(tonumber(str:sub(3,4),16)or 0)/255
local b=(tonumber(str:sub(5,6),16)or 0)/255
local a=(tonumber(str:sub(7,8),16)or 255)/255
return r,g,b,a
end
do--function STRING.urlEncode(s)
local rshift=bit.rshift
local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}
function STRING.urlEncode(s)
local out=""
for i=1,#s do
if s:sub(i,i):match("[a-zA-Z0-9]")then
out=out..s:sub(i,i)
else
local b=s:byte(i)
out=out.."%"..b16[rshift(b,4)]..b16[b%16]
end
end
return out
end
local rshift=bit.rshift
local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}
function STRING.urlEncode(s)
local out=""
for i=1,#s do
if s:sub(i,i):match("[a-zA-Z0-9]")then
out=out..s:sub(i,i)
else
local b=s:byte(i)
out=out.."%"..b16[rshift(b,4)]..b16[b%16]
end
end
return out
end
end
function STRING.vcsEncrypt(text,key)
local keyLen=#key
local result=""
local buffer=""
for i=0,#text-1 do
buffer=buffer..char((byte(text,i+1)-32+byte(key,i%keyLen+1))%95+32)
if #buffer==26 then
result=result..buffer
buffer=""
end
end
return result..buffer
end
function STRING.vcsDecrypt(text,key)
local keyLen=#key
local result=""
local buffer=""
for i=0,#text-1 do
buffer=buffer..char((byte(text,i+1)-32-byte(key,i%keyLen+1))%95+32)
if #buffer==26 then
result=result..buffer
buffer=""
end
end
return result..buffer
end
function STRING.digezt(text)--Not powerful hash, just protect the original text
local out={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
local seed=26
for i=1,#text do
local c=byte(text,i)
seed=(seed+c)%26
c=c+seed
local pos=c*i%16
local step=(c+i)%4+1
local times=2+(c%6)
for _=1,times do
out[pos+1]=(out[pos+1]+c)%256
pos=(pos+step)%16
end
end
local result=""
for i=1,16 do result=result..char(out[i])end
return result
end
function STRING.readLine(str)
local p=str:find("\n")
return str:sub(1,p-1),str:sub(p+1)
local p=str:find("\n")
if p then
return str:sub(1,p-1),str:sub(p+1)
else
return str,""
end
end
function STRING.readChars(str,n)
return sub(str,1,n),sub(str,n+1)
end
function STRING.packBin(s)
return data.encode('string','base64',data.compress('string','zlib',s))
return data.encode('string','base64',data.compress('string','zlib',s))
end
function STRING.unpackBin(str)
local res
res,str=pcall(data.decode,'string','base64',str)
if not res then return end
res,str=pcall(data.decompress,'string','zlib',str)
if res then return str end
local res
res,str=pcall(data.decode,'string','base64',str)
if not res then return end
res,str=pcall(data.decompress,'string','zlib',str)
if res then return str end
end
function STRING.packText(s)
return data.encode('string','base64',data.compress('string','gzip',s))
return data.encode('string','base64',data.compress('string','gzip',s))
end
function STRING.unpackText(str)
local res
res,str=pcall(data.decode,'string','base64',str)
if not res then return end
res,str=pcall(data.decompress,'string','gzip',str)
if res then return str end
local res
res,str=pcall(data.decode,'string','base64',str)
if not res then return end
res,str=pcall(data.decompress,'string','gzip',str)
if res then return str end
end
function STRING.packTable(t)
return STRING.packText(JSON.encode(t))
return STRING.packText(JSON.encode(t))
end
function STRING.unpackTable(t)
return JSON.decode(STRING.unpackText(t))
return JSON.decode(STRING.unpackText(t))
end
return STRING
return STRING

View File

@@ -3,204 +3,203 @@ local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
local gc_draw,gc_line=gc.draw,gc.line
local gc_rectangle,gc_circle=gc.rectangle,gc.circle
local sin,cos=math.sin,math.cos
local max,min=math.max,math.min
local rnd=math.random
local ins,rem=table.insert,table.remove
local fx={}
local function normUpdate(S,dt)
S.t=S.t+dt*S.rate
return S.t>1
local function _normUpdate(S,dt)
S.t=S.t+dt*S.rate
return S.t>1
end
local FXupdate={}
function FXupdate.badge(S,dt)
S.t=S.t+dt
if S.t<.2 then
S.x,S.y=S.x1-14,S.y1-14
elseif S.t<.8 then
local t=((S.t-.2)*1.6667)
t=(3-2*t)*t*t
S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14
else
S.x,S.y=S.x2-14,S.y2-14
end
return S.t>=1
S.t=S.t+dt
if S.t<.2 then
S.x,S.y=S.x1-14,S.y1-14
elseif S.t<.8 then
local t=((S.t-.2)*1.6667)
t=(3-2*t)*t*t
S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14
else
S.x,S.y=S.x2-14,S.y2-14
end
return S.t>=1
end
FXupdate.attack=normUpdate
FXupdate.tap=normUpdate
FXupdate.ripple=normUpdate
FXupdate.rectRipple=normUpdate
FXupdate.shade=normUpdate
FXupdate.attack=_normUpdate
FXupdate.tap=_normUpdate
FXupdate.ripple=_normUpdate
FXupdate.rectRipple=_normUpdate
FXupdate.shade=_normUpdate
function FXupdate.cell(S,dt)
if S.vx then
S.x=S.x+S.vx*S.rate
S.y=S.y+S.vy*S.rate
if S.ax then
S.vx=S.vx+S.ax*S.rate
S.vy=S.vy+S.ay*S.rate
end
end
S.t=S.t+dt*S.rate
return S.t>1
if S.vx then
S.x=S.x+S.vx*S.rate
S.y=S.y+S.vy*S.rate
if S.ax then
S.vx=S.vx+S.ax*S.rate
S.vy=S.vy+S.ay*S.rate
end
end
S.t=S.t+dt*S.rate
return S.t>1
end
FXupdate.line=normUpdate
FXupdate.line=_normUpdate
local FXdraw={}
function FXdraw.badge(S)
gc_setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6)
gc_draw(IMG.badgeIcon,S.x,S.y)
gc_setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6)
gc_draw(IMG.badgeIcon,S.x,S.y)
end
function FXdraw.attack(S)
gc_setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1))
gc_setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1))
gc_setLineWidth(S.wid)
local t1,t2=max(5*S.t-4,0),min(S.t*4,1)
gc_line(
S.x1*(1-t1)+S.x2*t1,
S.y1*(1-t1)+S.y2*t1,
S.x1*(1-t2)+S.x2*t2,
S.y1*(1-t2)+S.y2*t2
)
gc_setLineWidth(S.wid)
local t1,t2=max(5*S.t-4,0),min(S.t*4,1)
gc_line(
S.x1*(1-t1)+S.x2*t1,
S.y1*(1-t1)+S.y2*t1,
S.x1*(1-t2)+S.x2*t2,
S.y1*(1-t2)+S.y2*t2
)
gc_setLineWidth(S.wid*.6)
t1,t2=max(4*S.t-3,0),min(S.t*5,1)
gc_line(
S.x1*(1-t1)+S.x2*t1,
S.y1*(1-t1)+S.y2*t1,
S.x1*(1-t2)+S.x2*t2,
S.y1*(1-t2)+S.y2*t2
)
gc_setLineWidth(S.wid*.6)
t1,t2=max(4*S.t-3,0),min(S.t*5,1)
gc_line(
S.x1*(1-t1)+S.x2*t1,
S.y1*(1-t1)+S.y2*t1,
S.x1*(1-t2)+S.x2*t2,
S.y1*(1-t2)+S.y2*t2
)
end
function FXdraw.tap(S)
local t=S.t
gc_setColor(1,1,1,(1-t)*.4)
gc_circle('fill',S.x,S.y,30*(1-t)^.5)
local t=S.t
gc_setColor(1,1,1,(1-t)*.4)
gc_circle('fill',S.x,S.y,30*(1-t)^.5)
end
function FXdraw.ripple(S)
local t=S.t
gc_setLineWidth(2)
gc_setColor(1,1,1,1-t)
gc_circle('line',S.x,S.y,t*(2-t)*S.r)
local t=S.t
gc_setLineWidth(2)
gc_setColor(1,1,1,1-t)
gc_circle('line',S.x,S.y,t*(2-t)*S.r)
end
function FXdraw.rectRipple(S)
gc_setLineWidth(6)
gc_setColor(1,1,1,1-S.t)
local r=(10*S.t)^1.2
gc_rectangle('line',S.x-r,S.y-r,S.w+2*r,S.h+2*r)
gc_setLineWidth(6)
gc_setColor(1,1,1,1-S.t)
local r=(10*S.t)^1.2
gc_rectangle('line',S.x-r,S.y-r,S.w+2*r,S.h+2*r)
end
function FXdraw.shade(S)
gc_setColor(S.r,S.g,S.b,1-S.t)
gc_rectangle('fill',S.x,S.y,S.w,S.h,2)
gc_setColor(S.r,S.g,S.b,1-S.t)
gc_rectangle('fill',S.x,S.y,S.w,S.h,2)
end
function FXdraw.cell(S)
gc_setColor(1,1,1,1-S.t)
gc_draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
gc_setColor(1,1,1,1-S.t)
gc_draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
end
function FXdraw.line(S)
gc_setColor(1,1,1,S.a*(1-S.t))
gc_line(S.x1,S.y1,S.x2,S.y2)
gc_setColor(1,1,1,S.a*(1-S.t))
gc_line(S.x1,S.y1,S.x2,S.y2)
end
local SYSFX={}
function SYSFX.update(dt)
for i=#fx,1,-1 do
if fx[i]:update(dt)then
rem(fx,i)
end
end
for i=#fx,1,-1 do
if fx[i]:update(dt)then
rem(fx,i)
end
end
end
function SYSFX.draw()
for i=1,#fx do
fx[i]:draw()
end
for i=1,#fx do
fx[i]:draw()
end
end
function SYSFX.newBadge(x1,y1,x2,y2)
ins(fx,{
update=FXupdate.badge,
draw=FXdraw.badge,
t=0,
x=x1,y=y1,
x1=x1,y1=y1,
x2=x2,y2=y2,
})
ins(fx,{
update=FXupdate.badge,
draw=FXdraw.badge,
t=0,
x=x1,y=y1,
x1=x1,y1=y1,
x2=x2,y2=y2,
})
end
function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
ins(fx,{
update=FXupdate.attack,
draw=FXdraw.attack,
t=0,
rate=rate,
x1=x1,y1=y1,--Start pos
x2=x2,y2=y2,--End pos
wid=wid,--Line width
r=r,g=g,b=b,a=a,
})
ins(fx,{
update=FXupdate.attack,
draw=FXdraw.attack,
t=0,
rate=rate,
x1=x1,y1=y1,--Start pos
x2=x2,y2=y2,--End pos
wid=wid,--Line width
r=r,g=g,b=b,a=a,
})
end
function SYSFX.newTap(rate,x,y)
local T=
{
update=FXupdate.tap,
draw=FXdraw.tap,
t=0,
rate=rate,
x=x,y=y,
}
ins(fx,T)
local T=
{
update=FXupdate.tap,
draw=FXdraw.tap,
t=0,
rate=rate,
x=x,y=y,
}
ins(fx,T)
end
function SYSFX.newRipple(rate,x,y,r)
ins(fx,{
update=FXupdate.ripple,
draw=FXdraw.ripple,
t=0,
rate=rate,
x=x,y=y,r=r,
})
ins(fx,{
update=FXupdate.ripple,
draw=FXdraw.ripple,
t=0,
rate=rate,
x=x,y=y,r=r,
})
end
function SYSFX.newRectRipple(rate,x,y,w,h)
ins(fx,{
update=FXupdate.rectRipple,
draw=FXdraw.rectRipple,
t=0,
rate=rate,
x=x,y=y,w=w,h=h,
})
ins(fx,{
update=FXupdate.rectRipple,
draw=FXdraw.rectRipple,
t=0,
rate=rate,
x=x,y=y,w=w,h=h,
})
end
function SYSFX.newShade(rate,x,y,w,h,r,g,b)
ins(fx,{
update=FXupdate.shade,
draw=FXdraw.shade,
t=0,
rate=rate,
x=x,y=y,w=w,h=h,
r=r or 1,g=g or 1,b=b or 1,
})
ins(fx,{
update=FXupdate.shade,
draw=FXdraw.shade,
t=0,
rate=rate,
x=x,y=y,w=w,h=h,
r=r or 1,g=g or 1,b=b or 1,
})
end
function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
ins(fx,{
update=FXupdate.cell,
draw=FXdraw.cell,
t=0,
rate=rate*(.9+rnd()*.2),
image=image,size=size,
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
x=x,y=y,
vx=vx,vy=vy,
ax=ax,ay=ay,
})
ins(fx,{
update=FXupdate.cell,
draw=FXdraw.cell,
t=0,
rate=rate*(.9+rnd()*.2),
image=image,size=size,
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
x=x,y=y,
vx=vx,vy=vy,
ax=ax,ay=ay,
})
end
function SYSFX.newLine(rate,x1,y1,x2,y2,r,g,b,a)
ins(fx,{
update=FXupdate.line,
draw=FXdraw.line,
t=0,
rate=rate,
x1=x1 or 0,y1=y1 or 0,
x2=x2 or x1 or 1280,y2=y2 or y1 or 720,
r=r or 1,g=g or 1,b=b or 1,a=a or 1,
})
ins(fx,{
update=FXupdate.line,
draw=FXdraw.line,
t=0,
rate=rate,
x1=x1 or 0,y1=y1 or 0,
x2=x2 or x1 or 1280,y2=y2 or y1 or 720,
r=r or 1,g=g or 1,b=b or 1,a=a or 1,
})
end
return SYSFX
return SYSFX

View File

@@ -1,190 +1,255 @@
local find=string.find
local rem=table.remove
local next,type=next,type
local TABLE={}
--Get a new filled table
function TABLE.new(val,count)
local L={}
for i=1,count do
L[i]=val
end
return L
local L={}
for i=1,count do
L[i]=val
end
return L
end
--Get a copy of [1~#] elements
function TABLE.shift(org)
local L={}
for i=1,#org do
if type(org[i])~='table'then
L[i]=org[i]
else
L[i]=TABLE.shift(org[i])
end
end
return L
function TABLE.shift(org,depth)
if not depth then depth=1e99 end
local L={}
for i=1,#org do
if type(org[i])=='table'and depth>0 then
L[i]=TABLE.shift(org[i],depth-1)
else
L[i]=org[i]
end
end
return L
end
--Get a full copy of a table
function TABLE.copy(org)
local L={}
for k,v in next,org do
if type(v)~='table'then
L[k]=v
else
L[k]=TABLE.copy(v)
end
end
return L
--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'and depth>0 then
L[k]=TABLE.copy(v,depth-1)
else
L[k]=v
end
end
return L
end
--For all things in new if same type in base, push to old
--For all things in new, push to old
function TABLE.cover(new,old)
for k,v in next,new do
old[k]=v
end
end
--For all things in new, push to old
function TABLE.coverR(new,old)
for k,v in next,new do
if type(v)=='table'and type(old[k])=='table'then
TABLE.coverR(v,old[k])
else
old[k]=v
end
end
end
--For all things in new if same type in old, push to old
function TABLE.update(new,old)
for k,v in next,new do
if type(v)==type(old[k])then
if type(v)=='table'then
TABLE.update(v,old[k])
else
old[k]=v
end
end
end
for k,v in next,new do
if type(v)==type(old[k])then
if type(v)=='table'then
TABLE.update(v,old[k])
else
old[k]=v
end
end
end
end
--For all things in new if no val in base, push to old
--For all things in new if no val in old, push to old
function TABLE.complete(new,old)
for k,v in next,new do
if type(v)=='table'then
if old[k]==nil then old[k]={}end
TABLE.complete(v,old[k])
elseif old[k]==nil then
old[k]=v
end
end
for k,v in next,new do
if type(v)=='table'then
if old[k]==nil then old[k]={}end
TABLE.complete(v,old[k])
elseif old[k]==nil then
old[k]=v
end
end
end
--Remove positive integer index of table
--Remove [1~#] of table
function TABLE.cut(G)
for i=#G,1,-1 do
G[i]=nil
end
for i=1,#G do
G[i]=nil
end
end
--Clear table
function TABLE.clear(G)
for k in next,G do
G[k]=nil
end
for k in next,G do
G[k]=nil
end
end
--Remove duplicated value of [1~#]
function TABLE.trimDuplicate(org)
local cache={}
for i=1,#org,-1 do
if cache[org[i]]then
rem(org,i)
else
cache[org[i]]=true
end
end
end
--Discard duplicated value
function TABLE.remDuplicate(org)
local cache={}
for k,v in next,org do
if cache[v]then
org[k]=nil
else
cache[v]=true
end
end
end
--Reverse [1~#]
function TABLE.reverse(org)
local l=#org
for i=1,math.floor(l/2)do
org[i],org[l+1-i]=org[l+1-i],org[i]
end
end
--------------------------
--Find value in [1~#]
function TABLE.find(t,val)
for i=1,#t do if t[i]==val then return i end end
for i=1,#t do if t[i]==val then return i end end
end
--Return next value of [1~#] (by value)
function TABLE.next(t,val)
for i=1,#t do if t[i]==val then return t[i%#t+1]end end
end
--------------------------
--Find value in whole table
function TABLE.search(t,val)
for k,v in next,t do if v==val then return k end end
for k,v in next,t do if v==val then return k end end
end
--Re-index string value of a table
function TABLE.reIndex(org)
for k,v in next,org do
if type(v)=='string'then
org[k]=org[v]
end
end
for k,v in next,org do
if type(v)=='string'then
org[k]=org[v]
end
end
end
--------------------------
--Dump a simple lua table
do--function TABLE.dump(L,t)
local find=string.find
local tabs={
[0]="",
"\t",
"\t\t",
"\t\t\t",
"\t\t\t\t",
"\t\t\t\t\t",
}
local function dump(L,t)
local s
if t then
s="{\n"
else
s="return{\n"
t=1
if type(L)~='table'then
return
end
end
local count=1
for k,v in next,L do
local T=type(k)
if T=='number'then
if k==count then
k=""
count=count+1
else
k="["..k.."]="
end
elseif T=='string'then
if find(k,"[^0-9a-zA-Z_]")then
k="[\""..k.."\"]="
else
k=k.."="
end
elseif T=='boolean'then k="["..k.."]="
else error("Error key type!")
end
T=type(v)
if T=='number'then v=tostring(v)
elseif T=='string'then v="\""..v.."\""
elseif T=='table'then v=dump(v,t+1)
elseif T=='boolean'then v=tostring(v)
else error("Error data type!")
end
s=s..tabs[t]..k..v..",\n"
end
return s..tabs[t-1].."}"
end
TABLE.dump=dump
local tabs={
[0]="",
"\t",
"\t\t",
"\t\t\t",
"\t\t\t\t",
"\t\t\t\t\t",
}
local function dump(L,t)
local s
if t then
s="{\n"
else
s="return{\n"
t=1
if type(L)~='table'then
return
end
end
local count=1
for k,v in next,L do
local T=type(k)
if T=='number'then
if k==count then
k=""
count=count+1
else
k="["..k.."]="
end
elseif T=='string'then
if find(k,"[^0-9a-zA-Z_]")then
k="[\""..k.."\"]="
else
k=k.."="
end
elseif T=='boolean'then k="["..k.."]="
else error("Error key type!")
end
T=type(v)
if T=='number'then v=tostring(v)
elseif T=='string'then v="\""..v.."\""
elseif T=='table'then v=dump(v,t+1)
elseif T=='boolean'then v=tostring(v)
else error("Error data type!")
end
s=s..tabs[t]..k..v..",\n"
end
return s..tabs[t-1].."}"
end
TABLE.dump=dump
end
--Dump a simple lua table (no whitespaces)
do--function TABLE.dumpDeflate(L,t)
local find=string.find
local function dump(L)
local s="return{"
if type(L)~='table'then return end
local count=1
for k,v in next,L do
local T=type(k)
if T=='number'then
if k==count then
k=""
count=count+1
else
k="["..k.."]="
end
elseif T=='string'then
if find(k,"[^0-9a-zA-Z_]")then
k="[\""..k.."\"]="
else
k=k.."="
end
elseif T=='boolean'then k="["..k.."]="
else error("Error key type!")
end
T=type(v)
if T=='number'then v=tostring(v)
elseif T=='string'then v="\""..v.."\""
elseif T=='table'then v=dump(v)
elseif T=='boolean'then v=tostring(v)
else error("Error data type!")
end
end
return s.."}"
end
TABLE.dumpDeflate=dump
local function dump(L)
local s="return{"
if type(L)~='table'then return end
local count=1
for k,v in next,L do
local T=type(k)
if T=='number'then
if k==count then
k=""
count=count+1
else
k="["..k.."]="
end
elseif T=='string'then
if find(k,"[^0-9a-zA-Z_]")then
k="[\""..k.."\"]="
else
k=k.."="
end
elseif T=='boolean'then k="["..k.."]="
else error("Error key type!")
end
T=type(v)
if T=='number'then v=tostring(v)
elseif T=='string'then v="\""..v.."\""
elseif T=='table'then v=dump(v)
elseif T=='boolean'then v=tostring(v)
else error("Error data type!")
end
end
return s.."}"
end
TABLE.dumpDeflate=dump
end
return TABLE
return TABLE

View File

@@ -4,48 +4,53 @@ local tasks={}
local TASK={}
function TASK.getCount()
return #tasks
return #tasks
end
function TASK.update()
for i=#tasks,1,-1 do
local T=tasks[i]
if status(T.thread)=='dead'then
rem(tasks,i)
else
assert(resume(T.thread))
end
end
local trigFrame=0
function TASK.update(dt)
trigFrame=trigFrame+dt*60
while trigFrame>=1 do
for i=#tasks,1,-1 do
local T=tasks[i]
if status(T.thread)=='dead'then
rem(tasks,i)
else
assert(resume(T.thread))
end
end
trigFrame=trigFrame-1
end
end
function TASK.new(code,...)
local thread=coroutine.create(code)
resume(thread,...)
if status(thread)~='dead'then
tasks[#tasks+1]={
thread=thread,
code=code,
args={...},
}
end
local thread=coroutine.create(code)
assert(resume(thread,...))
if status(thread)~='dead'then
tasks[#tasks+1]={
thread=thread,
code=code,
args={...},
}
end
end
function TASK.removeTask_code(code)
for i=#tasks,1,-1 do
if tasks[i].code==code then
rem(tasks,i)
end
end
for i=#tasks,1,-1 do
if tasks[i].code==code then
rem(tasks,i)
end
end
end
function TASK.removeTask_iterate(func,...)
for i=#tasks,1,-1 do
if func(tasks[i],...)then
rem(tasks,i)
end
end
for i=#tasks,1,-1 do
if func(tasks[i],...)then
rem(tasks,i)
end
end
end
function TASK.clear()
local i=#tasks
while i>0 do
tasks[i]=nil
i=i-1
end
local i=#tasks
while i>0 do
tasks[i]=nil
i=i-1
end
end
return TASK
return TASK

12
Zframework/test.lua Normal file
View File

@@ -0,0 +1,12 @@
local TEST={}
--Wait for the scene swapping animation to finish
function TEST.yieldUntilNextScene()
while SCN.swapping do YIELD()end
end
function TEST.yieldN(frames)
for _=1,frames do YIELD()end
end
return TEST

View File

@@ -1,129 +1,153 @@
local gc=love.graphics
local gc_getColor,gc_setColor,gc_push,gc_pop=gc.getColor,gc.setColor,gc.push,gc.pop
local gc_translate,gc_scale,gc_rotate,gc_shear=gc.translate,gc.scale,gc.rotate,gc.shear
local getColor,setColor=gc.getColor,gc.setColor
local int,rnd=math.floor,math.random
local ins,rem=table.insert,table.remove
local setFont,mStr=setFont,mStr
local draw=gc.draw
local texts={}
local textFX={}
function textFX.appear(t)
mStr(t.text,t.x,t.y-t.font*.7)
draw(
t.text,t.x,t.y,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.sudden(t)
gc_setColor(1,1,1,1-t.c)
mStr(t.text,t.x,t.y-t.font*.7)
setColor(1,1,1,1-t.c)
draw(
t.text,t.x,t.y,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.fly(t)
mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7)
draw(
t.text,t.x+(t.c-.5)^3*300,t.y,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.stretch(t)
gc_push('transform')
gc_translate(t.x,t.y)
if t.c<.3 then gc_scale((.3-t.c)*1.6+1,1)end
mStr(t.text,0,-t.font*.7)
gc_pop()
draw(
t.text,t.x,t.y,
nil,
t.c<.3 and(.3-t.c)*1.6+1 or 1,1,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.drive(t)
gc_push('transform')
gc_translate(t.x,t.y)
if t.c<.3 then gc_shear((.3-t.c)*2,0)end
mStr(t.text,0,-t.font*.7)
gc_pop()
draw(
t.text,t.x,t.y,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5,
t.c<.3 and(.3-t.c)*2 or 0,0
)
end
function textFX.spin(t)
gc_push('transform')
gc_translate(t.x,t.y)
if t.c<.3 then
gc_rotate((.3-t.c)^2*4)
elseif t.c>.8 then
gc_rotate((t.c-.8)^2*-4)
end
mStr(t.text,0,-t.font*.7)
gc_pop()
draw(
t.text,t.x,t.y,
t.c<.3 and(.3-t.c)^2*4 or t.c<.8 and 0 or(t.c-.8)^2*-4,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.flicker(t)
local _,_,_,T=gc_getColor()
gc_setColor(1,1,1,T*(rnd()+.5))
mStr(t.text,t.x,t.y-t.font*.7)
local _,_,_,T=getColor()
setColor(1,1,1,T*(rnd()+.5))
draw(
t.text,t.x,t.y,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.zoomout(t)
gc_push('transform')
local k=t.c^.5*.1+1
gc_translate(t.x,t.y)
gc_scale(k,k)
mStr(t.text,0,-t.font*.7)
gc_pop()
draw(
t.text,t.x,t.y,
nil,
t.c^.5*.1+1,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.beat(t)
gc_push('transform')
gc_translate(t.x,t.y)
if t.c<.3 then
local k=1.3-t.c^2/.3
gc_scale(k,k)
end
mStr(t.text,0,-t.font*.7)
gc_pop()
local k=t.c<.3 and 1.3-t.c^2/.3 or 1
draw(
t.text,t.x,t.y,
nil,
k,k,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
function textFX.score(t)
local _,_,_,T=gc_getColor()
gc_setColor(1,1,1,T*.5)
mStr(t.text,t.x,t.y-t.font*.7-t.c^.2*50)
local _,_,_,T=getColor()
setColor(1,1,1,T*.5)
draw(
t.text,t.x,t.y-0-t.c^.2*50,
nil,
nil,nil,
t.text:getWidth()*.5,t.text:getHeight()*.5
)
end
local TEXT={}
function TEXT.clear()
texts={}
texts={}
end
function TEXT.show(text,x,y,font,style,spd,stop)
ins(texts,{
c=0, --Timer
text=text, --String
x=x or 0, --X
y=y or 0, --Y
font=int(font/5)*5 or 40, --Font
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
stop=stop, --Stop time(sustained text)
draw=textFX[style or'appear']or error("unavailable type:"..style), --Draw method
})
ins(texts,{
c=0, --Timer
text=gc.newText(FONT.get(int(font/5)*5 or 40),text), --String
x=x or 0, --X
y=y or 0, --Y
spd=(spd or 1), --Timing speed(1=last 1 sec)
stop=stop, --Stop time(sustained text)
draw=assert(textFX[style or'appear'],"no text type:"..style),--Draw method
})
end
function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.show(), but only return text object, need manual management
return{
c=0,
text=text,
x=x or 0,
y=y or 0,
font=int(font/5)*5 or 40,
spd=(spd or 1)/60,
stop=stop,
draw=textFX[style or'appear']or error("unavailable type:"..style),
}
return{
c=0,
text=gc.newText(FONT.get(int(font/5)*5 or 40),text),
x=x or 0,
y=y or 0,
spd=(spd or 1),
stop=stop,
draw=textFX[style or'appear']or error("unavailable type:"..style),
}
end
function TEXT.update(list)
if not list then list=texts end
for i=#list,1,-1 do
local t=list[i]
t.c=t.c+t.spd
if t.stop then
if t.c>t.stop then
t.c=t.stop
end
end
if t.c>1 then
rem(list,i)
end
end
function TEXT.update(dt,list)
if not list then
list=texts
end
for i=#list,1,-1 do
local t=list[i]
t.c=t.c+t.spd*dt
if t.stop then
if t.c>t.stop then
t.c=t.stop
end
end
if t.c>1 then
rem(list,i)
end
end
end
function TEXT.draw(list)
if not list then list=texts end
for i=1,#list do
local t=list[i]
local p=t.c
gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
setFont(t.font)
t:draw()
end
if not list then
list=texts
end
for i=1,#list do
local t=list[i]
local p=t.c
setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
t:draw()
end
end
return TEXT
return TEXT

View File

@@ -1,97 +0,0 @@
local THEME={
cur=false,--Current theme
}
local themeColor={
xmas={COLOR.R,COLOR.Z,COLOR.G},
sprfes={COLOR.R,COLOR.O,COLOR.Y},
}
function THEME.calculate(Y,M,D)
if not Y then Y,M,D=os.date('%Y'),os.date('%m'),os.date('%d')end
--Festival calculate within one statement
return
--Christmas
M=='12'and math.abs(D-25)<4 and
'xmas'or
--Birthday
M=='06'and D=='06'and
'birth'or
--Spring festival
M<'03'and math.abs((({
--Festival days. Jan 26=26, Feb 1=32, etc.
24,43,32,22,40,29,49,38,26,45,
34,23,41,31,50,39,28,47,36,25,
43,32,22,41,29,48,37,26,44,34,
23,42,31,50,39,28,46,35,24,43,
32,22,41,30,48,37,26,45,33,23,
42,32,50,39,28,46,35,24,43,33,
21,40,
})[Y-2000]or -26)-((M-1)*31+D))<6 and
'sprfes'or
--April fool's day
M=='04'and D=='01'and
'fool'or
--Z day
D=='26'and(
(M=='01'or M=='02'or M=='03')and'zday1'or
(M=='04'or M=='05'or M=='06')and'zday2'or
(M=='07'or M=='08'or M=='09')and'zday3'or
(M=='10'or M=='11'or M=='12')and'zday4'
)or
'classic'
end
function THEME.set(theme)
if theme=='classic'then
BG.setDefault('space')
BGM.setDefault('nil')
elseif theme=='xmas'then
BG.setDefault('snow')
BGM.setDefault('xmas')
MES.new('info',"==Merry Christmas==")
elseif theme=='birth'then
BG.setDefault('firework')
BGM.setDefault('magicblock')
elseif theme=='sprfes'then
BG.setDefault('firework')
BGM.setDefault('spring festival')
MES.new('info',"★☆新年快乐☆★")
elseif theme=='zday1'then
BG.setDefault('lanterns')
BGM.setDefault('overzero')
elseif theme=='zday2'then
BG.setDefault('lanterns')
BGM.setDefault('vacuum')
elseif theme=='zday3'then
BG.setDefault('lanterns')
BGM.setDefault('empty')
elseif theme=='zday4'then
BG.setDefault('lanterns')
BGM.setDefault('space')
elseif theme=='fool'then
BG.setDefault('blockrain')
BGM.setDefault('how feeling')
else
return
end
THEME.cur=theme
BG.set()
BGM.play()
return true
end
function THEME.getThemeColor(theme)
if not theme then theme=THEME.cur end
return themeColor[theme]
end
function THEME.fresh()
THEME.set(THEME.calculate(os.date('%Y'),os.date('%m'),os.date('%d')))
end
return THEME

View File

@@ -1,8 +1,12 @@
local level={0,0,.01,.016,.023,.03,.04,.05,.06,.07,.08,.09,.12,.15}
local vib=love.system.vibrate
return function(t)
local L=SETTING.vib
if L>0 then
vib(level[L+t])
end
end
return love.system.getOS()=='iOS'and
function(t)
t=level[t]
if t then vib(t<=.03 and 1 or t<=.09 and 2 or 3)end
end
or
function(t)
t=level[t]
if t then vib(t)end
end

View File

@@ -1,124 +1,132 @@
local rnd=math.random
local volume=1
local diversion=0
local VOC={
getCount=function()return 0 end,
getQueueCount=function()return 0 end,
getFreeChannel=NULL,
play=NULL,
update=NULL,
getCount=function()return 0 end,
getQueueCount=function()return 0 end,
load=function()error("Cannot load before init!")end,
getFreeChannel=NULL,
play=NULL,
update=NULL,
}
function VOC.init(list)
VOC.init=nil
local rnd=math.random
local rem=table.remove
local voiceQueue={free=0}
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
local Source={}
local count=#list function VOC.getCount()return count end
local function loadVoiceFile(N,vocName)
local fileName='media/VOICE/'..SETTING.cv..'/'..vocName..'.ogg'
if love.filesystem.getInfo(fileName)then
bank[vocName]={love.audio.newSource(fileName,'static')}
table.insert(Source[N],vocName)
return true
end
end
local function getVoice(str)
local L=bank[str]
local n=1
while L[n]:isPlaying()do
n=n+1
if not L[n]then
L[n]=L[1]:clone()
L[n]:seek(0)
break
end
end
return L[n]
--Load voice with string
end
local function load(skip)
for i=1,count do
Source[list[i]]={}
local n=0
repeat n=n+1 until not loadVoiceFile(list[i],list[i]..'_'..n)
if n==1 then
if not loadVoiceFile(list[i],list[i])then
MES.new('warn',"No VOICE file: "..list[i],.1)
end
end
if not Source[list[i]][1]then Source[list[i]]=nil end
if not skip and i~=count then
coroutine.yield()
end
end
VOC.loadOne=nil
function VOC.getQueueCount()
return #voiceQueue
end
function VOC.getFreeChannel()
local l=#voiceQueue
for i=1,l do
if #voiceQueue[i]==0 then return i end
end
voiceQueue[l+1]={s=0}
return l+1
end
function VOC.play(s,chn)
if SETTING.voc>0 then
local _=Source[s]
if not _ then return end
if chn then
local L=voiceQueue[chn]
L[#L+1]=_[rnd(#_)]
L.s=1
--Add to queue[chn]
else
voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]}
--Create new channel & play
end
end
end
function VOC.update()
for i=#voiceQueue,1,-1 do
local Q=voiceQueue[i]
if Q.s==0 then--Free channel, auto delete when >3
if i>3 then
rem(voiceQueue,i)
end
elseif Q.s==1 then--Waiting load source
Q[1]=getVoice(Q[1])
Q[1]:setVolume(SETTING.voc)
Q[1]:play()
Q.s=Q[2]and 2 or 4
elseif Q.s==2 then--Playing 1,ready 2
if Q[1]:getDuration()-Q[1]:tell()<.08 then
Q[2]=getVoice(Q[2])
Q[2]:setVolume(SETTING.voc)
Q[2]:play()
Q.s=3
end
elseif Q.s==3 then--Playing 12 same time
if not Q[1]:isPlaying()then
for j=1,#Q do
Q[j]=Q[j+1]
end
Q.s=Q[2]and 2 or 4
end
elseif Q.s==4 then--Playing last
if not Q[1].isPlaying(Q[1])then
Q[1]=nil
Q.s=0
end
end
end
end
end
VOC.loadOne=coroutine.wrap(load)
function VOC.loadAll()load(true)end
function VOC.setDiversion(n)
assert(type(n)=='number'and n>0 and n<12,'Wrong div')
diversion=n
end
return VOC
function VOC.setVol(v)
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
volume=v
end
function VOC.init(list)
VOC.init=nil
local rem=table.remove
local voiceQueue={free=0}
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
local Source={}
local count=#list function VOC.getCount()return count end
local function _loadVoiceFile(path,N,vocName)
local fullPath=path..vocName..'.ogg'
if love.filesystem.getInfo(fullPath)then
bank[vocName]={love.audio.newSource(fullPath,'stream')}
table.insert(Source[N],vocName)
return true
end
end
--Load voice with string
local function _getVoice(str)
local L=bank[str]
local n=1
while L[n]:isPlaying()do
n=n+1
if not L[n]then
L[n]=L[1]:clone()
L[n]:seek(0)
break
end
end
return L[n]
end
function VOC.load(path)
for i=1,count do
Source[list[i]]={}
local n=0
repeat n=n+1 until not _loadVoiceFile(path,list[i],list[i]..'_'..n)
if n==1 then
if not _loadVoiceFile(path,list[i],list[i])then
LOG("No VOC: "..list[i],.1)
end
end
if not Source[list[i]][1]then
Source[list[i]]=nil
end
end
function VOC.getQueueCount()
return #voiceQueue
end
function VOC.getFreeChannel()
local l=#voiceQueue
for i=1,l do
if #voiceQueue[i]==0 then return i end
end
voiceQueue[l+1]={s=0}
return l+1
end
function VOC.play(s,chn)
if volume>0 then
local _=Source[s]
if not _ then return end
if chn then
local L=voiceQueue[chn]
L[#L+1]=_[rnd(#_)]
L.s=1
--Add to queue[chn]
else
voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]}
--Create new channel & play
end
end
end
function VOC.update()
for i=#voiceQueue,1,-1 do
local Q=voiceQueue[i]
if Q.s==0 then--Free channel, auto delete when >3
if i>3 then
rem(voiceQueue,i)
end
elseif Q.s==1 then--Waiting load source
Q[1]=_getVoice(Q[1])
Q[1]:setVolume(volume)
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
Q[1]:play()
Q.s=Q[2]and 2 or 4
elseif Q.s==2 then--Playing 1,ready 2
if Q[1]:getDuration()-Q[1]:tell()<.08 then
Q[2]=_getVoice(Q[2])
Q[2]:setVolume(volume)
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
Q[2]:play()
Q.s=3
end
elseif Q.s==3 then--Playing 12 same time
if not Q[1]:isPlaying()then
for j=1,#Q do
Q[j]=Q[j+1]
end
Q.s=Q[2]and 2 or 4
end
elseif Q.s==4 then--Playing last
if not Q[1].isPlaying(Q[1])then
Q[1]=nil
Q.s=0
end
end
end
end
end
end
return VOC

View File

@@ -1,389 +1,191 @@
local host=
-- '127.0.0.1'
-- '192.168.114.102'
'krakens.tpddns.cn'
-- 'game.techmino.org'
-- '127.0.0.1'
-- '192.168.114.102'
'game.techmino.org'
local port='10026'
local path='/tech/socket/v1'
local debugMode=''--S:send, R:receive, M=mark
local wsThread=[[
-- lua + LÖVE threading websocket client
-- Original pure lua ver. by flaribbit and Particle_G
-- Threading version by MrZ
local triggerCHN,sendCHN,readCHN,threadName=...
local CHN_demand,CHN_getCount=triggerCHN.demand,triggerCHN.getCount
local CHN_push,CHN_pop=triggerCHN.push,triggerCHN.pop
local SOCK=require'socket'.tcp()
local JSON=require'Zframework.json'
do--Connect
local host=CHN_demand(sendCHN)
local port=CHN_demand(sendCHN)
local path=CHN_demand(sendCHN)
local body=CHN_demand(sendCHN)
local timeout=CHN_demand(sendCHN)
SOCK:settimeout(timeout)
local res,err=SOCK:connect(host,port)
if err then CHN_push(readCHN,err)return end
--WebSocket handshake
if not body then body=''end
SOCK:send(
'GET '..path..' HTTP/1.1\r\n'..
'Host: '..host..':'..port..'\r\n'..
'Connection: Upgrade\r\n'..
'Upgrade: websocket\r\n'..
'Content-Type: application/json\r\n'..
'Content-Length: '..#body..'\r\n'..
'Sec-WebSocket-Version: 13\r\n'..
'Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n'..--secKey
body
)
--First line of HTTP
res,err=SOCK:receive('*l')
if not res then CHN_push(readCHN,err)return end
local code,ctLen
code=res:find(' ')
code=res:sub(code+1,code+3)
--Get body length from headers and remove headers
repeat
res,err=SOCK:receive('*l')
if not res then CHN_push(readCHN,err)return end
if not ctLen and res:find('length')then
ctLen=tonumber(res:match('%d+'))
end
until res==''
--Result
if ctLen then
if code=='101'then
CHN_push(readCHN,'success')
else
res,err=SOCK:receive(ctLen)
if not res then
CHN_push(readCHN,err)
else
res=JSON.decode(res)
CHN_push(readCHN,(code or"XXX")..":"..(res and res.reason or"Server Error"))
end
return
end
end
SOCK:settimeout(0)
end
local byte=string.byte
local band,shl=bit.band,bit.lshift
local _send do
local char=string.char
local bor,bxor=bit.bor,bit.bxor
local shr=bit.rshift
local mask_key={1,14,5,14}
local mask_str=char(unpack(mask_key))
function _send(op,message)
]]..(debugMode:find'S'and''or'--')..[[print((">> %s[%d]:%s"):format(threadName,#message,message))
--Message type
SOCK:send(char(bor(0x80,op)))
if message then
--Length
local length=#message
if length>65535 then
SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff)))
elseif length>125 then
SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff)))
else
SOCK:send(char(bor(length,0x80)))
end
SOCK:send(mask_str)
local msgbyte={byte(message,1,length)}
for i=1,length do
msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1])
end
return SOCK:send(char(unpack(msgbyte)))
else
SOCK:send('\128'..mask_str)
return 0
end
end
end
local res,err
local op,fin
local length
local lBuffer=""--Long multi-data buffer
local UFF--Un-finished-frame mode
local sBuffer=""--Short multi-frame buffer
while true do--Running
CHN_demand(triggerCHN)
--Send
while CHN_getCount(sendCHN)>=2 do
local op=CHN_pop(sendCHN)
local message=CHN_pop(sendCHN)
_send(op,message)
end
--Read
while true do
if not UFF then--UNF process
--Byte 0-1
res,err=SOCK:receive(2)
if err then break end
op=band(byte(res,1),0x0f)
fin=band(byte(res,1),0x80)==0x80
--Calculating data length
length=band(byte(res,2),0x7f)
if length==126 then
res=SOCK:receive(2)
length=shl(byte(res,1),8)+byte(res,2)
elseif length==127 then
local b={byte(SOCK:receive(8),1,8)}
length=shl(b[5],24)+shl(b[6],16)+shl(b[7],8)+b[8]
end
if length>0 then
--Receive data
local s,_,p=SOCK:receive(length)
if s then
res=s
elseif p then--UNF head
]]..(debugMode:find'R'and''or'--')..[[print(("<< %s[%d/%d]:%s"):format(threadName,#p,length,#p<50 and p or p:sub(1,50)))
UFF=true
sBuffer=sBuffer..p
length=length-#p
break
end
else
res=""
end
else
local s,e,p=SOCK:receive(length)
if s then
]]..(debugMode:find'R'and''or'--')..[[print(("<< %s(%d):%s"):format(threadName,length,#s<50 and s or s:sub(1,50)))
sBuffer=sBuffer..s
length=length-#s
elseif p then
]]..(debugMode:find'R'and''or'--')..[[print(("<< %s(%d):%s"):format(threadName,length,#p<50 and p or p:sub(1,50)))
sBuffer=sBuffer..p
length=length-#p
end
if length==0 then
res,sBuffer=sBuffer,""
UFF=false
else
break
end
end
]]..(debugMode:find'R'and''or'--')..[[print(("<< %s[(%d)]:%s"):format(threadName,#res,#res<800 and res or res:sub(1,150).."\n...\n"..res:sub(-150)))
--React
if op==8 then--8=close
CHN_push(readCHN,op)
SOCK:close()
if type(res)=='string'then
CHN_push(readCHN,res:sub(3))--Warning: with 2 bytes close code
else
CHN_push(readCHN,"WS Error")
end
elseif op==0 then--0=continue
lBuffer=lBuffer..res
if fin then
]]..(debugMode:find'M'and''or'--')..[[print("FIN=1 (c")
CHN_push(readCHN,lBuffer)
lBuffer=""
else
]]..(debugMode:find'M'and''or'--')..[[print("FIN=0 (c")
end
else
CHN_push(readCHN,op)
if fin then
]]..(debugMode:find'M'and''or'--')..[[print("OP: "..op.."\tFIN=1")
CHN_push(readCHN,res)
else
]]..(debugMode:find'M'and''or'--')..[[print("OP: "..op.."\tFIN=0")
sBuffer=res
]]..(debugMode:find'M'and''or'--')..[[print("START pack: "..res)
end
end
end
end
]]
local type=type
local timer=love.timer.getTime
local CHN=love.thread.newChannel()
local CHN_getCount,CHN_push,CHN_pop=CHN.getCount,CHN.push,CHN.pop
local TRD=love.thread.newThread("\n")
local TRD_isRunning=TRD.isRunning
local WS={}
local wsList=setmetatable({},{
__index=function(l,k)
local ws={
real=false,
status='dead',
lastPongTime=timer(),
sendTimer=0,
alertTimer=0,
pongTimer=0,
}
l[k]=ws
return ws
end
__index=function(l,k)
local ws={
real=false,
status='dead',
lastPongTime=timer(),
sendTimer=0,
alertTimer=0,
pongTimer=0,
}
l[k]=ws
return ws
end
})
function WS.switchHost(_1,_2,_3)
for k in next,wsList do
WS.close(k)
end
host=_1
port=_2 or port
path=_3 or path
for k in next,wsList do
WS.close(k)
end
host=_1
port=_2 or port
path=_3 or path
end
function WS.connect(name,subPath,body,timeout)
local ws={
real=true,
thread=love.thread.newThread(wsThread),
triggerCHN=love.thread.newChannel(),
sendCHN=love.thread.newChannel(),
readCHN=love.thread.newChannel(),
lastPingTime=0,
lastPongTime=timer(),
pingInterval=12,
status='connecting',--'connecting', 'running', 'dead'
sendTimer=0,
alertTimer=0,
pongTimer=0,
}
wsList[name]=ws
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN,name)
CHN_push(ws.sendCHN,host)
CHN_push(ws.sendCHN,port)
CHN_push(ws.sendCHN,path..subPath)
CHN_push(ws.sendCHN,body or"")
CHN_push(ws.sendCHN,timeout or 2.6)
if wsList[name]and wsList[name].thread then
wsList[name].thread:release()
end
local ws={
real=true,
thread=love.thread.newThread('Zframework/websocket_thread.lua'),
triggerCHN=love.thread.newChannel(),
sendCHN=love.thread.newChannel(),
readCHN=love.thread.newChannel(),
lastPingTime=0,
lastPongTime=timer(),
pingInterval=6,
status='connecting',--'connecting', 'running', 'dead'
sendTimer=0,
alertTimer=0,
pongTimer=0,
}
wsList[name]=ws
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN)
CHN_push(ws.sendCHN,host)
CHN_push(ws.sendCHN,port)
CHN_push(ws.sendCHN,path..subPath)
CHN_push(ws.sendCHN,body or"")
CHN_push(ws.sendCHN,timeout or 2.6)
end
function WS.status(name)
local ws=wsList[name]
return ws.status or'dead'
local ws=wsList[name]
return ws.status or'dead'
end
function WS.getTimers(name)
local ws=wsList[name]
return ws.pongTimer,ws.sendTimer,ws.alertTimer
local ws=wsList[name]
return ws.pongTimer,ws.sendTimer,ws.alertTimer
end
function WS.setPingInterval(name,time)
local ws=wsList[name]
ws.pingInterval=math.max(time or 2.6,2.6)
local ws=wsList[name]
ws.pingInterval=math.max(time or 2.6,2.6)
end
function WS.alert(name)
local ws=wsList[name]
ws.alertTimer=2
local ws=wsList[name]
ws.alertTimer=2.6
end
local OPcode={
continue=0,
text=1,
binary=2,
close=8,
ping=9,
pong=10,
continue=0,
text=1,
binary=2,
close=8,
ping=9,
pong=10,
}
local OPname={
[0]='continue',
[1]='text',
[2]='binary',
[8]='close',
[9]='ping',
[10]='pong',
[0]='continue',
[1]='text',
[2]='binary',
[8]='close',
[9]='ping',
[10]='pong',
}
function WS.send(name,message,op)
if type(message)=='string'then
local ws=wsList[name]
if ws.real and ws.status=='running'then
CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary
CHN_push(ws.sendCHN,message)
ws.lastPingTime=timer()
ws.sendTimer=1
end
else
MES.new('error',"Attempt to send non-string value!")
MES.traceback()
end
if type(message)=='string'then
local ws=wsList[name]
if ws.real and ws.status=='running'then
CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary
CHN_push(ws.sendCHN,message)
ws.lastPingTime=timer()
ws.sendTimer=1
end
else
MES.new('error',"Attempt to send non-string value!")
MES.traceback()
end
end
function WS.read(name)
local ws=wsList[name]
if ws.real and ws.status~='connecting'and CHN_getCount(ws.readCHN)>=2 then
local op,message=CHN_pop(ws.readCHN),CHN_pop(ws.readCHN)
if op==8 then ws.status='dead'end--8=close
ws.lastPongTime=timer()
ws.pongTimer=1
return message,OPname[op]or op
end
local ws=wsList[name]
if ws.real and ws.status~='connecting'and CHN_getCount(ws.readCHN)>=2 then
local op,message=CHN_pop(ws.readCHN),CHN_pop(ws.readCHN)
if op==8 then--8=close
ws.status='dead'
elseif op==9 then--9=ping
WS.send(name,message or"",'pong')
end
ws.lastPongTime=timer()
ws.pongTimer=1
return message,OPname[op]or op
end
end
function WS.close(name)
local ws=wsList[name]
if ws.real then
CHN_push(ws.sendCHN,8)--close
CHN_push(ws.sendCHN,"")
ws.status='dead'
end
local ws=wsList[name]
if ws.real then
CHN_push(ws.sendCHN,8)--close
CHN_push(ws.sendCHN,"")
ws.status='dead'
end
end
function WS.update(dt)
local time=timer()
for name,ws in next,wsList do
if ws.real then
if CHN_getCount(ws.triggerCHN)==0 then
CHN_push(ws.triggerCHN,0)
end
if ws.status=='connecting'then
local mes=CHN_pop(ws.readCHN)
if mes then
if mes=='success'then
ws.status='running'
ws.lastPingTime=time
ws.lastPongTime=time
ws.pongTimer=1
else
ws.status='dead'
MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes))
end
end
elseif ws.status=='running'then
if time-ws.lastPingTime>ws.pingInterval then
CHN_push(ws.sendCHN,9)
CHN_push(ws.sendCHN,"")--ping
ws.lastPingTime=time
end
if time-ws.lastPongTime>6+2*ws.pingInterval then
WS.close(name)
end
end
if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end
if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end
if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end
end
end
local time=timer()
for name,ws in next,wsList do
if ws.real and ws.status~='dead'then
if TRD_isRunning(ws.thread)then
if CHN_getCount(ws.triggerCHN)==0 then
CHN_push(ws.triggerCHN,0)
end
if ws.status=='connecting'then
local mes=CHN_pop(ws.readCHN)
if mes then
if mes=='success'then
ws.status='running'
ws.lastPingTime=time
ws.lastPongTime=time
ws.pongTimer=1
else
ws.status='dead'
MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes))
end
end
elseif ws.status=='running'then
if time-ws.lastPingTime>ws.pingInterval then
WS.send(name,"",'pong')
end
if time-ws.lastPongTime>6+2*ws.pingInterval then
WS.close(name)
end
end
if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end
if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end
if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end
else
ws.status='dead'
local err=ws.thread:getError()
if err then
err=err:sub((err:find(":",(err:find(":")or 0)+1)or 0)+1,(err:find("\n")or 0)-1)
MES.new('warn',text.wsClose..err)
WS.alert(name)
end
end
end
end
end
return WS
return WS

View File

@@ -0,0 +1,191 @@
local triggerCHN,sendCHN,readCHN=...
local CHN_demand,CHN_getCount=triggerCHN.demand,triggerCHN.getCount
local CHN_push,CHN_pop=triggerCHN.push,triggerCHN.pop
local SOCK=require'socket'.tcp()
local JSON=require'Zframework.json'
do--Connect
local host=CHN_demand(sendCHN)
local port=CHN_demand(sendCHN)
local path=CHN_demand(sendCHN)
local body=CHN_demand(sendCHN)
local timeout=CHN_demand(sendCHN)
SOCK:settimeout(timeout)
local res,err=SOCK:connect(host,port)
assert(res,err)
--WebSocket handshake
if not body then body=''end
SOCK:send(
'GET '..path..' HTTP/1.1\r\n'..
'Host: '..host..':'..port..'\r\n'..
'Connection: Upgrade\r\n'..
'Upgrade: websocket\r\n'..
'Content-Type: application/json\r\n'..
'Content-Length: '..#body..'\r\n'..
'Sec-WebSocket-Version: 13\r\n'..
'Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n'..--secKey
body
)
--First line of HTTP
res,err=SOCK:receive('*l')
assert(res,err)
local code,ctLen
code=res:find(' ')
code=res:sub(code+1,code+3)
--Get body length from headers and remove headers
repeat
res,err=SOCK:receive('*l')
assert(res,err)
if not ctLen and res:find('length')then
ctLen=tonumber(res:match('%d+'))
end
until res==''
--Result
if ctLen then
if code=='101'then
CHN_push(readCHN,'success')
else
res,err=SOCK:receive(ctLen)
res=JSON.decode(assert(res,err))
error((code or"XXX")..":"..(res and res.reason or"Server Error"))
end
end
SOCK:settimeout(0)
end
local YIELD=coroutine.yield
local byte,char=string.byte,string.char
local band,bor,bxor=bit.band,bit.bor,bit.bxor
local shl,shr=bit.lshift,bit.rshift
local mask_key={1,14,5,14}
local mask_str=char(unpack(mask_key))
local function _send(op,message)
--Message type
SOCK:send(char(bor(op,0x80)))
if message then
--Length
local length=#message
if length>65535 then
SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff)))
elseif length>125 then
SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff)))
else
SOCK:send(char(bor(length,0x80)))
end
local msgbyte={byte(message,1,length)}
for i=1,length do
msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1])
end
return SOCK:send(mask_str..char(unpack(msgbyte)))
else
SOCK:send('\128'..mask_str)
return 0
end
end
local sendThread=coroutine.wrap(function()
while true do
while CHN_getCount(sendCHN)>=2 do
_send(CHN_pop(sendCHN),CHN_pop(sendCHN))
end
YIELD()
end
end)
local function _receive(sock,len)
local buffer=""
while true do
local r,e,p=sock:receive(len)
if r then
buffer=buffer..r
len=len-#r
elseif p then
buffer=buffer..p
len=len-#p
elseif e then
return nil,e
end
if len==0 then
return buffer
end
YIELD()
end
end
local readThread=coroutine.wrap(function()
local res,err
local op,fin
local lBuffer=""--Long multi-pack buffer
while true do
--Byte 0-1
res,err=_receive(SOCK,2)
assert(res,err)
op=band(byte(res,1),0x0f)
fin=band(byte(res,1),0x80)==0x80
--Calculating data length
local length=band(byte(res,2),0x7f)
if length==126 then
res,err=_receive(SOCK,2)
assert(res,err)
length=shl(byte(res,1),8)+byte(res,2)
elseif length==127 then
local lenData
lenData,err=_receive(SOCK,8)
assert(res,err)
local _,_,_,_,_5,_6,_7,_8=byte(lenData,1,8)
length=shl(_5,24)+shl(_6,16)+shl(_7,8)+_8
end
res,err=_receive(SOCK,length)
assert(res,err)
--React
if op==8 then--8=close
CHN_push(readCHN,8)--close
if type(res)=='string'then
CHN_push(readCHN,res:sub(3))--[Warning] 2 bytes close code at start so :sub(3)
else
CHN_push(readCHN,"WS closed")
end
return
elseif op==0 then--0=continue
lBuffer=lBuffer..res
if fin then
CHN_push(readCHN,lBuffer)
lBuffer=""
end
else
CHN_push(readCHN,op)
if fin then
CHN_push(readCHN,res)
lBuffer=""
else
lBuffer=res
end
end
YIELD()
end
end)
local success,err
while true do--Running
CHN_demand(triggerCHN)
success,err=pcall(sendThread)
if not success or err then break end
success,err=pcall(readThread)
if not success or err then break end
end
SOCK:close()
CHN_push(readCHN,8)--close
CHN_push(readCHN,err or"Disconnected")
error()

View File

@@ -1,18 +1,19 @@
local floatWheel=0
local love=love
local max,min=math.max,math.min
local trigDist=0
return function(y,key1,key2)
if y>0 then
if floatWheel<0 then floatWheel=0 end
floatWheel=floatWheel+y^1.2
elseif y<0 then
if floatWheel>0 then floatWheel=0 end
floatWheel=floatWheel-(-y)^1.2
end
while floatWheel>=1 do
love.keypressed(key1 or"up")
floatWheel=floatWheel-1
end
while floatWheel<=-1 do
love.keypressed(key2 or"down")
floatWheel=floatWheel+1
end
end
if y>0 then
trigDist=max(trigDist,0)+y^1.2
elseif y<0 then
if trigDist>0 then trigDist=0 end
trigDist=min(trigDist,0)-(-y)^1.2
end
while trigDist>=1 do
love.keypressed(key1 or'up')
trigDist=trigDist-1
end
while trigDist<=-1 do
love.keypressed(key2 or'down')
trigDist=trigDist+1
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +1,34 @@
VERSION={
build=344,
code=1506,
short="V0.15.6",
string="Alpha V0.15.6",
room="V1.0",
name="强化装甲 Reinforced Armor",
}
function love.conf(t)
t.identity='Techmino'--Saving folder
t.version="11.1"
t.gammacorrect=false
t.appendidentity=true--Search files in source then in save directory
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
if t.audio then
t.audio.mic=false
t.audio.mixwithsystem=true
end
t.identity='Techmino'--Saving folder
t.version="11.1"
t.gammacorrect=false
t.appendidentity=true--Search files in source then in save directory
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
if t.audio then
t.audio.mic=false
t.audio.mixwithsystem=true
end
local W=t.window
W.title="Techmino "..VERSION.string
W.icon="media/image/icon.png"
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360
W.borderless=false
W.resizable=true
W.fullscreen=false
W.vsync=0--Unlimited FPS
W.msaa=false--Num of samples to use with multi-sampled antialiasing
W.depth=0--Bits/samp of depth buffer
W.stencil=1--Bits/samp of stencil buffer
W.display=1--Monitor ID
W.highdpi=true--High-dpi mode for the window on a Retina display
W.x,W.y=nil
local W=t.window
W.title="Techmino "..require"version".string
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360
W.borderless=false
W.resizable=true
W.fullscreen=false
W.vsync=0--Unlimited FPS
W.msaa=0--Multi-sampled antialiasing
W.depth=0--Bits/samp of depth buffer
W.stencil=1--Bits/samp of stencil buffer
W.display=1--Monitor ID
W.highdpi=true--High-dpi mode for the window on a Retina display
W.x,W.y=nil
local M=t.modules
M.window,M.system,M.event,M.thread=true,true,true,true
M.timer,M.math,M.data=true,true,true
M.video,M.audio,M.sound=true,true,true
M.graphics,M.font,M.image=true,true,true
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
M.physics=false
end
local M=t.modules
M.window,M.system,M.event,M.thread=true,true,true,true
M.timer,M.math,M.data=true,true,true
M.video,M.audio,M.sound=true,true,true
M.graphics,M.font,M.image=true,true,true
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
M.physics=false
end

View File

@@ -1,156 +0,0 @@
模式文件应当是一个合(语)法的lua程序文件其必须返回一个table里面的内容包括
color:
必选
模式的颜色,用于点击地图图标后显示的提示文本
env:
必选
模式环境变量,决定了关卡的各项属性
*属性名* *默认值* *说明*
drop 60 下落延迟(帧支持自然数和2的整数次幂)
lock 60 锁定延迟(帧)
wait 0 出块延迟(帧)
fall 0 消行延迟(帧)
bone false 是否开启骨块模式
fieldH 20 场地高度
heightLimit 1e99 允许的最大场地高度
nextCount 6 显示next个数
nextStartPos 1 next从第几个开始显示
holdCount 1 hold个数
infHold false 是否能无限hold
phyHold false 是否开启物理hold
ospin true 是否能O-spin
deepDrop false 是否开启深降
RS 'TRS' 旋转系统名
das 10 DAS
arr 2 ARR
sddas 2 软降DAS
sdarr 2 软降ARR
mindas 0 允许的最小DAS
minarr 0 允许的最小ARR
minsdarr 0 允许的最小软降ARR
ihs true 提前Hold
irs true 提前旋转
ims true 提前移动
skin [设置值] 方块颜色包含25个整数(1~16)的table
face [设置值] 方块朝向包含25个整数(0~3)的table
block true 是否显示方块
ghost 0.3 影子透明度(0~1)
center 1 旋转中心透明度(0~1)
smooth false 是否平滑下落
grid 0.16 网格透明度(0~1)
bagLine true 是否显示包分界线(如果存在)
lockFX 2 锁定特效等级(0~5整数)
dropFX 2 瞬间下落特效等级(0~5整数)
moveFX 2 移动特效等级(0~5整数)
clearFX 2 消除特效等级(0~5整数)
splashFX 2 溅射特效等级(0~5整数)
shakeFX 2 晃动特效等级(0~5整数)
atkFX 2 攻击特效等级(0~5整数)
text true 是否显示消行文本
score true 是否显示落块分数
highCam false 是否开启超屏视野
nextPos false 是否开启生成预览
showSpike false 是否开启spike计数器
hideBoard false 场地隐藏模式("down"|"up"|"all")
flipBoard false 场地翻转模式("U-D"|"L-R"|"180")
sequence 'bag' 序列模式是放一块后对next序列的刷新函数可以使用默认的几个函数用字符串表示。也可以自己写一个注意使用协程技术
seqData {1,2,3,4,5,6,7}序列模式使用的"包"数据(本质是生成序列用的数据会作为参数传进上面那个叫sequence的序列生成函数不一定是包)
mission false 包含任务的table说明暂时略
life 0 生命数(复活次数)
garbageSpeed 1 垃圾行释放速度
pushSpeed 3 垃圾行上涨速度
noTele false 是否禁止10个高级按键
visible 'show' 方块可见性,填写固定的几个字符串
freshLimit 1e99 锁延刷新次数限制
easyFresh true 是否使用简单锁延刷新规则
bufferLimit 1e99 攻击缓冲行数上限
fkey1 false 按下功能键1后执行的函数
fkey2 false 按下功能键2后执行的函数
keyCancel {} 包含禁止使用的按键的id例如{1,2}就是禁止左移和右移
fine [设置值] 是否开启非极简提示音
fineKill false 是否开启非极简即死
b2bKill false 是否开启断b2b即死
missionKill false 是否开启强制任务
dropPiece NULL 放一块后要执行的函数,输入玩家对象
task NULL 每帧会*继续执行*的函数,输入玩家对象,注意:使用协程技术
bg 'none' 背景,只能填写内置背景的名字
bgm 'race' 背景音乐名(或者列表随机,例如{'race','push'}),只能用内置音乐库的音乐名
allowMod true 是否允许mod
load:
必选
模式初始化函数,一般创建一个玩家即可
无输入
无输出
mesDisp:
必选
模式显示信息,是一个绘图函数,坐标系原点是玩家对象最左上角
输入玩家对象
无输出
score:
可选(不填就没有分数保存和计算)
一局打完后要存储的数据
输入玩家对象
输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签)
scoreDisp:
可选(模式不出现在地图上的时候不用写)
是把score()存起来的table转换为字符串显示出来的函数
输入一个成绩table
输出一个字符串
comp:
可选(没有score函数的时候不用写)
是成绩table之间对比并排序的规则
输入两个成绩table
输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算)
getRank:
可选,模式评级函数
是用于评价玩家表现的函数
输入玩家对象
输出0~50表示除了记录到排行榜外什么都不做1/2/3/4/5表示D/C/B/A/S级能解锁连接的模式还会让模式图标在地图上显示不同的颜色
以下是40行的模式文件内容:
//sprint_40l.lua
return{--返回一个table你也可以在之前定义一些常量或者函数什么的
color=COLOR.green,--颜色
env={--模式环境变量
drop=60,lock=60,
dropPiece=function(P)if P.stat.row>=40 then P win('finish')end end,
bg='bg2',bgm='race',
},
load=function()--生成玩家
PLY.newPlayer(1)--1是玩家编号默认用户控制1号玩家
end,
mesDisp=function(P)--40行模式需要显示的信息
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,69,265)--把计算出来的剩余行数r显示出来
PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数
end,
score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,--按照时间排序,时间一样就看块数
getRank=function(P)--计算评级
if P.stat.row<40 then return end--你总得打完40行对吧否则直接return空掉成绩都不记录
local T=P.stat.time
return
T<=26 and 5 or--时间小于等于26秒就是S级要求
T<=32.6 and 4 or--A级要求
T<=52.6 and 3 or--B级要求
T<=92.9 and 2 or--C级要求
T<=183 and 1 or--D级要求解锁别的模式的最低标准
0--记录成绩的最低标准
end,
}

View File

@@ -1,49 +0,0 @@
以下是Techmino使用/将要使用/未来也许会使用的语音文件, 每一个都可以录任意多条
有多个文件的语音在播放时会随机挑选一个播放, 所以组合性的语音大概率不能随意发挥, 不然和其他组合起来可能就会出现奇怪的现象
例如多个mini语音文件名: mini_1.ogg, mini_2.ogg, ......
如果只有一个, "_1"可以省略, 但是多个文件的数字不能跳跃
要投稿语音包的话如果没有经过后期处理, 建议使用wav格式;
如果打算自己导入游戏的话需要降噪+裁剪+调整音量后再转为ogg格式 (不支持别的, 因为ogg音质好体积小)
目前游戏内正在使用, 必须录制的音频文件名们:
single, double, triple, techrash
以上直接念就可以,用于普通直接消行
mini, b2b, b2b2b
以上直接念就可以,用于组合进spin消除
注: b2b读作back to back
[各种spin消除]
以上的每一个都要衍生出数条语音,例如zpin的是这五条:
z-spin (用于不消行)
z-spin single
z-spin double
z-spin triple
z-spin techrash
(z-spin pentacrash)
(z-spin hexacrash)
对于 S L J T O I 每一个都是这样, 五种语音, 加括号的是消5和消6, 一般不用所以可以不录
对于P, Q, F, E, U, V, W, X, R, Y, N, H
这些方块也可以有上面那些语音,但由于仅在五连块使用还会显著增加语音包体积, 所以不录也可以
perfect_clear, half_clear
这俩可以直接念也可以略做修改
win, lose, bye
这几个可以自由发挥, 能用在三个场合就行
test, happy, doubt, sad, egg
这几个是特殊音效,具体使用情况不定
第一个是测试音量用的音效,尽量短一点,长度在半秒内
其他是彩蛋音效(不录也行, 反正一般不会触发)
welcome_voc
进入游戏播放的欢迎语音(类似osu)
目前没有用到但是将要加入的:
split
未来可能加入的:
暂无

BIN
font.ttf

Binary file not shown.

51
legals.md Normal file
View File

@@ -0,0 +1,51 @@
TECHMINO © 2019-2021 26F Studio. Some rights reserved.
TECHMINO and "26F Studio" are trademarks of 26F Studio. The TECHMINO game and source code are under a GNU Lesser General Public License Version 3.
"Tetris" is the registered trademark of The Tetris Holding, LLC, licensed to The Tetris Company, Inc. TECHMINO is not a fan game of Tetris. TECHMINO and 26F Studio are not affiliated with Tetris Holding, LLC or The Tetris Company, Inc. in any way.
Powered by LÖVE, © 2006-2021 LÖVE Development Team.
Lua is free software distributed under the terms of the MIT license. Copyright © 1994-2021 by Lua.org, PUC-Rio.
SIMPLE LOVE LIGHTS is under a MIT License. Created by Dylan Hunn.
json.lua is copyrighted by rxi. © 2021 rxi.
IBM Plex is copyrighted by the International Business Machines Corporation. IBM and IBM Plex are trademarks of IBM Corp, registered in many jurisdictions worldwide. IBM Plex is licensed under the SIL Open Font License, Version 1.1.
Source Han Sans is copyrighted by Adobe Inc. Source Han Sans and Adobe are registered trademarks of Adobe Inc. in United States and other countries or regions. Source Han Sans is licensed under the SIL Open Font License, Version 1.1.
JetBrains Mono is copyrighted by the JetBrains Mono Project authors. JetBrains Mono is a trademark of JetBrains s.r.o. JetBrains Mono is licensed under the SIL Open Font License, Version 1.1.
"PlayStation", "PS", "PlayStation Family Mark", "PS logo", "DualSense" and "Play Has No Limits" are registered trademarks or trademarks of Sony Interactive Entertainment Inc. "SONY" is a registered trademark of Sony Corporation. © 2021 Sony Interactive Entertainment LLC.
"Windows", the Windows logo, "Xbox", Xbox logo, and "Microsoft" are registered trademarks of Microsoft Corporation in the United States of America and other countries or regions.
The Apple logo, "Apple Inc.," iOS, iPadOS, macOS, iPhone, and Mac are registered trademarks of Apple Inc. in the United States of America and other countries or regions.
"EA" and "Electronic Arts" are registered trademarks of Electronic Arts Inc. © 2021 Electronic Arts Inc.
SEGA and the SEGA logo are registered trademarks of Sega Corporation. © 2021 Sega Corporation.
Oculus Quest is a registered trademark of Facebook Technologies, LLC. © Meta Platforms, Inc.
"Nintendo" is a registered trademarks of Nintendo Co., Ltd. © 2021 Nintendo Co., Ltd.
N3TWORK is a registered trademark of N3TWORK Inc. © 2021 N3TWORK Inc.
GoldWave is a registered trademark of GoldWave, Inc.
Linux is a registered trademark of Linus Torvalds.
Touhou Project © Team Shanghai Alice 2002-2021.
All other trademarks, logos, and copyrights are the properties of their respective owners.

165
license.txt Normal file
View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

848
main.lua
View File

@@ -1,33 +1,37 @@
--[[
______ __ _
/_ __/___ _____ / /_ ____ ___ (_)____ ____
/ / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \
/ / / __// /__ / / / // / / / / // // / / // /_/ /
/_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino stacking game
# ______ __ _ #
# /_ __/___ _____ / /_ ____ ___ (_)____ ____ #
# / / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \ #
# / / / __// /__ / / / // / / / / // // / / // /_/ / #
# /_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/ #
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino stacking game
Instructions:
1. I made a framework called Zframework, most code in Zframework are not directly relevant to game;
2. "xxx" are texts for reading, 'xxx' are string values just in program;
3. Some goto statement are used for better performance. All goto-labes have detailed names so don't afraid;
4. Except "gcinfo" function of lua itself, other "gc" are short for "graphics";
Instructions:
1. I made a framework called Zframework, *most* code in Zframework are not directly relevant to game;
2. "xxx" are texts for reading by player, 'xxx' are string values just used in program;
3. Some goto statement are used for better performance. All goto-labes have detailed names so don't be afraid;
4. Except "gcinfo" function of lua itself, other "gc" are short for "graphics";
]]--
--Var leak check
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v)end})
--Declaration
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
--System Global Vars Declaration
local fs=love.filesystem
VERSION=require"version"
TIME=love.timer.getTime
YIELD=coroutine.yield
SYSTEM=love.system.getOS()
SYSTEM=love.system.getOS()if SYSTEM=='OS X'then SYSTEM='macOS'end
FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
SAVEDIR=fs.getSaveDirectory()
--Global Vars & Settings
SFXPACKS={'chiptune'}
VOCPACKS={'miya',--[['mono',]]'xiaoya','miku'}
FIRSTLAUNCH=false
DAILYLAUNCH=false
--System setting
@@ -35,326 +39,606 @@ math.randomseed(os.time()*626)
love.setDeprecationOutput(false)
love.keyboard.setKeyRepeat(true)
love.keyboard.setTextInput(false)
love.mouse.setVisible(false)
if MOBILE then
local w,h,f=love.window.getMode()
f.resizable=false
love.window.setMode(w,h,f)
end
local _LOADTIMELIST_={}
local _LOADTIME_=TIME()
--Load modules
require'Zframework'
Z=require'Zframework'
FONT.load{
norm='parts/fonts/proportional.ttf',
mono='parts/fonts/monospaced.ttf',
}
FONT.setDefault('norm')
FONT.setFallback('norm')
SCR.setSize(1280,720)--Initialize Screen size
BGM.setMaxSources(5)
BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end)
VOC.setDiversion(.62)
WIDGET.setOnChange(function()
if SCN.cur~='custom_field'then
local colorList=THEME.getThemeColor()
if not colorList then return end
local rnd=math.random
for _,W in next,SCN.scenes[SCN.cur].widgetList do
if W.color then
W.color=colorList[rnd(#colorList)]
end
end
end
end)
table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_))
--Create shortcuts
setFont=FONT.set
getFont=FONT.get
mStr=GC.mStr
mText=GC.simpX
mDraw=GC.draw
Snd=SFX.playSample
string.repD=STRING.repD
string.sArg=STRING.sArg
string.split=STRING.split
--Delete all naked files (from too old version)
FILE.clear('')
--Create directories
for _,v in next,{'conf','record','replay','cache','lib'}do
local info=fs.getInfo(v)
if not info then
fs.createDirectory(v)
elseif info.type~='directory'then
fs.remove(v)
fs.createDirectory(v)
end
local info=fs.getInfo(v)
if not info then
fs.createDirectory(v)
elseif info.type~='directory'then
fs.remove(v)
fs.createDirectory(v)
end
end
CHAR=require'parts.char'
require'parts.gameTables'
require'parts.gameFuncs'
--Load shader files from SOURCE ONLY
SHADER={}
for _,v in next,fs.getDirectoryItems('parts/shaders')do
if fs.getRealDirectory('parts/shaders/'..v)~=SAVEDIR then
local name=v:sub(1,-6)
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
end
if isSafeFile('parts/shaders/'..v)then
local name=v:sub(1,-6)
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
end
end
require'parts.list'
require'parts.globalTables'
require'parts.gametoolfunc'
THEME= require'parts.theme'
LINE= require'parts.line'
DATA= require'parts.data'
FREEROW= require'parts.freeRow'
DATA= require'parts.data'
TEXTURE= require'parts.texture'
SKIN= require'parts.skin'
USERS= require'parts.users'
NET= require'parts.net'
VK= require'parts.virtualKey'
BOT= require'parts.bot'
RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos
PLY= require'parts.player'
NETPLY= require'parts.netPlayer'
MODETREE= require'parts.modeTree'
TEXTURE= require'parts.texture'
SKIN= require'parts.skin'
USERS= require'parts.users'
NET= require'parts.net'
VK= require'parts.virtualKey'
AIFUNC= require'parts.ai'
AIBUILDER= require'parts.AITemplate'
PLY= require'parts.player'
netPLY= require'parts.netPlayer'
MODES= require'parts.modes'
setmetatable(TEXTURE,{__index=function(self,k)
MES.new('warn',"No texture called: "..k)
self[k]=PAPER
return self[k]
end})
--Initialize field[1]
FIELD[1]=DATA.newBoard()
table.insert(_LOADTIMELIST_,("Load Parts: %.3fs"):format(TIME()-_LOADTIME_))
--First start for phones
if not fs.getInfo('conf/settings')and MOBILE then
SETTING.VKSwitch=true
SETTING.swap=false
SETTING.powerInfo=true
SETTING.cleanCanvas=true
--Init Zframework
do--Z.setCursor
local normImg=GC.DO{16,16,
{'fCirc',8,8,4},
{'setCL',1,1,1,.7},
{'fCirc',8,8,6},
}
local holdImg=GC.DO{16,16,
{'setLW',2},
{'dCirc',8,8,7},
{'fCirc',8,8,3},
}
local min,int,abs=math.min,math.floor,math.abs
local gc_setColor,gc_draw=love.graphics.setColor,love.graphics.draw
local ms=love.mouse
Z.setCursor(function(time,x,y)
if not SETTING.sysCursor then
local R=int((time+1)/2)%7+1
_=BLOCK_COLORS[SETTING.skin[R]]
gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
_=DSCP[R][0]
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5)
gc_setColor(1,1,1)
gc_draw(ms.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8)
end
end)
end
if SETTING.fullscreen then love.window.setFullscreen(true)end
Z.setOnFnKeys({
function()MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!")end,
function()MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))end,
function()MES.new('error',"挂了")end,
function()
if GAME.playing and not GAME.net then
for _=1,8 do
if #PLY_ALIVE>1 then
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
P.lastRecv=PLAYERS[1]
P:lose()
end
end
end
end,
function()print(WIDGET.getSelected()or"no widget selected")end,
function()for k,v in next,_G do print(k,v)end end,
function()if love['_openConsole']then love['_openConsole']()end end,
})
Z.setOnResize(function(w,_)
SHADER.warning:send('w',w*SCR.dpi)
end)
do--Z.setOnFocus
local function task_autoSoundOff()
while true do
coroutine.yield()
local v=love.audio.getVolume()
love.audio.setVolume(math.max(v-.05,0))
if v==0 then return end
end
end
local function task_autoSoundOn()
while true do
coroutine.yield()
local v=love.audio.getVolume()
if v<SETTING.mainVol then
love.audio.setVolume(math.min(v+.05,SETTING.mainVol,1))
else
return
end
end
end
Z.setOnFocus(function(f)
if f then
love.timer.step()
if SETTING.autoMute then
TASK.removeTask_code(task_autoSoundOff)
TASK.new(task_autoSoundOn)
end
else
if SCN.cur=='game'and SETTING.autoPause then
pauseGame()
end
if SETTING.autoMute then
TASK.removeTask_code(task_autoSoundOn)
TASK.new(task_autoSoundOff)
end
end
end)
end
Z.setOnQuit(destroyPlayers)
--Load settings and statistics
TABLE.cover (loadFile('conf/user','-canSkip')or{},USER)
TABLE.cover (loadFile('conf/unlock','-canSkip')or{},RANKS)
TABLE.update(loadFile('conf/settings','-canSkip')or{},SETTING)
TABLE.coverR(loadFile('conf/data','-canSkip')or{},STAT)
TABLE.cover (loadFile('conf/key','-canSkip')or{},KEY_MAP)
TABLE.cover (loadFile('conf/virtualkey','-json -canSkip')or{},VK_ORG)
--Initialize fields, sequence, missions, gameEnv for cutsom game
local fieldData=loadFile('conf/customBoards','-string -canSkip')
if fieldData then
fieldData=STRING.split(fieldData,"!")
for i=1,#fieldData do
DATA.pasteBoard(fieldData[i],i)
end
else
FIELD[1]=DATA.newBoard()
end
local sequenceData=loadFile('conf/customSequence','-string -canSkip')
if sequenceData then
DATA.pasteSequence(sequenceData)
end
local missionData=loadFile('conf/customMissions','-string -canSkip')
if missionData then
DATA.pasteMission(missionData)
end
local customData=loadFile('conf/customEnv','-canSkip')
if customData and customData['version']==VERSION.code then
TABLE.complete(customData,CUSTOMENV)
end
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
--Initialize image libs
IMG.init{
lock='mess/lock.png',
dialCircle='mess/dialCircle.png',
dialNeedle='mess/dialNeedle.png',
lifeIcon='mess/life.png',
badgeIcon='mess/badge.png',
ctrlSpeedLimit='mess/ctrlSpeedLimit.png',
speedLimit='mess/speedLimit.png',--Not used, for future C2-mode
pay1='mess/pay1.png',
pay2='mess/pay2.png',
lock='media/image/mess/lock.png',
dialCircle='media/image/mess/dialCircle.png',
dialNeedle='media/image/mess/dialNeedle.png',
lifeIcon='media/image/mess/life.png',
badgeIcon='media/image/mess/badge.png',
ctrlSpeedLimit='media/image/mess/ctrlSpeedLimit.png',
speedLimit='media/image/mess/speedLimit.png',--Not used, for future C2-mode
pay1='media/image/mess/pay1.png',
pay2='media/image/mess/pay2.png',
drought='media/image/mess/drought.png',
nakiCH='characters/nakiharu.png',
miyaCH='characters/miya.png',
miyaF1='characters/miya_f1.png',
miyaF2='characters/miya_f2.png',
miyaF3='characters/miya_f3.png',
miyaF4='characters/miya_f4.png',
electric='characters/electric.png',
hbm='characters/hbm.png',
miyaCH1='media/image/characters/miya1.png',
miyaCH2='media/image/characters/miya2.png',
miyaCH3='media/image/characters/miya3.png',
miyaCH4='media/image/characters/miya4.png',
miyaHeart='media/image/characters/miya_heart.png',
miyaGlow='media/image/characters/miya_glow.png',
monoCH='media/image/characters/mono.png',
xiaoyaCH='media/image/characters/xiaoya.png',
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
mikuCH='media/image/characters/miku.png',
electric='media/image/characters/electric.png',
hbm='media/image/characters/hbm.png',
lanterns={
'lanterns/1.png',
'lanterns/2.png',
'lanterns/3.png',
'lanterns/4.png',
'lanterns/5.png',
'lanterns/6.png',
},
lanterns={
'media/image/lanterns/1.png',
'media/image/lanterns/2.png',
'media/image/lanterns/3.png',
'media/image/lanterns/4.png',
'media/image/lanterns/5.png',
'media/image/lanterns/6.png',
},
}
SKIN.init{
'crystal_scf',
'matte_mrz',
'contrast_mrz',
'polkadots_scf',
'toy_scf',
'smooth_mrz',
'simple_scf',
'glass_scf',
'penta_scf',
'bubble_scf',
'minoes_scf',
'pure_mrz',
'bright_scf',
'glow_mrz',
'plastic_mrz',
'paper_mrz',
'yinyang_scf',
'cartooncup_earety',
'jelly_miya',
'brick_notypey',
'gem_notypey',
'classic',
'ball_shaw',
'retro_notypey',
'textbone_mrz',
'coloredbone_mrz',
'wtf',
SKIN.load{
{name="crystal_scf",path='media/image/skin/crystal_scf.png'},
{name="matte_mrz",path='media/image/skin/matte_mrz.png'},
{name="shiny_chno",path='media/image/skin/shiny_chno.png'},
{name="contrast_mrz",path='media/image/skin/contrast_mrz.png'},
{name="polkadots_scf",path='media/image/skin/polkadots_scf.png'},
{name="toy_scf",path='media/image/skin/toy_scf.png'},
{name="smooth_mrz",path='media/image/skin/smooth_mrz.png'},
{name="simple_scf",path='media/image/skin/simple_scf.png'},
{name="glass_scf",path='media/image/skin/glass_scf.png'},
{name="penta_scf",path='media/image/skin/penta_scf.png'},
{name="bubble_scf",path='media/image/skin/bubble_scf.png'},
{name="minoes_scf",path='media/image/skin/minoes_scf.png'},
{name="pure_mrz",path='media/image/skin/pure_mrz.png'},
{name="bright_scf",path='media/image/skin/bright_scf.png'},
{name="glow_mrz",path='media/image/skin/glow_mrz.png'},
{name="plastic_mrz",path='media/image/skin/plastic_mrz.png'},
{name="paper_mrz",path='media/image/skin/paper_mrz.png'},
{name="yinyang_scf",path='media/image/skin/yinyang_scf.png'},
{name="cartooncup_earety",path='media/image/skin/cartooncup_earety.png'},
{name="jelly_miya",path='media/image/skin/jelly_miya.png'},
{name="brick_notypey",path='media/image/skin/brick_notypey.png'},
{name="gem_notypey",path='media/image/skin/gem_notypey.png'},
{name="classic",path='media/image/skin/classic_unknown.png'},
{name="ball_shaw",path='media/image/skin/ball_shaw.png'},
{name="retro_notypey",path='media/image/skin/retro_notypey.png'},
{name="pixel_chno",path='media/image/skin/pixel_chno.png'},
{name="textbone_mrz",path='media/image/skin/textbone_mrz.png'},
{name="coloredbone_mrz",path='media/image/skin/coloredbone_mrz.png'},
{name="wtf",path='media/image/skin/wtf_mrz.png'},
}
--Initialize sound libs
SFX.init((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/SFX')do
if fs.getRealDirectory('media/SFX/'..v)~=SAVEDIR then
table.insert(L,v:sub(1,-5))
else
MES.new('warn',"Dangerous file : %SAVE%/media/SFX/"..v)
end
end
return L
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
local L={}
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/')do
if isSafeFile('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v)then
table.insert(L,v:sub(1,-5))
end
end
return L
end)())
BGM.init((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/BGM')do
if fs.getRealDirectory('media/BGM/'..v)~=SAVEDIR then
table.insert(L,v:sub(1,-5))
else
MES.new('warn',"Dangerous file : %SAVE%/media/BGM/"..v)
end
end
return L
BGM.load((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/music')do
if isSafeFile('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then
L[v:sub(1,-5)]='media/music/'..v
end
end
return L
end)())
VOC.init{
'zspin','sspin','lspin','jspin','tspin','ospin','ispin',
'single','double','triple','techrash',
'mini','b2b','b3b',
'perfect_clear','half_clear',
'win','lose','bye',
'test','happy','doubt','sad','egg',
'welcome_voc',
'zspin','sspin','jspin','lspin','tspin','ospin','ispin','pspin','qspin','fspin','espin','uspin','vspin','wspin','xspin','rspin','yspin','nspin','hspin','cspin',
'single','double','triple','techrash','pentacrash','hexacrash',
'mini','b2b','b3b',
'perfect_clear','half_clear',
'win','lose','bye',
'test','happy','doubt',
'welcome',
}
--Initialize language lib
LANG.init(
{
require'parts.language.lang_zh',
require'parts.language.lang_zh2',
require'parts.language.lang_yygq',
require'parts.language.lang_en',
require'parts.language.lang_fr',
require'parts.language.lang_es',
require'parts.language.lang_pt',
require'parts.language.lang_symbol',
--1. Add language file to LANG folder;
--2. Require it;
--3. Add a button in parts/scenes/setting_lang.lua;
},
{
block={
"Z","S","J","L","T","O","I",
"Z5","S5","Q","P","F","E",
"T5","U","V","W","X",
"J5","L5","R","Y","N","H","I5",
"I3","C","I2","O1"
},
}
LANG.init('zh',
{
zh=require'parts.language.lang_zh',
zh_trad=require'parts.language.lang_zh_trad',
zh_full=require'parts.language.lang_zh_full',
en=require'parts.language.lang_en',
fr=require'parts.language.lang_fr',
es=require'parts.language.lang_es',
pt=require'parts.language.lang_pt',
id=require'parts.language.lang_id',
zh_grass=require'parts.language.lang_zh_grass',
zh_yygq=require'parts.language.lang_yygq',
symbol=require'parts.language.lang_symbol',
--1. Add language file to LANG folder;
--2. Require it;
--3. Add a button in parts/scenes/lang.lua;
},
{
block=BLOCK_NAMES
},
(function()
local tipMeta={__call=function(L)return L[math.random(#L)]end}
return function(L)
if type(rawget(L,'getTip'))=='table'then setmetatable(L.getTip,tipMeta)end
setmetatable(L,{__index=function(self,k)
local mes="No Text ("..SETTING.locale.."): "..k
LOG(mes)
MES.new('warn',mes)
self[k]=CHAR.zChan.thinking
return self[k]
end})
end
end)()
)
table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_))
--Load background files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems('parts/backgrounds')do
if fs.getRealDirectory('parts/backgrounds/'..v)~=SAVEDIR then
if v:sub(-3)=='lua'then
local name=v:sub(1,-5)
BG.add(name,require('parts.backgrounds.'..name))
end
end
if isSafeFile('parts/backgrounds/'..v)and v:sub(-3)=='lua'then
local name=v:sub(1,-5)
BG.add(name,require('parts.backgrounds.'..name))
end
end
BG.remList('none')BG.remList('gray')BG.remList('custom')
--Load scene files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems('parts/scenes')do
if fs.getRealDirectory('parts/scenes/'..v)~=SAVEDIR then
local sceneName=v:sub(1,-5)
SCN.add(sceneName,require('parts.scenes.'..sceneName))
LANG.addScene(sceneName)
end
end
--Load mode files
for i=1,#MODES do
local m=MODES[i]--Mode template
local M=require('parts.modes.'..m.name)--Mode file
for k,v in next,m do M[k]=v end
MODES[m.name],MODES[i]=M
if isSafeFile('parts/scenes/'..v)then
local sceneName=v:sub(1,-5)
SCN.add(sceneName,require('parts.scenes.'..sceneName))
LANG.addScene(sceneName)
end
end
table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
--Update data
do
local needSave
local needSave
if type(STAT.version)~='number'then
STAT.version=0
needSave=true
end
if STAT.version<1302 then
FILE.clear_s('')
end
if STAT.version<1405 then
fs.remove('conf/user')
fs.remove('conf/key')
end
if STAT.version<1505 then
fs.remove('record/bigbang.rec')
fs.remove('conf/replay')
end
if STAT.version~=VERSION.code then
STAT.version=VERSION.code
needSave=true
love.event.quit('restart')
end
if SETTING.ghostType=='greyCell'then
SETTING.ghostType='grayCell'
needSave=true
end
if not SETTING.VKSkin then SETTING.VKSkin=1 end
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then
SETTING.frameMul=100
end
SETTING.appLock=nil
SETTING.dataSaving=nil
for _,v in next,VK_org do v.color=nil end
if RANKS.infinite then RANKS.infinite=0 end
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
for k in next,RANKS do
if type(k)=='number'then
RANKS[k]=nil
needSave=true
end
end
for k,v in next,oldModeNameTable do
if RANKS[k]then
RANKS[v]=RANKS[k]
RANKS[k]=nil
end
k='record/'..k
if fs.getInfo(k..'.dat')then
fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
fs.remove(k..'.dat')
end
if fs.getInfo(k..'.rec')then
fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
fs.remove(k..'.rec')
end
end
if not RANKS.sprint_10l then
RANKS.sprint_10l=0
needSave=true
end
if not fs.getInfo('conf/data')then
needSave=true
end
if type(STAT.version)~='number'then
STAT.version=0
needSave=true
end
if STAT.version<1500 then
FILE.clear_s('')
end
if STAT.version<1505 then
fs.remove('record/bigbang.rec')
fs.remove('conf/replay')
end
if STAT.version==1506 then
local temp1,temp2
if fs.getInfo('record/master_l.rec')then
temp1=fs.read('record/master_l.rec')
end
if fs.getInfo('record/master_u.rec')then
temp2=fs.read('record/master_u.rec')
end
if temp1 then
fs.write('record/master_u.rec',temp1)
end
if temp2 then
fs.write('record/master_l.rec',temp2)
end
RANKS.master_l,RANKS.master_u=RANKS.master_u,RANKS.master_l
if RANKS.tsd_u then
RANKS.tsd_u=0
end
end
if STAT.version==1601 then
RANKS.round_e=nil
RANKS.round_n=nil
RANKS.round_h=nil
RANKS.round_l=nil
RANKS.round_u=nil
fs.remove('record/round_e.rec')
fs.remove('record/round_n.rec')
fs.remove('record/round_h.rec')
fs.remove('record/round_l.rec')
fs.remove('record/round_u.rec')
end
if STAT.version<1700 and SETTING.dascut<5 then
SETTING.dascut=SETTING.dascut+1
needSave=true
end
if SETTING.vocPack=='mono'then
SETTING.vocPack='miya'
end
if RANKS.stack_e then
RANKS.stack_e=nil
RANKS.stack_h=nil
RANKS.stack_u=nil
fs.remove('record/stack_e.rec')
fs.remove('record/stack_h.rec')
fs.remove('record/stack_u.rec')
end
if RANKS.stack_20l then
RANKS.stack_20l=nil
RANKS.stack_40l=nil
RANKS.stack_100l=nil
fs.remove('record/stack_20l.rec')
fs.remove('record/stack_40l.rec')
fs.remove('record/stack_100l.rec')
end
if RANKS.rhythm_e then
RANKS.rhythm_e=nil
RANKS.rhythm_h=nil
RANKS.rhythm_u=nil
fs.remove('record/rhythm_e.rec')
fs.remove('record/rhythm_h.rec')
fs.remove('record/rhythm_u.rec')
end
if RANKS.bigbang then
RANKS.clearRush,RANKS.bigbang=RANKS.bigbang
fs.remove('record/bigbang.rec')
end
if STAT.version~=VERSION.code then
for k,v in next,MODE_UPDATE_MAP do
if RANKS[k]then
RANKS[v]=RANKS[k]
RANKS[k]=nil
end
k='record/'..k
if fs.getInfo(k..'.dat')then
fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
fs.remove(k..'.dat')
end
if fs.getInfo(k..'.rec')then
fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
fs.remove(k..'.rec')
end
end
STAT.version=VERSION.code
needSave=true
end
SETTING.appLock,SETTING.dataSaving,SETTING.swap=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 not RSlist[SETTING.RS]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
if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end
if type(SETTING.bg)~='string'then SETTING.bg='on'end
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
if RANKS.infinite then RANKS.infinite=0 end
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
for _,v in next,VK_ORG do v.color=nil end
for name,rank in next,RANKS do
if type(name)=='number'or type(rank)~='number'then
RANKS[name]=nil
needSave=true
end
end
if needSave then
FILE.save(SETTING,'conf/settings')
FILE.save(RANKS,'conf/unlock')
FILE.save(STAT,'conf/data')
end
if needSave then
saveStats()
saveProgress()
saveSettings()
love.event.quit('restart')
end
end
--First start
FIRSTLAUNCH=STAT.run==0
if FIRSTLAUNCH and MOBILE then
SETTING.VKSwitch=true
SETTING.powerInfo=true
SETTING.cleanCanvas=true
end
--Apply system setting
LANG.set(SETTING.lang)
VK.setShape(SETTING.VKSkin)
applyBlockSatur(SETTING.blockSatur)
applyFieldSatur(SETTING.fieldSatur)
applySettings()
--Load replays
for _,fileName in next,fs.getDirectoryItems('replay')do
if fileName:sub(12,12):match("[a-zA-Z]")then
local date,mode,version,player,seed,setting,mod
local fileData=fs.read('replay/'..fileName)
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
mode, fileData=STRING.readLine(fileData)mode=oldModeNameTable[mode]or mode
version,fileData=STRING.readLine(fileData)
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
local success
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
if not success then goto BREAK_cannotParse end
seed, fileData=STRING.readLine(fileData)
setting,fileData=STRING.readLine(fileData)setting=JSON.decode(setting)
mod, fileData=STRING.readLine(fileData)mod=JSON.decode(mod)
if
not setting or
not mod or
not mode or
#mode==0
then goto BREAK_cannotParse end
if fileName:sub(12,12):match("[a-zA-Z]")then
local date,mode,version,player,seed,setting,mod
local fileData=fs.read('replay/'..fileName)
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode
version,fileData=STRING.readLine(fileData)
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
local success
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
if not success then goto BREAK_cannotParse end
seed, fileData=STRING.readLine(fileData)
setting,fileData=STRING.readLine(fileData)setting=JSON.decode(setting)
mod, fileData=STRING.readLine(fileData)mod=JSON.decode(mod)
if
not setting or
not mod or
not mode or
#mode==0
then goto BREAK_cannotParse end
fs.remove('replay/'..fileName)
local newName=fileName:sub(1,10)..fileName:sub(15)
fs.write('replay/'..newName,
love.data.compress('string','zlib',
JSON.encode{
date=date,
mode=mode,
version=version,
player=player,
seed=seed,
setting=setting,
mod=mod,
}.."\n"..
fileData
)
)
fileName=newName
end
::BREAK_cannotParse::
local rep=DATA.parseReplay('replay/'..fileName)
table.insert(REPLAY,rep)
fs.remove('replay/'..fileName)
local newName=fileName:sub(1,10)..fileName:sub(15)
fs.write('replay/'..newName,
love.data.compress('string','zlib',
JSON.encode{
date=date,
mode=mode,
version=version,
player=player,
seed=seed,
setting=setting,
mod=mod,
}.."\n"..
fileData
)
)
fileName=newName
end
::BREAK_cannotParse::
local rep=DATA.parseReplay('replay/'..fileName)
table.insert(REPLAY,rep)
end
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end)
table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_))
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i])end
--Launch testing task if launch param received
if TABLE.find(arg,'--test')then
TASK.new(function()
while not LOADED do YIELD()end
LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
BGM.setVol(0)SFX.setVol(0)
love.keypressed('space')
TEST.yieldUntilNextScene()
for k,mode in next,MODES do
if k~='netBattle'then
LOG("Scanning mode: "..mode.name)
loadGame(mode.name,true)
TEST.yieldUntilNextScene()
SCN.back()
TEST.yieldUntilNextScene()
end
end
LOG("\27[92m\27[1mAutomatic Test Passed :)\27[0m")
TEST.yieldN(60)
love.event.quit(0)
end)
TASK.new(function()
while true do
YIELD()
if Z.getErr(1)then break end
end
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m")
TEST.yieldN(60)
love.event.quit(1)
end)
end
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More