Browse Source

Merge pull request #238 from Hoikas/hdr-work

More Header Cleanups
Michael Hansen 12 years ago
parent
commit
3f79d69463
  1. 1
      Sources/Plasma/Apps/plClient/plClient.cpp
  2. 6
      Sources/Plasma/Apps/plClient/winmain.cpp
  3. 1
      Sources/Plasma/Apps/plClientPatcher/Pch.h
  4. 1
      Sources/Plasma/Apps/plPythonPack/main.cpp
  5. 1
      Sources/Plasma/Apps/plUruLauncher/Pch.h
  6. 1
      Sources/Plasma/CoreLib/CMakeLists.txt
  7. 1
      Sources/Plasma/CoreLib/HeadSpin.cpp
  8. 99
      Sources/Plasma/CoreLib/HeadSpin.h
  9. 5
      Sources/Plasma/CoreLib/hsCritSect.h
  10. 1
      Sources/Plasma/CoreLib/hsFiles_Win.cpp
  11. 6
      Sources/Plasma/CoreLib/hsSTLStream.h
  12. 122
      Sources/Plasma/CoreLib/hsStream.cpp
  13. 22
      Sources/Plasma/CoreLib/hsStream.h
  14. 11
      Sources/Plasma/CoreLib/hsThread.h
  15. 16
      Sources/Plasma/CoreLib/hsThread_Win.cpp
  16. 75
      Sources/Plasma/CoreLib/hsWindows.h
  17. 1
      Sources/Plasma/CoreLib/plFileUtils.cpp
  18. 1
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp
  19. 2
      Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp
  20. 1
      Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.cpp
  21. 1
      Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h
  22. 1
      Sources/Plasma/FeatureLib/pfCrashHandler/plCrash_Private.h
  23. 4
      Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt
  24. 10
      Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp
  25. 6
      Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h
  26. 2
      Sources/Plasma/FeatureLib/pfPython/pyAgeVaultGlue.cpp
  27. 18
      Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp
  28. 4
      Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h
  29. 3
      Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp
  30. 5
      Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp
  31. 2
      Sources/Plasma/NucleusLib/inc/plProfileManager.cpp
  32. 4
      Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h
  33. 2
      Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h
  34. 16
      Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h
  35. 1
      Sources/Plasma/NucleusLib/pnNetCommon/plNetAddress.h
  36. 1
      Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp
  37. 5
      Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h
  38. 1
      Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp
  39. 1
      Sources/Plasma/NucleusLib/pnTimer/pnBuildDates.cpp
  40. 8
      Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h
  41. 5
      Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp
  42. 6
      Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h
  43. 1
      Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp
  44. 1
      Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h
  45. 2
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp
  46. 4
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp
  47. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp
  48. 2
      Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp
  49. 5
      Sources/Plasma/PubUtilLib/plFile/plBrowseFolder.h
  50. 1
      Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp
  51. 1
      Sources/Plasma/PubUtilLib/plFile/plSecureStream.h
  52. 2
      Sources/Plasma/PubUtilLib/plGImage/hsCodec.h
  53. 1
      Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp
  54. 2
      Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h
  55. 2
      Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h
  56. 1
      Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp
  57. 10
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp
  58. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp
  59. 2
      Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp
  60. 3
      Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp
  61. 4
      Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h
  62. 3
      Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp
  63. 1
      Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp
  64. 1
      Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp
  65. 2
      Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp
  66. 1
      Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp
  67. 1
      Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp
  68. 2
      Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.cpp
  69. 3
      Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp
  70. 2
      Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp
  71. 7
      Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp
  72. 1
      Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp
  73. 1
      Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp
  74. 6
      Sources/Plasma/PubUtilLib/plSDL/plSDL.h
  75. 4
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp
  76. 1
      Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp
  77. 1
      Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp
  78. 5
      Sources/Plasma/PubUtilLib/plSockets/plNet.h
  79. 2
      Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp
  80. 2
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
  81. 6
      Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp
  82. 3
      Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp
  83. 11
      Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h
  84. 5
      Sources/Tools/MaxComponent/CMakeLists.txt
  85. 23
      Sources/Tools/MaxComponent/Pch.cpp
  86. 124
      Sources/Tools/MaxComponent/Pch.h
  87. 15
      Sources/Tools/MaxComponent/pfGUISkinComp.cpp
  88. 18
      Sources/Tools/MaxComponent/plAGComponents.cpp
  89. 7
      Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp
  90. 3
      Sources/Tools/MaxComponent/plActivatorComponent.cpp
  91. 25
      Sources/Tools/MaxComponent/plAnimCompProc.cpp
  92. 4
      Sources/Tools/MaxComponent/plAnimCompProc.h
  93. 19
      Sources/Tools/MaxComponent/plAnimComponent.cpp
  94. 28
      Sources/Tools/MaxComponent/plAnimComponent.h
  95. 6
      Sources/Tools/MaxComponent/plAnimEventComponent.cpp
  96. 3
      Sources/Tools/MaxComponent/plAnimEventComponent.h
  97. 2
      Sources/Tools/MaxComponent/plAnimObjInterface.h
  98. 33
      Sources/Tools/MaxComponent/plAudioComponents.cpp
  99. 16
      Sources/Tools/MaxComponent/plAudioComponents.h
  100. 12
      Sources/Tools/MaxComponent/plAutoUIBase.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

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

@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#pragma warning(disable: 4284) #pragma warning(disable: 4284)
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "plClient.h" #include "plClient.h"
#include "hsStream.h" #include "hsStream.h"
#include "plResMgr/plResManager.h" #include "plResMgr/plResManager.h"

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

@ -40,9 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "hsWindows.h"
#include <stdio.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
//#define DETACH_EXE // Microsoft trick to force loading of exe to memory //#define DETACH_EXE // Microsoft trick to force loading of exe to memory
#ifdef DETACH_EXE #ifdef DETACH_EXE
@ -51,7 +55,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <curl/curl.h> #include <curl/curl.h>
#include "HeadSpin.h"
#include "hsStream.h" #include "hsStream.h"
#include "plClient.h" #include "plClient.h"
@ -78,7 +81,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "res/resource.h" #include "res/resource.h"
//#include <shellapi.h>
// //
// Defines // Defines
// //

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

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif #endif
#define PLASMA20_SOURCES_PLASMA_APPS_PLCLIENTPATCHER_PCH_H #define PLASMA20_SOURCES_PLASMA_APPS_PLCLIENTPATCHER_PCH_H
#include "hsWindows.h"
#include <process.h> #include <process.h>
#include <time.h> #include <time.h>
#include "pnUtils/pnUtils.h" #include "pnUtils/pnUtils.h"

1
Sources/Plasma/Apps/plPythonPack/main.cpp

@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <algorithm> #include <algorithm>
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
# include "hsWindows.h"
# include <direct.h> # include <direct.h>
# define getcwd _getcwd # define getcwd _getcwd

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

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif #endif
#define PLASMA20_SOURCES_PLASMA_APPS_PLURULAUNCHER_PCH_H #define PLASMA20_SOURCES_PLASMA_APPS_PLURULAUNCHER_PCH_H
#include "hsWindows.h"
#include <process.h> #include <process.h>
#include <time.h> #include <time.h>

1
Sources/Plasma/CoreLib/CMakeLists.txt

@ -83,6 +83,7 @@ set(CoreLib_HEADERS
hsTemplates.h hsTemplates.h
hsThread.h hsThread.h
hsWide.h hsWide.h
hsWindows.h
pcSmallRect.h pcSmallRect.h
plFileUtils.h plFileUtils.h
plGeneric.h plGeneric.h

1
Sources/Plasma/CoreLib/HeadSpin.cpp

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

99
Sources/Plasma/CoreLib/HeadSpin.h

@ -46,6 +46,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# define HS_DEBUGGING # define HS_DEBUGGING
#endif // defined(_DEBUG) || defined(UNIX_DENUG) #endif // defined(_DEBUG) || defined(UNIX_DENUG)
//======================================
// Some standard includes
//======================================
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <stdarg.h>
#include <stdint.h>
//====================================== //======================================
// Winblows Hacks // Winblows Hacks
//====================================== //======================================
@ -61,67 +72,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# pragma warning( disable : 4305 4503 4018 4786 4284 4800) # pragma warning( disable : 4305 4503 4018 4786 4284 4800)
# endif // _MSC_VER # endif // _MSC_VER
// Terrible hacks for MinGW because they don't have a reasonable // Kind of nasty looking forward declarations, but this is Win32.... it'll never change!
// default for the Windows version. We cheat and say it's XP. // If you want to argue: would you rather pull in the entire Windows.h? Windows 8 makes it
# ifdef __MINGW32__ // even more bloated than before!
# undef _WIN32_WINNT struct HWND__; typedef struct HWND__ *HWND;
# define _WIN32_WINNT 0x501 struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE;
# undef _WIN32_IE
# define _WIN32_IE 0x400
# endif
// Windows.h includes winsock.h (winsocks 1), so we need to manually include winsock2
// and tell Windows.h to only bring in modern headers
# include <WinSock2.h>
# include <ws2tcpip.h>
# define WIN32_LEAN_AND_MEAN
# ifndef NOMINMAX
# define NOMINMAX // Needed to prevent NxMath conflicts
# endif
# include <Windows.h>
// This needs to be after #include <windows.h>, since it also includes windows.h
# ifdef USE_VLD
# include <vld.h>
# endif
#endif // HS_BUILD_FOR_WIN32
//======================================
// We don't want the Windows.h min/max!
//======================================
#ifdef max
# undef max
#endif
#ifdef min
# undef min
#endif
//======================================
// Some standard includes
//======================================
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <stdarg.h>
#include <stdint.h>
//======================================
// Just some fun typedefs...
//======================================
#ifdef HS_BUILD_FOR_WIN32
typedef HWND hsWindowHndl; typedef HWND hsWindowHndl;
typedef HINSTANCE hsWindowInst; typedef HINSTANCE hsWindowInst;
typedef HINSTANCE HMODULE;
typedef long HRESULT;
typedef void* HANDLE;
#else #else
typedef int32_t* hsWindowHndl; typedef int32_t* hsWindowHndl;
typedef int32_t* hsWindowInst; typedef int32_t* hsWindowInst;
#endif // HS_BUILD_FOR_WIN32 #endif // HS_BUILD_FOR_WIN32
//====================================== //======================================
// Basic macros // Basic macros
//====================================== //======================================
@ -547,31 +513,16 @@ void DebugMsg(const char fmt[], ...);
/***************************************************************************** /*****************************************************************************
* *
* Atomic Operations * Atomic Operations
* FIXME: Replace with std::atomic when VS2012 supports WinXP
* *
***/ ***/
// *value += increment; return original value of *value; thread safe #ifdef _MSC_VER
inline long AtomicAdd(long* value, long increment) # define AtomicAdd(value, increment) InterlockedExchangeAdd(value, increment)
{ # define AtomicSet(value, set) InterlockedExchange(value, set)
#ifdef HS_BUILD_FOR_WIN32
return InterlockedExchangeAdd(value, increment);
#elif __GNUC__
return __sync_fetch_and_add(value, increment);
#else
# error "No Atomic Set support on this architecture"
#endif
}
// *value = value; return original value of *value; thread safe
inline long AtomicSet(long* value, long set)
{
#ifdef HS_BUILD_FOR_WIN32
return InterlockedExchange(value, set);
#elif __GNUC__ #elif __GNUC__
return __sync_lock_test_and_set(value, set); # define AtomicAdd(value, increment) __sync_fetch_and_add(value, increment)
#else # define AtomicSet(value, set) __sync_lock_test_and_set(value, set)
# error "No Atomic Set support on this architecture"
#endif #endif
}
#endif #endif

5
Sources/Plasma/CoreLib/hsCritSect.h

@ -60,10 +60,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
typedef CRITICAL_SECTION CritSectHandle; # include "hsWindows.h"
typedef CRITICAL_SECTION CritSectHandle;
#elif HS_BUILD_FOR_UNIX #elif HS_BUILD_FOR_UNIX
# include <pthread.h> # include <pthread.h>
typedef pthread_mutex_t CritSectHandle; typedef pthread_mutex_t CritSectHandle;
#else #else
# error "CCritSect: Not implemented on this platform" # error "CCritSect: Not implemented on this platform"
#endif #endif

1
Sources/Plasma/CoreLib/hsFiles_Win.cpp

@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "hsFiles.h" #include "hsFiles.h"
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32

6
Sources/Plasma/CoreLib/hsSTLStream.h

@ -39,6 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#ifndef _hsSTLStream_h_inc_
#define _hsSTLStream_h_inc_
#include "hsStream.h" #include "hsStream.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"
@ -82,3 +86,5 @@ public:
// In case you want to try and be efficient with your memory allocations // In case you want to try and be efficient with your memory allocations
void Reserve(uint32_t bytes) { fVector.reserve(bytes); } void Reserve(uint32_t bytes) { fVector.reserve(bytes); }
}; };
#endif // _hsSTLStream_h_inc_

