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 "HeadSpin.h"
#include "hsWindows.h" #include "hsWindows.h"
#include <stdio.h>
#include <direct.h> // windows directory handling fxns (for chdir) #include <direct.h> // windows directory handling fxns (for chdir)
#include <process.h> #include <process.h>
#include <shellapi.h> // ShellExecuteA #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 "hsWindows.h"
#include <process.h> #include <process.h>
#include <time.h> #include <ctime>
#include "pnUtils/pnUtils.h" #include "pnUtils/pnUtils.h"
#include "pnNetBase/pnNetBase.h" #include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.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 "plProduct.h"
#include <time.h> #include <ctime>
#include <string> #include <string>
void print_version() { 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 "hsWindows.h"
#include <process.h> #include <process.h>
#include <time.h> #include <ctime>
#include <curl/curl.h> #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++) for (i = 0; i < len; i++)
{ {
char temp = wctob(str[i]); char temp = wctob(str[i]);
if (temp == WEOF) if (temp == EOF)
{ {
sStr[i] = '\0'; sStr[i] = '\0';
i = len; 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 <cstdlib>
#include <cstring> #include <cstring>
#include <cctype> #include <cctype>
#include <stdarg.h> #include <cstdarg>
#include <stdint.h> #include <cstdint>
//====================================== //======================================
// Winblows Hacks // Winblows Hacks
@ -77,7 +77,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// even more bloated than before! // even more bloated than before!
struct HWND__; typedef struct HWND__ *HWND; struct HWND__; typedef struct HWND__ *HWND;
struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE; struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE;
typedef HWND hsWindowHndl; typedef HWND hsWindowHndl;
typedef HINSTANCE hsWindowInst; typedef HINSTANCE hsWindowInst;
typedef HINSTANCE HMODULE; typedef HINSTANCE HMODULE;
@ -341,21 +341,6 @@ void hsStrLower(char *s);
char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory. 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. 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[]) inline char* hsStrcpy(const char src[])
{ {
return hsStrcpy(nil, 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 "hsBitVector.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include <stdarg.h>
hsBitVector::hsBitVector(int b, ...) hsBitVector::hsBitVector(int b, ...)
: fBitVectors(nil), : fBitVectors(nil),
fNumBitVectors(0) fNumBitVectors(0)

2
Sources/Plasma/CoreLib/hsGeometry3.cpp

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include "hsStream.h" #include "hsStream.h"
#include <math.h> #include <cmath>
hsVector3 operator%(const hsVector3& t, const hsVector3& s) 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 "hsQuat.h"
#include "hsMatrix44.h" #include "hsMatrix44.h"
#include "hsStream.h" #include "hsStream.h"
#include <math.h> #include <cmath>
#ifdef HS_SIMD_INCLUDE #ifdef HS_SIMD_INCLUDE
# include 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==*/ *==LICENSE==*/
#include <string.h>
#include "hsMemory.h" #include "hsMemory.h"
#include "hsExceptions.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 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include <ctype.h>
#include "hsStream.h" #include "hsStream.h"
#include "hsMemory.h" #include "hsMemory.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <unistd.h> #include <unistd.h>
#endif #endif
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include <io.h> #include <io.h>
#endif #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 #ifndef hsStream_Defined
#define hsStream_Defined #define hsStream_Defined
#include <stdarg.h> // Included for GCC 3.2.2+
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsMemory.h" #include "hsMemory.h"
#include "plFileSystem.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 "hsMemory.h"
#include "hsRefCnt.h" #include "hsRefCnt.h"
#include <cstdarg>
#include <stdarg.h>
#ifdef HS_DEBUGGING #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/errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <cstring>
#define NO_POSIX_CLOCK 1 #define NO_POSIX_CLOCK 1
@ -146,8 +146,8 @@ void hsThread::ThreadYield()
//#define MUTEX_TIMING //#define MUTEX_TIMING
#ifdef MUTEX_TIMING #ifdef MUTEX_TIMING
#include <time.h> #include <ctime>
#include <stdio.h> #include <cstdio>
#include <unistd.h> #include <unistd.h>
#include "hsWide.h" #include "hsWide.h"
@ -168,8 +168,8 @@ static void InitMutexTimerFile()
//#define EVENT_LOGGING //#define EVENT_LOGGING
#ifdef EVENT_LOGGING #ifdef EVENT_LOGGING
#include <time.h> #include <ctime>
#include <stdio.h> #include <cstdio>
#include <unistd.h> #include <unistd.h>
#include "NucleusLib/inc/hsTimer.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; struct dirent *de;
while (de = readdir(dir)) { 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 .. // Should also handle . and ..
continue; continue;
} }
if (pattern && pattern[0] && fnmatch(pattern, de->d_name)) if (pattern && pattern[0] && fnmatch(pattern, de->d_name, 0))
contents.push_back(plFileName::Join(path, de->d_name)); contents.push_back(dir_name);
else if (!pattern || !pattern[0]) else if (!pattern || !pattern[0])
contents.push_back(plFileName::Join(path, de->d_name)); contents.push_back(dir_name);
} }
closedir(dir); closedir(dir);
@ -428,7 +429,7 @@ std::vector<plFileName> plFileSystem::ListSubdirs(const plFileName &path)
if (plFileInfo(de->d_name).IsDirectory()) { if (plFileInfo(de->d_name).IsDirectory()) {
plFileName name = de->d_name; plFileName name = de->d_name;
if (name != "." && 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==*/ *==LICENSE==*/
#include <stdint.h> #include <cstdint>
class plString; 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 #ifndef plString_Defined
#define plString_Defined #define plString_Defined
#include <stdint.h>
#include <vector> #include <vector>
#include <cstdint>
#include <cstddef>
#include <cstdarg>
#include <cstring>
/** Single Unicode character code unit */ /** Single Unicode character code unit */
typedef unsigned int UniChar; typedef unsigned int UniChar;
@ -53,6 +56,21 @@ typedef unsigned int UniChar;
#define STRING_STACK_SIZE (256) #define STRING_STACK_SIZE (256)
#define WHITESPACE_CHARS " \t\n\r" #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. /** Ref-counted string data buffer.
* This is used to store actual string data in any (unchecked) encoding format, * 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 * 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 "../plPipeline/plDebugGeometry.h"
#include <math.h> #include <cmath>
#include <algorithm> #include <algorithm>
#include "pfObjectFlocker.h" #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 #define OBJECT_FLOCKER_H
#include "pnModifier/plSingleModifier.h" #include "pnModifier/plSingleModifier.h"
#include <algorithm>
class hsStream; class hsStream;
class hsResMgr; 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==*/ *==LICENSE==*/
#include <stdlib.h>
#include <cmath> #include <cmath>
#include "HeadSpin.h" #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==*/ *==LICENSE==*/
#include <math.h> #include <cmath>
#include "HeadSpin.h" #include "HeadSpin.h"
@ -307,4 +307,4 @@ bool plStereizer::CheckForMaster()
} }
} }
return false; 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 "hsTimer.h"
#include "HeadSpin.h" #include "HeadSpin.h"
#include "pfGameGUIMgr.h" #include "pfGameGUIMgr.h"

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

@ -63,9 +63,6 @@ struct LocElementInfo;
struct LocSetInfo; struct LocSetInfo;
struct LocAgeInfo; struct LocAgeInfo;
// Temporary helper (until everything is plString-ized)
typedef std::vector<std::wstring> WStringVector;
class pfLocalizationDataMgr class pfLocalizationDataMgr
{ {
private: 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> #include <string>
// Platform Library Includes // Platform Library Includes
#include <time.h> #include <ctime>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.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 <Python.h>
#include <marshal.h> #include <marshal.h>
#include <time.h> #include <ctime>
#include <string> #include <string>
#include "HeadSpin.h" #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 "HeadSpin.h"
#include "plUoid.h" #include "plUoid.h"
#include <string.h>
#include "plFixedKey.h" #include "plFixedKey.h"
#include "plCreatableIndex.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 "HeadSpin.h"
#include "plKey.h" #include "plKey.h"
#include "plUoid.h" #include "plUoid.h"
#include <string.h>
#include "hsResMgr.h" #include "hsResMgr.h"
#define TRACK_REFS 0 // MEMLEAKFISH #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 "hsBitVector.h"
#include "plNetGroup.h" #include "plNetGroup.h"
#include "pnKeyedObject/hsKeyedObject.h" #include "pnKeyedObject/hsKeyedObject.h"
#include "pnKeyedObject/plUoid.h" #include "pnKeyedObject/plUoid.h"
#include "plStatusLog/plLoggable.h" #include "plStatusLog/plLoggable.h"
#include <stdarg.h>
#define plVerifyConditionRet(NetApp,cond,ret,str) \ #define plVerifyConditionRet(NetApp,cond,ret,str) \
do { \ do { \
if (!(cond)) { \ 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 <netinet/in.h>
# include <arpa/inet.h> # include <arpa/inet.h>
# include <netdb.h> # include <netdb.h>
# include <string.h> // for memcpy # include <cstring> // for memcpy
#elif !defined(HS_BUILD_FOR_WIN32) #elif !defined(HS_BUILD_FOR_WIN32)
#error "Not implemented for this platform" #error "Not implemented for this platform"
#endif #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" #include "pnUtTime.h"
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <time.h> #include <ctime>
#include <sys/time.h> #include <sys/time.h>
#endif #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::kStreamFromDisk: color = plStatusLog::kYellow; break;
case plSound::kStreamFromRAM: color = plStatusLog::kWhite; break; case plSound::kStreamFromRAM: color = plStatusLog::kWhite; break;
case plSound::kStreamCompressed: color = plStatusLog::kRed; break; case plSound::kStreamCompressed: color = plStatusLog::kRed; break;
default: break;
} }
if(sound->GetType() == plgAudioSys::kVoice) color = 0xffff8800; if(sound->GetType() == plgAudioSys::kVoice) color = 0xffff8800;
if(sound->IsPropertySet(plSound::kPropIncidental)) color = 0xff00ffff; 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 ) switch( msg->fEvent )
{ {
case ::kStart: return kStart; case ::kStart: return kStart;
case ::kTime: return kTime; case ::kTime: return kTime;
case ::kStop: return kStop; case ::kStop: return kStop;
case ::kLoop: return kLoop; 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. // // 3.5.2001 - Created by mcn. //
// // // //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include <string.h>
#include "HeadSpin.h" #include "HeadSpin.h"
#include "plAudioFileReader.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 "HeadSpin.h"
#include "plBufferedFileReader.h" #include "plBufferedFileReader.h"
#include "plFileSystem.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 "HeadSpin.h"
#include "plFastWavReader.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/codec.h>
#include <vorbis/vorbisfile.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 "HeadSpin.h"
#include "plSoundDeswizzler.h" #include "plSoundDeswizzler.h"
#include <string.h>
plSoundDeswizzler::plSoundDeswizzler( void *srcPtr, uint32_t srcLength, uint8_t numChannels, uint32_t sampleSize ) 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 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include <stdio.h>
#include "plWavFile.h" #include "plWavFile.h"
#ifdef BUILDING_MAXPLUGIN #ifdef BUILDING_MAXPLUGIN
@ -52,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <dsound.h> #include <dsound.h>
#include <stdio.h>
#pragma comment(lib, "winmm.lib") #pragma comment(lib, "winmm.lib")
#ifdef PATCHER #ifdef PATCHER
#define DXTRACE_ERR(str,hr) hr // I'm not linking in directx stuff to the just for this #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 // receive trigger messages
bool plAGMasterMod::MsgReceive(plMessage* msg) bool plAGMasterMod::MsgReceive(plMessage* msg)
{ {
plAnimCmdMsg* cmdMsg;
plAGCmdMsg* agMsg;
int i;
plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg); plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg);
if (nMsg) if (nMsg)
{ {
@ -626,7 +622,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true; return true;
} }
if (cmdMsg = plAnimCmdMsg::ConvertNoRef(msg)) plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
if (cmdMsg)
{ {
plString targetName = cmdMsg->GetAnimName(); plString targetName = cmdMsg->GetAnimName();
@ -638,7 +635,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
{ {
if (cmdMsg->CmdChangesAnimTime()) if (cmdMsg->CmdChangesAnimTime())
{ {
for (i = 0; i < GetNumAnimations(); i++) for (int i = 0; i < GetNumAnimations(); i++)
{ {
plAGAnimInstance *currInst = GetAnimInstance(i); plAGAnimInstance *currInst = GetAnimInstance(i);
if (currInst != inst && currInst->GetAnimation()->SharesPinsWith(inst->GetAnimation())) if (currInst != inst && currInst->GetAnimation()->SharesPinsWith(inst->GetAnimation()))
@ -653,7 +650,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true; return true;
} }
if (agMsg = plAGCmdMsg::ConvertNoRef(msg)) plAGCmdMsg* agMsg = plAGCmdMsg::ConvertNoRef(msg);
if (agMsg)
{ {
if (agMsg->Cmd(plAGCmdMsg::kSetAnimTime)) if (agMsg->Cmd(plAGCmdMsg::kSetAnimTime))
{ {
@ -678,7 +676,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
} }
plAGInstanceCallbackMsg *agicMsg = plAGInstanceCallbackMsg::ConvertNoRef(msg); plAGInstanceCallbackMsg *agicMsg = plAGInstanceCallbackMsg::ConvertNoRef(msg);
if (agicMsg != nil) if (agicMsg)
{ {
if (agicMsg->fEvent == kStart) if (agicMsg->fEvent == kStart)
{ {
@ -697,16 +695,16 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
} }
plAGDetachCallbackMsg *detachMsg = plAGDetachCallbackMsg::ConvertNoRef(msg); plAGDetachCallbackMsg *detachMsg = plAGDetachCallbackMsg::ConvertNoRef(msg);
if (detachMsg != nil) if (detachMsg)
{ {
DetachAnimation(detachMsg->GetAnimName()); DetachAnimation(detachMsg->GetAnimName());
} }
plGenRefMsg *genRefMsg; plGenRefMsg *genRefMsg = plGenRefMsg::ConvertNoRef(msg);
if (genRefMsg = plGenRefMsg::ConvertNoRef(msg)) if (genRefMsg)
{ {
plAGAnim *anim; plAGAnim *anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef());
if (anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef())) if (anim)
{ {
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest)) if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
{ {
@ -733,8 +731,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true; 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)) if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
fChannelMods[agmod->GetChannelName()] = agmod; fChannelMods[agmod->GetChannelName()] = agmod;
@ -743,8 +742,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true; 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)) if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
fMsgForwarder = msgfwd; fMsgForwarder = msgfwd;
@ -754,8 +754,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
return true; return true;
} }
} }
plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg); plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
if( refMsg ) if (refMsg)
{ {
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) ) if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
AddTarget(plSceneObject::ConvertNoRef(refMsg->GetRef())); 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; return false;
} }
plString plArmatureMod::MakeAnimationName(const char *baseName) const plString plArmatureMod::MakeAnimationName(const plString& baseName) const
{ {
return fAnimationPrefix + baseName; return fAnimationPrefix + baseName;
} }
@ -2395,7 +2395,7 @@ void plArmatureMod::SetRootName(const plString &name)
fRootName = name; fRootName = name;
} }
plAGAnim *plArmatureMod::FindCustomAnim(const char *baseName) const plAGAnim *plArmatureMod::FindCustomAnim(const plString& baseName) const
{ {
plString customName = MakeAnimationName(baseName); plString customName = MakeAnimationName(baseName);
plAGAnim *result = plAGAnim::FindAnim(customName); 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 "hsMatrix44.h"
#include "plNetCommon/plNetCommon.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 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); virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone);
plAGModifier *GetRootAGMod(); plAGModifier *GetRootAGMod();
plAGAnim *FindCustomAnim(const char *baseName) const; plAGAnim *FindCustomAnim(const plString& baseName) const;
virtual void Spawn(double timeNow); virtual void Spawn(double timeNow);
virtual void SpawnAt(int which, double timeNow); virtual void SpawnAt(int which, double timeNow);
@ -305,7 +305,7 @@ public:
int GetBodyType(int type) { return fBodyType; } int GetBodyType(int type) { return fBodyType; }
int GetCurrentGenericType(); int GetCurrentGenericType();
bool FindMatchingGenericBrain(const char *names[], int count); bool FindMatchingGenericBrain(const char *names[], int count);
plString MakeAnimationName(const char * baseName) const; plString MakeAnimationName(const plString& baseName) const;
plString GetRootName(); plString GetRootName();
void SetRootName(const plString &name); void SetRootName(const plString &name);

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

@ -244,18 +244,19 @@ bool plAvBrainClimb::Apply(double time, float elapsed)
// MSGRECEIVE // MSGRECEIVE
bool plAvBrainClimb::MsgReceive(plMessage *msg) bool plAvBrainClimb::MsgReceive(plMessage *msg)
{ {
plClimbMsg *climbMsg; plClimbMsg* climbMsg = plClimbMsg::ConvertNoRef(msg);
plLOSHitMsg *losMsg; if (climbMsg)
if(climbMsg = plClimbMsg::ConvertNoRef(msg))
{ {
return IHandleClimbMsg(climbMsg); return IHandleClimbMsg(climbMsg);
} else if(losMsg = plLOSHitMsg::ConvertNoRef(msg)) }
plLOSHitMsg *losMsg = plLOSHitMsg::ConvertNoRef(msg);
if (losMsg)
{ {
return IHandleLOSMsg(losMsg); return IHandleLOSMsg(losMsg);
} else {
return plArmatureBrain::MsgReceive(msg);
} }
return plArmatureBrain::MsgReceive(msg);
} }
// IHANDLECLIMBMSG // IHANDLECLIMBMSG
@ -296,6 +297,8 @@ bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
break; break;
} }
default:
break;
} }
return true; return true;
} }
@ -1047,6 +1050,6 @@ const char *plAvBrainClimb::ModeStr(Mode mode)
case kFallingOff: case kFallingOff:
return "FallingOff"; return "FallingOff";
default: 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: case kNormal:
result = IProcessNormal(time, elapsed); result = IProcessNormal(time, elapsed);
break; break;
default:
break;
} }
plArmatureBrain::Apply(time, elapsed); plArmatureBrain::Apply(time, elapsed);
return result; return result;
@ -653,15 +655,15 @@ bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
} }
} }
break; break;
#ifdef DEBUG_MULTISTAGE
default: default:
#ifdef DEBUG_MULTISTAGE
{ {
char sbuf[256]; char sbuf[256];
sprintf(sbuf,"GenericMsg - Unknown command %d ",msg->fType); sprintf(sbuf,"GenericMsg - Unknown command %d ",msg->fType);
plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf); plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf);
} }
break;
#endif #endif
break;
} }
return true; return true;
} }
@ -731,24 +733,21 @@ bool plAvBrainGeneric::IBrainIsCompatible(plAvBrainGeneric *otherBrain)
{ {
case plAGAnim::kBodyUnknown: case plAGAnim::kBodyUnknown:
return false; return false;
break;
case plAGAnim::kBodyFull: case plAGAnim::kBodyFull:
return false; return false;
break;
case plAGAnim::kBodyUpper: case plAGAnim::kBodyUpper:
if(otherUsage == plAGAnim::kBodyLower) if(otherUsage == plAGAnim::kBodyLower)
return true; return true;
else else
return false; return false;
break;
case plAGAnim::kBodyLower: case plAGAnim::kBodyLower:
if(otherUsage == plAGAnim::kBodyUpper) if(otherUsage == plAGAnim::kBodyUpper)
return true; return true;
else else
return false; 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(); IChatOn();
return true; return true;
break; break;
default:
break;
} }
} else { } else {
switch(moveCode) switch(moveCode)
@ -398,6 +400,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
IChatOff(); IChatOff();
return true; return true;
break; break;
default:
break;
} }
} }
return false; return false;
@ -515,6 +519,8 @@ bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
case plClimbMsg::kRight: case plClimbMsg::kRight:
startMode = plAvBrainClimb::kMountingRight; startMode = plAvBrainClimb::kMountingRight;
break; break;
default:
break;
} }
plAvBrainClimb *brain = new plAvBrainClimb(startMode); plAvBrainClimb *brain = new plAvBrainClimb(startMode);
plAvTaskBrain *brainTask = new plAvTaskBrain(brain); plAvTaskBrain *brainTask = new plAvTaskBrain(brain);

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

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

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

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

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

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

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

