Skip to content

Commit 77f8de9

Browse files
authored
Merge pull request #1329 from JeodC/dtr
Add digital tamers reborn
2 parents 0f6c5ca + d46be90 commit 77f8de9

33 files changed

+2026
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/bash
2+
3+
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
4+
5+
if [ -d "/opt/system/Tools/PortMaster/" ]; then
6+
controlfolder="/opt/system/Tools/PortMaster"
7+
elif [ -d "/opt/tools/PortMaster/" ]; then
8+
controlfolder="/opt/tools/PortMaster"
9+
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
10+
controlfolder="$XDG_DATA_HOME/PortMaster"
11+
else
12+
controlfolder="/roms/ports/PortMaster"
13+
fi
14+
15+
source $controlfolder/control.txt
16+
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
17+
get_controls
18+
19+
# Variables
20+
GAMEDIR="/$directory/ports/digitaltamersreborn"
21+
BIG_SCALE=4000
22+
BIG_DELAY=8
23+
SMALL_SCALE=6000
24+
SMALL_DELAY=16
25+
26+
# CD and set permissions
27+
cd $GAMEDIR
28+
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
29+
$ESUDO chmod +x -R $GAMEDIR/*
30+
31+
# Exports
32+
export PATCHER_FILE="$GAMEDIR/tools/patchscript"
33+
export PATCHER_GAME="$(basename "${0%.*}")" # This gets the current script filename without the extension
34+
export PATCHER_TIME="2 to 5 minutes"
35+
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
36+
37+
# Check if patchlog.txt to skip patching
38+
if [ ! -f patchlog.txt ]; then
39+
if [ -f "$controlfolder/utils/patcher.txt" ]; then
40+
source "$controlfolder/utils/patcher.txt"
41+
$ESUDO kill -9 $(pidof gptokeyb)
42+
else
43+
echo "This port requires the latest version of PortMaster."
44+
fi
45+
else
46+
echo "Patching process already completed. Skipping."
47+
fi
48+
49+
# Post patcher setup
50+
export PORT_32BIT="Y"
51+
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
52+
export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/lib:$LD_LIBRARY_PATH"
53+
54+
# Apply mouse scaling according to screen size
55+
if [ $DISPLAY_WIDTH -gt 480 ]; then
56+
sed -i "s/^mouse_scale *= *[0-9]\+/mouse_scale = $BIG_SCALE/" "$GAMEDIR/dtr.gptk"
57+
sed -i "s/^mouse_delay *= *[0-9]\+/mouse_delay = $BIG_DELAY/" "$GAMEDIR/dtr.gptk"
58+
else
59+
sed -i "s/^mouse_scale *= *[0-9]\+/mouse_scale = $SMALL_SCALE/" "$GAMEDIR/dtr.gptk"
60+
sed -i "s/^mouse_delay *= *[0-9]\+/mouse_delay = $SMALL_DELAY/" "$GAMEDIR/dtr.gptk"
61+
fi
62+
63+
# Display loading splash
64+
if [ -f "$GAMEDIR/patchlog.txt" ]; then
65+
[ "$CFW_NAME" == "muOS" ] && $ESUDO ./tools/splash "splash.png" 1
66+
$ESUDO ./tools/splash "splash.png" 2000 &
67+
fi
68+
69+
# Assign gptokeyb and load the game
70+
$GPTOKEYB "gmloadernext.armhf" -c "dtr.gptk" &
71+
pm_platform_helper "$GAMEDIR/gmloadernext.armhf" >/dev/null
72+
./gmloadernext.armhf -c gmloader.json
73+
74+
# Cleanup
75+
pm_finish

ports/digitaltamersreborn/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Installation
2+
Download the Windows executable from https://dragonrod342.itch.io/digital-tamers-reborn and put in the `ports/digitamersreborn/assets` folder.
3+
4+
## Controls
5+
| Button | Action |
6+
|--|--|
7+
|ANALOG|Move Cursor|
8+
|A|Left Click|
9+
|B|Right Click|
10+
11+
## Thanks
12+
This game created by dragonrod342
13+
[GMLoader-Next](https://github.com/PortsMaster/gmloader-next) provided by JohnnyOnFlame and PortMaster Crew
14+
Testers and devs from the PortMaster Discord

ports/digitaltamersreborn/cover.png

288 KB
Loading

ports/digitaltamersreborn/digitaltamersreborn/assets/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
back = esc
2+
start = enter
3+
a = mouse_left
4+
b = mouse_right
5+
x = \"
6+
y = \"
7+
l1 = \"
8+
l2 = \"
9+
l3 = \"
10+
r1 = \"
11+
r2 = \"
12+
r3 = \"
13+
left_analog_up = mouse_movement_up
14+
left_analog_down = mouse_movement_down
15+
left_analog_left = mouse_movement_left
16+
left_analog_right = mouse_movement_right
17+
right_analog_up = \"
18+
right_analog_down = \"
19+
right_analog_left = \"
20+
right_analog_right = \"
21+
22+
mouse_slow_scale = 50
23+
24+
deadzone_mode = sloped_scaled_axial
25+
deadzone = 1000
26+
deadzone_scale = 9
27+
deadzone_delay = 16
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"save_dir" : "saves",
3+
"apk_path" : "dtr.port",
4+
"show_cursor" : true,
5+
"disable_controller" : false,
6+
"force_platform" : "os_windows"
7+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)