Compare commits

..

16 Commits

Author SHA1 Message Date
MrZ626
707bcca368 Merge commit 'f8f115de10b4ef7818cf58bc03c9d75700e425b0' into test-new-mode-system 2021-12-27 14:26:32 +08:00
MrZ626
0498beecdf 特化新的模式选择场景名 2021-12-16 03:04:35 +08:00
MrZ626
b642f2b5c4 Merge branch 'main' into test-new-mode-system 2021-12-16 02:32:51 +08:00
MrZ626
462720881a 支持鼠标滚动模式列表 2021-12-16 02:07:49 +08:00
MrZ626
c9f8240234 添加模式搜索的帮助文本 2021-12-10 13:22:42 +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
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
5470387685 优化滚动
增加触摸控制
2021-12-09 15:55:09 +08:00
MrZ626
2f4a416353 整理代码
调整模式排列顺序
2021-12-09 15:13:09 +08:00
MrZ626
3dbafb042c 进一步优化 2021-12-09 15:04:17 +08:00
MrZ626
28103ad952 新模式选择菜单原型
删除模式图标
动态加载所有模式
2021-12-09 03:20:57 +08:00
1177 changed files with 15334 additions and 34514 deletions

View File

@@ -1,31 +0,0 @@
# EmmyLuaCodeStyle
[*.lua]
max_line_length = 26000
indent_style = space
insert_final_newline = true
space_around_table_field_list = false
space_before_attribute = false
space_before_function_call_open_parenthesis = false
space_before_closure_open_parenthesis = false
space_before_function_call_single_arg = false
space_before_open_square_bracket = false
space_inside_function_call_parentheses = false
space_inside_function_param_list_parentheses = false
space_inside_square_brackets = false
space_around_table_append_operator = false
space_before_inline_comment = false
space_around_math_operator = false
space_around_logical_operator = false
space_around_assign_operator = false
space_after_comma = false
space_after_comma_in_for_statement = false
space_around_concat_operator = false
align_call_args = false
align_function_params = false
align_continuous_assign_statement = true
align_continuous_rect_table_field = true
align_if_branch = false
align_array_table = true
ignore_spaces_inside_function_call = true
line_space_after_function_statement = keep
trailing_table_separator = smart

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
* text=auto

View File

