Skip to content

Commit

Permalink
Merge pull request #551 from Slayer366/main
Browse files Browse the repository at this point in the history
Update Rise of the Triad, fix music on root CFWs, fix control issues, add option to launch either episode...
  • Loading branch information
Cebion authored Jul 21, 2024
2 parents 4d6e6bd + c664050 commit 31376f0
Show file tree
Hide file tree
Showing 214 changed files with 1,049 additions and 127 deletions.
2 changes: 1 addition & 1 deletion ports/rott/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Notes
<br/>

Thanks to [icculus](https://icculus.org/rott/) for the source port of this game. Also thanks to romadu for the porting work for portmaster.
Thanks to [icculus](https://icculus.org/rott/) for the source port of this game. Also thanks to romadu for the porting work for portmaster and Slayer366 for the music fix.
<br/>

47 changes: 0 additions & 47 deletions ports/rott/ROTT.sh

This file was deleted.

67 changes: 67 additions & 0 deletions ports/rott/Rise of the Triad - Dark War.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/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
source $controlfolder/device_info.txt

get_controls

GAMEDIR="/$directory/ports/rott"

> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

[ ! -f "$GAMEDIR/conf/.rott/darkwar/config.rot" ] && $ESUDO cp -f -v "$GAMEDIR/conf/.rott/darkwar/config_bak.rot" "$GAMEDIR/conf/.rott/darkwar/config.rot"
[[ "$CFW_NAME" != *"ArkOS"* ]] && $ESUDO cp -f -v $GAMEDIR/timidity_cfg.bak $GAMEDIR/timidity.cfg

$ESUDO chmod 777 -R $GAMEDIR/*

cd $GAMEDIR

$ESUDO chmod 666 /dev/tty0
$ESUDO chmod 666 /dev/tty1
$ESUDO chmod 666 /dev/uinput

export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

printf "\033c" > /dev/tty0
if [[ $CFW_NAME == *"ArkOS"* ]] || [[ $CFW_NAME == *"ODROID"* ]]; then
echo "Preparing Swap File, please wait..." > /dev/tty0
[ -f /swapfile ] && $ESUDO swapoff -v /swapfile
[ -f /swapfile ] && $ESUDO rm -f /swapfile
$ESUDO fallocate -l 384M /swapfile
$ESUDO chmod 600 /swapfile
$ESUDO mkswap /swapfile
$ESUDO swapon /swapfile
fi

$ESUDO rm -rf ~/.rott
$ESUDO ln -sfv $GAMEDIR/conf/.rott ~/

if [[ "$ANALOG_STICKS" == '1' ]]; then
GPTOKEYB_CONFIG="$GAMEDIR/rott1joy.gptk"
elif [[ "$DEVICE_NAME" == 'x55' ]] || [[ "$DEVICE_NAME" == 'RG353P' ]]; then
GPTOKEYB_CONFIG="$GAMEDIR/rott_triggers.gptk"
else
GPTOKEYB_CONFIG="$GAMEDIR/rott.gptk"
fi

[ ! -f "$GAMEDIR/DARKWAR.WAD" ] && ./text_viewer -f 25 -w -t "Missing gamedata" -m "Please place your DARKWAR.WAD, DARKWAR.RTC, and DARKWAR.RTL files into the /ports/rott/ directory!"

$GPTOKEYB "rott_dw" -c "$GPTOKEYB_CONFIG" &
./rott_dw

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty1
printf "\033c" > /dev/tty0
65 changes: 65 additions & 0 deletions ports/rott/Rise of the Triad - The Hunt Begins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/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
source $controlfolder/device_info.txt

get_controls

GAMEDIR="/$directory/ports/rott"

> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

[ ! -f "$GAMEDIR/conf/.rott/config.rot" ] && $ESUDO cp -f -v "$GAMEDIR/conf/.rott/config_bak.rot" "$GAMEDIR/conf/.rott/config.rot"
[[ "$CFW_NAME" != *"ArkOS"* ]] && $ESUDO cp -f -v $GAMEDIR/timidity_cfg.bak $GAMEDIR/timidity.cfg

$ESUDO chmod 777 -R $GAMEDIR/*

cd $GAMEDIR

$ESUDO chmod 666 /dev/tty0
$ESUDO chmod 666 /dev/tty1
$ESUDO chmod 666 /dev/uinput

export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

printf "\033c" > /dev/tty0
if [[ $CFW_NAME == *"ArkOS"* ]] || [[ $CFW_NAME == *"ODROID"* ]]; then
echo "Preparing Swap File, please wait..." > /dev/tty0
[ -f /swapfile ] && $ESUDO swapoff -v /swapfile
[ -f /swapfile ] && $ESUDO rm -f /swapfile
$ESUDO fallocate -l 384M /swapfile
$ESUDO chmod 600 /swapfile
$ESUDO mkswap /swapfile
$ESUDO swapon /swapfile
fi

$ESUDO rm -rf ~/.rott
$ESUDO ln -sfv $GAMEDIR/conf/.rott ~/

if [[ "$ANALOG_STICKS" == '1' ]]; then
GPTOKEYB_CONFIG="$GAMEDIR/rott1joy.gptk"
elif [[ "$DEVICE_NAME" == 'x55' ]] || [[ "$DEVICE_NAME" == 'RG353P' ]]; then
GPTOKEYB_CONFIG="$GAMEDIR/rott_triggers.gptk"
else
GPTOKEYB_CONFIG="$GAMEDIR/rott.gptk"
fi

$GPTOKEYB "rott_sw" -c "$GPTOKEYB_CONFIG" &
./rott_sw

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty1
printf "\033c" > /dev/tty0
19 changes: 15 additions & 4 deletions ports/rott/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
<?xml version='1.0' encoding='utf-8'?>
<gameList>
<game>
<path>./ROTT.sh</path>
<path>./Rise of the Triad - Dark War.sh</path>
<name>Rise of the Triad: Dark War</name>
<desc>A madman with power to kill millions has been discovered, and HUNT (High-risk United Nations Taskforce) has been dispatched to discover his plans. Your team was infiltrating his island stronghold when everything went to hell. The infiltration boat exploded and fire came from all directions. The only way out is in, into the the fortress, but to stay out here would be certain death. So in you go, guns blazing...Rise of the Triad, a first-person shooter, is the successor of Wolfenstein 3D, with a somewhat improved 3D engine. Everything is still composed from blocks, but multiple vertical levels have been added; there are stairs made of platforms floating in air, and jump pads which launch you (and the enemies) high up so that you can walk over tall barriers in your way. The game offers a lot of weapons. You begin with a pistol, but later you can find an extra pistol for John Woo-style shooting, and a MP40 rifle. All these weapons have unlimited ammo. You can also find more potent weapons - from classic rocket launcher, to quite wacky contraptions such as a ''drunk missile'' launcher or the ''Excalibat'', a powerful baseball bat. However, you can carry only one such a strong weapon at a time, and they have limited ammo. Enemies are mostly humans equipped with various weapons. Their attacks can be quite varied; some of them can steal your weapons (though you can retrieve them after killing them), other shoot nets at you that trap you (you have to wriggle out, unless you found a knife, which will allow you to cut your way out). Apart from enemies, you'll be endangered by fireball launchers, rolling boulders and crushing walls. There's a lot of power-ups you can pick up. They all have various wacky effects: for example, ''God Mode'' makes you immortal and allows you to toss homing, insta-death missiles; ''Dog Mode'' turns you into a... dog, which can fit into small spaces (and is inexplicably invulnerable to weapons); ''Shrooms Mode'' makes everything shine with bright colours, as if you were on drugs; ''Elasto Mode'' makes you very prone to bouncing off walls when you run into them. ROTT also offers a lot of multi-player game modes; there's the standard deathmatch and ''Capture the Triad'', but there are also more varied modes - e.g. in ''Collector'' the players have no weapons, instead trying to collect as many ''triads'' as possible; in ''Deluder'', the players earn points by destroying ''eluders'' which move around the level.
</desc>
<desc>A madman with power to kill millions has been discovered, and HUNT (High-risk United Nations Taskforce) has been dispatched to discover his plans. Your team was infiltrating his island stronghold when everything went to hell. The infiltration boat exploded and fire came from all directions. The only way out is in, into the the fortress, but to stay out here would be certain death. So in you go, guns blazing...Rise of the Triad, a first-person shooter, is the successor of Wolfenstein 3D, with a somewhat improved 3D engine. Everything is still composed from blocks, but multiple vertical levels have been added; there are stairs made of platforms floating in air, and jump pads which launch you (and the enemies) high up so that you can walk over tall barriers in your way. The game offers a lot of weapons. You begin with a pistol, but later you can find an extra pistol for John Woo-style shooting, and a MP40 rifle. All these weapons have unlimited ammo. You can also find more potent weapons - from classic rocket launcher, to quite wacky contraptions such as a ''drunk missile'' launcher or the ''Excalibat'', a powerful baseball bat. However, you can carry only one such a strong weapon at a time, and they have limited ammo. Enemies are mostly humans equipped with various weapons. Their attacks can be quite varied; some of them can steal your weapons (though you can retrieve them after killing them), other shoot nets at you that trap you (you have to wriggle out, unless you found a knife, which will allow you to cut your way out). Apart from enemies, you'll be endangered by fireball launchers, rolling boulders and crushing walls. There's a lot of power-ups you can pick up. They all have various wacky effects: for example, ''God Mode'' makes you immortal and allows you to toss homing, insta-death missiles; ''Dog Mode'' turns you into a... dog, which can fit into small spaces (and is inexplicably invulnerable to weapons); ''Shrooms Mode'' makes everything shine with bright colours, as if you were on drugs; ''Elasto Mode'' makes you very prone to bouncing off walls when you run into them. ROTT also offers a lot of multi-player game modes; there's the standard deathmatch and ''Capture the Triad'', but there are also more varied modes - e.g. in ''Collector'' the players have no weapons, instead trying to collect as many ''triads'' as possible; in ''Deluder'', the players earn points by destroying ''eluders'' which move around the level.</desc>
<image>./rott/cover.png</image>
<releasedate>19950217T000000</releasedate>
<rating>0.94</rating>
<developer>Developers of Incredible Power, The</developer>
<publisher>Apogee Software</publisher>
<genre>Shooter-Shooter / 1st person</genre>
<genre>Shooter / 1st Person</genre>
</game>
<game>
<path>./Rise of the Triad - The Hunt Begins.sh</path>
<name>Rise of the Triad: The Hunt Begins</name>
<desc>Rise of the Triad is a first-person shooter video game, developed and published by Apogee Software in 1995. The player can choose one of five different characters to play as, each bearing unique attributes such as height, speed, and endurance.</desc>
<image>./rott/cover_thb.jpg</image>
<releasedate>19941221T000000</releasedate>
<rating>0.94</rating>
<developer>Developers of Incredible Power, The</developer>
<publisher>Apogee Software</publisher>
<genre>Shooter / 1st Person</genre>
</game>
</gameList>
53 changes: 29 additions & 24 deletions ports/rott/port.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"version": 2,
"name": "rott.zip",
"items": [
"rott/",
"ROTT.sh"
"version": 3,
"name": "rott.zip",
"items": [
"Rise of the Triad - The Hunt Begins.sh",
"Rise of the Triad - Dark War.sh",
"rott/"
],
"items_opt": [],
"attr": {
"title": "Rise of the Triad",
"porter": [
"romadu",
"Slayer366"
],
"items_opt": null,
"attr": {
"title": "Rise Of The Triad",
"desc": "An open source port of Rise of the Triad by icculus.",
"inst": "The demo files are already included.",
"genres": [
"fps"
],
"porter": [
"romadu"
],
"image": {},
"rtr": true,
"runtime": null,
"reqs": [],
"arch": [
"aarch64"
]
}
"desc": "An open source port of Rise of the Triad by icculus. The shareware files for the first episode are included. The registered game files will be required to play Dark War.",
"desc_md": null,
"inst": "The demo files are already included for the first episode. To play Dark War you will need to provide your DARKWAR.WAD, DARKWAR.RTC, and DARKWAR.RTL game files in the /ports/rott/ directory.",
"inst_md": null,
"genres": [
"fps"
],
"image": null,
"rtr": true,
"exp": false,
"runtime": null,
"reqs": [],
"arch": [
"aarch64"
]
}
}
21 changes: 5 additions & 16 deletions ports/rott/rott/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,27 @@ New gameplay options:

And all of the improvements made in the icculus source port...

To run the game you'll need the following things:

`SDL2.dll` (https://www.libsdl.org/download-2.0.php)

`SDL2_mixer.dll` (https://www.libsdl.org/projects/SDL_mixer/)

And the files:
To run the game you'll need the following things files:

```
HUNTBGIN.RTC
HUNTBGIN.RTL
HUNTBGIN.WAD
DEMO1_3.DMO
DEMO2_3.DMO
DEMO3_3.DMO
DEMO4_3.DMO
REMOTE1.RTS
```

And
And for the registered version:

```
DARKWAR.RTC
DARKWAR.RTL
DARKWAR.WAD
```

Or

```
HUNTBGIN.RTC
HUNTBGIN.RTL
HUNTBGIN.WAD
```

Place all those files in the same directory as `rott.exe`.


Expand Down
13 changes: 0 additions & 13 deletions ports/rott/rott/add_these_game_files

This file was deleted.

16 changes: 16 additions & 0 deletions ports/rott/rott/add_these_game_files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Add the following files from the commercial version of the game to '/ports/rott'

DARKWAR.RTC
DARKWAR.RTL
DARKWAR.WAD
DEMO1_3.DMO
DEMO2_3.DMO
DEMO3_3.DMO
DEMO4_3.DMO
REMOTE1.RTS

Files from "The Hunt Begins" may already include some of these. If so, you need only provide these three:

DARKWAR.RTC
DARKWAR.RTL
DARKWAR.WAD
Loading

0 comments on commit 31376f0

Please sign in to comment.