@ -75,7 +75,7 @@ public:
plAvTaskSeek(); plAvTaskSeek();
plAvTaskSeek(plKey target); plAvTaskSeek(plKey target);
plAvTaskSeek(plAvSeekMsg *msg); 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(plKey target);
void SetTarget(hsPoint3 &pos, hsPoint3 &lookAt); 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 // 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" // and have your handle wind up here" i.e: aligntype = "kAlignHandleAnimEnd"
plAvAlignment fAlign; // how to line up with the seek point 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 // so you can say "seek to a place where your hand
// will be here after you play animation foo" // 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. 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++) for (i = 0; i < num; i++)
{ {
if (soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i))) soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i));
if (soundEffect)
break; break;
} }
if (soundEffect) if (soundEffect)
{ {
if (!strcmp(item->fName, "03_MLFoot04_01") || !strcmp(item->fName, "03_FLFoot04_01")) if (!strcmp(item->fName, "03_MLFoot04_01") || !strcmp(item->fName, "03_FLFoot04_01"))
@ -1533,7 +1534,7 @@ plClothingLayout *plClothingMgr::GetLayout(char *name)
return nil; return nil;
} }
plClothingElement *plClothingMgr::FindElementByName(char *name) plClothingElement *plClothingMgr::FindElementByName(const char *name)
{ {
int i; int i;
for (i = 0; i < fElements.GetCount(); i++) for (i = 0; i < fElements.GetCount(); i++)

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

@ -259,7 +259,7 @@ public:
GETINTERFACE_ANY( plClothingMgr, hsKeyedObject ); GETINTERFACE_ANY( plClothingMgr, hsKeyedObject );
plClothingLayout *GetLayout(char *name); 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) // 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 // CTOR default
plAvSeekTask::plAvSeekTask() plAvSeekTask::plAvSeekTask()
: fAnimName(nil), : fAlign(kAlignHandle),
fAlign(kAlignHandle),
fDuration(0.25), fDuration(0.25),
fTarget(nil), fTarget(nil),
fAnimInstance(nil), fAnimInstance(nil),
@ -169,8 +168,9 @@ plAvSeekTask::plAvSeekTask()
} }
// CTOR target, align, animName // CTOR target, align, animName
plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animName) plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const plString& animName)
: fAlign(align), : fAnimName(animName),
fAlign(align),
fDuration(0.25), fDuration(0.25),
fTarget(target), fTarget(target),
fAnimInstance(nil), fAnimInstance(nil),
@ -178,19 +178,17 @@ plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animNa
fPhysicalAtStart(false), fPhysicalAtStart(false),
fCleanup(false) fCleanup(false)
{ {
fAnimName = hsStrcpy(animName);
} }
// CTOR target // CTOR target
plAvSeekTask::plAvSeekTask(plKey target) plAvSeekTask::plAvSeekTask(plKey target)
: fAnimName(nil), : fAlign(kAlignHandle),
fAlign(kAlignHandle), fDuration(0.25),
fDuration(0.25), fTarget(target),
fTarget(target), fAnimInstance(nil),
fAnimInstance(nil), fTargetTime(0),
fTargetTime(0), fPhysicalAtStart(false),
fPhysicalAtStart(false), fCleanup(false)
fCleanup(false)
{ {
} }

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

