diff --git a/ports/derelict/Derelict.sh b/ports/derelict/Derelict.sh new file mode 100644 index 0000000000..d450d27d4d --- /dev/null +++ b/ports/derelict/Derelict.sh @@ -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 \ No newline at end of file diff --git a/ports/derelict/README.md b/ports/derelict/README.md new file mode 100644 index 0000000000..04a575deba --- /dev/null +++ b/ports/derelict/README.md @@ -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| + + diff --git a/ports/derelict/derelict/derelict.gptk b/ports/derelict/derelict/derelict.gptk new file mode 100644 index 0000000000..64457404e9 --- /dev/null +++ b/ports/derelict/derelict/derelict.gptk @@ -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 = \" + diff --git a/ports/derelict/derelict/game.apk b/ports/derelict/derelict/game.apk new file mode 100644 index 0000000000..91fa79ec3d Binary files /dev/null and b/ports/derelict/derelict/game.apk differ diff --git a/ports/derelict/derelict/gamedata/Place the Derelict.zip here! b/ports/derelict/derelict/gamedata/Place the Derelict.zip here! new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/derelict/derelict/gamedata/splash.png b/ports/derelict/derelict/gamedata/splash.png new file mode 100644 index 0000000000..3e5fff4a68 Binary files /dev/null and b/ports/derelict/derelict/gamedata/splash.png differ diff --git a/ports/derelict/derelict/gmloader b/ports/derelict/derelict/gmloader new file mode 100644 index 0000000000..f953f12dd3 Binary files /dev/null and b/ports/derelict/derelict/gmloader differ diff --git a/ports/derelict/derelict/libc++_shared.so b/ports/derelict/derelict/libc++_shared.so new file mode 100644 index 0000000000..fb45ef9052 Binary files /dev/null and b/ports/derelict/derelict/libc++_shared.so differ diff --git a/ports/derelict/derelict/libs/libcrypto.so.1.1 b/ports/derelict/derelict/libs/libcrypto.so.1.1 new file mode 100644 index 0000000000..12578440aa Binary files /dev/null and b/ports/derelict/derelict/libs/libcrypto.so.1.1 differ diff --git a/ports/derelict/derelict/libs/libzip.so.5 b/ports/derelict/derelict/libs/libzip.so.5 new file mode 100644 index 0000000000..0908c68657 Binary files /dev/null and b/ports/derelict/derelict/libs/libzip.so.5 differ diff --git a/ports/derelict/gameinfo.xml b/ports/derelict/gameinfo.xml new file mode 100644 index 0000000000..3396dde066 --- /dev/null +++ b/ports/derelict/gameinfo.xml @@ -0,0 +1,13 @@ + + + + ./Derelict.sh + Derelict + 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! + 20161010T000000 + Programancer + Programancer + Platformer + ./derelict/screenshot.png + + \ No newline at end of file diff --git a/ports/derelict/port.json b/ports/derelict/port.json new file mode 100644 index 0000000000..726e1dbb21 --- /dev/null +++ b/ports/derelict/port.json @@ -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" + ] + } +} \ No newline at end of file diff --git a/ports/derelict/screenshot.png b/ports/derelict/screenshot.png new file mode 100644 index 0000000000..a0fe75b9f3 Binary files /dev/null and b/ports/derelict/screenshot.png differ