Skip to content

Commit

Permalink
Merge pull request #164 from kloptops/main
Browse files Browse the repository at this point in the history
New Port TMNT Shredders Revenge.
  • Loading branch information
kloptops authored Mar 8, 2024
2 parents 4908f14 + 3d21bb8 commit 2dbd7be
Show file tree
Hide file tree
Showing 71 changed files with 7,895 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ports/tmntsr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Notes

Thanks to JohnnyonFlame for the necessary modifications to allow this game to run on supported linux distros.

You can donate towards JohnnyonFlame's work [here](https://ko-fi.com/johnnyonflame).

## HOW TO INSTALL:

- If you have an older version, it is recommended you uninstall it first.
- Copy the game's data into ports/tmntsr/gamedata
- Run the game and wait, first launch converts a lot of files, so it takes ~15minutes.
- This happens only once.

## GET GAME DATA

### Steam Windows

1. On your PC, press Win+R and type: `steam://open/console` (Steam will now show console command). For best results do this command with Steam closed.
2. In the Steam console, type: `download_depot 1361510 1361511`
3. For the DLC type: `download_depot 1361510 2348930` (you must have purchased it for it to work)
4. It’ll take about 20 minutes to download, the game files will be in the directory that is printed out.

### Steam macOS

1. Make sure steam is running, then type `steam://open/console` in Safari.
2. In the Steam console, type: `download_depot 1361510 1361511`
3. For the DLC type: `download_depot 1361510 2348930` (you must have purchased it for it to work)
4. It’ll take about 20 minutes to download, but then it will show you a path to where the folder is located. It’s pretty deep in the MacOS file system, the easiest way to do that is through the Library folder. Open a new Finder window, press `cmd + shift + g` and a window will appear, paste the location that steam gave you a few moments earlier.
95 changes: 95 additions & 0 deletions ports/tmntsr/TMNTShreddersRevenge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/bin/bash

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "/roms/tools/PortMaster" ]; then
controlfolder="/roms/tools/PortMaster"
elif [ -d "/roms/ports" ]; then
controlfolder="/roms/ports/PortMaster"
elif [ -d "/roms2/ports" ]; then
controlfolder="/roms2/ports/PortMaster"
else
controlfolder="/storage/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/tasksetter

get_controls

export ESUDO=$ESUDO
export gameassembly="TMNT.exe"
export gamedir="/$directory/ports/tmntsr"
cd "$gamedir/gamedata"

# Grab text output...
$ESUDO chmod 666 /dev/tty0
printf "\033c" > /dev/tty0
echo "Loading... Please Wait." > /dev/tty0

# Setup mono
monodir="$HOME/mono"
monofile="$controlfolder/libs/mono-6.12.0.122-aarch64.squashfs"
$ESUDO mkdir -p "$monodir"
$ESUDO umount "$monofile" || true
$ESUDO mount "$monofile" "$monodir"

# Setup savedir
$ESUDO rm -rf ~/.local/share/Tribute\ Games/TMNT
mkdir -p ~/.local/share/Tribute\ Games/
ln -sfv "$gamedir/savedata" ~/.local/share/Tribute\ Games/TMNT

# Remove all the dependencies in favour of system libs - e.g. the included
rm -f System*.dll mscorlib.dll FNA.dll Mono.*.dll

# Setup path and other environment variables
# export FNA_PATCH="$gamedir/dlls/PanzerPaladinPatches.dll"
export MONO_IOMAP=all
export XDG_DATA_HOME=$HOME/.local/share
export MONO_PATH="$gamedir/dlls":"$gamedir/gamedata":"$gamedir/monomod"
export LD_LIBRARY_PATH="$gamedir/libs":"$monodir/lib":"$LD_LIBRARY_PATH"
export PATH="$monodir/bin":"$PATH"

# Configure the renderpath
export FNA3D_FORCE_DRIVER=OpenGL
export FNA3D_OPENGL_FORCE_ES3=1
export FNA3D_OPENGL_FORCE_VBO_DISCARD=1
export FNA_SDL2_FORCE_BASE_PATH=0

sha1sum -c "${gamedir}/gamedata/.ver_checksum"
if [ $? -ne 0 ]; then
echo "Checksum fail or unpatched binary found, patching game..." |& tee /dev/tty0
rm -f "${gamedir}/gamedata/.astc_done"
rm -f "${gamedir}/gamedata/.patch_done"
fi