@ -132,7 +132,7 @@ public:
plAvSeekTask(plKey target); plAvSeekTask(plKey target);
/** Constructor form for calculated seek points: uses aligment type and (optionally) animation /** 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. */ 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 // task protocol
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); 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 // *** implement reader and writer if needed for network propagation
protected: protected:
// -- specification members -- // -- 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 plAvAlignment fAlign; // how to line up with the seek point
double fDuration; // the time we want the task to take double fDuration; // the time we want the task to take
plKey fTarget; // the thing we're seeking towards plKey fTarget; // the thing we're seeking towards

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

@ -127,7 +127,7 @@ public:
class plClothingLayout class plClothingLayout
{ {
public: 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; } ~plClothingLayout() { delete [] fName; }
char *fName; char *fName;

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

@ -227,7 +227,8 @@ bool plCoopCoordinator::MsgReceive(plMessage *msg)
fGuestLinked = true; fGuestLinked = true;
IAdvanceParticipant(true); // advance the host IAdvanceParticipant(true); // advance the host
break; break;
default:
break;
} }
} }
@ -326,7 +327,7 @@ void plCoopCoordinator::IStartGuest()
const plSceneObject *targetBone = hostAv->FindBone(fSynchBone); const plSceneObject *targetBone = hostAv->FindBone(fSynchBone);
if(targetBone) 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); plAvTaskSeek *seekT = new plAvTaskSeek(seekMsg);
plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT); plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT);
seekM->SetBCastFlag(plMessage::kPropagateToModifiers); seekM->SetBCastFlag(plMessage::kPropagateToModifiers);

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

