Changed: #825 Remove all warning when compiling Ryzom

This commit is contained in:
kervala 2010-07-24 22:29:42 +02:00
parent 9fb6bf039e
commit 15f4e5cb47
10 changed files with 37 additions and 47 deletions

View file

@ -45,7 +45,7 @@ struct IKeyboardDevice;
struct IInputDeviceManager; struct IInputDeviceManager;
class CRect; class CRect;
class CLog; class CLog;
}; }
namespace NL3D namespace NL3D
{ {

View file

@ -24,7 +24,7 @@
namespace NLMISC namespace NLMISC
{ {
class IStream; class IStream;
}; }
namespace NL3D { namespace NL3D {

View file

@ -104,7 +104,7 @@ public:
StaticPreferred, // The buffer will not be modified. A block of driver AGP or VRAM memory is allocated for this buffer. The buffer is writeonly. StaticPreferred, // The buffer will not be modified. A block of driver AGP or VRAM memory is allocated for this buffer. The buffer is writeonly.
RAMVolatile, // A block of temporary driver RAM memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly. RAMVolatile, // A block of temporary driver RAM memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly.
AGPVolatile, // A block of temporary driver AGP memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly. AGPVolatile, // A block of temporary driver AGP memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly.
PreferredCount, PreferredCount
}; };
/** /**
@ -116,7 +116,7 @@ public:
AGPResident, AGPResident,
VRAMResident, VRAMResident,
NotResident, NotResident,
LocationCount, LocationCount
}; };
/** /**
@ -149,7 +149,7 @@ public:
enum enum
{ {
FirstTexCoordValue = TexCoord0, FirstTexCoordValue = TexCoord0,
LastTexCoordValue = TexCoord7, LastTexCoordValue = TexCoord7
}; };
/** /**
@ -172,7 +172,7 @@ public:
WeightFlag = 1<<Weight, WeightFlag = 1<<Weight,
PaletteSkinFlag = (1<<PaletteSkin)|(1<<Weight), PaletteSkinFlag = (1<<PaletteSkin)|(1<<Weight),
FogFlag = 1<<Fog, FogFlag = 1<<Fog,
EmptyFlag = 1<<Empty, EmptyFlag = 1<<Empty
}; };
@ -207,7 +207,7 @@ public:
MaxStage = 8, MaxStage = 8,
// Max count of skinning weight // Max count of skinning weight
MaxWeight = 4, MaxWeight = 4
}; };
/** /**

View file

@ -160,7 +160,7 @@ protected:
}; };
}; }
#endif // NL_DISPLAYER_H #endif // NL_DISPLAYER_H

View file

@ -29,7 +29,6 @@
using namespace NLMISC; using namespace NLMISC;
using namespace std; using namespace std;
namespace NL3D namespace NL3D
{ {

View file

@ -162,20 +162,6 @@ extern "C"
#endif #endif
/*
static Bool WndProc(Display *d, XEvent *e, char *arg)
{
nlinfo("3D: glop %d %d", e->type, e->xmap.window);
CDriverGL *pDriver = (CDriverGL*)arg;
if (pDriver != NULL)
{
// Process the message by the emitter
pDriver->_EventEmitter.processMessage();
}
// TODO i'don t know what to return exactly
return (e->type == MapNotify) && (e->xmap.window == (Window) arg);
}
*/
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] = GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
@ -866,12 +852,15 @@ bool CDriverGL::swapBuffers()
} }
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
SwapBuffers(_hDC); SwapBuffers(_hDC);
#elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE)
NL3D::MAC::swapBuffers(_win); NL3D::MAC::swapBuffers(_win);
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
glXSwapBuffers(_dpy, _win); glXSwapBuffers(_dpy, _win);
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
@ -1026,13 +1015,13 @@ void CDriverGL::setupViewport (const class CViewport& viewport)
} }
// Setup gl viewport // Setup gl viewport
int ix=(int)((float)clientWidth*x+0.5f); sint ix=(sint)((float)clientWidth*x+0.5f);
clamp (ix, 0, clientWidth); clamp (ix, 0, clientWidth);
int iy=(int)((float)clientHeight*y+0.5f); int iy=(int)((float)clientHeight*y+0.5f);
clamp (iy, 0, clientHeight); clamp (iy, 0, clientHeight);
int iwidth=(int)((float)clientWidth*width+0.5f); sint iwidth=(sint)((float)clientWidth*width+0.5f);
clamp (iwidth, 0, clientWidth-ix); clamp (iwidth, 0, clientWidth-ix);
int iheight=(int)((float)clientHeight*height+0.5f); sint iheight=(sint)((float)clientHeight*height+0.5f);
clamp (iheight, 0, clientHeight-iy); clamp (iheight, 0, clientHeight-iy);
glViewport (ix, iy, iwidth, iheight); glViewport (ix, iy, iwidth, iheight);
} }
@ -1102,25 +1091,23 @@ void CDriverGL::setupScissor (const class CScissor& scissor)
if(x==0 && x==0 && width>=1 && height>=1) if(x==0 && x==0 && width>=1 && height>=1)
{ {
glDisable(GL_SCISSOR_TEST); glDisable(GL_SCISSOR_TEST);
} }
else else
{ {
// Setup gl scissor // Setup gl scissor
int ix0=(int)floor((float)clientWidth * x + 0.5f); sint ix0=(sint)floor((float)clientWidth * x + 0.5f);
clamp (ix0, 0, clientWidth); clamp (ix0, 0, clientWidth);
int iy0=(int)floor((float)clientHeight* y + 0.5f); int iy0=(int)floor((float)clientHeight* y + 0.5f);
clamp (iy0, 0, clientHeight); clamp (iy0, 0, clientHeight);
int ix1=(int)floor((float)clientWidth * (x+width) + 0.5f ); sint ix1=(sint)floor((float)clientWidth * (x+width) + 0.5f );
clamp (ix1, 0, clientWidth); clamp (ix1, 0, clientWidth);
int iy1=(int)floor((float)clientHeight* (y+height) + 0.5f ); sint iy1=(sint)floor((float)clientHeight* (y+height) + 0.5f );
clamp (iy1, 0, clientHeight); clamp (iy1, 0, clientHeight);
sint iwidth= ix1 - ix0;
int iwidth= ix1 - ix0;
clamp (iwidth, 0, clientWidth); clamp (iwidth, 0, clientWidth);
int iheight= iy1 - iy0; sint iheight= iy1 - iy0;
clamp (iheight, 0, clientHeight); clamp (iheight, 0, clientHeight);
glScissor (ix0, iy0, iwidth, iheight); glScissor (ix0, iy0, iwidth, iheight);
@ -1848,15 +1835,18 @@ uint loadARBFragmentProgramStringNative(const char *prog, bool forceNativeProgra
nglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0); nglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos); glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
nglGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isNative); nglGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isNative);
if (errorPos == -1) { if (errorPos == -1)
if (!isNative && forceNativePrograms) { {
if (!isNative && forceNativePrograms)
{
nlwarning("Fragment program isn't supported natively; purging program"); nlwarning("Fragment program isn't supported natively; purging program");
nglDeleteProgramsARB(1, &progID); nglDeleteProgramsARB(1, &progID);
return 0; return 0;
} }
return progID; return progID;
} }
else { else
{
nlwarning("init fragment program failed: errorPos: %d isNative: %d", errorPos, isNative); nlwarning("init fragment program failed: errorPos: %d isNative: %d", errorPos, isNative);
} }
return 0; return 0;

