aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/worldofpadman/Makefile183
-rw-r--r--games/worldofpadman/distinfo9
-rw-r--r--games/worldofpadman/files/extra-patch-cellshading933
-rw-r--r--games/worldofpadman/files/patch-Makefile382
-rw-r--r--games/worldofpadman/files/patch-code__qcommon__common.c10
-rw-r--r--games/worldofpadman/files/patch-code__qcommon__q_platform.h15
-rw-r--r--games/worldofpadman/files/patch-code__unix__linux_glimp.c19
-rw-r--r--games/worldofpadman/pkg-descr18
-rw-r--r--games/worldofpadman/pkg-message12
-rw-r--r--games/worldofpadman/pkg-plist104
11 files changed, 1686 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 2c022030fc08..f9c5aaa5aec9 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -827,6 +827,7 @@
SUBDIR += wolfpack
SUBDIR += wop
SUBDIR += wordplay
+ SUBDIR += worldofpadman
SUBDIR += wormux
SUBDIR += wormux-devel
SUBDIR += wrogue
diff --git a/games/worldofpadman/Makefile b/games/worldofpadman/Makefile
new file mode 100644
index 000000000000..44ac82798985
--- /dev/null
+++ b/games/worldofpadman/Makefile
@@ -0,0 +1,183 @@
+# New ports collection makefile for: worldofpadman
+# Date created: 2008-01-12
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= worldofpadman
+PORTVERSION= 1.2
+CATEGORIES= games
+MASTER_SITES= http://thilo.kickchat.com/download/:full \
+ http://btc3x6.che.uni-bayreuth.de/~tl/wop_final/:full \
+ ftp://ftp.snt.utwente.nl/pub/games/worldofpadman/linux/:full,update \
+ ftp://ftp.kickchat.com/wop/:update \
+ http://www.hessenfragger.de/uploads/:update \
+ http://padworld.myexp.de/downloads/:source \
+ http://thilo.kickchat.com/download/:source
+DISTNAME= wopengine_src-1.1
+DISTFILES= worldofpadman.run:full \
+ wop_patch_1_2.run:update \
+ ${DISTNAME}.tar.bz2:source
+EXTRACT_ONLY= worldofpadman.run \
+ wop_patch_1_2.run
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= World of Padman (WoP) is an open source FPS game
+
+USE_MAKESELF= yes
+USE_GMAKE= yes
+ALL_TARGET= release
+NO_PACKAGE= package will be ~600MB; set FORCE_PACKAGE if you really want it
+
+OPTIONS= CLIENT "Build client" on \
+ CELLSHADING "Enable Cell Shading effect" off \
+ CURL "Enable curl support" on \
+ CURL_DLOPEN "Enable dynamic loading of curl" on \
+ GAMELIBS "Build game libraries (when not mandatory)" off \
+ DEDICATED "Build dedicated server" on \
+ MP3 "Enable MP3 support" off \
+ OPENAL "Enable OpenAL (3D sound) support" off \
+ OPENAL_DLOPEN "Enable dynamic loading of OpenAL" off \
+ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ SDL_AUDIO "Use SDL for audio" off \
+ SDL_VIDEO "Use SDL for video" off \
+ SMP "Build SMP (threaded) client" on \
+ VORBIS "Enable Ogg Vorbis codec support" on
+
+MAKE_ENV= DEFAULT_BASEDIR="${DATADIR}" PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+VM_ARCHS= amd64 i386 powerpc
+
+# Should be in bsd.commands.mk. Remove when ports/118749 is committed.
+UNMAKESELF_CMD?= ${LOCALBASE}/bin/unmakeself
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \
+ defined(WITHOUT_SMP)
+IGNORE= needs at least one of CLIENT, DEDICATED and SMP options
+.endif
+
+.for i in ${ARCH}
+. if ${VM_ARCHS:M${i}} != ""
+HAVE_VM_COMPILED= yes
+. endif
+.endfor
+
+.if defined(HAVE_VM_COMPILED)
+MAKE_ENV+= HAVE_VM_COMPILED=true
+.endif
+
+.if defined(WITH_CELLSHADING)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cellshading
+.endif
+
+.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP)
+# curl
+. if defined(WITH_CURL)
+LIB_DEPENDS+= curl.4:${PORTSDIR}/ftp/curl
+MAKE_ENV+= USE_CURL=1
+. if defined(WITH_CURL_DLOPEN)
+MAKE_ENV+= USE_CURL_DLOPEN=1
+. endif
+. endif
+# OpenAL
+. if defined(WITH_OPENAL)
+LIB_DEPENDS+= openal.0:${PORTSDIR}/audio/openal
+MAKE_ENV+= USE_OPENAL=1
+. if defined(WITH_OPENAL_DLOPEN)
+MAKE_ENV+= USE_OPENAL_DLOPEN=1
+. endif
+. endif
+# SDL
+. if defined(WITH_SDL_AUDIO)
+USE_SDL= sdl
+MAKE_ENV+= USE_SDL_AUDIO=1
+. endif
+. if defined(WITH_SDL_VIDEO)
+USE_SDL= sdl
+MAKE_ENV+= USE_SDL_VIDEO=1
+. else
+USE_GL= yes
+USE_XLIB= yes
+. endif
+# Vorbis
+. if defined(WITH_VORBIS)
+LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
+MAKE_ENV+= USE_CODEC_VORBIS=1
+. endif
+.endif
+
+.if !defined(WITHOUT_CLIENT)
+MAKE_ENV+= BUILD_CLIENT=1
+PLIST_SUB+= CLIENT=""
+Q3BIN+= wop
+.else
+PLIST_SUB+= CLIENT="@comment "
+.endif
+
+.if !defined(WITHOUT_DEDICATED)
+MAKE_ENV+= BUILD_SERVER=1
+PLIST_SUB+= DEDICATED=""
+Q3BIN+= wopded
+.else
+PLIST_SUB+= DEDICATED="@comment "
+.endif
+
+.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED)
+MAKE_ENV+= BUILD_GAME_SO=1
+PLIST_SUB+= GAMELIBS=""
+.else
+PLIST_SUB+= GAMELIBS="@comment "
+.endif
+
+.if defined(WITH_MP3)
+LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad
+MAKE_ENV+= USE_CODEC_MP3=1
+.endif
+
+.if !defined(WITHOUT_OPTIMIZED_CFLAGS)
+MAKE_ENV+= USE_OPTIMIZED_CFLAGS=1
+.endif
+
+.if !defined(WITHOUT_SMP)
+MAKE_ENV+= BUILD_CLIENT_SMP=1
+PLIST_SUB+= SMP=""
+Q3BIN+= wop-smp
+.else
+PLIST_SUB+= SMP="@comment "
+.endif
+
+post-extract:
+ @${TAR} jxf ${DISTDIR}/${DISTNAME}.tar.bz2 -C ${WRKDIR}
+ @${MKDIR} ${WRKDIR}/wop
+.for f in wop-data wop-data-1.2 extras
+ @cd ${WRKDIR} && ${TAR} xf ${f}.tar -C wop
+.endfor
+ @cd ${WRKDIR} && ${TAR} xf readme.tar
+
+.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED)
+post-build:
+ @cd ${WRKSRC}/build/release && ${MV} baseq3 wop
+.endif
+
+do-install:
+ ${MKDIR} ${DATADIR}
+ ${CP} -r ${WRKDIR}/wop ${DATADIR}
+.for bin in ${Q3BIN}
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/release/${bin} ${PREFIX}/bin
+.endfor
+.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED)
+. for dir in wop missionpack
+ ${MKDIR} ${DATADIR}/${dir}
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/release/${dir}/*.so ${DATADIR}/${dir}
+. endfor
+.endif
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${CP} -r ${WRKDIR}/readme/* ${DOCSDIR}
+.endif
+ @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
+
+.include <bsd.port.post.mk>
diff --git a/games/worldofpadman/distinfo b/games/worldofpadman/distinfo
new file mode 100644
index 000000000000..04184f69b169
--- /dev/null
+++ b/games/worldofpadman/distinfo
@@ -0,0 +1,9 @@
+MD5 (worldofpadman.run) = c7650414d7865ddac26ada6b3f7b8cc9
+SHA256 (worldofpadman.run) = 35ca142d9f212ac25781f2a28ae4a60180c9e93dcd0acee7d2125bf49871582d
+SIZE (worldofpadman.run) = 576952895
+MD5 (wop_patch_1_2.run) = 3468fc91889795471bc68e35ea334614
+SHA256 (wop_patch_1_2.run) = 6aa682063a36177f1c5d663259c2516bc555cc976e3caaeaa30f8a77b3954930
+SIZE (wop_patch_1_2.run) = 72187892
+MD5 (wopengine_src-1.1.tar.bz2) = 9aff4a2077f77e787ba0e3f113f9d6d8
+SHA256 (wopengine_src-1.1.tar.bz2) = 604ab89af32b7e6507b77c9926a24dbaba25bd415020f6dc8ec372d03178c776
+SIZE (wopengine_src-1.1.tar.bz2) = 6282799
diff --git a/games/worldofpadman/files/extra-patch-cellshading b/games/worldofpadman/files/extra-patch-cellshading
new file mode 100644
index 000000000000..ce459a17bd45
--- /dev/null
+++ b/games/worldofpadman/files/extra-patch-cellshading
@@ -0,0 +1,933 @@
+Index: code/renderer/tr_image.c
+===================================================================
+--- code/renderer/tr_image.c (revision 933)
++++ code/renderer/tr_image.c (working copy)
+@@ -34,7 +34,24 @@
+ #define JPEG_INTERNALS
+ #include "../jpeg-6/jpeglib.h"
+
++/**
++ * Headers for cell shading
++ * @author Jordi Prats Catala
++ * @author Guillermo Miranda Alamo
++ */
++/*
++byte getImageR(byte *targa_rgba, int x, int y, int columns, int rows);
++byte getImageG(byte *targa_rgba, int x, int y, int columns, int rows);
++byte getImageB(byte *targa_rgba, int x, int y, int columns, int rows);
++byte getImageA(byte *targa_rgba, int x, int y, int columns, int rows);
++void setImageR(byte *targa_rgba, int x, int y, int columns, int rows, byte value);
++void setImageG(byte *targa_rgba, int x, int y, int columns, int rows, byte value);
++void setImageB(byte *targa_rgba, int x, int y, int columns, int rows, byte value);
++void setImageA(byte *targa_rgba, int x, int y, int columns, int rows, byte value);
++*/
++//void kuwahara(int columns, int rows, byte *targa_rgba);
+
++
+ static void LoadBMP( const char *name, byte **pic, int *width, int *height );
+ static void LoadTGA( const char *name, byte **pic, int *width, int *height );
+ static void LoadJPG( const char *name, byte **pic, int *width, int *height );
+@@ -799,7 +816,643 @@
+ return image;
+ }
+
++/****************************
++RGB GET/SET
++****************************/
+
++//RED
++static byte getImageR(byte *targa_rgba, int x, int y, int columns, int rows)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++ if(rows<=y)
++ y=y%rows;
++ if(columns<=x)
++ x=x%columns;
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++
++ return *pixbuf;
++}
++
++static void setImageR(byte *targa_rgba, int x, int y, int columns, int rows, byte value)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++
++ *pixbuf=value;
++}
++//GREEN
++static byte getImageG(byte *targa_rgba, int x, int y, int columns, int rows)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++ if(rows<=y)
++ y=y%rows;
++ if(columns<=x)
++ x=x%columns;
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++
++ pixbuf++;
++ return *pixbuf;
++}
++
++static void setImageG(byte *targa_rgba, int x, int y, int columns, int rows, byte value)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++ pixbuf++;
++ *pixbuf=value;
++}
++//BLUE
++static byte getImageB(byte *targa_rgba, int x, int y, int columns, int rows)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++ if(rows<=y)
++ y=y%rows;
++ if(columns<=x)
++ x=x%columns;
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++ pixbuf+=2;
++ return *pixbuf;
++}
++
++static void setImageB(byte *targa_rgba, int x, int y, int columns, int rows, byte value)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++ pixbuf+=2;
++ *pixbuf=value;
++}
++//ALPHA
++static byte getImageA(byte *targa_rgba, int x, int y, int columns, int rows)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++ pixbuf+=3;
++ return *pixbuf;
++}
++
++static void setImageA(byte *targa_rgba, int x, int y, int columns, int rows, byte value)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4;
++
++ pixbuf+=(x*4);
++ pixbuf+=3;
++ *pixbuf=value;
++}
++
++//RGB
++static void getImageRGB(byte *targa_rgba, int x, int y, int columns, int rows, vec3_t rgb)
++{
++ byte *pixbuf;
++
++ x*=((x<0)?-1:1);
++ y*=((y<0)?-1:1);
++ //if(rows<=y)
++ y=y%rows;
++ //if(columns<=x)
++ x=x%columns;
++ //x*=((x<0)?-1:1);
++ //y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4 + x*4;
++
++ rgb[0]=*pixbuf;
++ rgb[1]=*(pixbuf+1);
++ rgb[2]=*(pixbuf+2);
++}
++
++static void setImageRGB(byte *targa_rgba, int x, int y, int columns, int rows, vec3_t rgb)
++{
++ byte *pixbuf;
++
++ //x*=((x<0)?-1:1);
++ //y*=((y<0)?-1:1);
++
++ pixbuf = targa_rgba + y*columns*4 + (x*4);
++
++ *pixbuf=(byte)(rgb[0]);
++ *(pixbuf+1)=(byte)(rgb[1]);
++ *(pixbuf+2)=(byte)(rgb[2]);
++}
++
++/****************************
++NO BRAINER'S BLUR
++****************************/
++static void blur(int columns, int rows, byte *targa_rgba)
++{
++ int row, column;
++ float sum;
++
++
++ for(row=0; row<rows; row++)
++ {
++ //pixbuf = targa_rgba + row*columns*4;
++ for(column=0; column<columns; column++)
++ {
++ sum=0;
++ sum+=getImageR(targa_rgba,column-1,row-1,columns,rows);
++ sum+=getImageR(targa_rgba,column,row-1,columns,rows);
++ sum+=getImageR(targa_rgba,column+1,row-1,columns,rows);
++ sum+=getImageR(targa_rgba,column-1,row,columns,rows);
++ sum+=getImageR(targa_rgba,column,row,columns,rows);
++ sum+=getImageR(targa_rgba,column+1,row,columns,rows);
++ sum+=getImageR(targa_rgba,column-1,row+1,columns,rows);
++ sum+=getImageR(targa_rgba,column,row+1,columns,rows);
++ sum+=getImageR(targa_rgba,column+1,row+1,columns,rows);
++
++ sum/=9.0f;
++
++ setImageR(targa_rgba, column, row, columns, rows, (byte)sum);
++ ////////////////////
++ sum=0;
++ sum+=getImageG(targa_rgba,column-1,row-1,columns,rows);
++ sum+=getImageG(targa_rgba,column,row-1,columns,rows);
++ sum+=getImageG(targa_rgba,column+1,row-1,columns,rows);
++ sum+=getImageG(targa_rgba,column-1,row,columns,rows);
++ sum+=getImageG(targa_rgba,column,row,columns,rows);
++ sum+=getImageG(targa_rgba,column+1,row,columns,rows);
++ sum+=getImageG(targa_rgba,column-1,row+1,columns,rows);
++ sum+=getImageG(targa_rgba,column,row+1,columns,rows);
++ sum+=getImageG(targa_rgba,column+1,row+1,columns,rows);
++
++ sum/=9.0f;
++
++ setImageG(targa_rgba, column, row, columns, rows, (byte)sum);
++ ////////////////////////
++ sum=0;
++ sum+=getImageB(targa_rgba,column-1,row-1,columns,rows);
++ sum+=getImageB(targa_rgba,column,row-1,columns,rows);
++ sum+=getImageB(targa_rgba,column+1,row-1,columns,rows);
++ sum+=getImageB(targa_rgba,column-1,row,columns,rows);
++ sum+=getImageB(targa_rgba,column,row,columns,rows);
++ sum+=getImageB(targa_rgba,column+1,row,columns,rows);
++ sum+=getImageB(targa_rgba,column-1,row+1,columns,rows);
++ sum+=getImageB(targa_rgba,column,row+1,columns,rows);
++ sum+=getImageB(targa_rgba,column+1,row+1,columns,rows);
++
++ sum/=9.0f;
++
++ setImageB(targa_rgba, column, row, columns, rows, (byte)sum);
++
++ // "halftoning"
++ /*if((row%5==0)&&(column%5==1))
++ {
++ gris=0;
++ gris+=red;
++ gris+=green;
++ gris+=blue;
++ gris/=3;
++
++ gris=255-gris;
++ if(gris<0)
++ gris=0;
++
++ setImageR(targa_rgba, column, row, columns, rows, (byte)gris);
++ setImageG(targa_rgba, column, row, columns, rows, (byte)gris);
++ setImageB(targa_rgba, column, row, columns, rows, (byte)gris);
++
++ }*/
++
++ }
++ }
++
++}
++
++
++/****************************
++COLORED LIGHTMAP
++****************************/
++void whiteTextureOne(int columns, int rows, byte *targa_rgba){
++ //byte *pixbyf;
++ int row, column;
++ long rMean=0, gMean=0, bMean=0;
++ int pixels=0;
++
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ // Don't count fully transparent pixels
++ if(getImageA(targa_rgba,column,row,columns,rows)==0)
++ continue;
++ // Sum pixels values
++ rMean+=getImageR(targa_rgba,column,row,columns,rows);
++ gMean+=getImageG(targa_rgba,column,row,columns,rows);
++ bMean+=getImageB(targa_rgba,column,row,columns,rows);
++ pixels++;
++ }
++ }
++
++ // Calculate average
++ if(pixels>0){
++ rMean=((float)rMean/(float)pixels);
++ gMean=((float)gMean/(float)pixels);
++ bMean=((float)bMean/(float)pixels);
++ }
++ else{
++ return;
++ }
++
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ if(getImageA(targa_rgba,column,row,columns,rows)<32)
++ continue;
++ setImageR(targa_rgba,column,row,columns,rows,rMean);
++ setImageG(targa_rgba,column,row,columns,rows,gMean);
++ setImageB(targa_rgba,column,row,columns,rows,bMean);
++ }
++ }
++}
++
++int diffSquare(int mean, int val){
++ float variance = (val-mean)/255.0f;
++ float radius = mean<128?mean:255-mean;
++ return mean+(radius*variance);
++}
++
++/****************************
++DECONTRAST
++****************************/
++void whiteTextureTwo(int columns, int rows, byte *targa_rgba){
++ int row, column;
++ long rMean=0, gMean=0, bMean=0;
++ int r=0, g=0, b=0;
++ int pixels=0;
++
++
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ // Don't count fully transparent pixels
++ if(getImageA(targa_rgba,column,row,columns,rows)<32)
++ continue;
++ // Sum pixels values
++ rMean+=getImageR(targa_rgba,column,row,columns,rows);
++ gMean+=getImageG(targa_rgba,column,row,columns,rows);
++ bMean+=getImageB(targa_rgba,column,row,columns,rows);
++ pixels++;
++ }
++ }
++
++ // Calculate average
++ if(pixels>0){
++ rMean=rMean/pixels;
++ gMean=gMean/pixels;
++ bMean=bMean/pixels;
++ }
++ else{
++ return;
++ }
++
++
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ if(getImageA(targa_rgba,column,row,columns,rows)<32)
++ continue;
++ r=getImageR(targa_rgba,column,row,columns,rows);
++ g=getImageG(targa_rgba,column,row,columns,rows);
++ b=getImageB(targa_rgba,column,row,columns,rows);
++
++ setImageR(targa_rgba,column,row,columns,rows,diffSquare(rMean,r));
++ setImageG(targa_rgba,column,row,columns,rows,diffSquare(gMean,g));
++ setImageB(targa_rgba,column,row,columns,rows,diffSquare(bMean,b));
++
++ }
++ }
++}
++
++/****************************
++KUWAHARA ,FAILS SOMEWHERE
++****************************/
++#define KWH_RADIUS 2
++static void mean_variance(int x0, int y0, int x1, int y1, int columns, int rows, byte *targa_rgba, vec4_t mv )
++{
++ short min=255*3, max=0;
++ unsigned short count= 0;
++ short row, column;
++ unsigned short value;
++ vec3_t rgb;
++
++ mv[0]=mv[1]=mv[2]=mv[3]=0;
++
++ for(row=y0;row<=y1;row++)
++ {
++ for(column=x0;column<=x1;column++)
++ {
++ getImageRGB(targa_rgba,column,row,columns,rows,rgb);
++
++ VectorAdd(mv,rgb,mv);
++
++ count++;
++ value=rgb[0]+rgb[1]+rgb[2];
++ if(value<min) min=value;
++ if(value>max) max=value;
++ }
++ }
++
++ mv[0]/=count;
++ mv[1]/=count;
++ mv[2]/=count;
++ mv[3]= (max-min)/3.0f;
++}
++
++
++static void rgb_kuwahara(int x, int y, int columns, int rows, byte *targa_rgba, vec4_t bmv)
++{
++ vec4_t mv;
++ bmv[0]=bmv[1]=bmv[2]=bmv[3]=255;
++
++ mean_variance(x-KWH_RADIUS, y-KWH_RADIUS, x, y, columns, rows, targa_rgba, mv);
++ if( mv[3] < bmv[3] )
++ {
++ Vector4Copy(mv,bmv);
++ }
++
++ mean_variance(x, y-KWH_RADIUS, x+KWH_RADIUS, y, columns, rows, targa_rgba, mv);
++ if( mv[3] < bmv[3] )
++ {
++ Vector4Copy(mv,bmv);
++ }
++
++ mean_variance(x, y, x+KWH_RADIUS, y+KWH_RADIUS, columns, rows, targa_rgba, mv);
++ if( mv[3] < bmv[3] )
++ {
++ Vector4Copy(mv,bmv);
++ }
++
++ mean_variance(x-KWH_RADIUS, y, x, y+KWH_RADIUS, columns, rows, targa_rgba, mv);
++ if( mv[3] < bmv[3] )
++ {
++ Vector4Copy(mv,bmv);
++ }
++}
++
++static void kuwahara(int columns, int rows, byte *targa_rgba){
++ int row, column;
++ vec4_t rgbv;
++
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ rgb_kuwahara(column, row, columns, rows, targa_rgba, rgbv);
++ setImageRGB(targa_rgba,column,row,columns,rows,rgbv);
++ }
++ }
++}
++
++
++#define FLT_MAX 3.40282346638528860000e+38
++static void kuwahara3(int columns, int rows, byte *targa_rgba)
++{
++ byte channel;
++ int size = 10;
++ int index1,index2;
++ int width = columns-4;
++ int height = rows-4;
++ int size2 = (size+1)/2;
++ int offset = (size-1)/2;
++ const int width2 = columns + offset;
++ const int height2 = rows + offset;
++ int x1start = 4;
++ int y1start = 4;
++ int x2, y2;
++ int sum, sum2, n, v=0, xbase, ybase;
++ int y1,x1;
++ int xbase2=0, ybase2=0;
++ float var, min;
++ float** mean, **variance;
++
++ //blur(columns, rows, targa_rgba);
++
++ // I hate malloc I hate malloc I hate malloc I hate malloc I hate malloc I hate malloc
++ mean = (float**)malloc(sizeof(float*)*width2);
++ for(index1=0;index1<width2;index1++)
++ mean[index1] = (float*)malloc(sizeof(float)*height2);
++
++ variance = (float**)malloc(sizeof(float*)*width2);
++ for(index2=0;index2<width2;index2++)
++ variance[index2] = (float*)malloc(sizeof(float)*height2);
++
++ // For each channel (R,G,B)
++ // for(channel=0;channel<2;channel++)
++ // FTL
++ for(channel=0;channel<3;channel++){
++ for (y1=y1start-offset; y1<y1start+height; y1++) {
++
++ for (x1=x1start-offset; x1<x1start+width; x1++) {
++ sum=0; sum2=0; n=0;
++ for (x2=x1; x2<x1+size2; x2++) {
++ for (y2=y1; y2<y1+size2; y2++) {
++ //v = i(x2, y2);
++ switch(channel){
++ case 0:
++ v = getImageR(targa_rgba,x2,y2,columns,rows);
++ break;
++ case 1:
++ v = getImageG(targa_rgba,x2,y2,columns,rows);
++ break;
++ case 2:
++ v = getImageB(targa_rgba,x2,y2,columns,rows);
++ break;
++ }
++ //v = *targa_rgba + y2*columns*4+x2*4;
++ v/=10;
++ v*=10;
++ sum += v;
++ sum2 += v*v;
++ n++;
++ }
++ }
++ //cerr << "Accedo" << endl;
++ mean[x1+offset][y1+offset] = (float)(sum/n);
++ variance[x1+offset][y1+offset] = (float)((n*sum2-sum*sum)/n);
++ }
++ }
++
++ for (y1=y1start; y1<y1start+height; y1++) {
++ /*if ((y1%20)==0)
++ cout << (0.7+0.3*(y1-y1start)/height);*/
++ for (x1=x1start; x1<x1start+width; x1++) {
++ min = FLT_MAX;
++ xbase = x1; ybase=y1;
++ var = variance[xbase][ybase];
++ if (var<min){
++ min= var;
++ xbase2=xbase;
++ ybase2=ybase;
++ }
++ xbase = x1+offset;
++ var = variance[xbase][ybase];
++ if (var<min){
++ min= var;
++ xbase2=xbase;
++ ybase2=ybase;
++ }
++ ybase = y1+offset;
++ var = variance[xbase][ybase];
++ if (var<min){
++ min= var;
++ xbase2=xbase;
++ ybase2=ybase;
++ }
++ xbase = x1;
++ var = variance[xbase][ybase];
++ if (var<min){
++ min= var;
++ xbase2=xbase;
++ ybase2=ybase;
++ }
++ //i(x1, y1)=(int)(mean[xbase2][ybase2]+0.5);
++ switch(channel){
++ case 0:
++ setImageR(targa_rgba,x1,y1,columns,rows,(byte)(mean[xbase2][ybase2]+0.5));
++ break;
++ case 1:
++ setImageG(targa_rgba,x1,y1,columns,rows,(byte)(mean[xbase2][ybase2]+0.5));
++ break;
++ case 2:
++ setImageB(targa_rgba,x1,y1,columns,rows,(byte)(mean[xbase2][ybase2]+0.5));
++ break;
++ }
++ }
++ }
++ }
++ // Fuck mean & variance, this is hell (!+) Bad Religion
++ for(index1=0;index1<width2;index1++)
++ free(mean[index1]);
++ free(mean);
++
++ for(index2=0;index2<width2;index2++)
++ free(variance[index2]);
++ free(variance);
++
++ //blur(columns, rows, targa_rgba);
++}
++
++/****************************
++Symmetric Nearest Neighbour
++****************************/
++
++#define SNN_RADIUS 3
++
++static int deltaE(int l1,int a1,int b1,int l2,int a2,int b2)
++{
++ return (l1-l2)*(l1-l2) + (a1-a2)*(a1-a2) + (b1-b2)*(b1-b2);
++}
++
++static void snn(int columns, int rows, byte *targa_rgba)
++{
++
++ int row, column;
++ unsigned short sumR, sumG, sumB;
++ unsigned short count;
++ short u, v;
++ byte r, g, b;
++ byte r1, g1, b1;
++ byte r2, g2, b2;
++ for(row=0;row<rows;row++){
++ for(column=0;column<columns;column++){
++ sumR=0;
++ sumG=0;
++ sumB=0;
++ count=0;
++
++ r=getImageR(targa_rgba,column,row,columns,rows);
++ g=getImageG(targa_rgba,column,row,columns,rows);
++ b=getImageB(targa_rgba,column,row,columns,rows);
++
++ for(v=-SNN_RADIUS;v<=0;v++)
++ {
++ for(u=-SNN_RADIUS;u<=SNN_RADIUS;u++)
++ {
++ if(v==0&&u>=0) break;
++ // Sum pixels values
++ r1=getImageR(targa_rgba,column+u,row+v,columns,rows);
++ g1=getImageG(targa_rgba,column+u,row+v,columns,rows);
++ b1=getImageB(targa_rgba,column+u,row+v,columns,rows);
++
++ r2=getImageR(targa_rgba,column-u,row-v,columns,rows);
++ g2=getImageG(targa_rgba,column-u,row-v,columns,rows);
++ b2=getImageB(targa_rgba,column-u,row-v,columns,rows);
++
++ if ( deltaE(r,g,b,r1,g1,b1) < deltaE(r,g,b,r2,g2,b2))
++ {
++ sumR += r1;
++ sumG += g1;
++ sumB += b1;
++ }
++ else
++ {
++ sumR += r2;
++ sumG += g2;
++ sumB += b2;
++ }
++ count++;
++ }
++ }
++
++ r=(byte)((int)(2*sumR+r)/(int)(2*count+1));
++ g=(byte)((int)(2*sumG+g)/(int)(2*count+1));
++ b=(byte)((int)(2*sumB+b)/(int)(2*count+1));
++
++ setImageR(targa_rgba,column,row,columns,rows,r);
++ setImageG(targa_rgba,column,row,columns,rows,g);
++ setImageB(targa_rgba,column,row,columns,rows,b);
++ }
++ }
++}
++
++
++
+ /*
+ =========================================================
+
+@@ -1968,6 +2621,50 @@
+ } else if ( !Q_stricmp( name+len-4, ".jpg" ) ) {
+ LoadJPG( name, pic, width, height );
+ }
++
++ switch(r_celshadalgo->integer)
++ {
++ case 1:
++ whiteTextureOne(*width,*height,*pic);
++ break;
++ case 2:
++ whiteTextureTwo(*width,*height,*pic);
++ break;
++ case 10:
++ kuwahara(*width,*height,*pic);
++ break;
++ case 11:
++ blur(*width,*height,*pic);
++ kuwahara(*width,*height,*pic);
++ break;
++ case 12:
++ kuwahara(*width,*height,*pic);
++ blur(*width,*height,*pic);
++ break;
++ case 13:
++ blur(*width,*height,*pic);
++ kuwahara(*width,*height,*pic);
++ blur(*width,*height,*pic);
++ break;
++ case 20:
++ snn(*width,*height,*pic);
++ break;
++ case 21:
++ blur(*width,*height,*pic);
++ snn(*width,*height,*pic);
++ break;
++ case 22:
++ snn(*width,*height,*pic);
++ blur(*width,*height,*pic);
++ break;
++ case 23:
++ blur(*width,*height,*pic);
++ snn(*width,*height,*pic);
++ blur(*width,*height,*pic);
++ break;
++ default:
++ break;
++ }
+ }
+
+
+Index: code/renderer/tr_init.c
+===================================================================
+--- code/renderer/tr_init.c (revision 933)
++++ code/renderer/tr_init.c (working copy)
+@@ -111,6 +111,10 @@
+ cvar_t *r_roundImagesDown;
+ cvar_t *r_colorMipLevels;
+ cvar_t *r_picmip;
++// Next one added for cell shading algorithm selection
++cvar_t *r_celshadalgo;
++//. next one for enable/disable cel bordering all together.
++cvar_t *r_celoutline;
+ cvar_t *r_showtris;
+ cvar_t *r_showsky;
+ cvar_t *r_shownormals;
+@@ -1110,6 +1114,10 @@
+ r_debugSurface = ri.Cvar_Get ("r_debugSurface", "0", CVAR_CHEAT);
+ r_nobind = ri.Cvar_Get ("r_nobind", "0", CVAR_CHEAT);
+ r_showtris = ri.Cvar_Get ("r_showtris", "0", CVAR_CHEAT);
++ // for cell shading algorithm selection
++ r_celshadalgo = ri.Cvar_Get ("r_celshadalgo", "1", CVAR_LATCH);
++ // cel outline option
++ r_celoutline = ri.Cvar_Get("r_celoutline","1", CVAR_ARCHIVE);
+ r_showsky = ri.Cvar_Get ("r_showsky", "0", CVAR_CHEAT);
+ r_shownormals = ri.Cvar_Get ("r_shownormals", "0", CVAR_CHEAT);
+ r_clear = ri.Cvar_Get ("r_clear", "0", CVAR_CHEAT);
+Index: code/renderer/tr_local.h
+===================================================================
+--- code/renderer/tr_local.h (revision 933)
++++ code/renderer/tr_local.h (working copy)
+@@ -1063,6 +1063,8 @@
+ extern cvar_t *r_uiFullScreen; // ui is running fullscreen
+
+ extern cvar_t *r_logFile; // number of frames to emit GL logs
++extern cvar_t *r_celshadalgo; // Cell shading, chooses method: 0 = disabled, 1 = kuwahara, 2 = whiteTexture
++extern cvar_t *r_celoutline; //. cel outline. 1 on, 0 off. (maybe other options later)
+ extern cvar_t *r_showtris; // enables wireframe rendering of the world
+ extern cvar_t *r_showsky; // forces sky in front of all surfaces
+ extern cvar_t *r_shownormals; // draws wireframe normals
+Index: code/renderer/tr_shade.c
+===================================================================
+--- code/renderer/tr_shade.c (revision 933)
++++ code/renderer/tr_shade.c (working copy)
+@@ -201,6 +201,86 @@
+ }
+
+
++//R_DRAWCEL
++static void R_DrawCel( int numIndexes, const glIndex_t *indexes ) {
++ int primitives;
++
++ if(
++ //. ignore the 2d projection. do i smell the HUD?
++ (backEnd.projection2D == qtrue) ||
++ //. ignore general entitites that are sprites. SEE NOTE #3.
++ (backEnd.currentEntity->e.reType == RT_SPRITE) ||
++ //. ignore these liquids. why? ever see liquid with tris on the surface? exactly. SEE NOTE #4.
++ (tess.shader->contentFlags & (CONTENTS_WATER | CONTENTS_LAVA | CONTENTS_SLIME | CONTENTS_FOG)) ||
++ //. ignore things that are two sided, meaning mostly things that have transparency. SEE NOTE #1.
++ (tess.shader->cullType == CT_TWO_SIDED)
++
++ ) {
++ return;
++ }
++
++ primitives = r_primitives->integer;
++
++ // default is to use triangles if compiled vertex arrays are present
++ if ( primitives == 0 ) {
++ if ( qglLockArraysEXT ) {
++ primitives = 2;
++ } else {
++ primitives = 1;
++ }
++ }
++
++ //. correction for mirrors. SEE NOTE #2.
++ if(backEnd.viewParms.isMirror == qtrue) { qglCullFace (GL_FRONT); }
++ else { qglCullFace (GL_BACK); }
++
++ qglEnable (GL_BLEND);
++ qglBlendFunc (GL_SRC_ALPHA ,GL_ONE_MINUS_SRC_ALPHA);
++ qglColor3f (0.0f,0.0f,0.0f);
++ qglLineWidth( (float) r_celoutline->integer );
++
++ if(primitives == 2) {
++ qglDrawElements( GL_TRIANGLES, numIndexes, GL_INDEX_TYPE, indexes );
++ } else if(primitives == 1) {
++ R_DrawStripElements( numIndexes, indexes, qglArrayElement );
++ } else if(primitives == 3) {
++ R_DrawStripElements( numIndexes, indexes, R_ArrayElementDiscrete );
++ }
++
++ //. correction for mirrors. SEE NOTE #2.
++ if(backEnd.viewParms.isMirror == qtrue) { qglCullFace (GL_BACK); }
++ else { qglCullFace (GL_FRONT); }
++
++ qglDisable (GL_BLEND);
++
++ return;
++
++/* Notes
++
++1. this is going to be a pain in the arse. it fixes things like light `beams` from being cel'd but it
++also will ignore any other shader set with no culling. this usually is everything that is translucent.
++but this is a good hack to clean up the screen untill something more selective comes along. or who knows
++group desision might actually be that this is liked. if so i take back calling it a `hack`, lol.
++ = bob.
++
++2. mirrors display correctly because the normals of the displayed are inverted of normal space. so to
++continue to have them display correctly, we must invert them inversely from a normal inversion.
++ = bob.
++
++3. this turns off a lot of space hogging sprite cel outlines. picture if you will five people in a small
++room all shooting rockets. each smoke puff gets a big black square around it, each explosion gets a big
++black square around it, and now nobody can see eachother because everyones screen is solid black.
++ = bob.
++
++4. ignoring liquids means you will not get black tris lines all over the top of your liquid. i put this in
++after seeing the lava on q3dm7 and water on q3ctf2 that had black lines all over the top, making the
++liquids look solid instead of... liquid.
++ = bob.
++
++*/
++}
++
++
+ /*
+ =============================================================
+
+@@ -245,6 +325,33 @@
+ GL_Bind( bundle->image[ index ] );
+ }
+
++//DRAWCEL
++static void DrawCel (shaderCommands_t *input) {
++
++ GL_Bind( tr.whiteImage );
++ qglColor3f (1,1,1);
++
++ GL_State( GLS_POLYMODE_LINE | GLS_DEPTHMASK_TRUE );
++
++ qglDisableClientState (GL_COLOR_ARRAY);
++ qglDisableClientState (GL_TEXTURE_COORD_ARRAY);
++
++ qglVertexPointer (3, GL_FLOAT, 16, input->xyz); // padded for SIMD
++
++ if (qglLockArraysEXT) {
++ qglLockArraysEXT(0, input->numVertexes);
++ GLimp_LogComment( "glLockArraysEXT\n" );
++ }
++
++ R_DrawCel( input->numIndexes, input->indexes );
++
++ if (qglUnlockArraysEXT) {
++ qglUnlockArraysEXT();
++ GLimp_LogComment( "glUnlockArraysEXT\n" );
++ }
++
++}
++
+ /*
+ ================
+ DrawTris
+@@ -1140,6 +1247,12 @@
+ qglPolygonOffset( r_offsetFactor->value, r_offsetUnits->value );
+ }
+
++ //. show me cel outlines.
++ //. there has to be a better place to put this.
++ if(r_celoutline->integer > 0) {
++ DrawCel(&tess);
++ }
++
+ //
+ // if there is only a single pass then we can enable color
+ // and texture arrays before we compile, otherwise we need
+Index: code/renderer/tr_shader.c
+===================================================================
+--- code/renderer/tr_shader.c (revision 933)
++++ code/renderer/tr_shader.c (working copy)
+@@ -2744,7 +2744,17 @@
+ */
+ qhandle_t RE_RegisterShaderNoMip( const char *name ) {
+ shader_t *sh;
++ // Remember previous value
++ int old_r_celshadalgo;
+
++ /*
++ * This will prevent sprites, like buttons, go through
++ * cel shading filters, like kuwahara.
++ * @author gmiranda
++ */
++ old_r_celshadalgo = r_celshadalgo->integer;
++ r_celshadalgo->integer=0;
++
+ if ( strlen( name ) >= MAX_QPATH ) {
+ Com_Printf( "Shader name exceeds MAX_QPATH\n" );
+ return 0;
+@@ -2752,6 +2762,9 @@
+
+ sh = R_FindShader( name, LIGHTMAP_2D, qfalse );
+
++ // Restore value
++ r_celshadalgo->integer=old_r_celshadalgo;
++
+ // we want to return 0 if the shader failed to
+ // load for some reason, but R_FindShader should
+ // still keep a name allocated for it, so if
diff --git a/games/worldofpadman/files/patch-Makefile b/games/worldofpadman/files/patch-Makefile
new file mode 100644
index 000000000000..e8390d6b35de
--- /dev/null
+++ b/games/worldofpadman/files/patch-Makefile
@@ -0,0 +1,382 @@
+--- Makefile.orig Tue Apr 17 17:17:01 2007
++++ Makefile Fri Jan 11 16:55:57 2008
+@@ -27,11 +27,20 @@
+ endif
+ endif
+
+-BUILD_CLIENT =
+-BUILD_CLIENT_SMP =0
+-BUILD_SERVER =
+-BUILD_GAME_SO =0
+-BUILD_GAME_QVM =0
++BUILD_CLIENT?=0
++BUILD_CLIENT_SMP?=0
++BUILD_GAME_QVM?=0
++BUILD_GAME_SO?=0
++BUILD_SERVER?=0
++HAVE_VM_COMPILED?=false
++USE_CODEC_MP3?=0
++USE_CODEC_VORBIS?=0
++USE_LOCAL_HEADERS?=0
++USE_OPENAL?=0
++USE_OPENAL_DLOPEN?=0
++USE_OPTIMIZED_CFLAGS?=0
++USE_SDL_AUDIO?=0
++USE_SDL_VIDEO?=0
+
+ #############################################################################
+ #
+@@ -89,46 +98,10 @@
+ endif
+ export USE_CCACHE
+
+-ifndef USE_SDL
+-USE_SDL=1
+-endif
+-
+-ifndef USE_OPENAL
+-USE_OPENAL=1
+-endif
+-
+-ifndef USE_OPENAL_DLOPEN
+-USE_OPENAL_DLOPEN=1
+-endif
+-
+-ifndef USE_CURL
+-USE_CURL=1
+-endif
+-
+-ifndef USE_CURL_DLOPEN
+- ifeq ($(PLATFORM),mingw32)
+- USE_CURL_DLOPEN=0
+- else
+- USE_CURL_DLOPEN=1
+- endif
+-endif
+-
+-ifndef USE_CODEC_VORBIS
+-USE_CODEC_VORBIS=1
+-endif
+-
+-ifndef USE_CODEC_MP3
+-USE_CODEC_MP3=0
+-endif
+-
+-ifndef USE_LOCAL_HEADERS
+-USE_LOCAL_HEADERS=1
+-endif
+-
+ #############################################################################
+
+-BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
+-BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH)
++BD=$(BUILD_DIR)/debug
++BR=$(BUILD_DIR)/release
+ CDIR=$(MOUNT_DIR)/client
+ SDIR=$(MOUNT_DIR)/server
+ RDIR=$(MOUNT_DIR)/renderer
+@@ -285,14 +258,14 @@
+ endif
+ endif
+
+- ifeq ($(USE_CODEC_VORBIS),1)
+- CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+- endif
+-
+ ifeq ($(USE_CODEC_MP3),1)
+ CLIENT_LDFLAGS += -lmad
+ endif
+
++ ifeq ($(USE_CODEC_VORBIS),1)
++ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
++ endif
++
+ ifeq ($(ARCH),i386)
+ # linux32 make ...
+ BASE_CFLAGS += -m32
+@@ -397,16 +370,16 @@
+ endif
+ endif
+
+- ifeq ($(USE_CODEC_VORBIS),1)
+- BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
+- CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+- endif
+-
+ ifeq ($(USE_CODEC_MP3),1)
+ BASE_CFLAGS += -DUSE_CODEC_MP3=1
+ CLIENT_LDFLAGS += -lmad
+ endif
+
++ ifeq ($(USE_CODEC_VORBIS),1)
++ BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
++ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
++ endif
++
+ ifeq ($(USE_SDL),1)
+ BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 -D_THREAD_SAFE=1 \
+ -I$(SDLHDIR)/include
+@@ -525,18 +498,12 @@
+
+ ifeq ($(PLATFORM),freebsd)
+
+- ifneq (,$(findstring alpha,$(shell uname -m)))
+- ARCH=axp
+- else #default to i386
+- ARCH=i386
+- endif #alpha test
+-
+-
+- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
++ BASE_CFLAGS = -DARCH='\"$(ARCH)\"' -I$(LOCALBASE)/include -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
+
+- GL_CFLAGS = -I/usr/X11R6/include
++ GL_CFLAGS = -I$(X11BASE)/include
+
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g
++ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -pipe
+
+ ifeq ($(USE_OPENAL),1)
+ BASE_CFLAGS += -DUSE_OPENAL=1
+@@ -553,47 +520,61 @@
+ BASE_CFLAGS += -DUSE_CODEC_MP3=1
+ endif
+
+- ifeq ($(USE_SDL),1)
+- BASE_CFLAGS += $(shell sdl-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1
++ ifeq ($(USE_SDL_AUDIO),1)
++ BASE_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
++ else
++ ifeq ($(USE_SDL_VIDEO),1)
++ BASE_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
++ endif
+ endif
+
+- ifeq ($(ARCH),axp)
+- CC=gcc
+- BASE_CFLAGS += -DNO_VM_COMPILED
+- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
+- -fomit-frame-pointer -fexpensive-optimizations
+- else
+- ifeq ($(ARCH),i386)
+- CC=gcc
+- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
+- -march=pentium -fomit-frame-pointer -pipe -ffast-math \
+- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
+- -funroll-loops -fstrength-reduce
+- HAVE_VM_COMPILED=true
+- else
+- BASE_CFLAGS += -DNO_VM_COMPILED
++ ifeq ($(USE_SDL_AUDIO),1)
++ BASE_CFLAGS += -DUSE_SDL_SOUND=1
++ endif
++
++ ifeq ($(USE_SDL_VIDEO),1)
++ BASE_CFLAGS += -DUSE_SDL_VIDEO=1
+ endif
++
++ ifeq ($(USE_OPTIMIZED_CFLAGS),1)
++ RELEASE_CFLAGS+=-O3 -ffast-math -funroll-loops -fomit-frame-pointer \
++ -fexpensive-optimizations
++ ifeq ($(ARCH),i386)
++ RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
++ -fstrength-reduce
++ endif
++ endif
++
++ ifneq ($(HAVE_VM_COMPILED),true)
++ BASE_CFLAGS += -DNO_VM_COMPILED
+ endif
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+- THREAD_LDFLAGS=-lpthread
++ THREAD_LDFLAGS=$(PTHREAD_LIBS)
+ # don't need -ldl (FreeBSD)
+ LDFLAGS=-lm
+
+- CLIENT_LDFLAGS =
++ CLIENT_LDFLAGS = -L$(LOCALBASE)/lib
+
+- ifeq ($(USE_SDL),1)
+- CLIENT_LDFLAGS += $(shell sdl-config --libs)
++ ifeq ($(USE_SDL_AUDIO),1)
++ CLIENT_LDFLAGS += $(shell $(SDL_CONFIG) --libs)
+ else
+- CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
++ ifeq ($(USE_SDL_VIDEO),1)
++ CLIENT_LDFLAGS += $(shell $(SDL_CONFIG) --libs)
++ endif
++ endif
++
++ ifneq ($(USE_SDL_VIDEO),1)
++ CLIENT_LDFLAGS += -L$(X11BASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
+ endif
+
+ ifeq ($(USE_OPENAL),1)
++ CLIENT_LDFLAGS += $(THREAD_LDFLAGS)
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+- CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lopenal
++ CLIENT_LDFLAGS += -lopenal
+ endif
+ endif
+
+@@ -759,24 +740,25 @@
+ TARGETS =
+
+ ifneq ($(BUILD_SERVER),0)
+- TARGETS += $(B)/wopded.$(ARCH)$(BINEXT)
++ TARGETS += $(B)/wopded$(BINEXT)
+ endif
+
+ ifneq ($(BUILD_CLIENT),0)
+- TARGETS += $(B)/wop-engine.$(ARCH)$(BINEXT)
+- ifneq ($(BUILD_CLIENT_SMP),0)
+- TARGETS += $(B)/wop-smp.$(ARCH)$(BINEXT)
+- endif
++ TARGETS += $(B)/wop$(BINEXT)
++endif
++
++ifneq ($(BUILD_CLIENT_SMP),0)
++ TARGETS += $(B)/wop-smp$(BINEXT)
+ endif
+
+ ifneq ($(BUILD_GAME_SO),0)
+ TARGETS += \
+- $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
+- $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
+- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \
+- $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
+- $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
+- $(B)/missionpack/ui$(ARCH).$(SHLIBEXT)
++ $(B)/baseq3/cgame.$(SHLIBEXT) \
++ $(B)/baseq3/qagame.$(SHLIBEXT) \
++ $(B)/baseq3/ui.$(SHLIBEXT) \
++ $(B)/missionpack/cgame.$(SHLIBEXT) \
++ $(B)/missionpack/qagame.$(SHLIBEXT) \
++ $(B)/missionpack/ui.$(SHLIBEXT)
+ endif
+
+ ifneq ($(BUILD_GAME_QVM),0)
+@@ -838,11 +820,11 @@
+ $(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS) $(DEPEND_CFLAGS)"
+
+ build_release: B=$(BR)
+-build_release: makedirs tools
++build_release: makedirs
+ $(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS) $(DEPEND_CFLAGS)"
+
+ #Build both debug and release builds
+-all:build_debug build_release
++all:build_release
+
+ targets: $(TARGETS)
+
+@@ -1056,13 +1038,10 @@
+ ifeq ($(ARCH),i386)
+ Q3OBJ += $(B)/client/vm_x86.o
+ endif
+- ifeq ($(ARCH),x86)
+- Q3OBJ += $(B)/client/vm_x86.o
+- endif
+- ifeq ($(ARCH),x86_64)
++ ifeq ($(ARCH),amd64)
+ Q3OBJ += $(B)/client/vm_x86_64.o
+ endif
+- ifeq ($(ARCH),ppc)
++ ifeq ($(ARCH),powerpc)
+ Q3OBJ += $(B)/client/$(VM_PPC).o
+ endif
+ endif
+@@ -1109,10 +1088,10 @@
+ $(B)/client/sdl_glimp_smp.o
+ endif
+
+-$(B)/wop-engine.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
++$(B)/wop$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
+ $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
+
+-$(B)/wop-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
++$(B)/wop-smp$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
+ $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
+ $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
+
+@@ -1415,15 +1394,21 @@
+ ifeq ($(ARCH),x86)
+ Q3DOBJ += $(B)/ded/vm_x86.o
+ endif
++ ifeq ($(ARCH),amd64)
++ Q3DOBJ += $(B)/ded/vm_x86_64.o
++ endif
+ ifeq ($(ARCH),x86_64)
+ Q3DOBJ += $(B)/ded/vm_x86_64.o
+ endif
++ ifeq ($(ARCH),powerpc)
++ Q3DOBJ += $(B)/ded/$(VM_PPC).o
++ endif
+ ifeq ($(ARCH),ppc)
+ Q3DOBJ += $(B)/ded/$(VM_PPC).o
+ endif
+ endif
+
+-$(B)/wopded.$(ARCH)$(BINEXT): $(Q3DOBJ)
++$(B)/wopded$(BINEXT): $(Q3DOBJ)
+ $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
+
+ $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC)
+@@ -1540,7 +1525,7 @@
+ Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
+ Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
+
+-$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
++$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
+
+ $(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
+@@ -1581,7 +1566,7 @@
+ MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
+ MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
+
+-$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
++$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
+
+ $(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
+@@ -1631,7 +1616,7 @@
+ Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
+ Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
+
+-$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
++$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
+
+ $(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
+@@ -1679,7 +1664,7 @@
+ MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
+ MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
+
+-$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
++$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
+
+ $(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
+@@ -1739,7 +1724,7 @@
+ Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
+ Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
+
+-$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
++$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ)
+ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
+
+ $(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
+@@ -1764,7 +1749,7 @@
+ MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
+ MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
+
+-$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
++$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ)
+ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
+
+ $(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
diff --git a/games/worldofpadman/files/patch-code__qcommon__common.c b/games/worldofpadman/files/patch-code__qcommon__common.c
new file mode 100644
index 000000000000..6899017952d4
--- /dev/null
+++ b/games/worldofpadman/files/patch-code__qcommon__common.c
@@ -0,0 +1,10 @@
+--- ./code/qcommon/common.c.orig Wed Apr 26 08:27:12 2006
++++ ./code/qcommon/common.c Sun Jun 11 17:26:26 2006
+@@ -25,6 +25,7 @@
+ #include "qcommon.h"
+ #include <setjmp.h>
+ #ifndef _WIN32
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <sys/stat.h> // umask
+ #else
diff --git a/games/worldofpadman/files/patch-code__qcommon__q_platform.h b/games/worldofpadman/files/patch-code__qcommon__q_platform.h
new file mode 100644
index 000000000000..543c8d5710ed
--- /dev/null
+++ b/games/worldofpadman/files/patch-code__qcommon__q_platform.h
@@ -0,0 +1,15 @@
+--- ./code/qcommon/q_platform.h.orig Tue Dec 27 16:46:01 2005
++++ ./code/qcommon/q_platform.h Sun Jun 11 17:26:26 2006
+@@ -176,11 +176,7 @@
+ #define ID_INLINE inline
+ #define PATH_SEP '/'
+
+-#ifdef __i386__
+-#define ARCH_STRING "i386"
+-#elif defined __axp__
+-#define ARCH_STRING "alpha"
+-#endif
++#define ARCH_STRING ARCH
+
+ #if BYTE_ORDER == BIG_ENDIAN
+ #define Q3_BIG_ENDIAN
diff --git a/games/worldofpadman/files/patch-code__unix__linux_glimp.c b/games/worldofpadman/files/patch-code__unix__linux_glimp.c
new file mode 100644
index 000000000000..00304f2b5be1
--- /dev/null
+++ b/games/worldofpadman/files/patch-code__unix__linux_glimp.c
@@ -0,0 +1,19 @@
+--- ./code/unix/linux_glimp.c.orig Sun Apr 30 11:32:56 2006
++++ ./code/unix/linux_glimp.c Sun Jun 11 17:26:26 2006
+@@ -631,8 +631,14 @@
+
+ dx = ((int)event.xmotion.x - mwx);
+ dy = ((int)event.xmotion.y - mwy);
+- mx += dx;
+- my += dy;
++ if (abs(dx) > 1)
++ mx += dx * 2;
++ else
++ mx += dx;
++ if (abs(dy) > 1)
++ my += dy * 2;
++ else
++ my += dy;
+
+ mwx = event.xmotion.x;
+ mwy = event.xmotion.y;
diff --git a/games/worldofpadman/pkg-descr b/games/worldofpadman/pkg-descr
new file mode 100644
index 000000000000..7a2a30c272db
--- /dev/null
+++ b/games/worldofpadman/pkg-descr
@@ -0,0 +1,18 @@
+World of Padman (WoP) is an open source first-person shooter computer game
+available in both English and German. Originally it was a modification for the
+game Quake III Arena titled PadMod created in the year 2004. After the source
+code for Quake III Arena was released, the game became standalone. The idea is
+based on the Padman comic strip for the magazine PlayStation Games created by
+the professional cartoon artist Andreas 'ENTE' Endres, who is also the man who
+made many of the maps included with the game in 1998. The current version runs
+on an enhanced version of the ioquake3 engine, which is based on the Quake III
+Arena engine. Most of the maps in the game are lilliput style, and have a
+commercial-quality level of graphic complexity. Because it was originally a
+mod for Quake III Arena, most of the gameplay is similar. However, there is no
+Capture the Flag mode in World of Padman. World of Padman fully supports bots
+with a variety of skill levels in both online and offline play for all of the
+game types included. A single-player mode has not yet been implemented.
+Players can also record audio and video as they play. The game fully supports
+modifications, and custom maps can be created.
+
+WWW: http://www.worldofpadman.com/
diff --git a/games/worldofpadman/pkg-message b/games/worldofpadman/pkg-message
new file mode 100644
index 000000000000..b2ee47b82f3d
--- /dev/null
+++ b/games/worldofpadman/pkg-message
@@ -0,0 +1,12 @@
+==============================================================================
+
+If you have sound problems with SDL try setting the variable "s_sdlSpeed" to
+"44100". It will be saved to the configuration file.
+
+If you have sound problems with OpenAL recompile without it. Also the OPENAL
+option causes the program to omit restoring gamma and mouse sensivity after
+exitting.
+
+If you enabled CELLSHADING, check files/extra-patch-cellshading for variables.
+
+==============================================================================
diff --git a/games/worldofpadman/pkg-plist b/games/worldofpadman/pkg-plist
new file mode 100644
index 000000000000..c675d1a494da
--- /dev/null
+++ b/games/worldofpadman/pkg-plist
@@ -0,0 +1,104 @@
+%%CLIENT%%bin/wop
+%%SMP%%bin/wop-smp
+%%DEDICATED%%bin/wopded
+%%PORTDOCS%%%%DOCSDIR%%/banner.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright_de.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright_en.html
+%%PORTDOCS%%%%DOCSDIR%%/credits_de.html
+%%PORTDOCS%%%%DOCSDIR%%/credits_en.html
+%%PORTDOCS%%%%DOCSDIR%%/hud_de.html
+%%PORTDOCS%%%%DOCSDIR%%/hud_en.html
+%%PORTDOCS%%%%DOCSDIR%%/index_de.html
+%%PORTDOCS%%%%DOCSDIR%%/index_en.html
+%%PORTDOCS%%%%DOCSDIR%%/main_de.html
+%%PORTDOCS%%%%DOCSDIR%%/main_en.html
+%%PORTDOCS%%%%DOCSDIR%%/menu_de.html
+%%PORTDOCS%%%%DOCSDIR%%/menu_en.html
+%%PORTDOCS%%%%DOCSDIR%%/modes_de.html
+%%PORTDOCS%%%%DOCSDIR%%/modes_en.html
+%%PORTDOCS%%%%DOCSDIR%%/navigation_de.html
+%%PORTDOCS%%%%DOCSDIR%%/navigation_en.html
+%%PORTDOCS%%%%DOCSDIR%%/pictures/dvd_thumb.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/english.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/german.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/hud/centerhud.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/hud/lefthud.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/hud/righthudbb.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/hud/righthudsyc.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/bot_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/callvote.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/main_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/musik.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/options_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/player_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/menu/server_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/misc/balloon.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/misc/health.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/misc/server_hud_kl.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/misc/teleporter.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/floater.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/health.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/jumper.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/killerducks.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/padpower.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/puppetmaster.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/revival.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/shard.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/shield.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/speedy.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/teleporter.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/powerups/visionless.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme01.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme02.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme03.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme04.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme05.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme_back.png
+%%PORTDOCS%%%%DOCSDIR%%/pictures/readme_header.gif
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/balloony.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/betty.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/boaster.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/bubbleg.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/imperius.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/nipper.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/pumper.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/punchy.jpg
+%%PORTDOCS%%%%DOCSDIR%%/pictures/weapons/splasher.jpg
+%%PORTDOCS%%%%DOCSDIR%%/powerups_de.html
+%%PORTDOCS%%%%DOCSDIR%%/powerups_en.html
+%%PORTDOCS%%%%DOCSDIR%%/readme.css
+%%PORTDOCS%%%%DOCSDIR%%/start_de.html
+%%PORTDOCS%%%%DOCSDIR%%/start_en.html
+%%PORTDOCS%%%%DOCSDIR%%/weapons_de.html
+%%PORTDOCS%%%%DOCSDIR%%/weapons_en.html
+%%GAMELIBS%%%%DATADIR%%/missionpack/cgame.so
+%%GAMELIBS%%%%DATADIR%%/missionpack/qagame.so
+%%GAMELIBS%%%%DATADIR%%/missionpack/ui.so
+%%DATADIR%%/wop/server-allgametypes.cfg
+%%DATADIR%%/wop/server-bigballoon.cfg
+%%DATADIR%%/wop/server-lastpadstanding.cfg
+%%DATADIR%%/wop/server-sprayyourcolour.cfg
+%%DATADIR%%/wop/server-wop_kickchat.cfg
+%%DATADIR%%/wop/server-wop_padpack.cfg
+%%DATADIR%%/wop/wop_001.pk3
+%%DATADIR%%/wop/wop_002.pk3
+%%DATADIR%%/wop/wop_003.pk3
+%%DATADIR%%/wop/wop_004.pk3
+%%DATADIR%%/wop/wop_005.pk3
+%%DATADIR%%/wop/wop_006.pk3
+%%DATADIR%%/wop/wop_padpack02.pk3
+%%DATADIR%%/wop/wop_vms.pk3
+%%DATADIR%%/wop/wop_vms12.pk3
+%%GAMELIBS%%%%DATADIR%%/wop/cgame.so
+%%GAMELIBS%%%%DATADIR%%/wop/qagame.so
+%%GAMELIBS%%%%DATADIR%%/wop/ui.so
+@dirrm %%DATADIR%%/wop
+%%GAMELIBS%%@dirrm %%DATADIR%%/missionpack
+@dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures/weapons
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures/powerups
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures/misc
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures/menu
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures/hud
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/pictures
+%%PORTDOCS%%@dirrm %%DOCSDIR%%