aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-09-06 00:41:31 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-06 00:41:31 +0700
commiteee86e8329d10433ccacf7c939bff2cc28f1d3b6 (patch)
treec24f729f22aa1db7404182aec16d8a4d48e9da14 /games
parent3de7a6405c23eea27594f3255572fa60efd1234f (diff)
games/wolf4sdl: Added (Wolfenstein 3D engine).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/wolf4sdl/README12
-rw-r--r--games/wolf4sdl/datadir.diff312
-rw-r--r--games/wolf4sdl/doinst.sh3
-rw-r--r--games/wolf4sdl/exename.diff32
-rw-r--r--games/wolf4sdl/slack-desc19
-rw-r--r--games/wolf4sdl/wolf4sdl-spear-demo.desktop8
-rw-r--r--games/wolf4sdl/wolf4sdl-spear-full.desktop8
-rw-r--r--games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop8
-rw-r--r--games/wolf4sdl/wolf4sdl-wolf3d-full.desktop8
-rw-r--r--games/wolf4sdl/wolf4sdl.6229
-rw-r--r--games/wolf4sdl/wolf4sdl.SlackBuild138
-rw-r--r--games/wolf4sdl/wolf4sdl.info14
-rw-r--r--games/wolf4sdl/wolf4sdl.pngbin0 -> 753 bytes
13 files changed, 791 insertions, 0 deletions
diff --git a/games/wolf4sdl/README b/games/wolf4sdl/README
new file mode 100644
index 000000000000..ba2a6454f997
--- /dev/null
+++ b/games/wolf4sdl/README
@@ -0,0 +1,12 @@
+wolf4sdl (Wolfenstein 3D engine)
+
+Wolf4SDL is an open-source SDL port of id Software's classic first-person
+shooter Wolfenstein 3D. It is meant to keep the original feel while
+taking advantage of some modern improvements.
+
+This build includes the game data files from the shareware/demo versions
+of Wolfenstein 3D and its sequel Spear of Destiny.
+
+To play the full versions of the games, you need the *.wl*, *.sod,
+and/or *.sd* files from your installed copies of the games. Copy them to
+"/usr/share/games/wolf3d". Filenames must be all-lowercase.
diff --git a/games/wolf4sdl/datadir.diff b/games/wolf4sdl/datadir.diff
new file mode 100644
index 000000000000..b62ea0be0899
--- /dev/null
+++ b/games/wolf4sdl/datadir.diff
@@ -0,0 +1,312 @@
+diff -Naur Wolf4SDL-1.7-src.orig//Makefile Wolf4SDL-1.7-src/Makefile
+--- Wolf4SDL-1.7-src.orig//Makefile 2008-02-18 01:54:38.000000000 -0500
++++ Wolf4SDL-1.7-src/Makefile 2012-01-13 16:43:43.000000000 -0500
+@@ -17,6 +17,7 @@
+ LDFLAGS_SDL ?= $(shell $(SDL_CONFIG) --libs)
+
+
++CFLAGS += -DPREFIX='"$(PREFIX)"'
+ CFLAGS += $(CFLAGS_SDL)
+
+ #CFLAGS += -Wall
+@@ -64,6 +65,7 @@
+ SRCS += wl_play.cpp
+ SRCS += wl_state.cpp
+ SRCS += wl_text.cpp
++SRCS += datafile.cpp
+
+ DEPS = $(filter %.d, $(SRCS:.c=.d) $(SRCS:.cpp=.d))
+ OBJS = $(filter %.o, $(SRCS:.c=.o) $(SRCS:.cpp=.o))
+diff -Naur Wolf4SDL-1.7-src.orig//datafile.cpp Wolf4SDL-1.7-src/datafile.cpp
+--- Wolf4SDL-1.7-src.orig//datafile.cpp 1969-12-31 19:00:00.000000000 -0500
++++ Wolf4SDL-1.7-src/datafile.cpp 2012-01-13 16:41:32.000000000 -0500
+@@ -0,0 +1,60 @@
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <limits.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++
++#include "datafile.h"
++
++static char *datapath = NULL;
++
++static void set_data_path(void) {
++ if(datapath) return;
++ datapath = getenv("WOLF4PATH");
++ if(datapath) return;
++
++ // 20120113 bkw: should this be "C:\\WOLF3D" on Windows?
++ datapath = (char *)PREFIX "/share/games/wolf3d";
++}
++
++int datafile_exists(const char *file) {
++ char datafile[PATH_MAX];
++ struct stat statbuf;
++
++ set_data_path();
++
++ if(stat(file, &statbuf))
++ return 1;
++
++ sprintf(datafile, "%s/%s", datapath, file);
++ return stat(datafile, &statbuf);
++}
++
++int datafile_open(const char *file, int flags) {
++ char datafile[PATH_MAX];
++ int handle;
++
++ set_data_path();
++
++ if( (handle = open(file, flags)) > 0 )
++ return handle;
++
++ sprintf(datafile, "%s/%s", datapath, file);
++ return open(datafile, flags);
++}
++
++FILE *datafile_fopen(const char *file, const char *mode) {
++ char datafile[PATH_MAX];
++ FILE *f;
++
++ set_data_path();
++
++ if( (f = fopen(file, mode)) )
++ return f;
++
++ sprintf(datafile, "%s/%s", datapath, file);
++ return fopen(datafile, mode);
++}
+diff -Naur Wolf4SDL-1.7-src.orig//datafile.h Wolf4SDL-1.7-src/datafile.h
+--- Wolf4SDL-1.7-src.orig//datafile.h 1969-12-31 19:00:00.000000000 -0500
++++ Wolf4SDL-1.7-src/datafile.h 2012-01-13 16:41:41.000000000 -0500
+@@ -0,0 +1,22 @@
++
++#include <stdio.h>
++/*
++20120113 bkw:
++Functions for loading game data files.
++
++All these functions search for files in:
++
++- The current directory
++- The directory specified by $WOLF4PATH if set
++- If WOLF4PATH not set, fall back to PREFIX/share/games/wolf3d
++
++*/
++
++/* returns true if file exists in the data path, otherwise false */
++int datafile_exists(const char *file);
++
++/* returns a filehandle to the file if found, or -1 if not */
++int datafile_open(const char *file, int flags);
++
++/* returns a FILE* if found, or NULL if not */
++FILE *datafile_fopen(const char *file, const char *mode);
+diff -Naur Wolf4SDL-1.7-src.orig//id_ca.cpp Wolf4SDL-1.7-src/id_ca.cpp
+--- Wolf4SDL-1.7-src.orig//id_ca.cpp 2009-02-24 15:13:22.000000000 -0500
++++ Wolf4SDL-1.7-src/id_ca.cpp 2012-01-13 16:40:25.000000000 -0500
+@@ -24,6 +24,7 @@
+ #include <unistd.h>
+ #endif
+
++#include "datafile.h"
+ #include "wl_def.h"
+ #pragma hdrstop
+
+@@ -185,7 +186,7 @@
+ {
+ int32_t size;
+
+- const int handle = open(filename, O_RDONLY | O_BINARY);
++ const int handle = datafile_open(filename, O_RDONLY | O_BINARY);
+ if (handle == -1)
+ return false;
+
+@@ -463,7 +464,7 @@
+ strcpy(fname,gdictname);
+ strcat(fname,graphext);
+
+- handle = open(fname, O_RDONLY | O_BINARY);
++ handle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (handle == -1)
+ CA_CannotOpen(fname);
+
+@@ -474,7 +475,7 @@
+ strcpy(fname,gheadname);
+ strcat(fname,graphext);
+
+- handle = open(fname, O_RDONLY | O_BINARY);
++ handle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (handle == -1)
+ CA_CannotOpen(fname);
+
+@@ -513,7 +514,7 @@
+ strcpy(fname,gfilename);
+ strcat(fname,graphext);
+
+- grhandle = open(fname, O_RDONLY | O_BINARY);
++ grhandle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (grhandle == -1)
+ CA_CannotOpen(fname);
+
+@@ -555,7 +556,7 @@
+ strcpy(fname,mheadname);
+ strcat(fname,extension);
+
+- handle = open(fname, O_RDONLY | O_BINARY);
++ handle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (handle == -1)
+ CA_CannotOpen(fname);
+
+@@ -574,14 +575,14 @@
+ strcpy(fname, "gamemaps.");
+ strcat(fname, extension);
+
+- maphandle = open(fname, O_RDONLY | O_BINARY);
++ maphandle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (maphandle == -1)
+ CA_CannotOpen(fname);
+ #else
+ strcpy(fname,mfilename);
+ strcat(fname,extension);
+
+- maphandle = open(fname, O_RDONLY | O_BINARY);
++ maphandle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (maphandle == -1)
+ CA_CannotOpen(fname);
+ #endif
+@@ -646,7 +647,7 @@
+ strcpy(fname,afilename);
+ strcat(fname,audioext);
+
+- audiohandle = open(fname, O_RDONLY | O_BINARY);
++ audiohandle = datafile_open(fname, O_RDONLY | O_BINARY);
+ if (audiohandle == -1)
+ CA_CannotOpen(fname);
+ }
+diff -Naur Wolf4SDL-1.7-src.orig//id_pm.cpp Wolf4SDL-1.7-src/id_pm.cpp
+--- Wolf4SDL-1.7-src.orig//id_pm.cpp 2008-05-25 04:40:50.000000000 -0400
++++ Wolf4SDL-1.7-src/id_pm.cpp 2012-01-13 16:42:23.000000000 -0500
+@@ -1,3 +1,4 @@
++#include "datafile.h"
+ #include "wl_def.h"
+
+ int ChunksInFile;
+@@ -19,7 +20,7 @@
+ char fname[13] = "vswap.";
+ strcat(fname,extension);
+
+- FILE *file = fopen(fname,"rb");
++ FILE *file = datafile_fopen(fname,"rb");
+ if(!file)
+ CA_CannotOpen(fname);
+
+diff -Naur Wolf4SDL-1.7-src.orig//wl_menu.cpp Wolf4SDL-1.7-src/wl_menu.cpp
+--- Wolf4SDL-1.7-src.orig//wl_menu.cpp 2010-11-01 13:17:58.000000000 -0400
++++ Wolf4SDL-1.7-src/wl_menu.cpp 2012-01-13 16:55:02.000000000 -0500
+@@ -14,6 +14,7 @@
+ #include <unistd.h>
+ #endif
+
++#include "datafile.h"
+ #include "wl_def.h"
+ #pragma hdrstop
+
+@@ -4029,12 +4030,12 @@
+ //
+ #ifdef JAPAN
+ #ifdef JAPDEMO
+- if(!stat("vswap.wj1", &statbuf))
++ if(datafile_exists("vswap.wj1"))
+ {
+ strcpy (extension, "wj1");
+ numEpisodesMissing = 5;
+ #else
+- if(!stat("vswap.wj6", &statbuf))
++ if(datafile_exists("vswap.wj6"))
+ {
+ strcpy (extension, "wj6");
+ #endif
+@@ -4052,7 +4053,7 @@
+ // ENGLISH
+ //
+ #ifdef UPLOAD
+- if(!stat("vswap.wl1", &statbuf))
++ if(datafile_exists("vswap.wl1"))
+ {
+ strcpy (extension, "wl1");
+ numEpisodesMissing = 5;
+@@ -4061,7 +4062,7 @@
+ Quit ("NO WOLFENSTEIN 3-D DATA FILES to be found!");
+ #else
+ #ifndef SPEAR
+- if(!stat("vswap.wl6", &statbuf))
++ if(datafile_exists("vswap.wl6"))
+ {
+ strcpy (extension, "wl6");
+ NewEmenu[2].active =
+@@ -4074,7 +4075,7 @@
+ }
+ else
+ {
+- if(!stat("vswap.wl3", &statbuf))
++ if(datafile_exists("vswap.wl3"))
+ {
+ strcpy (extension, "wl3");
+ numEpisodesMissing = 3;
+@@ -4082,7 +4083,7 @@
+ }
+ else
+ {
+- if(!stat("vswap.wl1", &statbuf))
++ if(datafile_exists("vswap.wl1"))
+ {
+ strcpy (extension, "wl1");
+ numEpisodesMissing = 5;
+@@ -4099,28 +4100,28 @@
+ #ifndef SPEARDEMO
+ if(param_mission == 0)
+ {
+- if(!stat("vswap.sod", &statbuf))
++ if(datafile_exists("vswap.sod"))
+ strcpy (extension, "sod");
+ else
+ Quit ("NO SPEAR OF DESTINY DATA FILES TO BE FOUND!");
+ }
+ else if(param_mission == 1)
+ {
+- if(!stat("vswap.sd1", &statbuf))
++ if(datafile_exists("vswap.sd1"))
+ strcpy (extension, "sd1");
+ else
+ Quit ("NO SPEAR OF DESTINY DATA FILES TO BE FOUND!");
+ }
+ else if(param_mission == 2)
+ {
+- if(!stat("vswap.sd2", &statbuf))
++ if(datafile_exists("vswap.sd2"))
+ strcpy (extension, "sd2");
+ else
+ Quit ("NO SPEAR OF DESTINY DATA FILES TO BE FOUND!");
+ }
+ else if(param_mission == 3)
+ {
+- if(!stat("vswap.sd3", &statbuf))
++ if(datafile_exists("vswap.sd3"))
+ strcpy (extension, "sd3");
+ else
+ Quit ("NO SPEAR OF DESTINY DATA FILES TO BE FOUND!");
+@@ -4130,7 +4131,7 @@
+ strcpy (graphext, "sod");
+ strcpy (audioext, "sod");
+ #else
+- if(!stat("vswap.sdm", &statbuf))
++ if(datafile_exists("vswap.sdm"))
+ {
+ strcpy (extension, "sdm");
+ }
diff --git a/games/wolf4sdl/doinst.sh b/games/wolf4sdl/doinst.sh
new file mode 100644
index 000000000000..5fb28930db0b
--- /dev/null
+++ b/games/wolf4sdl/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/games/wolf4sdl/exename.diff b/games/wolf4sdl/exename.diff
new file mode 100644
index 000000000000..2c1f249aa432
--- /dev/null
+++ b/games/wolf4sdl/exename.diff
@@ -0,0 +1,32 @@
+diff -Naur Wolf4SDL-1.7-src/wl_main.cpp Wolf4SDL-1.7-src.patched/wl_main.cpp
+--- Wolf4SDL-1.7-src/wl_main.cpp 2011-05-15 23:11:34.000000000 -0400
++++ Wolf4SDL-1.7-src.patched/wl_main.cpp 2014-09-05 12:06:24.000000000 -0400
+@@ -1678,6 +1678,10 @@
+ bool hasError = false, showHelp = false;
+ bool sampleRateGiven = false, audioBufferGiven = false;
+ int defaultSampleRate = param_samplerate;
++ char *exename = argv[0], *p;
++
++ for (p = argv[0]; *p; p++)
++ if (*p == '/') exename = p + 1;
+
+ for(int i = 1; i < argc; i++)
+ {
+@@ -1884,7 +1888,7 @@
+ "Wolf4SDL v1.7 ($Revision: 256 $)\n"
+ "Ported by Chaos-Software (http://www.chaos-software.de.vu)\n"
+ "Original Wolfenstein 3D by id Software\n\n"
+- "Usage: Wolf4SDL [options]\n"
++ "Usage: %s [options]\n"
+ "Options:\n"
+ " --help This help page\n"
+ " --tedlevel <level> Starts the game in the given level\n"
+@@ -1923,7 +1927,7 @@
+ " (default: 0 -> .sod, 1-3 -> .sd*)\n"
+ " --goodtimes Disable copy protection quiz\n"
+ #endif
+- , defaultSampleRate
++ , exename, defaultSampleRate
+ );
+ exit(1);
+ }
diff --git a/games/wolf4sdl/slack-desc b/games/wolf4sdl/slack-desc
new file mode 100644
index 000000000000..4542afafa54a
--- /dev/null
+++ b/games/wolf4sdl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+wolf4sdl: wolf4sdl (Wolfenstein 3D engine)
+wolf4sdl:
+wolf4sdl: Wolf4SDL is an open-source SDL port of id Software's classic
+wolf4sdl: first-person shooter Wolfenstein 3D. It is meant to keep the original
+wolf4sdl: feel while taking advantage of some modern improvements.
+wolf4sdl:
+wolf4sdl:
+wolf4sdl:
+wolf4sdl:
+wolf4sdl:
+wolf4sdl:
diff --git a/games/wolf4sdl/wolf4sdl-spear-demo.desktop b/games/wolf4sdl/wolf4sdl-spear-demo.desktop
new file mode 100644
index 000000000000..f887d96f7c05
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl-spear-demo.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Wolf3D Spear of Destiny (Demo)
+Icon=wolf4sdl
+TryExec=wolf4sdl-spear-demo
+Exec=wolf4sdl-spear-demo --windowed-mouse --res 960 720
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-spear-full.desktop b/games/wolf4sdl/wolf4sdl-spear-full.desktop
new file mode 100644
index 000000000000..3d5ae3431f52
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl-spear-full.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Wolf3D Spear of Destiny (Full Version)
+Icon=wolf4sdl
+TryExec=wolf4sdl-spear-full
+Exec=wolf4sdl-spear-full --windowed-mouse --res 960 720
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop b/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop
new file mode 100644
index 000000000000..5c014611805f
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Wolfenstein 3D (Demo)
+Icon=wolf4sdl
+TryExec=wolf4sdl-wolf3d-demo
+Exec=wolf4sdl-wolf3d-demo --windowed-mouse --res 960 720
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop b/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop
new file mode 100644
index 000000000000..1e8a37c764bd
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Wolfenstein 3D (Full Version)
+Icon=wolf4sdl
+TryExec=wolf4sdl-wolf3d-full
+Exec=wolf4sdl-wolf3d-full --windowed-mouse --res 960 720
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl.6 b/games/wolf4sdl/wolf4sdl.6
new file mode 100644
index 000000000000..b65e1f88dfe2
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl.6
@@ -0,0 +1,229 @@
+.TH WOLF4SDL "6" "March 2010" "wolf4sdl" "Games"
+.SH NAME
+Wolf4SDL \- Game engine for Wolfenstein 3D and Spear of Destiny
+.SH SYNOPSIS
+.B wolf4sdl\-wolf\-demo
+[\fIoptions\fR]
+.br
+.B wolf4sdl\-wolf\-full
+[\fIoptions\fR]
+.br
+.B wolf4sdl\-spear\-demo
+[\fIoptions\fR]
+.br
+.B wolf4sdl\-spear\-full
+[\fIoptions\fR]
+.br
+.SH DESCRIPTION
+Wolf4SDL is an open\-source port of id Software's classic first\-person
+shooter Wolfenstein 3D to the cross\-platform multimedia library "Simple
+DirectMedia Layer (SDL)" (http://www.libsdl.org). It is meant to keep
+the original feel while taking advantage of some modern improvements.
+.PP
+Wolf4SDL is a game engine. To actually play the game, it requires the
+data files from the original game (see \fBFILES\fR, below).
+.SH OPTIONS
+.TP
+\fB\-\-help\fR
+Usage summary
+.TP
+\fB\-\-tedlevel\fR <level>
+Starts the game in the given level
+.TP
+\fB\-\-baby\fR
+Sets the difficulty to baby for tedlevel
+.TP
+\fB\-\-easy\fR
+Sets the difficulty to easy for tedlevel
+.TP
+\fB\-\-normal\fR
+Sets the difficulty to normal for tedlevel
+.TP
+\fB\-\-hard\fR
+Sets the difficulty to hard for tedlevel
+.TP
+\fB\-\-nowait\fR
+Skips intro screens
+.TP
+\fB\-\-windowed\fR
+Starts the game in a window, without mouse support.
+.TP
+\fB\-\-windowed\-mouse\fR
+Starts the game in a window, with mouse support. The mouse pointer will be unable to
+leave the game window.
+.TP
+\fB\-\-res\fR <width> <height> Sets the screen resolution
+(must be multiple of 320x200 or 320x240). In fullscreen mode, the game switches
+to the smallest available fullscreen mode that's equal to or larger than the
+chosen resolution (e.g. 960x720 usually results in a 1024x768 display with black
+borders).
+.TP
+\fB\-\-resf\fR <width> <height>
+Sets any screen resolution >= 320x200
+(which may result in graphic errors, and occasional crashes)
+.TP
+\fB\-\-bits\fR <b>
+Sets the screen color depth
+(use this when you have palette/fading problems.
+allowed: 8, 16, 24, 32; default: "best" depth)
+.TP
+\fB\-\-joystick\fR <index>
+Use the index\-th joystick if available
+(\fB\-1\fR to disable joystick, default: 0)
+.TP
+\fB\-\-joystickhat\fR <index>
+Enables movement with the given coolie hat
+.TP
+\fB\-\-samplerate\fR <rate>
+Sets the sound sample rate (given in Hz, default: 44100)
+.TP
+\fB\-\-audiobuffer\fR <size>
+Sets the size of the audio buffer (\-> sound latency)
+(given in bytes, default: 2048 / (44100 / samplerate))
+.TP
+\fB\-\-ignorenumchunks\fR
+Ignores the number of chunks in VGAHEAD.*
+(may be useful for some broken mods)
+.TP
+\fB\-\-mission\fR <mission>
+\fBwolf4sdl\-spear\-full only:\fR Mission number to play (0\-3, default: 0).
+.br
+0 \- Original release of Spear of Destiny
+.br
+1 \- Re\-elease of Spear of Destiny by Steam
+.br
+2 \- Return to Danger
+.br
+3 \- Ultimate Challenge
+.TP
+\fB\-\-goodtimes\fR
+\fBwolf4sdl\-spear\-full only:\fR Disable copy protection quiz
+.TP
+\fB\-\-goobers\fR
+\fBwolf4sdl\-wolf\-full and wolf4sdl\-wolf\-demo:\fR Enable cheat/debug mode (then press \fIShift\-Alt\-Backspace\fR while playing)
+.TP
+\fB\-\-debugmode\fR
+\fBwolf4sdl\-spear\-full and wolf4sdl\-spear\-demo:\fR Enable cheat/debug mode (then press \fIShift\-Alt\-Backspace\fR while playing)
+.SH ENVIRONMENT
+.TP
+\fBWOLF4PATH\fR
+Sets the directory where game data files are searched for. When this
+variable is not set, the default directory is
+\fIPREFIX\fR\fB/share/games/wolf3d\fR (\fIPREFIX\fR was set at
+compile time, and defaults to /usr/local).
+.PP
+Note that data files are always searched for in the current directory
+first, regardless of this setting.
+.SH FILES
+Per\-user config files and saved games are stored in \fB~/.wolf4sdl\fR
+.PP
+Game data files are searched for \fBfirst\fR in the current directory,
+then in \fB$WOLF4PATH\fR (see above). Each game binary uses a different
+set of data files:
+.TS
+box;
+cB cB cB
+l c r
+l c r
+l c r
+l c r
+r s r.
+Game Executable Files
+Wolf3D Shareware wolf4sdl\-wolf\-demo *.wl1
+Wolf3D Registered wolf4sdl\-wolf\-full *.wl6 or *.wl3
+Spear Demo wolf4sdl\-spear\-demo *.sdm
+Spear Full Version wolf4sdl\-spear\-full *.sod
+wolf4sdl\-spear\-full \-\-mission 1 *.sd1
+wolf4sdl\-spear\-full \-\-mission 2 *.sd2
+wolf4sdl\-spear\-full \-\-mission 3 *.sd3
+.TE
+.PP
+All filenames must be in lowercase (e.g. \fIvgahead.wl1\fR, not \fIVGAHEAD.WL1\fR).
+.PP
+The Wolf3D and Spear demo/shareware data files can be downloaded from
+.br
+\fIhttp://sourceforge.net/projects/wolfgl/files/\fR
+.br
+The files are called \fBwolfdata.zip\fR and \fBsdmdata.zip\fR.
+.PP
+The full/registered versions are available commercially. After installing
+the game (perhaps using DOSBox), the data files will be found in the game's
+install directory.
+.PP
+To play modified versions of the game ("mods"), place the mod's files in
+their own directory, cd to that directory, and run the appropriate game
+binary. The files in the current directory will be used instead of (or in
+addition to) the ones in \fB/usr/share/games/wolf3d\fR. Remember that only
+lowercase filenames will work (use "unzip -LL" when extracting). Unfortunately,
+many available mods include modified versions of the game engine, which
+are only distributed as Windows or DOS executables, with no source. These
+are generally unplayable with Wolf4SDL :(
+.SH CONTROLS
+The controls can be modified from within the game menus. The default
+controls are:
+.TS
+box;
+cB s
+lB l.
+Keyboard Controls
+Up Move Forward
+Down Move Back
+Left Turn Left (or Strafe Left, with Alt)
+Right Turn Right (or Strafe Right, with Alt)
+Space Open Door
+Control Fire Weapon
+Alt Strafe
+Shift Run
+1 Use Knife
+2 Use Pistol
+3 Use Machine Gun
+4 Use Chaingun
+Esc Go to Main Menu
+F1 Help
+F2 Save Game
+F3 Load Game
+F4 Sound Menu
+F5 Resize View
+F6 Controls Menu
+F7 End Game
+F8 Quick Save
+F9 Quick Load
+F10 Exit
+.TE
+.PP
+.TS
+box;
+cB s
+lB l.
+Joystick Controls
+X Axis Turn/Strafe Left/Right
+Y Axis Move Forward/Backward
+Button 1 Fire Weapon
+Button 2 Strafe
+Button 3 Open Door
+Button 4 Run
+.TE
+.PP
+.TS
+box;
+cB s
+lB l.
+Mouse Controls
+X Axis Turn/Strafe Left/Right
+Y Axis Move Forward/Backward
+Left Button (#1) Fire Weapon
+Right Button (#2) Strafe
+Center Button (#3) Open Door
+.TE
+.PP
+Also, if the game was run with \fB\-\-goobers\fR (Wolf)
+or \fB\-\-debugmode\fR (Spear), the standard cheat codes are
+available. Remember to press Alt\-Shift\-Backspace first, and \fBbe
+careful\fR not to accidentally hit Alt\-Ctrl\-Backspace instead (*boom*,
+there goes your X session...)
+.SH AUTHORS
+Ported by Chaos\-Software (http://www.chaos\-software.de.vu)
+.PP
+Original Wolfenstein 3D by id Software.
+.PP
+This man page by B. Watson.
diff --git a/games/wolf4sdl/wolf4sdl.SlackBuild b/games/wolf4sdl/wolf4sdl.SlackBuild
new file mode 100644
index 000000000000..141200bf08b9
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Slackware build script for wolf4sdl
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=wolf4sdl
+VERSION=${VERSION:-1.7}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+SRCNAM=Wolf4SDL
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION-src
+unzip $CWD/$SRCNAM-$VERSION-src.zip
+cd $SRCNAM-$VERSION-src
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# look for game data files in /usr/share/games/wolf3d
+patch -p1 < $CWD/datadir.diff
+
+# show correct executable name in usage message (instead of Wolf4SDL)
+patch -p1 < $CWD/exename.diff
+
+# don't use 'make install', do it manually.
+mkdir -p $PKG/usr/games $PKG/usr/share/games/wolf3d
+
+# Unfortunately, we need 4 separate game binaries for the 4 different
+# supported games...
+
+# Wolfenstein 3D 1.4 Shareware/Demo
+cat <<EOF >config.slack
+CFLAGS=$SLKCFLAGS -DVERSIONALREADYCHOSEN -DCARMACIZED -DUPLOAD
+EOF
+make CONFIG=config.slack PREFIX=/usr
+install -m0755 -s wolf3d $PKG/usr/games/$PRGNAM-wolf-demo
+
+# Wolfenstein 3D 1.4 Full/Registered (GT/ID/Activision)
+# NOTE: If the game complains about your data files being incompatible,
+# you might have the old Apogee 1.4 release. Try removing the -DGOODTIMES
+# below. For other versions, see version.h in the source (or else patch
+# them up to 1.4).
+make clean
+cat <<EOF >config.slack
+CFLAGS=$SLKCFLAGS -DVERSIONALREADYCHOSEN -DCARMACIZED -DGOODTIMES
+EOF
+make CONFIG=config.slack PREFIX=/usr
+install -m0755 -s wolf3d $PKG/usr/games/$PRGNAM-wolf-full
+
+# Spear of Destiny 1.4 Demo
+make clean
+cat <<EOF >config.slack
+CFLAGS=$SLKCFLAGS -DVERSIONALREADYCHOSEN -DCARMACIZED -DSPEAR -DSPEARDEMO
+EOF
+make CONFIG=config.slack PREFIX=/usr
+install -m0755 -s wolf3d $PKG/usr/games/$PRGNAM-spear-demo
+
+# Spear of Destiny 1.4 Full/Registered
+make clean
+cat <<EOF >config.slack
+CFLAGS=$SLKCFLAGS -DVERSIONALREADYCHOSEN -DCARMACIZED -DSPEAR -DGOODTIMES
+EOF
+make CONFIG=config.slack PREFIX=/usr
+install -m0755 -s wolf3d $PKG/usr/games/$PRGNAM-spear-full
+
+# Wolfenstein 3D demo data
+unzip $CWD/wolfdata.zip
+mv *.wl1 $PKG/usr/share/games/wolf3d
+chmod 644 $PKG/usr/share/games/wolf3d/*.wl1
+
+# Spear of Destiny demo data
+unzip $CWD/sdmdata.zip
+mv *.sdm $PKG/usr/share/games/wolf3d
+chmod 644 $PKG/usr/share/games/wolf3d/*.sdm
+
+# man page written for this build
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-demo.6.gz
+ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-full.6.gz
+ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-demo.6.gz
+ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-full.6.gz
+
+# icon came from gods know where (somewhere on upstream site)
+# .desktop files written for this build
+mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
+cp $CWD/*.desktop $PKG/usr/share/applications/
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Changes.txt README.txt license-*.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/doinst.sh > $PKG/usr/doc/$PRGNAM-$VERSION/doinst.sh
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/wolf4sdl/wolf4sdl.info b/games/wolf4sdl/wolf4sdl.info
new file mode 100644
index 000000000000..7df1043c3f73
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl.info
@@ -0,0 +1,14 @@
+PRGNAM="wolf4sdl"
+VERSION="1.7"
+HOMEPAGE="http://web.archive.org/web/20140728192012/http://www.chaos-software.de.vu/"
+DOWNLOAD="http://web.archive.org/web/20120419135331/http://www.alice-dsl.net/mkroll/bins/Wolf4SDL-1.7-src.zip \
+ http://downloads.sourceforge.net/project/wolfgl/Data/Demo/wolfdata.zip \
+ http://downloads.sourceforge.net/project/wolfgl/Data/Demo/sdmdata.zip"
+DOWNLOAD_x86_64=""
+MD5SUM="303f340598bfbe3440523c1ddb9f52e8 \
+ bc4564940cae816aec0f4af0b8436baf \
+ 0aa1f89a8f5ddef700613b0f428fd8b0"
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/wolf4sdl/wolf4sdl.png b/games/wolf4sdl/wolf4sdl.png
new file mode 100644
index 000000000000..ddd8ffe76756
--- /dev/null
+++ b/games/wolf4sdl/wolf4sdl.png
Binary files differ