-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 459b58f
Showing
579 changed files
with
12,285 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/storage/emulated/0/repo/AGL2D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
android:compileSdkVersion="33" | ||
android:compileSdkVersionCodename="13" | ||
package="com.genouka.cutelove2d" | ||
platformBuildVersionCode="33" | ||
platformBuildVersionName="13" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- 允许该应用查看WLAN网络的相关信息,例如是否启用了WLAN以及连接的WLAN设备的名称。 --> | ||
<uses-permission | ||
android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<!-- 允许该应用查看网络连接的相关信息,例如存在和连接的网络。 --> | ||
<uses-permission | ||
android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<!-- 允许该应用创建网络套接字和使用自定义网络协议。浏览器和其他某些应用提供了向互联网发送数据的途径,因此应用无需该权限即可向互联网发送数据。 --> | ||
<uses-permission | ||
android:name="android.permission.INTERNET" /> | ||
<!-- 允许该应用写入您共享存储空间中的内容。 --> | ||
<uses-permission | ||
android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<!-- 允许应用控制振动器。 --> | ||
<uses-permission | ||
android:name="android.permission.VIBRATE" /> | ||
<!-- 允许该应用读取您共享存储空间中的内容。 --> | ||
<uses-permission | ||
android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-feature | ||
android:glEsVersion="0x20000" /> | ||
<application | ||
android:theme="@style/AppTheme" | ||
android:label="AGL2D" | ||
android:icon="@drawable/ic_launcher" | ||
android:name="com.androlua.LuaApplication" | ||
android:usesCleartextTraffic="true" | ||
android:resizeableActivity="true" | ||
android:supportsPictureInPicture="true" | ||
android:requestLegacyExternalStorage="true"> | ||
<uses-library | ||
android:name="org.apache.http.legacy" | ||
android:required="false" /> | ||
<meta-data | ||
android:name="android.max_aspect" | ||
android:value="4" /> | ||
<activity | ||
android:label="@string/app_name" | ||
android:name="com.androlua.Main" | ||
android:launchMode="singleTask" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:windowSoftInputMode="adjustResize|stateHidden" /> | ||
<activity | ||
android:label="@string/app_name" | ||
android:name="com.androlua.LuaActivity" | ||
android:exported="true" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:windowSoftInputMode="adjustResize|stateHidden" /> | ||
<activity | ||
android:label="@string/app_name" | ||
android:name="com.androlua.LuaActivityX" | ||
android:exported="true" | ||
android:excludeFromRecents="false" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:windowSoftInputMode="adjustResize|stateHidden" | ||
android:documentLaunchMode="intoExisting" /> | ||
<activity | ||
android:label="@string/app_name" | ||
android:name="com.androlua.Welcome" | ||
android:exported="true" | ||
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen" | ||
android:windowSoftInputMode="adjustResize|stateHidden"> | ||
<intent-filter> | ||
<action | ||
android:name="android.intent.action.MAIN" /> | ||
<category | ||
android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<provider | ||
android:name="android.content.FileProvider" | ||
android:exported="false" | ||
android:authorities="com.genouka.cutelove2d" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/androlua_filepaths" /> | ||
</provider> | ||
<activity | ||
android:label="@string/app_name" | ||
android:name="org.love2d.android.GameActivity" | ||
android:exported="true" | ||
android:launchMode="singleTask" | ||
android:screenOrientation="sensorLandscape" | ||
android:configChanges="orientation|screenSize" /> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
木兰宽松许可证, 第2版 | ||
|
||
2020年1月 http://license.coscl.org.cn/MulanPSL2 | ||
|
||
您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: | ||
|
||
0. 定义 | ||
|
||
“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 | ||
|
||
“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 | ||
|
||
“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 | ||
|
||
“法人实体” 是指提交贡献的机构及其“关联实体”。 | ||
|
||
“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 | ||
|
||
1. 授予版权许可 | ||
|
||
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 | ||
|
||
2. 授予专利许可 | ||
|
||
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 | ||
|
||
3. 无商标许可 | ||
|
||
“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 | ||
|
||
4. 分发限制 | ||
|
||
您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 | ||
|
||
5. 免责声明与责任限制 | ||
|
||
“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 | ||
|
||
6. 语言 | ||
|
||
“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 | ||
|
||
条款结束 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# AGL2D | ||
(Androlua Genouka LOVE2D) | ||
|
||
NOTES: | ||
|
||
Here is only Chinese documents now. | ||
|
||
We’re open to accept PRs that translate our README into English. You’re welcome to submit one. | ||
|
||
# 简介/INTRODUCION | ||
这是个把LOVE2D 11.4和Androlua(lua 5.3)融合的引擎! | ||
|
||
手机写游戏的新福音! | ||
|
||
本项目可以做什么? | ||
|
||
它可以支持在你的项目中: | ||
|
||
* 轻松弹出Toast框(见示例) | ||
* 访问外部储存(见示例) | ||
* 使用WebView截取网页内容 | ||
* 下载文件 | ||
* 做你能想到的任何事情! | ||
|
||
这个项目起抛砖引玉的作用,欢迎提交PR充实本项目。 | ||
|
||
**如果你有更好的办法完全重构,我也非常愿意开启新分支与你们一起贡献这个项目!** | ||
|
||
你可以在这个引擎里自由的调用Androlua代码! | ||
|
||
本项目的一部分是基于`LOVE2D 11.4 embed`版本的二进制文件反编译而来的,以便和Androlua的项目进行融合。 | ||
|
||
|
||
# 示例/EXAMPLE | ||
|
||
**本项目就是本项目的示例,你可以克隆本仓库直接使用!** | ||
|
||
本项目的编译、二次修改方法请参见下一节。 | ||
|
||
game.love是一个压缩包格式文件,请解压以查看源码。 | ||
|
||
`assets/game.love/main.lua` | ||
```lua | ||
--GenOuka 2024.02.12 | ||
--AGL2D:让LOVE2D和Androlua产生爱的火花 | ||
--轻松完成原生LOVE2D做不到的事情! | ||
--如果您将本项目以任何方式用于自己的游戏,请在游戏中提到GenOuka和AGL2D的名字(两者都要!) | ||
|
||
lls=require("lls") | ||
lg=love.graphics | ||
|
||
function love.load() | ||
--初始化必须调用一次且只能调用一次 | ||
lls.init() | ||
|
||
local a=[====[ | ||
--AGL使用示例 | ||
--显示字符串 | ||
print("AGL2D GenOuka") | ||
--读取sdcard目录下文件数量 | ||
import "java.io.File" | ||
print("/sdcard/目录下的文件数目:"..#(File("/sdcard/").list())) | ||
--想玩出更多花样请去了解Androlua的知识! | ||
]====] | ||
--由于是跨线程调用,无法使用当前环境的变量! | ||
--调用是阻塞式的,如果不想阻塞请自行新建线程 | ||
lls.run(a) | ||
end | ||
function love.draw() | ||
lg.print([[AGL2D Example ( Bilibili: @GenOuka) | ||
You will see a Toast showed by Androlua. | ||
You have boundless power to do what you want to do!]],50,50) | ||
end | ||
|
||
function love.quit() | ||
--关闭程序时必须调用一次,不然下次无法使用,调用后不能再使用lls.run运行代码! | ||
lls.close() | ||
return false | ||
end | ||
``` | ||
|
||
# 如何使用、编译、修改/How to use, compile or edit | ||
|
||
## 方法一:修改安装包(推荐) | ||
|
||
从Release下载安装包,修改assets内文件后重新签名。 | ||
|
||
建议只修改`assets/game.love`内的文件。 | ||
|
||
## 方法二:修改源码 | ||
|
||
克隆仓库,使用Apktool M工具进行回编译即可。 | ||
|
||
建议只修改`assets/game.love`内的文件。 | ||
|
||
assets下所有文件会被当做Androlua的代码,会被提取到`data/data/<package_name>/files/`目录下(包括game.love) | ||
|
||
game.love内的所有文件会被LOVE2D引擎进行解析。 | ||
|
||
Androlua代码和LOVE2D代码目前使用Socket进行通信,如果有更好的实现欢迎PR和issue! | ||
|
||
# lls.lua | ||
提供了一系列接口方便调用Androlua代码。 | ||
|
||
下面介绍提供的接口: | ||
|
||
## lls.init() | ||
初始化socket,只能调用一次,否则会出现意外的问题。 | ||
|
||
## lls.run(code) | ||
运行Androlua代码,支持多行。 | ||
|
||
code是字符串,可参考示例。 | ||
|
||
阻塞调用,如果需要非阻塞请在线程中使用。 | ||
|
||
本函数线程安全。 | ||
|
||
## lls.close() | ||
关闭socket,一旦关闭在本次游戏中将无法再开启 | ||
|
||
# 许可证/LICENSE | ||
|
||
本项目使用的Androlua源码部分使用MIT协议进行授权,因此本项目可以直接使用其源码。 | ||
|
||
本项目使用的LOVE2D源码部分使用zlib协议进行授权。**由于本项目是由LOVE2D二进制文件的反编译项目生成而来,可能已经丢失原本的LICENSE文件,在此致歉!**根据zlib协议,以下协议应该是不与其冲突的。 | ||
|
||
本项目除了assets目录以外,均使用木兰宽松许可证2授权,详见`LICENSE`文件。 | ||
|
||
本项目的assets目录使用MIT协议授权,详见`assets/LICENSE`文件。 | ||
|
||
|
||
**我不是律师,如果有任何问题请咨询你的律师!** | ||
|
||
# LICENSE 之外的承诺 | ||
如需要使用此项目,请尽量满足下列条件: | ||
|
||
1.在其他开源项目中,遵守其 LICENSE; | ||
|
||
2.不以「不开源」为理由,对任何闭源,或开源转为闭源项目发起辱骂或对其作者施行人身攻击; | ||
|
||
以上承诺不具备法律效力,但希望您能够遵守。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"apkFileName": "AGL2D_v1.2(1100)_src.apk", | ||
"PackageInfo": { | ||
"forcedPackageId": "127", | ||
"renameManifestPackage": null | ||
}, | ||
"doNotCompress": [ | ||
"resources.arsc", | ||
"png" | ||
], | ||
"compressionType": false, | ||
"sparseResources": false, | ||
"version": "2.4.0-240126", | ||
"sharedLibrary": false, | ||
"VersionInfo": { | ||
"versionName": "1.2", | ||
"versionCode": "1100" | ||
}, | ||
"UsesFramework": { | ||
"ids": [1], | ||
"tag": null | ||
}, | ||
"unknownFiles": { | ||
"lua/permission.lua": "8", | ||
"lua/loadmenu.lua": "8", | ||
"lua/socket/url.lua": "8", | ||
"lua/hex.lua": "8", | ||
"lua/socket/headers.lua": "8", | ||
"lua/xml.lua": "8", | ||
"lua/base64.lua": "8", | ||
"lua/loadbitmap.lua": "8", | ||
"lua/http.lua": "8", | ||
"okhttp3/internal/publicsuffix/NOTICE": "8", | ||
"lua/json.lua": "8", | ||
"lua/loadlayout.lua": "8", | ||
"okhttp3/internal/publicsuffix/publicsuffixes.gz": "8", | ||
"lua/import.lua": "8", | ||
"lua/socket/tp.lua": "8", | ||
"META-INF/com/android/build/gradle/app-metadata.properties": "8", | ||
"lua/socket.lua": "8" | ||
}, | ||
"apkFilePath": "/data/app/~HpyP3SsYUlwIyQgs3rrFRw==/com.genouka.cutelove2d-vx11zQY0DvG30CtIedygmA==/base.apk", | ||
"isFrameworkApk": false, | ||
"sdkInfo": { | ||
"minSdkVersion": "21", | ||
"targetSdkVersion": "29" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Copyright (C) 2024 GenOuka | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Binary file not shown.
Oops, something went wrong.