View file

@ -680,6 +680,7 @@ private:
HPBUFFERARB _PBuffer; HPBUFFERARB _PBuffer;
#elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE)
NLMISC::CCocoaEventEmitter _EventEmitter; NLMISC::CCocoaEventEmitter _EventEmitter;
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
@ -809,7 +810,7 @@ private:
TexEnvSpecialPPLStage0, TexEnvSpecialPPLStage0,
TexEnvSpecialPPLStage2, TexEnvSpecialPPLStage2,
TexEnvSpecialCloudStage0, TexEnvSpecialCloudStage0,
TexEnvSpecialCloudStage1, TexEnvSpecialCloudStage1
}; };
// NB: CRefPtr are not used for mem/spped optimisation. setupMaterial() and setupTexture() reset those states. // NB: CRefPtr are not used for mem/spped optimisation. setupMaterial() and setupTexture() reset those states.

View file

@ -43,7 +43,7 @@ namespace BRICK_TYPE
TIMED_ACTION, TIMED_ACTION,
BRICK_TYPE_COUNT, BRICK_TYPE_COUNT,
BONUS, BONUS,
UNKNOWN, UNKNOWN
}; };
@ -61,7 +61,7 @@ namespace BRICK_TYPE
*/ */
const std::string &toString(EBrickType type); const std::string &toString(EBrickType type);
}; // BRICK_TYPE } // BRICK_TYPE
#endif // RY_BRICK_TYPES_H #endif // RY_BRICK_TYPES_H
/* End of brick_types.h */ /* End of brick_types.h */

