Browse Source

Merge pull request #273 from 'paradox/clang'

Conflicts:
	Sources/Tools/MaxConvert/Pch.h
	Sources/Tools/MaxConvert/hsControlConverter.cpp
Adam Johnson 12 years ago
parent
commit
f5abe4ab15
  1. 1
      Sources/Plasma/Apps/plClient/winmain.cpp
  2. 2
      Sources/Plasma/Apps/plClientPatcher/Pch.h
  3. 2
      Sources/Plasma/Apps/plFileSecure/main.cpp
  4. 2
      Sources/Plasma/Apps/plUruLauncher/Pch.h
  5. 2
      Sources/Plasma/CoreLib/HeadSpin.cpp
  6. 21
      Sources/Plasma/CoreLib/HeadSpin.h
  7. 2
      Sources/Plasma/CoreLib/hsBitVector.cpp
  8. 2
      Sources/Plasma/CoreLib/hsGeometry3.cpp
  9. 2
      Sources/Plasma/CoreLib/hsMatrix44.cpp
  10. 2
      Sources/Plasma/CoreLib/hsMemory.cpp
  11. 3
      Sources/Plasma/CoreLib/hsStream.cpp
  12. 2
      Sources/Plasma/CoreLib/hsStream.h
  13. 3
      Sources/Plasma/CoreLib/hsTemplates.h
  14. 10
      Sources/Plasma/CoreLib/hsThread_Unix.cpp
  15. 11
      Sources/Plasma/CoreLib/plFileSystem.cpp
  16. 2
      Sources/Plasma/CoreLib/plProduct.h
  17. 20
      Sources/Plasma/CoreLib/plString.h
  18. 2
      Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp
  19. 1
      Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h
  20. 1
      Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp
  21. 4
      Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp
  22. 1
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp
  23. 3
      Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h
  24. 2
      Sources/Plasma/FeatureLib/pfPython/Pch.h
  25. 2
      Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp
  26. 1
      Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp
  27. 1
      Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp
  28. 5
      Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h
  29. 2
      Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp
  30. 2
      Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp
  31. 1
      Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp
  32. 11
      Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp
  33. 1
      Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp
  34. 3
      Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp
  35. 3
      Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp
  36. 2
      Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp
  37. 1
      Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp
  38. 3
      Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp
  39. 37
      Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp
  40. 4
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp
  41. 6
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h
  42. 19
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp
  43. 13
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp
  44. 6
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp
  45. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp
  46. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp
  47. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp
  48. 6
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h
  49. 7
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp
  50. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h
  51. 24
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp
  52. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h
  53. 2
      Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h
  54. 5
      Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp
  55. 12
      Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp
  56. 10
      Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp
  57. 2
      Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h
  58. 5
      Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp
  59. 1
      Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp
  60. 1
      Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h
  61. 2
      Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp
  62. 2
      Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp
  63. 3
      Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp
  64. 3
      Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp
  65. 2
      Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp
  66. 4
      Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp
  67. 4
      Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp
  68. 2
      Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp
  69. 2
      Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp
  70. 2
      Sources/Plasma/PubUtilLib/plMath/plAvg.cpp
  71. 4
      Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp
  72. 5
      Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp
  73. 5
      Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h
  74. 6
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp
  75. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp
  76. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp
  77. 5
      Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp
  78. 6
      Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp
  79. 2
      Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp
  80. 2
      Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp
  81. 4
      Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h
  82. 2
      Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp
  83. 1
      Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h
  84. 2
      Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp
  85. 2
      Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp
  86. 3
      Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp
  87. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp
  88. 2
      Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp
  89. 2
      Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp
  90. 1
      Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h
  91. 4
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
  92. 4
      Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp
  93. 4
      Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp
  94. 2
      Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp
  95. 2
      Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp
  96. 10
      Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp
  97. 6
      Sources/Tools/MaxConvert/Pch.h
  98. 2
      Sources/Tools/MaxConvert/StringTokenizer.cpp
  99. 1
      Sources/Tools/MaxConvert/hsControlConverter.cpp
  100. 2
      Sources/Tools/MaxConvert/hsConverterUtils.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

1
Sources/Plasma/Apps/plClient/winmain.cpp

@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "hsWindows.h"
#include <stdio.h>
#include <direct.h> // windows directory handling fxns (for chdir)
#include <process.h>
#include <shellapi.h> // ShellExecuteA

2
Sources/Plasma/Apps/plClientPatcher/Pch.h

@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsWindows.h"
#include <process.h>
#include <time.h>
#include <ctime>
#include "pnUtils/pnUtils.h"
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"

2
Sources/Plasma/Apps/plFileSecure/main.cpp