@ -120,7 +120,6 @@ void plMultistageBehMod::IDeleteStageVec()
bool plMultistageBehMod::MsgReceive(plMessage* msg) bool plMultistageBehMod::MsgReceive(plMessage* msg)
{ {
plMultistageModMsg *multiMsg = nil;
plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg); plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg);
if (notifyMsg) if (notifyMsg)
{ {
@ -187,8 +186,10 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
} }
return true; return true;
} }
else if (multiMsg = plMultistageModMsg::ConvertNoRef(msg))
plMultistageModMsg *multiMsg = plMultistageModMsg::ConvertNoRef(msg);
if (multiMsg)
{ {
if (multiMsg->GetCommand(plMultistageModMsg::kSetLoopCount)) if (multiMsg->GetCommand(plMultistageModMsg::kSetLoopCount))
{ {
@ -196,9 +197,8 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
} }
return true; return true;
} }
else {
return plSingleModifier::MsgReceive(msg); return plSingleModifier::MsgReceive(msg);
}
} }
void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr) 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 // send the SEEK message
char *animName = nil; // this will be the name of our sit animation, which we const char *animName = nil; // this will be the name of our sit animation, which we
// need to know so we can seek properly. // need to know so we can seek properly.
plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify); plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify);
if(brain) if(brain)
@ -298,7 +298,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis
// IBuildSitBrain --------------------------------------------------------------------- // IBuildSitBrain ---------------------------------------------------------------------
// ---------------- // ----------------
plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKey, 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()); plArmatureMod *avatar = plArmatureMod::ConvertNoRef(avModKey->ObjectIsLoaded());
plSceneObject *seekObj = plSceneObject::ConvertNoRef(seekKey->ObjectIsLoaded()); plSceneObject *seekObj = plSceneObject::ConvertNoRef(seekKey->ObjectIsLoaded());
@ -308,8 +308,8 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe
float closestDist = 0.0f; float closestDist = 0.0f;
uint8_t closestApproach = 0; uint8_t closestApproach = 0;
hsPoint3 curPosition = avatar->GetTarget(0)->GetLocalToWorld().GetTranslate(); hsPoint3 curPosition = avatar->GetTarget(0)->GetLocalToWorld().GetTranslate();
char * sitAnimName = nil; const char* sitAnimName = nil;
char * standAnimName = "StandUpFront"; // always prefer to stand facing front const char* standAnimName = "StandUpFront"; // always prefer to stand facing front
bool frontClear = fMiscFlags & kApproachFront; bool frontClear = fMiscFlags & kApproachFront;
plAvBrainGeneric *brain = nil; 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 /** Figure out which approach we should use to the sit target, and add the relevant
stages to the brain. */ 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. */ /** Unused. */
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } 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==*/ *==LICENSE==*/
#include "hsStringTable.h" #include "hsStringTable.h"
#include <stdlib.h>
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <ctype.h> #include <cctype>
#endif #endif
// //
// hsStringTable // 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 "HeadSpin.h"
#include <fstream> #include <fstream>
#include <algorithm> #include <algorithm>
#include <stdarg.h>
#include <sstream> #include <sstream>
const plString& plConfigInfo::GlobalSection() 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 #define plConfigInfo_h_inc
#include "plKeysAndValues.h" #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; uint16_t* dataPtr = nil;
grp->ReserveIndexStorage(maxNumIdx, &aux->fIBufferIdx, &aux->fIStartIdx, &dataPtr); grp->ReserveIndexStorage(maxNumIdx, &aux->fIBufferIdx, &aux->fIStartIdx, &dataPtr);
aux->fIStartIdx /* should be assigning something? */; //aux->fIStartIdx /* should be assigning something? */;
aux->fILength = 0; 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 "hsSTLStream.h"
#include <time.h> #include <ctime>
#include <wchar.h> #include <wchar.h>
static const uint32_t kDefaultKey[4] = { 0x6c0a5452, 0x3827d0f, 0x3a170b92, 0x16db7fc2 }; 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==*/ *==LICENSE==*/
#include <string> #include <string>
#include <ctime>
#include "plSecureStream.h" #include "plSecureStream.h"
#include "hsWindows.h" #include "hsWindows.h"
#include "hsSTLStream.h" #include "hsSTLStream.h"
#include <time.h>
#if !HS_BUILD_FOR_WIN32 #if !HS_BUILD_FOR_WIN32
#define INVALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE 0
#endif #endif

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

