diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp index f47c897c..af54a6ac 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp +++ b/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 "hsBitVector.h" #include +#include plMessage::plMessage() : fSender(nil), diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp index a5e18a5e..74f4d019 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp +++ b/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 fRenderInfo.fRenderFunc = nil; if( justCalc ) - fRenderInfo.fRenderFunc = IRenderCharNull; + fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; else if( mip->GetPixelSize() == 32 ) { if( fBPP == 1 ) - fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? IRenderChar1To32AA : IRenderChar1To32; + fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? &plFont::IRenderChar1To32AA : &plFont::IRenderChar1To32; else if( fBPP == 8 ) { if( fRenderInfo.fFlags & kRenderIntoAlpha ) { if( ( fRenderInfo.fColor & 0xff000000 ) != 0xff000000 ) - fRenderInfo.fRenderFunc = IRenderChar8To32Alpha; + fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32Alpha; else - fRenderInfo.fRenderFunc = IRenderChar8To32FullAlpha; + fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32FullAlpha; } 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; CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; - fRenderInfo.fRenderFunc = IRenderCharNull; + fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; IRenderLoop( string, lastWord ); @@ -543,7 +543,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st fRenderInfo.fX = 0; CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; - fRenderInfo.fRenderFunc = IRenderCharNull; + fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; 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 CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; - fRenderInfo.fRenderFunc = IRenderCharNull; + fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; while( fRenderInfo.fX < fRenderInfo.fClipRect.fX && *string != 0 ) { IRenderLoop( string, 1 ); diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp index 9e0d8b22..df100eb2 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp @@ -259,7 +259,7 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const std::string tmp = msg; hsStrLower((char*)tmp.c_str()); 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()) { c+=objTag.size(); diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp index 2835e57e..85dbaad7 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp @@ -66,7 +66,7 @@ void plNetClientRecorder::IMakeFilename(const char* recName, char* path) CreateDirectory(path, NULL); #endif - char* lastDot = strrchr(recName, '.'); + const char* lastDot = strrchr(recName, '.'); if (lastDot) strncat(path, recName, lastDot-recName); else diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp index 474063f7..45ed8cc3 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp +++ b/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 "../plCompression/plZlibCompress.h" #include +#include //////////////////////////////////////////////////////////////////// diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 5ff36b3a..ac1d58b4 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/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 // multiple internal spaces into only one space unsigned nonSpaceChars = 0; - for (wchar *src = name, *dst = name; *src; ) { + wchar *dst = name; + for (wchar *src = name; *src; ) { // Skip whitespace while (*src && ICharIsSpace(*src)) src++; diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h index 7223a57b..bfaa269f 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h +++ b/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 "hsGeometry3.h" -#include +#include #include class plMessage; class plCameraMsg; diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp index a5ca9a11..74bdba65 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp @@ -24,6 +24,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include +#include #include "hsTimer.h" #include "plPhysicsSoundMgr.h" #include "plPhysicalSndGroup.h" @@ -68,7 +69,7 @@ void plPhysicsSoundMgr::Update() fCurCollisions.clear(); } -void plPhysicsSoundMgr::IStartCollision(CollidePair& cp) +void plPhysicsSoundMgr::IStartCollision(const CollidePair& cp) { hsVector3 v1, v2; 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* 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; hsVector3 v1, v2; diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h index 075d6a22..5f95289a 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.h @@ -65,9 +65,9 @@ private: plPhysical* SecondPhysical() const; }; - void IStartCollision(CollidePair& cp); - void IStopCollision(CollidePair& cp); - void IUpdateCollision(CollidePair& cp); + void IStartCollision(const CollidePair& cp); + void IStopCollision(const CollidePair& cp); + void IUpdateCollision(const CollidePair& cp); void IProcessSlide(plPhysicalSndGroup* sndA, plPhysicalSndGroup* sndB, hsScalar strength); typedef std::set CollideSet;