122
Sources/Plasma/CoreLib/hsStream.cpp

@ -678,128 +678,6 @@ uint32_t hsStream::ReadLEAtom(uint32_t* sizePtr)
return tag; return tag;
} }
//////////////////////////////////////////////////////////////////////////////////
#define kFileStream_Uninitialized ~0
bool hsFileStream::Open(const char *name, const char *mode)
{
hsAssert(0, "hsFileStream::Open NotImplemented");
return false;
}
bool hsFileStream::Open(const wchar_t *name, const wchar_t *mode)
{
hsAssert(0, "hsFileStream::Open NotImplemented");
return false;
}
bool hsFileStream::Close ()
{
hsAssert(0, "hsFileStream::Close NotImplemented");
return false;
}
uint32_t hsFileStream::GetFileRef()
{
return fRef;
}
void hsFileStream::SetFileRef(uint32_t ref)
{
hsAssert(ref != kFileStream_Uninitialized, "bad ref");
fRef = ref;
}
hsFileStream::hsFileStream()
{
fRef = kFileStream_Uninitialized;
}
hsFileStream::~hsFileStream()
{
}
uint32_t hsFileStream::Read(uint32_t bytes, void* buffer)
{
hsAssert(fRef != kFileStream_Uninitialized, "fRef uninitialized");
fBytesRead += bytes;
fPosition += bytes;
#if HS_BUILD_FOR_WIN32
uint32_t rBytes;
ReadFile((HANDLE)fRef, buffer, bytes, (LPDWORD)&rBytes, nil);
if(bytes == rBytes)
return bytes;
else
return 0;
#else
return 0;
#endif
}
uint32_t hsFileStream::Write(uint32_t bytes, const void* buffer)
{
hsAssert(fRef != kFileStream_Uninitialized, "fRef uninitialized");
fBytesRead += bytes;
fPosition += bytes;
#if HS_BUILD_FOR_WIN32
uint32_t wBytes;
WriteFile((HANDLE)fRef, buffer, bytes, (LPDWORD)&wBytes, nil);
if(bytes == wBytes)
return bytes;
else
{
char str[128];
sprintf(str, "hsFileStream::Write failed. err %d", GetLastError());
hsAssert(false, str);
return 0;
}
#else
return 0;
#endif
}
bool hsFileStream::AtEnd()
{
#if HS_BUILD_FOR_WIN32
uint32_t bytes;
PeekNamedPipe((void*)fRef, nil, 0, nil, (LPDWORD)&bytes, nil);
return bytes>0;
#else
hsAssert(0,"No hsStream::AtEnd() implemented for this stream class");
return false;
#endif
}
void hsFileStream::Skip(uint32_t delta)
{
fBytesRead += delta;
fPosition += delta;
#if HS_BUILD_FOR_WIN32
hsDebugMessage("hsFileStream::Skip unimplemented", 0);
#endif
}
void hsFileStream::Rewind()
{
fBytesRead = 0;
fPosition = 0;
#if HS_BUILD_FOR_WIN32
hsDebugMessage("hsFileStream::Rewind unimplemented", 0);
#endif
}
void hsFileStream::Truncate()
{
hsDebugMessage("hsFileStream::Truncate unimplemented", 0);
}
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////

22
Sources/Plasma/CoreLib/hsStream.h