@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plProduct.h"
#include <time.h>
#include <ctime>
#include <string>
void print_version() {

2
Sources/Plasma/Apps/plUruLauncher/Pch.h

@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsWindows.h"
#include <process.h>
#include <time.h>
#include <ctime>
#include <curl/curl.h>

2
Sources/Plasma/CoreLib/HeadSpin.cpp

@ -442,7 +442,7 @@ char *hsWStringToString( const wchar_t *str )
for (i = 0; i < len; i++)
{
char temp = wctob(str[i]);
if (temp == WEOF)
if (temp == EOF)
{
sStr[i] = '\0';
i = len;

21
Sources/Plasma/CoreLib/HeadSpin.h

@ -54,8 +54,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <stdarg.h>
#include <stdint.h>
#include <cstdarg>
#include <cstdint>
//======================================
// Winblows Hacks
@ -77,7 +77,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// even more bloated than before!
struct HWND__; typedef struct HWND__ *HWND;
struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE;
typedef HWND hsWindowHndl;
typedef HINSTANCE hsWindowInst;
typedef HINSTANCE HMODULE;
@ -341,21 +341,6 @@ void hsStrLower(char *s);
char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory.
char * hsFormatStrV(const char * fmt, va_list args); // You are responsible for returned memory.
// Use "correct" stricmp based on the selected compiler / library
#if _MSC_VER
# define stricmp _stricmp
# define strnicmp _strnicmp
# define wcsicmp _wcsicmp
# define wcsnicmp _wcsnicmp
# define strlwr _strlwr
#else
# define stricmp strcasecmp
# define strnicmp strncasecmp
# define wcsicmp wcscasecmp
# define wcsnicmp wcsncasecmp
# define strlwr hsStrLower
#endif
inline char* hsStrcpy(const char src[])
{
return hsStrcpy(nil, src);

2
Sources/Plasma/CoreLib/hsBitVector.cpp

@ -45,8 +45,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsBitVector.h"
#include "hsTemplates.h"
#include <stdarg.h>
hsBitVector::hsBitVector(int b, ...)
: fBitVectors(nil),
fNumBitVectors(0)

2
Sources/Plasma/CoreLib/hsGeometry3.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsGeometry3.h"
#include "hsStream.h"
#include <math.h>
#include <cmath>
hsVector3 operator%(const hsVector3& t, const hsVector3& s)
{

2
Sources/Plasma/CoreLib/hsMatrix44.cpp

@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsQuat.h"
#include "hsMatrix44.h"
#include "hsStream.h"
#include <math.h>
#include <cmath>
#ifdef HS_SIMD_INCLUDE
# include HS_SIMD_INCLUDE

2
Sources/Plasma/CoreLib/hsMemory.cpp

@ -40,8 +40,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <string.h>
#include "hsMemory.h"
#include "hsExceptions.h"

3
Sources/Plasma/CoreLib/hsStream.cpp

@ -39,18 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include <ctype.h>
#include "hsStream.h"
#include "hsMemory.h"
#include "hsTemplates.h"
#if HS_BUILD_FOR_UNIX
#include <unistd.h>
#endif
#if HS_BUILD_FOR_WIN32
#include <io.h>
#endif

2
Sources/Plasma/CoreLib/hsStream.h

@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef hsStream_Defined
#define hsStream_Defined
#include <stdarg.h> // Included for GCC 3.2.2+
#include "HeadSpin.h"
#include "hsMemory.h"
#include "plFileSystem.h"

3
Sources/Plasma/CoreLib/hsTemplates.h

@ -46,8 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsMemory.h"
#include "hsRefCnt.h"
#include <stdarg.h>
#include <cstdarg>
#ifdef HS_DEBUGGING

10
Sources/Plasma/CoreLib/hsThread_Unix.cpp

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <sys/errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <cstring>
#define NO_POSIX_CLOCK 1
@ -146,8 +146,8 @@ void hsThread::ThreadYield()
//#define MUTEX_TIMING
#ifdef MUTEX_TIMING
#include <time.h>
#include <stdio.h>
#include <ctime>
#include <cstdio>
#include <unistd.h>
#include "hsWide.h"
@ -168,8 +168,8 @@ static void InitMutexTimerFile()
//#define EVENT_LOGGING
#ifdef EVENT_LOGGING
#include <time.h>
#include <stdio.h>
#include <ctime>
#include <cstdio>
#include <unistd.h>
#include "NucleusLib/inc/hsTimer.h"

11
Sources/Plasma/CoreLib/plFileSystem.cpp

@ -380,15 +380,16 @@ std::vector<plFileName> plFileSystem::ListDir(const plFileName &path, const char
struct dirent *de;
while (de = readdir(dir)) {
if (plFileInfo(de->d_name).IsDirectory()) {
plFileName dir_name = plFileName::Join(path, de->d_name);
if (plFileInfo(dir_name).IsDirectory()) {
// Should also handle . and ..
continue;
}
if (pattern && pattern[0] && fnmatch(pattern, de->d_name))
contents.push_back(plFileName::Join(path, de->d_name));
if (pattern && pattern[0] && fnmatch(pattern, de->d_name, 0))
contents.push_back(dir_name);
else if (!pattern || !pattern[0])
contents.push_back(plFileName::Join(path, de->d_name));
contents.push_back(dir_name);
}
closedir(dir);
@ -428,7 +429,7 @@ std::vector<plFileName> plFileSystem::ListSubdirs(const plFileName &path)
if (plFileInfo(de->d_name).IsDirectory()) {
plFileName name = de->d_name;
if (name != "." && name != "..")
contents.push_back(plFileName::Join(path, name);
contents.push_back(plFileName::Join(path, name));
}
}

2
Sources/Plasma/CoreLib/plProduct.h

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <stdint.h>
#include <cstdint>
class plString;

20
Sources/Plasma/CoreLib/plString.h

@ -43,8 +43,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plString_Defined
#define plString_Defined
#include <stdint.h>
#include <vector>
#include <cstdint>
#include <cstddef>
#include <cstdarg>
#include <cstring>
/** Single Unicode character code unit */
typedef unsigned int UniChar;
@ -53,6 +56,21 @@ typedef unsigned int UniChar;
#define STRING_STACK_SIZE (256)
#define WHITESPACE_CHARS " \t\n\r"
// Use "correct" stricmp based on the selected compiler / library
#if _MSC_VER
# define stricmp _stricmp
# define strnicmp _strnicmp
# define wcsicmp _wcsicmp
# define wcsnicmp _wcsnicmp
# define strlwr _strlwr
#else
# define stricmp strcasecmp
# define strnicmp strncasecmp
# define wcsicmp wcscasecmp
# define wcsnicmp wcsncasecmp
# define strlwr hsStrLower
#endif
/** Ref-counted string data buffer.
* This is used to store actual string data in any (unchecked) encoding format,
* including both the internal UTF-8 data of plString itself as well as the

2
Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp

@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//#include "../plPipeline/plDebugGeometry.h"
#include <math.h>
#include <cmath>
#include <algorithm>
#include "pfObjectFlocker.h"

1
Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define OBJECT_FLOCKER_H
#include "pnModifier/plSingleModifier.h"
#include <algorithm>
class hsStream;
class hsResMgr;

1
Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp

@ -40,7 +40,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <stdlib.h>
#include <cmath>
#include "HeadSpin.h"

4
Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <math.h>
#include <cmath>
#include "HeadSpin.h"
@ -307,4 +307,4 @@ bool plStereizer::CheckForMaster()
}
}
return false;
}
}

1
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp

@ -49,7 +49,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include "hsTimer.h"
#include "HeadSpin.h"
#include "pfGameGUIMgr.h"

3
Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h

@ -63,9 +63,6 @@ struct LocElementInfo;
struct LocSetInfo;
struct LocAgeInfo;
// Temporary helper (until everything is plString-ized)
typedef std::vector<std::wstring> WStringVector;
class pfLocalizationDataMgr
{
private:

2
Sources/Plasma/FeatureLib/pfPython/Pch.h

@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <string>
// Platform Library Includes
#include <time.h>
#include <ctime>
#include <sys/types.h>
#include <sys/stat.h>

2
Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <Python.h>
#include <marshal.h>
#include <time.h>
#include <ctime>
#include <string>
#include "HeadSpin.h"

1
Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp

@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "plUoid.h"
#include <string.h>
#include "plFixedKey.h"
#include "plCreatableIndex.h"

1
Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp

@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "plKey.h"
#include "plUoid.h"
#include <string.h>
#include "hsResMgr.h"
#define TRACK_REFS 0 // MEMLEAKFISH

5
Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h

@ -46,14 +46,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsBitVector.h"
#include "plNetGroup.h"
#include "pnKeyedObject/hsKeyedObject.h"
#include "pnKeyedObject/hsKeyedObject.h"
#include "pnKeyedObject/plUoid.h"
#include "plStatusLog/plLoggable.h"
#include <stdarg.h>
#define plVerifyConditionRet(NetApp,cond,ret,str) \
do { \
if (!(cond)) { \

2
Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <string.h> // for memcpy
# include <cstring> // for memcpy
#elif !defined(HS_BUILD_FOR_WIN32)
#error "Not implemented for this platform"
#endif

2
Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtTime.h"
#if HS_BUILD_FOR_UNIX
#include <time.h>
#include <ctime>
#include <sys/time.h>
#endif

1
Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp

@ -785,6 +785,7 @@ void plAudioSystem::IUpdateSoftSounds( const hsPoint3 &newPosition )
case plSound::kStreamFromDisk: color = plStatusLog::kYellow; break;
case plSound::kStreamFromRAM: color = plStatusLog::kWhite; break;
case plSound::kStreamCompressed: color = plStatusLog::kRed; break;
default: break;
}
if(sound->GetType() == plgAudioSys::kVoice) color = 0xffff8800;
if(sound->IsPropertySet(plSound::kPropIncidental)) color = 0xff00ffff;

11
Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp

@ -190,10 +190,9 @@ plSoundEvent::Types plSoundEvent::GetTypeFromCallbackMsg( plEventCallbackMsg *ms
switch( msg->fEvent )
{
case ::kStart: return kStart;
case ::kTime: return kTime;
case ::kStop: return kStop;
case ::kLoop: return kLoop;
case ::kTime: return kTime;
case ::kStop: return kStop;
case ::kLoop: return kLoop;
default: return kStop;
}
return kStop;
}
}

1
Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp

@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// 3.5.2001 - Created by mcn. //
// //
//////////////////////////////////////////////////////////////////////////////
#include <string.h>
#include "HeadSpin.h"
#include "plAudioFileReader.h"

3
Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp

@ -52,9 +52,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "HeadSpin.h"
#include "plBufferedFileReader.h"
#include "plFileSystem.h"

3
Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp

@ -51,9 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "HeadSpin.h"
#include "plFastWavReader.h"

2
Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp

@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//////////////////////////////////////////////////////////////////////////////
#include <math.h>
#include <cmath>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>

1
Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp

@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "plSoundDeswizzler.h"
#include <string.h>
plSoundDeswizzler::plSoundDeswizzler( void *srcPtr, uint32_t srcLength, uint8_t numChannels, uint32_t sampleSize )

3
Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp

@ -39,7 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include <stdio.h>
#include "plWavFile.h"
#ifdef BUILDING_MAXPLUGIN
@ -52,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <dsound.h>
#include <stdio.h>
#pragma comment(lib, "winmm.lib")
#ifdef PATCHER
#define DXTRACE_ERR(str,hr) hr // I'm not linking in directx stuff to the just for this

37
Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp

@ -614,10 +614,6 @@ void plAGMasterMod::DumpCurrentAnims(const char *header)
// receive trigger messages
bool plAGMasterMod::MsgReceive(plMessage* msg)
{
plAnimCmdMsg* cmdMsg;
plAGCmdMsg* agMsg;
int i;
plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg);
if (nMsg)
{
@ -626,7 +622,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true;
}
if (cmdMsg = plAnimCmdMsg::ConvertNoRef(msg))
plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
if (cmdMsg)
{
plString targetName = cmdMsg->GetAnimName();
@ -638,7 +635,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
{
if (cmdMsg->CmdChangesAnimTime())
{
for (i = 0; i < GetNumAnimations(); i++)
for (int i = 0; i < GetNumAnimations(); i++)
{
plAGAnimInstance *currInst = GetAnimInstance(i);
if (currInst != inst && currInst->GetAnimation()->SharesPinsWith(inst->GetAnimation()))
@ -653,7 +650,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true;
}
if (agMsg = plAGCmdMsg::ConvertNoRef(msg))
plAGCmdMsg* agMsg = plAGCmdMsg::ConvertNoRef(msg);
if (agMsg)
{
if (agMsg->Cmd(plAGCmdMsg::kSetAnimTime))
{
@ -678,7 +676,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
}
plAGInstanceCallbackMsg *agicMsg = plAGInstanceCallbackMsg::ConvertNoRef(msg);
if (agicMsg != nil)
if (agicMsg)
{
if (agicMsg->fEvent == kStart)
{
@ -697,16 +695,16 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
}
plAGDetachCallbackMsg *detachMsg = plAGDetachCallbackMsg::ConvertNoRef(msg);
if (detachMsg != nil)
if (detachMsg)
{
DetachAnimation(detachMsg->GetAnimName());
}
plGenRefMsg *genRefMsg;
if (genRefMsg = plGenRefMsg::ConvertNoRef(msg))
plGenRefMsg *genRefMsg = plGenRefMsg::ConvertNoRef(msg);
if (genRefMsg)
{
plAGAnim *anim;
if (anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef()))
plAGAnim *anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef());
if (anim)
{
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
{
@ -733,8 +731,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true;
}
plAGModifier *agmod;
if (agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef()))
plAGModifier *agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef());
if (agmod)
{
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
fChannelMods[agmod->GetChannelName()] = agmod;
@ -743,8 +742,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true;
}
plMsgForwarder *msgfwd;
if (msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef()))
plMsgForwarder *msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef());
if (msgfwd)
{
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
fMsgForwarder = msgfwd;
@ -754,8 +754,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true;
}
}
plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
if( refMsg )
if (refMsg)
{
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
AddTarget(plSceneObject::ConvertNoRef(refMsg->GetRef()));

4
Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp

@ -2380,7 +2380,7 @@ bool plArmatureMod::FindMatchingGenericBrain(const char *names[], int count)
return false;
}
plString plArmatureMod::MakeAnimationName(const char *baseName) const
plString plArmatureMod::MakeAnimationName(const plString& baseName) const
{
return fAnimationPrefix + baseName;
}
@ -2395,7 +2395,7 @@ void plArmatureMod::SetRootName(const plString &name)
fRootName = name;
}
plAGAnim *plArmatureMod::FindCustomAnim(const char *baseName) const
plAGAnim *plArmatureMod::FindCustomAnim(const plString& baseName) const
{
plString customName = MakeAnimationName(baseName);
plAGAnim *result = plAGAnim::FindAnim(customName);

6
Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h

@ -66,7 +66,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsMatrix44.h"
#include "plNetCommon/plNetCommon.h"
#include <float.h>
#include <cfloat>
/////////////////////////////////////////////////////////////////////////////////////////
//
@ -226,7 +226,7 @@ public:
virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID
virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone);
plAGModifier *GetRootAGMod();
plAGAnim *FindCustomAnim(const char *baseName) const;
plAGAnim *FindCustomAnim(const plString& baseName) const;
virtual void Spawn(double timeNow);
virtual void SpawnAt(int which, double timeNow);
@ -305,7 +305,7 @@ public:
int GetBodyType(int type) { return fBodyType; }
int GetCurrentGenericType();
bool FindMatchingGenericBrain(const char *names[], int count);
plString MakeAnimationName(const char * baseName) const;
plString MakeAnimationName(const plString& baseName) const;
plString GetRootName();
void SetRootName(const plString &name);

19
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp

@ -244,18 +244,19 @@ bool plAvBrainClimb::Apply(double time, float elapsed)
// MSGRECEIVE
bool plAvBrainClimb::MsgReceive(plMessage *msg)
{
plClimbMsg *climbMsg;
plLOSHitMsg *losMsg;
if(climbMsg = plClimbMsg::ConvertNoRef(msg))
plClimbMsg* climbMsg = plClimbMsg::ConvertNoRef(msg);
if (climbMsg)
{
return IHandleClimbMsg(climbMsg);
} else if(losMsg = plLOSHitMsg::ConvertNoRef(msg))
}
plLOSHitMsg *losMsg = plLOSHitMsg::ConvertNoRef(msg);
if (losMsg)
{
return IHandleLOSMsg(losMsg);
} else {
return plArmatureBrain::MsgReceive(msg);
}
return plArmatureBrain::MsgReceive(msg);
}
// IHANDLECLIMBMSG
@ -296,6 +297,8 @@ bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
break;
}
default:
break;
}
return true;
}
@ -1047,6 +1050,6 @@ const char *plAvBrainClimb::ModeStr(Mode mode)
case kFallingOff:
return "FallingOff";
default:
return "WTF???!!!";
return "WTF?!";
}
}

13
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp

@ -259,6 +259,8 @@ bool plAvBrainGeneric::Apply(double time, float elapsed)
case kNormal:
result = IProcessNormal(time, elapsed);
break;
default:
break;
}
plArmatureBrain::Apply(time, elapsed);
return result;
@ -653,15 +655,15 @@ bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
}
}
break;
#ifdef DEBUG_MULTISTAGE
default:
#ifdef DEBUG_MULTISTAGE
{
char sbuf[256];
sprintf(sbuf,"GenericMsg - Unknown command %d ",msg->fType);
plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf);
}
break;
#endif
break;
}
return true;
}
@ -731,24 +733,21 @@ bool plAvBrainGeneric::IBrainIsCompatible(plAvBrainGeneric *otherBrain)
{
case plAGAnim::kBodyUnknown:
return false;
break;
case plAGAnim::kBodyFull:
return false;
break;
case plAGAnim::kBodyUpper:
if(otherUsage == plAGAnim::kBodyLower)
return true;
else
return false;
break;
case plAGAnim::kBodyLower:
if(otherUsage == plAGAnim::kBodyUpper)
return true;
else
return false;
break;
default:
return false;
}
return false;
}
/////////////////////////////////////////////////////////////////////////////////////////

6
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp

@ -389,6 +389,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
IChatOn();
return true;
break;
default:
break;
}
} else {
switch(moveCode)
@ -398,6 +400,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
IChatOff();
return true;
break;
default:
break;
}
}
return false;
@ -515,6 +519,8 @@ bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
case plClimbMsg::kRight:
startMode = plAvBrainClimb::kMountingRight;
break;
default:
break;
}
plAvBrainClimb *brain = new plAvBrainClimb(startMode);
plAvTaskBrain *brainTask = new plAvTaskBrain(brain);

4
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp

@ -586,6 +586,8 @@ bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
return true;
}
break;
default:
break;
}
}
return false;
@ -611,6 +613,8 @@ void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
case kAbort:
sprintf(strBuf, "Mode: Abort (you should never see this)");
break;
default:
break;
}
debugTxt.DrawString(x, y, strBuf);
y += lineHeight;

2
Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp

@ -255,7 +255,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
plSceneObject *seekObj = GetTarget();
plKey seekKey = seekObj->GetKey(); // this modifier's target is the seek object
char *mountName, *dismountName, *traverseName;
const char *mountName, *dismountName, *traverseName;
if(fGoingUp)
{

4
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp

@ -104,7 +104,7 @@ void plAvTaskSeek::IInitDefaults()
fSeekObject = nil;
fMovingTarget = false;
fAlign = kAlignHandle;
fAnimName = nil;
fAnimName = "";
fPosGoalHit = false;
fRotGoalHit = false;
fStillPositioning = true;
@ -171,7 +171,7 @@ plAvTaskSeek::plAvTaskSeek(plKey target)
// plAvTaskSeek -------------------------------------------------------------------------------------------
// -------------
plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving)
plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving)
{
IInitDefaults();

6
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h

@ -75,7 +75,7 @@ public:
plAvTaskSeek();
plAvTaskSeek(plKey target);
plAvTaskSeek(plAvSeekMsg *msg);
plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving);
plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving);
void SetTarget(plKey target);
void SetTarget(hsPoint3 &pos, hsPoint3 &lookAt);
@ -153,7 +153,7 @@ protected:
// for example, you can say "find a good start point so that you can play this animation
// and have your handle wind up here" i.e: aligntype = "kAlignHandleAnimEnd"
plAvAlignment fAlign; // how to line up with the seek point
const char * fAnimName; // an (optional) anim to use to line up our target
plString fAnimName; // an (optional) anim to use to line up our target
// so you can say "seek to a place where your hand
// will be here after you play animation foo"
@ -187,4 +187,4 @@ protected:
plKey fNotifyFinishedKey; // Send a message to this key when we're done.
};
#endif
#endif

7
Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp

@ -632,10 +632,11 @@ void plClothingOutfit::IAddItem(plClothingItem *item)
for (i = 0; i < num; i++)
{
if (soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i)))
soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i));
if (soundEffect)
break;
}
if (soundEffect)
{
if (!strcmp(item->fName, "03_MLFoot04_01") || !strcmp(item->fName, "03_FLFoot04_01"))
@ -1533,7 +1534,7 @@ plClothingLayout *plClothingMgr::GetLayout(char *name)
return nil;
}
plClothingElement *plClothingMgr::FindElementByName(char *name)
plClothingElement *plClothingMgr::FindElementByName(const char *name)
{
int i;
for (i = 0; i < fElements.GetCount(); i++)

2
Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h

@ -259,7 +259,7 @@ public:
GETINTERFACE_ANY( plClothingMgr, hsKeyedObject );
plClothingLayout *GetLayout(char *name);
plClothingElement *FindElementByName(char *name);
plClothingElement *FindElementByName(const char *name);
// Functions that just relate to the clothing you have permission to wear (closet)

24
Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp

@ -157,8 +157,7 @@ void plAvTask::IUndoLimitPlayersInput(plArmatureMod *avatar)
// CTOR default
plAvSeekTask::plAvSeekTask()
: fAnimName(nil),
fAlign(kAlignHandle),
: fAlign(kAlignHandle),
fDuration(0.25),
fTarget(nil),
fAnimInstance(nil),
@ -169,8 +168,9 @@ plAvSeekTask::plAvSeekTask()
}
// CTOR target, align, animName
plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animName)
: fAlign(align),
plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const plString& animName)
: fAnimName(animName),
fAlign(align),
fDuration(0.25),
fTarget(target),
fAnimInstance(nil),
@ -178,19 +178,17 @@ plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animNa
fPhysicalAtStart(false),
fCleanup(false)
{
fAnimName = hsStrcpy(animName);
}
// CTOR target
plAvSeekTask::plAvSeekTask(plKey target)
: fAnimName(nil),
fAlign(kAlignHandle),
fDuration(0.25),
fTarget(target),
fAnimInstance(nil),
fTargetTime(0),
fPhysicalAtStart(false),
fCleanup(false)
: fAlign(kAlignHandle),
fDuration(0.25),
fTarget(target),
fAnimInstance(nil),
fTargetTime(0),
fPhysicalAtStart(false),
fCleanup(false)
{
}

4
Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h

@ -132,7 +132,7 @@ public:
plAvSeekTask(plKey target);
/** Constructor form for calculated seek points: uses aligment type and (optionally) animation
The animation is used if we're trying to align some future pose with a seek target. */
plAvSeekTask(plKey target, plAvAlignment alignType, const char *animName);
plAvSeekTask(plKey target, plAvAlignment alignType, const plString& animName);
// task protocol
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
@ -146,7 +146,7 @@ public:
// *** implement reader and writer if needed for network propagation
protected:
// -- specification members --
char * fAnimName; // the animation we're using, if any;
plString fAnimName; // the animation we're using, if any;
plAvAlignment fAlign; // how to line up with the seek point
double fDuration; // the time we want the task to take
plKey fTarget; // the thing we're seeking towards

2
Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h

@ -127,7 +127,7 @@ public:
class plClothingLayout
{
public:
plClothingLayout(char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; }
plClothingLayout(const char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; }
~plClothingLayout() { delete [] fName; }
char *fName;

5
Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp

@ -227,7 +227,8 @@ bool plCoopCoordinator::MsgReceive(plMessage *msg)
fGuestLinked = true;
IAdvanceParticipant(true); // advance the host
break;
default:
break;
}
}
@ -326,7 +327,7 @@ void plCoopCoordinator::IStartGuest()
const plSceneObject *targetBone = hostAv->FindBone(fSynchBone);
if(targetBone)
{
plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey());
plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, "", false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey());
plAvTaskSeek *seekT = new plAvTaskSeek(seekMsg);
plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT);
seekM->SetBCastFlag(plMessage::kPropagateToModifiers);

12
Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp

@ -120,7 +120,6 @@ void plMultistageBehMod::IDeleteStageVec()
bool plMultistageBehMod::MsgReceive(plMessage* msg)
{
plMultistageModMsg *multiMsg = nil;
plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg);
if (notifyMsg)
{
@ -187,8 +186,10 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
}
return true;
}
else if (multiMsg = plMultistageModMsg::ConvertNoRef(msg))
}
plMultistageModMsg *multiMsg = plMultistageModMsg::ConvertNoRef(msg);
if (multiMsg)
{
if (multiMsg->GetCommand(plMultistageModMsg::kSetLoopCount))
{
@ -196,9 +197,8 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
}
return true;
}
else {
return plSingleModifier::MsgReceive(msg);
}
return plSingleModifier::MsgReceive(msg);
}
void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr)