@ -960,7 +960,6 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h
IEnsureSurfaceUpdated(); IEnsureSurfaceUpdated();
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
SIZE size; SIZE size;
::GetTextExtentPoint32( fRGBSurface.fDC, text, strlen( text ), &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; *height = (uint16_t)size.cy;
return (uint16_t)size.cx; return (uint16_t)size.cx;
#else
return 0;
#endif #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 "plPipeline/hsGDeviceRef.h"
#include "plProfile.h" #include "plProfile.h"
#include "plJPEG.h" #include "plJPEG.h"
#include <math.h> #include <cmath>
plProfile_CreateMemCounter("Mipmaps", "Memory", MemMipmaps); 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 "plPerspDirSlave.h"
#include <float.h> #include <cfloat>
#include <math.h> #include <cmath>
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan #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 "plShadowSlave.h"
#include "plTweak.h" #include "plTweak.h"
#include <float.h> #include <cfloat>
#include <math.h> #include <cmath>
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan #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==*/ *==LICENSE==*/
#include "hsKeys.h" #include "hsKeys.h"
#include "hsStream.h" #include "hsStream.h"
#include <math.h> #include <cmath>
const int hsKeyFrame::kMaxFrameNumber = 65535; 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 "plController.h"
#include "hsFastMath.h" #include "hsFastMath.h"
#include "hsResMgr.h" #include "hsResMgr.h"
#include <math.h> #include <cmath>
const float kSmallDelTime = 1.e-2f; const float kSmallDelTime = 1.e-2f;
const float kInvSmallDelTime = 1.f / kSmallDelTime; 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 "HeadSpin.h"
#include "plAvg.h" #include "plAvg.h"
#include <math.h> #include <cmath>
template class TimeBasedAvgRing<float>; template class TimeBasedAvgRing<float>;
template class TimeBasedAvgRing<double>; 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 "HeadSpin.h"
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include <math.h> #include <cmath>
#include "plTriUtils.h" #include "plTriUtils.h"
static const float kAlmostZero = 1.e-5f; 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); float dist = norm.InnerProduct(p0 - p);
return ProjectOntoPlaneAlongVector(norm, dist, vec, p); return ProjectOntoPlaneAlongVector(norm, dist, vec, p);
} }

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

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

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