@ -288,28 +288,6 @@ public:
virtual uint32_t GetStreamSize() = 0; virtual uint32_t GetStreamSize() = 0;
}; };
class hsFileStream: public hsStream
{
uint32_t fRef;
public:
hsFileStream();
virtual ~hsFileStream();
virtual bool Open(const char *name, const char *mode = "rb");
virtual bool Open(const wchar_t *name, const wchar_t *mode = L"rb");
virtual bool Close();
virtual bool AtEnd();
virtual uint32_t Read(uint32_t byteCount, void* buffer);
virtual uint32_t Write(uint32_t byteCount, const void* buffer);
virtual void Skip(uint32_t deltaByteCount);
virtual void Rewind();
virtual void Truncate();
virtual uint32_t GetFileRef();
virtual void SetFileRef(uint32_t refNum);
};
class hsUNIXStream: public hsStream class hsUNIXStream: public hsStream
{ {
FILE* fRef; FILE* fRef;

11
Sources/Plasma/CoreLib/hsThread.h

@ -46,7 +46,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
typedef uint32_t hsMilliseconds; typedef uint32_t hsMilliseconds;
#ifdef HS_BUILD_FOR_UNIX #ifdef HS_BUILD_FOR_UNIX
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
@ -63,7 +62,7 @@ class hsThread
{ {
public: public:
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
typedef DWORD ThreadId; typedef uint32_t ThreadId;
#elif HS_BUILD_FOR_UNIX #elif HS_BUILD_FOR_UNIX
typedef pthread_t ThreadId; typedef pthread_t ThreadId;
#endif #endif
@ -87,7 +86,7 @@ public:
virtual ~hsThread(); // calls Stop() virtual ~hsThread(); // calls Stop()
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
ThreadId GetThreadId() { return fThreadId; } ThreadId GetThreadId() { return fThreadId; }
static ThreadId GetMyThreadId() { return GetCurrentThreadId(); } static ThreadId GetMyThreadId();
#elif HS_BUILD_FOR_UNIX #elif HS_BUILD_FOR_UNIX
ThreadId GetThreadId() { return fPThread; } ThreadId GetThreadId() { return fPThread; }
static ThreadId GetMyThreadId() { return pthread_self(); } static ThreadId GetMyThreadId() { return pthread_self(); }
@ -203,13 +202,7 @@ public:
class hsSleep class hsSleep
{ {
public: public:
#if HS_BUILD_FOR_UNIX
static void Sleep(uint32_t millis); static void Sleep(uint32_t millis);
#elif HS_BUILD_FOR_WIN32
static void Sleep(uint32_t millis) { ::Sleep(millis); }
#endif
}; };
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

16
Sources/Plasma/CoreLib/hsThread_Win.cpp

@ -40,9 +40,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include <process.h>
#include "hsThread.h" #include "hsThread.h"
#include "hsWindows.h"
#include <process.h>
#include "hsExceptions.h" #include "hsExceptions.h"
#include "hsMemory.h" #include "hsMemory.h"
@ -79,6 +79,11 @@ hsThread::~hsThread()
this->Stop(); this->Stop();
} }
hsThread::ThreadId hsThread::GetMyThreadId()
{
return GetCurrentThreadId();
}
void hsThread::Start() void hsThread::Start()
{ {
if (fThreadH == nil) if (fThreadH == nil)
@ -238,3 +243,10 @@ void hsEvent::Signal()
{ {
::SetEvent(fEvent); ::SetEvent(fEvent);
} }
///////////////////////////////////////////////////////////////
void hsSleep::Sleep(uint32_t millis)
{
::Sleep(millis);
}

75
Sources/Plasma/CoreLib/hsWindows.h

@ -0,0 +1,75 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef _hsWindows_inc_
#define _hsWindows_inc_
/** \file hsWindows.h
* \brief Pulls in Windows core headers
*
* This file pulls in the core Windows headers and Winsock2. It is separate from
* HeadSpin.h to improve build times and to facillitate adding precompiled headers.
* You should avoid including this header from other headers!
*/
#ifdef HS_BUILD_FOR_WIN32
// Terrible hacks for MinGW because they don't have a reasonable
// default for the Windows version. We cheat and say it's XP.
# ifdef __MINGW32__
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x501
# undef _WIN32_IE
# define _WIN32_IE 0x400
# endif
# define NOMINMAX
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <ws2tcpip.h> // Pulls in WinSock 2 for us
// This needs to be after #include <windows.h>, since it also includes windows.h
# ifdef USE_VLD
# include <vld.h>
# endif // USE_VLD
#endif // HS_BUILD_FOR_WIN32
#endif // _hsWindows_inc_

1
Sources/Plasma/CoreLib/plFileUtils.cpp

@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"
#include "plFileUtils.h" #include "plFileUtils.h"
#include "hsFiles.h" #include "hsFiles.h"

1
Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp

@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
#include "hsWindows.h"
#include <sstream> #include <sstream>

2
Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp

@ -39,6 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "hsWindows.h"
#include "hsTimer.h" #include "hsTimer.h"
#include "pfDispatchLog.h" #include "pfDispatchLog.h"
#include "plStatusLog/plStatusLog.h" #include "plStatusLog/plStatusLog.h"

1
Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.cpp

@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plCrashCli.h" #include "plCrashCli.h"
#include "plCrash_Private.h" #include "plCrash_Private.h"
#include "plString.h"
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32

1
Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _pfCrashCli_h_ #define _pfCrashCli_h_
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "plCrashBase.h" #include "plCrashBase.h"
struct plCrashMemLink; struct plCrashMemLink;

1
Sources/Plasma/FeatureLib/pfCrashHandler/plCrash_Private.h

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _pfCrash_Private_h_ #define _pfCrash_Private_h_
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#define CRASH_NOTIFY_SUFFIX "CrashNotify" #define CRASH_NOTIFY_SUFFIX "CrashNotify"
#define CRASH_HANDLE_SUFFIX "CrashHandled" #define CRASH_HANDLE_SUFFIX "CrashHandled"

4
Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt

@ -19,7 +19,6 @@ set(pfPython_SOURCES
cyParticleSys.cpp cyParticleSys.cpp
cyPhysics.cpp cyPhysics.cpp
cyPythonInterface.cpp cyPythonInterface.cpp
Pch.cpp
plPythonFileMod.cpp plPythonFileMod.cpp
plPythonPack.cpp plPythonPack.cpp
plPythonSDLModifier.cpp plPythonSDLModifier.cpp
@ -105,7 +104,6 @@ set(pfPython_HEADERS
cyParticleSys.h cyParticleSys.h
cyPhysics.h cyPhysics.h
cyPythonInterface.h cyPythonInterface.h
Pch.h
pfPythonCreatable.h pfPythonCreatable.h
plPythonFileMod.h plPythonFileMod.h
plPythonHelpers.h plPythonHelpers.h
@ -340,7 +338,7 @@ set(pfPython_GAMES
${pfPython_VSYNC} ${pfPython_VSYNC}
) )
use_precompiled_header(Pch.h Pch.cpp) use_precompiled_header(Pch.h Pch.cpp pfPython_HEADERS pfPython_SOURCES)
add_library(pfPython STATIC ${pfPython_SOURCES} ${pfPython_HEADERS} ${pfPython_GLUE} ${pfPython_GAME_GLUE} ${pfPython_GAMES}) add_library(pfPython STATIC ${pfPython_SOURCES} ${pfPython_HEADERS} ${pfPython_GLUE} ${pfPython_GAME_GLUE} ${pfPython_GAMES})
source_group("Source Files" FILES ${pfPython_SOURCES}) source_group("Source Files" FILES ${pfPython_SOURCES})

10
Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp

@ -184,18 +184,16 @@ PyObject* pyAgeVault::GetSubAgeLink( const pyAgeInfoStruct & info )
PYTHON_RETURN_NONE; PYTHON_RETURN_NONE;
} }
const char* pyAgeVault::GetAgeGuid( void ) plUUID pyAgeVault::GetAgeGuid( void )
{ {
RelVaultNode * rvn = VaultGetAgeInfoNodeIncRef(); RelVaultNode * rvn = VaultGetAgeInfoNodeIncRef();
if (rvn) { if (rvn) {
VaultAgeInfoNode ageInfo(rvn); VaultAgeInfoNode ageInfo(rvn);
GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid)); plUUID uuid = plUUID(ageInfo.ageInstUuid);
rvn->DecRef(); rvn->DecRef();
return uuid;
} }
else { return plUUID();
fAgeGuid[0] = 0;
}
return fAgeGuid;
} }

6
Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h

@ -64,12 +64,10 @@ class pyAgeInfoStruct;
class pyVaultChronicleNode; class pyVaultChronicleNode;
class pySDLStateDataRecord; class pySDLStateDataRecord;
class pyVaultTextNoteNode; class pyVaultTextNoteNode;
class plUUID;
class pyAgeVault class pyAgeVault
{ {
private:
mutable char fAgeGuid[MAX_PATH]; // for getting Age GUID
protected: protected:
pyAgeVault(); pyAgeVault();
@ -84,7 +82,7 @@ public:
static void AddPlasmaClasses(PyObject *m); static void AddPlasmaClasses(PyObject *m);
const char* GetAgeGuid( void ); plUUID GetAgeGuid( void );
PyObject * GetAgeSDL() const; // returns pySDLStateDataRecord PyObject * GetAgeSDL() const; // returns pySDLStateDataRecord
void UpdateAgeSDL( pySDLStateDataRecord & pyrec ); void UpdateAgeSDL( pySDLStateDataRecord & pyrec );

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

@ -117,7 +117,7 @@ PYTHON_METHOD_DEFINITION(ptAgeVault, getSubAgeLink, args)
PYTHON_METHOD_DEFINITION_NOARGS(ptAgeVault, getAgeGuid) PYTHON_METHOD_DEFINITION_NOARGS(ptAgeVault, getAgeGuid)
{ {
return PyString_FromString(self->fThis->GetAgeGuid()); return PyString_FromString(self->fThis->GetAgeGuid().AsString().c_str());
} }
PYTHON_METHOD_DEFINITION(ptAgeVault, addDevice, args) PYTHON_METHOD_DEFINITION(ptAgeVault, addDevice, args)

18
Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop #pragma hdrstop
#include "pyDniInfoSource.h" #include "pyDniInfoSource.h"
#include "pnUtils/pnUtils.h" #include "pnUUID/pnUUID.h"
#include "plUnifiedTime/plUnifiedTime.h" #include "plUnifiedTime/plUnifiedTime.h"
#include "plVault/plAgeInfoSource.h" #include "plVault/plAgeInfoSource.h"
#include "plVault/plVault.h" #include "plVault/plVault.h"
@ -100,16 +100,16 @@ const char * pyDniInfoSource::GetAgeName( void ) const
return fAgeName; return fAgeName;
} }
const char * pyDniInfoSource::GetAgeGuid( void ) const plUUID pyDniInfoSource::GetAgeGuid( void ) const
{ {
RelVaultNode * node = VaultGetAgeInfoNodeIncRef(); if (RelVaultNode * node = VaultGetAgeInfoNodeIncRef())
if (!node) {
return "";
VaultAgeInfoNode ageInfo(node); VaultAgeInfoNode ageInfo(node);
plUUID uuid = plUUID(ageInfo.ageInstUuid);
GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid));
node->DecRef(); node->DecRef();
return fAgeGuid; return uuid;
}
return plUUID();
} }

4
Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h

@ -46,12 +46,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGlueHelpers.h" #include "pyGlueHelpers.h"
class pyDniCoordinates; class pyDniCoordinates;
class plUUID;
class pyDniInfoSource class pyDniInfoSource
{ {
private: private:
mutable char * fAgeName; mutable char * fAgeName;
mutable char fAgeGuid[MAX_PATH];
protected: protected:
pyDniInfoSource(); pyDniInfoSource();
@ -74,7 +74,7 @@ public:
// name of current age // name of current age
const char * GetAgeName( void ) const; const char * GetAgeName( void ) const;
// unique identifier for this age instance // unique identifier for this age instance
const char * GetAgeGuid( void ) const; plUUID GetAgeGuid( void ) const;
}; };

3
Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop #pragma hdrstop
#include "pyDniInfoSource.h" #include "pyDniInfoSource.h"
#include "pnUUID/pnUUID.h"
// glue functions // glue functions
PYTHON_CLASS_DEFINITION(ptDniInfoSource, pyDniInfoSource); PYTHON_CLASS_DEFINITION(ptDniInfoSource, pyDniInfoSource);
@ -73,7 +74,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeName)
PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeGuid) PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeGuid)
{ {
return PyString_FromString(self->fThis->GetAgeGuid()); return PyString_FromString(self->fThis->GetAgeGuid().AsString().c_str());
} }
PYTHON_START_METHODS_TABLE(ptDniInfoSource) PYTHON_START_METHODS_TABLE(ptDniInfoSource)

5
Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp

@ -40,10 +40,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include "vfw.h" # include "hsWindows.h"
# include <vfw.h>
#endif // HS_BUILD_FOR_WIN32 #endif // HS_BUILD_FOR_WIN32
#include "plLayerAVI.h" #include "plLayerAVI.h"

2
Sources/Plasma/NucleusLib/inc/plProfileManager.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plProfileManager.h" #include "plProfileManager.h"
#include "plProfile.h" #include "plProfile.h"
#include "hsTimer.h" #include "hsTimer.h"
#include "hsWindows.h"
static uint32_t gCyclesPerMS = 0; static uint32_t gCyclesPerMS = 0;

4
Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h

@ -42,10 +42,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plKeyDef_inc #ifndef plKeyDef_inc
#define plKeyDef_inc #define plKeyDef_inc
#include "HeadSpin.h"
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include "hsWindows.h" // FIXME: This gives me a sad.
#define VK_BACK_QUOTE 0xc0 #define VK_BACK_QUOTE 0xc0
// MinGW is missing these definitions: // MinGW is missing these definitions:
#ifndef VK_OEM_PLUS #ifndef VK_OEM_PLUS

2
Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h

