Skip to content

Commit

Permalink
Merge pull request #211 from Fraxinus88/carriesorderup
Browse files Browse the repository at this point in the history
New Port Carrie's Order Up
  • Loading branch information
kloptops authored Mar 23, 2024
2 parents 84bad4d + b0b3c46 commit dbc36f5
Show file tree
Hide file tree
Showing 17 changed files with 181 additions and 0 deletions.
107 changes: 107 additions & 0 deletions ports/carriesorderup/Carrie's Order Up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/bin/bash
# PORTMASTER: carriesorderup.zip, Carrie's Order Up.sh

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

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

$ESUDO chmod 666 /dev/tty0

GAMEDIR="/$directory/ports/carriesorderup"

export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$GAMEDIR/utils/libs"
export GMLOADER_DEPTH_DISABLE=1
export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/"

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

# Patch Game
cd "$GAMEDIR"

# check if we have new engough version of PortMaster that contains xdelta3
if [ ! -f "$controlfolder/xdelta3" ]; then
echo "This port requires the latest PortMaster to run, please go to https://portmaster.games/ for more info." > /dev/tty0
sleep 5
exit 1
fi

# Check if CarriesOrderUp.exe exists in the /gamedata folder and delete it if it does
if [ -f "./gamedata/CarriesOrderUp.exe" ]; then
rm ./gamedata/CarriesOrderUp.exe
echo "Deleted CarriesOrderUp.exe from ./gamedata/"
fi

# Check if "gamedata/data.win" exists and its MD5 hash is "71803908df80ed78778e24a9f5340e54", and if display resolution is one of the specified resolutions
if [ -f "./gamedata/data.win" ]; then
file_md5=$(md5sum "./gamedata/data.win" | awk '{print $1}')
if [ "$file_md5" = "71803908df80ed78778e24a9f5340e54" ]; then
if [[ "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" == "720x720" ]]; then
$ESUDO $controlfolder/xdelta3 -d -s gamedata/data.win -f ./patch/720x720.xdelta gamedata/data.win
elif [[ "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" == "640x480" ]]; then
$ESUDO $controlfolder/xdelta3 -d -s gamedata/data.win -f ./patch/640x480.xdelta gamedata/data.win
elif [[ "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" == "854x480" ]]; then
$ESUDO .$controlfolder/xdelta3 -d -s gamedata/data.win -f ./patch/854x480.xdelta gamedata/data.win
elif [[ "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" == "960x544" ]]; then
$ESUDO .$controlfolder/xdelta3 -d -s gamedata/data.win -f ./patch/960x544.xdelta gamedata/data.win
else
# Handle other resolutions
echo "Resolution is not one of the specified resolutions"
fi
fi
fi

# Check if there are .ogg files in ./gamedata and move them to the appropriate places
if [ -n "$(ls ./gamedata/*.ogg 2>/dev/null)" ]; then
# Move all .ogg files from ./gamedata to ./assets
mv ./gamedata/*.ogg ./assets/
echo "Moved ogg files from ./gamedata to ./assets/"

# Copy *.ini files to ./assets
mv ./gamedata/*.ini ./assets/
echo "Copied ini files from ./gamedata to ./assets/"

# Copy *.dll files to ./assets
mv ./gamedata/*.dll ./assets/
echo "Copied dll files from ./gamedata to ./assets/"

# Zip the contents of ./carriesorderup.apk including the new .ogg files
zip -r -0 ./carriesorderup.apk ./carriesorderup.apk ./assets/
echo "Zipped contents to ./carriesorderup.apk"

fi

cd $GAMEDIR

if [ -f "${controlfolder}/libgl_${CFWNAME}.txt" ]; then
source "${controlfolder}/libgl_${CFW_NAME}.txt"
else
source "${controlfolder}/libgl_default.txt"
fi

# 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
[ -f "./gamedata/game.unx" ] && mv gamedata/game.unx gamedata/game.droid

# Make sure uinput is accessible so we can make use of the gptokeyb controls
$ESUDO chmod 666 /dev/uinput

$GPTOKEYB "gmloader" -c ./carriesorderup.gptk &

$ESUDO chmod +x "$GAMEDIR/gmloader"

./gmloader carriesorderup.apk

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
21 changes: 21 additions & 0 deletions ports/carriesorderup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Notes

Special thanks to Zachary Rudolph, [@InkDragonWorks](https://twitter.com/inkdragonworks) for making this wonderful game!

Source:

https://inkdragonworks.itch.io/carries-order-up

https://store.steampowered.com/app/522490/Carries_Order_Up/

## Controls

| Button | Action |
|--|--|
|D-pad/L-stick|Movement|
|A|Spin|
|L1/R1/X|Sprint|
|Start|Pause/Skip|
|Select|Escape/Back|


Empty file.
Binary file not shown.
17 changes: 17 additions & 0 deletions ports/carriesorderup/carriesorderup/carriesorderup.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
back = esc
start = \"

up = \"
down = \"
left = \"
right = \"

left_analog_up = \"
left_analog_down = \"
left_analog_left = \"
left_analog_right = \"

a = \"
b = \"
x = \"
y = \"
Binary file added ports/carriesorderup/carriesorderup/gmloader
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions ports/carriesorderup/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<gameList>
<game>
<path>./Carrie's Order Up.sh</path>
<name>Carrie's Order Up</name>
<image>./carriesorderup/screenshot.png</image>
</game>
</gameList>
28 changes: 28 additions & 0 deletions ports/carriesorderup/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": 2,
"name": "carriesorderup.zip",
"items": [
"Carrie's Order Up.sh",
"carriesorderup"
],
"items_opt": [],
"attr": {
"title": "Carries' Order Up",
"porter": [
"Fraxinus88"
],
"desc": "Carrie's Order Up! is a challenging arcade game inspired by the likes of Pac-Man and Game & Watch. As Carrie, a crab waitress in a port town's restaurant, you have to serve spaghetti, pancakes, and burgers to all kinds of sea creatures without bumping into them!\n\nMechanics may be simple, but a level of depth to the mechanics exist, with tons of achievements to reward those that learn to master being a crab waitress! If you're looking for a cute and challenging game that lifts inspiration from arcade titles, you'll find hours of entertainment in Carrie's Order Up!",
"inst": "Purchase the game from: https://store.steampowered.com/app/522490/Carries_Order_Up/ OR https://inkdragonworks.itch.io/carries-order-up \n\nFrom Itch:\nDownload CarriesOrderUp.zip from and unzip the contents to /ports/cariesorderup/gamedata\n\nFor Steam:\nDownload the game and copy the contents from /Carrie's Order Up! to /ports/cariesorderup/gamedata",
"genres": [
"arcade"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": null,
"reqs": [],
"arch": [
"armhf"
]
}
}
Binary file added ports/carriesorderup/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 dbc36f5

Please sign in to comment.