diff --git a/ports/sneakr/README.md b/ports/sneakr/README.md new file mode 100644 index 0000000000..d35b1e6c30 --- /dev/null +++ b/ports/sneakr/README.md @@ -0,0 +1,13 @@ +## Notes +Thanks to Joseph Gribbin for creating this game and making it available for free. +https://josephgribbin.itch.io/ + +## Controls + +|Button| Action | +|--|--| +| d-pad/l-stick| movement | +| a| run/confirm | +| b| dash/cancel | +| x| use item | +| start| pause | diff --git a/ports/sneakr/SneakR.sh b/ports/sneakr/SneakR.sh new file mode 100644 index 0000000000..3b10ff7ff1 --- /dev/null +++ b/ports/sneakr/SneakR.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Below we assign the source of the control folder (which is the PortMaster folder) based on the distro: +if [ -d "/opt/system/Tools/PortMaster/" ]; then + controlfolder="/opt/system/Tools/PortMaster" +elif [ -d "/opt/tools/PortMaster/" ]; then + controlfolder="/opt/tools/PortMaster" +else + controlfolder="/roms/ports/PortMaster" +fi + +# We source the control.txt file contents here +# The $ESUDO, $directory, $param_device and necessary +# Sdl configuration controller configurations will be sourced from the control.txt +source $controlfolder/control.txt + +# We pull the controller configs from the get_controls function from the control.txt file here +get_controls + +$ESUDO chmod 666 /dev/tty0 + +# We check on emuelec based CFWs the OS_NAME +[ -f "/etc/os-release" ] && source "/etc/os-release" + +if [ "$OS_NAME" == "JELOS" ]; then + export SPA_PLUGIN_DIR="/usr/lib32/spa-0.2" + export PIPEWIRE_MODULE_DIR="/usr/lib32/pipewire-0.3/" +fi + +GAMEDIR=/$directory/ports/sneakr + +# We log the execution of the script into log.txt +exec > >(tee "$GAMEDIR/log.txt") 2>&1 + +# Port specific additional libraries should be included within the port's directory in a separate subfolder named libs. +# Prioritize the armhf libs to avoid conflicts with aarch64 +export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$GAMEDIR/utils/libs" +export GMLOADER_DEPTH_DISABLE=1 +export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/" + +cd $GAMEDIR + +# Check for file existence before trying to manipulate them: +[ -f "./gamedata/data.win" ] && mv gamedata/data.win gamedata/game.droid +[ -f "./gamedata/game.win" ] && mv gamedata/game.win gamedata/game.droid + +# Make sure uinput is accessible so we can make use of the gptokeyb controls +$ESUDO chmod 666 /dev/uinput + +$GPTOKEYB "gmloader" xbox360 & + +$ESUDO chmod +x "$GAMEDIR/gmloader" + +./gmloader sneakr.apk + +$ESUDO kill -9 $(pidof gptokeyb) +$ESUDO systemctl restart oga_events & +printf "\033c" > /dev/tty0 diff --git a/ports/sneakr/port.json b/ports/sneakr/port.json new file mode 100644 index 0000000000..c7da116a01 --- /dev/null +++ b/ports/sneakr/port.json @@ -0,0 +1,24 @@ +{ + "version": 2, + "name": "sneakr.zip", + "items": [ + "SneakR.sh", + "sneakr" + ], + "items_opt": [], + "attr": { + "title": "SneakR", + "porter": [ + "mattyj513" + ], + "desc": "A short stealth game. Avoid sentries and learn their movements to complete your objective.", + "inst": "Download game from https://josephgribbin.itch.io/sneakr, rename SneakR.exe to SneakR.zip, extract. Copy data.win to /ports/sneakr/gamedata", + "genres": [ + "action" + ], + "image": null, + "rtr": false, + "runtime": null, + "reqs": [] + } +} \ No newline at end of file diff --git a/ports/sneakr/screenshot.png b/ports/sneakr/screenshot.png new file mode 100644 index 0000000000..21f7990318 Binary files /dev/null and b/ports/sneakr/screenshot.png differ diff --git a/ports/sneakr/sneakr/gamedata/splash.png b/ports/sneakr/sneakr/gamedata/splash.png new file mode 100644 index 0000000000..a5d8870458 Binary files /dev/null and b/ports/sneakr/sneakr/gamedata/splash.png differ diff --git a/ports/sneakr/sneakr/gmloader b/ports/sneakr/sneakr/gmloader new file mode 100644 index 0000000000..f953f12dd3 Binary files /dev/null and b/ports/sneakr/sneakr/gmloader differ diff --git a/ports/sneakr/sneakr/libc++_shared.so b/ports/sneakr/sneakr/libc++_shared.so new file mode 100644 index 0000000000..fb45ef9052 Binary files /dev/null and b/ports/sneakr/sneakr/libc++_shared.so differ diff --git a/ports/sneakr/sneakr/libs/libzip.so.5 b/ports/sneakr/sneakr/libs/libzip.so.5 new file mode 100644 index 0000000000..0908c68657 Binary files /dev/null and b/ports/sneakr/sneakr/libs/libzip.so.5 differ diff --git a/ports/sneakr/sneakr/sneakr.apk b/ports/sneakr/sneakr/sneakr.apk new file mode 100644 index 0000000000..4fd8a65ed8 Binary files /dev/null and b/ports/sneakr/sneakr/sneakr.apk differ