@ -53,6 +53,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// for Win32: // for Win32:
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
#include "hsWindows.h" // FIXME: This gives me a sad
enum plOSMsg enum plOSMsg
{ {
KEYDOWN = WM_KEYDOWN, KEYDOWN = WM_KEYDOWN,

16
Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h

@ -116,9 +116,19 @@ protected:
plMessage *fMsg; plMessage *fMsg;
public: public:
plMessage *GetMessage() { return fMsg; } plMessage* GetMessageNoRef() const { return fMsg; }
void SetMessage(plMessage *msg) { fMsg = msg; hsRefCnt_SafeRef(msg); } void SetMessageRef(plMessage *msg)
void SendMessage() { fMsg->SendAndKeep(); } {
hsRefCnt_SafeUnRef(fMsg);
hsRefCnt_SafeRef(msg);
fMsg = msg;
}
void SendMessageAndKeep()
{
if (fMsg)
fMsg->SendAndKeep();
}
plEventCallbackInterceptMsg() : plEventCallbackMsg(), fMsg(nil) {} plEventCallbackInterceptMsg() : plEventCallbackMsg(), fMsg(nil) {}
~plEventCallbackInterceptMsg() { hsRefCnt_SafeUnRef(fMsg); fMsg = nil; } ~plEventCallbackInterceptMsg() { hsRefCnt_SafeUnRef(fMsg); fMsg = nil; }

1
Sources/Plasma/NucleusLib/pnNetCommon/plNetAddress.h

@ -45,6 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plNetAddress_h_inc #define plNetAddress_h_inc
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h" // FIXME
#include "plString.h" #include "plString.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"

1
Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp

@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "pnNetCommon.h" #include "pnNetCommon.h"
#include "hsWindows.h"
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
# include <sys/socket.h> # include <sys/socket.h>

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

@ -42,13 +42,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef pnNetCommon_h_inc #ifndef pnNetCommon_h_inc
#define pnNetCommon_h_inc #define pnNetCommon_h_inc
#include "HeadSpin.h"
#include "plString.h"
#include "hsStlUtils.h"
#include "hsRefCnt.h" #include "hsRefCnt.h"
#include "hsStream.h" #include "hsStream.h"
#include "pnFactory/plCreatable.h" #include "pnFactory/plCreatable.h"
class plString;
// //
// main logging switch // main logging switch
// //

1
Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp

@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "hsTimer.h" #include "hsTimer.h"
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "plTweak.h" #include "plTweak.h"

1
Sources/Plasma/NucleusLib/pnTimer/pnBuildDates.cpp

@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "pnTimer/pnBuildDates.h" #include "pnTimer/pnBuildDates.h"
char pnBuildDates::fBuildDate[ 128 ] = __DATE__; char pnBuildDates::fBuildDate[ 128 ] = __DATE__;

8
Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h

@ -52,6 +52,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtArray.h" #include "pnUtArray.h"
#include <wchar.h> #include <wchar.h>
// Got Damn eap...
// Duplicate Symbols in shlwapi!
#ifdef _INC_SHLWAPI
# undef StrChr
# undef StrDup
# undef StrStr
#endif // _INC_SHLWAPI
/***************************************************************************** /*****************************************************************************
* *
* String functions * String functions

5
Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp

@ -47,10 +47,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "hsThread.h" #include "hsThread.h"
#ifndef EAX_SDK_AVAILABLE #ifndef EAX_SDK_AVAILABLE
#include "plEAXStructures.h" # include "plEAXStructures.h"
#endif #endif
#include "plEAXEffects.h" #include "plEAXEffects.h"
#include "plAudioCore/plAudioCore.h" #include "plAudioCore/plAudioCore.h"
#include "plDSoundBuffer.h" #include "plDSoundBuffer.h"

6
Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h

@ -65,8 +65,10 @@ typedef struct _EAXREVERBPROPERTIES EAXREVERBPROPERTIES;
#include "plEAXStructures.h" #include "plEAXStructures.h"
#endif #endif
#if !HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#define GUID char* typedef struct _GUID GUID;
#else
typedef char* GUID;
#endif #endif
class plEAXListener class plEAXListener

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

@ -57,6 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include "hsWindows.h"
#include <mmsystem.h> #include <mmsystem.h>

1
Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h

@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"
#include "hsWindows.h" // FIXME
#include <mmsystem.h> #include <mmsystem.h>
#include "plAudioFileReader.h" #include "plAudioFileReader.h"

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

@ -109,7 +109,7 @@ bool plArmatureEffectsMgr::MsgReceive(plMessage* msg)
if (iMsg) if (iMsg)
{ {
if (fEnabled) if (fEnabled)
iMsg->SendMessage(); iMsg->SendMessageAndKeep();
} }
plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg); plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg);

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

@ -2433,7 +2433,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
iMsg->AddReceiver(fEffects->GetKey()); iMsg->AddReceiver(fEffects->GetKey());
iMsg->fEventTime = time; iMsg->fEventTime = time;
iMsg->fEvent = kTime; iMsg->fEvent = kTime;
iMsg->SetMessage(msg); iMsg->SetMessageRef(msg);
atc->AddCallback(iMsg); atc->AddCallback(iMsg);
hsRefCnt_SafeUnRef(msg); hsRefCnt_SafeUnRef(msg);
hsRefCnt_SafeUnRef(iMsg); hsRefCnt_SafeUnRef(iMsg);
@ -2445,7 +2445,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
iMsg->AddReceiver(fEffects->GetKey()); iMsg->AddReceiver(fEffects->GetKey());
iMsg->fEventTime = time; iMsg->fEventTime = time;
iMsg->fEvent = kTime; iMsg->fEvent = kTime;
iMsg->SetMessage(foot); iMsg->SetMessageRef(foot);
atc->AddCallback(iMsg); atc->AddCallback(iMsg);
hsRefCnt_SafeUnRef(foot); hsRefCnt_SafeUnRef(foot);
hsRefCnt_SafeUnRef(iMsg); hsRefCnt_SafeUnRef(iMsg);

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

@ -274,7 +274,7 @@ bool plAvBrainSwim::Apply(double time, float elapsed)
iMsg->AddReceiver(fAvMod->GetArmatureEffects()->GetKey()); iMsg->AddReceiver(fAvMod->GetArmatureEffects()->GetKey());
iMsg->fEventTime = (float)time; iMsg->fEventTime = (float)time;
iMsg->fEvent = kTime; iMsg->fEvent = kTime;
iMsg->SetMessage(msg); iMsg->SetMessageRef(msg);
iMsg->Send(); iMsg->Send();
} }
} }

2
Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp

@ -40,8 +40,8 @@ Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plClipboard.h" #include "plClipboard.h"
#include "hsWindows.h"
plClipboard& plClipboard::GetInstance() plClipboard& plClipboard::GetInstance()
{ {

5
Sources/Plasma/PubUtilLib/plFile/plBrowseFolder.h

@ -42,10 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plBrowseFolder_h_inc #ifndef plBrowseFolder_h_inc
#define plBrowseFolder_h_inc #define plBrowseFolder_h_inc
#include "HeadSpin.h"
#ifdef HS_BUILD_FOR_WIN32 #ifdef HS_BUILD_FOR_WIN32
#include "HeadSpin.h"
#include "hsWindows.h"
// //
// Gets a directory using the "Browse for Folder" dialog. // Gets a directory using the "Browse for Folder" dialog.
// //

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

@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "plSecureStream.h" #include "plSecureStream.h"
#include "hsWindows.h"
#include "plFileUtils.h" #include "plFileUtils.h"
#include "hsSTLStream.h" #include "hsSTLStream.h"

1
Sources/Plasma/PubUtilLib/plFile/plSecureStream.h

@ -46,6 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsStream.h" #include "hsStream.h"
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
typedef void* HANDLE;
# define hsFD HANDLE # define hsFD HANDLE
#else #else
# define hsFD FILE* # define hsFD FILE*

2
Sources/Plasma/PubUtilLib/plGImage/hsCodec.h

@ -42,6 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef hsCodec_inc #ifndef hsCodec_inc
#define hsCodec_inc #define hsCodec_inc
#include "HeadSpin.h"
class plMipmap; class plMipmap;
class hsCodec class hsCodec

1
Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp

@ -46,6 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include "hsWindows.h"
#include <vfw.h> #include <vfw.h>
#endif #endif

2
Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h

@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plDynSurfaceWriter_h #define _plDynSurfaceWriter_h
#include "hsColorRGBA.h" #include "hsColorRGBA.h"
// EVIL #include "hsWindows.h" // FIXME: windows :(
struct hsMatrix44; struct hsMatrix44;

2
Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h

@ -63,8 +63,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsColorRGBA.h" #include "hsColorRGBA.h"
// EVIL
#include "hsTemplates.h" #include "hsTemplates.h"
#include "hsWindows.h" // FIXME: Windows header level include :(
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32

1
Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp

@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
// plInputManager.cpp // plInputManager.cpp
#define DIRECTINPUT_VERSION 0x0800 #define DIRECTINPUT_VERSION 0x0800
#include <dinput.h> #include <dinput.h>

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

@ -322,7 +322,7 @@ void plNetClientMgr::IDumpOSVersionInfo() const
int plNetClientMgr::Init() int plNetClientMgr::Init()
{ {
int ret=hsOK; int ret=hsOK;
hsLogEntry( DebugMsg("*** plNetClientMgr::Init GMT:%s", plUnifiedTime::GetCurrentTime().Print()) ); hsLogEntry( DebugMsg("*** plNetClientMgr::Init GMT:%s", plUnifiedTime::GetCurrent().Print()) );
IDumpOSVersionInfo(); IDumpOSVersionInfo();
@ -496,7 +496,7 @@ void plNetClientMgr::UpdateServerTimeOffset(plNetMessage* msg)
const plUnifiedTime& msgSentUT = msg->GetTimeSent(); const plUnifiedTime& msgSentUT = msg->GetTimeSent();
if (!msgSentUT.AtEpoch()) if (!msgSentUT.AtEpoch())
{ {
double diff = plUnifiedTime::GetTimeDifference(msgSentUT, plClientUnifiedTime::GetCurrentTime()); double diff = plUnifiedTime::GetTimeDifference(msgSentUT, plUnifiedTime::GetCurrent());
if (fServerTimeOffset == 0) if (fServerTimeOffset == 0)
{ {
@ -526,13 +526,13 @@ void plNetClientMgr::ResetServerTimeOffset(bool delayed)
plUnifiedTime plNetClientMgr::GetServerTime() const plUnifiedTime plNetClientMgr::GetServerTime() const
{ {
if ( fServerTimeOffset==0 ) // offline mode or before connecting/calibrating to a server if ( fServerTimeOffset==0 ) // offline mode or before connecting/calibrating to a server
return plUnifiedTime::GetCurrentTime(); return plUnifiedTime::GetCurrent();
plUnifiedTime serverUT; plUnifiedTime serverUT;
if (fServerTimeOffset<0) if (fServerTimeOffset<0)
return plUnifiedTime::GetCurrentTime() - plUnifiedTime(fabs(fServerTimeOffset)); return plUnifiedTime::GetCurrent() - plUnifiedTime(fabs(fServerTimeOffset));
else else
return plUnifiedTime::GetCurrentTime() + plUnifiedTime(fServerTimeOffset); return plUnifiedTime::GetCurrent() + plUnifiedTime(fServerTimeOffset);
} }
// //

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

@ -424,7 +424,7 @@ int plNetClientMgr::SendMsg(plNetMessage* msg)
msg->SetBit(plNetMessage::kEchoBackToSender, true); msg->SetBit(plNetMessage::kEchoBackToSender, true);
} }
msg->SetTimeSent(plUnifiedTime::GetCurrentTime()); msg->SetTimeSent(plUnifiedTime::GetCurrent());
int channel = IPrepMsg(msg); int channel = IPrepMsg(msg);
// hsLogEntry( DebugMsg( "<SND> %s %s", msg->ClassName(), msg->AsStdString().c_str()) ); // hsLogEntry( DebugMsg( "<SND> %s %s", msg->ClassName(), msg->AsStdString().c_str()) );

2
Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp

@ -308,7 +308,7 @@ bool plSimulationMgr::InitSimulation()
if ( !plPXConvert::Validate() ) if ( !plPXConvert::Validate() )
{ {
#ifndef PLASMA_EXTERNAL_RELEASE #ifndef PLASMA_EXTERNAL_RELEASE
hsMessageBox("Ageia's PhysX or Plasma offsets have changed, need to rewrite conversion code.","PhysX Error",MB_OK); hsMessageBox("Ageia's PhysX or Plasma offsets have changed, need to rewrite conversion code.","PhysX Error",hsMBoxOk);
#endif #endif
return false; // client will handle this and ask user to install return false; // client will handle this and ask user to install
} }

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

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//#define DYNAHEADER_CREATE_STORAGE //#define DYNAHEADER_CREATE_STORAGE
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include <time.h> #include <time.h>
@ -1491,7 +1492,7 @@ void hsG3DDeviceSelector::IFudgeDirectXDevice( hsG3DDeviceRecord &record,
D3DEnum_DeviceInfo *deviceInfo ) D3DEnum_DeviceInfo *deviceInfo )
{ {
char desc[ 512 ]; // Can't rely on D3D constant, since that's in another file now char desc[ 512 ]; // Can't rely on D3D constant, since that's in another file now
DWORD vendorID, deviceID; uint32_t vendorID, deviceID;
char *szDriver, *szDesc; char *szDriver, *szDesc;

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

@ -396,10 +396,10 @@ protected:
uint32_t IAdjustDirectXMemory( uint32_t cardMem ); uint32_t IAdjustDirectXMemory( uint32_t cardMem );
bool IGetD3DCardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, bool IGetD3DCardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo,
DWORD *vendorID, DWORD *deviceID, char **driverString, char **descString ); uint32_t *vendorID, uint32_t *deviceID, char **driverString, char **descString );
#ifdef HS_SELECT_DX7 #ifdef HS_SELECT_DX7
bool IGetD3D7CardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, bool IGetD3D7CardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo,
DWORD *vendorID, DWORD *deviceID, char **driverString, char **descString ); uint32_t *vendorID, uint32_t *deviceID, char **driverString, char **descString );
#endif // HS_SELECT_DX7 #endif // HS_SELECT_DX7
void ITryOpenGL( hsWinRef winRef ); void ITryOpenGL( hsWinRef winRef );

3
Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp

@ -39,7 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "hsWindows.h"
#include <ddraw.h> #include <ddraw.h>

1
Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp

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

1
Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp

@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include <d3d9.h> #include <d3d9.h>
#include <ddraw.h> #include <ddraw.h>

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

@ -652,7 +652,7 @@ short hsGDirect3DTnLEnumerate::IGetDXBitDepth( D3DFORMAT format )
bool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, // In bool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, // In
void *driverInfo, void *driverInfo,
void *deviceInfo, void *deviceInfo,
DWORD *vendorID, DWORD *deviceID, // Out uint32_t *vendorID, uint32_t *deviceID, // Out
char **driverString, char **descString ) char **driverString, char **descString )
{ {
D3DEnum_DriverInfo *driverD3DInfo = (D3DEnum_DriverInfo *)driverInfo; D3DEnum_DriverInfo *driverD3DInfo = (D3DEnum_DriverInfo *)driverInfo;

1
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include <d3d9.h> #include <d3d9.h>
#include <ddraw.h> #include <ddraw.h>

1
Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp

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

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

@ -51,13 +51,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include <d3d9.h> #include <d3d9.h>
#include <ddraw.h> #include <ddraw.h>
#include <d3dx9mesh.h> #include <d3dx9mesh.h>
#include "hsWinRef.h" #include "hsWinRef.h"
#include "HeadSpin.h"
#include "plDXTextFont.h" #include "plDXTextFont.h"
#include "plDXPipeline.h" #include "plDXPipeline.h"

3
Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp

@ -40,12 +40,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include <D3d9.h> #include <D3d9.h>
#include <D3dx9core.h> #include <D3dx9core.h>
#include "HeadSpin.h"
#include "plDXVertexShader.h" #include "plDXVertexShader.h"
#include "plSurface/plShader.h" #include "plSurface/plShader.h"

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

@ -353,7 +353,7 @@ uint8_t plGBufferGroup::ICalcVertexSize( uint8_t &liteStride )
} }
liteStride = size; liteStride = size;
size += sizeof( DWORD ) * 2; // diffuse + specular size += sizeof( uint32_t ) * 2; // diffuse + specular
return size; return size;
} }

7
Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp

@ -63,13 +63,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plClientResMgr/plClientResMgr.h" #include "plClientResMgr/plClientResMgr.h"
// A bit of a hack so that we will have the correct instance in the SceneViewer
static HINSTANCE gHInstance = GetModuleHandle(nil);
void SetHInstance(void *instance)
{
gHInstance = (HINSTANCE)instance;
}
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//// plPlate Functions /////////////////////////////////////////////////////// //// plPlate Functions ///////////////////////////////////////////////////////

1
Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp

@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "plTextFont.h" #include "plTextFont.h"
#include "plDebugText.h" #include "plDebugText.h"

1
Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp

@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h"
#include "hsMatrix44.h" #include "hsMatrix44.h"
#include "pnKeyedObject/hsKeyedObject.h" #include "pnKeyedObject/hsKeyedObject.h"
#include "plTextGenerator.h" #include "plTextGenerator.h"

6
Sources/Plasma/PubUtilLib/plSDL/plSDL.h

@ -154,7 +154,7 @@ public:
void SetDirty(bool d) { if (d) fFlags |= kDirty; else fFlags &= ~kDirty; } void SetDirty(bool d) { if (d) fFlags |= kDirty; else fFlags &= ~kDirty; }
void SetUsed(bool d) { if (d) fFlags |= kUsed; else fFlags &= ~kUsed; } void SetUsed(bool d) { if (d) fFlags |= kUsed; else fFlags &= ~kUsed; }
virtual void SetFromDefaults(bool timeStampNow) = 0; virtual void SetFromDefaults(bool timeStampNow) = 0;
virtual void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrentTime() ) = 0; virtual void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrent() ) = 0;
virtual const plUnifiedTime& GetTimeStamp() const = 0; virtual const plUnifiedTime& GetTimeStamp() const = 0;
plStateVarNotificationInfo& GetNotificationInfo() { return fNotificationInfo; } plStateVarNotificationInfo& GetNotificationInfo() { return fNotificationInfo; }
@ -263,7 +263,7 @@ public:
plSDStateVariable* GetAsSDStateVar() { return nil; } plSDStateVariable* GetAsSDStateVar() { return nil; }
bool operator==(const plSimpleStateVariable &other) const; // assumes matching var descriptors bool operator==(const plSimpleStateVariable &other) const; // assumes matching var descriptors
void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrentTime() ); void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrent() );
void CopyFrom(plVarDescriptor* v); void CopyFrom(plVarDescriptor* v);
void CopyData(const plSimpleStateVariable* other, uint32_t writeOptions=0); void CopyData(const plSimpleStateVariable* other, uint32_t writeOptions=0);
bool SetFromString(const plString& value, int idx, bool timeStampNow); // set value from string, type. return false on err bool SetFromString(const plString& value, int idx, bool timeStampNow); // set value from string, type. return false on err
@ -355,7 +355,7 @@ public:
void AddStateDataRecord(plStateDataRecord *sdr) { fDataRecList.push_back(sdr); SetDirty(true); SetUsed(true); } void AddStateDataRecord(plStateDataRecord *sdr) { fDataRecList.push_back(sdr); SetDirty(true); SetUsed(true); }
void InsertStateDataRecord(plStateDataRecord *sdr, int i) { fDataRecList[i] = sdr; SetDirty(true); SetUsed(true);} void InsertStateDataRecord(plStateDataRecord *sdr, int i) { fDataRecList[i] = sdr; SetDirty(true); SetUsed(true);}
void SetFromDefaults(bool timeStampNow); void SetFromDefaults(bool timeStampNow);
void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrentTime() ); void TimeStamp( const plUnifiedTime & ut=plUnifiedTime::GetCurrent() );
const plUnifiedTime& GetTimeStamp() const { static plUnifiedTime foo; return foo; } const plUnifiedTime& GetTimeStamp() const { static plUnifiedTime foo; return foo; }
void Alloc(int cnt=-1 /* -1 means don't change count */); // wipe and re-create void Alloc(int cnt=-1 /* -1 means don't change count */); // wipe and re-create

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

@ -318,7 +318,7 @@ void plSimpleStateVariable::CopyFrom(plVarDescriptor* v)
} }
} }
void plSimpleStateVariable::TimeStamp( const plUnifiedTime & ut/*=plUnifiedTime::GetCurrentTime()*/ ) void plSimpleStateVariable::TimeStamp( const plUnifiedTime & ut/*=plUnifiedTime::GetCurrent()*/ )
{ {
fTimeStamp = ut; fTimeStamp = ut;
} }
@ -2745,7 +2745,7 @@ void plSDStateVariable::SetFromDefaults(bool timeStampNow)
GetStateDataRecord(i)->SetFromDefaults(timeStampNow); GetStateDataRecord(i)->SetFromDefaults(timeStampNow);
} }
void plSDStateVariable::TimeStamp( const plUnifiedTime & ut/*=plUnifiedTime::GetCurrentTime()*/ ) void plSDStateVariable::TimeStamp( const plUnifiedTime & ut/*=plUnifiedTime::GetCurrent()*/ )
{ {
hsAssert( false, "not impl" ); hsAssert( false, "not impl" );
} }

