Skip to content

Commit

Permalink
Mobile Port (by Mobile Porting Team)
Browse files Browse the repository at this point in the history
With some changes by Ne_Eo

Co-Authored-By: Lily <[email protected]>
  • Loading branch information
NeeEoo and mcagabe19 committed Sep 20, 2024
1 parent 0b22165 commit 6a2b8a8
Show file tree
Hide file tree
Showing 109 changed files with 4,441 additions and 138 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ labels: bug
[ ] Windows
[ ] Linux
[ ] Mac
[ ] Android
[ ] iOS

### Explain your issue
##### Please check first if your issue haven't already been reported yet.
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ labels: compiling help
[ ] Windows
[ ] Linux
[ ] Mac
[ ] Android
[ ] iOS

### Explain your issue
##### Please check first if your issue haven't already been reported yet, and make sure you ran the `update.bat` file before building.
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Main
on: workflow_dispatch
jobs:
Desktop:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-12, macos-14]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Install libVLC (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install libvlc-dev libvlccore-dev
- name: Install Libraries
run: |
haxelib install hmm --quiet
haxelib run hmm install --quiet
- name: Compile (Windows)
if: startsWith(matrix.os, 'windows')
run: haxelib run lime build windows
- name: Compile (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: haxelib run lime build linux
- name: Compile (macOS)
if: startsWith(matrix.os, 'macos')
run: haxelib run lime build mac
- name: Upload Artifact (Windows)
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@main
with:
name: windowsBuild
path: export\release\windows\bin\*
if-no-files-found: error
- name: Upload Artifact (Linux)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@main
with:
name: linuxBuild
path: export/release/linux/bin/*
if-no-files-found: error
- name: Upload Artifact (macOS 12)
if: matrix.os == 'macos-12'
uses: actions/upload-artifact@main
with:
name: macOSBuild-x86_64
path: export/release/macos/bin/*
if-no-files-found: error
- name: Upload Artifact (macOS 14)
if: matrix.os == 'macos-14'
uses: actions/upload-artifact@main
with:
name: macOSBuild-arm64
path: export/release/macos/bin/*
if-no-files-found: error
Mobile:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Install Libraries
run: |
haxelib install hmm --quiet
haxelib run hmm install --quiet
- name: Configure Android
if: startsWith(matrix.os, 'ubuntu')
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64
haxelib run lime config ANDROID_SETUP true
- name: Compile (Android)
if: startsWith(matrix.os, 'ubuntu')
run: haxelib run lime build android -ONLY_ARMV7
- name: Compile (iOS)
if: startsWith(matrix.os, 'macos')
run: haxelib run lime build ios -nosign
- name: Make Ipa
if: startsWith(matrix.os, 'macos')
run: |
cd export/release/ios/build/*-iphoneos
mkdir Payload
mv *.app Payload
zip -r CodenameEngine.ipa Payload
- name: Upload Artifact (Android)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@main
with:
name: androidBuild
path: export/release/android/bin/app/build/outputs/apk/release/*.apk
if-no-files-found: error
- name: Upload Artifact (iOS)
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@main
with:
name: iOSBuild
path: export/release/ios/build/Release-iphoneos/*.ipa
if-no-files-found: error
82 changes: 82 additions & 0 deletions .github/workflows/mobile-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Mobile + Release
on: workflow_dispatch
jobs:
Mobile:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Install Libraries
run: |
haxelib install hmm --quiet
haxelib run hmm install --quiet
- name: Configure Android
if: startsWith(matrix.os, 'ubuntu')
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64
haxelib run lime config ANDROID_SETUP true
- name: Compile (Android)
if: startsWith(matrix.os, 'ubuntu')
run: haxelib run lime build android -final
- name: Compile (iOS)
if: startsWith(matrix.os, 'macos')
run: haxelib run lime build ios -final -nosign
- name: Make Ipa And Zip For Release
if: startsWith(matrix.os, 'macos')
run: |
cd export/release/ios/build/*-iphoneos
mkdir Payload
mv *.app Payload
zip -r CodenameEngine.ipa Payload
zip CodenameEngine-iOS.zip CodenameEngine.ipa
- name: Upload Artifact (Android)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@main
with:
name: androidBuild
path: export/release/android/bin/app/build/outputs/apk/release/*.apk
if-no-files-found: error
- name: Upload Artifact (iOS)
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@main
with:
name: iOSBuild
path: export/release/ios/build/Release-iphoneos/*.zip
if-no-files-found: error
Releaser:
needs: [Mobile]
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Download Android Build
uses: actions/download-artifact@main
with:
name: androidBuild
path: /home/runner
- name: Move Android File
run: mv /home/runner/CodenameEngine-release.apk /home/runner/CodenameEngine-Android.apk
- name: Download iOS Build
uses: actions/download-artifact@main
with:
name: iOSBuild
path: /home/runner
- name: Publish The Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "dev-ca565de"
title: "DevBuild ca565de"
files: |
/home/runner/*.apk
/home/runner/*.zip
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ In the future (when the engine won't be a WIP anymore) we're gonna also publish
- Credits to Smokey555 for the backup Animate Atlas to spritesheet code
- Credits to MAJigsaw77 for [hxvlc](https://github.com/MAJigsaw77/hxvlc) (video cutscene/mp4 support) and [hxdiscord_rpc](https://github.com/MAJigsaw77/hxdiscord_rpc) (discord rpc integration)
</details>

<details>
<summary><h2>Mobile Credits</h2></summary>

- Credits to [Lily](ttps://youtube.com/@mcagabe19) to porting the engine
- Credits to [Karim Akra](https://youtube.com/@Karim0690) to helping me to port the engine
- Credits to [MAJigsaw77](https://github.com/MAJigsaw77) for mobile controls
</details>
2 changes: 2 additions & 0 deletions assets/data/config/options.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE codename-mod-options>
<!-- TEMPLATE FOR CUSTOM OPTIONS!!! -->
<menu name="Mod Options" desc="Modify mod options here">
<virtualPad name="virtualPad" menuName="Mod Options" dpadMode="LEFT_FULL" actionMode="A_B" />
<checkbox id="checkboxExample" name="Checkbox example" />
<number id="numberExample" name="Number example" min="0" max="10" change="1"/>
<choice id="choiceExample" name="Choice Example">
Expand All @@ -11,5 +12,6 @@

<menu name="Submenu Example" desc="Submenu test">
<checkbox id="levelOfIdk2" name="Level of idk" />
<virtualPad name="virtualPad" menuName="Submenu Example" dpadMode="NONE" actionMode="A_B" />
</menu>
</menu>
3 changes: 3 additions & 0 deletions assets/data/scripts/week6-pause.hx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ function create(event) {
cameras = [pauseCam];

FlxG.sound.play(Paths.sound(isThorns ? 'pixel/ANGRY' : 'pixel/clickText'));

addVirtualPad('UP_DOWN', 'A');
addVirtualPadCamera(false);
}

function confText(text) {
Expand Down
Binary file added assets/images/mobile/menu/arrows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/images/mobile/menu/arrows.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<TextureAtlas imagePath="arrows.png">
<SubTexture name="arrow left0000" x="0" y="0" width="48" height="85" frameX="0" frameY="0" frameWidth="48" frameHeight="85" />
<SubTexture name="arrow push left0000" x="48" y="0" width="42" height="75" frameX="0" frameY="0" frameWidth="42" frameHeight="75" />
</TextureAtlas>
Binary file added assets/images/mobile/virtualpad/a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/g.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/i.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/j.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/k.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/o.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/q.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mobile/virtualpad/u.png
Binary file added assets/images/mobile/virtualpad/up.png
Binary file added assets/images/mobile/virtualpad/v.png
Binary file added assets/images/mobile/virtualpad/w.png
Binary file added assets/images/mobile/virtualpad/x.png
Binary file added assets/images/mobile/virtualpad/y.png
Binary file added assets/images/mobile/virtualpad/z.png
87 changes: 87 additions & 0 deletions hmm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"dependencies": [
{
"name": "lime",
"type": "git",
"dir": null,
"ref": "develop",
"url": "https://github.com/mcagabe19-stuff/lime"
},
{
"name": "hscript-improved",
"type": "git",
"dir": null,
"ref": "custom-classes",
"url": "https://www.github.com/FNF-CNE-Devs/hscript-improved"
},
{
"name": "openfl",
"type": "haxelib",
"version": "9.2.2"
},
{
"name": "away3d",
"type": "git",
"dir": null,
"ref": "master",
"url": "https://github.com/FNF-CNE-Devs/away3d"
},
{
"name": "format",
"type": "haxelib",
"version": null
},
{
"name": "markdown",
"type": "haxelib",
"version": null
},
{
"name": "flixel",
"type": "git",
"dir": null,
"ref": "dev",
"url": "https://github.com/FNF-CNE-Devs/flixel"
},
{
"name": "flixel-addons",
"type": "git",
"dir": null,
"ref": "dev",
"url": "https://github.com/FNF-CNE-Devs/flixel-addons"
},
{
"name": "hxcpp",
"type": "git",
"dir": null,
"ref": "master",
"url": "https://github.com/mcagabe19-stuff/hxcpp"
},
{
"name": "hxvlc",
"type": "haxelib",
"version": null
},
{
"name": "hxdiscord_rpc",
"type": "git",
"dir": null,
"ref": "main",
"url": "https://github.com/FNF-CNE-Devs/hxdiscord_rpc"
},
{
"name": "extension-androidtools",
"type": "git",
"dir": null,
"ref": "main",
"url": "https://github.com/MAJigsaw77/extension-androidtools"
},
{
"name": "flxanimate",
"type": "git",
"dir": null,
"ref": "master",
"url": "https://github.com/FNF-CNE-Devs/flxanimate"
}
]
}
Binary file added key.keystore
Binary file not shown.
Loading

0 comments on commit 6a2b8a8

Please sign in to comment.