View file

@ -799,7 +799,7 @@ namespace NPC_ICON
}; };
const NLMISC::TGameCycle DefaultClientNPCIconRefreshTimerDelayGC = 60*10; // 1 min const NLMISC::TGameCycle DefaultClientNPCIconRefreshTimerDelayGC = 60*10; // 1 min
}; }
#endif // RY_MSG_CLIENT_SERVER_H #endif // RY_MSG_CLIENT_SERVER_H

View file

@ -50,14 +50,14 @@ namespace OUTPOSTENUMS
PVE, // can only be attacked if the outpost is held by a tribe and if the attacking guild comes from the same continent as the outpost PVE, // can only be attacked if the outpost is held by a tribe and if the attacking guild comes from the same continent as the outpost
PVP, // can only be attacked if the attacking guild comes from the same continent as the outpost PVP, // can only be attacked if the attacking guild comes from the same continent as the outpost
RVR, // can only be attacked if the attacking guild comes from another continent as the outpost RVR, // can only be attacked if the attacking guild comes from another continent as the outpost
Full, // same as RVR but cant be set by the high council Full // same as RVR but cant be set by the high council
}; };
enum TPVPSide enum TPVPSide
{ {
OutpostOwner = 0, OutpostOwner = 0,
OutpostAttacker = 1, OutpostAttacker = 1,
UnknownPVPSide, UnknownPVPSide
}; };
// :NOTE: The outpost state machine is defined by a list of possible // :NOTE: The outpost state machine is defined by a list of possible
@ -78,7 +78,7 @@ namespace OUTPOSTENUMS
AttackAfter, AttackAfter,
DefenseBefore, // the attack was successful. The attacker must now defend the outpost DefenseBefore, // the attack was successful. The attacker must now defend the outpost
DefenseRound, // ... DefenseRound, // ...
DefenseAfter, DefenseAfter
}; };
/// events that can affect outpost state /// events that can affect outpost state
@ -107,7 +107,7 @@ namespace OUTPOSTENUMS
UnknownSquadType, UnknownSquadType,
Default, // squad recruited automatically when the outpost is taken Default, // squad recruited automatically when the outpost is taken
Recruited, // squad recruited by the guild Recruited, // squad recruited by the guild
Mercenary, // a special mercenary squad Mercenary // a special mercenary squad
}; };
/// current state of a building used for database /// current state of a building used for database
@ -115,7 +115,7 @@ namespace OUTPOSTENUMS
{ {
UnknownOutpostBuildingState, UnknownOutpostBuildingState,
BuildingInPlace, // In place (constructed) BuildingInPlace, // In place (constructed)
BuildingConstructing, // Constructing BuildingConstructing // Constructing
}; };
/// current state of a state /// current state of a state
@ -127,7 +127,7 @@ namespace OUTPOSTENUMS
NotSpawned, // squad is ready and waiting to be spawned NotSpawned, // squad is ready and waiting to be spawned
Spawning, // spawn order has been issued but not yet confirmed Spawning, // spawn order has been issued but not yet confirmed
Spawned, // squad is spawned Spawned, // squad is spawned
Dead, // squad is dead Dead // squad is dead
}; };
/// events that can affect outpost state /// events that can affect outpost state
@ -142,7 +142,7 @@ namespace OUTPOSTENUMS
GuildOwnershipEnd, // Owner of the outpost is no more a guild GuildOwnershipEnd, // Owner of the outpost is no more a guild
StateChanged, // State of outpost changed StateChanged, // State of outpost changed
OwnerChanged, // Owner of outpost changed OwnerChanged, // Owner of outpost changed
AttackerChanged, // Attacker of outpost changed AttackerChanged // Attacker of outpost changed
}; };
std::string const& toString(TPVPType val); std::string const& toString(TPVPType val);