@ -189,7 +189,7 @@ public:
// tors // tors
plAvSeekMsg(); plAvSeekMsg();
plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek, 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); uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil);
// plasma protocol // plasma protocol
@ -212,7 +212,7 @@ public:
float fDuration; // take this much time to do the move (only if smartSeek is false) float fDuration; // take this much time to do the move (only if smartSeek is false)
bool fSmartSeek; // seek by walking rather than floating bool fSmartSeek; // seek by walking rather than floating
bool fNoSeek; bool fNoSeek;
char *fAnimName; plString fAnimName;
plAvAlignment fAlignType; plAvAlignment fAlignType;
uint8_t fFlags; uint8_t fFlags;
plKey fFinishKey; plKey fFinishKey;
@ -257,7 +257,6 @@ public:
virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr);
// public members // 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 fDrivable; // are we animated by time or by mouse movement?
bool fReversible; // can we play backwards? bool fReversible; // can we play backwards?
plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier 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) 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(); PendingLoadsList::iterator it = fPendingLoads.begin();
while ( it!=fPendingLoads.end() ) while ( it!=fPendingLoads.end() )
@ -1135,8 +1135,8 @@ plString plNetClientMgr::GetPlayerNameById (unsigned playerId) const {
unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const { unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const {
// local case // local case
if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi)) if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi))
NetCommGetPlayer()->playerInt; return NetCommGetPlayer()->playerInt;
unsigned n = TransportMgr().GetNumMembers(); unsigned n = TransportMgr().GetNumMembers();
for (unsigned i = 0; i < n; ++i) for (unsigned i = 0; i < n; ++i)
if (plNetTransportMember * member = TransportMgr().GetMember(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", "Language", plLocalization::GetLanguageName( plLocalization::GetLanguage() ) );
info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi ); info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi );
char buffy[20]; char buffy[20];
sprintf( buffy, "%lu", GetPlayerID() ); sprintf(buffy, "%u", GetPlayerID());
info.AddValue( "Petition", "PlayerID", buffy ); info.AddValue( "Petition", "PlayerID", buffy );
info.AddValue( "Petition", "PlayerName", GetPlayerName() ); 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==*/ *==LICENSE==*/
#include <algorithm> #include <algorithm>
#include <float.h> #include <cfloat>
#include "hsMatrix44.h" #include "hsMatrix44.h"
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include "plNetClientMgr.h" #include "plNetClientMgr.h"

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

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

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

