Skip to content

Commit

Permalink
Merge pull request #780 from Ganimoth/derelict
Browse files Browse the repository at this point in the history
New Port: Derelict
  • Loading branch information
Cebion authored Oct 14, 2024
2 parents ed68af6 + 951ab4b commit f516baa
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 0 deletions.
66 changes: 66 additions & 0 deletions ports/derelict/Derelict.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/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
# device_info.txt will be included by default

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

GAMEDIR="/$directory/ports/derelict"

export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$LD_LIBRARY_PATH"
export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

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

cd $GAMEDIR

#Extract game files game files
if [ -f "$GAMEDIR/gamedata/Derelict.zip" ]; then

# Unzip the GBJam5 version into the gamedata directory. Before someone asks why I dont exclude the txt file as well, the unzip would extract it regardless for whatever reason.
unzip -j -o gamedata/Derelict.zip "Derelict (Original GBJam5 Entry)/*" -x *.exe *.ini *.dll -d gamedata

# Rename data.win
mv gamedata/data.win gamedata/game.droid

# Delete redundant files
rm gamedata/Derelict.zip
rm gamedata/Changelog.txt
else
echo "Derelict.zip is missing, skipping the extraction step"
fi

# Pack the .ogg files into game.apk ./gamedata
if [ -n "$(ls ./gamedata/*.ogg 2>/dev/null)" ]; then
# Move all .ogg files from ./gamedata to ./assets
mkdir -p ./assets
mv ./gamedata/*.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

$ESUDO chmod +x "$GAMEDIR/gmloader"

$GPTOKEYB "gmloader" -c "derelict.gptk" &
pm_platform_helper $GAMEDIR/gmloader
./gmloader game.apk

pm_finish
14 changes: 14 additions & 0 deletions ports/derelict/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Notes

Thanks to Programancer for developing this game. Check it out at https://programancer.itch.io/derelict

## Controls

| Button | Action |
|--|--|
|DPAD/L-STICK|Movement|
|A/B|Jump|
|X/Y|Shoot|
|Start|Start|


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

a = a
b = a
x = s
y = s

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 = \"

Binary file added ports/derelict/derelict/game.apk
Binary file not shown.
Empty file.
Binary file added ports/derelict/derelict/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/derelict/derelict/gmloader
Binary file not shown.
Binary file added ports/derelict/derelict/libc++_shared.so
Binary file not shown.
Binary file added ports/derelict/derelict/libs/libcrypto.so.1.1
Binary file not shown.
Binary file added ports/derelict/derelict/libs/libzip.so.5
Binary file not shown.
13 changes: 13 additions & 0 deletions ports/derelict/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>./Derelict.sh</path>
<name>Derelict</name>
<desc>The Derelict is a scifi platformer developed by Programmancer for the GBJam5. Navigate the abandoned derelict spacecraft to restore power and stop the evil robot AI, the Master Circuit!</desc>
<releasedate>20161010T000000</releasedate>
<developer>Programancer</developer>
<publisher>Programancer</publisher>
<genre>Platformer</genre>
<image>./derelict/screenshot.png</image>
</game>
</gameList>
30 changes: 30 additions & 0 deletions ports/derelict/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 3,
"name": "derelict.zip",
"items": [
"Derelict.sh",
"derelict"
],
"items_opt": [],
"attr": {
"title": "Derelict",
"porter": [
"Ganimoth"
],
"desc": "The Derelict is a scifi platformer developed by Programmancer for the GBJam5. Navigate the abandoned derelict spacecraft to restore power and stop the evil robot AI, the Master Circuit!",
"desc_md": null,
"inst": "Download the game on https://programancer.itch.io/derelict and place the Derelict.zip to the port's gamedata folder. ",
"inst_md": null,
"genres": [
"platformer"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": null,
"reqs": [],
"arch": [
"armhf"
]
}
}
Binary file added ports/derelict/screenshot.png
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 f516baa

Please sign in to comment.