10
Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp

@ -220,8 +220,8 @@ void plSittingModifier::Trigger(const plArmatureMod *avMod, plNotifyMsg *enterNo
// send the SEEK message
char *animName = nil; // this will be the name of our sit animation, which we
// need to know so we can seek properly.
const char *animName = nil; // this will be the name of our sit animation, which we
// need to know so we can seek properly.
plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify);
if(brain)
@ -298,7 +298,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis
// IBuildSitBrain ---------------------------------------------------------------------
// ----------------
plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKey,
char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify)
const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify)
{
plArmatureMod *avatar = plArmatureMod::ConvertNoRef(avModKey->ObjectIsLoaded());
plSceneObject *seekObj = plSceneObject::ConvertNoRef(seekKey->ObjectIsLoaded());
@ -308,8 +308,8 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe
float closestDist = 0.0f;
uint8_t closestApproach = 0;
hsPoint3 curPosition = avatar->GetTarget(0)->GetLocalToWorld().GetTranslate();
char * sitAnimName = nil;
char * standAnimName = "StandUpFront"; // always prefer to stand facing front
const char* sitAnimName = nil;
const char* standAnimName = "StandUpFront"; // always prefer to stand facing front
bool frontClear = fMiscFlags & kApproachFront;
plAvBrainGeneric *brain = nil;

2
Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h

@ -110,7 +110,7 @@ protected:
/** Figure out which approach we should use to the sit target, and add the relevant
stages to the brain. */
plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey,char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify);
plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey, const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify);
/** Unused. */
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }

5
Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp

@ -40,10 +40,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsStringTable.h"
#include <stdlib.h>
#if HS_BUILD_FOR_UNIX
#include <ctype.h>
#include <cctype>
#endif
//
// hsStringTable
//

1
Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp

@ -44,7 +44,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include <fstream>
#include <algorithm>
#include <stdarg.h>
#include <sstream>
const plString& plConfigInfo::GlobalSection()

1
Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h

@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plConfigInfo_h_inc
#include "plKeysAndValues.h"
#include <stdarg.h>
/////////////////////////////////////////////////

2
Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp

@ -737,7 +737,7 @@ void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_
uint16_t* dataPtr = nil;
grp->ReserveIndexStorage(maxNumIdx, &aux->fIBufferIdx, &aux->fIStartIdx, &dataPtr);
aux->fIStartIdx /* should be assigning something? */;
//aux->fIStartIdx /* should be assigning something? */;
aux->fILength = 0;

2
Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp

@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsSTLStream.h"
#include <time.h>
#include <ctime>
#include <wchar.h>
static const uint32_t kDefaultKey[4] = { 0x6c0a5452, 0x3827d0f, 0x3a170b92, 0x16db7fc2 };

3
Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp

@ -40,14 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <string>
#include <ctime>
#include "plSecureStream.h"
#include "hsWindows.h"
#include "hsSTLStream.h"
#include <time.h>
#if !HS_BUILD_FOR_WIN32
#define INVALID_HANDLE_VALUE 0
#endif

