Skip to content

Commit

Permalink
Merge pull request #1024 from Damian2809/brotato
Browse files Browse the repository at this point in the history
New Port for Brotato
  • Loading branch information
Cebion authored Dec 11, 2024
2 parents 9c55358 + c53c081 commit 97d0cec
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 0 deletions.
64 changes: 64 additions & 0 deletions ports/brotato/Brotato.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/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

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

get_controls

GAMEDIR=/$directory/ports/brotato/
CONFDIR="$GAMEDIR/conf/"

# Ensure the conf directory exists
mkdir -p "$GAMEDIR/conf"

# Set the XDG environment variables for config & savefiles
export XDG_CONFIG_HOME="$CONFDIR"
export XDG_DATA_HOME="$CONFDIR"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

cd $GAMEDIR
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

runtime="frt_3.5.2"
if [ ! -f "$controlfolder/libs/${runtime}.squashfs" ]; then
# Check for runtime if not downloaded via PM
if [ ! -f "$controlfolder/harbourmaster" ]; then
pm_message "This port requires the latest PortMaster to run, please go to https://portmaster.games/ for more info."
sleep 5
exit 1
fi

$ESUDO $controlfolder/harbourmaster --quiet --no-check runtime_check "${runtime}.squashfs"
fi

# Setup Godot
godot_dir="$HOME/godot"
godot_file="$controlfolder/libs/${runtime}.squashfs"
$ESUDO mkdir -p "$godot_dir"
$ESUDO umount "$godot_file" || true
$ESUDO mount "$godot_file" "$godot_dir"
PATH="$godot_dir:$PATH"

export FRT_NO_EXIT_SHORTCUTS=FRT_NO_EXIT_SHORTCUTS

[ -f "./gamedata/Brotato.pck" ] && mv gamedata/Brotato.pck gamedata/brotato.pck

$GPTOKEYB "$runtime" -c "./brotato.gptk" &
pm_platform_helper "$godot_dir/$runtime"
"$runtime" $GODOT_OPTS --main-pack "gamedata/brotato.pck"

$ESUDO umount "$godot_dir"
pm_finish
14 changes: 14 additions & 0 deletions ports/brotato/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Notes

Thanks to [Blobfish Games](https://www.blobfish.dev/) for making this wonderful roguelite.

The DLC from Steam are not compatible with the Epic version of the game that is used in this port.
Brotato wont run good on anything lower than a rk3588

## Controls

| Button | Action |
|--|--|
|DPad/Lstick|Movement|


15 changes: 15 additions & 0 deletions ports/brotato/brotato/brotato.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
start = escape
guide = enter

a = enter
b = enter

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

left_analog_up = up
left_analog_down = down
left_analog_left = left
left_analog_right = right
Binary file added ports/brotato/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions ports/brotato/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<gameList>
<game>
<path>./Brotato.sh</path>
<name>Brotato</name>
<desc>Brotato is a top-down arena shooter roguelite where you play as a potato wielding up to six weapons to fend off alien hordes. Customize traits and items to survive until help arrives.</desc>
<releasedate>20230723T000000</releasedate>
<developer>Blobfish Games</developer>
<genre>Rougelite/Shooter</genre>
<image>./brotato/cover.png</image>
</game>
</gameList>
31 changes: 31 additions & 0 deletions ports/brotato/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": 3,
"name": "brotato.zip",
"items": [
"Brotato.sh",
"brotato"
],
"items_opt": [],
"attr": {
"title": "Brotato",
"porter": [
"Damian2809"
],
"desc": "Brotato is a top-down arena shooter roguelite where you play as a potato wielding up to six weapons to fend off alien hordes. Customize traits and items to survive until help arrives.",
"desc_md": null,
"inst": "Buy and download the game of Epic https://store.epicgames.com/en-US/p/brotato-ed4097\nCopy the brotato.pck to brotato/gamedata folder",
"inst_md": null,
"genres": [
"action"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": "frt_3.5.2.squashfs",
"reqs": [
"ultra"
],
"arch": [],
"min_glibc": ""
}
}
Binary file added ports/brotato/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 97d0cec

Please sign in to comment.