1
Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp

@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plBufferedSocketWriter.h" #include "plBufferedSocketWriter.h"
#include "plTcpSocket.h" #include "plTcpSocket.h"

1
Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp

@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plFdSet.h" #include "plFdSet.h"
#include "plSocket.h" #include "plSocket.h"

5
Sources/Plasma/PubUtilLib/plSockets/plNet.h

@ -43,13 +43,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plNet_h_inc #define plNet_h_inc
#include "HeadSpin.h"
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Windows net types // Windows net types
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
#include "hsWindows.h"
const int kBlockingError = WSAEWOULDBLOCK; const int kBlockingError = WSAEWOULDBLOCK;
const int kTimeoutError = WSAETIMEDOUT; const int kTimeoutError = WSAETIMEDOUT;
const SOCKET kBadSocket = 0xffffffff; const SOCKET kBadSocket = 0xffffffff;

2
Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp

@ -436,7 +436,7 @@ const wchar_t* plProfileManagerFull::GetProfilePath()
{ {
initialized = true; initialized = true;
plUnifiedTime curTime = plUnifiedTime::GetCurrentTime(plUnifiedTime::kLocal); plUnifiedTime curTime = plUnifiedTime::GetCurrent(plUnifiedTime::kLocal);
PathGetUserDirectory(profilePath, arrsize(profilePath)); PathGetUserDirectory(profilePath, arrsize(profilePath));
PathAddFilename(profilePath, profilePath, L"Profile", arrsize(profilePath)); PathAddFilename(profilePath, profilePath, L"Profile", arrsize(profilePath));

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

@ -812,7 +812,7 @@ bool plStatusLog::IPrintLineToFile( const char *line, uint32_t count )
} }
if ( fFlags & kTimestampGMT ) if ( fFlags & kTimestampGMT )
{ {
snprintf(work, arrsize(work), "(%s) ", plUnifiedTime::GetCurrentTime().Format("%m/%d %H:%M:%S UTC").c_str()); snprintf(work, arrsize(work), "(%s) ", plUnifiedTime::GetCurrent().Format("%m/%d %H:%M:%S UTC").c_str());
strncat(buf, work, arrsize(work)); strncat(buf, work, arrsize(work));
} }
if ( fFlags & kTimeInSeconds ) if ( fFlags & kTimeInSeconds )

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