3
Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp

@ -960,7 +960,6 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h
IEnsureSurfaceUpdated();
#if HS_BUILD_FOR_WIN32
SIZE size;
::GetTextExtentPoint32( fRGBSurface.fDC, text, strlen( text ), &size );
@ -968,6 +967,8 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h
*height = (uint16_t)size.cy;
return (uint16_t)size.cx;
#else
return 0;
#endif
}

2
Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp

@ -60,7 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plPipeline/hsGDeviceRef.h"
#include "plProfile.h"
#include "plJPEG.h"
#include <math.h>
#include <cmath>
plProfile_CreateMemCounter("Mipmaps", "Memory", MemMipmaps);

4
Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp

@ -47,8 +47,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plPerspDirSlave.h"
#include <float.h>
#include <math.h>
#include <cfloat>
#include <cmath>
#ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan

4
Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp

@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plShadowSlave.h"
#include "plTweak.h"
#include <float.h>
#include <math.h>
#include <cfloat>
#include <cmath>
#ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan

2
Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsKeys.h"
#include "hsStream.h"
#include <math.h>
#include <cmath>
const int hsKeyFrame::kMaxFrameNumber = 65535;

2
Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp

@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plController.h"
#include "hsFastMath.h"
#include "hsResMgr.h"
#include <math.h>
#include <cmath>
const float kSmallDelTime = 1.e-2f;
const float kInvSmallDelTime = 1.f / kSmallDelTime;

