Skip to content

Commit

Permalink
New Port: Shirobi: Metal Ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganimoth committed Oct 18, 2024
1 parent fcbd544 commit 4096418
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ports/shirobimetal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Notes

Thanks to NoahNCopeland for developing the game, check it out on https://gamejolt.com/games/shirobimetalninja/582435

## Controls

| Button | Action |
|--|--|
|DPAD/LSTICK|Movement|
|A|Jump|
|B/L1|Burst|
|X|Shoot|
|Y|Grenade|
|L2|Diagonal aim|
|R1/R2|Shuriken|


52 changes: 52 additions & 0 deletions ports/shirobimetal/Shirobi - Metal Ninja.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt

get_controls
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

GAMEDIR="/$directory/ports/shirobimetal"

export LD_LIBRARY_PATH="/usr/lib:$GAMEDIR/libs:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

cd $GAMEDIR

# We log the execution of the script into log.txt
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

# Rename data.win
[ -f "./data.win" ] && mv data.win game.droid


# Check if there are .ogg files in port folder
if [ -n "$(ls ./*.ogg 2>/dev/null)" ]; then
# Move all .ogg files from port folder to ./assets
mkdir -p ./assets
mv ./*.ogg ./assets/ || exit 1

# Zip the contents of ./game.apk including the .ogg files
zip -r -0 ./game.apk ./assets/ || exit 1
rm -Rf "$GAMEDIR/assets/" || exit 1
fi

$GPTOKEYB "gmloadernext" -c "shirobi.gptk" &
pm_platform_helper "$GAMEDIR/gmloadernext"

$ESUDO chmod +x "$GAMEDIR/gmloadernext"

./gmloadernext game.apk

pm_finish
13 changes: 13 additions & 0 deletions ports/shirobimetal/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<gameList>
<game>
<path>./Shirobi - Metal Ninja.sh</path>
<name>Shirobi: Metal Ninja</name>
<desc>Old school, 8-bit, Metroidvania. A Robotic Ninja searches an uncharted planet for his long lost father, made in 5 days as part of Global Game Jam 2021</desc>
<releasedate>20210204T000000</releasedate>
<developer>NoahNCopeland</developer>
<publisher>NoahNCopeland</publisher>
<genre>Platformer</genre>
<image>./shirobimetal/screenshot.png</image>
</game>
</gameList>
30 changes: 30 additions & 0 deletions ports/shirobimetal/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 3,
"name": "shirobimetal.zip",
"items": [
"Shirobi - Metal Ninja.sh",
"shirobimetal"
],
"items_opt": [],
"attr": {
"title": "Shirobi: Metal Ninja",
"porter": [
"Ganimoth"
],
"desc": "Old school, 8-bit, Metroidvania. A Robotic Ninja searches an uncharted planet for his long lost father, made in 5 days as part of Global Game Jam 2021",
"desc_md": null,
"inst": "Download the game from gamejolt https://gamejolt.com/games/shirobimetalninja/582435 and extract the data.win and ogg files into the port folder.",
"inst_md": null,
"genres": [
"platformer"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": null,
"reqs": [],
"arch": [
"aarch64"
]
}
}
Binary file added ports/shirobimetal/screenshot.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 ports/shirobimetal/shirobimetal/game.apk
Binary file not shown.
Binary file added ports/shirobimetal/shirobimetal/gmloadernext
Binary file not shown.
17 changes: 17 additions & 0 deletions ports/shirobimetal/shirobimetal/lib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# What are those?

Those are native Android libraries meant to be loaded into the guest environment,
and the come from a [prebuilt AOSP image provided by google](https://ci.android.com/builds/branches/aosp-main/grid).

# What are these files for then?

They provide a similar-to-android implementation to all of the supported libraries,
allowing us to make less guesswork, and provide more accurate renditions of a lot
of those functionalities, specially for libc++ where a lot of guesswork was done
in the past.

OpenAL, OpenGL and libc.so are provided from the host (via thunking where needed) or
via reimplementations.

You still need a suitable GameMaker Android title/runner. You can source those from
either [freeware Android APKs](https://itch.io) or finding a [suitable runner](https://gamemaker.io/account/runtimes) for hacking.
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 added ports/shirobimetal/shirobimetal/libs/libzip.so.5
Binary file not shown.
27 changes: 27 additions & 0 deletions ports/shirobimetal/shirobimetal/shirobi.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
back = esc
start = enter

a = a
b = d
x = s
y = w

l1 = d
l2 = q
r1 = space
r2 = space

up = up
down = down
left = left
right = right

left_analog_up = up
left_analog_down = down
left_analog_left = left
left_analog_right = right

right_analog_up = \"
right_analog_down = \"
right_analog_left = \"
right_analog_right = \"

0 comments on commit 4096418

Please sign in to comment.