@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif #endif
// static // static
plUnifiedTime plClientUnifiedTime::fFrameStartTime = plUnifiedTime::GetCurrentTime(); // the 'current time' at the start of each time plUnifiedTime plClientUnifiedTime::fFrameStartTime = plUnifiedTime::GetCurrent(); // the 'current time' at the start of each time
double plClientUnifiedTime::fSysTimeOffset = 0.0; double plClientUnifiedTime::fSysTimeOffset = 0.0;
// //
@ -78,7 +78,7 @@ void plClientUnifiedTime::SetFromGameTime(double gameTime, double curGameSecs)
extern bool gMooseDump; extern bool gMooseDump;
if (gMooseDump) if (gMooseDump)
{ {
plUnifiedTime ct = plUnifiedTime::GetCurrentTime(); plUnifiedTime ct = plUnifiedTime::GetCurrent();
plUnifiedTime ft = GetFrameStartTime(); plUnifiedTime ft = GetFrameStartTime();
plNetObjectDebugger::GetInstance()->LogMsg(hsTempStringF("SFGT: CT=%s\n", ct.PrintWMillis())); plNetObjectDebugger::GetInstance()->LogMsg(hsTempStringF("SFGT: CT=%s\n", ct.PrintWMillis()));
@ -102,7 +102,7 @@ void plClientUnifiedTime::ConvertToGameTime(double* gameTimeOut, double curGameS
extern bool gMooseDump; extern bool gMooseDump;
if (gMooseDump) if (gMooseDump)
{ {
plUnifiedTime ct = plUnifiedTime::GetCurrentTime(); plUnifiedTime ct = plUnifiedTime::GetCurrent();
plUnifiedTime ft = GetFrameStartTime(); plUnifiedTime ft = GetFrameStartTime();
plNetObjectDebugger::GetInstance()->LogMsg( hsTempStringF("CTGT: this=%s\n", PrintWMillis())); plNetObjectDebugger::GetInstance()->LogMsg( hsTempStringF("CTGT: this=%s\n", PrintWMillis()));

3
Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <cmath> #include <cmath>
#include "plUnifiedTime.h" #include "plUnifiedTime.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"
#include "hsWindows.h"
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
@ -193,7 +194,7 @@ plUnifiedTime::plUnifiedTime(const plUnifiedTime * src)
*this = *src; *this = *src;
} }
plUnifiedTime plUnifiedTime::GetCurrentTime(Mode mode) plUnifiedTime plUnifiedTime::GetCurrent(Mode mode)
{ {
plUnifiedTime t; plUnifiedTime t;
t.SetMode(mode); t.SetMode(mode);

11
Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h

@ -39,14 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#ifndef _PL_UNIFIEDTIME_INC_ #ifndef _PL_UNIFIEDTIME_INC_
#define _PL_UNIFIEDTIME_INC_ #define _PL_UNIFIEDTIME_INC_
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsStlUtils.h" #include <string>
#if HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32
typedef struct _FILETIME FILETIME;
#endif #endif
// //
@ -58,10 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
struct timeval; struct timeval;
class hsStream; class hsStream;
#ifdef GetCurrentTime
#undef GetCurrentTime
#endif
enum plUnifiedTime_CtorNow { kNow }; enum plUnifiedTime_CtorNow { kNow };
@ -97,7 +94,7 @@ public:
plUnifiedTime(int mode, const char * buf, const char * fmt); plUnifiedTime(int mode, const char * buf, const char * fmt);
plUnifiedTime(const plUnifiedTime & src); plUnifiedTime(const plUnifiedTime & src);
plUnifiedTime(const plUnifiedTime * src); plUnifiedTime(const plUnifiedTime * src);
static plUnifiedTime GetCurrentTime(Mode mode=kGmt); static plUnifiedTime GetCurrent(Mode mode=kGmt);
// assignment // assignment
const plUnifiedTime & operator=(const plUnifiedTime & src); const plUnifiedTime & operator=(const plUnifiedTime & src);

5
Sources/Tools/MaxComponent/CMakeLists.txt

@ -52,7 +52,6 @@ set(MaxComponent_HEADERS
plGrassComponent.h plGrassComponent.h
plGUICompClassIDs.h plGUICompClassIDs.h
plGUIComponents.h plGUIComponents.h
plImpactGadgetComponent.h
plInventoryObjComponent.h plInventoryObjComponent.h
plLightGrpComponent.h plLightGrpComponent.h
plLightMapComponent.h plLightMapComponent.h
@ -109,7 +108,6 @@ set(MaxComponent_SOURCES
plAnimCompProc.cpp plAnimCompProc.cpp
plAnimEventComponent.cpp plAnimEventComponent.cpp
plAudioComponents.cpp plAudioComponents.cpp
plAutoComponent.cpp
plAutoUIBase.cpp plAutoUIBase.cpp
plAutoUIBlock.cpp plAutoUIBlock.cpp
plAutoUIComp.cpp plAutoUIComp.cpp
@ -126,7 +124,6 @@ set(MaxComponent_SOURCES
plClimbComponent.cpp plClimbComponent.cpp
plClothingComponent.cpp plClothingComponent.cpp
plClusterComponent.cpp plClusterComponent.cpp
plComponent.cpp
plComponentBase.cpp plComponentBase.cpp
plComponentMgr.cpp plComponentMgr.cpp
plComponentTools.cpp plComponentTools.cpp
@ -139,7 +136,6 @@ set(MaxComponent_SOURCES
plGrassComponent.cpp plGrassComponent.cpp
plGUIComponents.cpp plGUIComponents.cpp
plIgnoreComponent.cpp plIgnoreComponent.cpp
plImpactGadgetComponent.cpp
plInventoryObjComponent.cpp plInventoryObjComponent.cpp
plLightGrpComponent.cpp plLightGrpComponent.cpp
plLightMapComponent.cpp plLightMapComponent.cpp
@ -185,6 +181,7 @@ set(MaxComponent_SOURCES
plXImposter.cpp plXImposter.cpp
) )
use_precompiled_header(Pch.h Pch.cpp MaxComponent_HEADERS MaxComponent_SOURCES)
add_library(MaxComponent add_library(MaxComponent
STATIC STATIC
${MaxComponent_HEADERS} ${MaxComponent_HEADERS}

23
Sources/Tools/MaxComponent/plImpactGadgetComponent.h → Sources/Tools/MaxComponent/Pch.cpp

@ -39,20 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#ifndef plImpactGadgetComponent_inc
#define plImpactGadgetComponent_inc
#include "plActivatorBaseComponent.h" #include "Pch.h"
#define IMPACTGADGET_CID Class_ID(0x6cb343d6, 0x36995c82) /**
* \file Pch.cpp
// class plImpactGadget : public plActivatorBaseComponent * \brief Precompiled Header object for MaxComponent
// { *
// public: * This file prompts MSVC to generate a PCH file for the MaxComponent project. It
// plImpactGadget(); * has no function if precompiled headers are disabled in cmake.
// */
// bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg);
// bool Convert(plMaxNode *node, plErrorMsg *pErrMsg);
// };
#endif // plImpactGadgetComponent_inc

124
Sources/Tools/MaxComponent/Pch.h

@ -0,0 +1,124 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef _MaxComponent_Pch_inc_
#define _MaxComponent_Pch_inc_
/**
* \file Pch.h
* \brief Precompiled Header for MaxComponent
*/
// Standard Library
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <vector>
// Core Plasma
#include "HeadSpin.h"
#include "plAudible.h"
#include "plCreatableIndex.h"
#include "plgDispatch.h"
#include "plFileUtils.h"
#include "hsFiles.h"
#include "hsGeometry3.h"
#include "plLoadMask.h"
#include "hsMatrix44.h"
#include "plPhysical.h"
#include "plQuality.h"
#include "hsResMgr.h"
#include "hsStlSortUtils.h"
#include "hsStream.h"
#include "hsStringTokenizer.h"
#include "hsTemplates.h"
#include "hsThread.h"
#include "plTweak.h"
// Windows
#include "hsWindows.h"
#include <commdlg.h>
#include <shlwapi.h>
#include <windowsx.h>
// These MaxComponent headers will trigger a rebuild if they are changed
// So it's probably best to precompile them anyway.
// Some of these may include 3dsm headers, so ensure they come after hsWindows.h
#include "plComponent.h"
#include "plComponentProcBase.h"
#include "plComponentReg.h"
#include "plActivatorBaseComponent.h"
#include "plAnimEventComponent.h"
#include "plAnimComponent.h"
#include "plAudioComponents.h"
#include "plBehavioralComponents.h"
#include "plPhysicalComponents.h"
#include "plMiscComponents.h"
#include "plResponderComponent.h"
#include "resource.h"
// Useful Stuff from MaxMain
// Changing any of this would likely cause a rebuild, regardless of it being here.
#include "MaxMain/MaxCompat.h"
#include "MaxMain/plMaxNode.h"
#include "MaxMain/plMaxNodeData.h"
// 3ds Max SDK
// This stuff should ALWAYS come after hsWindows.h
#include <bmmlib.h>
#include <CS/bipexp.h>
#include <decomp.h>
#include <dummy.h>
#include <iparamm2.h>
#include <meshdlib.h>
#include <notetrck.h>
#include <notify.h>
#include <stdmat.h>
#if MAX_VERSION_MAJOR >= 13
# include <INamedSelectionSetManager.h>
#endif
#endif // _MaxComponent_Pch_inc_

15
Sources/Tools/MaxComponent/pfGUISkinComp.cpp

@ -39,16 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "max.h"
#include "resource.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "hsWindows.h"
#include "pfGUISkinComp.h" #include <max.h>
#include "plGUICompClassIDs.h" #include <iparamm2.h>
#include "MaxMain/plMaxNodeBase.h"
#include "MaxMain/MaxCompat.h" #include "MaxMain/MaxCompat.h"
#include "MaxMain/plMaxNodeBase.h"
#include "resource.h"
#pragma hdrstop
#include "pfGUISkinComp.h"
#include "plGUICompClassIDs.h"
pfGUISkinEditProc *pfGUISkinEditProc::fInstance = nil; pfGUISkinEditProc *pfGUISkinEditProc::fInstance = nil;

18
Sources/Tools/MaxComponent/plAGComponents.cpp

@ -39,16 +39,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
//Resource related
#include "resource.h"
//Max related #include "plgDispatch.h"
#include "pnKeyedObject/plKey.h"
#include "hsResMgr.h"
#include "plComponent.h" #include "plComponent.h"
#include "plComponentReg.h" #include "plComponentReg.h"
#include "resource.h"
#include "MaxMain/plMaxNode.h"
#include "MaxMain/plMaxNodeData.h"
#pragma hdrstop
//Messages related //Messages related
#include "plgDispatch.h"
#include "pnMessage/plObjRefMsg.h" #include "pnMessage/plObjRefMsg.h"
#include "pnMessage/plIntRefMsg.h" #include "pnMessage/plIntRefMsg.h"
#include "pnMessage/plNodeRefMsg.h" #include "pnMessage/plNodeRefMsg.h"
@ -57,12 +61,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//Scene related //Scene related
#include "plScene/plSceneNode.h" #include "plScene/plSceneNode.h"
#include "plInterp/plController.h" #include "plInterp/plController.h"
#include "MaxMain/plMaxNode.h"
#include "MaxMain/plMaxNodeData.h"
#include "pnKeyedObject/plKey.h"
#include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSceneObject.h"
#include "pnSceneObject/plCoordinateInterface.h" #include "pnSceneObject/plCoordinateInterface.h"
#include "hsResMgr.h"
//Conversion related //Conversion related
#include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsConverterUtils.h"

7
Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp

@ -39,15 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plActivatorBaseComponent.h"
#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKey.h"
#include "hsResMgr.h"
#include "plActivatorBaseComponent.h"
#include "MaxMain/plMaxNode.h" #include "MaxMain/plMaxNode.h"
#pragma hdrstop
#include "plModifier/plLogicModifier.h" #include "plModifier/plLogicModifier.h"
#include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSceneObject.h"
#include "hsResMgr.h"
#include "pnMessage/plObjRefMsg.h" #include "pnMessage/plObjRefMsg.h"
void plActivatorBaseComponent::AddReceiverKey(plKey pKey, plMaxNode* node) void plActivatorBaseComponent::AddReceiverKey(plKey pKey, plMaxNode* node)

3
Sources/Tools/MaxComponent/plActivatorComponent.cpp

@ -39,9 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plComponent.h" #include "plComponent.h"
#include "plComponentReg.h" #include "plComponentReg.h"
#pragma hdrstop
void DummyCodeIncludeFuncActive() {} void DummyCodeIncludeFuncActive() {}

25
Sources/Tools/MaxComponent/plAnimCompProc.cpp

@ -39,16 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "plAnimCompProc.h"
#include "MaxMain/plMaxNode.h" #include "plAnimComponent.h"
#include "plComponentBase.h" #include "plComponentBase.h"
#include "MaxMain/plMaxNode.h"
#include <iparamm2.h>
#include <set>
#pragma hdrstop
#include "plAnimCompProc.h"
#include "plPickNode.h" #include "plPickNode.h"
#include "plAnimComponent.h" #include "plPickNodeBase.h"
#include "plNotetrackAnim.h"
#include "plInterp/plAnimEaseTypes.h" #include "plInterp/plAnimEaseTypes.h"
#include "plPickMaterialMap.h"
#include "MaxMain/plMtlCollector.h"
plAnimCompProc::plAnimCompProc() : plAnimCompProc::plAnimCompProc() :
fCompButtonID(0), fCompButtonID(0),
fCompParamID(0), fCompParamID(0),
@ -295,8 +304,6 @@ void plMtlAnimProc::IUpdateNodeButton(HWND hWnd, IParamBlock2* pb)
ILoadAnimCombo(hWnd, pb); ILoadAnimCombo(hWnd, pb);
} }
#include "plNotetrackAnim.h"
void plMtlAnimProc::ILoadAnimCombo(HWND hWnd, IParamBlock2* pb) void plMtlAnimProc::ILoadAnimCombo(HWND hWnd, IParamBlock2* pb)
{ {
HWND hAnim = GetDlgItem(hWnd, fAnimComboID); HWND hAnim = GetDlgItem(hWnd, fAnimComboID);
@ -331,9 +338,6 @@ void plMtlAnimProc::ILoadAnimCombo(HWND hWnd, IParamBlock2* pb)
ILoadUser(hWnd, pb); ILoadUser(hWnd, pb);
} }
#include "plPickMaterialMap.h"
#include "MaxMain/plMtlCollector.h"
void plMtlAnimProc::IMtlButtonPress(HWND hWnd, IParamBlock2* pb) void plMtlAnimProc::IMtlButtonPress(HWND hWnd, IParamBlock2* pb)
{ {
// Let the user pick a new material // Let the user pick a new material
@ -395,9 +399,6 @@ Mtl* plMtlAnimProc::IGetMtl(IParamBlock2* pb)
return pb->GetMtl(fMtlParamID); return pb->GetMtl(fMtlParamID);
} }
#include "plPickNodeBase.h"
static const char* kUserTypeAll = "(All)"; static const char* kUserTypeAll = "(All)";
class plPickAllMtlNode : public plPickMtlNode class plPickAllMtlNode : public plPickMtlNode

4
Sources/Tools/MaxComponent/plAnimCompProc.h

@ -42,11 +42,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plAnimCompProc_h_inc #ifndef plAnimCompProc_h_inc
#define plAnimCompProc_h_inc #define plAnimCompProc_h_inc
#include "max.h"
#include "iparamm2.h"
class plComponentBase; class plComponentBase;
class plMaxNode; class plMaxNode;
class IParamBlock2;
class plAnimCompProc : public ParamMap2UserDlgProc class plAnimCompProc : public ParamMap2UserDlgProc
{ {

19
Sources/Tools/MaxComponent/plAnimComponent.cpp

@ -39,21 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h"
#include "resource.h" #include "hsResMgr.h"
#include "plAnimComponent.h" #include "plAnimComponent.h"
#include "plComponentProcBase.h" #include "plComponentProcBase.h"
#include "plPhysicalComponents.h" #include "plPhysicalComponents.h"
#include "plMiscComponents.h" #include "plMiscComponents.h"
#include "MaxMain/plMaxNode.h"
#include "resource.h"
#pragma hdrstop
#include "MaxMain/plPhysicalProps.h" #include "MaxMain/plPhysicalProps.h"
#include "pnMessage/plNodeRefMsg.h"
#include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSceneObject.h"
#include "plInterp/plController.h" #include "plInterp/plController.h"
#include "plNotetrackAnim.h" #include "plNotetrackAnim.h"
#include "hsResMgr.h"
#include "plAvatar/plAGModifier.h" #include "plAvatar/plAGModifier.h"
#include "plAvatar/plAGChannel.h" #include "plAvatar/plAGChannel.h"
#include "plAvatar/plAGAnim.h" #include "plAvatar/plAGAnim.h"
@ -61,13 +65,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAvatar/plMatrixChannel.h" #include "plAvatar/plMatrixChannel.h"
#include "plAvatar/plPointChannel.h" #include "plAvatar/plPointChannel.h"
#include "plAvatar/plScalarChannel.h" #include "plAvatar/plScalarChannel.h"
#include "MaxMain/plMaxNode.h"
#include "MaxConvert/hsControlConverter.h" #include "MaxConvert/hsControlConverter.h"
#include "pnKeyedObject/plUoid.h" #include "pnKeyedObject/plUoid.h"
#include "plMaxAnimUtils.h" #include "plMaxAnimUtils.h"
#include "MaxPlasmaLights/plRealTimeLightBase.h" #include "MaxPlasmaLights/plRealTimeLightBase.h"
#include "MaxPlasmaMtls/Materials/plPassMtl.h"
#include "pfAnimation/plLightModifier.h" #include "pfAnimation/plLightModifier.h"
#include "pnKeyedObject/plMsgForwarder.h" #include "pnKeyedObject/plMsgForwarder.h"
@ -83,6 +87,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// So that the linker won't throw this code away, since it doesn't appear to be used // So that the linker won't throw this code away, since it doesn't appear to be used
void DummyCodeIncludeFunc() {} void DummyCodeIncludeFunc() {}
plEaseAccessor gAnimCompEaseAccessor(plComponentBase::kBlkComp,
kAnimEaseInMin, kAnimEaseInMax, kAnimEaseInLength,
kAnimEaseOutMin, kAnimEaseOutMax, kAnimEaseOutLength);
bool HasPhysicalComponent(plMaxNodeBase *node, bool searchChildren) bool HasPhysicalComponent(plMaxNodeBase *node, bool searchChildren)
{ {
int i; int i;
@ -572,9 +580,6 @@ bool plAnimGroupedComponent::GetKeyList( INode *restrictedNode, hsTArray<plKe
return false; return false;
} }
#include "pnMessage/plNodeRefMsg.h"
bool plAnimGroupedComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) bool plAnimGroupedComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg)
{ {
bool needSetMaster = fNeedReset; bool needSetMaster = fNeedReset;

28
Sources/Tools/MaxComponent/plAnimComponent.h

@ -42,14 +42,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plAnimComponent_inc #ifndef plAnimComponent_inc
#define plAnimComponent_inc #define plAnimComponent_inc
#include <map>
#include "plComponent.h"
#include "plComponentReg.h"
#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKey.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "plComponent.h"
#include "plComponentReg.h"
#include "plAnimObjInterface.h" #include "plAnimObjInterface.h"
#include "plNoteTrackDlgComp.h" #include "plNotetrackDlgComp.h"
#include "MaxPlasmaMtls/Materials/plPassMtlBase.h"
#include <iparamm2.h>
#include <map>
#define ANIM_COMP_CID Class_ID(0x32e77ab, 0x28a80383) #define ANIM_COMP_CID Class_ID(0x32e77ab, 0x28a80383)
#define ANIM_GROUP_COMP_CID Class_ID(0x341a57fc, 0x4cda6c64) #define ANIM_GROUP_COMP_CID Class_ID(0x341a57fc, 0x4cda6c64)
@ -84,19 +87,16 @@ enum
kAnimPhysAnim, kAnimPhysAnim,
}; };
static plEaseAccessor gAnimCompEaseAccessor(plComponentBase::kBlkComp, class plAGAnim;
kAnimEaseInMin, kAnimEaseInMax, kAnimEaseInLength, class plAGApplicator;
kAnimEaseOutMin, kAnimEaseOutMax, kAnimEaseOutLength); class plAGMasterMod;
class plComponentBase; class plComponentBase;
class plController;
class plEaseAccessor;
class plMaxNode; class plMaxNode;
class plMsgForwarder;
class plSimpleTMModifier; class plSimpleTMModifier;
class plLightModifier; class plLightModifier;
class plAGMasterMod;
class plAGAnim;
class plMsgForwarder;
class plController;
class plAGApplicator;
class plAnimComponentBase : public plComponent, public plAnimObjInterface class plAnimComponentBase : public plComponent, public plAnimObjInterface
{ {

6
Sources/Tools/MaxComponent/plAnimEventComponent.cpp

@ -39,11 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsResMgr.h"
#include "plAnimEventComponent.h" #include "plAnimEventComponent.h"
#include "plComponentReg.h" #include "plComponentReg.h"
#include "resource.h" #include "resource.h"
#include "MaxMain/plMaxNode.h" #include "MaxMain/plMaxNode.h"
#pragma hdrstop
#include "plAnimComponent.h" #include "plAnimComponent.h"
#include "plNotetrackAnim.h" #include "plNotetrackAnim.h"
@ -53,7 +58,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plModifier/plAnimEventModifier.h" #include "plModifier/plAnimEventModifier.h"
#include "plMessage/plAnimCmdMsg.h" #include "plMessage/plAnimCmdMsg.h"
#include "hsResMgr.h"
#include "pnMessage/plRefMsg.h" #include "pnMessage/plRefMsg.h"
void DummyCodeIncludeFuncAnimDetector() {} void DummyCodeIncludeFuncAnimDetector() {}

3
Sources/Tools/MaxComponent/plAnimEventComponent.h

@ -44,6 +44,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plActivatorBaseComponent.h" #include "plActivatorBaseComponent.h"
class plErrorMsg;
class plMaxNode;
#define ANIMEVENT_CID Class_ID(0x32eb34af, 0x62c70002) #define ANIMEVENT_CID Class_ID(0x32eb34af, 0x62c70002)
#define MTLEVENT_CID Class_ID(0x2984243c, 0x30ea3acb) #define MTLEVENT_CID Class_ID(0x2984243c, 0x30ea3acb)

2
Sources/Tools/MaxComponent/plAnimObjInterface.h

@ -53,6 +53,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTemplates.h" #include "hsTemplates.h"
#include "plString.h" #include "plString.h"
class plKey;
class plAnimObjInterface class plAnimObjInterface
{ {
public: public:

33
Sources/Tools/MaxComponent/plAudioComponents.cpp

@ -39,16 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "plComponentProcBase.h" #include "plgDispatch.h"
#include "plFileUtils.h"
#include "resource.h" #include "plAnimComponent.h"
#include "plAudioComponents.h"
#include "plComponent.h" #include "plComponent.h"
#include "plComponentProcBase.h"
#include "plComponentReg.h" #include "plComponentReg.h"
#include <map>
#include "plAudioComponents.h"
#include "plMiscComponents.h" #include "plMiscComponents.h"
#include "plAnimComponent.h" #include "MaxMain/MaxCompat.h"
#include "resource.h"
#include <map>
#include <shlwapi.h>
#pragma hdrstop
#include "plInterp/plAnimEaseTypes.h" #include "plInterp/plAnimEaseTypes.h"
#include "plAvatar/plAGAnim.h" #include "plAvatar/plAGAnim.h"
@ -59,23 +68,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "MaxMain/plPluginResManager.h" #include "MaxMain/plPluginResManager.h"
#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxMain/plPlasmaRefMsgs.h"
#include "plgDispatch.h"
#include "pnMessage/plObjRefMsg.h" #include "pnMessage/plObjRefMsg.h"
#include "pnMessage/plIntRefMsg.h" #include "pnMessage/plIntRefMsg.h"
#include "pnMessage/plNodeRefMsg.h" #include "pnMessage/plNodeRefMsg.h"
#include "plScene/plSceneNode.h" #include "plScene/plSceneNode.h"
#include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsConverterUtils.h"
#include "MaxConvert/hsControlConverter.h" #include "MaxConvert/hsControlConverter.h"
#include "plInterp/plController.h" #include "plInterp/plController.h"
#include "MaxMain/plMaxNode.h" #include "MaxMain/plMaxNode.h"
#include "MaxMain/MaxCompat.h"
#include "pnKeyedObject/plKey.h"
//Physics Related //Physics Related
//#include "plHavok1/plHKPhysical.h" //Physics Comp
#include "pnSceneObject/plSimulationInterface.h" #include "pnSceneObject/plSimulationInterface.h"
#include "MaxMain/plPhysicalProps.h" #include "MaxMain/plPhysicalProps.h"
#include "plPhysX/plPXPhysical.h" #include "plPhysX/plPXPhysical.h"
@ -92,13 +95,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAudio/plWin32StreamingSound.h" #include "plAudio/plWin32StreamingSound.h"
#include "plAudio/plWin32GroupedSound.h" #include "plAudio/plWin32GroupedSound.h"
#include "plAudioCore/plSoundBuffer.h" #include "plAudioCore/plSoundBuffer.h"
#include "plFileUtils.h"
// Valdez Asset Manager Related // Valdez Asset Manager Related
#ifdef MAXASS_AVAILABLE #ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/MaxAssInterface.h" # include "../../AssetMan/PublicInterface/MaxAssInterface.h"
#endif #endif
#include <shlwapi.h>
// Fun soft volume stuff // Fun soft volume stuff
#include "plSoftVolumeComponent.h" #include "plSoftVolumeComponent.h"
@ -111,8 +112,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// EAX stuff // EAX stuff
#include "plAudio/plEAXListenerMod.h" #include "plAudio/plEAXListenerMod.h"
#ifdef EAX_SDK_AVAILABLE #ifdef EAX_SDK_AVAILABLE
#include <eax-util.h> # include <eax-util.h>
#include <eaxlegacy.h> # include <eaxlegacy.h>
#endif #endif
#include "plResMgr/plLocalization.h" #include "plResMgr/plLocalization.h"

16
Sources/Tools/MaxComponent/plAudioComponents.h

@ -39,6 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021 Mead, WA 99021
*==LICENSE==*/ *==LICENSE==*/
#ifndef _plAudioComponents_h_inc_
#define _plAudioComponents_h_inc_
#define SOUND_3D_COMPONENT_ID Class_ID(0x1be5543f, 0x746f3a97) #define SOUND_3D_COMPONENT_ID Class_ID(0x1be5543f, 0x746f3a97)
#define BGND_MUSIC_COMPONENT_ID Class_ID(0x16b5b2a, 0x33c75095) #define BGND_MUSIC_COMPONENT_ID Class_ID(0x16b5b2a, 0x33c75095)
#define RANDOM_SOUND_COMPONENT_ID Class_ID(0x35033e37, 0x499568fb) #define RANDOM_SOUND_COMPONENT_ID Class_ID(0x35033e37, 0x499568fb)
@ -46,11 +50,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define EAX_LISTENER_COMPONENT_ID Class_ID(0x514f4b0a, 0x24672153) #define EAX_LISTENER_COMPONENT_ID Class_ID(0x514f4b0a, 0x24672153)
#define SOUND_PHYS_COMP_ID Class_ID(0x29415900, 0x1ade37a5) #define SOUND_PHYS_COMP_ID Class_ID(0x29415900, 0x1ade37a5)
#include <map>
#include "plComponent.h"
#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKey.h"
#include "hsTemplates.h"
#ifdef MAXASS_AVAILABLE #ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/AssManBaseTypes.h" # include "../../AssetMan/PublicInterface/AssManBaseTypes.h"
#endif #endif
#include "hsTemplates.h"
class plComponentBase; class plComponentBase;
class plMaxNode; class plMaxNode;
@ -66,7 +74,7 @@ namespace plAudioComp
bool IsSoundComponent(plComponentBase *comp); bool IsSoundComponent(plComponentBase *comp);
bool IsLocalOnly( plComponentBase *comp ); bool IsLocalOnly( plComponentBase *comp );
} };
class plBaseSoundEmitterComponent : public plComponent class plBaseSoundEmitterComponent : public plComponent
{ {
@ -212,3 +220,5 @@ public:
}; };
#endif // _plAudioComponents_h_inc_

12
Sources/Tools/MaxComponent/plAutoUIBase.cpp

@ -40,14 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#include "HeadSpin.h" #include "HeadSpin.h"
#include "plAutoUIBase.h" #include "hsWindows.h"
#include "max.h"
#include "iparamb2.h"
#include "plAutoUIParams.h" #include <iparamb2.h>
#include <max.h>
#include "resource.h" #include "resource.h"
#pragma hdrstop
#include "plAutoUIBase.h"
#include "plAutoUIParams.h"
#include "plGUICompClassIDs.h" #include "plGUICompClassIDs.h"

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

Loading…
Cancel
Save