2
Sources/Plasma/PubUtilLib/plMath/plAvg.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "plAvg.h"
#include <math.h>
#include <cmath>
template class TimeBasedAvgRing<float>;
template class TimeBasedAvgRing<double>;

4
Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "hsGeometry3.h"
#include <math.h>
#include <cmath>
#include "plTriUtils.h"
static const float kAlmostZero = 1.e-5f;
@ -328,4 +328,4 @@ bool plTriUtils::ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3&
float dist = norm.InnerProduct(p0 - p);
return ProjectOntoPlaneAlongVector(norm, dist, vec, p);
}
}

5
Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp

@ -240,7 +240,6 @@ plAvSeekMsg::plAvSeekMsg()
fDuration(0),
fSmartSeek(true),
fAlignType(kAlignHandle),
fAnimName(nil),
fNoSeek(false),
fFlags(kSeekFlagForce3rdPersonOnStart)
{
@ -249,7 +248,7 @@ plAvSeekMsg::plAvSeekMsg()
// CTOR(sender, receiver, seekKey, time)
plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver,
const plKey &seekKey, float duration, bool smartSeek,
plAvAlignment alignType, char *animName, bool noSeek,
plAvAlignment alignType, const plString& animName, bool noSeek,
uint8_t flags, plKey finishKey)
: plAvTaskMsg(sender, receiver),
fSeekPoint(seekKey),
@ -359,7 +358,7 @@ plAvOneShotMsg::plAvOneShotMsg()
plAvOneShotMsg::plAvOneShotMsg(const plKey &sender, const plKey& receiver,
const plKey& seekKey, float duration, bool smartSeek,
const plString &animName, bool drivable, bool reversible)
: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek), fAnimName(animName),
: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek, kAlignHandle, animName),
fDrivable(drivable), fReversible(reversible), fCallbacks(nil)
{
}