@ -286,14 +286,14 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const
char objName[128]; char objName[128];
int i=0; int i=0;
// copy objName token // copy objName token
while(*c && *c != ',' && *c != ' ' && i<127) while(*c && *c != ',' && *c != ' ' && i<127)
objName[i++] = *c++; objName[i++] = *c++;
objName[i]=0; objName[i]=0;
DebugObjectList::const_iterator it = fDebugObjects.begin(); DebugObjectList::const_iterator it = fDebugObjects.begin();
for( objName[0]; it != fDebugObjects.end(); it++) for(; it != fDebugObjects.end(); it++)
{ {
if ((*it) && (*it)->StringMatches(objName)) 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 ) void plAgeInfoStruct::SetAgeLanguage( uint32_t v )
{ {
if ( v >= 0 ) if (v != static_cast<uint32_t>(-1))
{ {
SetFlag( kHasAgeLanguage ); SetFlag( kHasAgeLanguage );
fAgeLanguage = v; 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 "plNetMessage/plNetMessage.h"
#include "plNetClient/plNetClientMgr.h" #include "plNetClient/plNetClientMgr.h"
#include <algorithm> #include <algorithm>
#include <float.h> #include <cfloat>
plNetTransport::~plNetTransport() plNetTransport::~plNetTransport()
{ {

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

@ -170,7 +170,7 @@ protected:
#define SIM_VERBOSE #define SIM_VERBOSE
#ifdef 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, ...) inline void SimLog(const char *str, ...)
{ {
@ -189,4 +189,4 @@ inline void SimLog(const char *str, ...)
#endif #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 "HeadSpin.h"
#include "hsWindows.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" #include "HeadSpin.h"
class plDemoDebugFile 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 "plFogEnvironment.h"
#include <math.h> #include <cmath>
#include "plTweak.h" #include "plTweak.h"
//// Constructors & Destructor /////////////////////////////////////////////// //// 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 "plVertCoder.h"
#include "hsStream.h" #include "hsStream.h"
#include <math.h> #include <cmath>
#include "plGBufferGroup.h" #include "plGBufferGroup.h"
const float kPosQuantum = 1.f / float(1 << 10); 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 "HeadSpin.h"
#include "plProgressMgr.h" #include "plProgressMgr.h"
#include "hsTimer.h" #include "hsTimer.h"
#include "plPipeline/plPlates.h" #include "plPipeline/plPlates.h"
#include <string.h>
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//// plProgressMgr Functions ///////////////////////////////////////////////// //// 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 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include <float.h> #include <cfloat>
#include "hsStream.h" #include "hsStream.h"
#include "hsTimer.h" #include "hsTimer.h"
#include "plSDL.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==*/ *==LICENSE==*/
#include "plBufferedSocketReader.h" #include "plBufferedSocketReader.h"
#include "plTcpSocket.h" #include "plTcpSocket.h"
#include <string.h> #include <cstring>
plBufferedSocketReader::plBufferedSocketReader(int size) 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 "plEncryptLogLine.h"
#include <string.h>
void plStatusEncrypt::Decrypt( uint8_t *line, int32_t len, uint8_t hint ) void plStatusEncrypt::Decrypt( uint8_t *line, int32_t len, uint8_t hint )
{ {
// Da reverse, of course! // 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 #ifndef plLoggable_inc
#define plLoggable_inc #define plLoggable_inc
#include <stdio.h>
#include "HeadSpin.h" #include "HeadSpin.h"
#include "plString.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 <cstdarg>
#include <stdlib.h> #include <cstdlib>
#include "hsThread.h" #include "hsThread.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "hsTimer.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==*/ *==LICENSE==*/
#include "hsGMaterial.h" #include "hsGMaterial.h"
#include <math.h> #include <cmath>
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsMemory.h" #include "hsMemory.h"
@ -334,4 +334,4 @@ bool hsGMaterial::MsgReceive(plMessage* msg)
return true; return true;
} }
return plSynchedObject::MsgReceive(msg); 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 // See Gems IV, Ken Shoemake
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// //
#include <float.h> // for FLT_EPSILON #include <cfloat> // for FLT_EPSILON
#include <math.h> #include <cmath>
#include "hsEuler.h" #include "hsEuler.h"
#include "hsQuat.h" #include "hsQuat.h"
#include "hsMatrix44.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 // Gems IV. Polar Decomp
// //
#include <math.h> #include <cmath>
#include "mat_decomp.h" #include "mat_decomp.h"
/******* Matrix Preliminaries *******/ /******* 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 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include <float.h> #include <cfloat>
#include "hsTimer.h" #include "hsTimer.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "plClientUnifiedTime.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 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include <float.h> #include <cfloat>
#include <cmath> #include <cmath>
#include <ctime>
#include "plUnifiedTime.h" #include "plUnifiedTime.h"
#include "hsWindows.h" #include "hsWindows.h"
#include "hsStream.h"
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <sys/time.h> #include <sys/time.h>
@ -55,11 +56,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif #endif
#include <time.h>
#include "hsStream.h"
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
// //
// Converts Windows Time to Unified Time // 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 // Standard Library
#include <algorithm> #include <algorithm>
#include <float.h> #include <cfloat>
#include <cmath>
#include <cstring>
#include <functional> #include <functional>
#include <math.h>
#include <memory> #include <memory>
#include <string.h>
#include <vector> #include <vector>
// Core Plasma // Core Plasma

2
Sources/Tools/MaxConvert/StringTokenizer.cpp

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include <string.h> #include <cstring>
#pragma hdrstop #pragma hdrstop
#include "StringTokenizer.h" #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 "hsTemplates.h"
#include "hsWindows.h" #include "hsWindows.h"
#include <commdlg.h> #include <commdlg.h>
#include <cmath>
#include <stdmat.h> #include <stdmat.h>
#include <bmmlib.h> #include <bmmlib.h>
#include <istdplug.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 "hsHashTable.h"
#include "hsStringTokenizer.h" #include "hsStringTokenizer.h"
#include "hsResMgr.h" #include "hsResMgr.h"
#include <math.h> #include <cmath>
#include <max.h> #include <max.h>
#include <stdmat.h> #include <stdmat.h>

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

Loading…
Cancel
Save