Skip to content

Commit

Permalink
Merge pull request #44 from Cebion/sneakr
Browse files Browse the repository at this point in the history
New Port: SneakR
  • Loading branch information
kloptops authored Feb 5, 2024
2 parents 871a96d + 770ae28 commit 471aa22
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ports/sneakr/README.md
Original file line number Diff line number Diff line change
@@ -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 |
57 changes: 57 additions & 0 deletions ports/sneakr/SneakR.sh
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions ports/sneakr/port.json
Original file line number Diff line number Diff line change
@@ -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": []
}
}
Binary file added ports/sneakr/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/sneakr/sneakr/gamedata/splash.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/sneakr/sneakr/gmloader
Binary file not shown.
Binary file added ports/sneakr/sneakr/libc++_shared.so
Binary file not shown.
Binary file added ports/sneakr/sneakr/libs/libzip.so.5
Binary file not shown.
Binary file added ports/sneakr/sneakr/sneakr.apk
Binary file not shown.

0 comments on commit 471aa22

Please sign in to comment.