5
Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h

@ -189,7 +189,7 @@ public:
// tors
plAvSeekMsg();
plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek,
plAvAlignment align = kAlignHandle, char *animName = nil, bool noSeek = false,
plAvAlignment align = kAlignHandle, const plString& animName = "", bool noSeek = false,
uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil);
// plasma protocol
@ -212,7 +212,7 @@ public:
float fDuration; // take this much time to do the move (only if smartSeek is false)
bool fSmartSeek; // seek by walking rather than floating
bool fNoSeek;
char *fAnimName;
plString fAnimName;
plAvAlignment fAlignType;
uint8_t fFlags;
plKey fFinishKey;
@ -257,7 +257,6 @@ public:
virtual void Write(hsStream *stream, hsResMgr *mgr);
// public members
plString fAnimName; // the name of the animation we're going to use
bool fDrivable; // are we animated by time or by mouse movement?
bool fReversible; // can we play backwards?
plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier

6
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

@ -559,7 +559,7 @@ int plNetClientMgr::Update(double secs)
//
void plNetClientMgr::ICheckPendingStateLoad(double secs)
{
if (!fPendingLoads.empty() && GetFlagsBit( kPlayingGame ) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount)))
if ((!fPendingLoads.empty() && GetFlagsBit(kPlayingGame)) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount)))
{
PendingLoadsList::iterator it = fPendingLoads.begin();
while ( it!=fPendingLoads.end() )
@ -1135,8 +1135,8 @@ plString plNetClientMgr::GetPlayerNameById (unsigned playerId) const {
unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const {
// local case
if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi))
NetCommGetPlayer()->playerInt;
return NetCommGetPlayer()->playerInt;
unsigned n = TransportMgr().GetNumMembers();
for (unsigned i = 0; i < n; ++i)
if (plNetTransportMember * member = TransportMgr().GetMember(i))

2
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp

@ -157,7 +157,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg)
info.AddValue( "Petition", "Language", plLocalization::GetLanguageName( plLocalization::GetLanguage() ) );
info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi );
char buffy[20];
sprintf( buffy, "%lu", GetPlayerID() );
sprintf(buffy, "%u", GetPlayerID());
info.AddValue( "Petition", "PlayerID", buffy );
info.AddValue( "Petition", "PlayerName", GetPlayerName() );

2
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <algorithm>
#include <float.h>
#include <cfloat>
#include "hsMatrix44.h"
#include "hsGeometry3.h"
#include "plNetClientMgr.h"

5
Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