@@ -1,2 +0,0 @@
actions/**/*.yml text eol=lf
workflows/*.yml text eol=lf

View File

@@ -1,16 +0,0 @@
# Techmino - 500-star Banner
Created by NOT_A_ROBOT
13 September, 2024
**Don't forget to attribute me when using this.**
The image already includes sufficient attribution, so if you just don't crop that out, you shouldn't need to explicitly mention them.
## Attribution
Created by NOT_A_ROBOT
GitHub logo (on Z-character's screen) by GitHub
Background (space stars) originally by MrZ, ported to JS by NOT_A_ROBOT for rendering
Block skin (featured in the background) by Scf, slightly modified to make it darker
Z-character drawn by 葉枭, designed by MrZ
Techmino by MrZ and many contributors
Techmino is fun! https://github.com/26F-Studio/Techmino

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -1,8 +1,8 @@
---
name: Bug report (bluescreen crash) Bug报告 (蓝屏报错)
about: Create a bug report which causes a bluescreen crash
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 what causes the game to crash, like pressing a key/button (*Details 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

@@ -1,8 +1,8 @@
---
name: Bug report (unintended behaviors) Bug报告 (奇怪的现象)
about: Create bug report that causes unintended behaviors
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 what causes the unintended behavior, like pressing a key/button (*Details 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

@@ -2,7 +2,3 @@
name: Feature Request 添加新功能
about: Suggest an idea that may improve Techmino 提一些有意思的新想法,让Techmino越来越好!
---
### What feature do you want to suggest to the game?

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 }}

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

View File

Before

Width:  |  Height:  |  Size: 11 KiB

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

@@ -8,12 +8,9 @@ FILETYPE 0x1
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Techmino Alpha"
VALUE "CompanyName", "26F Studio"
VALUE "FileDescription", "Techmino"
VALUE "FileVersion", "@Version"
VALUE "InternalName", "Techmino"
VALUE "LegalCopyright", "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
VALUE "OriginalFilename", "Techmino.exe"
VALUE "LegalCopyright", "Copyright @ 26F Studio"
VALUE "ProductName", "Techmino"
VALUE "ProductVersion", "@Version"
}

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,106 +0,0 @@
diff --git a/src/common/ios.h b/src/common/ios.h
index c1932555..552e432e 100644
--- a/src/common/ios.h
+++ b/src/common/ios.h
@@ -66,7 +66,7 @@ std::string getExecutablePath();
/**
* Causes devices with vibration support to vibrate for about 0.5 seconds.
**/
-void vibrate();
+void vibrate(const double seconds);
/**
* Enable mix mode (e.g. with background music apps) and playback with a muted device.
diff --git a/src/common/ios.mm b/src/common/ios.mm
index 7730991e..4ba8e708 100644
--- a/src/common/ios.mm
+++ b/src/common/ios.mm
@@ -36,6 +36,8 @@
#include <SDL_video.h>
#include <SDL_syswm.h>
+#include <sys/utsname.h>
+
static NSArray *getLovesInDocuments();
static bool deleteFileInDocuments(NSString *filename);
@@ -391,10 +393,40 @@ std::string getExecutablePath()
}
}
-void vibrate()
+void vibrate(const double seconds)
{
@autoreleasepool
{
+ struct utsname systemInfo;
+ uname(&systemInfo);
+ NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
+ NSRange iPhoneRange = [deviceString rangeOfString:@"iPhone"];
+ if (iPhoneRange.length == 6) {
+ NSRange commaRange = [deviceString rangeOfString:@","];
+ NSString *iPhone = [deviceString substringWithRange:iPhoneRange];
+ NSRange numRange = NSMakeRange(iPhoneRange.location + iPhoneRange.length, commaRange.location - iPhoneRange.location - iPhoneRange.length);
+ NSString *num = [deviceString substringWithRange:numRange];
+
+ if ([num intValue] >= 9) {
+ // iPhone 7 and above, see: https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt-L22
+
+ if (@available(iOS 10.0, *)) {
+ // iOS 10.0 and above
+ UIImpactFeedbackGenerator *impact = nil;
+ if (seconds >= 0.5 && seconds < 1.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleLight]; // 轻
+ } else if (seconds >= 1.5 && seconds < 2.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium]; // 中
+ } else if (seconds >= 2.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy]; // 重
+ } else {
+ return;
+ }
+ [impact impactOccurred];
+ return;
+ }
+ }
+ }
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
}
diff --git a/src/love.cpp b/src/love.cpp
index c8af8596..ae7a5e32 100644
--- a/src/love.cpp
+++ b/src/love.cpp
@@ -140,6 +140,10 @@ enum DoneAction
DONE_RESTART,
};
+extern "C" {
+ int luaopen_CCloader(lua_State *L);
+}
+
static DoneAction runlove(int argc, char **argv, int &retval)
{
// Oh, you just want the version? Okay!
@@ -158,6 +162,9 @@ static DoneAction runlove(int argc, char **argv, int &retval)
lua_State *L = luaL_newstate();
luaL_openlibs(L);
+ // Init CCloader
+ luaopen_CCloader(L);
+
// LuaJIT-specific setup needs to be done as early as possible - before
// get_app_arguments because that loads external library code. This is also
// loaded inside require("love"). Note that it doesn't use the love table.
diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp
index e1de16d5..e0f03557 100644
--- a/src/modules/system/System.cpp
+++ b/src/modules/system/System.cpp
@@ -174,7 +174,7 @@ void System::vibrate(double seconds) const
#ifdef LOVE_ANDROID
love::android::vibrate(seconds);
#elif defined(LOVE_IOS)
- love::ios::vibrate();
+ love::ios::vibrate(seconds);
#else
LOVE_UNUSED(seconds);
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

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