summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-10-13 17:02:16 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-10-13 17:02:16 +0000
commit10d7cfcfc95d34c5e30a3f8e243061079c34e028 (patch)
tree0bbb5cbc9179fd7f995ae21ca1e81675c3b65403 /games-fps
parentMarking amd64, sparc stable (diff)
downloadgentoo-2-10d7cfcfc95d34c5e30a3f8e243061079c34e028.tar.gz
gentoo-2-10d7cfcfc95d34c5e30a3f8e243061079c34e028.tar.bz2
gentoo-2-10d7cfcfc95d34c5e30a3f8e243061079c34e028.zip
Added patches from Tristan Heaven <nyhm@gentoo.org> and Mike Frysinger <vapier@gentoo.org> and closing bug #132389.
(Portage version: 2.1.2_pre2-r8)
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/avp/ChangeLog7
-rw-r--r--games-fps/avp/avp-20031110.ebuild6
-rw-r--r--games-fps/avp/files/avp-20031110-cleanup.patch735
-rw-r--r--games-fps/avp/files/avp-20031110-gentoo.patch136
4 files changed, 880 insertions, 4 deletions
diff --git a/games-fps/avp/ChangeLog b/games-fps/avp/ChangeLog
index 4f0d6b35cc47..afb32c434391 100644
--- a/games-fps/avp/ChangeLog
+++ b/games-fps/avp/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-fps/avp
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/avp/ChangeLog,v 1.6 2006/10/05 11:24:45 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/avp/ChangeLog,v 1.7 2006/10/13 17:02:16 wolf31o2 Exp $
+
+ 13 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ +files/avp-20031110-cleanup.patch, +files/avp-20031110-gentoo.patch:
+ Added patches from Tristan Heaven <nyhm@gentoo.org> and Mike Frysinger
+ <vapier@gentoo.org> and closing bug #132389.
05 Oct 2006; Tristan Heaven <nyhm@gentoo.org> avp-20031110.ebuild:
Remove nvidia-glx version check
diff --git a/games-fps/avp/avp-20031110.ebuild b/games-fps/avp/avp-20031110.ebuild
index 485f8f9a74ae..8214d0ed2c8e 100644
--- a/games-fps/avp/avp-20031110.ebuild
+++ b/games-fps/avp/avp-20031110.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/avp/avp-20031110.ebuild,v 1.5 2006/10/05 11:24:45 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/avp/avp-20031110.ebuild,v 1.6 2006/10/13 17:02:16 wolf31o2 Exp $
#ECVS_SERVER="icculus.org:/cvs/cvsroot"
ECVS_PASS="anonymous"
@@ -31,12 +31,12 @@ src_unpack() {
cd "${S}"
- sed -i '/alut.h/d' openal.c || die "sed openal.c failed"
sed -i \
- -e "s:-lopenal:/usr/$(get_libdir)/libopenal.a:" \
-e "/^CFLAGS =/s:=.*:=${CFLAGS}:" Makefile \
|| die "sed Makefile failed"
epatch "${FILESDIR}/${P}-gcc34.patch"
+ epatch "${FILESDIR}/${P}-cleanup.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
}
src_install() {
diff --git a/games-fps/avp/files/avp-20031110-cleanup.patch b/games-fps/avp/files/avp-20031110-cleanup.patch
new file mode 100644
index 000000000000..7f23ec098f37
--- /dev/null
+++ b/games-fps/avp/files/avp-20031110-cleanup.patch
@@ -0,0 +1,735 @@
+- change all 'unsigned int' vars that are used with ffreadbuf() to 'size_t'
+- create headers with prototypes to get ride of implicit warnings
+ main.h smacker.h avp/win95/winmain.h win95/dd_func.h
+- declare all the render funcs as using a const char for the textPtr (only
+ some do atm instead of all of them)
+- fix warning in LoadWavFromFastFile about pointer ... func returns a bool
+- fix pointer warning in opengl.c
+- use %p instead of %x when outputting pointers
+- tweak how debug vars are declared to get rid of 'unused variable' warnings
+- cast the 2nd param to an int in avp/support/coordstr.cpp to get rid of
+ implicit double->int cast warning
+- use a regular C cast instead of CXX in win95/hash_tem.hpp to get rid of
+ error about losing precision
+
+Index: main.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/main.c,v
+retrieving revision 1.65
+diff -u -p -r1.65 main.c
+--- main.c 12 Jan 2004 20:39:35 -0000 1.65
++++ main.c 12 Dec 2005 22:50:24 -0000
+@@ -43,6 +43,7 @@
+ #include "progress_bar.h"
+ #include "scrshot.hpp"
+ #include "version.h"
++#include "main.h"
+
+ char LevelName[] = {"predbit6\0QuiteALongNameActually"}; /* the real way to load levels */
+
+Index: menus.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/menus.c,v
+retrieving revision 1.9
+diff -u -p -r1.9 menus.c
+--- menus.c 9 Jan 2002 23:07:34 -0000 1.9
++++ menus.c 12 Dec 2005 22:50:24 -0000
+@@ -290,7 +290,7 @@ static void LoadMenuFont()
+ {
+ AVPMENUGFX *gfxPtr;
+ char buffer[100];
+- unsigned int fastFileLength;
++ size_t fastFileLength;
+ void const *pFastFileData;
+
+ IntroFont_Light.height = 33;
+@@ -600,7 +600,7 @@ int RenderMenuText_Clipped(char *textPtr
+
+ }
+
+-static int RenderSmallFontString(char *textPtr,int sx,int sy,int alpha, int red, int green, int blue)
++static int RenderSmallFontString(const char *textPtr,int sx,int sy,int alpha, int red, int green, int blue)
+ {
+ unsigned char *srcPtr;
+ unsigned short *destPtr;
+@@ -851,10 +851,10 @@ Determine area used by text , so we can
+ if(output_y) *output_y=sy;
+ }
+
+-int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
++int RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
+ {
+ int length;
+- char *ptr;
++ const char *ptr;
+
+ switch(format) {
+ default:
+@@ -889,10 +889,10 @@ int RenderSmallMenuText(char *textPtr, i
+ return RenderSmallFontString(textPtr,x,y,alpha,ONE_FIXED,ONE_FIXED,ONE_FIXED);
+ }
+
+-int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
++int RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
+ {
+ int length;
+- char *ptr;
++ const char *ptr;
+
+ switch(format) {
+ default:
+@@ -1050,7 +1050,7 @@ void LoadAvPMenuGfx(enum AVPMENUGFX_ID m
+ {
+ AVPMENUGFX *gfxPtr;
+ char buffer[100];
+- unsigned int fastFileLength;
++ size_t fastFileLength;
+ void const *pFastFileData;
+
+ GLOBALASSERT(menuGfxID < MAX_NO_OF_AVPMENUGFXS);
+Index: openal.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/openal.c,v
+retrieving revision 1.24
+diff -u -p -r1.24 openal.c
+--- openal.c 10 Aug 2003 02:38:08 -0000 1.24
++++ openal.c 12 Dec 2005 22:50:24 -0000
+@@ -1029,7 +1029,7 @@ int LoadWavFromFastFile(int soundNum, ch
+ strcpy (buf, wavFileName);
+ ffread (&buf[strlen(wavFileName)+1], len, 1, fp);
+ ffclose (fp);
+- len = (int)ExtractWavFile (soundNum, buf);
++ len = (ExtractWavFile (soundNum, buf) == NULL ? 0 : 1);
+ free (buf);
+ }
+
+Index: opengl.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/opengl.c,v
+retrieving revision 1.40
+diff -u -p -r1.40 opengl.c
+--- opengl.c 15 Oct 2003 06:10:42 -0000 1.40
++++ opengl.c 12 Dec 2005 22:50:25 -0000
+@@ -334,7 +334,7 @@ static void CheckTriangleBuffer(int rver
+ FlushTriangleBuffers(0);
+ }
+
+- if ((int)tex != -1)
++ if (tex != (D3DTexture *)-1)
+ CheckBoundTextureIsCorrect(tex);
+ if (mode != -1)
+ CheckTranslucencyModeIsCorrect(mode);
+@@ -1598,7 +1598,7 @@ void D3D_RenderHUDNumber_Centred(unsigne
+ } while (--noOfDigits);
+ }
+
+-void D3D_RenderHUDString(char *stringPtr,int x,int y,int colour)
++void D3D_RenderHUDString(const char *stringPtr,int x,int y,int colour)
+ {
+ struct VertexTag quadVertices[4];
+
+@@ -1809,7 +1809,7 @@ void RenderStringVertically(char *string
+ }
+ }
+
+-int Hardware_RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
++int Hardware_RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
+ {
+ switch(format)
+ {
+@@ -1825,7 +1825,7 @@ int Hardware_RenderSmallMenuText(char *t
+ case AVPMENUFORMAT_RIGHTJUSTIFIED:
+ {
+ int length = 0;
+- signed char *ptr = textPtr;
++ const signed char *ptr = textPtr;
+
+ while(*ptr)
+ {
+@@ -1838,7 +1838,7 @@ int Hardware_RenderSmallMenuText(char *t
+ case AVPMENUFORMAT_CENTREJUSTIFIED:
+ {
+ int length = 0;
+- signed char *ptr = textPtr;
++ const signed char *ptr = textPtr;
+
+ while(*ptr)
+ {
+@@ -1861,7 +1861,7 @@ int Hardware_RenderSmallMenuText(char *t
+ return x;
+ }
+
+-int Hardware_RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
++int Hardware_RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
+ {
+ switch(format)
+ {
+@@ -1877,7 +1877,7 @@ int Hardware_RenderSmallMenuText_Coloure
+ case AVPMENUFORMAT_RIGHTJUSTIFIED:
+ {
+ int length = 0;
+- signed char *ptr = textPtr;
++ const signed char *ptr = textPtr;
+
+ while(*ptr)
+ {
+@@ -1890,7 +1890,7 @@ int Hardware_RenderSmallMenuText_Coloure
+ case AVPMENUFORMAT_CENTREJUSTIFIED:
+ {
+ int length = 0;
+- signed char *ptr = textPtr;
++ const signed char *ptr = textPtr;
+
+ while(*ptr)
+ {
+Index: avp/avpview.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/avpview.c,v
+retrieving revision 1.6
+diff -u -p -r1.6 avpview.c
+--- avp/avpview.c 18 Dec 2001 02:23:40 -0000 1.6
++++ avp/avpview.c 12 Dec 2005 22:50:25 -0000
+@@ -9,6 +9,7 @@
+ #include "avpview.h"
+ #include "opengl.h"
+
++#include "smacker.h"
+ #include "kshape.h"
+ #include "kzsort.h"
+ #include "frustum.h"
+Index: avp/bh_near.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/bh_near.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 bh_near.c
+--- avp/bh_near.c 22 Dec 2001 00:49:58 -0000 1.4
++++ avp/bh_near.c 12 Dec 2005 22:50:26 -0000
+@@ -1646,7 +1646,7 @@ static void AlienNearState_Retreat(STRAT
+
+ if (targetModule) {
+ //textprint("Target module is %s\n",targetModule->name);
+- textprint("Target AI module found, %x.\n",(int)targetModule);
++ textprint("Target AI module found, %p.\n",targetModule);
+ } else {
+ textprint("Target module is NULL!\n");
+ }
+@@ -1830,7 +1830,7 @@ static void AlienNearState_Hunt(STRATEGY
+
+ if (targetModule) {
+ //textprint("Target module is %s\n",targetModule->name);
+- textprint("Target AI module for hunt found, %x.\n",(int)targetModule);
++ textprint("Target AI module for hunt found, %p.\n",targetModule);
+ } else {
+ textprint("Target module is NULL!\n");
+ }
+Index: avp/bh_queen.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/bh_queen.c,v
+retrieving revision 1.6
+diff -u -p -r1.6 bh_queen.c
+--- avp/bh_queen.c 22 May 2003 00:23:07 -0000 1.6
++++ avp/bh_queen.c 12 Dec 2005 22:50:27 -0000
+@@ -505,10 +505,9 @@ void MakeQueenFar(STRATEGYBLOCK *sbPtr)
+
+ /* get the queen's status block */
+ int i;
+- QUEEN_STATUS_BLOCK *queenStatusPointer= (QUEEN_STATUS_BLOCK *)(sbPtr->SBdataptr);
+
+ LOCALASSERT(sbPtr);
+- LOCALASSERT(queenStatusPointer);
++ LOCALASSERT((QUEEN_STATUS_BLOCK *)(sbPtr->SBdataptr));
+ LOCALASSERT(sbPtr->SBdptr != NULL);
+
+ /* get rid of the displayblock */
+Index: avp/bh_waypt.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/bh_waypt.c,v
+retrieving revision 1.3
+diff -u -p -r1.3 bh_waypt.c
+--- avp/bh_waypt.c 22 Dec 2001 00:49:58 -0000 1.3
++++ avp/bh_waypt.c 12 Dec 2005 22:50:27 -0000
+@@ -131,7 +131,7 @@ int NPCGetWaypointDirection(WAYPOINT_HEA
+
+ //Base shift value on strategy block so that the aliens don't keep changing their minds
+ //about which route to take
+- GlobalLinkShift=(((int)sbPtr)&0xffff)>>4;
++ GlobalLinkShift=(((size_t)sbPtr)&0xffff)>>4;
+ if (FindBestRoute(&current_route,waypoints)==0) {
+ /* Yuck! */
+ textprint("Waypoint dropout: no continuous route!\n");
+Index: avp/dynamics.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/dynamics.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 dynamics.c
+--- avp/dynamics.c 22 Dec 2001 00:49:58 -0000 1.4
++++ avp/dynamics.c 12 Dec 2005 22:50:28 -0000
+@@ -43,8 +43,10 @@ you should have seen the previous versio
+ #if 0
+ extern int GlobalFrameCounter;
+ #define LogInfo LOGDXFMT
++ #define LogInfoVar(x) x
+ #else
+ #define LogInfo(args) (void)0
++ #define LogInfoVar(x)
+ #endif
+
+ extern MORPHDISPLAY MorphDisplay;
+@@ -295,7 +297,7 @@ extern void ObjectDynamics(void)
+ InitialiseDynamicObjectsList();
+
+ {
+- DYNAMICSBLOCK *dynPtr = Player->ObStrategyBlock->DynPtr;
++ LogInfoVar(DYNAMICSBLOCK *dynPtr = Player->ObStrategyBlock->DynPtr);
+ LogInfo
+ ((
+ "Dynamics Logging: frame %d\nDL: player's Position %d,%d,%d\nDL: player's Displacement %d,%d,%d\nDL: NormalFrameTime %d\n",
+Index: avp/game.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/game.c,v
+retrieving revision 1.7
+diff -u -p -r1.7 game.c
+--- avp/game.c 22 Dec 2001 00:49:58 -0000 1.7
++++ avp/game.c 12 Dec 2005 22:50:28 -0000
+@@ -10,6 +10,7 @@
+ #include "dynblock.h"
+ #include "dynamics.h"
+
++#include "winmain.h"
+ #include "bh_types.h"
+ #include "bh_alien.h"
+ #include "pheromon.h"
+Index: avp/psndproj.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/psndproj.c,v
+retrieving revision 1.6
+diff -u -p -r1.6 psndproj.c
+--- avp/psndproj.c 9 Jan 2002 23:07:35 -0000 1.6
++++ avp/psndproj.c 12 Dec 2005 22:50:28 -0000
+@@ -856,7 +856,7 @@ int FindAndLoadWavFile(int soundNum,char
+ #if LOAD_SOUND_FROM_FAST_FILE
+ //first look in fast file
+ {
+- unsigned nLen;
++ size_t nLen;
+ if(ffreadbuf(sound_name,&nLen))
+ {
+ return LoadWavFromFastFile(soundNum,sound_name);
+Index: avp/pvisible.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/pvisible.c,v
+retrieving revision 1.3
+diff -u -p -r1.3 pvisible.c
+--- avp/pvisible.c 9 Jan 2002 23:07:35 -0000 1.3
++++ avp/pvisible.c 12 Dec 2005 22:50:29 -0000
+@@ -236,7 +236,7 @@ void DoObjectVisibility(STRATEGYBLOCK *s
+ module. However, we will do a paranoia check for a null containingModule... */
+ if(!sbPtr->containingModule)
+ {
+- textprint("Calling Far EmergencyRelocateObject, On object %x, type %d!\n",(int)sbPtr, sbPtr->I_SBtype);
++ textprint("Calling Far EmergencyRelocateObject, On object %p, type %d!\n",sbPtr, sbPtr->I_SBtype);
+ IdentifyObject(sbPtr);
+ if(!(EmergencyRelocateObject(sbPtr))) {
+ textprint("Relocate failed!\n");
+@@ -432,7 +432,7 @@ void DoObjectVisibility(STRATEGYBLOCK *s
+ if(!(newModule))
+ {
+ /* attempt to relocate object */
+- textprint("Calling Near EmergencyRelocateObject, On object %x, type %d!\n",(int)sbPtr, sbPtr->I_SBtype);
++ textprint("Calling Near EmergencyRelocateObject, On object %p, type %d!\n",sbPtr, sbPtr->I_SBtype);
+ IdentifyObject(sbPtr);
+ if(!(EmergencyRelocateObject(sbPtr))) {
+ textprint("Relocate failed!\n");
+Index: avp/savegame.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/savegame.c,v
+retrieving revision 1.7
+diff -u -p -r1.7 savegame.c
+--- avp/savegame.c 22 May 2003 00:23:07 -0000 1.7
++++ avp/savegame.c 12 Dec 2005 22:50:29 -0000
+@@ -8,6 +8,7 @@
+ #include "comp_shp.h"
+ #include "dynblock.h"
+
++#include "smacker.h"
+ #include "bh_alien.h"
+ #include "pvisible.h"
+ #include "bh_pred.h"
+Index: avp/weapons.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/weapons.c,v
+retrieving revision 1.8
+diff -u -p -r1.8 weapons.c
+--- avp/weapons.c 22 May 2003 00:23:07 -0000 1.8
++++ avp/weapons.c 12 Dec 2005 22:50:31 -0000
+@@ -10138,8 +10138,7 @@ SECTION_DATA *CheckBiteIntegrity(void) {
+ if ((targetpos.vz >0)
+ && (targetpos.vz < (BITE_RANGE<<1))) {
+
+- DYNAMICSBLOCK *dynPtr = Biting->DynPtr;
+- GLOBALASSERT(dynPtr);
++ GLOBALASSERT(Biting->DynPtr);
+
+ if (IsThisObjectVisibleFromThisPosition_WithIgnore(objectPtr,Player,&Global_VDB_Ptr->VDB_World,(BITE_RANGE<<1))) {
+
+Index: avp/support/coordstr.cpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/support/coordstr.cpp,v
+retrieving revision 1.3
+diff -u -p -r1.3 coordstr.cpp
+--- avp/support/coordstr.cpp 9 Jan 2002 23:07:35 -0000 1.3
++++ avp/support/coordstr.cpp 12 Dec 2005 22:50:31 -0000
+@@ -210,7 +210,7 @@ ACTIVITY_RETURN_TYPE AcyclicPulsingCoord
+ textprint("AcyclicPulsingCoordinate :: Activity(%i)\n", FixP_Time);
+ #endif
+
+- int Int_CurrentCoord_Old = Int_CurrentCoord_Val;
++ ACTIVITY_RVAL_TEMP(int Int_CurrentCoord_Old = Int_CurrentCoord_Val);
+
+ ApplyVelocity( FixP_Time );
+
+@@ -276,7 +276,7 @@ ACTIVITY_RETURN_TYPE CyclicPulsingCoordi
+ textprint("CyclicPulsingCoordinate :: Activity(%i)\n", FixP_Time);
+ #endif
+
+- int Int_CurrentCoord_Old = Int_CurrentCoord_Val;
++ ACTIVITY_RVAL_TEMP(int Int_CurrentCoord_Old = Int_CurrentCoord_Val);
+
+ ApplyVelocity( FixP_Time );
+
+@@ -343,7 +343,7 @@ HomingCoordinate::HomingCoordinate
+ FixP_IdealVelocity_Val = DIV_FIXED
+ (
+ (FixP_TargetCoord_Val - FixP_Position_Val),
+- FIXP_SECONDS_FOR_STANDARD_HOMING
++ (int)FIXP_SECONDS_FOR_STANDARD_HOMING
+ );
+ }
+
+@@ -383,7 +383,7 @@ AcyclicHomingCoordinate :: AcyclicHoming
+
+ ACTIVITY_RETURN_TYPE AcyclicHomingCoordinate :: Activity(ACTIVITY_INPUT)
+ {
+- int Int_CurrentCoord_Old = Int_CurrentCoord_Val;
++ ACTIVITY_RVAL_TEMP(int Int_CurrentCoord_Old = Int_CurrentCoord_Val);
+
+ #if 0
+ textprint("acyclic homing coord for time %i\n",FixP_Time);
+@@ -503,7 +503,7 @@ void AcyclicHomingCoordinate :: SetTarge
+
+ FixP_IdealVelocity_Val = DIV_FIXED(
+ (FixP_TargetCoord_Val - FixP_Position_Val),
+- FIXP_SECONDS_FOR_STANDARD_HOMING
++ (int)FIXP_SECONDS_FOR_STANDARD_HOMING
+ );
+
+
+@@ -553,7 +553,7 @@ AcyclicFixedSpeedHoming :: ~AcyclicFixed
+
+ ACTIVITY_RETURN_TYPE AcyclicFixedSpeedHoming :: Activity(ACTIVITY_INPUT)
+ {
+- int Int_CurrentCoord_Old = Int_CurrentCoord_Val;
++ ACTIVITY_RVAL_TEMP(int Int_CurrentCoord_Old = Int_CurrentCoord_Val);
+
+ #if 0
+ textprint("acyclic homing coord for time %i\n",FixP_Time);
+Index: avp/support/daemon.h
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/support/daemon.h,v
+retrieving revision 1.2
+diff -u -p -r1.2 daemon.h
+--- avp/support/daemon.h 29 Jul 2001 02:29:46 -0000 1.2
++++ avp/support/daemon.h 12 Dec 2005 22:50:31 -0000
+@@ -30,12 +30,14 @@
+ #if SupportCallbackHooks
+ #define ACTIVITY_RETURN_TYPE OurBool
+
++ #define ACTIVITY_RVAL_TEMP(b) b
+ #define ACTIVITY_RVAL_CHANGE {return Yes;}
+ #define ACTIVITY_RVAL_NOCHANGE {return No;}
+ #define ACTIVITY_RVAL_BOOL(b) {return b;}
+ #else
+ #define ACTIVITY_RETURN_TYPE void
+
++ #define ACTIVITY_RVAL_TEMP(b)
+ #define ACTIVITY_RVAL_CHANGE {return;}
+ #define ACTIVITY_RVAL_NOCHANGE {return;}
+ #define ACTIVITY_RVAL_BOOL(ignore) {return;}
+Index: avp/win95/progress_bar.cpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/progress_bar.cpp,v
+retrieving revision 1.10
+diff -u -p -r1.10 progress_bar.cpp
+--- avp/win95/progress_bar.cpp 22 Dec 2001 00:49:59 -0000 1.10
++++ avp/win95/progress_bar.cpp 12 Dec 2005 22:50:31 -0000
+@@ -59,7 +59,7 @@ void Start_Progress_Bar()
+ CL_GetImageFileName(buffer, 100,Loading_Bar_Empty_Image_Name, LIO_RELATIVEPATH);
+
+ //see if graphic can be found in fast file
+- unsigned int fastFileLength;
++ size_t fastFileLength;
+ void const * pFastFileData = ffreadbuf(buffer,&fastFileLength);
+
+ if(pFastFileData)
+@@ -89,7 +89,7 @@ void Start_Progress_Bar()
+ CL_GetImageFileName(buffer, 100,Loading_Bar_Full_Image_Name, LIO_RELATIVEPATH);
+
+ //see if graphic can be found in fast file
+- unsigned int fastFileLength;
++ size_t fastFileLength;
+ void const * pFastFileData = ffreadbuf(buffer,&fastFileLength);
+
+ if(pFastFileData)
+@@ -128,7 +128,7 @@ void Start_Progress_Bar()
+
+
+ //see if graphic can be found in fast file
+- unsigned int fastFileLength;
++ size_t fastFileLength;
+ void const * pFastFileData = ffreadbuf(buffer,&fastFileLength);
+
+ if(pFastFileData)
+Index: avp/win95/system.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/system.c,v
+retrieving revision 1.10
+diff -u -p -r1.10 system.c
+--- avp/win95/system.c 9 Jan 2002 23:07:36 -0000 1.10
++++ avp/win95/system.c 12 Dec 2005 22:50:31 -0000
+@@ -12,6 +12,7 @@
+ #include "messagehistory.h"
+ #include "particle.h"
+ #include "pldnet.h"
++#include "smacker.h"
+ #define UseLocalAssert Yes
+ #include "ourasert.h"
+
+Index: avp/win95/frontend/avp_intro.cpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/frontend/avp_intro.cpp,v
+retrieving revision 1.3
+diff -u -p -r1.3 avp_intro.cpp
+--- avp/win95/frontend/avp_intro.cpp 22 Dec 2001 00:49:59 -0000 1.3
++++ avp/win95/frontend/avp_intro.cpp 12 Dec 2005 22:50:31 -0000
+@@ -4,7 +4,8 @@ extern "C"
+ #include "3dc.h"
+ //#include "intro.hpp"
+ #include "inline.h"
+- //#include "smacker.h"
++ #include "smacker.h"
++ #include "winmain.h"
+ #include "avp_menus.h"
+ #include "avp_intro.h"
+ extern int NormalFrameTime;
+@@ -24,7 +25,6 @@ void Show_ARebellionGame(void);
+ void Show_AvPLogo(void);
+ extern void ShowSplashScreens(void);
+ extern void Show_WinnerScreen(void);
+-extern void PlayBinkedFMV(char *filenamePtr);
+ extern void DrawMainMenusBackdrop(void);
+ extern void FadedScreen(int alpha);
+
+Index: avp/win95/frontend/avp_menugfx.cpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/frontend/avp_menugfx.cpp,v
+retrieving revision 1.4
+diff -u -p -r1.4 avp_menugfx.cpp
+--- avp/win95/frontend/avp_menugfx.cpp 9 Jan 2002 23:07:36 -0000 1.4
++++ avp/win95/frontend/avp_menugfx.cpp 12 Dec 2005 22:50:32 -0000
+@@ -256,7 +256,7 @@ extern int RenderMenuText_Clipped(char *
+ }
+
+
+-extern int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
++extern int RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
+ {
+ switch(format)
+ {
+@@ -300,7 +300,7 @@ extern int RenderSmallMenuText(char *tex
+ x = RenderSmallFontString(textPtr,x,y,alpha,ONE_FIXED,ONE_FIXED,ONE_FIXED);
+ return x;
+ }
+-extern int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
++extern int RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
+ {
+ switch(format)
+ {
+@@ -345,7 +345,7 @@ extern int RenderSmallMenuText_Coloured(
+ return x;
+ }
+
+-extern int Hardware_RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
++extern int Hardware_RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
+ {
+ switch(format)
+ {
+@@ -395,7 +395,7 @@ extern int Hardware_RenderSmallMenuText(
+ return x;
+ }
+
+-extern int Hardware_RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
++extern int Hardware_RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue)
+ {
+ switch(format)
+ {
+Index: avp/win95/frontend/avp_menugfx.hpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/frontend/avp_menugfx.hpp,v
+retrieving revision 1.6
+diff -u -p -r1.6 avp_menugfx.hpp
+--- avp/win95/frontend/avp_menugfx.hpp 9 Jan 2002 23:07:36 -0000 1.6
++++ avp/win95/frontend/avp_menugfx.hpp 12 Dec 2005 22:50:32 -0000
+@@ -99,11 +99,11 @@ extern void ReleaseAllAvPMenuGfx(void);
+
+ extern int RenderMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
+
+-extern int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
+-extern int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue);
++extern int RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
++extern int RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue);
+
+-extern int Hardware_RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
+-extern int Hardware_RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue);
++extern int Hardware_RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
++extern int Hardware_RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue);
+
+ extern int RenderMenuText_Clipped(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int topY, int bottomY);
+ extern void RenderSmallFontString_Wrapped(const char *textPtr,RECT* area,int alpha,int* output_x,int* output_y);
+Index: avp/win95/frontend/avp_menus.c
+===================================================================
+RCS file: /cvs/cvsroot/avp/avp/win95/frontend/avp_menus.c,v
+retrieving revision 1.11
+diff -u -p -r1.11 avp_menus.c
+--- avp/win95/frontend/avp_menus.c 22 May 2003 01:55:16 -0000 1.11
++++ avp/win95/frontend/avp_menus.c 12 Dec 2005 22:50:33 -0000
+@@ -8,6 +8,10 @@
+ #include "net.h"
+ #include "opengl.h"
+ #include "pldnet.h"
++#include "main.h"
++#include "winmain.h"
++#include "smacker.h"
++#include "dd_func.h"
+
+ #include "avp_menudata.h"
+ #include "avp_menus.h"
+@@ -1788,7 +1792,7 @@ static void RenderLoadGameMenu(void)
+ AVPMENU_ELEMENT *elementPtr = AvPMenus.MenuElements;
+ int e;
+ int y;
+- int (*RenderText)(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
++ int (*RenderText)(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
+
+ if (AvPMenus.MenusState == MENUSSTATE_MAINMENUS)
+ {
+@@ -3224,8 +3228,8 @@ int LengthOfSmallMenuText(char *textPtr)
+
+ static void RenderMenuElement(AVPMENU_ELEMENT *elementPtr, int e, int y)
+ {
+- int (*RenderText)(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
+- int (*RenderText_Coloured)(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int r, int g, int b);
++ int (*RenderText)(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
++ int (*RenderText_Coloured)(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int r, int g, int b);
+ int (*MenuTextLength)(char *textPtr);
+
+ if (AvPMenus.FontToUse==AVPMENU_FONT_BIG)
+Index: win95/chnktexi.cpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/win95/chnktexi.cpp,v
+retrieving revision 1.4
+diff -u -p -r1.4 chnktexi.cpp
+--- win95/chnktexi.cpp 18 Dec 2001 05:08:53 -0000 1.4
++++ win95/chnktexi.cpp 12 Dec 2005 22:50:33 -0000
+@@ -102,7 +102,7 @@ static char * RiffBasename(Chunk_With_Ch
+ #if CL_SUPPORT_FASTFILE
+ static inline bool IsFileInFastFile(char const * pszFileName)
+ {
+- unsigned nLen;
++ size_t nLen;
+ return ffreadbuf(pszFileName,&nLen) ? true : false;
+ }
+ #endif
+@@ -714,7 +714,7 @@ int CL_LoadImageOnce(char const * pszFil
+ case LIO_DDSURFACE:
+ {
+ #if CL_SUPPORT_FASTFILE
+- unsigned nFastFileLen;
++ size_t nFastFileLen;
+ void const * pFastFileData = ffreadbuf(szBuf,&nFastFileLen);
+ if (pFastFileData)
+ {
+@@ -823,7 +823,7 @@ int CL_LoadImageOnce(char const * pszFil
+ {
+ fAwLoad |= AW_TLF_COMPRESS; // required on some cards!!
+ #if CL_SUPPORT_FASTFILE
+- unsigned nFastFileLen;
++ size_t nFastFileLen;
+ void const * pFastFileData = ffreadbuf(szBuf,&nFastFileLen);
+ if (pFastFileData)
+ {
+Index: win95/hash_tem.hpp
+===================================================================
+RCS file: /cvs/cvsroot/avp/win95/hash_tem.hpp,v
+retrieving revision 1.5
+diff -u -p -r1.5 hash_tem.hpp
+--- win95/hash_tem.hpp 18 Aug 2004 04:20:41 -0000 1.5
++++ win95/hash_tem.hpp 12 Dec 2005 22:50:33 -0000
+@@ -242,7 +242,7 @@
+ inline unsigned HashFunction(void const * const _vP)
+ {
+ // treat as integer
+- return HashFunction(reinterpret_cast<unsigned>(_vP));
++ return HashFunction((unsigned long)(_vP));
+ }
+
+ // a hash function for strings
+--- /dev/null 2005-12-12 17:15:01.544366500 -0500
++++ main.h 2005-12-12 16:33:39.000000000 -0500
+@@ -0,0 +1,11 @@
++#ifndef __MAIN_H__
++#define __MAIN_H__
++
++extern void LoadDeviceAndVideoModePreferences(void);
++extern void SaveDeviceAndVideoModePreferences(void);
++extern void PreviousVideoMode2(void);
++extern void NextVideoMode2(void);
++extern char *GetVideoModeDescription2(void);
++extern char *GetVideoModeDescription3(void);
++
++#endif
+--- /dev/null 2005-12-12 17:15:01.544366500 -0500
++++ smacker.h 2005-12-12 16:29:16.000000000 -0500
+@@ -0,0 +1,11 @@
++#ifndef __SMACKER_H__
++#define __SMACKER_H__
++
++extern void GetFMVInformation(int *messageNumberPtr, int *frameNumberPtr);
++extern void InitialiseTriggeredFMVs(void);
++extern void StartFMVAtFrame(int number, int frame);
++extern void StartTriggerPlotFMV(int number);
++extern void UpdateAllFMVTextures(void);
++extern void EndMenuMusic(void);
++
++#endif
+--- /dev/null 2005-12-12 17:15:01.544366500 -0500
++++ avp/win95/winmain.h 2005-12-12 16:26:06.000000000 -0500
+@@ -0,0 +1,10 @@
++#ifndef __WINMAIN_H__
++#define __WINMAIN_H__
++
++extern void PlayBinkedFMV(char *filenamePtr);
++extern void StartMenuBackgroundBink(void);
++extern int PlayMenuBackgroundBink(void);
++extern void EndMenuBackgroundBink(void);
++extern void InitialiseTriggeredFMVs(void);
++
++#endif
+--- /dev/null 2005-12-12 17:15:01.544366500 -0500
++++ win95/dd_func.h 2005-12-12 16:34:43.000000000 -0500
+@@ -0,0 +1,6 @@
++#ifndef __DD_FUNC_H__
++#define __DD_FUNC_H__
++
++extern int SelectDirectDrawObject(void *pGUID);
++
++#endif
diff --git a/games-fps/avp/files/avp-20031110-gentoo.patch b/games-fps/avp/files/avp-20031110-gentoo.patch
new file mode 100644
index 000000000000..29879e698ddc
--- /dev/null
+++ b/games-fps/avp/files/avp-20031110-gentoo.patch
@@ -0,0 +1,136 @@
+diff -ur avp.orig/avp/win95/gadgets/trepgadg.hpp avp/avp/win95/gadgets/trepgadg.hpp
+--- avp.orig/avp/win95/gadgets/trepgadg.hpp 2001-12-09 01:21:49.000000000 +0000
++++ avp/avp/win95/gadgets/trepgadg.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -56,12 +56,12 @@
+ int FixP_Alpha
+ );
+
+- struct r2pos TextReportGadget :: GetPos_Rel
++ struct r2pos GetPos_Rel
+ (
+ const struct r2rect& R2Rect_Parent
+ ) const;
+
+- r2size TextReportGadget :: GetSize
++ r2size GetSize
+ (
+ const struct r2rect& R2Rect_Parent
+ ) const;
+diff -ur avp.orig/avp/win95/projload.hpp avp/avp/win95/projload.hpp
+--- avp.orig/avp/win95/projload.hpp 2001-08-03 06:30:40.000000000 +0100
++++ avp/avp/win95/projload.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -54,6 +54,8 @@
+ struct hierarchy_variant_data;
+ };
+
++class File_Chunk;
++
+ class Global_Hierarchy_Store
+ {
+
+diff -ur avp.orig/Makefile avp/Makefile
+--- avp.orig/Makefile 2003-10-15 07:10:42.000000000 +0100
++++ avp/Makefile 2006-09-18 22:45:49.000000000 +0100
+@@ -12,7 +12,7 @@
+ CFLAGS += $(shell sdl-config --cflags)
+ CXXFLAGS = $(CFLAGS)
+
+-LDLIBS = $(shell sdl-config --libs) -lopenal
++LDFLAGS += $(shell sdl-config --libs) $(shell openal-config --libdir)/libopenal.a
+
+ AFLAGS = -g -w+macro-params -w+orphan-labels -w+number-overflow
+
+@@ -56,7 +56,7 @@
+ all: AvP
+
+ AvP: $(OBJ) # depend $(OBJ)
+- $(CXX) -o AvP $(OBJ) $(LDLIBS)
++ $(CXX) -o AvP $(OBJ) $(LDFLAGS)
+
+ compile: $(OBJ)
+
+diff -ur avp.orig/openal.c avp/openal.c
+--- avp.orig/openal.c 2003-08-10 03:38:08.000000000 +0100
++++ avp/openal.c 2006-09-18 23:50:23.000000000 +0100
+@@ -5,7 +5,6 @@
+
+ #include <AL/al.h>
+ #include <AL/alc.h>
+-#include <AL/alut.h>
+
+ #include <SDL/SDL_audio.h> // For a few defines (AUDIO_*)
+
+diff -ur avp.orig/win95/chnkload.hpp avp/win95/chnkload.hpp
+--- avp.orig/win95/chnkload.hpp 2001-08-07 03:38:43.000000000 +0100
++++ avp/win95/chnkload.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -41,6 +41,8 @@
+ const ChunkObject* object=0 //object used so that conversion from float to int can be done in world coordinates
+ );
+
++class Sprite_Header_Chunk;
++
+ extern BOOL copy_sprite_to_shapeheader (RIFFHANDLE, SHAPEHEADER *& shphd,Sprite_Header_Chunk* shc, int listpos = GLS_NOTINLIST);
+
+
+diff -ur avp.orig/win95/chunk.hpp avp/win95/chunk.hpp
+--- avp.orig/win95/chunk.hpp 2001-07-28 05:44:27.000000000 +0100
++++ avp/win95/chunk.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -365,7 +365,7 @@
+ virtual void fill_data_block_for_process(char * data_start);
+
+
+- Chunk* Chunk_With_Children::DynCreate(const char* data);
++ Chunk* DynCreate(const char* data);
+
+ protected:
+
+diff -ur avp.orig/win95/chunkpal.hpp avp/win95/chunkpal.hpp
+--- avp.orig/win95/chunkpal.hpp 2001-12-18 02:23:41.000000000 +0000
++++ avp/win95/chunkpal.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -549,7 +549,7 @@
+ class Environment_Game_Mode_Chunk;
+ class Environment_Game_Mode_Header_Chunk;
+
+-
++class Environment_Data_Chunk;
+
+ class Environment_Game_Mode_Chunk : public Chunk_With_Children
+ {
+diff -ur avp.orig/win95/hash_tem.hpp avp/win95/hash_tem.hpp
+--- avp.orig/win95/hash_tem.hpp 2003-01-14 05:43:38.000000000 +0000
++++ avp/win95/hash_tem.hpp 2006-09-18 23:38:01.000000000 +0100
+@@ -231,8 +231,13 @@
+ // HashFunction(unsigned), HashFunction(void const *), HashFunction(char const *)
+ // you can disable the default hash functions by defining HT_NODEFAULTFNS
+
++namespace IFF {
++class RegEntry;
++};
++
+ #ifndef HT_NODEFAULTFNS
+ // a hash function for integral (unsigned) values
++ inline unsigned int HashFunction(const IFF::RegEntry& rEntry);
+ inline unsigned HashFunction(unsigned const _i)
+ {
+ return _i ^ _i>>4 ^ _i>>9 ^ _i>>15 ^ _i>>22;
+@@ -418,7 +423,7 @@
+ };
+
+ // a _base_HashTable non-const iterator - can remove entry pointed to
+- class Iterator : public ConstIterator
++ class Iterator : public _base_HashTable::ConstIterator
+ {
+ // Nested class functions apparently have to be declared here for MSVC compatability
+ public:
+diff -ur avp.orig/win95/iff.cpp avp/win95/iff.cpp
+--- avp.orig/win95/iff.cpp 2001-12-06 00:22:49.000000000 +0000
++++ avp/win95/iff.cpp 2006-09-18 23:38:01.000000000 +0100
+@@ -219,7 +219,7 @@
+
+ } // namespace IFF
+
+-inline unsigned HashFunction(IFF::RegEntry const & rEntry)
++inline unsigned int HashFunction(const IFF::RegEntry& rEntry)
+ {
+ return HashFunction(rEntry.m_idChunk.m_nID);
+ }