@ -267,6 +267,9 @@ void plNetLinkingMgr::ExecNextOp () {
);
}
break;
default:
break;
}
s_opqueue.remove(op);
@ -1098,7 +1101,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
info,
&childLink))
{
case hsFail:
case static_cast<uint8_t>(hsFail):
success = kLinkFailed;
break;
case false:

6
Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp

@ -286,14 +286,14 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const
char objName[128];
int i=0;
// copy objName token
while(*c && *c != ',' && *c != ' ' && i<127)
objName[i++] = *c++;
objName[i++] = *c++;
objName[i]=0;
DebugObjectList::const_iterator it = fDebugObjects.begin();
for( objName[0]; it != fDebugObjects.end(); it++)
for(; it != fDebugObjects.end(); it++)
{
if ((*it) && (*it)->StringMatches(objName))
{

2
Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp

@ -319,7 +319,7 @@ void plAgeInfoStruct::SetAgeDescription( const char * v )
void plAgeInfoStruct::SetAgeLanguage( uint32_t v )
{
if ( v >= 0 )
if (v != static_cast<uint32_t>(-1))
{
SetFlag( kHasAgeLanguage );
fAgeLanguage = v;

2
Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp

@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetMessage/plNetMessage.h"
#include "plNetClient/plNetClientMgr.h"
#include <algorithm>
#include <float.h>
#include <cfloat>
plNetTransport::~plNetTransport()
{

4
Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h

@ -170,7 +170,7 @@ protected:
#define SIM_VERBOSE
#ifdef SIM_VERBOSE
#include <stdarg.h> // only include when we need to call plSimulationMgr::Log
#include <cstdarg> // only include when we need to call plSimulationMgr::Log
inline void SimLog(const char *str, ...)
{
@ -189,4 +189,4 @@ inline void SimLog(const char *str, ...)
#endif
#endif
#endif

2
Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp

@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "hsWindows.h"
#include <time.h>
#include <ctime>

1
Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h

@ -447,7 +447,6 @@ public:
//
///////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include "HeadSpin.h"
class plDemoDebugFile

2
Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp

@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plFogEnvironment.h"
#include <math.h>
#include <cmath>
#include "plTweak.h"
//// Constructors & Destructor ///////////////////////////////////////////////

2
Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plVertCoder.h"
#include "hsStream.h"
#include <math.h>
#include <cmath>
#include "plGBufferGroup.h"
const float kPosQuantum = 1.f / float(1 << 10);

3
Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp

@ -49,15 +49,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include "HeadSpin.h"
#include "plProgressMgr.h"
#include "hsTimer.h"
#include "plPipeline/plPlates.h"
#include <string.h>
//////////////////////////////////////////////////////////////////////////////
//// plProgressMgr Functions /////////////////////////////////////////////////

2
Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include <float.h>
#include <cfloat>
#include "hsStream.h"
#include "hsTimer.h"
#include "plSDL.h"

2
Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plBufferedSocketReader.h"
#include "plTcpSocket.h"
#include <string.h>
#include <cstring>
plBufferedSocketReader::plBufferedSocketReader(int size)

2
Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp

@ -51,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plEncryptLogLine.h"
#include <string.h>
void plStatusEncrypt::Decrypt( uint8_t *line, int32_t len, uint8_t hint )
{
// Da reverse, of course!

1
Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h

@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plLoggable_inc
#define plLoggable_inc
#include <stdio.h>
#include "HeadSpin.h"
#include "plString.h"

4
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

@ -55,8 +55,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdarg.h>
#include <stdlib.h>
#include <cstdarg>
#include <cstdlib>
#include "hsThread.h"
#include "hsTemplates.h"
#include "hsTimer.h"

4
Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsGMaterial.h"
#include <math.h>
#include <cmath>
#include "HeadSpin.h"
#include "hsMemory.h"
@ -334,4 +334,4 @@ bool hsGMaterial::MsgReceive(plMessage* msg)
return true;
}
return plSynchedObject::MsgReceive(msg);
}
}

4
Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp

@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// See Gems IV, Ken Shoemake
//////////////////////////////////////////////////////////////////////////
//
#include <float.h> // for FLT_EPSILON
#include <math.h>
#include <cfloat> // for FLT_EPSILON
#include <cmath>
#include "hsEuler.h"
#include "hsQuat.h"
#include "hsMatrix44.h"

2
Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//
// Gems IV. Polar Decomp
//
#include <math.h>
#include <cmath>
#include "mat_decomp.h"
/******* Matrix Preliminaries *******/

2
Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp

@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include <float.h>
#include <cfloat>
#include "hsTimer.h"
#include "hsTemplates.h"
#include "plClientUnifiedTime.h"

10
Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp

@ -39,11 +39,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include <float.h>
#include <cfloat>
#include <cmath>
#include <ctime>
#include "plUnifiedTime.h"
#include "hsWindows.h"
#include "hsStream.h"
#if HS_BUILD_FOR_UNIX
#include <sys/time.h>
@ -55,11 +56,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif
#include <time.h>
#include "hsStream.h"
#if HS_BUILD_FOR_WIN32
//
// Converts Windows Time to Unified Time

6
Sources/Tools/MaxConvert/Pch.h

@ -50,11 +50,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// Standard Library
#include <algorithm>
#include <float.h>
#include <cfloat>
#include <cmath>
#include <cstring>
#include <functional>
#include <math.h>
#include <memory>
#include <string.h>
#include <vector>
// Core Plasma

2
Sources/Tools/MaxConvert/StringTokenizer.cpp

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include <string.h>
#include <cstring>
#pragma hdrstop
#include "StringTokenizer.h"

1
Sources/Tools/MaxConvert/hsControlConverter.cpp

@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTemplates.h"
#include "hsWindows.h"
#include <commdlg.h>
#include <cmath>
#include <stdmat.h>
#include <bmmlib.h>
#include <istdplug.h>

2
Sources/Tools/MaxConvert/hsConverterUtils.cpp

@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsHashTable.h"
#include "hsStringTokenizer.h"
#include "hsResMgr.h"
#include <math.h>
#include <cmath>
#include <max.h>
#include <stdmat.h>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save