import shockolate, a source port of the engine for System Shock
ok solene@ (minor tweaks to README since then) DESCR: Shockolate - System Shock, but cross platform! Based on the source code for PowerPC released by Night Dive Studios, Incorporated. Shockolate is a cross platform source port of System Shock, using SDL2. This runs well on OSX, Linux, and Windows right now, with some missing features that need reviving due to not being included in the source code that was released. The end goal for this project is something like what Chocolate Doom is for Doom: an experience that closely mimics the original, but portable and with some quality of life improvements including an OpenGL renderer and mod support!
This commit is contained in:
parent
5327d32fd5
commit
33f90671af
44
games/shockolate/Makefile
Normal file
44
games/shockolate/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2020/09/07 12:14:33 thfr Exp $
|
||||
|
||||
COMMENT = source port of 3D game System Shock
|
||||
|
||||
V = 0.7.8pl20200610
|
||||
DISTNAME = shockolate-v${V}
|
||||
PKGNAME = shockolate-${V}
|
||||
GH_ACCOUNT = Interrupt
|
||||
GH_PROJECT = systemshock
|
||||
GH_COMMIT = 25081d5033ca7dde50d17cb76d4ffaf73de27bb0
|
||||
|
||||
CATEGORIES = games x11
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
# GPLv3
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} GL GLU SDL2 SDL2_mixer c curses
|
||||
WANTLIB += fluidsynth m readline
|
||||
|
||||
# C++11
|
||||
COMPILER = base-clang ports-gcc
|
||||
MODULES = devel/cmake
|
||||
LIB_DEPENDS = audio/fluidsynth \
|
||||
devel/sdl2-mixer
|
||||
CONFIGURE_ARGS = -DENABLE_FLUIDSYNTH=ON \
|
||||
-DENABLE_SDL2=ON \
|
||||
-DENABLE_SOUND=ON
|
||||
CONFIGURE_ENV = SDL2_DIR=${LOCALBASE}
|
||||
NO_TEST = Yes
|
||||
|
||||
do-gen:
|
||||
${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM_DIR} ${PREFIX}/share/shockolate
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/systemshock ${PREFIX}/share/shockolate/
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/shockolate/shaders
|
||||
${INSTALL_DATA} ${WRKSRC}/shaders/* \
|
||||
${PREFIX}/share/shockolate/shaders/
|
||||
${SUBST_CMD} -c -m 755 ${FILESDIR}/systemshock.sh \
|
||||
${PREFIX}/bin/systemshock
|
||||
|
||||
.include <bsd.port.mk>
|
2
games/shockolate/distinfo
Normal file
2
games/shockolate/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (shockolate-v0.7.8pl20200610-25081d50.tar.gz) = BS2AkBn77Fyx6ZCWHDUxNgnRiu0rF0z4mN8KesnfFMQ=
|
||||
SIZE (shockolate-v0.7.8pl20200610-25081d50.tar.gz) = 12060123
|
42
games/shockolate/files/systemshock.sh
Normal file
42
games/shockolate/files/systemshock.sh
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
GAMEDIR="$HOME/.local/share/shockolate"
|
||||
lower=
|
||||
|
||||
lowercase()
|
||||
{
|
||||
lower="$(echo `basename "$1"` | tr '[A-Z]' '[a-z]')"
|
||||
if [ "$lower" != "`basename "$1"`" ] ; then
|
||||
mv "`dirname "$1"`/`basename "$1"`" "`dirname "$1"`/$lower"
|
||||
if [ $? -gt 0 ] ; then
|
||||
echo "error lowercasing $1"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ ! -e "$GAMEDIR/shaders" ] ; then
|
||||
mkdir -p "$GAMEDIR"
|
||||
cp -R ${TRUEPREFIX}/share/shockolate/shaders "$GAMEDIR/"
|
||||
fi
|
||||
|
||||
if [ ! -e "$GAMEDIR/res" ] ; then
|
||||
mkdir -p "$GAMEDIR/res"
|
||||
echo "ERROR: please copy directories DATA and SOUND from System Shock Classic to \"$GAMEDIR/res/\""
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -e "$GAMEDIR/res/generaluser_gs.sf2" ] ; then
|
||||
ln -sf "${LOCALBASE}/share/generaluser-gs/GeneralUser_GS.sf2" "$GAMEDIR/res/generaluser_gs.sf2"
|
||||
fi
|
||||
|
||||
if [ -n "$(ls "$GAMEDIR/res" | grep [A-Z])" ] ; then
|
||||
for f in `find -d "$GAMEDIR/res"`; do
|
||||
if [ "$f" != "$GAMEDIR/res/" ] ; then
|
||||
lowercase "$f"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
cd "$GAMEDIR"
|
||||
${TRUEPREFIX}/share/shockolate/systemshock $*
|
16
games/shockolate/patches/patch-CMakeLists_txt
Normal file
16
games/shockolate/patches/patch-CMakeLists_txt
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2020/09/07 12:14:33 thfr Exp $
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -9,6 +9,10 @@ include(FeatureSummary)
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS OFF)
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||
|
||||
+include_directories( ${LOCALBASE}/include
|
||||
+ ${LOCALBASE}/include/SDL2
|
||||
+ ${X11BASE}/include )
|
||||
+
|
||||
# Required for stdbool.h
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
# For nullptr in C++
|
9
games/shockolate/pkg/DESCR
Normal file
9
games/shockolate/pkg/DESCR
Normal file
@ -0,0 +1,9 @@
|
||||
Shockolate - System Shock, but cross platform! Based on the source code for
|
||||
PowerPC released by Night Dive Studios, Incorporated. Shockolate is a cross
|
||||
platform source port of System Shock, using SDL2. This runs well on OSX, Linux,
|
||||
and Windows right now, with some missing features that need reviving due to not
|
||||
being included in the source code that was released.
|
||||
|
||||
The end goal for this project is something like what Chocolate Doom is for Doom:
|
||||
an experience that closely mimics the original, but portable and with some
|
||||
quality of life improvements including an OpenGL renderer and mod support!
|
10
games/shockolate/pkg/PLIST
Normal file
10
games/shockolate/pkg/PLIST
Normal file
@ -0,0 +1,10 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/09/07 12:14:33 thfr Exp $
|
||||
bin/systemshock
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/shockolate/
|
||||
share/shockolate/shaders/
|
||||
share/shockolate/shaders/color.frag
|
||||
share/shockolate/shaders/main.vert
|
||||
share/shockolate/shaders/star.frag
|
||||
share/shockolate/shaders/texture.frag
|
||||
@bin share/shockolate/systemshock
|
34
games/shockolate/pkg/README
Normal file
34
games/shockolate/pkg/README
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: README,v 1.1.1.1 2020/09/07 12:14:33 thfr Exp $
|
||||
|
||||
+-------------------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} on OpenBSD
|
||||
+-------------------------------------------------------------------------------
|
||||
|
||||
Installing Game Assets
|
||||
======================
|
||||
|
||||
${PKGSTEM} requires the assets from the classic CD-ROM version of the game from
|
||||
1994. The Enhanced Edition content is not supported at this point.
|
||||
|
||||
After locating the files, copy the game's DATA and SOUND directories into
|
||||
~/.local/share/shockolate/res. Here is an example based on the System Shock:
|
||||
Classic Edition from GOG.com (use innoextract from packages):
|
||||
|
||||
$ innoextract setup_system_shock_classic_2.0.0.3.exe
|
||||
$ mkdir -p ~/.local/share/shockolate/res
|
||||
$ cp -R app/SSHOCK/{DATA,SOUND} ~/.local/share/shockolate/res/
|
||||
$ systemshock
|
||||
|
||||
Note that the wrapper script will automatically lowercase all files and
|
||||
directories in ~/.local/share/shockolate/res.
|
||||
|
||||
Using Soundfonts for Better Audio
|
||||
=================================
|
||||
|
||||
${PKGSTEM} can use sound fonts via fluidsynth as alternative to the rather
|
||||
basic MIDI soundtrack. For easy setup, install the package
|
||||
audio/generaluser-gs-soundfont and select FluidSynth in the in-game menu (Esc ->
|
||||
Audio -> Audio Options).
|
||||
|
||||
Other sound fonts can be install by dropping a .sf2 sound font file into
|
||||
~/.local/share/shockolate/res/.
|
Loading…
Reference in New Issue
Block a user