Search:  
Gentoo Wiki

Rise_of_the_Triad:_Dark_War

Wikipedia has an article on:
Rise of the Triad

Contents

About

Rise of the Triad: Dark War (shortened to RotT) is a first person shooter computer game, first released on December 21, 1994 by Apogee Software (later known as 3D Realms). The shareware version, which contained separate levels from the full version, was called Rise of the Triad: The HUNT begins.

The original ebuild states, you just have to copy the data files to the game directory, but this seems to be wrong. You need to change some parameters in a file. This is reported as Bug #120782 and a patched ebuild is provided. But another bug that enables a fullscreen mode (Bug #82608) was filed. This is combined with the fullversion flag into this ebuild: rott-1.0-r2.ebuild. To enjoy your fullverscreened full version of the game just follow the instructions below. To play in fullscreen type rott -fullscreen.

The Ebuild

File: /usr/local/portage/games-fps/rott/rott-1.0-r2.ebuild
# modified by the_mgt to switch between shareware and fullversion mode via a useflag
# now also supporting the fullscreen patch

inherit eutils games

DESCRIPTION="Rise of the Triad for Linux!"
HOMEPAGE="http://www.icculus.org/rott/"
SRC_URI="http://www.icculus.org/rott/releases/${P}.tar.gz
        http://filesingularity.timedoctor.org/swdata.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc x86"
IUSE="fullversion"
RDEPEND="media-libs/libsdl
        media-libs/sdl-mixer"
DEPEND="${RDEPEND}
        app-arch/unzip"

S=${WORKDIR}/${P}/rott

src_unpack() {
        unpack ${A}
        epatch "${FILESDIR}"/${PV}-custom-datapath.patch
        epatch ${FILESDIR}/${PV}-fullscreen-patch.patch

        if use fullversion ; then
                sed 's:SHAREWARE   1:SHAREWARE   0:'<${S}/develop.h>${S}/develop.h_tmp
                sed 's:SUPERROTT   0:SUPERROTT   1:'<${S}/develop.h_tmp>${S}/develop.h
        fi
}

src_compile() {
        make clean || die
        emake -j1 EXTRACFLAGS="${CFLAGS} -DDATADIR=\\\"${GAMES_DATADIR}/${PN}/\\\"" \
                || die "emake failed"
}

src_install() {
        dogamesbin rott || die "dogamesbin failed"
        dodoc *.txt ../{README,readme.txt}
        cd "${WORKDIR}"
        insinto "${GAMES_DATADIR}"/${PN}
        doins *.dmo huntbgin.* remote1.rts || die "doins failed"
        prepgamesdirs
}

pkg_postinst() {
        games_pkg_postinst
        if use !fullversion ; then
                einfo "The shareware version has been installed."
                echo
                einfo "To play the full version, emerge again with 'USE=\"fullversion\" emerge rott'"
                einfo "And you need the original DOS version of the game!"
        fi

        if use fullversion ; then
                einfo "Copy the original game files to ${GAMES_DATADIR}/${PN}/"
                einfo "Beware: All files have to be in lower case!"
        fi

        echo
        einfo "For fullscreen support start with 'rott -fullscreen'"
}

Howto integrate it

# mkdir /usr/local/portage/games-fps/rott/files -p
# cp /usr/portage/games-fps/rott/files/1.0-custom-datapath.patch /usr/local/portage/games-fps/rott/files/

Download the full screen patch and put it into that files directory. Save the above ebuild text to /usr/local/portage/games-fps/rott/rott-1.0-r2.ebuild. You can download it here

# ebuild /usr/local/portage/games-fps/rott/rott-1.0-r1.ebuild digest
# echo "PORTDIR_OVERLAY="/usr/local/portage/" >> /etc/make.conf
# echo "games-fps/rott fullversion" >> /etc/portage/package.use
# emerge rott

Final Notes

You need the original data files of the game, put them into /usr/share/games/rott. Change all file names to lower case (common error i had with some win2lin games).

After that, just type rott -fullscreen as a user who is in the games group.

Retrieved from "http://www.gentoo-wiki.info/Rise_of_the_Triad:_Dark_War"

Last modified: Sun, 07 Sep 2008 03:19:00 +0000 Hits: 3,038