if [[ ! -f "${gamedir}/gamedata/.astc_done" ]] || [[ ! -f "${gamedir}/gamedata/.patch_done" ]]; then
chmod +x ../progressor ../repack.src ../utils/*
../progressor \
--log "../repack.log" \
--font "../FiraCode-Regular.ttf" \
--title "First Time Setup" \
../repack.src

[[ $? != 0 ]] && exit -1
fi

# Fix for a goof on previous on the previous patcher...
if [[ -f "${gamedir}/gamedata/MONOMODDED_ParisEngine.dll.so" ]]; then
mv "${gamedir}/gamedata/MONOMODDED_ParisEngine.dll.so" "${gamedir}/gamedata/ParisEngine.dll.so"
mv "${gamedir}/gamedata/MONOMODDED_${gameassembly}.so" "${gamedir}/gamedata/${gameassembly}.so"
fi

printf "\033c" > /dev/tty0
echo "Loading... Please Wait." > /dev/tty0

$GPTOKEYB "mono" &
$TASKSET mono --ffast-math -O=all ../MMLoader.exe MONOMODDED_${gameassembly} |& tee ${gamedir}/log.txt
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
$ESUDO umount "$monodir"

# Disable console
printf "\033c" >> /dev/tty1
Binary file added ports/tmntsr/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions ports/tmntsr/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<gameList>
<game>
<path>./TMNTShreddersRevenge.sh</path>
<name>TMNT: Shredder's Revenge</name>
<desc>Shredder's Revenge is a side-scrolling action brawler with a pixelated artstyle. The player assumes control of Leonardo, Donatello, Michelangelo, Raphael, April O'Neil, Master Splinter, and unlockable character Casey Jones as they combat opponents including the Foot Clan, Krang, Bebop and Rocksteady, and Shredder in locations ranging from New York City sewers to Dimension X. Each character has their own attributes (range, speed, and power) and plays differently. They have unique super moves and taunts. Throughout each stage, players can find pizza boxes, which can be used to heal them, and other pies that grant players extra strength and infinite supers for a brief period of time.</desc>
<image>./tmntsr/cover.png</image>
<releasedate>20220616T000000</releasedate>
<developer>Tribute Games</developer>
<publisher>DotEmu</publisher>
<genre>Platform / Run Jump Scrolling-Platform-Action / Adventure-Action</genre>
</game>
</gameList>
27 changes: 27 additions & 0 deletions ports/tmntsr/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": 2,
"name": "tmntsr.zip",
"items": [
"TMNTShreddersRevenge.sh",
"tmntsr/"
],
"items_opt": [],
"attr": {
"title": "TMNT: Shredder's Revenge",
"porter": [
"Johnny on Flame"
],
"desc": "Shredder's Revenge is a side-scrolling action brawler with a pixelated artstyle. The player assumes control of Leonardo, Donatello, Michelangelo, Raphael, April O'Neil, Master Splinter, and unlockable character Casey Jones as they combat opponents including the Foot Clan, Krang, Bebop and Rocksteady, and Shredder in locations ranging from New York City sewers to Dimension X.",
"inst": "If you have an older version, it is recommended you uninstall it first. Copy the game's data into ports/tmntsr/gamedata/.",
"genres": [
"action",
"platformer"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": "mono-6.12.0.122-aarch64.squashfs",
"reqs": [],
"arch": []
}
}
Binary file added ports/tmntsr/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/tmntsr/tmntsr/FNARepacker.exe
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/FiraCode-Regular.ttf
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/MMLoader.exe
Binary file not shown.
50 changes: 50 additions & 0 deletions ports/tmntsr/tmntsr/common.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
get_label()
{
LABEL=${1//\\/\\\\} # \
LABEL=${LABEL//\//\\\/} # /
LABEL=${LABEL//\"/\\\"} # "
LABEL=${LABEL// /\\t} # \t (tab)
LABEL=${LABEL//
/\\\n} # \n (newline)
LABEL=${LABEL//^M/\\\r} # \r (carriage return)
LABEL=${LABEL//^L/\\\f} # \f (form feed)
LABEL=${LABEL//^H/\\\b} # \b (backspace)
echo "$LABEL"
}

confirm() {
local TITLE=$(get_label "$1")
local LABEL=$(get_label "$2")
local JSON=$( echo '{"type":"confirm","title":"'${TITLE}'","message":"'${LABEL}'"}' | base64 -w0 - )
echo "\$<${JSON}>\$"
read RESULT
}

msgbox() {
local TITLE=$(get_label "$1")
local LABEL=$(get_label "$2")
local JSON=$( echo '{"type":"msgbox","title":"'${TITLE}'","message":"'${LABEL}'"}' | base64 -w0 - )
echo $1
echo "\$<${JSON}>\$"
read RESULT
}

settitle() {
local TITLE=$(get_label "$1")
local JSON=$( echo '{"type":"settitle","value":"'${TITLE}'"}' | base64 -w0 - )
echo "\$<${JSON}>\$"
# no reply needed
}

kill_recursive() {
local parent_pid="$1"
local child_pids=$(pgrep -P "$parent_pid")

for pid in $child_pids; do
kill_recursive "$pid" 1
done

# Kill the parent process if depth != 0
[[ "$2" == 1 ]] && kill -9 "$parent_pid"
}
Binary file added ports/tmntsr/tmntsr/dlls/DotNetZip.dll
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/dlls/FNA.dll
Binary file not shown.
14 changes: 14 additions & 0 deletions ports/tmntsr/tmntsr/dlls/FNA.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="SDL2" os="linux,freebsd,netbsd" target="libSDL2-2.0.so.0"/>

<dllmap dll="FNA3D" os="windows" target="FNA3D.dll"/>
<dllmap dll="FNA3D" os="osx" target="libFNA3D.0.dylib"/>
<dllmap dll="FNA3D" os="linux,freebsd,netbsd" target="libFNA3D.so.0"/>

<dllmap dll="FAudio" os="windows" target="FAudio.dll"/>
<dllmap dll="FAudio" os="osx" target="libFAudio.0.dylib"/>
<dllmap dll="FAudio" os="linux,freebsd,netbsd" target="libFAudio.so.0"/>
</configuration>
Binary file added ports/tmntsr/tmntsr/dlls/FNA.dll.so
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/dlls/OpenAL-CS.dll
Binary file not shown.
6 changes: 6 additions & 0 deletions ports/tmntsr/tmntsr/dlls/OpenAL-CS.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="soft_oal.dll" os="windows" target="soft_oal.dll"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib"/>
<dllmap dll="soft_oal.dll" os="linux" target="libopenal.so.1"/>
</configuration>
Binary file added ports/tmntsr/tmntsr/dlls/SDL2-CS.dll
Binary file not shown.
22 changes: 22 additions & 0 deletions ports/tmntsr/tmntsr/dlls/SDL2-CS.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="SDL2" os="linux" target="libSDL2-2.0.so.0"/>

<dllmap dll="SDL2_gfx" os="windows" target="SDL2_gfx.dll"/>
<dllmap dll="SDL2_gfx" os="osx" target="libSDL2_gfx-1.0.0.dylib"/>
<dllmap dll="SDL2_gfx" os="linux" target="libSDL2_gfx-1.0.so.0"/>

<dllmap dll="SDL2_image" os="windows" target="SDL2_image.dll"/>
<dllmap dll="SDL2_image" os="osx" target="libSDL2_image-2.0.0.dylib"/>
<dllmap dll="SDL2_image" os="linux" target="libSDL2_image-2.0.so.0"/>

<dllmap dll="SDL2_mixer" os="windows" target="SDL2_mixer.dll"/>
<dllmap dll="SDL2_mixer" os="osx" target="libSDL2_mixer-2.0.0.dylib"/>
<dllmap dll="SDL2_mixer" os="linux" target="libSDL2_mixer-2.0.so.0"/>

<dllmap dll="SDL2_ttf" os="windows" target="SDL2_ttf.dll"/>
<dllmap dll="SDL2_ttf" os="osx" target="libSDL2_ttf-2.0.0.dylib"/>
<dllmap dll="SDL2_ttf" os="linux" target="libSDL2_ttf-2.0.so.0"/>
</configuration>
Binary file added ports/tmntsr/tmntsr/dlls/SDL2-CS.dll.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libFAudio.so.0
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libFNA3D.so.0
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libastcUtil.so
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libsteam_api.so
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libsteam_api64.so
Binary file not shown.
Binary file added ports/tmntsr/tmntsr/libs/libtheorafile.so
Binary file not shown.
Loading

0 comments on commit 2dbd7be

Please sign in to comment.