Browse Source

More picky compiler / standards fixes

Zrax 14 years ago
parent
commit
a6b57de65d
  1. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp
  2. 16
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp
  3. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp
  4. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp
  5. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp
  6. 3
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  7. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h
  8. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp
  9. 6
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp

@ -35,6 +35,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h" #include "plgDispatch.h"
#include "hsBitVector.h" #include "hsBitVector.h"
#include <algorithm> #include <algorithm>
#include <iterator>
plMessage::plMessage() plMessage::plMessage()
: fSender(nil), : fSender(nil),

16
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp

@ -320,22 +320,22 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st
// Choose an optimal rendering function // Choose an optimal rendering function
fRenderInfo.fRenderFunc = nil; fRenderInfo.fRenderFunc = nil;
if( justCalc ) if( justCalc )
fRenderInfo.fRenderFunc = IRenderCharNull; fRenderInfo.fRenderFunc = &plFont::IRenderCharNull;
else if( mip->GetPixelSize() == 32 ) else if( mip->GetPixelSize() == 32 )
{ {
if( fBPP == 1 ) if( fBPP == 1 )
fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? IRenderChar1To32AA : IRenderChar1To32; fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? &plFont::IRenderChar1To32AA : &plFont::IRenderChar1To32;
else if( fBPP == 8 ) else if( fBPP == 8 )
{ {
if( fRenderInfo.fFlags & kRenderIntoAlpha ) if( fRenderInfo.fFlags & kRenderIntoAlpha )
{ {
if( ( fRenderInfo.fColor & 0xff000000 ) != 0xff000000 ) if( ( fRenderInfo.fColor & 0xff000000 ) != 0xff000000 )
fRenderInfo.fRenderFunc = IRenderChar8To32Alpha; fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32Alpha;
else else
fRenderInfo.fRenderFunc = IRenderChar8To32FullAlpha; fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32FullAlpha;
} }
else else
fRenderInfo.fRenderFunc = IRenderChar8To32; fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32;
} }
} }
@ -521,7 +521,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st
fRenderInfo.fX = 0; fRenderInfo.fX = 0;
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; CharRenderFunc oldFunc = fRenderInfo.fRenderFunc;
fRenderInfo.fRenderFunc = IRenderCharNull; fRenderInfo.fRenderFunc = &plFont::IRenderCharNull;
IRenderLoop( string, lastWord ); IRenderLoop( string, lastWord );
@ -543,7 +543,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st
fRenderInfo.fX = 0; fRenderInfo.fX = 0;
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; CharRenderFunc oldFunc = fRenderInfo.fRenderFunc;
fRenderInfo.fRenderFunc = IRenderCharNull; fRenderInfo.fRenderFunc = &plFont::IRenderCharNull;
IRenderLoop( string, lastWord ); IRenderLoop( string, lastWord );
@ -642,7 +642,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st
{ {
// Advance left past any clipping area // Advance left past any clipping area
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; CharRenderFunc oldFunc = fRenderInfo.fRenderFunc;
fRenderInfo.fRenderFunc = IRenderCharNull; fRenderInfo.fRenderFunc = &plFont::IRenderCharNull;
while( fRenderInfo.fX < fRenderInfo.fClipRect.fX && *string != 0 ) while( fRenderInfo.fX < fRenderInfo.fClipRect.fX && *string != 0 )
{ {
IRenderLoop( string, 1 ); IRenderLoop( string, 1 );

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp

@ -259,7 +259,7 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const
std::string tmp = msg; std::string tmp = msg;
hsStrLower((char*)tmp.c_str()); hsStrLower((char*)tmp.c_str());
std::string objTag="object"; std::string objTag="object";
char* c=strstr(tmp.c_str(), objTag.c_str()); const char* c=strstr(tmp.c_str(), objTag.c_str());
if (c && c != tmp.c_str()) if (c && c != tmp.c_str())
{ {
c+=objTag.size(); c+=objTag.size();

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp

@ -66,7 +66,7 @@ void plNetClientRecorder::IMakeFilename(const char* recName, char* path)
CreateDirectory(path, NULL); CreateDirectory(path, NULL);
#endif #endif
char* lastDot = strrchr(recName, '.'); const char* lastDot = strrchr(recName, '.');
if (lastDot) if (lastDot)
strncat(path, recName, lastDot-recName); strncat(path, recName, lastDot-recName);
else else

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp

@ -31,6 +31,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../pnNetCommon/plGenericVar.h" #include "../pnNetCommon/plGenericVar.h"
#include "../plCompression/plZlibCompress.h" #include "../plCompression/plZlibCompress.h"
#include <algorithm> #include <algorithm>
#include <iterator>
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

3
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -1225,7 +1225,8 @@ static ENetError FixupPlayerName (wchar * name) {
// Trim leading and trailing whitespace and convert // Trim leading and trailing whitespace and convert
// multiple internal spaces into only one space // multiple internal spaces into only one space
unsigned nonSpaceChars = 0; unsigned nonSpaceChars = 0;
for (wchar *src = name, *dst = name; *src; ) { wchar *dst = name;
for (wchar *src = name; *src; ) {
// Skip whitespace // Skip whitespace
while (*src && ICharIsSpace(*src)) while (*src && ICharIsSpace(*src))
src++; src++;

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h

@ -29,7 +29,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDetectorModifier.h" #include "plDetectorModifier.h"
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include <list.h> #include <list>
#include <set> #include <set>
class plMessage; class plMessage;
class plCameraMsg; class plCameraMsg;

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp

@ -24,6 +24,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include <algorithm> #include <algorithm>
#include <iterator>
#include "hsTimer.h" #include "hsTimer.h"
#include "plPhysicsSoundMgr.h" #include "plPhysicsSoundMgr.h"
#include "plPhysicalSndGroup.h" #include "plPhysicalSndGroup.h"
@ -68,7 +69,7 @@ void plPhysicsSoundMgr::Update()
fCurCollisions.clear(); fCurCollisions.clear();
} }
void plPhysicsSoundMgr::IStartCollision(CollidePair& cp) void plPhysicsSoundMgr::IStartCollision(const CollidePair& cp)
{ {
hsVector3 v1, v2; hsVector3 v1, v2;
const hsScalar strengthThreshold = 20.0f; const hsScalar strengthThreshold = 20.0f;
@ -104,7 +105,7 @@ void plPhysicsSoundMgr::IStartCollision(CollidePair& cp)
} }
} }
void plPhysicsSoundMgr::IStopCollision(CollidePair& cp) void plPhysicsSoundMgr::IStopCollision(const CollidePair& cp)
{ {
plPhysical* physicalA = cp.FirstPhysical(); plPhysical* physicalA = cp.FirstPhysical();
plPhysical* physicalB = cp.SecondPhysical(); plPhysical* physicalB = cp.SecondPhysical();
@ -130,7 +131,7 @@ void plPhysicsSoundMgr::IStopCollision(CollidePair& cp)
} }
} }
void plPhysicsSoundMgr::IUpdateCollision(CollidePair& cp) void plPhysicsSoundMgr::IUpdateCollision(const CollidePair& cp)
{ {
const hsScalar slideThreshhold = 0.f; const hsScalar slideThreshhold = 0.f;
hsVector3 v1, v2; hsVector3 v1, v2;

6
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h

@ -65,9 +65,9 @@ private:
plPhysical* SecondPhysical() const; plPhysical* SecondPhysical() const;
}; };
void IStartCollision(CollidePair& cp); void IStartCollision(const CollidePair& cp);
void IStopCollision(CollidePair& cp); void IStopCollision(const CollidePair& cp);
void IUpdateCollision(CollidePair& cp); void IUpdateCollision(const CollidePair& cp);
void IProcessSlide(plPhysicalSndGroup* sndA, plPhysicalSndGroup* sndB, hsScalar strength); void IProcessSlide(plPhysicalSndGroup* sndA, plPhysicalSndGroup* sndB, hsScalar strength);
typedef std::set<CollidePair> CollideSet; typedef std::set<CollidePair> CollideSet;

Loading…
Cancel
Save