File armagetron-codecleanup.diff of Package armagetron
--- src/engine/eGameObject.h
+++ src/engine/eGameObject.h
@@ -111,7 +111,7 @@
virtual void PassEdge( const eWall *w,REAL time,REAL a,int recursion=1 );
// what length multiplicator does driving along the given wall get when it is the given distance away?
- virtual REAL PathfindingModifier( const eWall *w ) const { return 1 ;}
+ virtual REAL PathfindingModifier( const eWall *) const { return 1 ;}
// moves the object from pos to dest during the timeinterval
// [startTime,endTime] and issues all eWall-crossing tEvents
@@ -124,7 +124,7 @@
virtual bool Timestep(REAL currentTime);
// return value: shall this object be destroyed?
- virtual bool EdgeIsDangerous(const eWall *w, REAL time, REAL a) const{
+ virtual bool EdgeIsDangerous(const eWall *w, REAL /*time*/, REAL /*a*/) const{
return w;
}
@@ -149,8 +149,8 @@
virtual void RenderCockpitVirtual(bool primary=false);
//sound output
- virtual void SoundMix(unsigned char *dest,unsigned int len,
- int viewer,REAL rvol,REAL lvol){};
+ virtual void SoundMix(unsigned char */*dest*/,unsigned int /*len*/,
+ int /*viewer*/,REAL /*rvol*/,REAL /*lvol*/){};
// internal camera
virtual eCoord CamDir(){return dir;}
--- src/engine/eGrid.h
+++ src/engine/eGrid.h
@@ -45,6 +45,9 @@
class eCamera;
class nNetObject;
+class eCamera;
+class eGameObject;
+template< class T> class tReferencable;
#define MAX_VIEWERS 4
--- src/engine/eSound.cpp
+++ src/engine/eSound.cpp
@@ -157,6 +157,10 @@
// init using SDL_Mixer
sound_is_there=(Mix_OpenAudio(desired.freq, desired.format, desired.channels, desired.samples)>=0);
+ desired.size = 0;
+ desired.padding = 0;
+ desired.silence = 0;
+
if ( sound_is_there )
{
// query actual sound info
--- src/engine/eVoter.cpp
+++ src/engine/eVoter.cpp
@@ -39,6 +39,9 @@
#include "ePlayer.h"
#include "eGrid.h"
+class eMenuItemVote;
+class eVoteItem;
+
static unsigned short se_votingItemID = 0;
static float se_votingTimeout = 300.0f;
static nSettingItem< float > se_vt( "VOTING_TIMEOUT", se_votingTimeout );
--- src/engine/eWall.h
+++ src/engine/eWall.h
@@ -55,6 +55,10 @@
class eWall;
class eGameObject;
+template< class T> class tReferencable;
+class eWallView;
+class eWallHolder;
+
class eWallView:public tHeapElement{
friend class eWall;
protected:
--- src/network/nPriorizing.h
+++ src/network/nPriorizing.h
@@ -37,11 +37,15 @@
class nBandwidthControl;
class nBandwidthTask;
+template< class T> class tReferencable;
+class nBandwidthTaskPriorizer;
+class nBandwidthArbitrator;
+
tDECLARE_REFOBJ( nBandwidthTask );
tDECLARE_REFOBJ( nBandwidthArbitrator );
// small task that will eat away some bandwidth
-class nBandwidthTask: public tHeapElement, public tReferencable< nBandwidthTask >
+class nBandwidthTask: public tHeapElement, public tReferencable< class nBandwidthTask >
{
friend class tReferencable< nBandwidthTask >;
friend class nBandwidthTaskPriorizer;
--- src/tools/tConsole.cpp
+++ src/tools/tConsole.cpp
@@ -235,8 +235,8 @@
(*s_callback)(message, interpretation, timeout);
else
{
- con << static_cast<tString>(message) << ":\n";
- con << static_cast<tString>(interpretation) << '\n';
+ con << message << ":\n";
+ con << interpretation << '\n';
}
}
--- src/tron/gCycle.h
+++ src/tron/gCycle.h
@@ -41,6 +41,12 @@
class eSoundPlayer;
class gSensor;
+class gCycle;
+class gCycleMemoryEntry;
+class gPlayerWall;
+class gPlayerWall;
+class gNetPlayerWall;
+class gDestination;
// minimum time between two cycle turns
extern REAL sg_delayCycle;