From c8419b01078c7f668c2289ce633e56748264c010 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 16 Nov 2012 20:59:45 -0500 Subject: [PATCH 01/13] Remove hsFileStream It's unused windows-specific garbage. --- Sources/Plasma/CoreLib/hsStream.cpp | 122 ---------------------------- Sources/Plasma/CoreLib/hsStream.h | 22 ----- 2 files changed, 144 deletions(-) diff --git a/Sources/Plasma/CoreLib/hsStream.cpp b/Sources/Plasma/CoreLib/hsStream.cpp index 798d35b1..e748b155 100644 --- a/Sources/Plasma/CoreLib/hsStream.cpp +++ b/Sources/Plasma/CoreLib/hsStream.cpp @@ -678,128 +678,6 @@ uint32_t hsStream::ReadLEAtom(uint32_t* sizePtr) 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); -} ////////////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/CoreLib/hsStream.h b/Sources/Plasma/CoreLib/hsStream.h index 9c8a91b4..ce7919c4 100644 --- a/Sources/Plasma/CoreLib/hsStream.h +++ b/Sources/Plasma/CoreLib/hsStream.h @@ -288,28 +288,6 @@ public: 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 { FILE* fRef; From 5de87cdacadf588cf4efb5f258a1d276446019ba Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 21 Dec 2012 21:00:03 -0500 Subject: [PATCH 02/13] Fix UnifiedTime collision Win32's GetCurrentTime and plUnifiedTime::GetCurrentTime collided. Rather than hacking around the solution by undefining GetCurrentTime, we rename plUnifiedTime::GetCurrentTime to plUnifiedTime::GetCurrent. This fix is less fiddly than an undef hack. --- .../Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp | 10 +++++----- .../PubUtilLib/plNetClient/plNetClientMgrSend.cpp | 2 +- Sources/Plasma/PubUtilLib/plSDL/plSDL.h | 6 +++--- Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp | 4 ++-- .../PubUtilLib/plStatGather/plProfileManagerFull.cpp | 2 +- Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp | 2 +- .../PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp | 6 +++--- .../Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp | 2 +- .../Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h | 11 ++++------- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index b7690faa..5eacc796 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -322,7 +322,7 @@ void plNetClientMgr::IDumpOSVersionInfo() const int plNetClientMgr::Init() { int ret=hsOK; - hsLogEntry( DebugMsg("*** plNetClientMgr::Init GMT:%s", plUnifiedTime::GetCurrentTime().Print()) ); + hsLogEntry( DebugMsg("*** plNetClientMgr::Init GMT:%s", plUnifiedTime::GetCurrent().Print()) ); IDumpOSVersionInfo(); @@ -496,7 +496,7 @@ void plNetClientMgr::UpdateServerTimeOffset(plNetMessage* msg) const plUnifiedTime& msgSentUT = msg->GetTimeSent(); if (!msgSentUT.AtEpoch()) { - double diff = plUnifiedTime::GetTimeDifference(msgSentUT, plClientUnifiedTime::GetCurrentTime()); + double diff = plUnifiedTime::GetTimeDifference(msgSentUT, plUnifiedTime::GetCurrent()); if (fServerTimeOffset == 0) { @@ -526,13 +526,13 @@ void plNetClientMgr::ResetServerTimeOffset(bool delayed) plUnifiedTime plNetClientMgr::GetServerTime() const { if ( fServerTimeOffset==0 ) // offline mode or before connecting/calibrating to a server - return plUnifiedTime::GetCurrentTime(); + return plUnifiedTime::GetCurrent(); plUnifiedTime serverUT; if (fServerTimeOffset<0) - return plUnifiedTime::GetCurrentTime() - plUnifiedTime(fabs(fServerTimeOffset)); + return plUnifiedTime::GetCurrent() - plUnifiedTime(fabs(fServerTimeOffset)); else - return plUnifiedTime::GetCurrentTime() + plUnifiedTime(fServerTimeOffset); + return plUnifiedTime::GetCurrent() + plUnifiedTime(fServerTimeOffset); } // diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp index 2fd908cb..30813010 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp @@ -424,7 +424,7 @@ int plNetClientMgr::SendMsg(plNetMessage* msg) msg->SetBit(plNetMessage::kEchoBackToSender, true); } - msg->SetTimeSent(plUnifiedTime::GetCurrentTime()); + msg->SetTimeSent(plUnifiedTime::GetCurrent()); int channel = IPrepMsg(msg); // hsLogEntry( DebugMsg( " %s %s", msg->ClassName(), msg->AsStdString().c_str()) ); diff --git a/Sources/Plasma/PubUtilLib/plSDL/plSDL.h b/Sources/Plasma/PubUtilLib/plSDL/plSDL.h index 6250f982..c4de5a1a 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plSDL.h +++ b/Sources/Plasma/PubUtilLib/plSDL/plSDL.h @@ -154,7 +154,7 @@ public: void SetDirty(bool d) { if (d) fFlags |= kDirty; else fFlags &= ~kDirty; } void SetUsed(bool d) { if (d) fFlags |= kUsed; else fFlags &= ~kUsed; } 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; plStateVarNotificationInfo& GetNotificationInfo() { return fNotificationInfo; } @@ -263,7 +263,7 @@ public: plSDStateVariable* GetAsSDStateVar() { return nil; } 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 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 @@ -355,7 +355,7 @@ public: 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 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; } void Alloc(int cnt=-1 /* -1 means don't change count */); // wipe and re-create diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index e3b694b8..7f499ae1 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/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; } @@ -2745,7 +2745,7 @@ void plSDStateVariable::SetFromDefaults(bool 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" ); } diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp index 93f520bd..8a5a23b8 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp @@ -436,7 +436,7 @@ const wchar_t* plProfileManagerFull::GetProfilePath() { initialized = true; - plUnifiedTime curTime = plUnifiedTime::GetCurrentTime(plUnifiedTime::kLocal); + plUnifiedTime curTime = plUnifiedTime::GetCurrent(plUnifiedTime::kLocal); PathGetUserDirectory(profilePath, arrsize(profilePath)); PathAddFilename(profilePath, profilePath, L"Profile", arrsize(profilePath)); diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index c425d666..583c9f18 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -812,7 +812,7 @@ bool plStatusLog::IPrintLineToFile( const char *line, uint32_t count ) } 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)); } if ( fFlags & kTimeInSeconds ) diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp index 1c1a90f0..937f1cd2 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif // 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; // @@ -78,7 +78,7 @@ void plClientUnifiedTime::SetFromGameTime(double gameTime, double curGameSecs) extern bool gMooseDump; if (gMooseDump) { - plUnifiedTime ct = plUnifiedTime::GetCurrentTime(); + plUnifiedTime ct = plUnifiedTime::GetCurrent(); plUnifiedTime ft = GetFrameStartTime(); plNetObjectDebugger::GetInstance()->LogMsg(hsTempStringF("SFGT: CT=%s\n", ct.PrintWMillis())); @@ -102,7 +102,7 @@ void plClientUnifiedTime::ConvertToGameTime(double* gameTimeOut, double curGameS extern bool gMooseDump; if (gMooseDump) { - plUnifiedTime ct = plUnifiedTime::GetCurrentTime(); + plUnifiedTime ct = plUnifiedTime::GetCurrent(); plUnifiedTime ft = GetFrameStartTime(); plNetObjectDebugger::GetInstance()->LogMsg( hsTempStringF("CTGT: this=%s\n", PrintWMillis())); diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index 0a23993f..19f50731 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -193,7 +193,7 @@ plUnifiedTime::plUnifiedTime(const plUnifiedTime * src) *this = *src; } -plUnifiedTime plUnifiedTime::GetCurrentTime(Mode mode) +plUnifiedTime plUnifiedTime::GetCurrent(Mode mode) { plUnifiedTime t; t.SetMode(mode); diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h index a6c1e4da..bf7f5240 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h @@ -39,14 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #ifndef _PL_UNIFIEDTIME_INC_ #define _PL_UNIFIEDTIME_INC_ #include "HeadSpin.h" -#include "hsStlUtils.h" +#include #if HS_BUILD_FOR_WIN32 - + typedef struct _FILETIME FILETIME; #endif // @@ -58,10 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com struct timeval; class hsStream; -#ifdef GetCurrentTime -#undef GetCurrentTime -#endif - enum plUnifiedTime_CtorNow { kNow }; @@ -97,7 +94,7 @@ public: plUnifiedTime(int mode, const char * buf, const char * fmt); plUnifiedTime(const plUnifiedTime & src); plUnifiedTime(const plUnifiedTime * src); - static plUnifiedTime GetCurrentTime(Mode mode=kGmt); + static plUnifiedTime GetCurrent(Mode mode=kGmt); // assignment const plUnifiedTime & operator=(const plUnifiedTime & src); From 7785c9c85e3f944f53761bcda81f3e33e21ea0fa Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 17 Nov 2012 16:11:17 -0500 Subject: [PATCH 03/13] Remove global Windows.h include This is the beginning of efforts to reduce the scope of Windows.h. I have shuttled it into hsWindows.h (again) and fixed the compilation of the major apps. There is still some scope work that needs to be done, and the Max plugin has not yet been addressed. --- Sources/Plasma/Apps/plClient/plClient.cpp | 1 + Sources/Plasma/Apps/plClient/winmain.cpp | 6 +- Sources/Plasma/Apps/plClientPatcher/Pch.h | 1 + Sources/Plasma/Apps/plPythonPack/main.cpp | 1 + Sources/Plasma/Apps/plUruLauncher/Pch.h | 1 + Sources/Plasma/CoreLib/CMakeLists.txt | 1 + Sources/Plasma/CoreLib/HeadSpin.cpp | 1 + Sources/Plasma/CoreLib/HeadSpin.h | 100 +++++------------- Sources/Plasma/CoreLib/hsCritSect.h | 7 +- Sources/Plasma/CoreLib/hsFiles_Win.cpp | 1 + Sources/Plasma/CoreLib/hsThread.h | 5 +- Sources/Plasma/CoreLib/hsWindows.h | 75 +++++++++++++ Sources/Plasma/CoreLib/plFileUtils.cpp | 1 + .../FeatureLib/pfConsole/pfConsoleDirSrc.cpp | 1 + .../Plasma/FeatureLib/pfPython/pyAgeVault.cpp | 10 +- .../Plasma/FeatureLib/pfPython/pyAgeVault.h | 6 +- .../FeatureLib/pfPython/pyAgeVaultGlue.cpp | 2 +- .../FeatureLib/pfPython/pyDniInfoSource.cpp | 20 ++-- .../FeatureLib/pfPython/pyDniInfoSource.h | 4 +- .../pfPython/pyDniInfoSourceGlue.cpp | 3 +- .../FeatureLib/pfSurface/plLayerAVI.cpp | 5 +- .../NucleusLib/inc/plProfileManager.cpp | 2 +- .../Plasma/NucleusLib/pnInputCore/plKeyDef.h | 4 +- .../Plasma/NucleusLib/pnInputCore/plOSMsg.h | 2 + .../NucleusLib/pnMessage/plEventCallbackMsg.h | 16 ++- .../NucleusLib/pnNetCommon/plNetAddress.h | 1 + .../NucleusLib/pnNetCommon/pnNetCommon.cpp | 1 + .../NucleusLib/pnNetCommon/pnNetCommon.h | 5 +- Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp | 1 + .../NucleusLib/pnTimer/pnBuildDates.cpp | 1 + .../Plasma/PubUtilLib/plAudio/plEAXEffects.h | 6 +- .../PubUtilLib/plAudio/plWinMicLevel.cpp | 1 + .../Plasma/PubUtilLib/plAudioCore/plWavFile.h | 1 + .../PubUtilLib/plAvatar/plArmatureEffects.cpp | 2 +- .../PubUtilLib/plAvatar/plArmatureMod.cpp | 4 +- .../PubUtilLib/plAvatar/plAvBrainSwim.cpp | 2 +- .../PubUtilLib/plClipboard/plClipboard.cpp | 2 +- .../Plasma/PubUtilLib/plFile/plBrowseFolder.h | 5 +- .../PubUtilLib/plFile/plSecureStream.cpp | 1 + .../Plasma/PubUtilLib/plFile/plSecureStream.h | 5 +- Sources/Plasma/PubUtilLib/plGImage/hsCodec.h | 2 + .../PubUtilLib/plGImage/plAVIWriter.cpp | 1 + .../PubUtilLib/plGImage/plDynSurfaceWriter.h | 2 +- .../PubUtilLib/plGImage/plWinFontCache.h | 2 +- .../PubUtilLib/plInputCore/plInputManager.cpp | 1 + .../plPipeline/hsG3DDeviceSelector.cpp | 3 +- .../plPipeline/hsG3DDeviceSelector.h | 4 +- .../PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp | 3 +- .../PubUtilLib/plPipeline/plDTProgressMgr.cpp | 1 - .../PubUtilLib/plPipeline/plDXDeviceRefs.cpp | 1 + .../PubUtilLib/plPipeline/plDXEnumerate.cpp | 2 +- .../PubUtilLib/plPipeline/plDXPipeline.cpp | 1 + .../PubUtilLib/plPipeline/plDXPixelShader.cpp | 1 + .../PubUtilLib/plPipeline/plDXTextFont.cpp | 2 +- .../plPipeline/plDXVertexShader.cpp | 3 +- .../PubUtilLib/plPipeline/plGBufferGroup.cpp | 2 +- .../Plasma/PubUtilLib/plPipeline/plPlates.cpp | 7 -- .../PubUtilLib/plPipeline/plTextFont.cpp | 1 + .../PubUtilLib/plPipeline/plTextGenerator.cpp | 1 + .../plSockets/plBufferedSocketWriter.cpp | 1 + .../Plasma/PubUtilLib/plSockets/plFdSet.cpp | 1 + Sources/Plasma/PubUtilLib/plSockets/plNet.h | 5 +- .../plUnifiedTime/plUnifiedTime.cpp | 1 + .../Tools/plFontConverter/plFontConverter.cpp | 1 + .../plFontConverter/plFontConverterProc.cpp | 3 + .../Tools/plLocalizationEditor/plAddDlgs.h | 1 + .../Tools/plLocalizationEditor/plEditDlg.h | 1 + Sources/Tools/plResBrowser/plResBrowser.cpp | 1 + .../plResBrowser/plResBrowserWndProc.cpp | 3 + Sources/Tools/plResBrowser/plResTreeView.cpp | 1 + .../Tools/plResBrowser/plWinRegistryTools.cpp | 1 + 71 files changed, 223 insertions(+), 151 deletions(-) create mode 100644 Sources/Plasma/CoreLib/hsWindows.h diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 539ca629..9fd4547b 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #pragma warning(disable: 4284) #include "HeadSpin.h" +#include "hsWindows.h" #include "plClient.h" #include "hsStream.h" #include "plResMgr/plResManager.h" diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 8ade8131..29e327e4 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -40,9 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ +#include "HeadSpin.h" +#include "hsWindows.h" + #include #include // windows directory handling fxns (for chdir) #include +#include // ShellExecuteA //#define DETACH_EXE // Microsoft trick to force loading of exe to memory #ifdef DETACH_EXE @@ -51,7 +55,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include -#include "HeadSpin.h" #include "hsStream.h" #include "plClient.h" @@ -78,7 +81,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "res/resource.h" -//#include // // Defines // diff --git a/Sources/Plasma/Apps/plClientPatcher/Pch.h b/Sources/Plasma/Apps/plClientPatcher/Pch.h index 6b00160c..1899e83f 100644 --- a/Sources/Plasma/Apps/plClientPatcher/Pch.h +++ b/Sources/Plasma/Apps/plClientPatcher/Pch.h @@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif #define PLASMA20_SOURCES_PLASMA_APPS_PLCLIENTPATCHER_PCH_H +#include "hsWindows.h" #include #include #include "pnUtils/pnUtils.h" diff --git a/Sources/Plasma/Apps/plPythonPack/main.cpp b/Sources/Plasma/Apps/plPythonPack/main.cpp index 65442f27..7179049c 100644 --- a/Sources/Plasma/Apps/plPythonPack/main.cpp +++ b/Sources/Plasma/Apps/plPythonPack/main.cpp @@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #if HS_BUILD_FOR_WIN32 +# include "hsWindows.h" # include # define getcwd _getcwd diff --git a/Sources/Plasma/Apps/plUruLauncher/Pch.h b/Sources/Plasma/Apps/plUruLauncher/Pch.h index 3f425a06..2849277a 100644 --- a/Sources/Plasma/Apps/plUruLauncher/Pch.h +++ b/Sources/Plasma/Apps/plUruLauncher/Pch.h @@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif #define PLASMA20_SOURCES_PLASMA_APPS_PLURULAUNCHER_PCH_H +#include "hsWindows.h" #include #include diff --git a/Sources/Plasma/CoreLib/CMakeLists.txt b/Sources/Plasma/CoreLib/CMakeLists.txt index c632ef18..da1fe03f 100644 --- a/Sources/Plasma/CoreLib/CMakeLists.txt +++ b/Sources/Plasma/CoreLib/CMakeLists.txt @@ -83,6 +83,7 @@ set(CoreLib_HEADERS hsTemplates.h hsThread.h hsWide.h + hsWindows.h pcSmallRect.h plFileUtils.h plGeneric.h diff --git a/Sources/Plasma/CoreLib/HeadSpin.cpp b/Sources/Plasma/CoreLib/HeadSpin.cpp index b80cacc9..5d09dfdc 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.cpp +++ b/Sources/Plasma/CoreLib/HeadSpin.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #ifdef _MSC_VER # include diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index 969a3d1c..aaa03704 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -46,6 +46,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com # define HS_DEBUGGING #endif // defined(_DEBUG) || defined(UNIX_DENUG) +//====================================== +// Some standard includes +//====================================== +#include +#include +#include +#include +#include +#include +#include + //====================================== // Winblows Hacks //====================================== @@ -61,67 +72,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com # pragma warning( disable : 4305 4503 4018 4786 4284 4800) # endif // _MSC_VER - // 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 - - // 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 -# include - -# define WIN32_LEAN_AND_MEAN -# ifndef NOMINMAX -# define NOMINMAX // Needed to prevent NxMath conflicts -# endif -# include - - // This needs to be after #include , since it also includes windows.h -# ifdef USE_VLD -# include -# 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 -#include -#include -#include -#include -#include -#include - - -//====================================== -// Just some fun typedefs... -//====================================== -#ifdef HS_BUILD_FOR_WIN32 + // Kind of nasty looking forward declarations, but this is Win32.... it'll never change! + // If you want to argue: would you rather pull in the entire Windows.h? Windows 8 makes it + // even more bloated than before! + struct HWND__; typedef struct HWND__ *HWND; + struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE; + typedef HWND hsWindowHndl; typedef HINSTANCE hsWindowInst; + typedef HINSTANCE HMODULE; + typedef long HRESULT; #else typedef int32_t* hsWindowHndl; typedef int32_t* hsWindowInst; #endif // HS_BUILD_FOR_WIN32 - //====================================== // Basic macros //====================================== @@ -547,31 +512,16 @@ void DebugMsg(const char fmt[], ...); /***************************************************************************** * * Atomic Operations +* FIXME: Replace with std::atomic when VS2012 supports WinXP * ***/ -// *value += increment; return original value of *value; thread safe -inline long AtomicAdd(long* value, long increment) -{ -#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); +#ifdef _MSC_VER +# define AtomicAdd(value, increment) InterlockedExchangeAdd(value, increment) +# define AtomicSet(value, set) InterlockedExchange(value, set) #elif __GNUC__ - return __sync_lock_test_and_set(value, set); -#else -# error "No Atomic Set support on this architecture" +# define AtomicAdd(value, increment) __sync_fetch_and_add(value, increment) +# define AtomicSet(value, set) __sync_lock_test_and_set(value, set) #endif -} #endif diff --git a/Sources/Plasma/CoreLib/hsCritSect.h b/Sources/Plasma/CoreLib/hsCritSect.h index 803ef6dc..52a550ba 100644 --- a/Sources/Plasma/CoreLib/hsCritSect.h +++ b/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 -typedef CRITICAL_SECTION CritSectHandle; +# include "hsWindows.h" + typedef CRITICAL_SECTION CritSectHandle; #elif HS_BUILD_FOR_UNIX -# include -typedef pthread_mutex_t CritSectHandle; +# include + typedef pthread_mutex_t CritSectHandle; #else # error "CCritSect: Not implemented on this platform" #endif diff --git a/Sources/Plasma/CoreLib/hsFiles_Win.cpp b/Sources/Plasma/CoreLib/hsFiles_Win.cpp index 25e0c659..002682db 100644 --- a/Sources/Plasma/CoreLib/hsFiles_Win.cpp +++ b/Sources/Plasma/CoreLib/hsFiles_Win.cpp @@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsFiles.h" #include "HeadSpin.h" +#include "hsWindows.h" #if HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/CoreLib/hsThread.h b/Sources/Plasma/CoreLib/hsThread.h index e3d510a5..ffaebc3b 100644 --- a/Sources/Plasma/CoreLib/hsThread.h +++ b/Sources/Plasma/CoreLib/hsThread.h @@ -46,8 +46,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com typedef uint32_t hsMilliseconds; - -#ifdef HS_BUILD_FOR_UNIX +#ifdef HS_BUILD_FOR_WIN32 +# include "hsWindows.h" +#elif defined(HS_BUILD_FOR_UNIX) #include #include // We can't wait with a timeout with semas diff --git a/Sources/Plasma/CoreLib/hsWindows.h b/Sources/Plasma/CoreLib/hsWindows.h new file mode 100644 index 00000000..e1b50c39 --- /dev/null +++ b/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 . + +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 +# include // Pulls in WinSock 2 for us + + // This needs to be after #include , since it also includes windows.h +# ifdef USE_VLD +# include +# endif // USE_VLD +#endif // HS_BUILD_FOR_WIN32 + +#endif // _hsWindows_inc_ diff --git a/Sources/Plasma/CoreLib/plFileUtils.cpp b/Sources/Plasma/CoreLib/plFileUtils.cpp index 0250ef40..be270dd8 100644 --- a/Sources/Plasma/CoreLib/plFileUtils.cpp +++ b/Sources/Plasma/CoreLib/plFileUtils.cpp @@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "hsWindows.h" #include "hsStlUtils.h" #include "plFileUtils.h" #include "hsFiles.h" diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp index 196602a3..1e80ed3e 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp +++ b/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 +#include "hsWindows.h" #include diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp index 6f41e6b3..1a2a5e4f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.cpp @@ -184,18 +184,16 @@ PyObject* pyAgeVault::GetSubAgeLink( const pyAgeInfoStruct & info ) PYTHON_RETURN_NONE; } -const char* pyAgeVault::GetAgeGuid( void ) +plUUID pyAgeVault::GetAgeGuid( void ) { RelVaultNode * rvn = VaultGetAgeInfoNodeIncRef(); if (rvn) { VaultAgeInfoNode ageInfo(rvn); - GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid)); + plUUID uuid = plUUID(ageInfo.ageInstUuid); rvn->DecRef(); + return uuid; } - else { - fAgeGuid[0] = 0; - } - return fAgeGuid; + return plUUID(); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h b/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h index d2aed275..d3ad72a9 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyAgeVault.h @@ -64,12 +64,10 @@ class pyAgeInfoStruct; class pyVaultChronicleNode; class pySDLStateDataRecord; class pyVaultTextNoteNode; +class plUUID; class pyAgeVault { -private: - mutable char fAgeGuid[MAX_PATH]; // for getting Age GUID - protected: pyAgeVault(); @@ -84,7 +82,7 @@ public: static void AddPlasmaClasses(PyObject *m); - const char* GetAgeGuid( void ); + plUUID GetAgeGuid( void ); PyObject * GetAgeSDL() const; // returns pySDLStateDataRecord void UpdateAgeSDL( pySDLStateDataRecord & pyrec ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAgeVaultGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAgeVaultGlue.cpp index 1b96dc93..eddee8d3 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAgeVaultGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAgeVaultGlue.cpp @@ -117,7 +117,7 @@ PYTHON_METHOD_DEFINITION(ptAgeVault, getSubAgeLink, args) 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) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp index c3a2bc1f..42f3ee87 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #pragma hdrstop #include "pyDniInfoSource.h" -#include "pnUtils/pnUtils.h" +#include "pnUUID/pnUUID.h" #include "plUnifiedTime/plUnifiedTime.h" #include "plVault/plAgeInfoSource.h" #include "plVault/plVault.h" @@ -100,16 +100,16 @@ const char * pyDniInfoSource::GetAgeName( void ) const return fAgeName; } -const char * pyDniInfoSource::GetAgeGuid( void ) const +plUUID pyDniInfoSource::GetAgeGuid( void ) const { - RelVaultNode * node = VaultGetAgeInfoNodeIncRef(); - if (!node) - return ""; + if (RelVaultNode * node = VaultGetAgeInfoNodeIncRef()) + { + VaultAgeInfoNode ageInfo(node); + plUUID uuid = plUUID(ageInfo.ageInstUuid); + node->DecRef(); - VaultAgeInfoNode ageInfo(node); - - GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid)); - node->DecRef(); + return uuid; + } - return fAgeGuid; + return plUUID(); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h index a716aec4..614e5605 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSource.h @@ -46,12 +46,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pyGlueHelpers.h" class pyDniCoordinates; +class plUUID; class pyDniInfoSource { private: mutable char * fAgeName; - mutable char fAgeGuid[MAX_PATH]; protected: pyDniInfoSource(); @@ -74,7 +74,7 @@ public: // name of current age const char * GetAgeName( void ) const; // unique identifier for this age instance - const char * GetAgeGuid( void ) const; + plUUID GetAgeGuid( void ) const; }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp index e36b77c0..8c6f5cb2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDniInfoSourceGlue.cpp @@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #pragma hdrstop #include "pyDniInfoSource.h" +#include "pnUUID/pnUUID.h" // glue functions PYTHON_CLASS_DEFINITION(ptDniInfoSource, pyDniInfoSource); @@ -73,7 +74,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeName) 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) diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp index da52a211..9d4020f6 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp @@ -40,10 +40,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include "HeadSpin.h" - #if HS_BUILD_FOR_WIN32 -#include "vfw.h" +# include "hsWindows.h" +# include #endif // HS_BUILD_FOR_WIN32 #include "plLayerAVI.h" diff --git a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp b/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp index 4e041c33..e19d7c9a 100644 --- a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp +++ b/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 "plProfile.h" #include "hsTimer.h" - +#include "hsWindows.h" static uint32_t gCyclesPerMS = 0; diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h b/Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h index 60ac846a..e5989c98 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h +++ b/Sources/Plasma/NucleusLib/pnInputCore/plKeyDef.h @@ -42,10 +42,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plKeyDef_inc #define plKeyDef_inc -#include "HeadSpin.h" - #if HS_BUILD_FOR_WIN32 +#include "hsWindows.h" // FIXME: This gives me a sad. + #define VK_BACK_QUOTE 0xc0 // MinGW is missing these definitions: #ifndef VK_OEM_PLUS diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h b/Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h index 4bc992be..9ccb2258 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h +++ b/Sources/Plasma/NucleusLib/pnInputCore/plOSMsg.h @@ -53,6 +53,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // for Win32: #ifdef HS_BUILD_FOR_WIN32 +#include "hsWindows.h" // FIXME: This gives me a sad + enum plOSMsg { KEYDOWN = WM_KEYDOWN, diff --git a/Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h index e3b7c4da..027286d7 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plEventCallbackMsg.h @@ -116,9 +116,19 @@ protected: plMessage *fMsg; public: - plMessage *GetMessage() { return fMsg; } - void SetMessage(plMessage *msg) { fMsg = msg; hsRefCnt_SafeRef(msg); } - void SendMessage() { fMsg->SendAndKeep(); } + plMessage* GetMessageNoRef() const { return fMsg; } + void SetMessageRef(plMessage *msg) + { + hsRefCnt_SafeUnRef(fMsg); + hsRefCnt_SafeRef(msg); + fMsg = msg; + } + + void SendMessageAndKeep() + { + if (fMsg) + fMsg->SendAndKeep(); + } plEventCallbackInterceptMsg() : plEventCallbackMsg(), fMsg(nil) {} ~plEventCallbackInterceptMsg() { hsRefCnt_SafeUnRef(fMsg); fMsg = nil; } diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetAddress.h b/Sources/Plasma/NucleusLib/pnNetCommon/plNetAddress.h index bf699251..17b64cda 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetAddress.h +++ b/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 #include "HeadSpin.h" +#include "hsWindows.h" // FIXME #include "plString.h" #include "hsStlUtils.h" diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp index 0302cd06..342875ea 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "pnNetCommon.h" +#include "hsWindows.h" #if HS_BUILD_FOR_UNIX # include diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h index 197046c2..a6e2dbca 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h +++ b/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 #define pnNetCommon_h_inc -#include "HeadSpin.h" -#include "plString.h" -#include "hsStlUtils.h" #include "hsRefCnt.h" #include "hsStream.h" #include "pnFactory/plCreatable.h" +class plString; + // // main logging switch // diff --git a/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp b/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp index 1eb0aa72..9619ad69 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp @@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsTimer.h" #include "HeadSpin.h" +#include "hsWindows.h" #include "plTweak.h" diff --git a/Sources/Plasma/NucleusLib/pnTimer/pnBuildDates.cpp b/Sources/Plasma/NucleusLib/pnTimer/pnBuildDates.cpp index 9289219a..ee513532 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/pnBuildDates.cpp +++ b/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 "hsWindows.h" #include "pnTimer/pnBuildDates.h" char pnBuildDates::fBuildDate[ 128 ] = __DATE__; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h index 9bf09072..1f465b12 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h @@ -65,8 +65,10 @@ typedef struct _EAXREVERBPROPERTIES EAXREVERBPROPERTIES; #include "plEAXStructures.h" #endif -#if !HS_BUILD_FOR_WIN32 -#define GUID char* +#if HS_BUILD_FOR_WIN32 + typedef struct _GUID GUID; +#else +# define GUID char* #endif class plEAXListener diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp index 9998ceef..df69d6aa 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp +++ b/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 +#include "hsWindows.h" #include diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h index af0a1e3c..459fc3c0 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h +++ b/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 "hsStlUtils.h" +#include "hsWindows.h" // FIXME #include #include "plAudioFileReader.h" diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp index 1d53edca..375e2f53 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp @@ -110,7 +110,7 @@ bool plArmatureEffectsMgr::MsgReceive(plMessage* msg) if (iMsg) { if (fEnabled) - iMsg->SendMessage(); + iMsg->SendMessageAndKeep(); } plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index 018ccb09..05efeb1c 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -2430,7 +2430,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at iMsg->AddReceiver(fEffects->GetKey()); iMsg->fEventTime = time; iMsg->fEvent = kTime; - iMsg->SetMessage(msg); + iMsg->SetMessageRef(msg); atc->AddCallback(iMsg); hsRefCnt_SafeUnRef(msg); hsRefCnt_SafeUnRef(iMsg); @@ -2442,7 +2442,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at iMsg->AddReceiver(fEffects->GetKey()); iMsg->fEventTime = time; iMsg->fEvent = kTime; - iMsg->SetMessage(foot); + iMsg->SetMessageRef(foot); atc->AddCallback(iMsg); hsRefCnt_SafeUnRef(foot); hsRefCnt_SafeUnRef(iMsg); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp index b447d820..ee7ae2d3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp @@ -285,7 +285,7 @@ bool plAvBrainSwim::Apply(double time, float elapsed) iMsg->AddReceiver(fAvMod->GetArmatureEffects()->GetKey()); iMsg->fEventTime = (float)time; iMsg->fEvent = kTime; - iMsg->SetMessage(msg); + iMsg->SetMessageRef(msg); iMsg->Send(); } } diff --git a/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp b/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp index 3e8d5320..d3a167a9 100755 --- a/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp +++ b/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp @@ -40,8 +40,8 @@ Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" #include "plClipboard.h" +#include "hsWindows.h" plClipboard& plClipboard::GetInstance() { diff --git a/Sources/Plasma/PubUtilLib/plFile/plBrowseFolder.h b/Sources/Plasma/PubUtilLib/plFile/plBrowseFolder.h index 9c7ad37a..517dcf6b 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plBrowseFolder.h +++ b/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 #define plBrowseFolder_h_inc -#include "HeadSpin.h" - #ifdef HS_BUILD_FOR_WIN32 +#include "HeadSpin.h" +#include "hsWindows.h" + // // Gets a directory using the "Browse for Folder" dialog. // diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp index c090e7f8..eef375fd 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plSecureStream.h" +#include "hsWindows.h" #include "plFileUtils.h" #include "hsSTLStream.h" diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h index 59b30d6f..2f986fda 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h @@ -46,9 +46,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsStream.h" #if HS_BUILD_FOR_WIN32 -# define hsFD HANDLE + typedef void* HANDLE; +# define hsFD HANDLE #else -# define hsFD FILE* +# define hsFD FILE* #endif // A slightly more secure stream then plEncryptedStream in that it uses windows file functions diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h b/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h index ac5edd39..1d16c8a5 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h +++ b/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h @@ -42,6 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef hsCodec_inc #define hsCodec_inc +#include "HeadSpin.h" + class plMipmap; class hsCodec diff --git a/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp index f416365e..7a15d1db 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp +++ b/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 +#include "hsWindows.h" #include #endif diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h index 06f9a8ea..cf35388e 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _plDynSurfaceWriter_h #include "hsColorRGBA.h" - // EVIL +#include "hsWindows.h" // FIXME: windows :( struct hsMatrix44; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h index 98f447f1..6c97cf2b 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h @@ -63,8 +63,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsColorRGBA.h" - // EVIL #include "hsTemplates.h" +#include "hsWindows.h" // FIXME: Windows header level include :( #if HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp index d4593d62..687bab49 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" // plInputManager.cpp #define DIRECTINPUT_VERSION 0x0800 #include diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index 33d623ba..4fd64e35 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/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 #include "HeadSpin.h" +#include "hsWindows.h" #include @@ -1491,7 +1492,7 @@ void hsG3DDeviceSelector::IFudgeDirectXDevice( hsG3DDeviceRecord &record, D3DEnum_DeviceInfo *deviceInfo ) { 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; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h index e2c63c3c..dd006b55 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h @@ -396,10 +396,10 @@ protected: uint32_t IAdjustDirectXMemory( uint32_t cardMem ); 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 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 void ITryOpenGL( hsWinRef winRef ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp index 349980ff..cc014d6f 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp @@ -39,7 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" + +#include "hsWindows.h" #include diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp index 373ad31d..dc5ce0d7 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDTProgressMgr.cpp @@ -49,7 +49,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include #include "HeadSpin.h" #include "plDTProgressMgr.h" #include "plPipeline.h" diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp index 67dbfb5d..88d8ed21 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp +++ b/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 "hsWindows.h" #include #include diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp index 79822c7b..4e1fb102 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp @@ -652,7 +652,7 @@ short hsGDirect3DTnLEnumerate::IGetDXBitDepth( D3DFORMAT format ) bool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, // In void *driverInfo, void *deviceInfo, - DWORD *vendorID, DWORD *deviceID, // Out + uint32_t *vendorID, uint32_t *deviceID, // Out char **driverString, char **descString ) { D3DEnum_DriverInfo *driverD3DInfo = (D3DEnum_DriverInfo *)driverInfo; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp index 1c0624ae..a938bac1 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp +++ b/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 "hsWindows.h" #include #include diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp index eedfa3a0..987219ca 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #include #include diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.cpp index 19be9731..5a2f2e06 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.cpp +++ b/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 "hsWindows.h" #include #include #include #include "hsWinRef.h" -#include "HeadSpin.h" #include "plDXTextFont.h" #include "plDXPipeline.h" diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp index 3c54cfac..cc02d09c 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp @@ -40,12 +40,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #include #include -#include "HeadSpin.h" - #include "plDXVertexShader.h" #include "plSurface/plShader.h" diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp index 975590b5..472dbda4 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp @@ -353,7 +353,7 @@ uint8_t plGBufferGroup::ICalcVertexSize( uint8_t &liteStride ) } liteStride = size; - size += sizeof( DWORD ) * 2; // diffuse + specular + size += sizeof( uint32_t ) * 2; // diffuse + specular return size; } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp index 4e6a4561..45c03199 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp +++ b/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" -// 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 /////////////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp index 7f1dea0d..9eb287f5 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp +++ b/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 "hsWindows.h" #include "plTextFont.h" #include "plDebugText.h" diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp index 0625ef11..d84618cd 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp +++ b/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 "hsWindows.h" #include "hsMatrix44.h" #include "pnKeyedObject/hsKeyedObject.h" #include "plTextGenerator.h" diff --git a/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp b/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp index 765b94a4..609e8902 100644 --- a/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketWriter.cpp @@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ +#include "HeadSpin.h" #include "plBufferedSocketWriter.h" #include "plTcpSocket.h" diff --git a/Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp b/Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp index 7a73e635..713351f1 100644 --- a/Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp +++ b/Sources/Plasma/PubUtilLib/plSockets/plFdSet.cpp @@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ +#include "HeadSpin.h" #include "plFdSet.h" #include "plSocket.h" diff --git a/Sources/Plasma/PubUtilLib/plSockets/plNet.h b/Sources/Plasma/PubUtilLib/plSockets/plNet.h index d4459dff..f2f56f88 100644 --- a/Sources/Plasma/PubUtilLib/plSockets/plNet.h +++ b/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 -#include "HeadSpin.h" - - //////////////////////////////////////////////////// // Windows net types #if HS_BUILD_FOR_WIN32 +#include "hsWindows.h" + const int kBlockingError = WSAEWOULDBLOCK; const int kTimeoutError = WSAETIMEDOUT; const SOCKET kBadSocket = 0xffffffff; diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index 19f50731..8bbd3d91 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include "plUnifiedTime.h" #include "hsStlUtils.h" +#include "hsWindows.h" #if HS_BUILD_FOR_UNIX diff --git a/Sources/Tools/plFontConverter/plFontConverter.cpp b/Sources/Tools/plFontConverter/plFontConverter.cpp index f884e8ff..88ac9885 100644 --- a/Sources/Tools/plFontConverter/plFontConverter.cpp +++ b/Sources/Tools/plFontConverter/plFontConverter.cpp @@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define WINDOWNAME "plFontConverter" #include "HeadSpin.h" +#include "hsWindows.h" #include "res/resource.h" #include "pnAllCreatables.h" diff --git a/Sources/Tools/plFontConverter/plFontConverterProc.cpp b/Sources/Tools/plFontConverter/plFontConverterProc.cpp index 7aa8ebf6..1437a492 100644 --- a/Sources/Tools/plFontConverter/plFontConverterProc.cpp +++ b/Sources/Tools/plFontConverter/plFontConverterProc.cpp @@ -40,9 +40,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #include "res/resource.h" #include +#include #include +#include #include #include diff --git a/Sources/Tools/plLocalizationEditor/plAddDlgs.h b/Sources/Tools/plLocalizationEditor/plAddDlgs.h index af9832cc..96147057 100644 --- a/Sources/Tools/plLocalizationEditor/plAddDlgs.h +++ b/Sources/Tools/plLocalizationEditor/plAddDlgs.h @@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define __plAddDlgs_h__ #include "HeadSpin.h" +#include "hsWindows.h" #include class plAddElementDlg diff --git a/Sources/Tools/plLocalizationEditor/plEditDlg.h b/Sources/Tools/plLocalizationEditor/plEditDlg.h index b11bc468..d6ab43b4 100644 --- a/Sources/Tools/plLocalizationEditor/plEditDlg.h +++ b/Sources/Tools/plLocalizationEditor/plEditDlg.h @@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _pfEditDlg_h #include "HeadSpin.h" +#include "hsWindows.h" #include // Little trick to show a wait cursor while something is working diff --git a/Sources/Tools/plResBrowser/plResBrowser.cpp b/Sources/Tools/plResBrowser/plResBrowser.cpp index dc45bf70..d2fc1af4 100644 --- a/Sources/Tools/plResBrowser/plResBrowser.cpp +++ b/Sources/Tools/plResBrowser/plResBrowser.cpp @@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define WINDOWNAME "plResBrowser" #include "HeadSpin.h" +#include "hsWindows.h" #include "res/resource.h" #include "pnAllCreatables.h" diff --git a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp index 54482223..93a22d28 100644 --- a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp +++ b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp @@ -40,9 +40,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #include "hsTemplates.h" #include "res/resource.h" +#include #include +#include #include #include diff --git a/Sources/Tools/plResBrowser/plResTreeView.cpp b/Sources/Tools/plResBrowser/plResTreeView.cpp index 0bf6322b..87c13e5f 100644 --- a/Sources/Tools/plResBrowser/plResTreeView.cpp +++ b/Sources/Tools/plResBrowser/plResTreeView.cpp @@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" #include "plResTreeView.h" diff --git a/Sources/Tools/plResBrowser/plWinRegistryTools.cpp b/Sources/Tools/plResBrowser/plWinRegistryTools.cpp index ef51b9c8..46ef0538 100644 --- a/Sources/Tools/plResBrowser/plWinRegistryTools.cpp +++ b/Sources/Tools/plResBrowser/plWinRegistryTools.cpp @@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "hsWindows.h" #include "plWinRegistryTools.h" From 72000fd0c12aa2a2025dda8d132250b4112046d9 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 11 Dec 2012 22:36:58 -0500 Subject: [PATCH 04/13] Fixes some oversights. Okay, what moron left out the include guards on hsSTLStream.h? Come on, man. --- Sources/Plasma/CoreLib/hsSTLStream.h | 6 ++++++ Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/Sources/Plasma/CoreLib/hsSTLStream.h b/Sources/Plasma/CoreLib/hsSTLStream.h index 40d8af9c..b4144679 100644 --- a/Sources/Plasma/CoreLib/hsSTLStream.h +++ b/Sources/Plasma/CoreLib/hsSTLStream.h @@ -39,6 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + +#ifndef _hsSTLStream_h_inc_ +#define _hsSTLStream_h_inc_ + #include "hsStream.h" #include "hsStlUtils.h" @@ -82,3 +86,5 @@ public: // In case you want to try and be efficient with your memory allocations void Reserve(uint32_t bytes) { fVector.reserve(bytes); } }; + +#endif // _hsSTLStream_h_inc_ diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h b/Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h index 949737e9..a7d265ca 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h +++ b/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 +// Got Damn eap... +// Duplicate Symbols in shlwapi! +#ifdef _INC_SHLWAPI +# undef StrChr +# undef StrDup +# undef StrStr +#endif // _INC_SHLWAPI + /***************************************************************************** * * String functions From bb4d36e69de4d23daf5da70b135ad46fa1805812 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 17 Nov 2012 19:27:50 -0500 Subject: [PATCH 05/13] Remove windoze include from hsThread.h --- Sources/Plasma/CoreLib/HeadSpin.h | 1 + Sources/Plasma/CoreLib/hsThread.h | 14 +++----------- Sources/Plasma/CoreLib/hsThread_Win.cpp | 18 +++++++++++++++--- .../FeatureLib/pfConsole/pfDispatchLog.cpp | 2 ++ .../FeatureLib/pfCrashHandler/plCrashCli.cpp | 1 - .../FeatureLib/pfCrashHandler/plCrashCli.h | 1 + .../pfCrashHandler/plCrash_Private.h | 1 + .../Plasma/PubUtilLib/plAudio/plEAXEffects.cpp | 5 ++++- .../PubUtilLib/plPhysX/plSimulationMgr.cpp | 2 +- 9 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index aaa03704..e032b5f6 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -82,6 +82,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com typedef HINSTANCE hsWindowInst; typedef HINSTANCE HMODULE; typedef long HRESULT; + typedef void* HANDLE; #else typedef int32_t* hsWindowHndl; typedef int32_t* hsWindowInst; diff --git a/Sources/Plasma/CoreLib/hsThread.h b/Sources/Plasma/CoreLib/hsThread.h index ffaebc3b..49d0da2c 100644 --- a/Sources/Plasma/CoreLib/hsThread.h +++ b/Sources/Plasma/CoreLib/hsThread.h @@ -46,9 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com typedef uint32_t hsMilliseconds; -#ifdef HS_BUILD_FOR_WIN32 -# include "hsWindows.h" -#elif defined(HS_BUILD_FOR_UNIX) +#ifdef HS_BUILD_FOR_UNIX #include #include // We can't wait with a timeout with semas @@ -64,7 +62,7 @@ class hsThread { public: #if HS_BUILD_FOR_WIN32 - typedef DWORD ThreadId; + typedef uint32_t ThreadId; #elif HS_BUILD_FOR_UNIX typedef pthread_t ThreadId; #endif @@ -88,7 +86,7 @@ public: virtual ~hsThread(); // calls Stop() #if HS_BUILD_FOR_WIN32 ThreadId GetThreadId() { return fThreadId; } - static ThreadId GetMyThreadId() { return GetCurrentThreadId(); } + static ThreadId GetMyThreadId(); #elif HS_BUILD_FOR_UNIX ThreadId GetThreadId() { return fPThread; } static ThreadId GetMyThreadId() { return pthread_self(); } @@ -204,13 +202,7 @@ public: class hsSleep { public: -#if HS_BUILD_FOR_UNIX static void Sleep(uint32_t millis); - -#elif HS_BUILD_FOR_WIN32 - static void Sleep(uint32_t millis) { ::Sleep(millis); } - -#endif }; ////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/CoreLib/hsThread_Win.cpp b/Sources/Plasma/CoreLib/hsThread_Win.cpp index bbb27eca..bb1b0aa1 100644 --- a/Sources/Plasma/CoreLib/hsThread_Win.cpp +++ b/Sources/Plasma/CoreLib/hsThread_Win.cpp @@ -40,9 +40,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include - #include "hsThread.h" +#include "hsWindows.h" +#include #include "hsExceptions.h" #include "hsMemory.h" @@ -79,6 +79,11 @@ hsThread::~hsThread() this->Stop(); } +hsThread::ThreadId hsThread::GetMyThreadId() +{ + return GetCurrentThreadId(); +} + void hsThread::Start() { if (fThreadH == nil) @@ -237,4 +242,11 @@ bool hsEvent::Wait(hsMilliseconds timeToWait) void hsEvent::Signal() { ::SetEvent(fEvent); -} \ No newline at end of file +} + +/////////////////////////////////////////////////////////////// + +void hsSleep::Sleep(uint32_t millis) +{ + ::Sleep(millis); +} diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp index ef3879a2..968f6599 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp @@ -39,6 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + +#include "hsWindows.h" #include "hsTimer.h" #include "pfDispatchLog.h" #include "plStatusLog/plStatusLog.h" diff --git a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.cpp b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.cpp index 881c761c..fc0fea95 100644 --- a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.cpp +++ b/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 "plCrash_Private.h" -#include "plString.h" #ifdef HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h index 0308a586..b51e8499 100644 --- a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h +++ b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashCli.h @@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _pfCrashCli_h_ #include "HeadSpin.h" +#include "hsWindows.h" #include "plCrashBase.h" struct plCrashMemLink; diff --git a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrash_Private.h b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrash_Private.h index 70e9ec33..4274234a 100644 --- a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrash_Private.h +++ b/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_ #include "HeadSpin.h" +#include "hsWindows.h" #define CRASH_NOTIFY_SUFFIX "CrashNotify" #define CRASH_HANDLE_SUFFIX "CrashHandled" diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp index e6d82682..5feb43ff 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp +++ b/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 "hsWindows.h" #include "hsThread.h" + #ifndef EAX_SDK_AVAILABLE -#include "plEAXStructures.h" +# include "plEAXStructures.h" #endif + #include "plEAXEffects.h" #include "plAudioCore/plAudioCore.h" #include "plDSoundBuffer.h" diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp index 5a4b768e..aeb4ad17 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp @@ -402,7 +402,7 @@ bool plSimulationMgr::InitSimulation() if ( !plPXConvert::Validate() ) { #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 return false; // client will handle this and ask user to install } From 3ea82ca589726c05e46fbee60f398f013d7216ab Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 18 Nov 2012 00:29:43 -0500 Subject: [PATCH 06/13] Be smarter about Pch.[h|cpp] files As pointed out in #225, Pch.cpp looks suspiciously like a garbage file when precompiled headers are disabled in cmake. To solve that, I have changed the precompiled header function to add the Pch source files only when pch is enabled. This should prevent future accidents. --- Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt | 4 +--- cmake/PrecompiledHeader.cmake | 9 +++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt b/Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt index dd743fb9..f1ef9460 100644 --- a/Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt +++ b/Sources/Plasma/FeatureLib/pfPython/CMakeLists.txt @@ -19,7 +19,6 @@ set(pfPython_SOURCES cyParticleSys.cpp cyPhysics.cpp cyPythonInterface.cpp - Pch.cpp plPythonFileMod.cpp plPythonPack.cpp plPythonSDLModifier.cpp @@ -105,7 +104,6 @@ set(pfPython_HEADERS cyParticleSys.h cyPhysics.h cyPythonInterface.h - Pch.h pfPythonCreatable.h plPythonFileMod.h plPythonHelpers.h @@ -340,7 +338,7 @@ set(pfPython_GAMES ${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}) source_group("Source Files" FILES ${pfPython_SOURCES}) diff --git a/cmake/PrecompiledHeader.cmake b/cmake/PrecompiledHeader.cmake index 8392b2e3..116c90c7 100644 --- a/cmake/PrecompiledHeader.cmake +++ b/cmake/PrecompiledHeader.cmake @@ -8,7 +8,7 @@ if(PCH_SUPPORTED) option(PLASMA_USE_PCH "Enable precompiled headers?" ON) endif(PCH_SUPPORTED) -macro(use_precompiled_header PrecompiledHeader PrecompiledSource) +function(use_precompiled_header PrecompiledHeader PrecompiledSource Headers Sources) if(PLASMA_USE_PCH) if(MSVC) get_filename_component(PrecompiledBasename ${PrecompiledHeader} NAME_WE) @@ -19,5 +19,10 @@ macro(use_precompiled_header PrecompiledHeader PrecompiledSource) add_definitions(/FI"${PrecompiledHeader}") set_source_files_properties(${PrecompiledSource} PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\"") endif(MSVC) + + # Add the Pch.[h|cpp] to the appropriate sets + # OT: This has to be the oddest thing I've ever written =/ + set(${Headers} ${${Headers}} ${PrecompiledHeader} PARENT_SCOPE) + set(${Sources} ${${Sources}} ${PrecompiledSource} PARENT_SCOPE) endif(PLASMA_USE_PCH) -endmacro(use_precompiled_header) \ No newline at end of file +endfunction(use_precompiled_header) From 2dce76cb363198725ef937224abe8be30ae216ae Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 8 Dec 2012 23:32:24 -0500 Subject: [PATCH 07/13] Smack MaxComponent This is a huge, complicated project. Therefore, this untangling is not as comprehensive as the others. It should compile faster and be a little bit neater, but that's it. Don't expect the headers to look much better! --- Sources/Tools/MaxComponent/CMakeLists.txt | 5 +- .../MaxComponent/{plComponent.cpp => Pch.cpp} | 12 +- .../{plAutoComponent.cpp => Pch.h} | 127 +++++++----- Sources/Tools/MaxComponent/pfGUISkinComp.cpp | 15 +- Sources/Tools/MaxComponent/plAGComponents.cpp | 18 +- .../MaxComponent/plActivatorBaseComponent.cpp | 7 +- .../MaxComponent/plActivatorComponent.cpp | 3 +- Sources/Tools/MaxComponent/plAnimCompProc.cpp | 25 +-- Sources/Tools/MaxComponent/plAnimCompProc.h | 4 +- .../Tools/MaxComponent/plAnimComponent.cpp | 19 +- Sources/Tools/MaxComponent/plAnimComponent.h | 28 +-- .../MaxComponent/plAnimEventComponent.cpp | 6 +- .../Tools/MaxComponent/plAnimEventComponent.h | 3 + .../Tools/MaxComponent/plAudioComponents.cpp | 33 +-- .../Tools/MaxComponent/plAudioComponents.h | 16 +- Sources/Tools/MaxComponent/plAutoUIBase.cpp | 12 +- Sources/Tools/MaxComponent/plAutoUIBase.h | 6 - Sources/Tools/MaxComponent/plAutoUIBlock.cpp | 12 +- Sources/Tools/MaxComponent/plAutoUIComp.cpp | 11 +- Sources/Tools/MaxComponent/plAutoUIComp.h | 3 +- Sources/Tools/MaxComponent/plAutoUIParams.cpp | 22 +- Sources/Tools/MaxComponent/plAutoUIParams.h | 6 +- .../Tools/MaxComponent/plAvatarComponent.cpp | 34 +-- .../Tools/MaxComponent/plAvatarComponent.h | 1 - .../MaxComponent/plBehavioralComponents.cpp | 15 +- Sources/Tools/MaxComponent/plBipedKiller.cpp | 32 +-- .../Tools/MaxComponent/plBlowComponent.cpp | 18 +- .../Tools/MaxComponent/plCAnimParamBlock.cpp | 11 +- .../Tools/MaxComponent/plCAnimParamBlock.h | 5 - .../Tools/MaxComponent/plCameraComponent.cpp | 17 +- .../Tools/MaxComponent/plCameraComponent.h | 1 + .../Tools/MaxComponent/plCameraComponents.cpp | 32 +-- .../MaxComponent/plClickDragComponent.cpp | 23 +- .../MaxComponent/plClickableComponent.cpp | 18 +- .../Tools/MaxComponent/plClickableComponent.h | 2 - .../Tools/MaxComponent/plClimbComponent.cpp | 20 +- Sources/Tools/MaxComponent/plClimbComponent.h | 3 +- .../MaxComponent/plClothingComponent.cpp | 19 +- .../Tools/MaxComponent/plClothingComponent.h | 2 - .../Tools/MaxComponent/plClusterComponent.cpp | 36 ++-- .../Tools/MaxComponent/plComponentBase.cpp | 10 +- Sources/Tools/MaxComponent/plComponentBase.h | 28 ++- Sources/Tools/MaxComponent/plComponentMgr.cpp | 5 +- Sources/Tools/MaxComponent/plComponentMgr.h | 14 +- .../Tools/MaxComponent/plComponentProcBase.h | 5 +- .../Tools/MaxComponent/plComponentTools.cpp | 4 +- Sources/Tools/MaxComponent/plComponentTools.h | 10 +- Sources/Tools/MaxComponent/plDicer.cpp | 7 +- .../Tools/MaxComponent/plDistribComponent.cpp | 19 +- .../MaxComponent/plDistribComponent_old.cpp | 19 +- .../MaxComponent/plExcludeRegionComponent.cpp | 12 +- .../MaxComponent/plFootPrintComponent.cpp | 17 +- .../MaxComponent/plFootstepComponent.cpp | 15 +- .../Tools/MaxComponent/plGUIComponents.cpp | 26 +-- Sources/Tools/MaxComponent/plGUIComponents.h | 3 - .../Tools/MaxComponent/plGrassComponent.cpp | 21 +- .../Tools/MaxComponent/plIgnoreComponent.cpp | 11 +- .../MaxComponent/plImpactGadgetComponent.cpp | 196 ------------------ .../MaxComponent/plImpactGadgetComponent.h | 58 ------ .../MaxComponent/plInventoryObjComponent.cpp | 24 ++- .../MaxComponent/plInventoryObjComponent.h | 7 +- .../Tools/MaxComponent/plLODFadeComponent.cpp | 10 +- .../MaxComponent/plLightGrpComponent.cpp | 14 +- .../MaxComponent/plLightMapComponent.cpp | 12 +- .../Tools/MaxComponent/plLightMapComponent.h | 6 +- .../Tools/MaxComponent/plLineFollowComp.cpp | 14 +- Sources/Tools/MaxComponent/plMaxAnimUtils.cpp | 9 +- Sources/Tools/MaxComponent/plMaxWaveUtils.cpp | 3 +- .../Tools/MaxComponent/plMiscComponents.cpp | 40 ++-- Sources/Tools/MaxComponent/plMiscComponents.h | 4 +- Sources/Tools/MaxComponent/plMorphSeqComp.cpp | 14 +- .../MaxComponent/plMultistageBehComponent.cpp | 18 +- .../MaxComponent/plMultistageBehComponent.h | 3 - .../Tools/MaxComponent/plMultistageStage.cpp | 11 +- .../Tools/MaxComponent/plMultistageStage.h | 5 +- Sources/Tools/MaxComponent/plNPCSpawnComp.cpp | 11 +- Sources/Tools/MaxComponent/plNPCSpawnComp.h | 3 +- .../MaxComponent/plNavigableComponents.cpp | 22 +- .../MaxComponent/plNavigableComponents.h | 11 +- .../Tools/MaxComponent/plNoteTrackDlgComp.cpp | 6 +- .../Tools/MaxComponent/plNotetrackAnim.cpp | 6 +- Sources/Tools/MaxComponent/plNotetrackDlg.cpp | 9 +- Sources/Tools/MaxComponent/plNotetrackDlg.h | 4 +- .../MaxComponent/plObjectFlockerComponent.cpp | 9 +- .../Tools/MaxComponent/plOneShotComponent.cpp | 50 +---- .../Tools/MaxComponent/plOneShotComponent.h | 3 +- .../MaxComponent/plParticleComponents.cpp | 21 +- .../plPhysConstraintComponents.cpp | 11 +- .../MaxComponent/plPhysicalComponents.cpp | 17 +- .../Tools/MaxComponent/plPhysicalComponents.h | 1 - .../MaxComponent/plPickLocalizationDlg.cpp | 16 +- .../MaxComponent/plPickLocalizationDlg.h | 2 - .../Tools/MaxComponent/plPickMaterialMap.cpp | 10 +- .../Tools/MaxComponent/plPickMaterialMap.h | 12 +- Sources/Tools/MaxComponent/plPickNode.cpp | 13 +- Sources/Tools/MaxComponent/plPickNode.h | 3 +- Sources/Tools/MaxComponent/plPickNodeBase.cpp | 9 +- Sources/Tools/MaxComponent/plPickNodeBase.h | 8 +- Sources/Tools/MaxComponent/plPickNodeComp.cpp | 11 +- .../MaxComponent/plPythonFileComponent.cpp | 31 +-- .../MaxComponent/plPythonFileComponent.h | 3 +- Sources/Tools/MaxComponent/plRepComponent.cpp | 17 +- .../Tools/MaxComponent/plResponderAnim.cpp | 27 +-- Sources/Tools/MaxComponent/plResponderAnim.h | 6 +- Sources/Tools/MaxComponent/plResponderCmd.h | 7 +- .../MaxComponent/plResponderComponent.cpp | 15 +- .../Tools/MaxComponent/plResponderComponent.h | 10 +- .../MaxComponent/plResponderComponentPriv.h | 10 +- .../Tools/MaxComponent/plResponderGetComp.cpp | 8 +- .../Tools/MaxComponent/plResponderGetComp.h | 5 +- .../Tools/MaxComponent/plResponderLink.cpp | 26 ++- Sources/Tools/MaxComponent/plResponderLink.h | 7 +- Sources/Tools/MaxComponent/plResponderMtl.cpp | 20 +- Sources/Tools/MaxComponent/plResponderMtl.h | 13 +- .../Tools/MaxComponent/plResponderWait.cpp | 9 +- Sources/Tools/MaxComponent/plResponderWait.h | 5 +- Sources/Tools/MaxComponent/plSeekPoint.cpp | 15 +- .../Tools/MaxComponent/plShadowComponents.cpp | 14 +- .../Tools/MaxComponent/plShadowComponents.h | 4 +- .../Tools/MaxComponent/plSmoothComponent.cpp | 8 +- .../MaxComponent/plSoftVolumeComponent.cpp | 17 +- .../MaxComponent/plSoftVolumeComponent.h | 2 - .../MaxComponent/plTemplateComponent.cpp | 16 +- .../Tools/MaxComponent/plTypesComponents.cpp | 26 +-- .../MaxComponent/plVolumeGadgetComponent.cpp | 23 +- .../MaxComponent/plVolumeGadgetComponent.h | 3 - .../Tools/MaxComponent/plWaterComponent.cpp | 23 +- Sources/Tools/MaxComponent/plXImposter.cpp | 13 +- Sources/Tools/MaxMain/plMaxNode.h | 1 - Sources/Tools/MaxMain/plMaxNodeBase.h | 1 - 130 files changed, 967 insertions(+), 1042 deletions(-) rename Sources/Tools/MaxComponent/{plComponent.cpp => Pch.cpp} (87%) rename Sources/Tools/MaxComponent/{plAutoComponent.cpp => Pch.h} (50%) delete mode 100644 Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp delete mode 100644 Sources/Tools/MaxComponent/plImpactGadgetComponent.h diff --git a/Sources/Tools/MaxComponent/CMakeLists.txt b/Sources/Tools/MaxComponent/CMakeLists.txt index 670cc548..4baff985 100644 --- a/Sources/Tools/MaxComponent/CMakeLists.txt +++ b/Sources/Tools/MaxComponent/CMakeLists.txt @@ -52,7 +52,6 @@ set(MaxComponent_HEADERS plGrassComponent.h plGUICompClassIDs.h plGUIComponents.h - plImpactGadgetComponent.h plInventoryObjComponent.h plLightGrpComponent.h plLightMapComponent.h @@ -109,7 +108,6 @@ set(MaxComponent_SOURCES plAnimCompProc.cpp plAnimEventComponent.cpp plAudioComponents.cpp - plAutoComponent.cpp plAutoUIBase.cpp plAutoUIBlock.cpp plAutoUIComp.cpp @@ -126,7 +124,6 @@ set(MaxComponent_SOURCES plClimbComponent.cpp plClothingComponent.cpp plClusterComponent.cpp - plComponent.cpp plComponentBase.cpp plComponentMgr.cpp plComponentTools.cpp @@ -139,7 +136,6 @@ set(MaxComponent_SOURCES plGrassComponent.cpp plGUIComponents.cpp plIgnoreComponent.cpp - plImpactGadgetComponent.cpp plInventoryObjComponent.cpp plLightGrpComponent.cpp plLightMapComponent.cpp @@ -185,6 +181,7 @@ set(MaxComponent_SOURCES plXImposter.cpp ) +use_precompiled_header(Pch.h Pch.cpp MaxComponent_HEADERS MaxComponent_SOURCES) add_library(MaxComponent STATIC ${MaxComponent_HEADERS} diff --git a/Sources/Tools/MaxComponent/plComponent.cpp b/Sources/Tools/MaxComponent/Pch.cpp similarity index 87% rename from Sources/Tools/MaxComponent/plComponent.cpp rename to Sources/Tools/MaxComponent/Pch.cpp index 3b767288..0ff2c657 100644 --- a/Sources/Tools/MaxComponent/plComponent.cpp +++ b/Sources/Tools/MaxComponent/Pch.cpp @@ -39,9 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plComponent.h" -#include "plComponentReg.h" // Needed for the kTargs enum -#include "MaxMain/plMaxNode.h" +#include "Pch.h" +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxComponent + * + * This file prompts MSVC to generate a PCH file for the MaxComponent project. It + * has no function if precompiled headers are disabled in cmake. + */ \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plAutoComponent.cpp b/Sources/Tools/MaxComponent/Pch.h similarity index 50% rename from Sources/Tools/MaxComponent/plAutoComponent.cpp rename to Sources/Tools/MaxComponent/Pch.h index a527092a..c22008d9 100644 --- a/Sources/Tools/MaxComponent/plAutoComponent.cpp +++ b/Sources/Tools/MaxComponent/Pch.h @@ -39,61 +39,86 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -// Don't delete this, I use it for testing -Colin -#if 0 - -#include "max.h" -#include "resource.h" -#include "plComponent.h" -#include "plComponentReg.h" - -#include "plAutoUIComp.h" - -#include "plActivatorComponent.h" - -class plAutoComponent : public plComponent -{ -public: - plAutoComponent(); - bool Convert(plMaxNode *node, plErrorMsg *msg); -}; +#ifndef _MaxComponent_Pch_inc_ +#define _MaxComponent_Pch_inc_ -AUTO_CLASS_DESC(plAutoComponent, gAutoDesc, "Auto", "Auto", "Test", Class_ID(0x21807fcf, 0x156e2218)) +/** + * \file Pch.h + * \brief Precompiled Header for MaxComponent + */ -plAutoUIComp *gAutoUI; +// Standard Library +#include +#include +#include +#include +#include -void DummyCode() -{ - gAutoUI = new plAutoUIComp(&gAutoDesc); - - gAutoUI->AddCheckBox(0, "test", "Test", true); - gAutoUI->AddFloatSpinner(1, "t2", "T2", 0.5, 0.f, 100.f); - gAutoUI->AddEditBox(2, "blah", "Blah", "Test String", 5); - gAutoUI->AddPickNode(3, "pick", "Pick"); - - std::vector cids; - cids.push_back(ACTIVATOR_CID); - cids.push_back(RESPONDER_CID); - gAutoUI->AddPickNode(4, "pick2", "Pick2", &cids); -} - -plAutoComponent::plAutoComponent() -{ - fClassDesc = &gAutoDesc; - fClassDesc->MakeAutoParamBlocks(this); -} +// 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 +#include +#include + +// 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" -bool plAutoComponent::Convert(plMaxNode *node, plErrorMsg *msg) -{ - bool c1 = gAutoUI->GetCheckBox(0, this); - TSTR str = gAutoUI->GetEditBox(2, this); +#include "plActivatorBaseComponent.h" +#include "plAnimEventComponent.h" +#include "plAnimComponent.h" +#include "plAudioComponents.h" +#include "plBehavioralComponents.h" +#include "plPhysicalComponents.h" +#include "plMiscComponents.h" +#include "plResponderComponent.h" - for (int i = 0; i < gAutoUI->Count(3, this); i++) - INode *node = gAutoUI->GetPickNode(3, this, i); - - return true; -} +#include "resource.h" -#endif \ No newline at end of file +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#if MAX_VERSION_MAJOR >= 13 +# include +#endif + +#endif // _MaxComponent_Pch_inc_ diff --git a/Sources/Tools/MaxComponent/pfGUISkinComp.cpp b/Sources/Tools/MaxComponent/pfGUISkinComp.cpp index d9126f1e..385f1959 100644 --- a/Sources/Tools/MaxComponent/pfGUISkinComp.cpp +++ b/Sources/Tools/MaxComponent/pfGUISkinComp.cpp @@ -39,16 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" #include "hsTemplates.h" +#include "hsWindows.h" -#include "pfGUISkinComp.h" -#include "plGUICompClassIDs.h" +#include +#include -#include "MaxMain/plMaxNodeBase.h" #include "MaxMain/MaxCompat.h" +#include "MaxMain/plMaxNodeBase.h" +#include "resource.h" +#pragma hdrstop + +#include "pfGUISkinComp.h" +#include "plGUICompClassIDs.h" pfGUISkinEditProc *pfGUISkinEditProc::fInstance = nil; diff --git a/Sources/Tools/MaxComponent/plAGComponents.cpp b/Sources/Tools/MaxComponent/plAGComponents.cpp index f868f833..5a2c00a9 100644 --- a/Sources/Tools/MaxComponent/plAGComponents.cpp +++ b/Sources/Tools/MaxComponent/plAGComponents.cpp @@ -39,16 +39,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==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 "plComponentReg.h" +#include "resource.h" + +#include "MaxMain/plMaxNode.h" +#include "MaxMain/plMaxNodeData.h" +#pragma hdrstop //Messages related -#include "plgDispatch.h" #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plIntRefMsg.h" #include "pnMessage/plNodeRefMsg.h" @@ -57,12 +61,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //Scene related #include "plScene/plSceneNode.h" #include "plInterp/plController.h" -#include "MaxMain/plMaxNode.h" -#include "MaxMain/plMaxNodeData.h" -#include "pnKeyedObject/plKey.h" #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plCoordinateInterface.h" -#include "hsResMgr.h" //Conversion related #include "MaxConvert/hsConverterUtils.h" diff --git a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp index c1fe5739..be49e11d 100644 --- a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp +++ b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp @@ -39,15 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plActivatorBaseComponent.h" #include "pnKeyedObject/plKey.h" +#include "hsResMgr.h" + +#include "plActivatorBaseComponent.h" #include "MaxMain/plMaxNode.h" +#pragma hdrstop #include "plModifier/plLogicModifier.h" #include "pnSceneObject/plSceneObject.h" -#include "hsResMgr.h" #include "pnMessage/plObjRefMsg.h" void plActivatorBaseComponent::AddReceiverKey(plKey pKey, plMaxNode* node) diff --git a/Sources/Tools/MaxComponent/plActivatorComponent.cpp b/Sources/Tools/MaxComponent/plActivatorComponent.cpp index 7e095468..12184884 100644 --- a/Sources/Tools/MaxComponent/plActivatorComponent.cpp +++ b/Sources/Tools/MaxComponent/plActivatorComponent.cpp @@ -39,9 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" + #include "plComponent.h" #include "plComponentReg.h" +#pragma hdrstop void DummyCodeIncludeFuncActive() {} diff --git a/Sources/Tools/MaxComponent/plAnimCompProc.cpp b/Sources/Tools/MaxComponent/plAnimCompProc.cpp index 6fd7cb31..5c639c31 100644 --- a/Sources/Tools/MaxComponent/plAnimCompProc.cpp +++ b/Sources/Tools/MaxComponent/plAnimCompProc.cpp @@ -39,16 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plAnimCompProc.h" -#include "MaxMain/plMaxNode.h" +#include "plAnimComponent.h" #include "plComponentBase.h" +#include "MaxMain/plMaxNode.h" + +#include +#include +#pragma hdrstop + +#include "plAnimCompProc.h" #include "plPickNode.h" -#include "plAnimComponent.h" +#include "plPickNodeBase.h" +#include "plNotetrackAnim.h" #include "plInterp/plAnimEaseTypes.h" +#include "plPickMaterialMap.h" +#include "MaxMain/plMtlCollector.h" + plAnimCompProc::plAnimCompProc() : fCompButtonID(0), fCompParamID(0), @@ -295,8 +304,6 @@ void plMtlAnimProc::IUpdateNodeButton(HWND hWnd, IParamBlock2* pb) ILoadAnimCombo(hWnd, pb); } -#include "plNotetrackAnim.h" - void plMtlAnimProc::ILoadAnimCombo(HWND hWnd, IParamBlock2* pb) { HWND hAnim = GetDlgItem(hWnd, fAnimComboID); @@ -331,9 +338,6 @@ void plMtlAnimProc::ILoadAnimCombo(HWND hWnd, IParamBlock2* pb) ILoadUser(hWnd, pb); } -#include "plPickMaterialMap.h" -#include "MaxMain/plMtlCollector.h" - void plMtlAnimProc::IMtlButtonPress(HWND hWnd, IParamBlock2* pb) { // Let the user pick a new material @@ -395,9 +399,6 @@ Mtl* plMtlAnimProc::IGetMtl(IParamBlock2* pb) return pb->GetMtl(fMtlParamID); } - -#include "plPickNodeBase.h" - static const char* kUserTypeAll = "(All)"; class plPickAllMtlNode : public plPickMtlNode diff --git a/Sources/Tools/MaxComponent/plAnimCompProc.h b/Sources/Tools/MaxComponent/plAnimCompProc.h index 61adbe2c..b97699b4 100644 --- a/Sources/Tools/MaxComponent/plAnimCompProc.h +++ b/Sources/Tools/MaxComponent/plAnimCompProc.h @@ -42,11 +42,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plAnimCompProc_h_inc #define plAnimCompProc_h_inc -#include "max.h" -#include "iparamm2.h" - class plComponentBase; class plMaxNode; +class IParamBlock2; class plAnimCompProc : public ParamMap2UserDlgProc { diff --git a/Sources/Tools/MaxComponent/plAnimComponent.cpp b/Sources/Tools/MaxComponent/plAnimComponent.cpp index 51c3093d..28b5b585 100644 --- a/Sources/Tools/MaxComponent/plAnimComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimComponent.cpp @@ -39,21 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "resource.h" +#include "hsResMgr.h" #include "plAnimComponent.h" #include "plComponentProcBase.h" #include "plPhysicalComponents.h" #include "plMiscComponents.h" + +#include "MaxMain/plMaxNode.h" +#include "resource.h" +#pragma hdrstop + #include "MaxMain/plPhysicalProps.h" +#include "pnMessage/plNodeRefMsg.h" #include "pnSceneObject/plSceneObject.h" #include "plInterp/plController.h" #include "plNotetrackAnim.h" -#include "hsResMgr.h" #include "plAvatar/plAGModifier.h" #include "plAvatar/plAGChannel.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/plPointChannel.h" #include "plAvatar/plScalarChannel.h" -#include "MaxMain/plMaxNode.h" #include "MaxConvert/hsControlConverter.h" #include "pnKeyedObject/plUoid.h" #include "plMaxAnimUtils.h" #include "MaxPlasmaLights/plRealTimeLightBase.h" +#include "MaxPlasmaMtls/Materials/plPassMtl.h" #include "pfAnimation/plLightModifier.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 void DummyCodeIncludeFunc() {} +plEaseAccessor gAnimCompEaseAccessor(plComponentBase::kBlkComp, + kAnimEaseInMin, kAnimEaseInMax, kAnimEaseInLength, + kAnimEaseOutMin, kAnimEaseOutMax, kAnimEaseOutLength); + bool HasPhysicalComponent(plMaxNodeBase *node, bool searchChildren) { int i; @@ -572,9 +580,6 @@ bool plAnimGroupedComponent::GetKeyList( INode *restrictedNode, hsTArray -#include "plComponent.h" -#include "plComponentReg.h" #include "pnKeyedObject/plKey.h" #include "hsTemplates.h" + +#include "plComponent.h" +#include "plComponentReg.h" #include "plAnimObjInterface.h" -#include "plNoteTrackDlgComp.h" -#include "MaxPlasmaMtls/Materials/plPassMtlBase.h" +#include "plNotetrackDlgComp.h" + +#include +#include + #define ANIM_COMP_CID Class_ID(0x32e77ab, 0x28a80383) #define ANIM_GROUP_COMP_CID Class_ID(0x341a57fc, 0x4cda6c64) @@ -84,19 +87,16 @@ enum kAnimPhysAnim, }; -static plEaseAccessor gAnimCompEaseAccessor(plComponentBase::kBlkComp, - kAnimEaseInMin, kAnimEaseInMax, kAnimEaseInLength, - kAnimEaseOutMin, kAnimEaseOutMax, kAnimEaseOutLength); - +class plAGAnim; +class plAGApplicator; +class plAGMasterMod; class plComponentBase; +class plController; +class plEaseAccessor; class plMaxNode; +class plMsgForwarder; class plSimpleTMModifier; class plLightModifier; -class plAGMasterMod; -class plAGAnim; -class plMsgForwarder; -class plController; -class plAGApplicator; class plAnimComponentBase : public plComponent, public plAnimObjInterface { diff --git a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp index 7901a948..0472f654 100644 --- a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp @@ -39,11 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsResMgr.h" + #include "plAnimEventComponent.h" #include "plComponentReg.h" #include "resource.h" + #include "MaxMain/plMaxNode.h" +#pragma hdrstop #include "plAnimComponent.h" #include "plNotetrackAnim.h" @@ -53,7 +58,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plModifier/plAnimEventModifier.h" #include "plMessage/plAnimCmdMsg.h" -#include "hsResMgr.h" #include "pnMessage/plRefMsg.h" void DummyCodeIncludeFuncAnimDetector() {} diff --git a/Sources/Tools/MaxComponent/plAnimEventComponent.h b/Sources/Tools/MaxComponent/plAnimEventComponent.h index 667aed69..98fb112e 100644 --- a/Sources/Tools/MaxComponent/plAnimEventComponent.h +++ b/Sources/Tools/MaxComponent/plAnimEventComponent.h @@ -44,6 +44,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plActivatorBaseComponent.h" +class plErrorMsg; +class plMaxNode; + #define ANIMEVENT_CID Class_ID(0x32eb34af, 0x62c70002) #define MTLEVENT_CID Class_ID(0x2984243c, 0x30ea3acb) diff --git a/Sources/Tools/MaxComponent/plAudioComponents.cpp b/Sources/Tools/MaxComponent/plAudioComponents.cpp index 4ef8b904..fa5326ec 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.cpp +++ b/Sources/Tools/MaxComponent/plAudioComponents.cpp @@ -39,16 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #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 "plComponentProcBase.h" #include "plComponentReg.h" -#include -#include "plAudioComponents.h" #include "plMiscComponents.h" -#include "plAnimComponent.h" +#include "MaxMain/MaxCompat.h" +#include "resource.h" + +#include +#include +#pragma hdrstop + + #include "plInterp/plAnimEaseTypes.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/plPlasmaRefMsgs.h" - -#include "plgDispatch.h" #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plIntRefMsg.h" #include "pnMessage/plNodeRefMsg.h" - #include "plScene/plSceneNode.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsControlConverter.h" #include "plInterp/plController.h" #include "MaxMain/plMaxNode.h" -#include "MaxMain/MaxCompat.h" -#include "pnKeyedObject/plKey.h" //Physics Related -//#include "plHavok1/plHKPhysical.h" //Physics Comp #include "pnSceneObject/plSimulationInterface.h" #include "MaxMain/plPhysicalProps.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/plWin32GroupedSound.h" #include "plAudioCore/plSoundBuffer.h" -#include "plFileUtils.h" // Valdez Asset Manager Related #ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/MaxAssInterface.h" +# include "../../AssetMan/PublicInterface/MaxAssInterface.h" #endif -#include // Fun soft volume stuff #include "plSoftVolumeComponent.h" @@ -111,8 +112,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // EAX stuff #include "plAudio/plEAXListenerMod.h" #ifdef EAX_SDK_AVAILABLE -#include -#include +# include +# include #endif #include "plResMgr/plLocalization.h" diff --git a/Sources/Tools/MaxComponent/plAudioComponents.h b/Sources/Tools/MaxComponent/plAudioComponents.h index 43b7a3d7..9bc4d797 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.h +++ b/Sources/Tools/MaxComponent/plAudioComponents.h @@ -39,6 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + +#ifndef _plAudioComponents_h_inc_ +#define _plAudioComponents_h_inc_ + #define SOUND_3D_COMPONENT_ID Class_ID(0x1be5543f, 0x746f3a97) #define BGND_MUSIC_COMPONENT_ID Class_ID(0x16b5b2a, 0x33c75095) #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 SOUND_PHYS_COMP_ID Class_ID(0x29415900, 0x1ade37a5) +#include + +#include "plComponent.h" #include "pnKeyedObject/plKey.h" +#include "hsTemplates.h" + #ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/AssManBaseTypes.h" +# include "../../AssetMan/PublicInterface/AssManBaseTypes.h" #endif -#include "hsTemplates.h" class plComponentBase; class plMaxNode; @@ -66,7 +74,7 @@ namespace plAudioComp bool IsSoundComponent(plComponentBase *comp); bool IsLocalOnly( plComponentBase *comp ); -} +}; class plBaseSoundEmitterComponent : public plComponent { @@ -212,3 +220,5 @@ public: }; +#endif // _plAudioComponents_h_inc_ + diff --git a/Sources/Tools/MaxComponent/plAutoUIBase.cpp b/Sources/Tools/MaxComponent/plAutoUIBase.cpp index 9c14e7e7..3d2bee68 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBase.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIBase.cpp @@ -40,14 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plAutoUIBase.h" - -#include "max.h" -#include "iparamb2.h" +#include "hsWindows.h" -#include "plAutoUIParams.h" +#include +#include #include "resource.h" +#pragma hdrstop + +#include "plAutoUIBase.h" +#include "plAutoUIParams.h" #include "plGUICompClassIDs.h" diff --git a/Sources/Tools/MaxComponent/plAutoUIBase.h b/Sources/Tools/MaxComponent/plAutoUIBase.h index a6f4831e..f838d833 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBase.h +++ b/Sources/Tools/MaxComponent/plAutoUIBase.h @@ -42,12 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plAutoUIBase_h_inc #define plAutoUIBase_h_inc -//#include "max.h" -//#include "plComponentBase.h" -//#include "plComponentReg.h" - -#include "HeadSpin.h" - #include class ParamBlockDesc2; diff --git a/Sources/Tools/MaxComponent/plAutoUIBlock.cpp b/Sources/Tools/MaxComponent/plAutoUIBlock.cpp index 767704ab..73df5dd0 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBlock.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIBlock.cpp @@ -39,16 +39,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plAutoUIBlock.h" -#include "max.h" -#include "iparamb2.h" +#include "HeadSpin.h" #include "plComponentReg.h" - #include "resource.h" +#include +#pragma hdrstop + +#include "plAutoUIBlock.h" + + plAutoUIBlock::plAutoUIBlock(plComponentClassDesc *cd, int blockID, const char *name, int version) { fName = hsStrcpy(name); diff --git a/Sources/Tools/MaxComponent/plAutoUIComp.cpp b/Sources/Tools/MaxComponent/plAutoUIComp.cpp index a58046bd..b77079a4 100644 --- a/Sources/Tools/MaxComponent/plAutoUIComp.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIComp.cpp @@ -40,12 +40,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plAutoUIComp.h" +#include "hsWindows.h" #include +#include +#include +#include +#include + #include "resource.h" -#include "notify.h" +#pragma hdrstop + +#include "plAutoUIComp.h" //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxComponent/plAutoUIComp.h b/Sources/Tools/MaxComponent/plAutoUIComp.h index c2553c4b..fb6661fe 100644 --- a/Sources/Tools/MaxComponent/plAutoUIComp.h +++ b/Sources/Tools/MaxComponent/plAutoUIComp.h @@ -41,10 +41,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plAutoUIBase.h" -#include "max.h" #include "plComponentBase.h" #include "plComponentReg.h" +class INode; + class plAutoUIComp : public plAutoUIBase { public: diff --git a/Sources/Tools/MaxComponent/plAutoUIParams.cpp b/Sources/Tools/MaxComponent/plAutoUIParams.cpp index 8ca427f2..a7973d62 100644 --- a/Sources/Tools/MaxComponent/plAutoUIParams.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIParams.cpp @@ -39,14 +39,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include + +#include "plComponentBase.h" +#include "MaxMain/plMaxNode.h" +#pragma hdrstop + #include "plAutoUIParams.h" #include "MaxMain/plMaxAccelerators.h" -#include -#include "MaxMain/plMaxNode.h" -#include "plComponentBase.h" +#include "plPickNode.h" +#include "plPickMaterialMap.h" +#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" +#include "plSurface/plLayerInterface.h" +#include "plGImage/plDynamicTextMap.h" plAutoUIParam::plAutoUIParam(ParamID id, const char *name) : fID(id), fName(hsStrcpy(name)), fVisID(-1), fHeight(0) @@ -446,8 +455,6 @@ const char* plEditParam::GetString(IParamBlock2 *pb) /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// -#include "plPickNode.h" - plPickListParam::plPickListParam(ParamID id, const char *name, std::vector* filter) : plAutoUIParam(id, name), fhList(nil), fhAdd(nil), fhRemove(nil) { @@ -880,11 +887,6 @@ plComponentBase *plPickActivatorListParam::GetComponent(IParamBlock2 *pb, int id /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// -#include "plPickMaterialMap.h" -#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" -#include "plSurface/plLayerInterface.h" -#include "plGImage/plDynamicTextMap.h" - plPickDynamicTextButtonParam::plPickDynamicTextButtonParam(ParamID id, const char *name) : plPickButtonParam(id, name, nil, false) { diff --git a/Sources/Tools/MaxComponent/plAutoUIParams.h b/Sources/Tools/MaxComponent/plAutoUIParams.h index 4c4c996c..6b09fe42 100644 --- a/Sources/Tools/MaxComponent/plAutoUIParams.h +++ b/Sources/Tools/MaxComponent/plAutoUIParams.h @@ -39,9 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "iparamb2.h" -#include "HeadSpin.h" + #include "hsTemplates.h" #include @@ -372,7 +370,7 @@ public: class plPickMaterialAnimationButtonParam : public plPickButtonParam { protected: - hsTArray fKeys; + hsTArray fKeys; // FIXME: std::vector public: plPickMaterialAnimationButtonParam(ParamID id, const char *name); diff --git a/Sources/Tools/MaxComponent/plAvatarComponent.cpp b/Sources/Tools/MaxComponent/plAvatarComponent.cpp index 7f90aaaf..afff8249 100644 --- a/Sources/Tools/MaxComponent/plAvatarComponent.cpp +++ b/Sources/Tools/MaxComponent/plAvatarComponent.cpp @@ -39,28 +39,37 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include +#include "plgDispatch.h" +#include "hsResMgr.h" +#include "hsStringTokenizer.h" #include "plComponentProcBase.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "plAudioComponents.h" +#include "plPhysicalComponents.h" +#include "MaxMain/plMaxNode.h" + +#include "resource.h" +#include +#pragma hdrstop + +#include "plAvatarComponent.h" +#include "plMaxAnimUtils.h" +#include "plPickNode.h" +#include "plPickMaterialMap.h" + #include "MaxConvert/hsConverterUtils.h" #include "pnSceneObject/plSceneObject.h" -#include "plgDispatch.h" #include "plScene/plSceneNode.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsControlConverter.h" #include "MaxConvert/hsMaterialConverter.h" #include "MaxConvert/plBitmapCreator.h" -#include "hsStringTokenizer.h" -#include "MaxMain/plMaxNode.h" -#include "pnKeyedObject/plKey.h" - -#include "hsResMgr.h" #include "pnMessage/plNodeRefMsg.h" #include "pnMessage/plObjRefMsg.h" @@ -68,7 +77,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMessage/plMatRefMsg.h" #include "plMessage/plLayRefMsg.h" -#include "plMaxAnimUtils.h" #include "plInterp/plController.h" #include "plPhysical/plSimDefs.h" #include "plPhysicsGroups.h" @@ -79,7 +87,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plSurface/hsGMaterial.h" #include "plAudio/plWin32StaticSound.h" #include "plAudioCore/plSoundBuffer.h" -#include "plAudioComponents.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -95,15 +102,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plShadowComponents.h" #include "plGLight/plShadowCaster.h" -#include "plAvatarComponent.h" -#include "plPhysicalComponents.h" - #include "MaxMain/plPhysicalProps.h" -//#include -//#include -#include "plPickNode.h" -#include "plPickMaterialMap.h" #include "MaxMain/plMtlCollector.h" //#define BOB_SORT_AVATAR_FACES diff --git a/Sources/Tools/MaxComponent/plAvatarComponent.h b/Sources/Tools/MaxComponent/plAvatarComponent.h index fba01d16..59168093 100644 --- a/Sources/Tools/MaxComponent/plAvatarComponent.h +++ b/Sources/Tools/MaxComponent/plAvatarComponent.h @@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __PLAVATARCOMPONENT_H__ #define __PLAVATARCOMPONENT_H__ -#include "max.h" #include "plAvatar/plCritterCommands.h" #include "plAvatar/plPuppetCommands.h" diff --git a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp index 4be090b9..551905d4 100644 --- a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp +++ b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp @@ -39,19 +39,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plBehavioralComponents.h" +#include "hsResMgr.h" + #include "plComponentReg.h" +#include "plBehavioralComponents.h" +#include "plResponderComponent.h" +#include "MaxMain/plMaxNode.h" #include "resource.h" -#include "MaxMain/plMaxNode.h" +#include +#pragma hdrstop + #include "MaxMain/plPhysicalProps.h" -#include "hsResMgr.h" -#include "pnKeyedObject/plKey.h" #include "plAvatar/plSittingModifier.h" -#include "plResponderComponent.h" - #include "plPickNode.h" void DummyCodeIncludeFuncBehaviors() {} diff --git a/Sources/Tools/MaxComponent/plBipedKiller.cpp b/Sources/Tools/MaxComponent/plBipedKiller.cpp index a746e286..19fe193c 100644 --- a/Sources/Tools/MaxComponent/plBipedKiller.cpp +++ b/Sources/Tools/MaxComponent/plBipedKiller.cpp @@ -40,36 +40,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -// BIPEDKILLER - -/////////// -// -// INCLUDES -// -/////////// - -// theirs -#include - -#include "max.h" -#include "resource.h" -#include "CS/bipexp.h" -#include "decomp.h" - -#pragma warning(disable: 4786) // disable warnings about excessive STL symbol name length - -#include -#include #include "hsStlSortUtils.h" -// ours #include "plComponent.h" #include "plComponentReg.h" #include "plMiscComponents.h" #include "MaxMain/plMaxNodeBase.h" +#include +#include +#include + +#include +#include +#include "resource.h" +#pragma hdrstop + +#include "BipedKiller.h" #include "plTransform/hsAffineParts.h" -#include "hsMatrix44.h" ////////////// // diff --git a/Sources/Tools/MaxComponent/plBlowComponent.cpp b/Sources/Tools/MaxComponent/plBlowComponent.cpp index a56d5827..588fcb2d 100644 --- a/Sources/Tools/MaxComponent/plBlowComponent.cpp +++ b/Sources/Tools/MaxComponent/plBlowComponent.cpp @@ -39,24 +39,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "meshdlib.h" -#include "dummy.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" -#include "MaxMain/plPlasmaRefMsgs.h" - #include "MaxMain/plMaxNode.h" -#include "HeadSpin.h" +#include +#include + +#include "resource.h" +#pragma hdrstop + + +#include "MaxMain/plPlasmaRefMsgs.h" #include "plBlowComponent.h" +#include "plFlexibilityComponent.h" #include "pfAnimation/plBlower.h" -#include "plFlexibilityComponent.h" // Blow component first, related Flexibility component at EOF. diff --git a/Sources/Tools/MaxComponent/plCAnimParamBlock.cpp b/Sources/Tools/MaxComponent/plCAnimParamBlock.cpp index a87686a8..3c4aef03 100644 --- a/Sources/Tools/MaxComponent/plCAnimParamBlock.cpp +++ b/Sources/Tools/MaxComponent/plCAnimParamBlock.cpp @@ -56,13 +56,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include "plCAnimParamBlock.h" - -#include "plInterp/plAnimEaseTypes.h" #include "plAnimComponent.h" + #include "resource.h" +#pragma hdrstop +#include "plInterp/plAnimEaseTypes.h" + +#include "plCAnimParamBlock.h" +#include "MaxPlasmaMtls/Materials/plPassMtl.h" +// Defined in plAnimComponent.cpp +extern plEaseAccessor gAnimCompEaseAccessor; //// Static ParamBlock Template ////////////////////////////////////////////// diff --git a/Sources/Tools/MaxComponent/plCAnimParamBlock.h b/Sources/Tools/MaxComponent/plCAnimParamBlock.h index 5ca2f833..5a5c02ec 100644 --- a/Sources/Tools/MaxComponent/plCAnimParamBlock.h +++ b/Sources/Tools/MaxComponent/plCAnimParamBlock.h @@ -61,11 +61,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plCAnimParamBlock_h #define _plCAnimParamBlock_h -#include "HeadSpin.h" -#include "Max.h" -#include "iparamb2.h" -#include "iparamm2.h" - /// Note: the namespace is so our enums and such don't clash with anything /// else diff --git a/Sources/Tools/MaxComponent/plCameraComponent.cpp b/Sources/Tools/MaxComponent/plCameraComponent.cpp index 4480ba18..98d3346b 100644 --- a/Sources/Tools/MaxComponent/plCameraComponent.cpp +++ b/Sources/Tools/MaxComponent/plCameraComponent.cpp @@ -39,26 +39,31 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + +#include "HeadSpin.h" +#include "hsResMgr.h" + #include "plCameraComponent.h" -#include "resource.h" -#include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" + +#include +#include "resource.h" +#pragma hdrstop + + #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSimulationInterface.h" #include "pnKeyedObject/hsKeyedObject.h" -#include "pnKeyedObject/plKey.h" #include "plPhysical/plCollisionDetector.h" // MM #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plCameraMsg.h" -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" #include "MaxConvert/plConvert.h" #include "MaxMain/plPhysicalProps.h" -//#include "plHavok1/plHKPhysicsGroups.h" void DummyCodeIncludeFuncCamera() {} diff --git a/Sources/Tools/MaxComponent/plCameraComponent.h b/Sources/Tools/MaxComponent/plCameraComponent.h index 6f46e030..2dd40a23 100644 --- a/Sources/Tools/MaxComponent/plCameraComponent.h +++ b/Sources/Tools/MaxComponent/plCameraComponent.h @@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plComponent.h" +class plErrorMsg; class plMaxNode; #define CAMERACMD_CID Class_ID(0x6edb72d1, 0xd8a1f43) diff --git a/Sources/Tools/MaxComponent/plCameraComponents.cpp b/Sources/Tools/MaxComponent/plCameraComponents.cpp index 9e373567..afa66cda 100644 --- a/Sources/Tools/MaxComponent/plCameraComponents.cpp +++ b/Sources/Tools/MaxComponent/plCameraComponents.cpp @@ -39,23 +39,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plgDispatch.h" +#include "hsResMgr.h" -#include "max.h" //Max Dependencies +#include "plComponentReg.h" +#include "plAnimComponent.h" +#include "plCameraComponents.h" +#include "plMiscComponents.h" +#include "plPhysicalComponents.h" +#include "MaxMain/plMaxNode.h" +#include "MaxMain/plMaxNodeData.h" -#include "resource.h" //Resource Dependencies -#include "hsResMgr.h" // Ibid +#include +#include +#include + +#include "resource.h" +#pragma hdrstop -#include "plComponent.h" //Component Dependencies -#include "plComponentReg.h" -#include "plCameraComponents.h" // Ibid -#include "plAnimComponent.h" // Ibid #include "pnSceneObject/plSceneObject.h" // Ibid #include "pnSceneObject/plCoordinateInterface.h" #include "plScene/plSceneNode.h" // Ibid -#include "pnKeyedObject/plKey.h" // Ibid -#include "MaxMain/plMaxNode.h" // Ibid -#include "MaxMain/plMaxNodeData.h" // Ibid #include "MaxConvert/plConvert.h" #include "MaxConvert/hsConverterUtils.h" //Conversion Dependencies @@ -63,7 +69,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPhysical/plSimDefs.h" -#include "plgDispatch.h" //Message Dependencies #include "pnMessage/plObjRefMsg.h" // Ibid #include "pnMessage/plIntRefMsg.h" // Ibid #include "pnMessage/plNodeRefMsg.h" // Ibid @@ -74,9 +79,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfCamera/plCameraBrain.h" #include "pfCamera/plCameraModifier.h" -#include "plMiscComponents.h" #include "MaxMain/plPhysicalProps.h" -#include "plPhysicalComponents.h" // Line Follow related #include "plInterp/plAnimPath.h" @@ -84,9 +87,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfAnimation/plLineFollowMod.h" #include "pfAnimation/plFollowMod.h" -#include -#include - // // DummyCodeIncludeFuncPhys Function. // Necessary to keep the compiler from throwing away this file. diff --git a/Sources/Tools/MaxComponent/plClickDragComponent.cpp b/Sources/Tools/MaxComponent/plClickDragComponent.cpp index aeeea573..96eb1c0a 100644 --- a/Sources/Tools/MaxComponent/plClickDragComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickDragComponent.cpp @@ -39,16 +39,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plClickDragComponent.h" -#include "resource.h" +#include "plgDispatch.h" +#include "hsResMgr.h" + #include "plComponent.h" #include "plComponentReg.h" #include "plAnimComponent.h" +#include "plActivatorBaseComponent.h" +#include "plNoteTrackDlgComp.h" +#include "MaxMain/plMaxNode.h" + +#include +#include "resource.h" +#pragma hdrstop + +#include "plClickDragComponent.h" + #include "pnSceneObject/plSceneObject.h" #include "pnKeyedObject/hsKeyedObject.h" -#include "pnKeyedObject/plKey.h" #include "plPhysical/plCollisionDetector.h" // MM #include "plModifier/plLogicModifier.h" @@ -64,12 +75,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plEventCallbackMsg.h" #include "plMessage/plAnimCmdMsg.h" -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" #include "MaxConvert/plConvert.h" #include "plResponderComponent.h" -#include "plgDispatch.h" #include "MaxMain/plPhysicalProps.h" #include "plNotetrackAnim.h" @@ -104,9 +112,6 @@ enum kClikDragEnabled, }; - -#include "plNoteTrackDlgComp.h" - class plClickDragComponentProc : public ParamMap2UserDlgProc { protected: diff --git a/Sources/Tools/MaxComponent/plClickableComponent.cpp b/Sources/Tools/MaxComponent/plClickableComponent.cpp index ffe179a0..d17f5a04 100644 --- a/Sources/Tools/MaxComponent/plClickableComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickableComponent.cpp @@ -39,15 +39,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plClickableComponent.h" -#include "resource.h" +#include "hsResMgr.h" + #include "plComponentReg.h" +#include "plActivatorBaseComponent.h" +#include "plResponderComponent.h" +#include "MaxMain/plMaxNode.h" + +#include "resource.h" +#pragma hdrstop + +#include "plClickableComponent.h" #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSimulationInterface.h" #include "pnKeyedObject/hsKeyedObject.h" -#include "pnKeyedObject/plKey.h" #include "plPhysical/plCollisionDetector.h" // MM #include "plModifier/plLogicModifier.h" @@ -60,14 +68,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plNotifyMsg.h" #include "pnMessage/plCursorChangeMsg.h" -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" #include "MaxConvert/plConvert.h" #include "MaxMain/plPhysicalProps.h" #include "plPhysical/plSimDefs.h" -#include "plResponderComponent.h" - #include "MaxMain/plPhysicalProps.h" diff --git a/Sources/Tools/MaxComponent/plClickableComponent.h b/Sources/Tools/MaxComponent/plClickableComponent.h index 254e5cf0..ee249c34 100644 --- a/Sources/Tools/MaxComponent/plClickableComponent.h +++ b/Sources/Tools/MaxComponent/plClickableComponent.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plClickableComponent_inc #define plClickableComponent_inc -#include "plActivatorBaseComponent.h" - #define CLICKABLE_CID Class_ID(0x1a5f6892, 0x7b434188) class plClickableComponent : public plActivatorBaseComponent diff --git a/Sources/Tools/MaxComponent/plClimbComponent.cpp b/Sources/Tools/MaxComponent/plClimbComponent.cpp index 444ba4c8..68c3c156 100644 --- a/Sources/Tools/MaxComponent/plClimbComponent.cpp +++ b/Sources/Tools/MaxComponent/plClimbComponent.cpp @@ -39,26 +39,32 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -// max includes -#include "plPickNode.h" + +#include "plComponent.h" +#include "plComponentReg.h" +#include "plPhysicalComponents.h" +#include "MaxMain/plMaxNode.h" + +#include +#include + #include "resource.h" +#pragma hdrstop + +#include "plPickNode.h" // local #include "plClimbComponent.h" -#include "plPhysicalComponents.h" // so we can pick terrains -#include "plComponentReg.h" // other -#include "MaxMain/plMaxNode.h" #include "plMessage/plClimbMsg.h" #include "plPhysical/plCollisionDetector.h" #include "MaxMain/plPhysicalProps.h" #include "plPhysical/plSimDefs.h" #include "pnSceneObject/plSceneObject.h" -// stl -#include ///////////////////////////////////////////////////////////////// // diff --git a/Sources/Tools/MaxComponent/plClimbComponent.h b/Sources/Tools/MaxComponent/plClimbComponent.h index 9109e058..ca52d69c 100644 --- a/Sources/Tools/MaxComponent/plClimbComponent.h +++ b/Sources/Tools/MaxComponent/plClimbComponent.h @@ -42,7 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_CLIMB_COMPONENT_H #define PL_CLIMB_COMPONENT_H -#include "plComponent.h" +class plErrorMsg; +class plMaxNode; class plClimbTriggerComponent : public plComponent { diff --git a/Sources/Tools/MaxComponent/plClothingComponent.cpp b/Sources/Tools/MaxComponent/plClothingComponent.cpp index c04ed8d1..a9d30419 100644 --- a/Sources/Tools/MaxComponent/plClothingComponent.cpp +++ b/Sources/Tools/MaxComponent/plClothingComponent.cpp @@ -39,17 +39,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" -// +#include "hsResMgr.h" #include "hsTemplates.h" + +#include "plComponent.h" +#include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" + +#include +#include "resource.h" +#pragma hdrstop + #include "plResMgr/plKeyFinder.h" #include "plResMgr/plPageInfo.h" -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" + #include "plClothingComponent.h" -#include "plComponentReg.h" + #include "MaxPlasmaMtls/Materials/plClothingMtl.h" #include "pnMessage/plRefMsg.h" #include "plAvatar/plAvatarClothing.h" diff --git a/Sources/Tools/MaxComponent/plClothingComponent.h b/Sources/Tools/MaxComponent/plClothingComponent.h index e656ec98..d7613d05 100644 --- a/Sources/Tools/MaxComponent/plClothingComponent.h +++ b/Sources/Tools/MaxComponent/plClothingComponent.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_CLOTHING_COMPONENT_H #define PL_CLOTHING_COMPONENT_H -#include "plComponent.h" - class plClothingComponent : public plComponent { public: diff --git a/Sources/Tools/MaxComponent/plClusterComponent.cpp b/Sources/Tools/MaxComponent/plClusterComponent.cpp index dd6d1022..d2952b50 100644 --- a/Sources/Tools/MaxComponent/plClusterComponent.cpp +++ b/Sources/Tools/MaxComponent/plClusterComponent.cpp @@ -39,23 +39,30 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" +#include "HeadSpin.h" +#include "hsBitVector.h" -#include "max.h" -#include "meshdlib.h" -#include "dummy.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" -#include "MaxMain/plPlasmaRefMsgs.h" - -#include "MaxExport/plExportProgressBar.h" +#include "plMiscComponents.h" #include "MaxMain/plMaxNode.h" -#include "HeadSpin.h" +#include +#include +#include + +#if MAX_VERSION_MAJOR >= 13 +# include +#endif + +#include "resource.h" +#include +#pragma hdrstop + +#include "MaxMain/plPlasmaRefMsgs.h" +#include "MaxExport/plExportProgressBar.h" -#include "hsBitVector.h" #include "plMath/hsRadixSort.h" #include "pnEncryption/plRandom.h" #include "pfAnimation/plBlower.h" @@ -64,21 +71,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plDistribComponent.h" #include "MaxConvert/plDistributor.h" #include "MaxConvert/plDistTree.h" -#include "plMiscComponents.h" #include "plClusterComponent.h" - - #include "MaxConvert/plClusterUtil.h" #include "plDrawable/plClusterGroup.h" #include "plDrawable/plSpanTemplate.h" -#include - -#if MAX_VERSION_MAJOR >= 13 -#include -#endif - ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Start with the component bookkeeping song and dance. diff --git a/Sources/Tools/MaxComponent/plComponentBase.cpp b/Sources/Tools/MaxComponent/plComponentBase.cpp index 0202b285..e0ba8151 100644 --- a/Sources/Tools/MaxComponent/plComponentBase.cpp +++ b/Sources/Tools/MaxComponent/plComponentBase.cpp @@ -39,12 +39,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" + #include "plComponentBase.h" #include "plComponentReg.h" -#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxMain/plMaxNodeBase.h" +#include +#include +#pragma hdrstop + +#include "MaxMain/plPlasmaRefMsgs.h" #include "plAutoUIComp.h" plComponentBase::plComponentBase() : fClassDesc(nil), fCompPB(nil), fTargsPB(nil) @@ -579,8 +585,6 @@ int plSharedComponents(INodeTab& nodes, INodeTab& components) /////////////////////////////////////////////////////////////////////////////////////////// -#include "notify.h" - static void UpdateComponentVisibility(plMaxNodeBase *node) { plComponentBase *comp = node->ConvertToComponent(); diff --git a/Sources/Tools/MaxComponent/plComponentBase.h b/Sources/Tools/MaxComponent/plComponentBase.h index 45af7da1..841faed7 100644 --- a/Sources/Tools/MaxComponent/plComponentBase.h +++ b/Sources/Tools/MaxComponent/plComponentBase.h @@ -42,13 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_COMPONENT_BASE_H #define PL_COMPONENT_BASE_H -#include "HeadSpin.h" -#include "Max.h" -#include "iparamb2.h" -#include "iparamm2.h" - -#include "HeadSpin.h" #include "pnKeyedObject/plKey.h" +#include "hsWindows.h" + +#include +#include extern TCHAR *GetString(int id); extern HINSTANCE hInstance; @@ -56,10 +54,24 @@ extern HINSTANCE hInstance; #define COMPONENT_CLASSID Class_ID(0x758e5142, 0x66c748a) #define EXT_COMPONENT_CLASSID Class_ID(0x6c277b63, 0x6c626b3f) -class plMaxNodeBase; +class plAGAnim; +class Animatable; +class Box3; +class ClassDesc2; +class Class_ID; +class HelperObject; class plKey; class plMaxNode; -class plAGAnim; +class plMaxNodeBase; +class INode; +class INodeTab; +class IObjParam; +class ObjectState; +enum IOResult; +class IParamBlock2; +enum RefResult; +class RemapDir; +class ViewExp; class plComponentBase : public HelperObject { diff --git a/Sources/Tools/MaxComponent/plComponentMgr.cpp b/Sources/Tools/MaxComponent/plComponentMgr.cpp index f337aad0..6e32c8b9 100644 --- a/Sources/Tools/MaxComponent/plComponentMgr.cpp +++ b/Sources/Tools/MaxComponent/plComponentMgr.cpp @@ -39,15 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "max.h" -#include "iparamb2.h" +#include "HeadSpin.h" #include #include "plComponent.h" #include "plComponentMgr.h" #include "plComponentReg.h" +#pragma hdrstop ///////// class ComponentMgrClassDesc : public ClassDesc diff --git a/Sources/Tools/MaxComponent/plComponentMgr.h b/Sources/Tools/MaxComponent/plComponentMgr.h index 69dcccdf..0c1e14a6 100644 --- a/Sources/Tools/MaxComponent/plComponentMgr.h +++ b/Sources/Tools/MaxComponent/plComponentMgr.h @@ -42,14 +42,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_COMPONENTMGR_H #define PL_COMPONENTMGR_H -#include "HeadSpin.h" -#include "max.h" -#include "utilapi.h" - +#include "hsWindows.h" #include -class ClassDesc2; -class Class_ID; +#include +#include +#include #define COMPONENT_MGR_CID Class_ID(0x5b870ba2, 0xb7b1da2) @@ -61,10 +59,6 @@ class Class_ID; // // 8/28/01: Added globals -Colin // -class hsResMgr; -class plFactory; -class plTimerCallbackManager; -class plTimerShare; class plComponentMgr : public UtilityObj { diff --git a/Sources/Tools/MaxComponent/plComponentProcBase.h b/Sources/Tools/MaxComponent/plComponentProcBase.h index d7b19a18..589b83b5 100644 --- a/Sources/Tools/MaxComponent/plComponentProcBase.h +++ b/Sources/Tools/MaxComponent/plComponentProcBase.h @@ -44,11 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #pragma warning(disable: 4786) -#include "Max.h" -#include "iparamm2.h" #include #include +#include "hsWindows.h" +#include + // // Const Char* [] Version // diff --git a/Sources/Tools/MaxComponent/plComponentTools.cpp b/Sources/Tools/MaxComponent/plComponentTools.cpp index bc166c95..d9b11a11 100644 --- a/Sources/Tools/MaxComponent/plComponentTools.cpp +++ b/Sources/Tools/MaxComponent/plComponentTools.cpp @@ -39,11 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "max.h" -#include "pnModifier/plModifier.h" #include "plComponentTools.h" +#include "pnKeyedObject/plUoid.h" plKey plComponentTools::AddModifier(plMaxNodeBase *node, plModifier *mod) { diff --git a/Sources/Tools/MaxComponent/plComponentTools.h b/Sources/Tools/MaxComponent/plComponentTools.h index 9e076d1b..55cd9a33 100644 --- a/Sources/Tools/MaxComponent/plComponentTools.h +++ b/Sources/Tools/MaxComponent/plComponentTools.h @@ -42,17 +42,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_COMPONENT_TOOLS_H #define PL_COMPONENT_TOOLS_H -#include "HeadSpin.h" #include "hsTemplates.h" #include "pnKeyedObject/plKey.h" -class INode; -class plModifier; +class plComponentBase; class plKey; class plLocation; -class plResponderModifier; -class plComponentBase; +class plModifier; class plMaxNodeBase; +class Mtl; +class INode; +class plResponderModifier; typedef plKey (*PAddModFunc) (plMaxNodeBase *, plModifier *); typedef plKey (*PGetNewKeyFunc) (const plString&, plModifier*, plLocation); diff --git a/Sources/Tools/MaxComponent/plDicer.cpp b/Sources/Tools/MaxComponent/plDicer.cpp index ef2f8d00..0bb6dee2 100644 --- a/Sources/Tools/MaxComponent/plDicer.cpp +++ b/Sources/Tools/MaxComponent/plDicer.cpp @@ -39,10 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsWindows.h" -#include "max.h" -#include "meshdlib.h" +#include +#include +#pragma hdrstop #include "plDicer.h" diff --git a/Sources/Tools/MaxComponent/plDistribComponent.cpp b/Sources/Tools/MaxComponent/plDistribComponent.cpp index 3103544f..de762d83 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent.cpp +++ b/Sources/Tools/MaxComponent/plDistribComponent.cpp @@ -39,28 +39,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plComponent.h" +#include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include #include +#include +#include +#include -#include "max.h" -#include "meshdlib.h" -#include "stdmat.h" -#include "bmmlib.h" #include "resource.h" -#include "plComponent.h" -#include "plComponentReg.h" +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "MaxExport/plExportProgressBar.h" #include "MaxExport/plExportErrorMsg.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h" -#include "HeadSpin.h" - #include "MaxConvert/plDistributor.h" #include "MaxConvert/plDistTree.h" diff --git a/Sources/Tools/MaxComponent/plDistribComponent_old.cpp b/Sources/Tools/MaxComponent/plDistribComponent_old.cpp index f10d113e..fb3c2aaf 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent_old.cpp +++ b/Sources/Tools/MaxComponent/plDistribComponent_old.cpp @@ -39,27 +39,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plComponent.h" +#include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include #include +#include +#include +#include -#include "max.h" -#include "meshdlib.h" -#include "stdmat.h" -#include "bmmlib.h" #include "resource.h" -#include "plComponent.h" -#include "plComponentReg.h" +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "MaxExport/plExportProgressBar.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h" -#include "HeadSpin.h" - #include "MaxConvert/plDistributor.h" #include "MaxConvert/plDistTree.h" // FISH HACK - just testing diff --git a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp index b91d2b9e..8c1847a6 100644 --- a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp +++ b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp @@ -39,15 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plExcludeRegionComponent.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" #include "MaxMain/plMaxNode.h" -#include "pnKeyedObject/plKey.h" + +#include + +#include "resource.h" +#pragma hdrstop + +#include "plExcludeRegionComponent.h" #include "plModifier/plExcludeRegionModifier.h" #include "plPhysical/plSimDefs.h" diff --git a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp index 5f791f3d..659c5fd4 100644 --- a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp @@ -39,24 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" +#include "HeadSpin.h" +#include "hsResMgr.h" +#include "plTweak.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" + +#include +#include "resource.h" +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" #include "plPickNode.h" -#include "MaxMain/plMaxNode.h" #include "MaxExport/plExportProgressBar.h" #include "MaxConvert/hsMaterialConverter.h" -#include "HeadSpin.h" -#include "plTweak.h" - -#include "hsResMgr.h" #include "pnMessage/plNodeRefMsg.h" #include "pnMessage/plObjRefMsg.h" diff --git a/Sources/Tools/MaxComponent/plFootstepComponent.cpp b/Sources/Tools/MaxComponent/plFootstepComponent.cpp index 745a0d71..0fcdd4ea 100644 --- a/Sources/Tools/MaxComponent/plFootstepComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootstepComponent.cpp @@ -39,17 +39,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" +#include "hsResMgr.h" + +#include "plComponentReg.h" +#include "plAudioComponents.h" +#include "MaxMain/plMaxNode.h" #include "resource.h" + +#include #include -#include "hsResMgr.h" +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "plFootstepComponent.h" -#include "plAudioComponents.h" -#include "plComponentReg.h" #include "plAvatar/plAvatarClothing.h" #include "plAvatar/plArmatureEffects.h" diff --git a/Sources/Tools/MaxComponent/plGUIComponents.cpp b/Sources/Tools/MaxComponent/plGUIComponents.cpp index 196694d6..d536c633 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.cpp +++ b/Sources/Tools/MaxComponent/plGUIComponents.cpp @@ -39,20 +39,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" +#include "plgDispatch.h" +#include "hsFiles.h" #include "hsTemplates.h" + #include "plComponent.h" #include "plComponentReg.h" -#include "plMiscComponents.h" #include "plAnimComponent.h" +#include "plAudioComponents.h" +#include "plMiscComponents.h" +#include "resource.h" +#include "MaxMain/plMaxNode.h" + +#include +#include +#include +#pragma hdrstop + #include "plNotetrackAnim.h" #include "plGUIComponents.h" -#include "plAudioComponents.h" - #include "MaxMain/plPlasmaRefMsgs.h" #include "pnSceneObject/plSceneObject.h" @@ -72,7 +81,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxMain/plPluginResManager.h" -#include "plgDispatch.h" #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plIntRefMsg.h" #include "pnMessage/plNodeRefMsg.h" @@ -85,8 +93,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxConvert/plLayerConverter.h" #include "plInterp/plController.h" #include "plInterp/plAnimEaseTypes.h" -#include "MaxMain/plMaxNode.h" -#include "pnKeyedObject/plKey.h" // GUIDialog component. #include "plScene/plPostEffectMod.h" @@ -115,7 +121,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAgeDescription/plAgeDescription.h" #include "MaxMain/plMaxCFGFile.h" #include "MaxMain/plAgeDescInterface.h" -#include "hsFiles.h" #include "MaxConvert/plConvert.h" #include "MaxPlasmaMtls/Layers/plDynamicTextLayer.h" #include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h" @@ -135,9 +140,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPickLocalizationDlg.h" -#include -#include - void DummyCodeIncludeFuncGUI() {} diff --git a/Sources/Tools/MaxComponent/plGUIComponents.h b/Sources/Tools/MaxComponent/plGUIComponents.h index 8ae78f44..9e6a1998 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.h +++ b/Sources/Tools/MaxComponent/plGUIComponents.h @@ -48,10 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plGUIComponents_h #define _plGUIComponents_h -#include "pnKeyedObject/plKey.h" - #include "plGUICompClassIDs.h" -#include "plComponent.h" ////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxComponent/plGrassComponent.cpp b/Sources/Tools/MaxComponent/plGrassComponent.cpp index a09b573a..556dea91 100644 --- a/Sources/Tools/MaxComponent/plGrassComponent.cpp +++ b/Sources/Tools/MaxComponent/plGrassComponent.cpp @@ -39,21 +39,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include #include "HeadSpin.h" -#include "max.h" -#include "resource.h" -#include "hsTemplates.h" -#include "hsResMgr.h" #include "plQuality.h" +#include "hsResMgr.h" +#include "hsTemplates.h" + +#include "plComponent.h" +#include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#include +#pragma hdrstop + #include "pnMessage/plRefMsg.h" #include "plSurface/hsGMaterial.h" -#include "MaxMain/plMaxNode.h" + #include "MaxConvert/hsMaterialConverter.h" -#include "plComponent.h" -#include "plComponentReg.h" #include "plGrassComponent.h" #include "plSurface/plGrassShaderMod.h" diff --git a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp index 6f7ca0c6..735912d9 100644 --- a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp +++ b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp @@ -39,16 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" -#include "plMiscComponents.h" #include "plComponentReg.h" +#include "plMiscComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plCoordinateInterface.h" diff --git a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp b/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp deleted file mode 100644 index aac5a9a7..00000000 --- a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/*==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 . - -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==*/ -#include "HeadSpin.h" -#include "plImpactGadgetComponent.h" -#include "resource.h" -//#include "plComponent.h" -#include "plComponentReg.h" - - -#include "pnSceneObject/plSceneObject.h" -#include "pnKeyedObject/hsKeyedObject.h" -#include "pnKeyedObject/plKey.h" - -#include "plPhysical/plCollisionDetector.h" // MM -#include "plModifier/plLogicModifier.h" -#include "pnModifier/plConditionalObject.h" -#include "plPhysical/plPickingDetector.h" -#include "pfConditional/plActivatorConditionalObject.h" -#include "pfConditional/plFacingConditionalObject.h" -#include "pfConditional/plObjectInBoxConditionalObject.h" -#include "pnMessage/plObjRefMsg.h" -#include "pnMessage/plNotifyMsg.h" -#include "pnMessage/plCursorChangeMsg.h" - -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" -#include "MaxConvert/plConvert.h" - -#include "plResponderComponent.h" - -#include "MaxConvert/hsConverterUtils.h" //Conversion Dependencies -#include "plPhysicalComponents.h" -#include "pnMessage/plIntRefMsg.h" // Ibid -#include "plComponentProcBase.h" - -#include "MaxMain/plPhysicalProps.h" - -void DummyCodeIncludeFuncImpactGadget() {} - -// enum -// { -// kImpactObject_DEAD, -// kImpactOneShot, -// kUseImpactNode_DEAD, -// kImpactNode_DEAD, -// kImpactBoundsType_DEAD, -// kImpactBounceChoice_DEAD, -// kImpactBounceBoolTab_DEAD, -// kImpactReportChoice_DEAD, -// kImpactReportBoolTab_DEAD, -// kImpactEnabled, -// kImpactBounceGroups_DEAD, -// kImpactReportGroups, -// kImpactUseVelocity_DEAD, -// kImpactVelocity_DEAD, -// }; -// -// #include "plEventGroupUI.h" - -// static plEventGroupProc gReportGroupProc(kImpactReportGroups, "Report collisions with these groups", false); - -OBSOLETE_CLASS(plImpactGadget, gImpactGadgetDesc, "Collision Sensor", "CollisionSensor", COMP_TYPE_DETECTOR, IMPACTGADGET_CID) - -// enum -// { -// kImpactMain, -// kImpactBounce_DEAD, -// kImpactReport, -// }; -// -// ParamBlockDesc2 gImpactGadgetBlock -// ( -// plComponent::kBlkComp, _T("ImpactGadgetComp"), 0, &gImpactGadgetDesc, P_AUTO_CONSTRUCT + P_AUTO_UI + P_MULTIMAP, plComponent::kRefComp, -// -// 2, -// kImpactMain, IDD_COMP_DETECTOR_COLLISION, IDS_COMP_DETECTOR_COLLISION, 0, 0, NULL, -// kImpactReport, IDD_COMP_PHYS_CORE_GROUP, IDS_COMP_PHYS_REPORT, 0, APPENDROLL_CLOSED, &gReportGroupProc, -// -// kImpactOneShot, _T("oneshot"), TYPE_BOOL, 0, 0, -// p_ui, kImpactMain, TYPE_SINGLECHEKBOX, IDC_ONESHOT, -// end, -// -// kImpactReportGroups, _T("reportGroups"), TYPE_INT, 0,0, -// end, -// -// kImpactEnabled, _T("enabled"), TYPE_BOOL, 0, 0, -// p_ui, kImpactMain, TYPE_SINGLECHEKBOX, IDC_ENABLED, -// p_default, TRUE, -// end, -// -// end -// ); -// -// -// plImpactGadget::plImpactGadget() -// { -// fClassDesc = &gImpactGadgetDesc; -// fClassDesc->MakeAutoParamBlocks(this); -// } -// -// bool plImpactGadget::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) -// { -// plActivatorBaseComponent::SetupProperties(node, pErrMsg); -// -// plPhysicalProps *physProps = node->GetPhysicalProps(); -// physProps->SetReportGroup(plEventGroupProc::GetGroups(fCompPB, kImpactReportGroups), node, pErrMsg); -// -// return true; -// } -// -// bool plImpactGadget::Convert(plMaxNode *node, plErrorMsg *pErrMsg) -// { -// plLocation loc = node->GetLocation(); -// plSceneObject *obj = node->GetSceneObject(); -// -// plKey logicKey = fLogicModKeys[node]; -// plLogicModifier *logic = plLogicModifier::ConvertNoRef(logicKey->GetObjectPtr()); -// -// if (fCompPB->GetInt(kImpactOneShot)) -// logic->SetFlag(plLogicModBase::kOneShot); -// -// hsTArray receivers; -// IGetReceivers(node, receivers); -// for (int i = 0; i < receivers.Count(); i++) -// logic->AddNotifyReceiver(receivers[i]); -// -// // Get the physical node (where the mod is going to be put) -// plMaxNode* physNode = node->GetPhysicalProps()->GetProxyNode(); -// if (!physNode) -// physNode = node; -// -// // Create remote detector -// plCollisionDetector* det = new plCollisionDetector; -// det->SetType(plCollisionDetector::kTypeBump); -// -// // Register the detector -// plKey detKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), det, loc); -// hsgResMgr::ResMgr()->AddViaNotify(detKey, new plObjRefMsg(physNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); -// -// // create and register the CONDITIONS for the DETECTOR's Logic Modifier -// plActivatorConditionalObject* activatorCond = new plActivatorConditionalObject; -// plKey activatorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), activatorCond, loc); -// -// // link everything up: -// logic->AddCondition(activatorCond); // add this activator condition -// logic->SetDisabled(fCompPB->GetInt(kImpactEnabled) == 0); -// -// // Set up the remote detector (if any) -// activatorCond->SetActivatorKey(detKey); -// det->AddLogicObj(logicKey); -// -// // If this is for the SceneViewer, set the local only flag since the read function will never be called -// if (plConvert::Instance().IsForSceneViewer()) -// logic->SetLocalOnly(true); -// -// return true; -// } diff --git a/Sources/Tools/MaxComponent/plImpactGadgetComponent.h b/Sources/Tools/MaxComponent/plImpactGadgetComponent.h deleted file mode 100644 index 1b30d0dc..00000000 --- a/Sources/Tools/MaxComponent/plImpactGadgetComponent.h +++ /dev/null @@ -1,58 +0,0 @@ -/*==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 . - -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 plImpactGadgetComponent_inc -#define plImpactGadgetComponent_inc - -#include "plActivatorBaseComponent.h" - -#define IMPACTGADGET_CID Class_ID(0x6cb343d6, 0x36995c82) - -// class plImpactGadget : public plActivatorBaseComponent -// { -// public: -// plImpactGadget(); -// -// bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); -// bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); -// }; - -#endif // plImpactGadgetComponent_inc \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp index 0fce9fb8..84bb8a55 100644 --- a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp +++ b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp @@ -39,19 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plInventoryObjComponent.h" //Inventory Dependencies +#include "hsResMgr.h" -#include "resource.h" //Resource Dependencies -#include "hsResMgr.h" // Ibid - -#include "plComponent.h" //Component Dependencies -#include "plComponentReg.h" // Ibid -#include "pnSceneObject/plSceneObject.h" // Ibid -#include "pnKeyedObject/hsKeyedObject.h" // Ibid -#include "MaxMain/plMaxNode.h" // Ibid +#include "plComponent.h" +#include "plComponentReg.h" +#include "plActivatorBaseComponent.h" #include "plResponderComponent.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + +#include "plInventoryObjComponent.h" + +#include "pnSceneObject/plSceneObject.h" // Ibid +#include "pnKeyedObject/hsKeyedObject.h" // Ibid #include "plPhysical/plCollisionDetector.h" //Modifiers Dependencies #include "plModifier/plLogicModifier.h" // Ibid diff --git a/Sources/Tools/MaxComponent/plInventoryObjComponent.h b/Sources/Tools/MaxComponent/plInventoryObjComponent.h index 1638d068..12810a3f 100644 --- a/Sources/Tools/MaxComponent/plInventoryObjComponent.h +++ b/Sources/Tools/MaxComponent/plInventoryObjComponent.h @@ -42,13 +42,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plInventoryObjComponent_inc #define plInventoryObjComponent_inc - - #include "plClickableComponent.h" -#include "hsTemplates.h" -#include -#include "pnKeyedObject/plKey.h" +class plErrorMsg; +class plKey; class plMaxNode; #define INVENTORYOBJCOMP_CID Class_ID(0x425e1687, 0x4a126b91) diff --git a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp index eacdee65..3e8b7f7e 100644 --- a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp +++ b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp @@ -39,19 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "MaxExport/plExportProgressBar.h" -#include "HeadSpin.h" - #include "plLODFadeComponent.h" #include "pfSurface/plFadeOpacityMod.h" diff --git a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp index 8f14823b..31e1bcf3 100644 --- a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp +++ b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp @@ -39,26 +39,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" +#include "hsResMgr.h" + #include "plComponent.h" #include "plComponentReg.h" - -#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxMain/plMaxNode.h" -#include "hsResMgr.h" +#include "resource.h" +#pragma hdrstop +#include "MaxMain/plPlasmaRefMsgs.h" // LightGroup component +#include "plLightGrpComponent.h" #include "pnSceneObject/plSceneObject.h" #include "plGLight/plLightInfo.h" #include "plDrawable/plDrawableSpans.h" #include "pnSceneObject/plDrawInterface.h" #include "MaxPlasmaLights/plRealTimeLightBase.h" -#include "plLightGrpComponent.h" - ///////////////////////////////////////////////////////////////////////////////////////////////// // // LightGroup Component diff --git a/Sources/Tools/MaxComponent/plLightMapComponent.cpp b/Sources/Tools/MaxComponent/plLightMapComponent.cpp index 355f13bc..3f580154 100644 --- a/Sources/Tools/MaxComponent/plLightMapComponent.cpp +++ b/Sources/Tools/MaxComponent/plLightMapComponent.cpp @@ -39,19 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsColorRGBA.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - -#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxMain/plMaxNode.h" -#include "hsResMgr.h" +#include "resource.h" +#pragma hdrstop +#include "MaxMain/plPlasmaRefMsgs.h" #include "plDrawable/plGeometrySpan.h" - #include "plLightMapComponent.h" void DummyCodeIncludeFuncLightMap() diff --git a/Sources/Tools/MaxComponent/plLightMapComponent.h b/Sources/Tools/MaxComponent/plLightMapComponent.h index ceae4165..323bef9f 100644 --- a/Sources/Tools/MaxComponent/plLightMapComponent.h +++ b/Sources/Tools/MaxComponent/plLightMapComponent.h @@ -43,10 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plLightMapComponent_inc #define plLightMapComponent_inc -#include "plComponent.h" - -#include "hsColorRGBA.h" - +struct hsColorRGBA; +class plKey; class plMipmap; const Class_ID LIGHTMAP_COMP_CID(0x1b1d0317, 0x3b3821db); diff --git a/Sources/Tools/MaxComponent/plLineFollowComp.cpp b/Sources/Tools/MaxComponent/plLineFollowComp.cpp index fe3b30d1..d94bd24f 100644 --- a/Sources/Tools/MaxComponent/plLineFollowComp.cpp +++ b/Sources/Tools/MaxComponent/plLineFollowComp.cpp @@ -39,22 +39,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" +#include "plgDispatch.h" + #include "plComponent.h" #include "plComponentReg.h" - #include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsControlConverter.h" #include "plInterp/plController.h" -#include "MaxMain/plMaxNode.h" -#include "pnKeyedObject/plKey.h" -#include "plgDispatch.h" #include "MaxMain/plPluginResManager.h" #include "pnSceneObject/plSceneObject.h" diff --git a/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp b/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp index 64f9a450..1139e564 100644 --- a/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp +++ b/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp @@ -39,12 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "Max.h" -#include "notetrck.h" #include "HeadSpin.h" #include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include +#pragma hdrstop #include "plMaxAnimUtils.h" #include "MaxExport/plErrorMsg.h" diff --git a/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp b/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp index c72cff0d..f2046203 100644 --- a/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp +++ b/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp @@ -39,10 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" + #include "plMaxWaveUtils.h" #include "plAudioCore/plWavFile.h" -#include "HeadSpin.h" SegmentMap *GetWaveSegmentMap(const char *file, plErrorMsg *pErrMsg) { diff --git a/Sources/Tools/MaxComponent/plMiscComponents.cpp b/Sources/Tools/MaxComponent/plMiscComponents.cpp index 4a494477..5e29a478 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.cpp +++ b/Sources/Tools/MaxComponent/plMiscComponents.cpp @@ -39,17 +39,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" -#include "plMiscComponents.h" +#include "plCreatableIndex.h" +#include "plgDispatch.h" +#include "plFileUtils.h" +#include "hsFiles.h" + #include "plComponentReg.h" +#include "plMiscComponents.h" +#include "MaxMain/plMaxNode.h" +#include "MaxMain/plMaxNodeData.h" +#include "resource.h" + +#include +#include +#pragma hdrstop + #ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/MaxAssInterface.h" +# include "../../AssetMan/PublicInterface/MaxAssInterface.h" #endif #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNodeData.h" #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plCoordinateInterface.h" @@ -57,20 +68,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxMain/plPluginResManager.h" - -#include "plgDispatch.h" #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plIntRefMsg.h" #include "pnMessage/plNodeRefMsg.h" - #include "plScene/plSceneNode.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsControlConverter.h" #include "plInterp/plController.h" -#include "MaxMain/plMaxNode.h" -#include "pnKeyedObject/plKey.h" -#include "plFileUtils.h" // Follow mod #include "plInterp/plAnimPath.h" @@ -95,7 +100,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAgeDescription/plAgeDescription.h" #include "MaxMain/plMaxCFGFile.h" #include "MaxMain/plAgeDescInterface.h" -#include "hsFiles.h" #include "plResMgr/plPageInfo.h" #include "plDrawable/plGeometrySpan.h" @@ -108,6 +112,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxConvert/plLayerConverter.h" #include "plGImage/plBitmap.h" +// NetSync +#include "pnNetCommon/plSDLTypes.h" +#include "MaxConvert/hsMaterialConverter.h" +#include "plSurface/hsGMaterial.h" +#include "plSurface/plLayerInterface.h" + void DummyCodeIncludeFuncMisc() { RegisterNotification(plPageInfoComponent::NotifyProc, nil, NOTIFY_FILE_POST_OPEN); @@ -2029,12 +2039,6 @@ bool plReferencePointComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pE // // -#include "pnNetCommon/plSDLTypes.h" -#include "MaxConvert/hsMaterialConverter.h" -#include "plSurface/hsGMaterial.h" -#include "plSurface/plLayerInterface.h" -#include "plCreatableIndex.h" - class plNetSyncComponent : public plComponent { protected: diff --git a/Sources/Tools/MaxComponent/plMiscComponents.h b/Sources/Tools/MaxComponent/plMiscComponents.h index 44ddb189..7fb4a5eb 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.h +++ b/Sources/Tools/MaxComponent/plMiscComponents.h @@ -44,7 +44,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define plMiscComponents_inc #include "plComponent.h" -#include "Notify.h" #define ROOM_CID Class_ID(0x70a1570d, 0x472f5647) #define PAGEINFO_CID Class_ID(0x54ee40f1, 0x4de45acc) @@ -53,8 +52,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define CIRCLE_CAM_CID Class_ID(0x66f85282, 0x4daa1b8e) #define IMAGE_LIB_CID Class_ID(0x736c18d3, 0x6a6d5dde) -class plComponentBase; class plAgeDescription; +class plComponentBase; +struct NotifyInfo; const char* LocCompGetPage(plComponentBase* comp); diff --git a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp index 1cb9a637..9f016415 100644 --- a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp +++ b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp @@ -39,21 +39,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" #include "plPickNode.h" -#include "MaxMain/plMaxNode.h" #include "MaxExport/plExportProgressBar.h" -#include "HeadSpin.h" -#include "hsResMgr.h" - #include "pnSceneObject/plSceneObject.h" #include "plDrawable/plMorphSequence.h" #include "plDrawable/plSharedMesh.h" diff --git a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp index 61624d5d..29483a79 100644 --- a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp +++ b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp @@ -39,23 +39,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plMultistageBehComponent.h" +#include "hsResMgr.h" +#include "hsStream.h" + +#include + #include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" +#pragma hdrstop + +#include "plMultistageBehComponent.h" #include "plMultistageStage.h" -#include "hsStream.h" -#include "resource.h" -#include "MaxMain/plMaxNode.h" #include "MaxMain/plMaxAccelerators.h" #include "plAvatar/plAnimStage.h" #include "plAvatar/plMultistageBehMod.h" -#include "hsResMgr.h" - -#include void DummyCodeIncludeFuncMultistageBeh() {} diff --git a/Sources/Tools/MaxComponent/plMultistageBehComponent.h b/Sources/Tools/MaxComponent/plMultistageBehComponent.h index 38b42f27..9c8aa68c 100644 --- a/Sources/Tools/MaxComponent/plMultistageBehComponent.h +++ b/Sources/Tools/MaxComponent/plMultistageBehComponent.h @@ -41,9 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #define MULTISTAGE_BEH_CID Class_ID(0x6c5234ab, 0x6c955a61) - -#include "max.h" - class plKey; class plComponentBase; class plMaxNodeBase; diff --git a/Sources/Tools/MaxComponent/plMultistageStage.cpp b/Sources/Tools/MaxComponent/plMultistageStage.cpp index 23693c79..b00b3d22 100644 --- a/Sources/Tools/MaxComponent/plMultistageStage.cpp +++ b/Sources/Tools/MaxComponent/plMultistageStage.cpp @@ -39,13 +39,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plMultistageStage.h" -#include "max.h" #include "hsStream.h" -#include "resource.h" +#include "hsWindows.h" +#include +#include +#include "resource.h" +#pragma hdrstop + +#include "plMultistageStage.h" #include "plAvatar/plAnimStage.h" plBaseStage::plBaseStage() diff --git a/Sources/Tools/MaxComponent/plMultistageStage.h b/Sources/Tools/MaxComponent/plMultistageStage.h index 8ab5a0d4..5c921b90 100644 --- a/Sources/Tools/MaxComponent/plMultistageStage.h +++ b/Sources/Tools/MaxComponent/plMultistageStage.h @@ -39,11 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" - -class hsStream; class plAnimStage; +class plBaseStage; +class hsStream; enum StageTypes { diff --git a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp index 72b0c27e..b4d642a5 100644 --- a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp +++ b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp @@ -39,23 +39,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plNPCSpawnComp.h" +#include -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - #include "plActivatorBaseComponent.h" - #include "MaxMain/plMaxNode.h" +#include "resource.h" +#pragma hdrstop +#include "plNPCSpawnComp.h" #include "plAvatar/plNPCSpawnMod.h" #include "pnMessage/plNotifyMsg.h" -#include - // Keep from getting dead-code-stripped void DummyCodeIncludFuncNPCSpawn() {} diff --git a/Sources/Tools/MaxComponent/plNPCSpawnComp.h b/Sources/Tools/MaxComponent/plNPCSpawnComp.h index eafccf26..169611a7 100644 --- a/Sources/Tools/MaxComponent/plNPCSpawnComp.h +++ b/Sources/Tools/MaxComponent/plNPCSpawnComp.h @@ -39,10 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "pnKeyedObject/plKey.h" class plComponentBase; +class plKey; class plMaxNodeBase; #define NPC_SPAWN_CLASS_ID Class_ID(0x784e3345, 0x2ed0288c) diff --git a/Sources/Tools/MaxComponent/plNavigableComponents.cpp b/Sources/Tools/MaxComponent/plNavigableComponents.cpp index 8fb21060..a886b585 100644 --- a/Sources/Tools/MaxComponent/plNavigableComponents.cpp +++ b/Sources/Tools/MaxComponent/plNavigableComponents.cpp @@ -39,21 +39,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "max.h" -#include "resource.h" // Resource Dependencies -#include "MaxMain/plPhysicalProps.h" +#include "HeadSpin.h" +#include "plgDispatch.h" +#include "hsTemplates.h" -#include "plComponent.h" //Component Dependencies -#include "plComponentReg.h" // Ibid -#include "MaxMain/plMaxNode.h" // Ibid -#include "pnKeyedObject/plKey.h" // Ibid +#include "plActivatorBaseComponent.h" +#include "plComponent.h" #include "plComponentProcBase.h" +#include "plComponentReg.h" +#include "plPhysicalComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" +#pragma hdrstop #include "plNavigableComponents.h" -#include "plActivatorBaseComponent.h" -#include "plPhysicalComponents.h" +#include "MaxMain/plPhysicalProps.h" #include "MaxConvert/hsConverterUtils.h" //Conversion Dependencies #include "MaxConvert/hsControlConverter.h" // Ibid @@ -61,7 +62,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAvatar/plAvLadderModifier.h" //Modifier Dependencies #include "plPhysical/plSimDefs.h" -#include "plgDispatch.h" //Message Dependencies #include "pnMessage/plObjRefMsg.h" // Ibid #include "pnMessage/plIntRefMsg.h" // Ibid #include "pnMessage/plNodeRefMsg.h" // Ibid diff --git a/Sources/Tools/MaxComponent/plNavigableComponents.h b/Sources/Tools/MaxComponent/plNavigableComponents.h index 12b79ab5..8eb8b8cb 100644 --- a/Sources/Tools/MaxComponent/plNavigableComponents.h +++ b/Sources/Tools/MaxComponent/plNavigableComponents.h @@ -42,11 +42,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plAvLadderComponent_h_inc #define plAvLadderComponent_h_inc -#include "plComponent.h" -#include "pnKeyedObject/plKey.h" - -class plComponentBase; - +class plComponent; +class plErrorMsg; +class plKey; +class plMaxNode; +class INodeTab; +template class hsTArray; #define NAV_LADDER_CID Class_ID(0x6b010148, 0x47cc7464) diff --git a/Sources/Tools/MaxComponent/plNoteTrackDlgComp.cpp b/Sources/Tools/MaxComponent/plNoteTrackDlgComp.cpp index edeba120..292e2d87 100644 --- a/Sources/Tools/MaxComponent/plNoteTrackDlgComp.cpp +++ b/Sources/Tools/MaxComponent/plNoteTrackDlgComp.cpp @@ -39,9 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plNoteTrackDlgComp.h" + #include "plComponentBase.h" +#include "plNoteTrackDlgComp.h" +#pragma hdrstop + void plComponentNoteTrackDlg::ICacheNoteTrack() { diff --git a/Sources/Tools/MaxComponent/plNotetrackAnim.cpp b/Sources/Tools/MaxComponent/plNotetrackAnim.cpp index 6aa6159c..11cb494f 100644 --- a/Sources/Tools/MaxComponent/plNotetrackAnim.cpp +++ b/Sources/Tools/MaxComponent/plNotetrackAnim.cpp @@ -39,10 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plNotetrackAnim.h" + #include "plComponentBase.h" #include "MaxMain/plMaxNodeBase.h" +#pragma hdrstop + +#include "plNotetrackAnim.h" plNotetrackAnim::plNotetrackAnim() : fSegMap(nil) { diff --git a/Sources/Tools/MaxComponent/plNotetrackDlg.cpp b/Sources/Tools/MaxComponent/plNotetrackDlg.cpp index 2bd77f41..5d04bb42 100644 --- a/Sources/Tools/MaxComponent/plNotetrackDlg.cpp +++ b/Sources/Tools/MaxComponent/plNotetrackDlg.cpp @@ -39,12 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsWindows.h" + +#include +#include +#pragma hdrstop + #include "plNoteTrackDlg.h" #include "plNotetrackAnim.h" -#include "max.h" -#include "iparamb2.h" #include "plInterp/plAnimEaseTypes.h" plNoteTrackDlg::plNoteTrackDlg() : fhAnim(NULL), fhLoop(NULL), fPB(nil), fAnimID(-1), fLoopID(-1), fSegMap(nil), fOwner(nil) diff --git a/Sources/Tools/MaxComponent/plNotetrackDlg.h b/Sources/Tools/MaxComponent/plNotetrackDlg.h index 0f1c60b8..c401e928 100644 --- a/Sources/Tools/MaxComponent/plNotetrackDlg.h +++ b/Sources/Tools/MaxComponent/plNotetrackDlg.h @@ -42,12 +42,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PLNOTETRACKDLG_INC #define PLNOTETRACKDLG_INC -#include "HeadSpin.h" - // For HWND #include "plMaxAnimUtils.h" -class IParamBlock2; class Animatable; +class IParamBlock2; class plNoteTrackDlg { diff --git a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp index ab8de2a4..9677f0c1 100644 --- a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp +++ b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp @@ -39,11 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" + #include "plComponent.h" #include "plComponentReg.h" +#include "resource.h" + +#include +#pragma hdrstop + #include "pnEncryption/plRandom.h" #include "plObjectFlockerComponent.h" #include "pnKeyedObject/plUoid.h" diff --git a/Sources/Tools/MaxComponent/plOneShotComponent.cpp b/Sources/Tools/MaxComponent/plOneShotComponent.cpp index 7bd87c29..8e583b5c 100644 --- a/Sources/Tools/MaxComponent/plOneShotComponent.cpp +++ b/Sources/Tools/MaxComponent/plOneShotComponent.cpp @@ -40,49 +40,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plOneShotComponent.h" +#include "hsResMgr.h" + +#include -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - #include "MaxMain/plMaxNode.h" -#if 0 -#include "MaxConvert/hsConverterUtils.h" - -#include "pnSceneObject/plSceneObject.h" - -#include "plgDispatch.h" -#include "plScene/plSceneNode.h" -#include "MaxConvert/hsConverterUtils.h" -#include "MaxConvert/hsControlConverter.h" -#include "pnKeyedObject/plKey.h" - - -#include "plResMgr/plLoc.h" - - -#include "MaxMain/plPlasmaRefMsgs.h" -#include "pnMessage/plNodeRefMsg.h" -#include "pnMessage/plObjRefMsg.h" -#include "pnMessage/plIntRefMsg.h" - -#include "plMaxAnimUtils.h" -#include "tempAnim.h" -#include "plInterp/plController.h" -#include "plHavok1/plHKPhysical.h" -#include "plAvatar/plAvatarMod.h" -#include "plModifier/plAliasModifier.h" -#include "plAudible/plWinAudible.h" -#include "pnSceneObject/plAudioInterface.h" -#include "pnSceneObject/plCoordinateInterface.h" -#endif +#include "resource.h" +#pragma hdrstop -#include "hsResMgr.h" +#include "plOneShotComponent.h" #include "plAvatar/plOneShotMod.h" -#include - void DummyCodeIncludeFuncSingleSht() {} @@ -93,7 +63,7 @@ void DummyCodeIncludeFuncSingleSht() {} // enum { - kAnimName, // Insert in v1 + kOneShotAnimName, // Insert in v1 kStartPtBool_DEAD, // Insert in v1 // obsolete kStartPt_DEAD, // Insert in v1 // obsolete kTriggerVolBool, // Insert in v1 @@ -161,7 +131,7 @@ ParamBlockDesc2 gOneShotBlock IDD_COMP_ONESHOT, IDS_COMP_ONESHOTS, 0, 0, NULL, //params - kAnimName, _T("AnimationName"), TYPE_STRING, 0, 0, + kOneShotAnimName, _T("AnimationName"), TYPE_STRING, 0, 0, p_ui, TYPE_EDITBOX, IDC_COMP_ONESHOT_ANIM_TEXTBOX, end, @@ -210,7 +180,7 @@ plKey plOneShotComponent::GetOneShotKey(plMaxNode *node) bool plOneShotComponent::IsValid() { - const char *animName = fCompPB->GetStr(kAnimName); + const char *animName = fCompPB->GetStr(kOneShotAnimName); return (animName && *animName != '\0'); } @@ -255,7 +225,7 @@ bool plOneShotComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { if (fMods.find(node) != fMods.end()) { - const char *animName = fCompPB->GetStr(kAnimName); + const char *animName = fCompPB->GetStr(kOneShotAnimName); bool drivable = fCompPB->GetInt(kControlSpeedBool); bool reversable = fCompPB->GetInt(kPlayBackwardsBool); float seekDuration = fCompPB->GetFloat(kSeekTimeFloat); diff --git a/Sources/Tools/MaxComponent/plOneShotComponent.h b/Sources/Tools/MaxComponent/plOneShotComponent.h index c4507c46..9e3c02f1 100644 --- a/Sources/Tools/MaxComponent/plOneShotComponent.h +++ b/Sources/Tools/MaxComponent/plOneShotComponent.h @@ -39,10 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "pnKeyedObject/plKey.h" class plComponentBase; +class plKey; class plMaxNodeBase; #define ONESHOTCLASS_ID Class_ID(0x1efd285a, 0x11ba00a2) diff --git a/Sources/Tools/MaxComponent/plParticleComponents.cpp b/Sources/Tools/MaxComponent/plParticleComponents.cpp index 1142151b..e8d35403 100644 --- a/Sources/Tools/MaxComponent/plParticleComponents.cpp +++ b/Sources/Tools/MaxComponent/plParticleComponents.cpp @@ -39,33 +39,38 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include +#include "plgDispatch.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" -#include "plParticleComponents.h" #include "plAnimComponent.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#include +#pragma hdrstop + + +#include "plParticleComponents.h" #include "plNotetrackAnim.h" #include "pnSceneObject/plSceneObject.h" #include "plScene/plSceneNode.h" -#include "plgDispatch.h" #include "MaxConvert/plConvert.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsMaterialConverter.h" #include "MaxConvert/plMeshConverter.h" #include "MaxConvert/hsControlConverter.h" -#include "MaxMain/plMaxNode.h" + #include "MaxPlasmaMtls/Materials/plParticleMtl.h" #include "MaxExport/plErrorMsg.h" -#include "hsResMgr.h" - #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plNodeRefMsg.h" #include "plInterp/plController.h" diff --git a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp index 6ef45eb2..a724bb70 100644 --- a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp @@ -39,14 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -void DummyCodeIncludeFuncPhysConst() -{ -} +#include "hsWindows.h" -#include "HeadSpin.h" #include "plComponent.h" #include "plComponentReg.h" +#pragma hdrstop + +void DummyCodeIncludeFuncPhysConst() +{ +} + #define PHYS_CONST_HINGE_CID Class_ID(0x790b1637, 0x32c94144) #define PHYS_CONST_WHEEL_CID Class_ID(0x6e2958dc, 0x62e86e87) #define PHYS_CONST_SS_CID Class_ID(0x14843886, 0x62a24e94) diff --git a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp index 7ac147c2..6c232cbc 100644 --- a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp @@ -39,24 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -// singular -#include "plPhysicalComponents.h" +#include "HeadSpin.h" +#include "hsResMgr.h" -// local #include "plComponentReg.h" +#include "MaxMain/plPhysicalProps.h" +#include "MaxMain/plMaxNode.h" #include "resource.h" -// global -#include "hsResMgr.h" +#include +#pragma hdrstop + +// singular +#include "plPhysicalComponents.h" // other #include "plPhysical/plSimDefs.h" #include "plPhysicsGroups.h" -#include "MaxMain/plMaxNode.h" -#include "MaxMain/plPhysicalProps.h" #include "MaxMain/plPlasmaRefMsgs.h" #include "plPhysical/plCollisionDetector.h" diff --git a/Sources/Tools/MaxComponent/plPhysicalComponents.h b/Sources/Tools/MaxComponent/plPhysicalComponents.h index b760c517..3868e3f2 100644 --- a/Sources/Tools/MaxComponent/plPhysicalComponents.h +++ b/Sources/Tools/MaxComponent/plPhysicalComponents.h @@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPhysicalComponents_h_inc #define plPhysicalComponents_h_inc -#include "max.h" //Max Dependencies #include "plComponent.h" #define PHYSICS_BASE_CID Class_ID(0x610f187a, 0x25824341) diff --git a/Sources/Tools/MaxComponent/plPickLocalizationDlg.cpp b/Sources/Tools/MaxComponent/plPickLocalizationDlg.cpp index feb739f3..259ee36c 100644 --- a/Sources/Tools/MaxComponent/plPickLocalizationDlg.cpp +++ b/Sources/Tools/MaxComponent/plPickLocalizationDlg.cpp @@ -39,18 +39,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "plPickLocalizationDlg.h" -#include "pfLocalizationMgr/pfLocalizationDataMgr.h" - -#include "MaxMain/plMaxCFGFile.h" -#include "MaxMain/plMaxAccelerators.h" - +#include "HeadSpin.h" #include "hsStringTokenizer.h" +#include #include "resource.h" - #include +#pragma hdrstop + +#include "plPickLocalizationDlg.h" +#include "pfLocalizationMgr/pfLocalizationDataMgr.h" + +#include "MaxMain/plMaxCFGFile.h" +#include "MaxMain/plMaxAccelerators.h" //////////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxComponent/plPickLocalizationDlg.h b/Sources/Tools/MaxComponent/plPickLocalizationDlg.h index e20cfb34..4e30ec75 100644 --- a/Sources/Tools/MaxComponent/plPickLocalizationDlg.h +++ b/Sources/Tools/MaxComponent/plPickLocalizationDlg.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPickLocalizationDlg_h #define plPickLocalizationDlg_h -#include "HeadSpin.h" -#include "max.h" #include class plPickLocalizationDlg diff --git a/Sources/Tools/MaxComponent/plPickMaterialMap.cpp b/Sources/Tools/MaxComponent/plPickMaterialMap.cpp index 7b5cfe26..a04716ac 100644 --- a/Sources/Tools/MaxComponent/plPickMaterialMap.cpp +++ b/Sources/Tools/MaxComponent/plPickMaterialMap.cpp @@ -39,15 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsThread.h" +#include "MaxMain/plMaxNode.h" + +#include +#pragma hdrstop + #include "plPickMaterialMap.h" -#include "max.h" -#include "MaxMain/plMaxNode.h" // MAXR4 HACK // Coming in the backdoor... -#include "hsThread.h" class hsHackWinFindThread : public hsThread { protected: diff --git a/Sources/Tools/MaxComponent/plPickMaterialMap.h b/Sources/Tools/MaxComponent/plPickMaterialMap.h index 926a20eb..99d3a5d1 100644 --- a/Sources/Tools/MaxComponent/plPickMaterialMap.h +++ b/Sources/Tools/MaxComponent/plPickMaterialMap.h @@ -39,17 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -class plMessage; -class IParamBlock2; -class ClassDesc2; -class plMaxNode; -class plErrorMsg; -class plComponentBase; -class Mtl; -class plMaxNodeBase; -template class hsTArray; -//int GetMatAnimModKey(Mtl* mtl, plMaxNodeBase* node, float begin, float end, hsTArray& keys); +class Mtl; +class IParamBlock2; namespace plPickMaterialMap { diff --git a/Sources/Tools/MaxComponent/plPickNode.cpp b/Sources/Tools/MaxComponent/plPickNode.cpp index 6ed24165..90890426 100644 --- a/Sources/Tools/MaxComponent/plPickNode.cpp +++ b/Sources/Tools/MaxComponent/plPickNode.cpp @@ -39,17 +39,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plPickNode.h" -#include "iparamb2.h" #include #include "plActivatorBaseComponent.h" -#include "plPythonFileComponent.h" #include "plBehavioralComponents.h" -#include "plNavigableComponents.h" #include "plPhysicalComponents.h" + +#include +#pragma hdrstop + +#include "plPickNode.h" + #include "plCameraComponents.h" +#include "plNavigableComponents.h" +#include "plPythonFileComponent.h" class plPickNodeMax : public HitByNameDlgCallback { diff --git a/Sources/Tools/MaxComponent/plPickNode.h b/Sources/Tools/MaxComponent/plPickNode.h index 870934ae..925a58f8 100644 --- a/Sources/Tools/MaxComponent/plPickNode.h +++ b/Sources/Tools/MaxComponent/plPickNode.h @@ -42,10 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPickNode_h_inc #define plPickNode_h_inc -#include "max.h" #include +class Class_ID; class plComponentBase; +class IParamBlock2; namespace plPick { diff --git a/Sources/Tools/MaxComponent/plPickNodeBase.cpp b/Sources/Tools/MaxComponent/plPickNodeBase.cpp index 181f7c04..d18119b3 100644 --- a/Sources/Tools/MaxComponent/plPickNodeBase.cpp +++ b/Sources/Tools/MaxComponent/plPickNodeBase.cpp @@ -40,14 +40,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plPickNodeBase.h" +#include -#include "MaxMain/plMaxNode.h" #include "plComponentBase.h" +#include "MaxMain/plMaxNode.h" #include "resource.h" -#include "MaxMain/plMaxAccelerators.h" +#pragma hdrstop -#include +#include "plPickNodeBase.h" +#include "MaxMain/plMaxAccelerators.h" plPickNodeBase::plPickNodeBase(IParamBlock2* pb, int nodeParamID) : fPB(pb), fNodeParamID(nodeParamID) { diff --git a/Sources/Tools/MaxComponent/plPickNodeBase.h b/Sources/Tools/MaxComponent/plPickNodeBase.h index 46edc80c..4dc8f762 100644 --- a/Sources/Tools/MaxComponent/plPickNodeBase.h +++ b/Sources/Tools/MaxComponent/plPickNodeBase.h @@ -42,13 +42,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPickNodeBase_h_inc #define plPickNodeBase_h_inc -#include "HeadSpin.h" -#include "max.h" #include -class IParamBlock2; -class plMaxNode; +class Class_ID; class plComponentBase; +class plMaxNode; +class Mtl; +class IParamBlock2; class plPickNodeBase { diff --git a/Sources/Tools/MaxComponent/plPickNodeComp.cpp b/Sources/Tools/MaxComponent/plPickNodeComp.cpp index 56df1438..905229ee 100644 --- a/Sources/Tools/MaxComponent/plPickNodeComp.cpp +++ b/Sources/Tools/MaxComponent/plPickNodeComp.cpp @@ -39,14 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "plPickNodeBase.h" -#include "MaxMain/plMaxNode.h" +#include "HeadSpin.h" +#include + #include "plComponentBase.h" +#include "MaxMain/plMaxNode.h" #include "resource.h" -#include "MaxMain/plMaxAccelerators.h" +#pragma hdrstop -#include +#include "plPickNodeBase.h" +#include "MaxMain/plMaxAccelerators.h" plPickNodeBase::plPickNodeBase(IParamBlock2* pb, int nodeParamID) : fPB(pb), fNodeParamID(nodeParamID) { diff --git a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp index f66d5f98..3a42a811 100644 --- a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp +++ b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp @@ -39,13 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plPythonFileComponent.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "plActivatorBaseComponent.h" +#include "plAnimComponent.h" +#include "plPhysicalComponents.h" #include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#include +#include +#include +#include +#pragma hdrstop + +#include "plPythonFileComponent.h" #include "plAutoUIBlock.h" #include "plAutoUIParams.h" @@ -56,7 +68,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plGUIComponents.h" #include "pfGUISkinComp.h" #include "plExcludeRegionComponent.h" -#include "plAnimComponent.h" #include "plNotetrackAnim.h" #include "plOneShotComponent.h" #include "plMultistageBehComponent.h" @@ -66,25 +77,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plDrawable/plWaveSetBase.h" #include "plClusterComponent.h" #include "plDrawable/plClusterGroup.h" -#include "plPhysicalComponents.h" //#include "plHavok1/plHKPhysical.h" #include "plAvatar/plSwimRegion.h" #include "plSurface/plGrassShaderMod.h" #include "plGrassComponent.h" -#include "notify.h" - -#include -#include -#include -#include - #include "pfPython/plPythonFileMod.h" #include "pfPython/plPythonParameter.h" // for DynamicText hack to get the plKeys (could probably be removed later) #include "plGImage/plDynamicTextMap.h" +#include "plResponderComponent.h" + //// plCommonPythonLib /////////////////////////////////////////////////////// // Derived class for our global python fileMods, since they go in to the // BuiltIn page @@ -403,10 +408,6 @@ bool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -#include "plActivatorBaseComponent.h" -#include "pnKeyedObject/plKey.h" -#include "plResponderComponent.h" - bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { IParamBlock2 *pb = (IParamBlock2*)fCompPB->GetReferenceTarget(kPythonFilePB); diff --git a/Sources/Tools/MaxComponent/plPythonFileComponent.h b/Sources/Tools/MaxComponent/plPythonFileComponent.h index 6fed5329..bf2d1892 100644 --- a/Sources/Tools/MaxComponent/plPythonFileComponent.h +++ b/Sources/Tools/MaxComponent/plPythonFileComponent.h @@ -39,8 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -class plComponentClassDesc; + class plAutoUIBlock; +class plComponentClassDesc; #define PYTHON_FILE_CID Class_ID(0x670d3629, 0x559e4f11) diff --git a/Sources/Tools/MaxComponent/plRepComponent.cpp b/Sources/Tools/MaxComponent/plRepComponent.cpp index 13df6ad7..9073d625 100644 --- a/Sources/Tools/MaxComponent/plRepComponent.cpp +++ b/Sources/Tools/MaxComponent/plRepComponent.cpp @@ -39,22 +39,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plLoadMask.h" +#include "hsResMgr.h" -#include "max.h" -#include "dummy.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" #include "plMiscComponents.h" - -#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxMain/plMaxNode.h" -#include "MaxExport/plExportErrorMsg.h" +#include "resource.h" -#include "hsResMgr.h" +#include +#include +#pragma hdrstop -#include "plLoadMask.h" +#include "MaxMain/plPlasmaRefMsgs.h" +#include "MaxExport/plExportErrorMsg.h" #include "plPickNode.h" diff --git a/Sources/Tools/MaxComponent/plResponderAnim.cpp b/Sources/Tools/MaxComponent/plResponderAnim.cpp index be20aa8e..92b210c8 100644 --- a/Sources/Tools/MaxComponent/plResponderAnim.cpp +++ b/Sources/Tools/MaxComponent/plResponderAnim.cpp @@ -40,28 +40,33 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plResponderAnim.h" -#include "plResponderComponentPriv.h" -#include "resource.h" -#include "max.h" - -#include "MaxMain/plMaxNode.h" +#include "plAudible.h" #include "plAnimComponent.h" #include "plAudioComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" -#include "plMaxAnimUtils.h" +#include #include +#pragma hdrstop + +#include "plResponderAnim.h" +#include "plResponderComponentPriv.h" + +#include "plAnimCompProc.h" +#include "plPickNode.h" +#include "plResponderGetComp.h" + +#include "plMaxAnimUtils.h" // Needed for anim msg creation -#include "pnKeyedObject/plKey.h" #include "plMessage/plAnimCmdMsg.h" #include "plNotetrackAnim.h" // Needed for sound msg creation #include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plAudioInterface.h" -#include "plAudible.h" #include "pnMessage/plSoundMsg.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -529,10 +534,6 @@ void plResponderCmdAnim::CreateWait(plMaxNode* node, plErrorMsg* pErrMsg, IParam hsRefCnt_SafeUnRef(eventMsg); } -#include "plAnimCompProc.h" -#include "plPickNode.h" -#include "plResponderGetComp.h" - class plResponderAnimProc : public plAnimCompProc { public: diff --git a/Sources/Tools/MaxComponent/plResponderAnim.h b/Sources/Tools/MaxComponent/plResponderAnim.h index 714c15e6..b73b8441 100644 --- a/Sources/Tools/MaxComponent/plResponderAnim.h +++ b/Sources/Tools/MaxComponent/plResponderAnim.h @@ -39,10 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "plResponderCmd.h" -#include "pnKeyedObject/plKey.h" class plComponentBase; +class plErrorMsg; +class plMaxNode; +class plMessage; +class IParamBlock2; class plResponderCmdAnim : public plResponderCmd { diff --git a/Sources/Tools/MaxComponent/plResponderCmd.h b/Sources/Tools/MaxComponent/plResponderCmd.h index 2cf6557f..b673fd98 100644 --- a/Sources/Tools/MaxComponent/plResponderCmd.h +++ b/Sources/Tools/MaxComponent/plResponderCmd.h @@ -46,11 +46,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include "pnKeyedObject/plKey.h" -class ParamBlockDesc2; -class IParamBlock2; -class plMessage; class plErrorMsg; class plMaxNode; +class plMessage; +class ParamBlockDesc2; +class IParamBlock2; +class plString; class ResponderWaitInfo { diff --git a/Sources/Tools/MaxComponent/plResponderComponent.cpp b/Sources/Tools/MaxComponent/plResponderComponent.cpp index 60fb170d..6629824e 100644 --- a/Sources/Tools/MaxComponent/plResponderComponent.cpp +++ b/Sources/Tools/MaxComponent/plResponderComponent.cpp @@ -40,8 +40,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plResponderComponentPriv.h" +#include "hsResMgr.h" +#include "hsStlSortUtils.h" +#include "hsWindows.h" + +#include +#include +#include + #include "resource.h" +#pragma hdrstop + +#include "plResponderComponentPriv.h" #include "plComponent.h" #include "plComponentReg.h" @@ -59,7 +69,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plObjRefMsg.h" #include "pnMessage/plNotifyMsg.h" -#include "hsResMgr.h" #include "MaxMain/plMaxNode.h" #include "plPickNode.h" @@ -584,8 +593,6 @@ void plResponderProc::IAddMenuItem(HMENU hMenu, int id) AppendMenu(hMenu, MF_STRING, id+1, fNames[id]); } -#include "hsSTLSortUtils.h" - void plResponderProc::ICreateMenu() { fhMenu = CreatePopupMenu(); diff --git a/Sources/Tools/MaxComponent/plResponderComponent.h b/Sources/Tools/MaxComponent/plResponderComponent.h index a55f4779..224d27ab 100644 --- a/Sources/Tools/MaxComponent/plResponderComponent.h +++ b/Sources/Tools/MaxComponent/plResponderComponent.h @@ -39,8 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + +#ifndef _plResponderComponent_h_inc_ +#define _plResponderComponent_h_inc_ + #include "plComponentExt.h" -#include "pnKeyedObject/plKey.h" + +class plKey; +class plMaxNodeBase; #define RESPONDER_CID Class_ID(0x46b83f3e, 0x7d5e5d17) @@ -62,3 +68,5 @@ namespace Responder // get the key to the responder modifier plKey GetKey(plComponentBase *comp, plMaxNodeBase *node); } + +#endif // _plResponderComponent_h_inc_ diff --git a/Sources/Tools/MaxComponent/plResponderComponentPriv.h b/Sources/Tools/MaxComponent/plResponderComponentPriv.h index 19f007c0..71bf544d 100644 --- a/Sources/Tools/MaxComponent/plResponderComponentPriv.h +++ b/Sources/Tools/MaxComponent/plResponderComponentPriv.h @@ -39,13 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -// Private header for the responder component. Anyone else should include plResponderComponent.h + +/* \file plResponderComponentPriv.h + * + * Private header for the responder component. Anyone else should include plResponderComponent.h + */ + #include "plResponderComponent.h" #include "plComponent.h" #include "pnKeyedObject/plKey.h" #include +class plErrorMsg; +class plMaxNode; + class plResponderComponent : public plComponent { public: diff --git a/Sources/Tools/MaxComponent/plResponderGetComp.cpp b/Sources/Tools/MaxComponent/plResponderGetComp.cpp index 609bad5a..826d7760 100644 --- a/Sources/Tools/MaxComponent/plResponderGetComp.cpp +++ b/Sources/Tools/MaxComponent/plResponderGetComp.cpp @@ -39,14 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plResponderGetComp.h" +#include "HeadSpin.h" #include +#include "plComponentBase.h" #include "MaxMain/plMaxNodeBase.h" #include "resource.h" -#include "plComponentBase.h" +#pragma hdrstop + +#include "plResponderGetComp.h" #include "MaxMain/plMaxAccelerators.h" plResponderGetComp& plResponderGetComp::Instance() diff --git a/Sources/Tools/MaxComponent/plResponderGetComp.h b/Sources/Tools/MaxComponent/plResponderGetComp.h index 665c5ec9..9bcc5fca 100644 --- a/Sources/Tools/MaxComponent/plResponderGetComp.h +++ b/Sources/Tools/MaxComponent/plResponderGetComp.h @@ -39,15 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "max.h" #include #include +class Class_ID; class plComponentBase; -class IParamBlock2; class plMaxNodeBase; +class IParamBlock2; class plResponderGetComp { diff --git a/Sources/Tools/MaxComponent/plResponderLink.cpp b/Sources/Tools/MaxComponent/plResponderLink.cpp index 0ad774e1..f6f1b6e0 100644 --- a/Sources/Tools/MaxComponent/plResponderLink.cpp +++ b/Sources/Tools/MaxComponent/plResponderLink.cpp @@ -39,17 +39,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plResponderLink.h" -#include "plResponderComponentPriv.h" -#include "resource.h" -#include "max.h" -#include "MaxMain/plMaxNode.h" +#include "hsFiles.h" #include "hsResMgr.h" + +#include "plComponentBase.h" +#include "plActivatorBaseComponent.h" +#include "plCameraComponents.h" #include "plMiscComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + +#include "plResponderLink.h" +#include "plResponderComponentPriv.h" + // Needed for the dialog #include "MaxMain/plMaxCFGFile.h" -#include "hsFiles.h" #include "plAgeDescription/plAgeDescription.h" // Needed to create the message @@ -377,8 +386,6 @@ void plResponderLinkProc::ILoadParentAgeFilenamesCombo(HWND hWnd, IParamBlock2 * /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -#include "plComponentBase.h" - // Needed for message creation #include "plModifier/plResponderModifier.h" #include "plResponderGetComp.h" @@ -725,7 +732,6 @@ plMessage *plResponderCmdNotify::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -#include "plCameraComponents.h" #include "plPickNode.h" enum { kActivatorComp, kActivatorEnable }; @@ -806,7 +812,6 @@ const char *plResponderCmdDetectorEnable::GetInstanceName(IParamBlock2 *pb) } #include "pnMessage/plEnableMsg.h" -#include "plActivatorBaseComponent.h" #include "plVolumeGadgetComponent.h" #include "plNavigableComponents.h" @@ -1089,7 +1094,6 @@ const char *plResponderCmdCamTransition::GetInstanceName(IParamBlock2 *pb) } #include "pnMessage/plCameraMsg.h" -#include "plCameraComponents.h" plMessage *plResponderCmdCamTransition::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) { diff --git a/Sources/Tools/MaxComponent/plResponderLink.h b/Sources/Tools/MaxComponent/plResponderLink.h index 3402809f..04cf1bd7 100644 --- a/Sources/Tools/MaxComponent/plResponderLink.h +++ b/Sources/Tools/MaxComponent/plResponderLink.h @@ -39,10 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" + #include "plResponderCmd.h" #include "pnKeyedObject/plKey.h" +class plErrorMsg; +class plMaxNode; +class IParamBlock2; +class ParamBlockDesc2; + class plResponderCmdLink : public plResponderCmd { public: diff --git a/Sources/Tools/MaxComponent/plResponderMtl.cpp b/Sources/Tools/MaxComponent/plResponderMtl.cpp index 80162c53..dd47cb13 100644 --- a/Sources/Tools/MaxComponent/plResponderMtl.cpp +++ b/Sources/Tools/MaxComponent/plResponderMtl.cpp @@ -39,13 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plResponderMtl.h" -#include "plResponderComponentPriv.h" -#include "resource.h" -#include "max.h" + +#include +#include +#include #include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + +#include "plResponderMtl.h" +#include "plResponderComponentPriv.h" #include "MaxPlasmaMtls/Materials/plDecalMtl.h" #include "MaxPlasmaMtls/Materials/plPassMtl.h" @@ -65,10 +73,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Needed for convert #include "plMessage/plAnimCmdMsg.h" -#include -#include -#include - #include "MaxMain/plPlasmaRefMsgs.h" enum diff --git a/Sources/Tools/MaxComponent/plResponderMtl.h b/Sources/Tools/MaxComponent/plResponderMtl.h index a738f1a3..b238791b 100644 --- a/Sources/Tools/MaxComponent/plResponderMtl.h +++ b/Sources/Tools/MaxComponent/plResponderMtl.h @@ -42,15 +42,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plResponderCmd.h" #include "pnKeyedObject/plKey.h" -class plMessage; -class IParamBlock2; -class ClassDesc2; -class plMaxNode; +template class hsTArray; class plErrorMsg; -class plComponentBase; -class Mtl; +class plMaxNode; class plMaxNodeBase; -template class hsTArray; +class plMessage; +class Mtl; +class IParamBlock2; +class plString; int GetMatAnimModKey(Mtl* mtl, plMaxNodeBase* node, const plString &segName, hsTArray& keys); diff --git a/Sources/Tools/MaxComponent/plResponderWait.cpp b/Sources/Tools/MaxComponent/plResponderWait.cpp index b4cb0edc..d720c221 100644 --- a/Sources/Tools/MaxComponent/plResponderWait.cpp +++ b/Sources/Tools/MaxComponent/plResponderWait.cpp @@ -40,11 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" + +#include "MaxMain/MaxCompat.h" +#include +#include "resource.h" +#pragma hdrstop + #include "plResponderWait.h" #include "plResponderComponentPriv.h" -#include "resource.h" #include "plModifier/plResponderModifier.h" -#include "MaxMain/MaxCompat.h" #include "plResponderLink.h" diff --git a/Sources/Tools/MaxComponent/plResponderWait.h b/Sources/Tools/MaxComponent/plResponderWait.h index 2af33065..754efff9 100644 --- a/Sources/Tools/MaxComponent/plResponderWait.h +++ b/Sources/Tools/MaxComponent/plResponderWait.h @@ -39,12 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ - // Damn, had to pass in a HWND + #include + class ClassDesc2; -class IParamBlock2; class plKey; class plMessage; +class IParamBlock2; class plResponderModifier; class plString; diff --git a/Sources/Tools/MaxComponent/plSeekPoint.cpp b/Sources/Tools/MaxComponent/plSeekPoint.cpp index b61980be..0dce69cb 100644 --- a/Sources/Tools/MaxComponent/plSeekPoint.cpp +++ b/Sources/Tools/MaxComponent/plSeekPoint.cpp @@ -39,26 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include +#include "hsGeometry3.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - #include "MaxMain/plMaxNode.h" +#include "resource.h" -#include "pnSceneObject/plSceneObject.h" +#include +#pragma hdrstop -#include "hsResMgr.h" +#include "pnSceneObject/plSceneObject.h" #include "plScene/plSceneNode.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/plConvert.h" #include "MaxConvert/hsControlConverter.h" -#include "MaxMain/plMaxNode.h" -#include "hsGeometry3.h" #include "plAvatar/plSeekPointMod.h" diff --git a/Sources/Tools/MaxComponent/plShadowComponents.cpp b/Sources/Tools/MaxComponent/plShadowComponents.cpp index 58900ea6..06a71408 100644 --- a/Sources/Tools/MaxComponent/plShadowComponents.cpp +++ b/Sources/Tools/MaxComponent/plShadowComponents.cpp @@ -39,17 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - #include "MaxMain/plMaxNode.h" -#include "MaxExport/plExportProgressBar.h" +#include "resource.h" -#include "HeadSpin.h" +#include +#pragma hdrstop + +#include "MaxExport/plExportProgressBar.h" #include "plShadowComponents.h" @@ -61,8 +63,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plGLight/plPointShadowMaster.h" #include "plGLight/plDirectShadowMaster.h" -#include "hsResMgr.h" - void DummyCodeIncludeFuncShadow() { } diff --git a/Sources/Tools/MaxComponent/plShadowComponents.h b/Sources/Tools/MaxComponent/plShadowComponents.h index 540aeb44..88669386 100644 --- a/Sources/Tools/MaxComponent/plShadowComponents.h +++ b/Sources/Tools/MaxComponent/plShadowComponents.h @@ -47,10 +47,10 @@ const Class_ID SHADOWCAST_COMP_CID(0x4f447666, 0x73a07cc6); const Class_ID SHADOWRCV_COMP_CID(0x1d3009ca, 0x4d28537f); const Class_ID SHADOWLIGHT_COMP_CID(0x2a996151, 0x4f4d1ae1); -class plMaxNode; +class plDirectShadowMaster; class plErrorMsg; +class plMaxNode; class plPointShadowMaster; -class plDirectShadowMaster; class plShadowCaster; class plShadowCastComponent : public plComponent diff --git a/Sources/Tools/MaxComponent/plSmoothComponent.cpp b/Sources/Tools/MaxComponent/plSmoothComponent.cpp index d528f84c..28488da2 100644 --- a/Sources/Tools/MaxComponent/plSmoothComponent.cpp +++ b/Sources/Tools/MaxComponent/plSmoothComponent.cpp @@ -39,16 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" - #include "MaxMain/plMaxNode.h" +#include "resource.h" -#include "HeadSpin.h" +#include +#pragma hdrstop #include "plDrawable/plDrawableSpans.h" diff --git a/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp b/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp index af9e600c..9d84d947 100644 --- a/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp +++ b/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp @@ -39,24 +39,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "dummy.h" -#include "resource.h" +#include "hsTemplates.h" +#include "hsResMgr.h" + #include "plComponent.h" #include "plComponentReg.h" #include "plMiscComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#include +#pragma hdrstop + #include "plSoftVolumeComponent.h" #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" #include "plIntersect/plSoftVolumeTypes.h" #include "plIntersect/plVolumeIsect.h" -#include "pnKeyedObject/plKey.h" #include "pnSceneObject/plSceneObject.h" #include "pnMessage/plObjRefMsg.h" -#include "hsResMgr.h" #include "plGLight/plLightInfo.h" #include "plScene/plOccluder.h" diff --git a/Sources/Tools/MaxComponent/plSoftVolumeComponent.h b/Sources/Tools/MaxComponent/plSoftVolumeComponent.h index a8276ea0..5e31edf4 100644 --- a/Sources/Tools/MaxComponent/plSoftVolumeComponent.h +++ b/Sources/Tools/MaxComponent/plSoftVolumeComponent.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plSoftVolumeComponent_h #define _plSoftVolumeComponent_h -#include "pnKeyedObject/plKey.h" -#include "hsTemplates.h" #include "pnKeyedObject/plUoid.h" ///////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxComponent/plTemplateComponent.cpp b/Sources/Tools/MaxComponent/plTemplateComponent.cpp index 2b33ebdd..fbef4c91 100644 --- a/Sources/Tools/MaxComponent/plTemplateComponent.cpp +++ b/Sources/Tools/MaxComponent/plTemplateComponent.cpp @@ -39,19 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsTemplates.h" + #include "plComponent.h" #include "plComponentReg.h" - -#include "hsTemplates.h" -#include "MaxMain/plPluginResManager.h" +#include "plMiscComponents.h" #include "MaxMain/plMaxNode.h" -#include "pnSceneObject/plSceneObject.h" -#include "pnKeyedObject/plKey.h" +#include "resource.h" +#pragma hdrstop -#include "plMiscComponents.h" -#include "resource.h" + +#include "MaxMain/plPluginResManager.h" +#include "pnSceneObject/plSceneObject.h" void DummyCodeIncludeFuncTemplate() { diff --git a/Sources/Tools/MaxComponent/plTypesComponents.cpp b/Sources/Tools/MaxComponent/plTypesComponents.cpp index f17dd99c..b7b45390 100644 --- a/Sources/Tools/MaxComponent/plTypesComponents.cpp +++ b/Sources/Tools/MaxComponent/plTypesComponents.cpp @@ -39,29 +39,33 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include +#include "plgDispatch.h" +#include "hsGeometry3.h" +#include "hsResMgr.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" -#include "pnSceneObject/plSceneObject.h" +#include "plAnimComponent.h" +#include "plAudioComponents.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" -#include "pfCamera/plInterestingModifier.h" -#include "plModifier/plSpawnModifier.h" -#include "plgDispatch.h" +#include +#include +#pragma hdrstop +#include "pnSceneObject/plSceneObject.h" -#include "hsResMgr.h" +#include "pfCamera/plInterestingModifier.h" +#include "plModifier/plSpawnModifier.h" #include "plScene/plSceneNode.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/plConvert.h" #include "MaxConvert/hsControlConverter.h" -#include "MaxMain/plMaxNode.h" -#include "hsGeometry3.h" #include "plPhysical/plSimDefs.h" #include "pnSceneObject/plCoordinateInterface.h" @@ -481,8 +485,6 @@ bool plMaintainersMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErr #include "MaxMain/plMtlCollector.h" #include "plResponderMtl.h" #include "plResponderGetComp.h" -#include "plAnimComponent.h" -#include "plAudioComponents.h" class plGameMarkerComponent : public plComponent { diff --git a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp index a4f60023..6c81a3f9 100644 --- a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp +++ b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp @@ -39,14 +39,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plVolumeGadgetComponent.h" -#include "resource.h" +#include "hsResMgr.h" + +#include "plComponentProcBase.h" #include "plComponentReg.h" +#include "plActivatorBaseComponent.h" +#include "plPhysicalComponents.h" +#include "plResponderComponent.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + +#include "plVolumeGadgetComponent.h" #include "pnSceneObject/plSceneObject.h" #include "pnKeyedObject/hsKeyedObject.h" -#include "pnKeyedObject/plKey.h" #include "plPhysical/plCollisionDetector.h" // MM #include "plModifier/plLogicModifier.h" @@ -59,17 +70,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plNotifyMsg.h" #include "pnMessage/plCursorChangeMsg.h" -#include "hsResMgr.h" -#include "MaxMain/plMaxNode.h" #include "MaxConvert/plConvert.h" -#include "plResponderComponent.h" - // Physics Dependencies below #include "MaxConvert/hsConverterUtils.h" //Conversion Dependencies -#include "plPhysicalComponents.h" #include "pnMessage/plIntRefMsg.h" -#include "plComponentProcBase.h" #include "MaxMain/plPhysicalProps.h" diff --git a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h index 9dd45a18..f77eea73 100644 --- a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h +++ b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h @@ -42,9 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plVolumeGadgetComponent_inc #define plVolumeGadgetComponent_inc -#include "plActivatorBaseComponent.h" -#include "pnKeyedObject/plKey.h" - #define VOLUMEGADGET_CID Class_ID(0x1f77b56, 0x209a09d8) class plVolumeGadgetComponent : public plActivatorBaseComponent diff --git a/Sources/Tools/MaxComponent/plWaterComponent.cpp b/Sources/Tools/MaxComponent/plWaterComponent.cpp index f06780ed..237b5eea 100644 --- a/Sources/Tools/MaxComponent/plWaterComponent.cpp +++ b/Sources/Tools/MaxComponent/plWaterComponent.cpp @@ -39,24 +39,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plTweak.h" -#include "max.h" -#include "meshdlib.h" -#include "dummy.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" +#include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#include +#include +#pragma hdrstop + #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/plMaxNode.h" +#include "plPickNode.h" #include "plWaterComponent.h" #include "plSoftVolumeComponent.h" -#include "HeadSpin.h" -#include "plTweak.h" - #include "plDrawable/plWaveSetBase.h" #include "plDrawable/plWaveSet7.h" #include "plDrawable/plFixedWaterState7.h" @@ -791,8 +794,6 @@ public: void DeleteThis() { } }; -#include "plPickNode.h" - BOOL plShoreCompSelProc::DlgProc(TimeValue t, IParamMap2 *paramMap, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) @@ -931,8 +932,6 @@ public: void DeleteThis() { } }; -#include "plPickNode.h" - BOOL plWDecalCompSelProc::DlgProc(TimeValue t, IParamMap2 *paramMap, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) diff --git a/Sources/Tools/MaxComponent/plXImposter.cpp b/Sources/Tools/MaxComponent/plXImposter.cpp index dfb70f98..626d210c 100644 --- a/Sources/Tools/MaxComponent/plXImposter.cpp +++ b/Sources/Tools/MaxComponent/plXImposter.cpp @@ -39,15 +39,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plPhysical.h" -#include "max.h" -#include "resource.h" #include "plComponent.h" #include "plComponentReg.h" -#include "MaxMain/plPlasmaRefMsgs.h" - #include "MaxMain/plMaxNode.h" +#include "resource.h" + +#include +#pragma hdrstop + +#include "MaxMain/plPlasmaRefMsgs.h" #include "MaxExport/plExportProgressBar.h" #include "plXImposter.h" @@ -55,7 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfAnimation/plFilterCoordInterface.h" #include "pnSceneObject/plSimulationInterface.h" -#include "plPhysical.h" const Class_ID FILTERINHERIT_COMP_CID(0x263928d8, 0x548456da); diff --git a/Sources/Tools/MaxMain/plMaxNode.h b/Sources/Tools/MaxMain/plMaxNode.h index 877fd5ad..98886eb8 100644 --- a/Sources/Tools/MaxMain/plMaxNode.h +++ b/Sources/Tools/MaxMain/plMaxNode.h @@ -47,7 +47,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTemplates.h" #include "hsMatrix44.h" -#include "iparamb2.h" #include "pnKeyedObject/plKey.h" #include diff --git a/Sources/Tools/MaxMain/plMaxNodeBase.h b/Sources/Tools/MaxMain/plMaxNodeBase.h index 2cb04a7b..b421316a 100644 --- a/Sources/Tools/MaxMain/plMaxNodeBase.h +++ b/Sources/Tools/MaxMain/plMaxNodeBase.h @@ -44,7 +44,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsTemplates.h" -#include "max.h" #include "hsMatrix44.h" #include "hsColorRGBA.h" #include "pnKeyedObject/plKey.h" From 586aa94e3858a22b96a1c002d8116b5083f3aff0 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 17 Nov 2012 21:25:57 -0500 Subject: [PATCH 08/13] Untangle MaxConvert Fix compilation as a result of hsWindows. Also, add precompiled header support (this shaves off 9 seconds on my machine) and fix some warnings. As we saw in the PCH-ization of pfPython, includes were untangled (to some extent) and forward declarations were introduced where appropriate. --- Sources/Tools/MaxConvert/CMakeLists.txt | 1 + Sources/Tools/MaxConvert/Pch.cpp | 51 +++++++++ Sources/Tools/MaxConvert/Pch.h | 101 ++++++++++++++++++ Sources/Tools/MaxConvert/StringTokenizer.cpp | 7 +- Sources/Tools/MaxConvert/StringTokenizer.h | 4 +- Sources/Tools/MaxConvert/UserPropMgr.cpp | 64 +++++------ Sources/Tools/MaxConvert/UserPropMgr.h | 54 +++++----- .../Tools/MaxConvert/hsControlConverter.cpp | 27 +++-- Sources/Tools/MaxConvert/hsControlConverter.h | 29 +++-- Sources/Tools/MaxConvert/hsConverterUtils.cpp | 28 +++-- Sources/Tools/MaxConvert/hsConverterUtils.h | 15 +-- .../Tools/MaxConvert/hsMaterialConverter.cpp | 50 ++++----- .../Tools/MaxConvert/hsMaterialConverter.h | 25 ++--- Sources/Tools/MaxConvert/hsMaxLayerBase.h | 2 - Sources/Tools/MaxConvert/hsVertexShader.cpp | 21 ++-- Sources/Tools/MaxConvert/plBitmapCreator.cpp | 8 +- Sources/Tools/MaxConvert/plBitmapCreator.h | 7 +- Sources/Tools/MaxConvert/plClusterUtil.cpp | 25 +++-- Sources/Tools/MaxConvert/plClusterUtil.h | 12 +-- Sources/Tools/MaxConvert/plConvert.cpp | 23 ++-- Sources/Tools/MaxConvert/plConvert.h | 5 +- Sources/Tools/MaxConvert/plDistTree.cpp | 5 +- Sources/Tools/MaxConvert/plDistTree.h | 2 - Sources/Tools/MaxConvert/plDistributor.cpp | 19 ++-- Sources/Tools/MaxConvert/plLayerConverter.cpp | 37 ++++--- Sources/Tools/MaxConvert/plLayerConverter.h | 4 - Sources/Tools/MaxConvert/plLightMapGen.cpp | 22 ++-- Sources/Tools/MaxConvert/plLightMapGen.h | 4 - Sources/Tools/MaxConvert/plMeshConverter.cpp | 30 +++--- Sources/Tools/MaxConvert/plMeshConverter.h | 4 - .../MaxConvert/plRenderGlobalContext.cpp | 14 ++- .../Tools/MaxConvert/plRenderGlobalContext.h | 7 +- Sources/Tools/MaxConvert/plRenderInstance.cpp | 5 +- Sources/Tools/MaxConvert/plRenderInstance.h | 2 - Sources/Tools/MaxMain/MaxCompat.h | 2 +- 35 files changed, 433 insertions(+), 283 deletions(-) create mode 100644 Sources/Tools/MaxConvert/Pch.cpp create mode 100644 Sources/Tools/MaxConvert/Pch.h diff --git a/Sources/Tools/MaxConvert/CMakeLists.txt b/Sources/Tools/MaxConvert/CMakeLists.txt index 85a7d9af..66527df0 100644 --- a/Sources/Tools/MaxConvert/CMakeLists.txt +++ b/Sources/Tools/MaxConvert/CMakeLists.txt @@ -48,6 +48,7 @@ set(MaxConvert_SOURCES UserPropMgr.cpp ) +use_precompiled_header(Pch.h Pch.cpp MaxConvert_HEADERS MaxConvert_SOURCES) add_library(MaxConvert STATIC ${MaxConvert_HEADERS} ${MaxConvert_SOURCES}) source_group("Header Files" FILES ${MaxConvert_HEADERS}) diff --git a/Sources/Tools/MaxConvert/Pch.cpp b/Sources/Tools/MaxConvert/Pch.cpp new file mode 100644 index 00000000..25cd61cc --- /dev/null +++ b/Sources/Tools/MaxConvert/Pch.cpp @@ -0,0 +1,51 @@ +/*==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 . + +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==*/ + +#include "Pch.h" + +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxConvert + * + * This file prompts MSVC to generate a PCH file for the MaxConvert project. It + * has no function if precompiled headers are disabled in cmake. + */ diff --git a/Sources/Tools/MaxConvert/Pch.h b/Sources/Tools/MaxConvert/Pch.h new file mode 100644 index 00000000..475e7a59 --- /dev/null +++ b/Sources/Tools/MaxConvert/Pch.h @@ -0,0 +1,101 @@ +/*==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 . + +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 _MaxConvert_Pch_inc_ +#define _MaxConvert_Pch_inc_ + +/** + * \file Pch.h + * \brief Precompiled Header for MaxConvert + */ + +// Standard Library +#include +#include +#include +#include +#include + +// Core Plasma +#include "HeadSpin.h" +#include "hsBitVector.h" +#include "hsColorRGBA.h" +#include "plgDispatch.h" +#include "hsExceptionStack.h" +#include "hsFastMath.h" +#include "hsGeometry3.h" +#include "hsMatrix44.h" +#include "hsResMgr.h" +#include "plString.h" +#include "hsStringTokenizer.h" +#include "hsTemplates.h" +#include "plTweak.h" + +// Windows +#include "hsWindows.h" +#include +#include + +// MaxComponent +#include "MaxComponent/plComponent.h" + +// 3ds Max SDK +// This stuff should ALWAYS come after hsWindows.h +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if MAX_VERSION_MAJOR >= 13 +# include +#endif + +#endif // _MaxConvert_Pch_inc_ diff --git a/Sources/Tools/MaxConvert/StringTokenizer.cpp b/Sources/Tools/MaxConvert/StringTokenizer.cpp index 8b594d92..04b8ea76 100644 --- a/Sources/Tools/MaxConvert/StringTokenizer.cpp +++ b/Sources/Tools/MaxConvert/StringTokenizer.cpp @@ -39,10 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -// StringTokenizer.cpp + +#include +#pragma hdrstop #include "StringTokenizer.h" -#include "string.h" // String Tokenizer routines StringTokenizer::StringTokenizer() { @@ -81,7 +82,7 @@ char *StringTokenizer::next() { }; bool StringTokenizer::isSep(char c) { if (!qAsTok || !inQuote) { - for (int32_t i=0; i #include "UserPropMgr.h" #include "hsStringTokenizer.h" - #include "hsHashTable.h" #define REFMSG_USERPROP (REFMSG_USER + 1) @@ -69,7 +69,7 @@ UserPropMgr::~UserPropMgr() CloseQuickTable(); } -void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag) +void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const bool setFlag, const int32_t hFlag) { if (setFlag) SetUserProp(node,name,NULL,hFlag); else ClearUserProp(node,name,hFlag); @@ -83,7 +83,7 @@ void UserPropMgr::ClearUserPropALL(const char *name, const int32_t hFlag) } } -void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const BOOL flag) { +void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const bool flag) { if (node) { if (UserPropExists(node,name) == flag) ip->SelectNode(node,false); @@ -96,7 +96,7 @@ void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const BOO void UserPropMgr::DeSelectWithOut(const char *name, const char *value) { - BOOL oldProps = vProps; + bool oldProps = vProps; vProps=false; TSTR val; INode *nodes[1]; @@ -169,7 +169,7 @@ ip->ThawSelection(); -int UserPropMgr::RecursiveCountAlike(INode *node, BOOL MatchAll) { +int UserPropMgr::RecursiveCountAlike(INode *node, bool MatchAll) { int count=0; if (node) { if (!node->IsNodeHidden() && !node->IsFrozen() && IsAlike(node,MatchAll)) count++; @@ -182,18 +182,18 @@ int UserPropMgr::RecursiveCountAlike(INode *node, BOOL MatchAll) { } -int UserPropMgr::CountAlike(BOOL MatchAll) { +int UserPropMgr::CountAlike(bool MatchAll) { return RecursiveCountAlike(NULL, MatchAll); } -BOOL UserPropMgr::IsMatch(const char *val1, const char *val2) { +bool UserPropMgr::IsMatch(const char *val1, const char *val2) { if (!stricmp(val1,val2)) return true; hsStringTokenizer toker(val1," ,@"); char *tok; while (tok=toker.next()) { hsStringTokenizer toker2(val2," ,@"); - BOOL found = false; + bool found = false; char *tok2; while ((tok2=toker2.next()) && !found) { if (tok[0] >= '1' && tok[0] <= '0') { @@ -210,11 +210,11 @@ BOOL UserPropMgr::IsMatch(const char *val1, const char *val2) { } -BOOL UserPropMgr::IsAlike(INode *node, BOOL MatchAll) { +bool UserPropMgr::IsAlike(INode *node, bool MatchAll) { TSTR buf; GetUserPropBuffer(node,buf); - BOOL oldProps = vProps; + bool oldProps = vProps; vProps=false; hsStringTokenizer toker(buf," \r\n"); @@ -223,7 +223,7 @@ BOOL UserPropMgr::IsAlike(INode *node, BOOL MatchAll) { TSTR name; TSTR value; TSTR tval; - BOOL match = MatchAll; + bool match = MatchAll; bool isName = true; tok = toker.next(); while (tok && (match==MatchAll)) { @@ -304,14 +304,14 @@ void UserPropMgr::SetUserPropBuffer(INode *node, const TSTR &buf) } } -void UserPropMgr::SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag) +void UserPropMgr::SetUserPropFlagALL(const char *name, const bool setFlag, const int32_t hFlag) { for (int i=0; iGetSelNodeCount() == 1) name = ip->GetSelNode(0)->GetName(); else return false; @@ -725,7 +725,7 @@ void UserPropMgr::SetNodeNameALL(const char *name) { } -void UserPropMgr::LoadVirtualProps(BOOL reset) { +void UserPropMgr::LoadVirtualProps(bool reset) { if (reset) { vbuf = ""; @@ -736,7 +736,7 @@ void UserPropMgr::LoadVirtualProps(BOOL reset) { void UserPropMgr::DestroyVirtualProps() { vProps = false; } -BOOL UserPropMgr::IsVirtual() { +bool UserPropMgr::IsVirtual() { return vProps; } @@ -837,7 +837,7 @@ void UserPropMgr::IBuildQuickTable(INode* node) } } -BOOL UserPropMgr::ICheckQuickEntry(const char *key, TSTR &value) +bool UserPropMgr::ICheckQuickEntry(const char *key, TSTR &value) { QuickPair q; q.SetKey(key); diff --git a/Sources/Tools/MaxConvert/UserPropMgr.h b/Sources/Tools/MaxConvert/UserPropMgr.h index ef12db30..d6e66094 100644 --- a/Sources/Tools/MaxConvert/UserPropMgr.h +++ b/Sources/Tools/MaxConvert/UserPropMgr.h @@ -44,10 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _USERPROPMGR_H_ #define _USERPROPMGR_H_ -#include "Max.h" #include "HeadSpin.h" template class hsHashTable; +class Interface; +class NameMaker; +class INode; class UserPropMgr { public: @@ -64,40 +66,40 @@ public: NameMaker *nm; - void SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag=kMe); + void SetUserPropFlag(INode *node, const char *name, const bool setFlag, const int32_t hFlag=kMe); - void SelectUserPropFlagALL(INode *node, const char *name, const BOOL flag); + void SelectUserPropFlagALL(INode *node, const char *name, const bool flag); void ClearUserProp(INode *node, const char *name, const int32_t hFlag=kMe); void ClearUserPropALL(const char *name, const int32_t hFlag=kMe); - void SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag=kMe); - BOOL GetUserPropFlagALL(const char *name, BOOL &isSet, const int32_t hFlag=kMe); + void SetUserPropFlagALL(const char *name, const bool setFlag, const int32_t hFlag=kMe); + bool GetUserPropFlagALL(const char *name, bool &isSet, const int32_t hFlag=kMe); - BOOL GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe); + bool GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe); void SetUserProp(INode *node, const char *name, const char *value, const int32_t hFlag=kMe); - BOOL UserPropExists(INode *node, const char *name, const int32_t hFlag=kMe); + bool UserPropExists(INode *node, const char *name, const int32_t hFlag=kMe); - BOOL GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe); + bool GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe); void SetUserPropString(INode *node, const char *name, const char *value, const int32_t hFlag=kMe); - BOOL GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag=kMe); + bool GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag=kMe); void SetUserPropFloat(INode *node, const char *name, const float value, const int32_t hFlag=kMe); - BOOL GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag=kMe); + bool GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag=kMe); void SetUserPropInt(INode *node, const char *name, const int value, const int32_t hFlag=kMe); - BOOL GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]); - BOOL GetUserPropIntList(INode *node, const char *name, int &num, int list[]); - BOOL GetUserPropFloatList(INode *node, const char *name, int &num, float list[]); + bool GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]); + bool GetUserPropIntList(INode *node, const char *name, int &num, int list[]); + bool GetUserPropFloatList(INode *node, const char *name, int &num, float list[]); - BOOL GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag=kMe); + bool GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag=kMe); void SetUserPropStringALL(const char *name, const char *value, const int32_t hFlag=kMe); - BOOL GetUserPropStringListALL(const char *name, int &num, TSTR list[]); - BOOL GetUserPropIntListALL(const char *name, int &num, int *list); - BOOL GetUserPropFloatListALL(const char *name, int &num, float *list); + bool GetUserPropStringListALL(const char *name, int &num, TSTR list[]); + bool GetUserPropIntListALL(const char *name, int &num, int *list); + bool GetUserPropFloatListALL(const char *name, int &num, float *list); - BOOL GetNodeNameALL(TSTR &name); + bool GetNodeNameALL(TSTR &name); void SetNodeNameALL(const char *name); - void LoadVirtualProps(BOOL reset=true); + void LoadVirtualProps(bool reset=true); void DestroyVirtualProps(); - BOOL IsVirtual(); + bool IsVirtual(); int GetSelNodeCount(); INode *GetSelNode(int i); @@ -106,8 +108,8 @@ public: void GetUserPropBuffer(INode *node, TSTR &buf); void SetUserPropBuffer(INode *node, const TSTR &buf); - BOOL IsAlike(INode *node, BOOL MatchAll=true); - int CountAlike(BOOL MatchAll=true); + bool IsAlike(INode *node, bool MatchAll=true); + int CountAlike(bool MatchAll=true); void DeSelectUnAlike(INode *node=NULL); Interface *GetInterface() { return ip; } @@ -119,9 +121,9 @@ private: INode* GetAncestorIfNeeded(INode* node, const int32_t hFlag); void DeSelectWithOut(const char *name, const char *value); void RecursiveSelectAll(INode *node = NULL); - int RecursiveCountAlike(INode *node = NULL, BOOL MatchAll=true); - BOOL IsMatch(const char *val1, const char *val2); - BOOL vProps; + int RecursiveCountAlike(INode *node = NULL, bool MatchAll=true); + bool IsMatch(const char *val1, const char *val2); + bool vProps; TSTR vbuf; TSTR vname; @@ -150,7 +152,7 @@ private: static const uint32_t kQuickSize; INode* fQuickNode; void IBuildQuickTable(INode* node); - BOOL ICheckQuickEntry(const char *key, TSTR &value); + bool ICheckQuickEntry(const char *key, TSTR &value); Interface *ip; diff --git a/Sources/Tools/MaxConvert/hsControlConverter.cpp b/Sources/Tools/MaxConvert/hsControlConverter.cpp index 89f89486..a8c81b15 100644 --- a/Sources/Tools/MaxConvert/hsControlConverter.cpp +++ b/Sources/Tools/MaxConvert/hsControlConverter.cpp @@ -41,18 +41,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsExceptionStack.h" +#include "hsTemplates.h" +#include "hsWindows.h" #include #include +#include +#include +#include +#include +#include +#include +#include +#pragma hdrstop -//#include "Max.h" #include "MaxMain/plMaxNode.h" -#include "stdmat.h" -#include "bmmlib.h" -#include "istdplug.h" -#include "texutil.h" -#include "iparamb2.h" -#include "modstack.h" -#include "keyreduc.h" #include "hsMaxLayerBase.h" #include "plInterp/plController.h" @@ -62,7 +65,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsConverterUtils.h" #include "hsControlConverter.h" #include "hsMaterialConverter.h" -#include "hsExceptionStack.h" #include "MaxExport/plErrorMsg.h" #include "MaxComponent/plNoteTrackAnim.h" #include "MaxComponent/plCameraComponents.h" @@ -2100,11 +2102,8 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray ConvertToType(t, Class_ID(LOOKAT_CAM_CLASS_ID, 0)); - float FOVvalue= 0.0; //Currently in Radians - // radians - FOVvalue = theCam->GetFOV(t); - // convert - FOVvalue = FOVvalue*(180/3.141592); + float FOVvalue= theCam->GetFOV(t); // in radians + FOVvalue *= (float)(180.f / M_PI); // to degrees int FOVType = theCam->GetFOVType(); float wDeg, hDeg; switch(FOVType) diff --git a/Sources/Tools/MaxConvert/hsControlConverter.h b/Sources/Tools/MaxConvert/hsControlConverter.h index 1ced7661..79862887 100644 --- a/Sources/Tools/MaxConvert/hsControlConverter.h +++ b/Sources/Tools/MaxConvert/hsControlConverter.h @@ -42,18 +42,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __HSCONTROLCONVERTER_H #define __HSCONTROLCONVERTER_H -#include -#include - -//#include "Max.h" -#include "stdmat.h" -#include "bmmlib.h" -#include "istdplug.h" -#include "texutil.h" #include "plInterp/hsKeys.h" -#include "hsTemplates.h" +class Animatable; +class plCompoundController; +class Control; +class plController; +class hsConverterUtils; +class plErrorMsg; +class Interface; +struct hsKeyFrame; +class plLeafController; +class Matrix3; class plMaxNode; +class IParamBlock2; +class plSceneObject; +class StdUVGen; enum ControllerType { @@ -75,13 +79,6 @@ enum ControllerType ctrlTypeRollAngle, }; -class plController; -class plLeafController; -class plCompoundController; -struct hsKeyFrame; -class hsConverterUtils; -class plSceneObject; - class hsControlConverter { private: diff --git a/Sources/Tools/MaxConvert/hsConverterUtils.cpp b/Sources/Tools/MaxConvert/hsConverterUtils.cpp index 2c5e8049..5302a148 100644 --- a/Sources/Tools/MaxConvert/hsConverterUtils.cpp +++ b/Sources/Tools/MaxConvert/hsConverterUtils.cpp @@ -41,35 +41,33 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsConverterUtils.h" +#include "hsExceptionStack.h" +#include "hsHashTable.h" +#include "hsStringTokenizer.h" #include "hsResMgr.h" -#include "MaxMain/MaxCompat.h" +#include -#if HS_BUILD_FOR_WIN32 +#include +#include +#if MAX_VERSION_MAJOR >= 13 +# include +#endif +#pragma hdrstop -#include +#include "hsConverterUtils.h" +#include "MaxMain/MaxCompat.h" #include "hsMaxLayerBase.h" #include "plInterp/plController.h" #include "MaxExport/plErrorMsg.h" #include "UserPropMgr.h" -#include "hsStringTokenizer.h" -//#include "hsDXTDirectXCodec.h" -//#include "hsDXTSoftwareCodec.h" #include "plGImage/hsCodecManager.h" -///#include "SwitchUtil.h" -#include "hsExceptionStack.h" -#include "hsHashTable.h" #include "pnKeyedObject/plKey.h" #include "pnKeyedObject/hsKeyedObject.h" #include "MaxMain/MaxCompat.h" -#if MAX_VERSION_MAJOR >= 13 -#include -#endif - const char hsConverterUtils::fTagSeps[] = " ,\t\n=:;"; extern UserPropMgr gUserPropMgr; @@ -577,5 +575,3 @@ bool hsConverterUtils::CacheNode::operator==(const CacheNode& other) const else return !_stricmp(k1,k2); } - -#endif // HS_BUILD_FOR_WIN32 diff --git a/Sources/Tools/MaxConvert/hsConverterUtils.h b/Sources/Tools/MaxConvert/hsConverterUtils.h index 80246374..ffeb6390 100644 --- a/Sources/Tools/MaxConvert/hsConverterUtils.h +++ b/Sources/Tools/MaxConvert/hsConverterUtils.h @@ -42,20 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __HSCONVERTERUTILS_H #define __HSCONVERTERUTILS_H -#include "Max.h" -#include "stdmat.h" -#include -#include "bmmlib.h" -#include "istdplug.h" -#include "texutil.h" - -#include "Headspin.h" - -class INode; class Control; +class INode; class Interface; -template class hsHashTable; +template class hsHashTable; class hsMaxLayerBase; class plSimplePosController; class plScalarController; @@ -120,7 +111,7 @@ private: plErrorMsg *fErrorMsg; bool fSuppressMangling; - uint32_t fWarned; + uint32_t fWarned; bool fSave; struct CacheNode diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index 8be1339d..028cd132 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -40,21 +40,30 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include "hsMaterialConverter.h" -#include +#include "HeadSpin.h" +#include "plgDispatch.h" +#include "hsExceptionStack.h" +#include "hsResMgr.h" +#include "hsStringTokenizer.h" +#include "hsTemplates.h" + +#include "MaxComponent/plComponent.h" + #include #include -#include "Max.h" -#include "stdmat.h" -#include "bmmlib.h" -#include "istdplug.h" -#include "texutil.h" +#include +#include +#include +#include +#include +#include +#pragma hdrstop +#include "hsMaterialConverter.h" #include "plLayerConverter.h" #include "MaxComponent/plMaxAnimUtils.h" #include "plResMgr/plKeyFinder.h" -#include "hsResMgr.h" #include "pnKeyedObject/plUoid.h" #include "hsMaxLayerBase.h" @@ -70,15 +79,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxMain/MaxCompat.h" #include "plInterp/plController.h" -#include "hsExceptionStack.h" -#include "hsStringTokenizer.h" #include "plSurface/plLayerInterface.h" #include "plSurface/plLayer.h" #include "plSurface/plLayerAnimation.h" #include "plGImage/plMipmap.h" -#include "plgDispatch.h" - #include "pnMessage/plRefMsg.h" #include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKeyImp.h" @@ -1124,8 +1129,6 @@ hsGMaterial *hsMaterialConverter::ICreateMaterial(Mtl *mtl, plMaxNode *node, con hsGuardEnd; } -#include "MaxPlasmaMtls/Materials/plMultipassMtl.h" - // // Handle materials for normal non-light, non-particle nodes. // @@ -2369,7 +2372,7 @@ bool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGM if (passBase->GetUseSpec()) { shadeFlags |= hsGMatState::kShadeSpecular; - shine = passBase->GetShine(); + shine = (float)passBase->GetShine(); specColor = passBase->GetSpecularColor(); } @@ -2630,7 +2633,6 @@ void hsMaterialConverter::IAddLayerToMaterial(hsGMaterial *mat, plLayerInterface // // Functions called by the converters up above... // -#include "MaxPlasmaMtls/Layers/plLayerTex.h" //// IMustBeUniqueMaterial //////////////////////////////////////////////////// // Fun stuff here. If one of the layers of the material is a dynamic EnvMap, @@ -4246,7 +4248,7 @@ bool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* nod { plPassMtlBase* passMtl = (plPassMtlBase*)subMtl; if( plPassMtlBase::kBlendAlpha == passMtl->GetOutputBlend() ) - baseOpac = passMtl->GetOpacity(); + baseOpac = (float)passMtl->GetOpacity(); } int iMtl; for( iMtl = 1; iMtl < mtl->NumSubMtls(); iMtl++ ) @@ -4259,7 +4261,7 @@ bool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* nod { if( baseOpac >= 0 ) return true; - baseOpac = passMtl->GetOpacity(); + baseOpac = (float)passMtl->GetOpacity(); } } } @@ -4536,12 +4538,12 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co Color tint1 = mtl->GetDefaultTint1(); Color tint2 = mtl->GetDefaultTint2(); - cloth->fDefaultTint1[0] = tint1.r * 255; - cloth->fDefaultTint1[1] = tint1.g * 255; - cloth->fDefaultTint1[2] = tint1.b * 255; - cloth->fDefaultTint2[0] = tint2.r * 255; - cloth->fDefaultTint2[1] = tint2.g * 255; - cloth->fDefaultTint2[2] = tint2.b * 255; + cloth->fDefaultTint1[0] = (uint8_t)(tint1.r * 255.f); + cloth->fDefaultTint1[1] = (uint8_t)(tint1.g * 255.f); + cloth->fDefaultTint1[2] = (uint8_t)(tint1.b * 255.f); + cloth->fDefaultTint2[0] = (uint8_t)(tint2.r * 255.f); + cloth->fDefaultTint2[1] = (uint8_t)(tint2.g * 255.f); + cloth->fDefaultTint2[2] = (uint8_t)(tint2.b * 255.f); clothKeyName = plString::Format("CItm_%s", cloth->fName); hsgResMgr::ResMgr()->NewKey(clothKeyName, cloth, loc); diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.h b/Sources/Tools/MaxConvert/hsMaterialConverter.h index e56a1ebb..2f77f1c3 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.h +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.h @@ -43,11 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define __HSMATERIALCONVERTER_H #include "HeadSpin.h" -#include "hsTemplates.h" - -#include "Max.h" - -class Interface; class hsStream; class hsScene; @@ -64,19 +59,21 @@ class plBitmap; class plMipmap; class plErrorMsg; class plString; +class plLocation; -class Mtl; -class Texmap; -class plMaxNode; -class StdUVGen; -class BitmapTex; -class StdMat; -class TSTR; class Animatable; +struct BMM_Color_64; class Bitmap; -class plLocation; - +class BitmapTex; +class Color; +class Interface; +class Mtl; +class Point3; +class StdMat; +class StdUVGen; +class Texmap; +class plMaxNode; class plLayerTex; class plBitmapData; class plCubicRenderTarget; diff --git a/Sources/Tools/MaxConvert/hsMaxLayerBase.h b/Sources/Tools/MaxConvert/hsMaxLayerBase.h index 7b6e8f9c..fe870fcb 100644 --- a/Sources/Tools/MaxConvert/hsMaxLayerBase.h +++ b/Sources/Tools/MaxConvert/hsMaxLayerBase.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __HSMAXLAYERBASE_H #define __HSMAXLAYERBASE_H -#include "stdmat.h" - #define HSMAX_LAYER_CLASS_ID 0x41990fe7 const Class_ID hsMaxLayerClassID(HSMAX_LAYER_CLASS_ID, 0x72404998); diff --git a/Sources/Tools/MaxConvert/hsVertexShader.cpp b/Sources/Tools/MaxConvert/hsVertexShader.cpp index b382df85..379d59cd 100644 --- a/Sources/Tools/MaxConvert/hsVertexShader.cpp +++ b/Sources/Tools/MaxConvert/hsVertexShader.cpp @@ -52,18 +52,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" - -#include "Max.h" -#include "stdmat.h" -#include "istdplug.h" -#include "dummy.h" -#include "notetrck.h" - -#include "MaxMain/plMaxNode.h" #include "hsBitVector.h" - +#include "hsExceptionStack.h" #include "hsMatrix44.h" #include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include +#include +#include +#pragma hdrstop + +#include "MaxMain/plMaxNode.h" #include "plSurface/hsGMaterial.h" #include "UserPropMgr.h" @@ -72,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsConverterUtils.h" #include "hsControlConverter.h" -#include "hsExceptionStack.h" #include "plSurface/hsGMaterial.h" #include "plSurface/plLayerInterface.h" diff --git a/Sources/Tools/MaxConvert/plBitmapCreator.cpp b/Sources/Tools/MaxConvert/plBitmapCreator.cpp index 5e9f964e..e814a765 100644 --- a/Sources/Tools/MaxConvert/plBitmapCreator.cpp +++ b/Sources/Tools/MaxConvert/plBitmapCreator.cpp @@ -39,10 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" +#include "hsWindows.h" + +#include #include -#include "bmmlib.h" +#include +#pragma hdrstop #include "plGImage/plMipmap.h" #include "hsExceptionStack.h" diff --git a/Sources/Tools/MaxConvert/plBitmapCreator.h b/Sources/Tools/MaxConvert/plBitmapCreator.h index 00b3fa0a..7fa18561 100644 --- a/Sources/Tools/MaxConvert/plBitmapCreator.h +++ b/Sources/Tools/MaxConvert/plBitmapCreator.h @@ -39,16 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "pnKeyedObject/plKey.h" class BitmapInfo; class Bitmap; class plBitmap; +class plErrorMsg; +class plKey; +class plLocation; class plMipmap; class hsMaxLayerBase; -class plLocation; -class plErrorMsg; class plBitmapData diff --git a/Sources/Tools/MaxConvert/plClusterUtil.cpp b/Sources/Tools/MaxConvert/plClusterUtil.cpp index b5516805..8ffc3435 100644 --- a/Sources/Tools/MaxConvert/plClusterUtil.cpp +++ b/Sources/Tools/MaxConvert/plClusterUtil.cpp @@ -41,21 +41,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include - -#include "Max.h" -#include "stdmat.h" -#include "bmmlib.h" -#include "iparamb2.h" -#include "meshdlib.h" +#include "hsColorRGBA.h" +#include "hsGeometry3.h" +#include "hsResMgr.h" +#include "plTweak.h" -#include "HeadSpin.h" +#include "MaxComponent/plComponent.h" -#include #include +#include +#include +#include +#include +#include +#include +#pragma hdrstop #include "MaxMain/plMaxNode.h" -#include "MaxComponent/plComponent.h" #include "MaxComponent/plLightGrpComponent.h" #include "MaxComponent/plSoftVolumeComponent.h" @@ -76,13 +78,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsVertexShader.h" #include "plLightMapGen.h" -#include "hsResMgr.h" #include "pnKeyedObject/plUoid.h" #include "pnMessage/plNodeRefMsg.h" -#include "plTweak.h" - plConst(int) kDefMinFaces(200); plConst(int) kDefMaxFaces(1000); plConst(float) kDefMinSize(50.f); diff --git a/Sources/Tools/MaxConvert/plClusterUtil.h b/Sources/Tools/MaxConvert/plClusterUtil.h index 249737a5..67c96d8d 100644 --- a/Sources/Tools/MaxConvert/plClusterUtil.h +++ b/Sources/Tools/MaxConvert/plClusterUtil.h @@ -43,17 +43,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plClusterUtil_inc #define plClusterUtil_inc -#include "hsGeometry3.h" -#include "hsColorRGBA.h" - #include "plDrawable/plSpanInstance.h" -class plMaxNode; -class plClusterGroup; -class plSpanTemplateB; class hsBounds3Ext; class plCluster; +class plClusterGroup; class hsGMaterial; +class plMaxNode; +class Point3; +class plSpanEncoding; +class plSpanTemplateB; +struct hsVector3; class plDeformVert { diff --git a/Sources/Tools/MaxConvert/plConvert.cpp b/Sources/Tools/MaxConvert/plConvert.cpp index dbefec88..bf255780 100644 --- a/Sources/Tools/MaxConvert/plConvert.cpp +++ b/Sources/Tools/MaxConvert/plConvert.cpp @@ -44,16 +44,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // 3DSMax HeadSpin exporter // #include "HeadSpin.h" -#include "Max.h" -#include "istdplug.h" -#include "Notify.h" +#include "plgDispatch.h" +#include "hsResMgr.h" +#include "hsStringTokenizer.h" +#include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include #include -#include "bmmlib.h" -#include "INode.h" +#include +#include +#include +#pragma hdrstop #include "plConvert.h" -#include "hsResMgr.h" -#include "hsTemplates.h" #include "hsConverterUtils.h" #include "hsControlConverter.h" @@ -61,12 +67,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMaterialConverter.h" #include "plLayerConverter.h" #include "UserPropMgr.h" -#include "hsStringTokenizer.h" #include "MaxExport/plErrorMsg.h" #include "hsVertexShader.h" #include "plLightMapGen.h" #include "plBitmapCreator.h" -#include "plgDispatch.h" #include "pnMessage/plTimeMsg.h" #include "MaxComponent/plComponent.h" @@ -76,6 +80,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxComponent/plClusterComponent.h" #include "plPhysX/plSimulationMgr.h" +#include "MaxMain/plMaxMeshExtractor.h" #include "MaxMain/plPhysXCooking.h" #include "MaxExport/plExportProgressBar.h" diff --git a/Sources/Tools/MaxConvert/plConvert.h b/Sources/Tools/MaxConvert/plConvert.h index 1aa35d6c..604b7c29 100644 --- a/Sources/Tools/MaxConvert/plConvert.h +++ b/Sources/Tools/MaxConvert/plConvert.h @@ -43,11 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plConvert_inc #define plConvert_inc -#include "HeadSpin.h" -#include "hsTemplates.h" -#include "pnKeyedObject/plKey.h" - class plErrorMsg; +class plKey; class plLocation; class plMaxNode; class plMessage; diff --git a/Sources/Tools/MaxConvert/plDistTree.cpp b/Sources/Tools/MaxConvert/plDistTree.cpp index b052bb9a..47a8b1ae 100644 --- a/Sources/Tools/MaxConvert/plDistTree.cpp +++ b/Sources/Tools/MaxConvert/plDistTree.cpp @@ -41,7 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" +#include "hsTemplates.h" +#include "hsWindows.h" +#include +#pragma hdrstop #include "plDistTree.h" diff --git a/Sources/Tools/MaxConvert/plDistTree.h b/Sources/Tools/MaxConvert/plDistTree.h index 0eb48f93..49903b3b 100644 --- a/Sources/Tools/MaxConvert/plDistTree.h +++ b/Sources/Tools/MaxConvert/plDistTree.h @@ -43,8 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plDistTree_inc #define plDistTree_inc -#include "hsTemplates.h" - class plDistNode { public: diff --git a/Sources/Tools/MaxConvert/plDistributor.cpp b/Sources/Tools/MaxConvert/plDistributor.cpp index a4b2a29b..20cab330 100644 --- a/Sources/Tools/MaxConvert/plDistributor.cpp +++ b/Sources/Tools/MaxConvert/plDistributor.cpp @@ -41,13 +41,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include +#include "hsGeometry3.h" +#include "hsTemplates.h" +#include "hsWindows.h" -#include "Max.h" -#include "stdmat.h" -#include "bmmlib.h" -#include "iparamb2.h" -#include "meshdlib.h" +#include +#include +#include +#include +#include +#include +#pragma hdrstop #include "MaxExport/plExportProgressBar.h" #include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h" @@ -55,9 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMaterialConverter.h" -#include "HeadSpin.h" -#include "hsGeometry3.h" - #include "plMath/plTriUtils.h" #include "plDistributor.h" diff --git a/Sources/Tools/MaxConvert/plLayerConverter.cpp b/Sources/Tools/MaxConvert/plLayerConverter.cpp index c6e3ddef..f69dbce5 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.cpp +++ b/Sources/Tools/MaxConvert/plLayerConverter.cpp @@ -60,23 +60,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" -#include "Max.h" -#include "stdmat.h" -#include "istdplug.h" -#include "iparamb2.h" -#include "iparamm2.h" - - #include "hsExceptionStack.h" +#include "hsResMgr.h" +#include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include +#include +#include +#pragma hdrstop #include "plLayerConverter.h" -#include "MaxConvert/hsMaxLayerBase.h" -#include "MaxConvert/hsConverterUtils.h" -#include "MaxConvert/hsControlConverter.h" -#include "MaxConvert/hsMaterialConverter.h" -#include "MaxConvert/plBitmapCreator.h" -#include "hsResMgr.h" +#include "hsMaxLayerBase.h" +#include "hsConverterUtils.h" +#include "hsControlConverter.h" +#include "hsMaterialConverter.h" +#include "plBitmapCreator.h" #include "MaxExport/plErrorMsg.h" #include "MaxMain/plMaxNode.h" @@ -750,10 +752,11 @@ uint32_t *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) c for( int x = 0; x < width; x++ ) { - color.SetARGB( p64[ x ].a * 255.f / 65535.f, - p64[ x ].r * 255.f / 65535.f, - p64[ x ].g * 255.f / 65535.f, - p64[ x ].b * 255.f / 65535.f ); + const float konst = 255.f / 65535.f; + color.SetARGB((uint8_t)(p64[ x ].a * konst), + (uint8_t)(p64[ x ].r * konst), + (uint8_t)(p64[ x ].g * konst), + (uint8_t)(p64[ x ].b * konst)); buffPtr[ x ] = color; } diff --git a/Sources/Tools/MaxConvert/plLayerConverter.h b/Sources/Tools/MaxConvert/plLayerConverter.h index 764ff346..6dfee79b 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.h +++ b/Sources/Tools/MaxConvert/plLayerConverter.h @@ -53,10 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plLayerConverter_h #define _plLayerConverter_h -#include "HeadSpin.h" -#include "hsTemplates.h" -#include "Max.h" - //// Class Definition ///////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxConvert/plLightMapGen.cpp b/Sources/Tools/MaxConvert/plLightMapGen.cpp index fad508ac..2adf7606 100644 --- a/Sources/Tools/MaxConvert/plLightMapGen.cpp +++ b/Sources/Tools/MaxConvert/plLightMapGen.cpp @@ -40,12 +40,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -//#define MF_NEW_RGC - #include "HeadSpin.h" -#include "Max.h" -#include "dummy.h" -#include "notify.h" +#include "hsFastMath.h" +#include "hsTemplates.h" +#include "hsWindows.h" + +#include "MaxComponent/plComponent.h" + +#include +#include +#include +#pragma hdrstop #include "plLightMapGen.h" #include "plGImage/plMipmap.h" @@ -57,7 +62,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plSurface/hsGMaterial.h" #include "MaxMain/plPluginResManager.h" #include "plDrawable/plGeometrySpan.h" -#include "hsFastMath.h" #include "hsControlConverter.h" #include "plBitmapCreator.h" #include "pnKeyedObject/plKey.h" @@ -968,7 +972,7 @@ bool plLightMapGen::ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, liObj->EvalLightState(TimeValue(0), FOREVER, &ls); float coneRad[2]; - coneRad[0] = ls.fallsize * M_PI / 180.f; + coneRad[0] = (float)(ls.fallsize * M_PI / 180.f); coneRad[1] = coneRad[0]; if( ls.shape == RECT_LIGHT ) coneRad[1] /= ls.aspect; @@ -1567,7 +1571,7 @@ bool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2 if( duDr > 0 ) { - fWidth = kTexPerFoot / duDr; + fWidth = (int)(kTexPerFoot / duDr); if( fWidth > kMaxSize ) fWidth = kMaxSize; @@ -1583,7 +1587,7 @@ bool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2 if( dvDr > 0 ) { - fHeight = kTexPerFoot / duDr; + fHeight = (int)(kTexPerFoot / duDr); if( fHeight > kMaxSize ) fHeight = kMaxSize; diff --git a/Sources/Tools/MaxConvert/plLightMapGen.h b/Sources/Tools/MaxConvert/plLightMapGen.h index 0fe3bf90..dd90d0bc 100644 --- a/Sources/Tools/MaxConvert/plLightMapGen.h +++ b/Sources/Tools/MaxConvert/plLightMapGen.h @@ -43,10 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plLightMapGen_inc #define plLightMapGen_inc -#include "hsTemplates.h" - -#include - class plMaxLightContext; class plRenderGlobalContext; class plLayerInterface; diff --git a/Sources/Tools/MaxConvert/plMeshConverter.cpp b/Sources/Tools/MaxConvert/plMeshConverter.cpp index 97e6811d..d87cb724 100644 --- a/Sources/Tools/MaxConvert/plMeshConverter.cpp +++ b/Sources/Tools/MaxConvert/plMeshConverter.cpp @@ -50,17 +50,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "Max.h" -#include "iparamb2.h" -#include "modstack.h" -#include "ISkin.h" -#include "meshdlib.h" +#include "hsBitVector.h" +#include "hsExceptionStack.h" +#include "hsResMgr.h" +#include "hsTemplates.h" +#include "plTweak.h" +#include "hsWindows.h" +#include +#include +#include +#include +#include +#include +#pragma hdrstop -#include "HeadSpin.h" -#include "hsBitVector.h" #include "plMeshConverter.h" -#include "hsResMgr.h" #include "MaxMain/plMaxNode.h" #include "MaxExport/plErrorMsg.h" #include "plSurface/hsGMaterial.h" @@ -69,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsConverterUtils.h" #include "hsMaterialConverter.h" #include "hsControlConverter.h" -#include "hsExceptionStack.h" #include "MaxPlasmaMtls/Materials/plCompositeMtl.h" #include "MaxPlasmaMtls/Materials/plPassMtl.h" #include "MaxPlasmaMtls/Materials/plCompositeMtlPB.h" @@ -85,8 +89,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plStatusLog/plStatusLog.h" -#include "plTweak.h" - //// Static Members ////////////////////////////////////////////////////////// bool plMeshConverter::fWarnBadNormals = true; @@ -1351,9 +1353,9 @@ uint32_t plMeshConverter::ICreateHexColor( float r, float g, float b ) au = 0xff000000; - ru = r * 255.0f; - gu = g * 255.0f; - bu = b * 255.0f; + ru = (uint32_t)(r * 255.0f); + gu = (uint32_t)(g * 255.0f); + bu = (uint32_t)(b * 255.0f); return au | ( ru << 16 ) | ( gu << 8 ) | ( bu ); } diff --git a/Sources/Tools/MaxConvert/plMeshConverter.h b/Sources/Tools/MaxConvert/plMeshConverter.h index befc8128..52000698 100644 --- a/Sources/Tools/MaxConvert/plMeshConverter.h +++ b/Sources/Tools/MaxConvert/plMeshConverter.h @@ -54,10 +54,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plMeshConverter_h #define _plMeshConverter_h -#include "Max.h" -#include "HeadSpin.h" -#include "hsTemplates.h" - class plMaxNode; class plErrorMsg; class hsConverterUtils; diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp index 25a3caa4..94c4c159 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp @@ -41,10 +41,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" +#include "hsTemplates.h" +#include "hsWindows.h" +#include +#pragma hdrstop #include "MaxMain/plMaxNode.h" #include "plRenderGlobalContext.h" +#include "plRenderInstance.h" plRenderGlobalContext::plRenderGlobalContext(Interface* ip, TimeValue t) { @@ -114,6 +118,14 @@ void plRenderGlobalContext::MakeRenderInstances(plMaxNode* root, TimeValue t) fInstList[i].SetNext(&fInstList[i+1]); } +RenderInstance* plRenderGlobalContext::GetRenderInstance(int i) const +{ + if (fInstList.GetCount() > i) + return &fInstList[i]; + else + return nil; +} + void plRenderGlobalContext::IMakeRenderInstances(plMaxNode* node, TimeValue t, bool isBarney) { const char* dbgNodeName = node->GetName(); diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.h b/Sources/Tools/MaxConvert/plRenderGlobalContext.h index 29ec9912..a464cf6a 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.h +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.h @@ -43,8 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plRenderGlobalContext_inc #define plRenderGlobalContext_inc -#include "hsTemplates.h" -#include "plRenderInstance.h" +class plRenderInstance; class plRenderGlobalContext : public RenderGlobalContext { @@ -63,8 +62,8 @@ public: void MakeRenderInstances(plMaxNode* root, TimeValue t); - virtual int NumRenderInstances() { return fInstList.GetCount(); } - virtual RenderInstance* GetRenderInstance( int i ) { return i < fInstList.GetCount() ? &fInstList[i] : nil; } + virtual int NumRenderInstances() const { return fInstList.GetCount(); } + virtual RenderInstance* GetRenderInstance( int i ) const; virtual void IntersectRay(RenderInstance *inst, Ray& ray, ISect &isct, ISectList &xpList, BOOL findExit); virtual BOOL IntersectWorld(Ray &ray, int skipID, ISect &hit, ISectList &xplist, int blurFrame = NO_MOTBLUR); diff --git a/Sources/Tools/MaxConvert/plRenderInstance.cpp b/Sources/Tools/MaxConvert/plRenderInstance.cpp index 82ec1b69..c6bb83be 100644 --- a/Sources/Tools/MaxConvert/plRenderInstance.cpp +++ b/Sources/Tools/MaxConvert/plRenderInstance.cpp @@ -41,7 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" +#include "hsTemplates.h" +#include "hsWindows.h" +#include +#pragma hdrstop #include "plRenderInstance.h" diff --git a/Sources/Tools/MaxConvert/plRenderInstance.h b/Sources/Tools/MaxConvert/plRenderInstance.h index a3a04aae..3cbd19e3 100644 --- a/Sources/Tools/MaxConvert/plRenderInstance.h +++ b/Sources/Tools/MaxConvert/plRenderInstance.h @@ -43,8 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plRenderInstance_inc #define plRenderInstance_inc -#include "hsTemplates.h" - class plRenderInstance : public RenderInstance { protected: diff --git a/Sources/Tools/MaxMain/MaxCompat.h b/Sources/Tools/MaxMain/MaxCompat.h index 36702273..71f0eba3 100644 --- a/Sources/Tools/MaxMain/MaxCompat.h +++ b/Sources/Tools/MaxMain/MaxCompat.h @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _PLASMA_MAXCOMPAT_H #define _PLASMA_MAXCOMPAT_H -#include "maxversion.h" +#include #if MAX_VERSION_MAJOR <= 9 #define BMMCOLOR(x, y, z, w) \ From ad8e87370d2ee332c485d610e8f752ad3d46c813 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 18 Nov 2012 20:52:10 -0500 Subject: [PATCH 09/13] Untangle MaxExport --- Sources/Tools/MaxConvert/plConvert.cpp | 2 + Sources/Tools/MaxExport/CMakeLists.txt | 1 + Sources/Tools/MaxExport/Pch.cpp | 51 ++++++++++++ Sources/Tools/MaxExport/Pch.h | 77 +++++++++++++++++++ Sources/Tools/MaxExport/SimpleExport.cpp | 14 ++-- Sources/Tools/MaxExport/SimpleExport.h | 5 -- Sources/Tools/MaxExport/plErrorMsg.cpp | 5 +- Sources/Tools/MaxExport/plErrorMsg.h | 2 - Sources/Tools/MaxExport/plExportDlg.cpp | 40 +++++----- Sources/Tools/MaxExport/plExportErrorMsg.cpp | 16 ++-- Sources/Tools/MaxExport/plExportErrorMsg.h | 1 - .../Tools/MaxExport/plExportLogErrorMsg.cpp | 8 +- Sources/Tools/MaxExport/plExportLogErrorMsg.h | 1 - .../Tools/MaxExport/plExportProgressBar.cpp | 8 +- Sources/Tools/MaxExport/plExportProgressBar.h | 3 +- 15 files changed, 181 insertions(+), 53 deletions(-) create mode 100644 Sources/Tools/MaxExport/Pch.cpp create mode 100644 Sources/Tools/MaxExport/Pch.h diff --git a/Sources/Tools/MaxConvert/plConvert.cpp b/Sources/Tools/MaxConvert/plConvert.cpp index bf255780..79889472 100644 --- a/Sources/Tools/MaxConvert/plConvert.cpp +++ b/Sources/Tools/MaxConvert/plConvert.cpp @@ -57,6 +57,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include + +#include #pragma hdrstop #include "plConvert.h" diff --git a/Sources/Tools/MaxExport/CMakeLists.txt b/Sources/Tools/MaxExport/CMakeLists.txt index fb4a2e3c..ad8ea9a0 100644 --- a/Sources/Tools/MaxExport/CMakeLists.txt +++ b/Sources/Tools/MaxExport/CMakeLists.txt @@ -28,6 +28,7 @@ set(MaxExport_SOURCES SimpleExport.cpp ) +use_precompiled_header(Pch.h Pch.cpp MaxExport_HEADERS MaxExport_SOURCES) add_library(MaxExport STATIC ${MaxExport_HEADERS} ${MaxExport_SOURCES}) source_group("Header Files" FILES ${MaxExport_HEADERS}) diff --git a/Sources/Tools/MaxExport/Pch.cpp b/Sources/Tools/MaxExport/Pch.cpp new file mode 100644 index 00000000..f246b9d3 --- /dev/null +++ b/Sources/Tools/MaxExport/Pch.cpp @@ -0,0 +1,51 @@ +/*==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 . + +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==*/ + +#include "Pch.h" + +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxExport + * + * This file prompts MSVC to generate a PCH file for the MaxExport project. It + * has no function if precompiled headers are disabled in cmake. + */ diff --git a/Sources/Tools/MaxExport/Pch.h b/Sources/Tools/MaxExport/Pch.h new file mode 100644 index 00000000..79dfc98e --- /dev/null +++ b/Sources/Tools/MaxExport/Pch.h @@ -0,0 +1,77 @@ +/*==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 . + +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 _MaxExport_Pch_inc_ +#define _MaxExport_Pch_inc_ + +/** + * \file Pch.h + * \brief Precompiled Header for MaxConvert + */ + +// Standard Library + +#include +#include +#include + +// Core Plasma +#include "HeadSpin.h" +#include "hsExceptionStack.h" +#include "hsExceptions.h" +#include "plFileUtils.h" +#include "hsStlSortUtils.h" +#include "hsStream.h" + +// Windows +#include "hsWindows.h" +#include + +// 3ds Max SDK +// This stuff should ALWAYS come after hsWindows.h +#include +#include +#include +#include +#include + +#endif // _MaxExport_Pch_inc_ diff --git a/Sources/Tools/MaxExport/SimpleExport.cpp b/Sources/Tools/MaxExport/SimpleExport.cpp index a3a9faf2..f7ed661f 100644 --- a/Sources/Tools/MaxExport/SimpleExport.cpp +++ b/Sources/Tools/MaxExport/SimpleExport.cpp @@ -44,14 +44,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // #include "HeadSpin.h" -#include "SimpleExport.h" -#include "notify.h" +#include "hsExceptionStack.h" +#include "plFileUtils.h" +#include "hsStream.h" + +#include +#include +#include +#pragma hdrstop +#include "SimpleExport.h" #include "plExportErrorMsg.h" #include "plExportLogErrorMsg.h" #include "MaxConvert/UserPropMgr.h" -#include "hsExceptionStack.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/plBitmapCreator.h" #include "pfPython/plPythonFileMod.h" @@ -59,7 +65,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxMain/plPluginResManager.h" #include "plResMgr/plRegistryHelpers.h" #include "plResMgr/plRegistryNode.h" -#include "hsStream.h" #include "MaxConvert/plConvert.h" #include "MaxConvert/hsMaterialConverter.h" @@ -79,7 +84,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plExportDlg.h" #include "plStatusLog/plStatusLog.h" -#include "plFileUtils.h" #include "plAvatar/plAvatarMgr.h" diff --git a/Sources/Tools/MaxExport/SimpleExport.h b/Sources/Tools/MaxExport/SimpleExport.h index 95f3a3d9..99590b3d 100644 --- a/Sources/Tools/MaxExport/SimpleExport.h +++ b/Sources/Tools/MaxExport/SimpleExport.h @@ -42,11 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __SIMPLEEXPORT_H #define __SIMPLEEXPORT_H - -#include "MaxMain/resource.h" -#include "Max.h" -#include "HeadSpin.h" - // // Inlines // diff --git a/Sources/Tools/MaxExport/plErrorMsg.cpp b/Sources/Tools/MaxExport/plErrorMsg.cpp index 71bc5494..31a3c8be 100644 --- a/Sources/Tools/MaxExport/plErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plErrorMsg.cpp @@ -39,11 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "plErrorMsg.h" + #include "HeadSpin.h" #include "hsExceptions.h" - +#pragma hdrstop #include "plErrorMsg.h" diff --git a/Sources/Tools/MaxExport/plErrorMsg.h b/Sources/Tools/MaxExport/plErrorMsg.h index 5737866a..8becec83 100644 --- a/Sources/Tools/MaxExport/plErrorMsg.h +++ b/Sources/Tools/MaxExport/plErrorMsg.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __plErrorMsg_h #define __plErrorMsg_h -#include "HeadSpin.h" - #define PL_ERR_MSG_MAX_MSG 2048 class plErrorMsg diff --git a/Sources/Tools/MaxExport/plExportDlg.cpp b/Sources/Tools/MaxExport/plExportDlg.cpp index db36091e..56d27036 100644 --- a/Sources/Tools/MaxExport/plExportDlg.cpp +++ b/Sources/Tools/MaxExport/plExportDlg.cpp @@ -39,18 +39,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "HeadSpin.h" -#include "plExportDlg.h" -#include "MaxMain/resource.h" -#include "max.h" +#include "hsStlSortUtils.h" +#include "hsWindows.h" -#include "MaxMain/plMaxCFGFile.h" +#include +#include +#include -#include +#include #include -using std::vector; -using std::string; +#include +#pragma hdrstop + +#include "plExportDlg.h" +#include "MaxComponent/plComponentBase.h" +#include "MaxComponent/plMiscComponents.h" +#include "MaxMain/resource.h" +#include "MaxMain/plMaxCFGFile.h" +#include "MaxMain/plMaxNode.h" extern HINSTANCE hInstance; @@ -146,12 +154,6 @@ const char* plExportDlgImp::GetExportPage() return fExportPage; } -#include "MaxComponent/plComponentBase.h" -#include "MaxComponent/plMiscComponents.h" -#include "MaxMain/plMaxNode.h" -#include "hsStlSortUtils.h" -#include - typedef std::set CompSet; static void GetPagesRecur(plMaxNode* node, CompSet& comps) @@ -385,7 +387,7 @@ void plExportDlgImp::Show() fDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_EXPORT), GetCOREInterface()->GetMAXHWnd(), ForwardDlgProc); } -static bool IsExcluded(const char* fileName, vector& excludeFiles) +static bool IsExcluded(const char* fileName, std::vector& excludeFiles) { for (int i = 0; i < excludeFiles.size(); i++) { @@ -396,7 +398,7 @@ static bool IsExcluded(const char* fileName, vector& excludeFiles) return false; } -static bool AutoExportDir(const char* inputDir, const char* outputDir, const char* groupFiles, vector& excludeFiles) +static bool AutoExportDir(const char* inputDir, const char* outputDir, const char* groupFiles, std::vector& excludeFiles) { bool exportedFile = false; @@ -466,7 +468,7 @@ static void ShutdownMax() PostMessage(GetCOREInterface()->GetMAXHWnd(), WM_CLOSE, 0, 0); } -static void GetStringSection(const char* configFile, const char* keyName, vector& strings) +static void GetStringSection(const char* configFile, const char* keyName, std::vector& strings) { char source[256]; GetPrivateProfileString("Settings", keyName, "", source, sizeof(source), configFile); @@ -501,13 +503,13 @@ void plExportDlgImp::StartAutoExport() hsMessageBox_SuppressPrompts = true; // Files to ignore - vector excludeFiles; + std::vector excludeFiles; GetStringSection(configFile, "ExcludeFiles", excludeFiles); // // Get the file substrings to export in one session // - vector groupedFiles; + std::vector groupedFiles; GetStringSection(configFile, "GroupedFiles", groupedFiles); for (int i = 0; i < groupedFiles.size(); i++) diff --git a/Sources/Tools/MaxExport/plExportErrorMsg.cpp b/Sources/Tools/MaxExport/plExportErrorMsg.cpp index ebf008de..c1a36753 100644 --- a/Sources/Tools/MaxExport/plExportErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plExportErrorMsg.cpp @@ -40,12 +40,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" - -#include "HeadSpin.h" -#include "plExportErrorMsg.h" #include "hsExceptions.h" +#pragma hdrstop - +#include "plExportErrorMsg.h" bool plExportErrorMsg::Show() @@ -61,7 +59,7 @@ bool plExportErrorMsg::Ask() { if( GetBogus() ) { - return IDYES == hsMessageBox(GetMsg(), GetLabel(), hsMessageBoxYesNo/*|hsMessageBoxIconExclamation*/); + return hsMBoxYes == hsMessageBox(GetMsg(), GetLabel(), hsMessageBoxYesNo/*|hsMessageBoxIconExclamation*/); } return false; } @@ -86,12 +84,12 @@ bool plExportErrorMsg::CheckAskOrCancel() { strncat(GetMsg(), " - ABORT? (Cancel to mute warnings)", 255); int ret = hsMessageBox(GetMsg(), GetLabel(), hsMessageBoxYesNoCancel/*|hsMessageBoxIconExclamation*/); - if( IDYES == ret ) + if( hsMBoxYes == ret ) { sprintf(GetMsg(), "!Abort at user response to error!"); Check(); } - else if( IDCANCEL == ret ) + else if( hsMBoxCancel == ret ) return 1; } return false; @@ -131,9 +129,7 @@ void plExportErrorMsg::Quit() void plExportErrorMsg::IDebugThrow() { try { -#if HS_BUILD_FOR_WIN32 - DebugBreak(); -#endif // HS_BUILD_FOR_WIN32 + DebugBreakIfDebuggerPresent(); } catch(...) { diff --git a/Sources/Tools/MaxExport/plExportErrorMsg.h b/Sources/Tools/MaxExport/plExportErrorMsg.h index f97d812a..79999848 100644 --- a/Sources/Tools/MaxExport/plExportErrorMsg.h +++ b/Sources/Tools/MaxExport/plExportErrorMsg.h @@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plExportErrorMsg_inc #define plExportErrorMsg_inc -#include #include "plErrorMsg.h" #if !HS_BUILD_FOR_WIN32 diff --git a/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp b/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp index 0d44cff9..bc0e0761 100644 --- a/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp @@ -40,14 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" +#include "hsExceptions.h" +#include "hsWindows.h" #include + +#include #include #include +#pragma hdrstop -#include "HeadSpin.h" #include "plExportLogErrorMsg.h" -#include "hsExceptions.h" // diff --git a/Sources/Tools/MaxExport/plExportLogErrorMsg.h b/Sources/Tools/MaxExport/plExportLogErrorMsg.h index 33a7df74..c901a468 100644 --- a/Sources/Tools/MaxExport/plExportLogErrorMsg.h +++ b/Sources/Tools/MaxExport/plExportLogErrorMsg.h @@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // If there is no errors then there should be no file created. // -#include #include "plErrorMsg.h" #if !HS_BUILD_FOR_WIN32 diff --git a/Sources/Tools/MaxExport/plExportProgressBar.cpp b/Sources/Tools/MaxExport/plExportProgressBar.cpp index 81f459f8..c9e242ed 100644 --- a/Sources/Tools/MaxExport/plExportProgressBar.cpp +++ b/Sources/Tools/MaxExport/plExportProgressBar.cpp @@ -40,11 +40,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" -#include "plExportProgressBar.h" +#include "hsWindows.h" #include + +#include #include #include +#pragma hdrstop + +#include "plExportProgressBar.h" namespace { DWORD WINAPI ProgressDummyFunc(LPVOID arg) diff --git a/Sources/Tools/MaxExport/plExportProgressBar.h b/Sources/Tools/MaxExport/plExportProgressBar.h index 2d8df767..5e600055 100644 --- a/Sources/Tools/MaxExport/plExportProgressBar.h +++ b/Sources/Tools/MaxExport/plExportProgressBar.h @@ -42,8 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plExportProgressBar_inc #define plExportProgressBar_inc -#include "HeadSpin.h" - +class Interface; class INode; class plExportProgressBar From 6e75026c469515719502c19c88f37a9dbd168f17 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 11 Dec 2012 01:50:45 -0500 Subject: [PATCH 10/13] Attempt to de-messify MaxMain ... Similarly to MaxComponent, I'm not sure how much this helps. But, it (should) compile. I hate 3dsm. --- Sources/Tools/MaxMain/CMakeLists.txt | 1 + Sources/Tools/MaxMain/GlobalUtility.cpp | 13 ++- Sources/Tools/MaxMain/GlobalUtility.h | 9 +- Sources/Tools/MaxMain/MaxAllocDll.cpp | 8 +- Sources/Tools/MaxMain/Pch.cpp | 51 +++++++++ Sources/Tools/MaxMain/Pch.h | 111 +++++++++++++++++++ Sources/Tools/MaxMain/indexes.cpp | 4 +- Sources/Tools/MaxMain/main.cpp | 36 +++--- Sources/Tools/MaxMain/plActionTableMgr.cpp | 7 ++ Sources/Tools/MaxMain/plActionTableMgr.h | 6 +- Sources/Tools/MaxMain/plAgeDescInterface.cpp | 31 ++++-- Sources/Tools/MaxMain/plAgeDescInterface.h | 20 +--- Sources/Tools/MaxMain/plCommonObjLib.cpp | 4 +- Sources/Tools/MaxMain/plCommonObjLib.h | 9 +- Sources/Tools/MaxMain/plComponentDlg.cpp | 18 +-- Sources/Tools/MaxMain/plComponentDlg.h | 7 +- Sources/Tools/MaxMain/plComponentPanel.cpp | 8 +- Sources/Tools/MaxMain/plComponentPanel.h | 8 +- Sources/Tools/MaxMain/plGetLocationDlg.cpp | 14 ++- Sources/Tools/MaxMain/plMaxAccelerators.cpp | 7 +- Sources/Tools/MaxMain/plMaxCFGFile.cpp | 8 +- Sources/Tools/MaxMain/plMaxMenu.cpp | 14 ++- Sources/Tools/MaxMain/plMaxMeshExtractor.cpp | 13 ++- Sources/Tools/MaxMain/plMaxMeshExtractor.h | 4 +- Sources/Tools/MaxMain/plMaxNode.cpp | 40 ++++--- Sources/Tools/MaxMain/plMaxNode.h | 47 ++++---- Sources/Tools/MaxMain/plMaxNodeBase.cpp | 31 +++--- Sources/Tools/MaxMain/plMaxNodeBase.h | 24 ++-- Sources/Tools/MaxMain/plMaxNodeData.h | 17 ++- Sources/Tools/MaxMain/plMaxUtils.cpp | 28 ++--- Sources/Tools/MaxMain/plMaxUtils.h | 6 +- Sources/Tools/MaxMain/plMtlCollector.cpp | 10 +- Sources/Tools/MaxMain/plMtlCollector.h | 9 +- Sources/Tools/MaxMain/plNodeLock.cpp | 5 +- Sources/Tools/MaxMain/plPhysXCooking.cpp | 26 +++-- Sources/Tools/MaxMain/plPhysXCooking.h | 11 +- Sources/Tools/MaxMain/plPhysicalProps.cpp | 6 +- Sources/Tools/MaxMain/plPhysicalProps.h | 5 +- Sources/Tools/MaxMain/plPluginResManager.cpp | 17 +-- Sources/Tools/MaxMain/plPluginResManager.h | 5 +- Sources/Tools/MaxMain/plPythonMgr.cpp | 27 +++-- Sources/Tools/MaxMain/plPythonMgr.h | 4 +- Sources/Tools/MaxMain/plResCollector.cpp | 9 +- Sources/Tools/MaxMain/plResetXform.cpp | 9 +- Sources/Tools/MaxMain/plResetXform.h | 5 +- Sources/Tools/MaxMain/plSaveSelected.cpp | 14 ++- Sources/Tools/MaxMain/plTextureExportLog.cpp | 7 +- Sources/Tools/MaxMain/plTextureSearch.cpp | 27 +++-- Sources/Tools/MaxMain/plTextureSearch.h | 1 - 49 files changed, 527 insertions(+), 274 deletions(-) create mode 100644 Sources/Tools/MaxMain/Pch.cpp create mode 100644 Sources/Tools/MaxMain/Pch.h diff --git a/Sources/Tools/MaxMain/CMakeLists.txt b/Sources/Tools/MaxMain/CMakeLists.txt index 2e53ed29..fea2d74a 100644 --- a/Sources/Tools/MaxMain/CMakeLists.txt +++ b/Sources/Tools/MaxMain/CMakeLists.txt @@ -81,6 +81,7 @@ set(MaxMain_SOURCES ) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plasma_BINARY_DIR}/bin) +use_precompiled_header(Pch.h Pch.cpp MaxMain_HEADERS MaxMain_SOURCES) add_library(MaxMain SHARED ${MaxMain_HEADERS} ${MaxMain_RESOURCES} ${MaxMain_SOURCES}) set_target_properties(MaxMain PROPERTIES OUTPUT_NAME "PlasmaMax") set_target_properties(MaxMain PROPERTIES SUFFIX ".gup") diff --git a/Sources/Tools/MaxMain/GlobalUtility.cpp b/Sources/Tools/MaxMain/GlobalUtility.cpp index d6ab8045..9aa13c7b 100644 --- a/Sources/Tools/MaxMain/GlobalUtility.cpp +++ b/Sources/Tools/MaxMain/GlobalUtility.cpp @@ -39,17 +39,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" -#include "GlobalUtility.h" +#include "HeadSpin.h" #include "hsResMgr.h" + +#include "MaxComponent/plComponentBase.h" #include "plMaxNode.h" + +#include +#pragma hdrstop + +#include "GlobalUtility.h" + #include "MaxSceneViewer/SceneSync.h" #include "MaxComponent/ComponentDummies.h" #include "plActionTableMgr.h" #include "plMaxMenu.h" -#include "MaxComponent/plComponentBase.h" #include "MaxSceneViewer/plMaxFileData.h" #include "pfPython/cyPythonInterface.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" @@ -165,7 +171,6 @@ DWORD PlasmaMax::Start() DummyCodeIncludeFuncInventStuff(); //Inventory Object comp DummyCodeIncludeFuncVolumeGadget(); // inside/enter/exit phys volume activator // DummyCodeIncludeFuncActivatorGadget(); // activator activator - DummyCodeIncludeFuncImpactGadget(); // collision activator DummyCodeIncludeFuncSoftVolume(); // Soft Volumes DummyCodeIncludeFuncPhysConst(); // Phys Constraints DummyCodeIncludeFuncCameras(); // new camera code diff --git a/Sources/Tools/MaxMain/GlobalUtility.h b/Sources/Tools/MaxMain/GlobalUtility.h index 87f17a95..0f6abe9d 100644 --- a/Sources/Tools/MaxMain/GlobalUtility.h +++ b/Sources/Tools/MaxMain/GlobalUtility.h @@ -42,14 +42,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PLASMA_MAX_H #define PLASMA_MAX_H +#include + class BitmapManager; +class ClassDesc; +class GUP; class Texmap; -#include "max.h" -#include "guplib.h" -#include "HeadSpin.h" -#include - #define PLASMA_MAX_CLASSID Class_ID(0x3d494269, 0x103c5c5f) extern ClassDesc* GetGUPDesc(); diff --git a/Sources/Tools/MaxMain/MaxAllocDll.cpp b/Sources/Tools/MaxMain/MaxAllocDll.cpp index 0802de51..69cc7f69 100644 --- a/Sources/Tools/MaxMain/MaxAllocDll.cpp +++ b/Sources/Tools/MaxMain/MaxAllocDll.cpp @@ -39,7 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" + +#include "HeadSpin.h" +#include "hsWindows.h" + +#include +#pragma hdrstop + #include "MaxAllocDll.h" typedef void* (*MAXMALLOC) (size_t size); diff --git a/Sources/Tools/MaxMain/Pch.cpp b/Sources/Tools/MaxMain/Pch.cpp new file mode 100644 index 00000000..e6aaece5 --- /dev/null +++ b/Sources/Tools/MaxMain/Pch.cpp @@ -0,0 +1,51 @@ +/*==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 . + +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==*/ + +#include "Pch.h" + +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxMain + * + * This file prompts MSVC to generate a PCH file for the MaxMain project. It + * has no function if precompiled headers are disabled in cmake. + */ diff --git a/Sources/Tools/MaxMain/Pch.h b/Sources/Tools/MaxMain/Pch.h new file mode 100644 index 00000000..b11de810 --- /dev/null +++ b/Sources/Tools/MaxMain/Pch.h @@ -0,0 +1,111 @@ +/*==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 . + +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 _MaxMain_Pch_inc_ +#define _MaxMain_Pch_inc_ + +/** + * \file Pch.h + * \brief Precompiled Header for MaxMain + */ + +// STL +#include +#include +#include +#include +#include + +// Core Plasma +#include "HeadSpin.h" +#include "hsBitVector.h" +#include "hsColorRGBA.h" +#include "plgDispatch.h" +#include "hsFastMath.h" +#include "hsFiles.h" +#include "hsGeometry3.h" +#include "pnKeyedObject/plKey.h" +#include "plLoadMask.h" +#include "hsMatrix44.h" +#include "plRenderLevel.h" +#include "hsSTLStream.h" +#include "hsStream.h" +#include "hsStringTokenizer.h" +#include "hsTemplates.h" + +// Windows +#include "hsWindows.h" +#include +#include +#include + +// PlasmaMax Stuff included everywhere +// Some of these files may pull in Max SDK headers, so put this below hsWindows.h! +#include "plMaxNode.h" +#include "plMaxNodeData.h" +#include "MaxComponent/plComponent.h" +#include "MaxComponent/plComponentReg.h" + +// Misc Max SDK +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Utility +#include "MaxCompat.h" +#include "resource.h" + +// Python +#include + +#endif // _MaxMain_Pch_inc_ \ No newline at end of file diff --git a/Sources/Tools/MaxMain/indexes.cpp b/Sources/Tools/MaxMain/indexes.cpp index 4d085850..6b6b84f3 100644 --- a/Sources/Tools/MaxMain/indexes.cpp +++ b/Sources/Tools/MaxMain/indexes.cpp @@ -43,15 +43,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // rebuilt unless completely necessary -Colin #include "HeadSpin.h" +#pragma hdrstop + #include "pnNucleusCreatables.h" #include "plAllCreatables.h" -//#include "pfAllCreatables.h" #include "pfCharacter/pfCharacterCreatable.h" #include "pfCamera/pfCameraCreatable.h" #include "pfAnimation/pfAnimationCreatable.h" #include "pfConditional/plConditionalObjectCreatable.h" -//#include "pfConsole/pfConsoleCreatable.h" #include "pfSurface/pfSurfaceCreatable.h" #include "pfMessage/pfMessageCreatable.h" #include "pfAudio/pfAudioCreatable.h" diff --git a/Sources/Tools/MaxMain/main.cpp b/Sources/Tools/MaxMain/main.cpp index d435c367..c5ebc3b9 100644 --- a/Sources/Tools/MaxMain/main.cpp +++ b/Sources/Tools/MaxMain/main.cpp @@ -41,15 +41,31 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "Max.h" -#include "istdplug.h" -#include "custcont.h" +#include "hsFiles.h" +#include "hsTemplates.h" + +#include "MaxComponent/plComponentMgr.h" +#include "MaxCompat.h" + + +#include +#include +#include + +// "TEMP" -- who's gonna rewrite that now? >.< +#include +#include +#pragma hdrstop #include "MaxExport/SimpleExport.h" -#include "MaxMain/MaxCompat.h" -#include "MaxComponent/plComponentMgr.h" #include "MaxPlasmaMtls/plMtlImport.h" + +#include "plPythonMgr.h" +#include "plPluginResManager.h" +#include "plSDL/plSDL.h" +#include "plMaxCFGFile.h" + extern ClassDesc* GetGUPDesc(); extern ClassDesc* GetComponentUtilDesc(); extern ClassDesc* GetComponentMgrDesc(); @@ -133,13 +149,6 @@ __declspec(dllexport) ULONG LibVersion() return VERSION_3DSMAX; } -#include "plPythonMgr.h" -#include "plPluginResManager.h" -#include "plSDL/plSDL.h" -#include "plMaxCFGFile.h" -#include -#include "hsFiles.h" - // // DLLMAIN // @@ -191,9 +200,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) ////////////////////////////////////////////////////////////////////////////////// // TEMP ////////////////////////////////////////////////////////////////////////////////// -#include "CustAttrib.h" -#include "ICustAttribContainer.h" -#include "iparamb2.h" #define PL_GEN_ATTRIB_CLASS_ID Class_ID(0x24c36e6e, 0x53ec2ce4) diff --git a/Sources/Tools/MaxMain/plActionTableMgr.cpp b/Sources/Tools/MaxMain/plActionTableMgr.cpp index 15edb83d..50fc6a4b 100644 --- a/Sources/Tools/MaxMain/plActionTableMgr.cpp +++ b/Sources/Tools/MaxMain/plActionTableMgr.cpp @@ -46,6 +46,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ******************************************************************************/ #include "HeadSpin.h" +#include "hsWindows.h" + +#include +#include +#include +#pragma hdrstop + #include "plActionTableMgr.h" diff --git a/Sources/Tools/MaxMain/plActionTableMgr.h b/Sources/Tools/MaxMain/plActionTableMgr.h index fc024073..4097c68b 100644 --- a/Sources/Tools/MaxMain/plActionTableMgr.h +++ b/Sources/Tools/MaxMain/plActionTableMgr.h @@ -48,10 +48,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __PLACTIONTABLEMGR_H #define __PLACTIONTABLEMGR_H -#include "HeadSpin.h" -#include "Max.h" -#include "notify.h" -#include +class ActionCallback; +struct ActionDescription; typedef bool(*ActionCallbackFunc)(int); diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.cpp b/Sources/Tools/MaxMain/plAgeDescInterface.cpp index 54b1c03b..54fd40d8 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.cpp +++ b/Sources/Tools/MaxMain/plAgeDescInterface.cpp @@ -40,20 +40,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plAgeDescInterface.h" -#include "max.h" -#include "resource.h" #include "hsFiles.h" +#include "hsStream.h" +#include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include + +#include "resource.h" +#pragma hdrstop + +#include "plAgeDescInterface.h" + #include "plAgeDescription/plAgeDescription.h" #include "plMaxCFGFile.h" -#include "hsStream.h" + #ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/MaxAssInterface.h" +# include "../../AssetMan/PublicInterface/MaxAssInterface.h" #endif #include "plMaxAccelerators.h" -#include using std::string; extern HINSTANCE hInstance; @@ -149,8 +158,10 @@ plAgeDescInterface::~plAgeDescInterface() DeleteObject( fHiliteBrush ); fBoldFont = nil; +#ifdef MAXASS_AVAILABLE delete fAssetManIface; fAssetManIface = nil; +#endif } plAgeDescInterface& plAgeDescInterface::Instance() @@ -828,7 +839,7 @@ bool plAgeDescInterface::IGetLocalAgePath(char *path) return true; } -int plAgeDescInterface::IFindAge(const char* ageName, vector& ageFiles) +int plAgeDescInterface::IFindAge(const char* ageName, std::vector& ageFiles) { for (int i = 0; i < ageFiles.size(); i++) if (ageFiles[i]->fAgeName == ageName) @@ -837,7 +848,7 @@ int plAgeDescInterface::IFindAge(const char* ageName, vector& ageFil return -1; } -void plAgeDescInterface::IGetAgeFiles(vector& ageFiles) +void plAgeDescInterface::IGetAgeFiles(std::vector& ageFiles) { IClearAgeFiles(ageFiles); @@ -894,7 +905,7 @@ void plAgeDescInterface::IGetAgeFiles(vector& ageFiles) #endif } -void plAgeDescInterface::IClearAgeFiles(vector& ageFiles) +void plAgeDescInterface::IClearAgeFiles(std::vector& ageFiles) { for (int i = 0; i < ageFiles.size(); i++) delete ageFiles[i]; @@ -903,7 +914,7 @@ void plAgeDescInterface::IClearAgeFiles(vector& ageFiles) void plAgeDescInterface::BuildAgeFileList( hsTArray &ageList ) { - vector tempAgeFiles; + std::vector tempAgeFiles; IGetAgeFiles(tempAgeFiles); for (int i = 0; i < tempAgeFiles.size(); i++) diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.h b/Sources/Tools/MaxMain/plAgeDescInterface.h index 6d1e12ed..96a81126 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.h +++ b/Sources/Tools/MaxMain/plAgeDescInterface.h @@ -40,20 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include "HeadSpin.h" -#include "hsTemplates.h" -#include -#include - -using std::vector; - -class ISpinnerControl; class plAgeDescription; class plAgeFile; +class MaxAssBranchAccess; +class ISpinnerControl; typedef struct _TREEITEM *HTREEITEM; -class MaxAssBranchAccess; class plAgeDescInterface { protected: @@ -75,8 +68,7 @@ protected: HFONT fBoldFont; HBRUSH fHiliteBrush; - vector fAgeFiles; -// vector<_variant_t> fAssetIds; + std::vector fAgeFiles; MaxAssBranchAccess *fAssetManIface; @@ -95,9 +87,9 @@ public: static void BuildAgeFileList( hsTArray &ageList ); protected: - static int IFindAge(const char* ageName, vector& ageFiles); - static void IGetAgeFiles(vector& ageFiles); - static void IClearAgeFiles(vector& ageFiles); + static int IFindAge(const char* ageName, std::vector& ageFiles); + static void IGetAgeFiles(std::vector& ageFiles); + static void IClearAgeFiles(std::vector& ageFiles); void IResetParams(); diff --git a/Sources/Tools/MaxMain/plCommonObjLib.cpp b/Sources/Tools/MaxMain/plCommonObjLib.cpp index 92ca4b5d..834834ce 100644 --- a/Sources/Tools/MaxMain/plCommonObjLib.cpp +++ b/Sources/Tools/MaxMain/plCommonObjLib.cpp @@ -48,7 +48,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "HeadSpin.h" +#include "hsTemplates.h" +#pragma hdrstop + #include "plCommonObjLib.h" #include "pnKeyedObject/hsKeyedObject.h" #include "pnKeyedObject/plUoid.h" diff --git a/Sources/Tools/MaxMain/plCommonObjLib.h b/Sources/Tools/MaxMain/plCommonObjLib.h index 3fdad631..c1b9721c 100644 --- a/Sources/Tools/MaxMain/plCommonObjLib.h +++ b/Sources/Tools/MaxMain/plCommonObjLib.h @@ -65,16 +65,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plCommonObjLib_h #define _plCommonObjLib_h -#include "hsTemplates.h" - +class plCommonObjLibList; +class plKey; +class hsKeyedObject; class plString; - //// Class Definition ///////////////////////////////////////////////////////// -class plCommonObjLibList; -class hsKeyedObject; -class plKey; class plCommonObjLib { protected: diff --git a/Sources/Tools/MaxMain/plComponentDlg.cpp b/Sources/Tools/MaxMain/plComponentDlg.cpp index adc229d1..ca2e76e1 100644 --- a/Sources/Tools/MaxMain/plComponentDlg.cpp +++ b/Sources/Tools/MaxMain/plComponentDlg.cpp @@ -39,20 +39,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "iparamb2.h" +#include "hsTemplates.h" -#include "plComponentDlg.h" #include "MaxComponent/plComponentBase.h" -#include "MaxComponent/plComponentMgr.h" #include "MaxComponent/plComponentReg.h" -#include "resource.h" #include "plMaxNode.h" -#include "plComponentPanel.h" -#include "plMaxAccelerators.h" +#include "resource.h" #include +#include +#include +#include +#pragma hdrstop + +#include "plComponentDlg.h" +#include "plComponentPanel.h" +#include "plMaxAccelerators.h" extern HINSTANCE hInstance; diff --git a/Sources/Tools/MaxMain/plComponentDlg.h b/Sources/Tools/MaxMain/plComponentDlg.h index 5f151f62..8bdd5f21 100644 --- a/Sources/Tools/MaxMain/plComponentDlg.h +++ b/Sources/Tools/MaxMain/plComponentDlg.h @@ -39,12 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "notify.h" - -#include +class Class_ID; +class Interface; class plMaxNode; +struct NotifyInfo; class plComponentDlg { diff --git a/Sources/Tools/MaxMain/plComponentPanel.cpp b/Sources/Tools/MaxMain/plComponentPanel.cpp index 3dc346cd..82950040 100644 --- a/Sources/Tools/MaxMain/plComponentPanel.cpp +++ b/Sources/Tools/MaxMain/plComponentPanel.cpp @@ -39,13 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plComponentPanel.h" -#include "resource.h" +#include "pnKeyedObject/plKey.h" #include "plMaxNode.h" #include "MaxComponent/plComponent.h" #include "MaxComponent/plComponentMgr.h" +#include "resource.h" +#pragma hdrstop + +#include "plComponentPanel.h" #include "plComponentDlg.h" #include "plMaxAccelerators.h" diff --git a/Sources/Tools/MaxMain/plComponentPanel.h b/Sources/Tools/MaxMain/plComponentPanel.h index 8937d6dc..aa6068b7 100644 --- a/Sources/Tools/MaxMain/plComponentPanel.h +++ b/Sources/Tools/MaxMain/plComponentPanel.h @@ -39,12 +39,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "utilapi.h" -#include "notify.h" -class plMaxNode; class plComponentBase; +class Interface; +class plMaxNode; +class IUtil; +class UtilityObj; class plComponentUtil : public UtilityObj { diff --git a/Sources/Tools/MaxMain/plGetLocationDlg.cpp b/Sources/Tools/MaxMain/plGetLocationDlg.cpp index 69ae90d6..bd6f4ed3 100644 --- a/Sources/Tools/MaxMain/plGetLocationDlg.cpp +++ b/Sources/Tools/MaxMain/plGetLocationDlg.cpp @@ -39,14 +39,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plGetLocationDlg.h" +#include "pnKeyedObject/plKey.h" +#include "hsWindows.h" + #include "plMaxNode.h" -#include "MaxComponent/plMiscComponents.h" -#include "resource.h" -#include "MaxExport/plErrorMsg.h" #include "MaxComponent/plComponent.h" +#include "resource.h" +#pragma hdrstop + +#include "plGetLocationDlg.h" +#include "MaxComponent/plMiscComponents.h" +#include "MaxExport/plErrorMsg.h" plGetLocationDlg::plGetLocationDlg() : fNode(nil), fErrMsg(nil), fDefaultLocation(nil) { diff --git a/Sources/Tools/MaxMain/plMaxAccelerators.cpp b/Sources/Tools/MaxMain/plMaxAccelerators.cpp index b29a55bc..2a58547a 100644 --- a/Sources/Tools/MaxMain/plMaxAccelerators.cpp +++ b/Sources/Tools/MaxMain/plMaxAccelerators.cpp @@ -39,8 +39,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" +#include "hsWindows.h" + +#include +#pragma hdrstop + #include "plMaxAccelerators.h" int plMaxAccelerators::fNumDisables = 0; diff --git a/Sources/Tools/MaxMain/plMaxCFGFile.cpp b/Sources/Tools/MaxMain/plMaxCFGFile.cpp index ab2c734c..69efae87 100644 --- a/Sources/Tools/MaxMain/plMaxCFGFile.cpp +++ b/Sources/Tools/MaxMain/plMaxCFGFile.cpp @@ -39,10 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsWindows.h" + +#include +#pragma hdrstop + #include "plMaxCFGFile.h" -#include "max.h" -#include "HeadSpin.h" #include "plFile/plBrowseFolder.h" const char *plMaxConfig::GetPluginIni() diff --git a/Sources/Tools/MaxMain/plMaxMenu.cpp b/Sources/Tools/MaxMain/plMaxMenu.cpp index b87b9eba..cb7b7d0b 100644 --- a/Sources/Tools/MaxMain/plMaxMenu.cpp +++ b/Sources/Tools/MaxMain/plMaxMenu.cpp @@ -39,13 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "iMenuMan.h" +#include "pnKeyedObject/plKey.h" +#include "hsTemplates.h" +#include "hsWindows.h" + +#include +#include +#include +#include "resource.h" +#include +#pragma hdrstop #include "plMaxMenu.h" #include "plActionTableMgr.h" -#include "resource.h" #include "plSaveSelected.h" #include "plComponentDlg.h" #include "plMaxCFGFile.h" diff --git a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp index 72191d0d..0c70956f 100644 --- a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp +++ b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp @@ -39,10 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "plMaxMeshExtractor.h" -#include "Max.h" + +#include "HeadSpin.h" +#include "pnKeyedObject/plKey.h" +#include "hsMatrix44.h" + #include "plMaxNode.h" -#include "dummy.h" +#include +#pragma hdrstop + +#include "plMaxMeshExtractor.h" + static Mesh* ExtractMesh(INode* pNode, TriObject** ppDeleteMe) { diff --git a/Sources/Tools/MaxMain/plMaxMeshExtractor.h b/Sources/Tools/MaxMain/plMaxMeshExtractor.h index c005d3e5..01aaed09 100644 --- a/Sources/Tools/MaxMain/plMaxMeshExtractor.h +++ b/Sources/Tools/MaxMain/plMaxMeshExtractor.h @@ -42,9 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMaxMeshExtractor_h_inc #define plMaxMeshExtractor_h_inc -#include "HeadSpin.h" -#include "hsMatrix44.h" - +struct hsMatrix44; class plMaxNode; class plMaxMeshExtractor diff --git a/Sources/Tools/MaxMain/plMaxNode.cpp b/Sources/Tools/MaxMain/plMaxNode.cpp index 090c892c..ea88e983 100644 --- a/Sources/Tools/MaxMain/plMaxNode.cpp +++ b/Sources/Tools/MaxMain/plMaxNode.cpp @@ -39,26 +39,31 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "iparamm2.h" -#include "iparamb2.h" -#include "ISkin.h" -#include "MNMath.h" +#include "plgDispatch.h" +#include "hsFastMath.h" +#include "pnKeyedObject/plKey.h" +#include "plRenderLevel.h" +#include "hsSTLStream.h" +#include "hsStringTokenizer.h" +#include "hsTemplates.h" #include "plMaxNode.h" -//#include "MaxComponent/resource.h" -#include "GlobalUtility.h" - -#include "plgDispatch.h" -#include "plPluginResManager.h" #include "plMaxNodeData.h" +#include "MaxComponent/plComponent.h" +#include +#include +#include +#include +#include +#pragma hdrstop -#include "MaxConvert/plConvert.h" -#include "hsTemplates.h" -#include "hsStringTokenizer.h" +#include "GlobalUtility.h" +#include "plPluginResManager.h" +#include "MaxConvert/plConvert.h" #include "MaxConvert/hsConverterUtils.h" #include "MaxConvert/hsControlConverter.h" #include "MaxConvert/plMeshConverter.h" @@ -71,8 +76,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMaxMeshExtractor.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h" -#include "pnKeyedObject/plKey.h" - #include "pnSceneObject/plSceneObject.h" #include "plScene/plSceneNode.h" #include "plPhysX/plPXPhysical.h" @@ -103,8 +106,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfAnimation/plViewFaceModifier.h" // mf horse temp hack testing to be thrown away #include "plScene/plOccluder.h" -#include "hsFastMath.h" - #include "plDrawable/plDrawableSpans.h" #include "plDrawable/plGeometrySpan.h" @@ -124,8 +125,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxPlasmaMtls/Materials/plDecalMtl.h" +#include "MaxComponent/plAnimComponent.h" #include "MaxComponent/plComponentTools.h" -#include "MaxComponent/plComponent.h" #include "MaxComponent/plComponentExt.h" #include "MaxComponent/plFlexibilityComponent.h" #include "MaxComponent/plLightMapComponent.h" @@ -164,8 +165,6 @@ int GetMatAnimModKey(Mtl* mtl, plMaxNodeBase* node, const plString &segName, hsT // In plAudioComponents int GetSoundNameAndIdx(plComponentBase *comp, plMaxNodeBase *node, const char*& name); -#include "MaxComponent/plAnimComponent.h" - static plString GetAnimCompAnimName(plComponentBase *comp) { if (comp->ClassID() == ANIM_COMP_CID || comp->ClassID() == ANIM_GROUP_COMP_CID) @@ -619,7 +618,6 @@ bool plMaxNode::IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings) #include "plPhysXCooking.h" #include "plPhysX/plPXStream.h" #include "plPhysX/plSimulationMgr.h" -#include "hsSTLStream.h" bool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) { diff --git a/Sources/Tools/MaxMain/plMaxNode.h b/Sources/Tools/MaxMain/plMaxNode.h index 98886eb8..d0eb3fb0 100644 --- a/Sources/Tools/MaxMain/plMaxNode.h +++ b/Sources/Tools/MaxMain/plMaxNode.h @@ -44,41 +44,38 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define plMaxNode_inc #include "plMaxNodeBase.h" - -#include "hsTemplates.h" -#include "hsMatrix44.h" -#include "pnKeyedObject/plKey.h" +#include #include +#include "hsTemplates.h" -class plMaxNode; -class plErrorMsg; +class plAGAnim; +class plAGMasterMod; +class plAGModifier; +class plController; class plConvertSettings; -class plExportProgressBar; -class plSceneNode; -class plDrawable; class plDrawInterface; +class plDrawable; +class plDrawableCriteria; class plDrawableSpans; +class plErrorMsg; +class plExportProgressBar; +class plGeometrySpan; class plLightInfo; -class plSpotLightInfo; +class plLightMapComponent; +class plLightModifier; +class plLtdDirModifier; +class plMaxBoneMap; +class plMaxNode; class plOmniLightInfo; -class plGeometrySpan; -class ISkin; -class plSpotModifier; class plOmniModifier; -class plLtdDirModifier; -class plLightModifier; -class plController; -class plAGModifier; -class plAGMasterMod; -class plAGAnim; -class plRenderLevel; -class plDrawableCriteria; -class plXImposterComp; -class plPhysicalProps; -class plLightMapComponent; class plPageInfoComponent; -class plMaxBoneMap; +class plPhysicalProps; +class plSceneNode; +class plSceneObject; +class plSpotLightInfo; +class plSpotModifier; class plSynchedObject; +class plXImposterComp; typedef bool (plMaxNode:: *PMaxNodeFunc) (plErrorMsg *, plConvertSettings *); // Function pointer to a plMaxNode member funtion diff --git a/Sources/Tools/MaxMain/plMaxNodeBase.cpp b/Sources/Tools/MaxMain/plMaxNodeBase.cpp index 856903cb..3ae21d61 100644 --- a/Sources/Tools/MaxMain/plMaxNodeBase.cpp +++ b/Sources/Tools/MaxMain/plMaxNodeBase.cpp @@ -39,34 +39,39 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "pnKeyedObject/plKey.h" +#include "hsMatrix44.h" +#include "plRenderLevel.h" + #include "plMaxNodeBase.h" #include "plMaxNodeData.h" +#include "MaxComponent/plComponentBase.h" -// Max includes -#include "iparamm2.h" -#include "modstack.h" -#include "ISkin.h" -#include "dummy.h" - -//To support the new Plasma Light Objs, the classes are included below -#include "MaxPlasmaLights/plRealTimeLightBase.h" - +#include +#include +#include +#include +#include +#include -#include #include +#include +#include +#pragma hdrstop + +// To support the new Plasma Light Objs, the classes are included below +#include "MaxPlasmaLights/plRealTimeLightBase.h" #include "GlobalUtility.h" // Only needed for PLASMA_MAX_CLASSID, fix? #include "pnKeyedObject/plUoid.h" -#include "pnKeyedObject/plKey.h" #include "pnModifier/plModifier.h" #include "MaxPlasmaMtls/Materials/plDecalMtl.h" -#include "MaxComponent/plComponentBase.h" - CoreExport void *__cdecl MAX_new(size_t size); CoreExport void __cdecl MAX_delete(void* mem); diff --git a/Sources/Tools/MaxMain/plMaxNodeBase.h b/Sources/Tools/MaxMain/plMaxNodeBase.h index b421316a..f991f0ae 100644 --- a/Sources/Tools/MaxMain/plMaxNodeBase.h +++ b/Sources/Tools/MaxMain/plMaxNodeBase.h @@ -42,24 +42,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMaxNodeBase_inc #define plMaxNodeBase_inc -#include "HeadSpin.h" -#include "hsTemplates.h" -#include "hsMatrix44.h" -#include "hsColorRGBA.h" -#include "pnKeyedObject/plKey.h" #include "plLoadMask.h" +#include "pnKeyedObject/plKey.h" +#include "hsMatrix44.h" +#include "plRenderLevel.h" +#include "hsWindows.h" + +#include -class plLocation; -class plSceneObject; -class plModifier; class plComponentBase; -class ISkin; -class plMaxNodeData; class hsGMesh; -class plRenderLevel; class plGeometrySpan; -class plSharedMesh; +class plLocation; class plMaxBoneMap; +class plMaxNodeData; +class plModifier; +class plSceneObject; +class plSharedMesh; +class ISkin; //------------------------------------------- // plMaxNodeBase diff --git a/Sources/Tools/MaxMain/plMaxNodeData.h b/Sources/Tools/MaxMain/plMaxNodeData.h index a9920892..5c98c35d 100644 --- a/Sources/Tools/MaxMain/plMaxNodeData.h +++ b/Sources/Tools/MaxMain/plMaxNodeData.h @@ -43,22 +43,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMaxNodeData_inc #define plMaxNodeData_inc -#include "HeadSpin.h" -#include "hsTemplates.h" -#include "hsColorRGBA.h" -#include "plRenderLevel.h" -#include "plPhysicalProps.h" #include "hsBitVector.h" -#include "pnKeyedObject/plKey.h" #include "plLoadMask.h" +#include "plPhysicalProps.h" +#include "hsTemplates.h" -class plMaxNodeBase; -class plMaxNode; -class plLocation; -class plSceneObject; class hsGMesh; class plGeometrySpan; +class plLocation; +class plKey; class plMaxBoneMap; +class plMaxNode; +class plMaxNodeBase; +class plSceneObject; class plSharedMesh; class plMaxNodeBaseTab : public Tab diff --git a/Sources/Tools/MaxMain/plMaxUtils.cpp b/Sources/Tools/MaxMain/plMaxUtils.cpp index 6060d991..ec521908 100644 --- a/Sources/Tools/MaxMain/plMaxUtils.cpp +++ b/Sources/Tools/MaxMain/plMaxUtils.cpp @@ -39,14 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plMaxUtils.h" +#include "pnKeyedObject/plKey.h" +#include "hsWindows.h" + #include "resource.h" -#include "hsResMgr.h" +#include +#include +#include +#pragma hdrstop + +#include "plMaxUtils.h" #include "plResMgr/plPageInfo.h" #include "pnKeyedObject/plUoid.h" -#include "pnKeyedObject/plKey.h" #include "pnFactory/plFactory.h" class MaxUtilsClassDesc : public ClassDesc @@ -115,7 +122,7 @@ BOOL plMaxUtils::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) #include "plMtlCollector.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" #ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/AssManTypes.h" +# include "../../AssetMan/PublicInterface/AssManTypes.h" #endif int ClearTextureIds() @@ -154,16 +161,3 @@ int ClearTextureIds() return 0; #endif } -/* -void ClearAssetsRecur(plMaxNode* node) -{ - plComponentBase* comp = node->ConvertToComponent(); - if (comp && plAudioComp::IsSoundComponent(comp)) - { - plBaseSoundEmitterComponent* soundComp = (plBaseSoundEmitterComponent*)comp; - soundComp->SetSoundAssetId(kBaseSound, - kCoverSound -) - } -} -*/ \ No newline at end of file diff --git a/Sources/Tools/MaxMain/plMaxUtils.h b/Sources/Tools/MaxMain/plMaxUtils.h index 2495f204..6250a494 100644 --- a/Sources/Tools/MaxMain/plMaxUtils.h +++ b/Sources/Tools/MaxMain/plMaxUtils.h @@ -39,8 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "utilapi.h" + +class Interface; +class IUtil; +class UtilityObj; // This a central repository for handy debugging tools for Max that don't fit in anywhere else. class plMaxUtils : public UtilityObj diff --git a/Sources/Tools/MaxMain/plMtlCollector.cpp b/Sources/Tools/MaxMain/plMtlCollector.cpp index aa82303b..950f8982 100644 --- a/Sources/Tools/MaxMain/plMtlCollector.cpp +++ b/Sources/Tools/MaxMain/plMtlCollector.cpp @@ -39,7 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include + +#include "MaxMain/plMaxNodeBase.h" +#include +#pragma hdrstop + #include "plMtlCollector.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" @@ -51,11 +58,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxPlasmaMtls/Materials/plPassMtl.h" #include "MaxPlasmaMtls/Materials/plClothingMtl.h" +#include "MaxComponent/plMiscComponents.h" #include "MaxComponent/plGUIComponents.h" #include "MaxComponent/pfGUISkinComp.h" -#include "MaxComponent/plMiscComponents.h" -#include "MaxMain/plMaxNodeBase.h" static bool IsPlasmaMtl(Mtl *mtl) { diff --git a/Sources/Tools/MaxMain/plMtlCollector.h b/Sources/Tools/MaxMain/plMtlCollector.h index 6da10b89..840a2c5e 100644 --- a/Sources/Tools/MaxMain/plMtlCollector.h +++ b/Sources/Tools/MaxMain/plMtlCollector.h @@ -42,14 +42,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMtlCollector_h_inc #define plMtlCollector_h_inc -#include "HeadSpin.h" -#include -#include "hsSTLSortUtils.h" +#include "hsStlSortUtils.h" +class PBBitmap; class Mtl; -class Texmap; class plPlasmaMAXLayer; -class PBBitmap; +class stringISorter; +class Texmap; typedef std::set MtlSet; typedef std::set TexSet; diff --git a/Sources/Tools/MaxMain/plNodeLock.cpp b/Sources/Tools/MaxMain/plNodeLock.cpp index da41e696..a7b82d40 100644 --- a/Sources/Tools/MaxMain/plNodeLock.cpp +++ b/Sources/Tools/MaxMain/plNodeLock.cpp @@ -39,9 +39,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsWindows.h" -#include "max.h" +#include +#pragma hdrstop #include "plNodeLock.h" diff --git a/Sources/Tools/MaxMain/plPhysXCooking.cpp b/Sources/Tools/MaxMain/plPhysXCooking.cpp index 94f0aa3d..874fbfbd 100644 --- a/Sources/Tools/MaxMain/plPhysXCooking.cpp +++ b/Sources/Tools/MaxMain/plPhysXCooking.cpp @@ -39,20 +39,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "plPhysXCooking.h" + +#include "HeadSpin.h" #include "hsGeometry3.h" +#include "hsMatrix44.h" +#include "hsSTLStream.h" +#pragma hdrstop + +#include +#include +#include +#include +#include +#include +#include + +#include "plMaxMeshExtractor.h" + +#include "plPhysXCooking.h" #include "plPhysX/plSimulationMgr.h" #include "plPhysX/plPXStream.h" #include "plPhysX/plPXConvert.h" -#include "hsSTLStream.h" -#include "Nx.h" -#include "NxStream.h" -#include "NxPhysics.h" -#include "NxCooking.h" -#include "NxPlane.h" -#include "NxUtilLib.h" -#include "NxMat33.h" bool plPhysXCooking::fSkipErrors = false; NxUtilLib* plPhysXCooking::fUtilLib =nil; diff --git a/Sources/Tools/MaxMain/plPhysXCooking.h b/Sources/Tools/MaxMain/plPhysXCooking.h index 3e4cc5d7..bbabb486 100644 --- a/Sources/Tools/MaxMain/plPhysXCooking.h +++ b/Sources/Tools/MaxMain/plPhysXCooking.h @@ -42,15 +42,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPhysXCooking_h_inc #define plPhysXCooking_h_inc -#include "HeadSpin.h" -#include "hsGeometry3.h" -#include "plMaxMeshExtractor.h" -class hsStream; -class hsVectorStream; class NxConvexMesh; +struct hsPlane3; +struct hsPoint3; +class hsStream; +class NxMat33; class NxUtilLib; class NxVec3; -class NxMat33; +class hsVectorStream; class plPhysXCooking { diff --git a/Sources/Tools/MaxMain/plPhysicalProps.cpp b/Sources/Tools/MaxMain/plPhysicalProps.cpp index 7c9147e0..7ac98ccd 100644 --- a/Sources/Tools/MaxMain/plPhysicalProps.cpp +++ b/Sources/Tools/MaxMain/plPhysicalProps.cpp @@ -39,13 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "plMaxNode.h" +#pragma hdrstop + #include "plPhysicalProps.h" #include "plPhysical/plSimDefs.h" // For plBoundsType #include "pnSceneObject/plSimulationInterface.h" -#include "plMaxNode.h" + #include "MaxExport/plErrorMsg.h" /** These enums are used to indicate which parameters are ignorable and can diff --git a/Sources/Tools/MaxMain/plPhysicalProps.h b/Sources/Tools/MaxMain/plPhysicalProps.h index 7d70b149..75ba90f3 100644 --- a/Sources/Tools/MaxMain/plPhysicalProps.h +++ b/Sources/Tools/MaxMain/plPhysicalProps.h @@ -42,11 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPhysicalProps_h_inc #define plPhysicalProps_h_inc -#include "HeadSpin.h" -#include "..\..\NucleusLib\pnKeyedObject\plKey.h" - -class plMaxNode; class plErrorMsg; +class plMaxNode; class plPhysicalProps { diff --git a/Sources/Tools/MaxMain/plPluginResManager.cpp b/Sources/Tools/MaxMain/plPluginResManager.cpp index 2db1630e..70d2e923 100644 --- a/Sources/Tools/MaxMain/plPluginResManager.cpp +++ b/Sources/Tools/MaxMain/plPluginResManager.cpp @@ -40,22 +40,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plPluginResManager.h" -#include "HeadSpin.h" +#include "plgDispatch.h" +#include "pnKeyedObject/plKey.h" #include "hsTemplates.h" +#pragma hdrstop + +// For our common object libs +#include "plCommonObjLib.h" +#include "MaxComponent/plMiscComponents.h" + +#include "plPluginResManager.h" #include "plResMgr/plRegistryNode.h" #include "plResMgr/plRegistryHelpers.h" #include "plResMgr/plVersion.h" #include "plResMgr/plResMgrSettings.h" #include "plScene/plSceneNode.h" -#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKeyImp.h" #include "plAgeDescription/plAgeDescription.h" -#include "plgDispatch.h" - -// For our common object libs -#include "plCommonObjLib.h" -#include "MaxComponent/plMiscComponents.h" plKey plPluginResManager::NameToLoc(const char* age, const char* page, int32_t sequenceNumber, bool itinerant) { diff --git a/Sources/Tools/MaxMain/plPluginResManager.h b/Sources/Tools/MaxMain/plPluginResManager.h index d295e872..392b4c03 100644 --- a/Sources/Tools/MaxMain/plPluginResManager.h +++ b/Sources/Tools/MaxMain/plPluginResManager.h @@ -42,10 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPluginResManager_h_inc #define plPluginResManager_h_inc +#include "hsResMgr.h" #include "plResMgr/plResManager.h" -#include "pnKeyedObject/plKey.h" -#include "hsTemplates.h" +class plKey; +class plLocation; class plPageInfo; class plRegistryPageNode; class plSceneNode; diff --git a/Sources/Tools/MaxMain/plPythonMgr.cpp b/Sources/Tools/MaxMain/plPythonMgr.cpp index 88dbf883..aeb2c4c0 100644 --- a/Sources/Tools/MaxMain/plPythonMgr.cpp +++ b/Sources/Tools/MaxMain/plPythonMgr.cpp @@ -40,17 +40,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plPythonMgr.h" +#include "hsFiles.h" +#include "plgDispatch.h" +#include "hsWindows.h" -#include "MaxComponent/plAutoUIBlock.h" -//#include "Python.h" +#include +#include +#include + +#include +#include +#pragma hdrstop + +#include "plPythonMgr.h" #include "plMaxCFGFile.h" -#include "hsFiles.h" -#include "plgDispatch.h" +#include "MaxComponent/plAutoUIBlock.h" +#include "MaxComponent/plPythonFileComponent.h" +#include "MaxComponent/plResponderComponent.h" #include "pfPython/cyPythonInterface.h" - plPythonMgr::plPythonMgr() { } @@ -127,10 +136,6 @@ bool ICallStrFunc(PyObject *dict, char *funcName, char*& val) return false; } - -#include "MaxComponent/plPythonFileComponent.h" - - enum ParamTypes { // These numbers used in the python/plasma/glue.py code @@ -565,8 +570,6 @@ void plPythonMgr::IAddGUISkin(plAutoUIBlock *autoUI, PyObject *tuple, char *para autoUI->AddPickGUISkinButton(id, nil, paramName, vid, vstates); } -#include "MaxComponent/plResponderComponent.h" - void plPythonMgr::IAddResponder(plAutoUIBlock *autoUI, PyObject *tuple, char *paramName, int id, int vid, std::vector* vstates) { std::vector cids; diff --git a/Sources/Tools/MaxMain/plPythonMgr.h b/Sources/Tools/MaxMain/plPythonMgr.h index a2e687f0..3b0a9fbb 100644 --- a/Sources/Tools/MaxMain/plPythonMgr.h +++ b/Sources/Tools/MaxMain/plPythonMgr.h @@ -39,11 +39,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" -#include "python.h" -#include class plAutoUIBlock; +typedef struct _object PyObject; class plPythonMgr { diff --git a/Sources/Tools/MaxMain/plResCollector.cpp b/Sources/Tools/MaxMain/plResCollector.cpp index 754f7836..2e2e93e3 100644 --- a/Sources/Tools/MaxMain/plResCollector.cpp +++ b/Sources/Tools/MaxMain/plResCollector.cpp @@ -39,10 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" +#include "hsWindows.h" + +#include + +#include +#pragma hdrstop + #include "plResCollector.h" #include "plMtlCollector.h" -#include "max.h" #include "MaxExport/plExportProgressBar.h" void plResCollector::Collect() diff --git a/Sources/Tools/MaxMain/plResetXform.cpp b/Sources/Tools/MaxMain/plResetXform.cpp index 34cfdeb9..01a8f6e4 100644 --- a/Sources/Tools/MaxMain/plResetXform.cpp +++ b/Sources/Tools/MaxMain/plResetXform.cpp @@ -39,14 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "HeadSpin.h" - -#include "max.h" -#include "plResetXform.h" +#include "HeadSpin.h" +#include "pnKeyedObject/plKey.h" #include "MaxMain/plMaxNode.h" #include "MaxComponent/plComponent.h" +#pragma hdrstop + +#include "plResetXform.h" void plResetXform::ResetSelected() const diff --git a/Sources/Tools/MaxMain/plResetXform.h b/Sources/Tools/MaxMain/plResetXform.h index 9cb921ac..8586f41a 100644 --- a/Sources/Tools/MaxMain/plResetXform.h +++ b/Sources/Tools/MaxMain/plResetXform.h @@ -44,11 +44,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define plResetXform_inc class Interface; -class INode; -class TriObject; - class plMaxNode; +class INode; class INodeTab; +class TriObject; class plResetXform { diff --git a/Sources/Tools/MaxMain/plSaveSelected.cpp b/Sources/Tools/MaxMain/plSaveSelected.cpp index 3dcfe93c..dbafd8eb 100644 --- a/Sources/Tools/MaxMain/plSaveSelected.cpp +++ b/Sources/Tools/MaxMain/plSaveSelected.cpp @@ -39,13 +39,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -#include "notify.h" + #include "MaxComponent/plComponent.h" -#include #include "plMaxNode.h" +#include +#include +#include +#include +#include +#pragma hdrstop + + + bool IIsNodeInTab(INodeTab &tab, INode *node) { for (int i = 0; i < tab.Count(); i++) diff --git a/Sources/Tools/MaxMain/plTextureExportLog.cpp b/Sources/Tools/MaxMain/plTextureExportLog.cpp index f217c944..c4f30092 100644 --- a/Sources/Tools/MaxMain/plTextureExportLog.cpp +++ b/Sources/Tools/MaxMain/plTextureExportLog.cpp @@ -49,7 +49,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "HeadSpin.h" +#include "pnKeyedObject/plKey.h" +#include "hsStream.h" +#pragma hdrstop #include "plTextureExportLog.h" #include "plGImage/plCubicEnvironmap.h" @@ -57,9 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plGImage/plDynamicTextMap.h" #include "plPipeline/plRenderTarget.h" #include "plPipeline/plCubicRenderTarget.h" -#include "pnKeyedObject/plKey.h" - -#include "hsStream.h" //// Constructor/Destructor ////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxMain/plTextureSearch.cpp b/Sources/Tools/MaxMain/plTextureSearch.cpp index ee8d4424..27c32b85 100644 --- a/Sources/Tools/MaxMain/plTextureSearch.cpp +++ b/Sources/Tools/MaxMain/plTextureSearch.cpp @@ -39,28 +39,35 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plTextureSearch.h" +#include "hsWindows.h" + #include "resource.h" +#include +#include +#include +#include +#include +#pragma hdrstop -#define PB2Export __declspec( dllexport ) // Because I don't feel like including all the paramblock crap -#include "pbbitmap.h" -#include "bmmlib.h" -#include "IMtlEdit.h" +#include "plTextureSearch.h" #include "plMtlCollector.h" #include "plMaxAccelerators.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" -#ifdef MAXASS_AVAILABLE -#include "../../AssetMan/PublicInterface/MaxAssInterface.h" -#endif -// Not a class member so we don't have to make everyone who uses this know about AssetMan #ifdef MAXASS_AVAILABLE -static jvUniqueId gAssetID; +# include "../../AssetMan/PublicInterface/MaxAssInterface.h" + + // Not a class member so we don't have to make everyone who uses this know about AssetMan + static jvUniqueId gAssetID; #endif +// Avoids including all the component stuff +#define PB2Export __declspec( dllexport ) + plTextureSearch::plTextureSearch() : fDlg(NULL) { #ifdef MAXASS_AVAILABLE diff --git a/Sources/Tools/MaxMain/plTextureSearch.h b/Sources/Tools/MaxMain/plTextureSearch.h index 0a1ed7a3..01cda5bb 100644 --- a/Sources/Tools/MaxMain/plTextureSearch.h +++ b/Sources/Tools/MaxMain/plTextureSearch.h @@ -39,7 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "max.h" class plTextureSearch { From fa950cd846b174fab6a4f8f1e759eddf67b28c7f Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 12 Dec 2012 19:42:01 -0500 Subject: [PATCH 11/13] Fix MaxPlasmaLights The usual--make it compile and add a precompiled header. Also, removed a few (unused) files of questionable licensing. Check some of the removed commented out code--it has comments from 1996! --- Sources/Tools/MaxPlasmaLights/CMakeLists.txt | 5 +- Sources/Tools/MaxPlasmaLights/DLLEntry.cpp | 10 +- Sources/Tools/MaxPlasmaLights/Pch.cpp | 51 +++ Sources/Tools/MaxPlasmaLights/Pch.h | 69 ++++ .../plRTLightBaseAnimDlgProc.h | 86 ----- .../MaxPlasmaLights/plRTLightBaseAnimPBDec.h | 84 ---- .../Tools/MaxPlasmaLights/plRTObjLightDesc.h | 4 +- .../MaxPlasmaLights/plRTProjDirLight.cpp | 5 +- .../Tools/MaxPlasmaLights/plRTProjDirLight.h | 6 +- .../plRTProjDirLightClassDesc.h | 2 - .../MaxPlasmaLights/plRealTimeLightBase.cpp | 362 +----------------- .../MaxPlasmaLights/plRealTimeLightBase.h | 19 +- .../MaxPlasmaLights/plRealTimeLights.cpp | 9 +- .../Tools/MaxPlasmaLights/plRealTimeLights.h | 1 - Sources/Tools/MaxPlasmaLights/prim.h | 120 ------ Sources/Tools/MaxPlasmaLights/target.h | 124 ------ 16 files changed, 152 insertions(+), 805 deletions(-) create mode 100644 Sources/Tools/MaxPlasmaLights/Pch.cpp create mode 100644 Sources/Tools/MaxPlasmaLights/Pch.h delete mode 100644 Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimDlgProc.h delete mode 100644 Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimPBDec.h delete mode 100644 Sources/Tools/MaxPlasmaLights/prim.h delete mode 100644 Sources/Tools/MaxPlasmaLights/target.h diff --git a/Sources/Tools/MaxPlasmaLights/CMakeLists.txt b/Sources/Tools/MaxPlasmaLights/CMakeLists.txt index bc2c5a08..d9a86b9c 100644 --- a/Sources/Tools/MaxPlasmaLights/CMakeLists.txt +++ b/Sources/Tools/MaxPlasmaLights/CMakeLists.txt @@ -10,15 +10,11 @@ set(MaxPlasmaLights_HEADERS plRealTimeLightBase.h plRealTimeLights.h plRealTimeLightsPBDec.h - plRTLightBaseAnimDlgProc.h - plRTLightBaseAnimPBDec.h plRTObjLightDesc.h plRTPlasmaLights.def plRTProjDirLight.h plRTProjDirLightClassDesc.h plRTProjDirLightPBDec.h - prim.h - target.h ) set(MaxPlasmaLights_RESOURCES @@ -35,6 +31,7 @@ set(MaxPlasmaLights_SOURCES ) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plasma_BINARY_DIR}/bin) +use_precompiled_header(Pch.h Pch.cpp MaxPlasmaLights_HEADERS MaxPlasmaLights_SOURCES) add_library(MaxPlasmaLights SHARED ${MaxPlasmaLights_HEADERS} ${MaxPlasmaLights_RESOURCES} ${MaxPlasmaLights_SOURCES}) set_target_properties(MaxPlasmaLights PROPERTIES SUFFIX ".dlo") diff --git a/Sources/Tools/MaxPlasmaLights/DLLEntry.cpp b/Sources/Tools/MaxPlasmaLights/DLLEntry.cpp index 6643b08d..741b77e3 100644 --- a/Sources/Tools/MaxPlasmaLights/DLLEntry.cpp +++ b/Sources/Tools/MaxPlasmaLights/DLLEntry.cpp @@ -39,18 +39,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "plRealTimeLightBase.h" + #include "plRealTimeLights.h" -#include "plRTProjDirLightClassDesc.h" +#include "MaxMain/MaxCompat.h" +#pragma hdrstop #include "pnMessage/pnMessageCreatable.h" #include "pnKeyedObject/pnKeyedObjectCreatable.h" #include "pnNetCommon/pnNetCommonCreatable.h" -#include "MaxMain/MaxCompat.h" - +#include "plRTProjDirLightClassDesc.h" #include "plSurface/plLayerInterface.h" + REGISTER_NONCREATABLE( plLayerInterface ); diff --git a/Sources/Tools/MaxPlasmaLights/Pch.cpp b/Sources/Tools/MaxPlasmaLights/Pch.cpp new file mode 100644 index 00000000..52b0cac9 --- /dev/null +++ b/Sources/Tools/MaxPlasmaLights/Pch.cpp @@ -0,0 +1,51 @@ +/*==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 . + +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==*/ + +#include "Pch.h" + +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxPlasmaLights + * + * This file prompts MSVC to generate a PCH file for the MaxPlasmaLights project. It + * has no function if precompiled headers are disabled in cmake. + */ diff --git a/Sources/Tools/MaxPlasmaLights/Pch.h b/Sources/Tools/MaxPlasmaLights/Pch.h new file mode 100644 index 00000000..62fb1039 --- /dev/null +++ b/Sources/Tools/MaxPlasmaLights/Pch.h @@ -0,0 +1,69 @@ +/*==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 . + +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 _MaxPlasmaLights_Pch_inc_ +#define _MaxPlasmaLights_Pch_inc_ + +/** + * \file Pch.h + * \brief Precompiled Header for MaxPlasmaLights + */ + +// Core Plasma +#include "HeadSpin.h" + +// Windows +#include "hsWindows.h" + +// Base MaxPlasmaLights stuff... +#include "plRealTimeLightBase.h" +#include "plRealTimeLights.h" + +// Max SDK +#include +#include + +// Utility +#include "MaxMain/MaxCompat.h" +#include "resource.h" + +#endif // _MaxPlasmaLights_Pch_inc_ \ No newline at end of file diff --git a/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimDlgProc.h b/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimDlgProc.h deleted file mode 100644 index b2558113..00000000 --- a/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimDlgProc.h +++ /dev/null @@ -1,86 +0,0 @@ -/*==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 . - -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==*/ -/////////////////////////////////////////////////////////////////////////////// -// // -// Animation Rollout Dialog Proc Class Definition // -// Cyan, Inc. // -// // -//// Version History ////////////////////////////////////////////////////////// -// // -// 8.6.2001 mcn - Created. // -// // -/////////////////////////////////////////////////////////////////////////////// - -#if 0//ndef _plRTLightBaseAnimDlgProc_h -#define _plRTLightBaseAnimDlgProc_h - -#include "plNotetrackDlg.h" - -/////////////////////////////////////////////////////////////////////////////// -//// Dialog Proc for Animation Rollout //////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -class plRTLightBaseAnimDlgProc : public ParamMap2UserDlgProc -{ - protected: - plNoteTrackDlg fNoteTrackDlg; - - HWND fhWnd; - - static plRTLightBaseAnimDlgProc fInstance; - static const char *kDecalNameNone; - - public: - BOOL DlgProc( TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); - void DeleteThis() { fNoteTrackDlg.DeleteCache(); } - void SetThing( ReferenceTarget *m ); - - static plRTLightBaseAnimDlgProc *Instance() { return &fInstance; } - - protected: - void IInitControls( Animatable *anim, IParamBlock2 *pb ); - -}; - - -#endif //_plRTLightBaseAnimDlgProc_h - diff --git a/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimPBDec.h b/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimPBDec.h deleted file mode 100644 index 2bdd1e66..00000000 --- a/Sources/Tools/MaxPlasmaLights/plRTLightBaseAnimPBDec.h +++ /dev/null @@ -1,84 +0,0 @@ -/*==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 . - -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==*/ -/////////////////////////////////////////////////////////////////////////////// -// // -// Animation Rollout ParamBlock for Runtime Lights // -// Cyan, Inc. // -// // -//// Version History ////////////////////////////////////////////////////////// -// // -// 8.3.2001 mcn - Created. // -// // -/////////////////////////////////////////////////////////////////////////////// - -#if 0//ndef _plRTLightBaseAnimPB_h -#define _plRTLightBaseAnimPB_h - -/////////////////////////////////////////////////////////////////////////////// -//// Animation Rollout ParamBlock ///////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -ParamBlockDesc2 plRTLightBaseAnimPB -( - plRTLightBase::kBlkAnim, _T("anim"), IDS_LIGHT_ANIM, nil, // To be added manually - P_AUTO_CONSTRUCT + P_AUTO_UI, plRTLightBase::kRefAnimParams, - - // UI - IDD_LIGHT_ANIM, IDS_LIGHT_ANIM, 0, APPENDROLL_CLOSED, plRTLightBaseAnimDlgProc::Instance(), - - plRTLightBase::kAnimName, _T("animName"), TYPE_STRING, 0, 0, - end, - - plRTLightBase::kAnimAutoStart, _T("autoStart"), TYPE_BOOL, 0, 0, - end, - - plRTLightBase::kAnimLoop, _T("loop"), TYPE_BOOL, 0, 0, - end, - plRTLightBase::kAnimLoopName, _T("loopName"), TYPE_STRING, 0, 0, - end, - - end -); - - -#endif //_plRTLightBaseAnimPB_h - diff --git a/Sources/Tools/MaxPlasmaLights/plRTObjLightDesc.h b/Sources/Tools/MaxPlasmaLights/plRTObjLightDesc.h index bcc3bc3a..104555e4 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTObjLightDesc.h +++ b/Sources/Tools/MaxPlasmaLights/plRTObjLightDesc.h @@ -53,9 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plRTObjLightDesc_h #define _plRTObjLightDesc_h -#include "plRealTimeLightBase.h" -#include "resource.h" - +class plRTLightBase; class plMaxNode; //// AttenRanges Class //////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp index 01b26bd4..dc0d6a08 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp @@ -51,14 +51,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com /////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "plRealTimeLights.h" +#pragma hdrstop + #include "plRTProjDirLight.h" #include "plRTProjDirLightClassDesc.h" -#include "iparamm2.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h" #include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h" #include "MaxComponent/plMaxAnimUtils.h" #include "plRTObjLightDesc.h" -#include "plRTLightBaseAnimDlgProc.h" //// Static ClassDesc2 Get Functions ////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h index 52cbd8f3..a84ae4e6 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h @@ -54,8 +54,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plRTProjDirLight_h #define _plRTProjDirLight_h -#include "plRealTimeLightBase.h" -#include "iparamm2.h" +class Class_ID; +class IParamBlock2; +struct PB2Value; +class ReferenceMaker; /////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h b/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h index 1aea4a15..aa791ac9 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h @@ -55,8 +55,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _plRTProjDirLightClassDesc_h #include "plRTProjDirLight.h" -#include "iparamm2.h" -#include "resource.h" class plRTProjDirLightDesc : public ClassDesc2 { diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp index 9c268a5c..5b335be5 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp @@ -39,13 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" + #include "plRealTimeLightBase.h" -#include "iparamm2.h" #include "resource.h" -#include "decomp.h" -#include "hsv.h" -#include "target.h" + +#include +#include +#pragma hdrstop + #include "MaxPlasmaMtls/Layers/plLayerTex.h" #include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h" @@ -1750,354 +1753,3 @@ void plRTLightBase::UpdateTargDistance(TimeValue t, INode* inode) } } - - - - -/// -// -// -// Target Creation for Targeted Lights... -// -// -// - - -#if 0 -class TSpotCreationManager : public MouseCallBack, ReferenceMaker -{ -private: - CreateMouseCallBack *createCB; - INode *lgtNode,*targNode; - plRTLightBase *lgtObject; - TargetObject *targObject; - int attachedToNode; - IObjCreate *createInterface; - ClassDesc *cDesc; - Matrix3 mat; // the nodes TM relative to the CP - IPoint2 pt0; - int ignoreSelectionChange; - int lastPutCount; - - void CreateNewObject(); - - int NumRefs() { return 1; } - RefTargetHandle GetReference(int i) { return (RefTargetHandle)lgtNode; } - void SetReference(int i, RefTargetHandle rtarg) { lgtNode = (INode *)rtarg; } - - // StdNotifyRefChanged calls this, which can change the partID to new value - // If it doesnt depend on the particular message& partID, it should return - // REF_DONTCARE - RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, - PartID& partID, RefMessage message); - -public: - void Begin( IObjCreate *ioc, ClassDesc *desc ); - void End(); - - TSpotCreationManager() { ignoreSelectionChange = FALSE; } - int proc( HWND hwnd, int msg, int point, int flag, IPoint2 m ); - BOOL SupportAutoGrid(){return TRUE;} -}; - - -#define CID_TSPOTCREATE CID_USER + 3 - -class TSpotCreateMode : public CommandMode { - TSpotCreationManager proc; -public: - void Begin( IObjCreate *ioc, ClassDesc *desc ) { proc.Begin( ioc, desc ); } - void End() { proc.End(); } - - int Class() { return CREATE_COMMAND; } - int ID() { return CID_TSPOTCREATE; } - MouseCallBack *MouseProc(int *numPoints) { *numPoints = 1000000; return &proc; } - ChangeForegroundCallback *ChangeFGProc() { return CHANGE_FG_SELECTED; } - BOOL ChangeFG( CommandMode *oldMode ) { return (oldMode->ChangeFGProc() != CHANGE_FG_SELECTED); } - void EnterMode() { - } - void ExitMode() { - } - BOOL IsSticky() { return FALSE; } -}; - -static TSpotCreateMode theTSpotCreateMode; - -#endif - -#if 0 -void TSpotCreationManager::Begin( IObjCreate *ioc, ClassDesc *desc ) -{ - createInterface = ioc; - cDesc = desc; - attachedToNode = FALSE; - createCB = NULL; - lgtNode = NULL; - targNode = NULL; - lgtObject = NULL; - targObject = NULL; - CreateNewObject(); -} - -void TSpotCreationManager::End() -{ - if ( lgtObject ) { - lgtObject->EndEditParams( (IObjParam*)createInterface, END_EDIT_REMOVEUI, NULL); - if ( !attachedToNode ) { - // RB 4-9-96: Normally the hold isn't holding when this - // happens, but it can be in certain situations (like a track view paste) - // Things get confused if it ends up with undo... - theHold.Suspend(); - //delete lgtObject; - lgtObject->DeleteThis(); // JBW 11.1.99, this allows scripted plugin lights to delete cleanly - lgtObject = NULL; - theHold.Resume(); - // RB 7/28/97: If something has been put on the undo stack since this object was created, we have to flush the undo stack. - if (theHold.GetGlobalPutCount()!=lastPutCount) { - GetSystemSetting(SYSSET_CLEAR_UNDO); - } - macroRec->Cancel(); // JBW 4/23/99 - } - else if ( lgtNode ) { - // Get rid of the reference. - DeleteReference(0); // sets lgtNode = NULL - } - } -} - -RefResult TSpotCreationManager::NotifyRefChanged( - Interval changeInt, - RefTargetHandle hTarget, - PartID& partID, - RefMessage message) -{ - switch (message) { - - case REFMSG_PRENOTIFY_PASTE: - case REFMSG_TARGET_SELECTIONCHANGE: - if ( ignoreSelectionChange ) { - break; - } - if (lgtObject && lgtNode==hTarget) { - // this will set camNode== NULL; - DeleteReference(0); - goto endEdit; - } - // fall through - - case REFMSG_TARGET_DELETED: - if ( lgtObject && lgtNode==hTarget ) { - endEdit: - lgtObject->EndEditParams( (IObjParam*)createInterface, 0, NULL); - lgtObject = NULL; - lgtNode = NULL; - CreateNewObject(); - attachedToNode = FALSE; - } - else if (targNode==hTarget) { - targNode = NULL; - targObject = NULL; - } - break; - } - return REF_SUCCEED; -} - - -void TSpotCreationManager::CreateNewObject() -{ - lgtObject = (plRTLightBase *)cDesc->Create(); - lastPutCount = theHold.GetGlobalPutCount(); - - macroRec->BeginCreate(cDesc); // JBW 4/23/99 - - // Start the edit params process - if ( lgtObject ) { - lgtObject->BeginEditParams( (IObjParam*)createInterface, BEGIN_EDIT_CREATE, NULL ); - } -} - -static void whoa(){}; - -static BOOL needToss; - -int TSpotCreationManager::proc( - HWND hwnd, - int msg, - int point, - int flag, - IPoint2 m ) -{ - int res; - TSTR targName; - ViewExp *vpx = createInterface->GetViewport(hwnd); - assert( vpx ); - - switch ( msg ) { - case MOUSE_POINT: - switch ( point ) { - case 0: - pt0 = m; - assert( lgtObject ); - vpx->CommitImplicitGrid(m, flag); //KENNY MERGE - if ( createInterface->SetActiveViewport(hwnd) ) { - return FALSE; - } - - if (createInterface->IsCPEdgeOnInView()) { - res = FALSE; - goto done; - } - - // if lights were hidden by category, re-display them - GetCOREInterface()->SetHideByCategoryFlags( - GetCOREInterface()->GetHideByCategoryFlags() & ~HIDE_LIGHTS); - - if ( attachedToNode ) { - // send this one on its way - lgtObject->EndEditParams( (IObjParam*)createInterface, 0, NULL); - macroRec->EmitScript(); // JBW 4/23/99 - - // Get rid of the reference. - if (lgtNode) - DeleteReference(0); - - // new object - CreateNewObject(); // creates lgtObject - } - - needToss = theHold.GetGlobalPutCount()!=lastPutCount; - - theHold.Begin(); // begin hold for undo - mat.IdentityMatrix(); - - // link it up - lgtNode = createInterface->CreateObjectNode( lgtObject); - attachedToNode = TRUE; - assert( lgtNode ); - createCB = lgtObject->GetCreateMouseCallBack(); - createInterface->SelectNode( lgtNode ); - - // Create target object and node - targObject = new TargetObject; - assert(targObject); - targNode = createInterface->CreateObjectNode( targObject); - assert(targNode); - targName = lgtNode->GetName(); - targName += GetString(IDS_DB_DOT_TARGET); - targNode->SetName(targName); - - // hook up camera to target using lookat controller. - createInterface->BindToTarget(lgtNode,targNode); - - // Reference the new node so we'll get notifications. - MakeRefByID( FOREVER, 0, lgtNode); - - // Position camera and target at first point then drag. - mat.IdentityMatrix(); - //mat[3] = vpx->GetPointOnCP(m); - #ifdef _3D_CREATE - mat.SetTrans( vpx->SnapPoint(m,m,NULL,SNAP_IN_3D) ); - #else - mat.SetTrans(vpx->SnapPoint(m,m,NULL,SNAP_IN_PLANE)); - #endif - createInterface->SetNodeTMRelConstPlane(lgtNode, mat); - createInterface->SetNodeTMRelConstPlane(targNode, mat); - lgtObject->Enable(1); - - ignoreSelectionChange = TRUE; - createInterface->SelectNode( targNode,0); - ignoreSelectionChange = FALSE; - res = TRUE; - break; - - case 1: - if (Length(m-pt0)<2) - goto abort; - //mat[3] = vpx->GetPointOnCP(m); - #ifdef _3D_CREATE - mat.SetTrans( vpx->SnapPoint(m,m,NULL,SNAP_IN_3D) ); - #else - mat.SetTrans(vpx->SnapPoint(m,m,NULL,SNAP_IN_PLANE)); - #endif - macroRec->Disable(); // JBW 4/23/99 - createInterface->SetNodeTMRelConstPlane(targNode, mat); - macroRec->Enable(); - - ignoreSelectionChange = TRUE; - createInterface->SelectNode( lgtNode); - ignoreSelectionChange = FALSE; - - theHold.Accept(IDS_DS_CREATE); - - createInterface->AddLightToScene(lgtNode); - createInterface->RedrawViews(createInterface->GetTime()); - - res = FALSE; // We're done - break; - } - break; - - case MOUSE_MOVE: - //mat[3] = vpx->GetPointOnCP(m); - #ifdef _3D_CREATE - mat.SetTrans( vpx->SnapPoint(m,m,NULL,SNAP_IN_3D) ); - #else - mat.SetTrans(vpx->SnapPoint(m,m,NULL,SNAP_IN_PLANE)); - #endif - macroRec->Disable(); // JBW 4/23/99 - createInterface->SetNodeTMRelConstPlane(targNode, mat); - macroRec->Enable(); - createInterface->RedrawViews(createInterface->GetTime()); - - macroRec->SetProperty(lgtObject, _T("target"), // JBW 4/23/99 - mr_create, Class_ID(TARGET_CLASS_ID, 0), GEOMOBJECT_CLASS_ID, 1, _T("transform"), mr_matrix3, &mat); - - res = TRUE; - break; - - case MOUSE_FREEMOVE: - SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CROSS_HAIR))); - #ifdef _OSNAP - //Snap Preview - #ifdef _3D_CREATE - vpx->SnapPreview(m,m,NULL, SNAP_IN_3D); - #else - vpx->SnapPreview(m,m,NULL, SNAP_IN_PLANE); - #endif - #endif - vpx->TrackImplicitGrid(m); //KENNY MERGE - break; - - case MOUSE_PROPCLICK: - // right click while between creations - createInterface->RemoveMode(NULL); - break; - - case MOUSE_ABORT: - abort: - assert( lgtObject ); - lgtObject->EndEditParams( (IObjParam*)createInterface,0,NULL); - // Toss the undo stack if param changes have been made - macroRec->Cancel(); // JBW 4/23/99 - theHold.Cancel(); // deletes both the camera and target. - if (needToss) - GetSystemSetting(SYSSET_CLEAR_UNDO); - lgtNode = NULL; - targNode = NULL; - createInterface->RedrawViews(createInterface->GetTime()); - CreateNewObject(); - attachedToNode = FALSE; - res = FALSE; - } - -done: - //KENNY MERGE - if ((res == CREATE_STOP)||(res==CREATE_ABORT)) - vpx->ReleaseImplicitGrid(); - createInterface->ReleaseViewport(vpx); - return res; -} - - -#endif diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h index f5c62d6c..6585ab72 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h @@ -42,21 +42,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_RTLIGHT_BASE_H #define PL_RTLIGHT_BASE_H -// Max related headers -#include "max.h" -#include "iparamb2.h" -#include "iparamm2.h" - // Our generic headers #include "HeadSpin.h" -#include "MaxPlasmaMtls/Layers/plLayerTex.h" +#include "hsWindows.h" + +// Max related headers +#include +#include #include "MaxMain/MaxCompat.h" extern TCHAR *GetString(int id); - - - extern HINSTANCE hInstance; #define RTOMNI_LIGHT_CLASSID Class_ID(0x57cf7089, 0x282e5b71) @@ -87,16 +83,15 @@ extern HINSTANCE hInstance; inline float MaxF(float a, float b) { return a>b?a:b; } inline float MinF(float a, float b) { return a. - -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==*/ -/********************************************************************** - *< - FILE: prim.h - - DESCRIPTION: - - CREATED BY: Dan Silva - - HISTORY: - - *> Copyright (c) 1994, All Rights Reserved. - **********************************************************************/ - -#ifndef __PRIM__H -#define __PRIM__H - -#include "Max.h" -#include "resource.h" - -#ifdef DESIGN_VER //for conversion to amodeler solids -#include "igeomimp.h" -#include "plugapi.h" -#endif - -TCHAR *GetString(int id); - -extern ClassDesc* GetBoxobjDesc(); -extern ClassDesc* GetSphereDesc(); -extern ClassDesc* GetCylinderDesc(); -extern ClassDesc* GetSimpleCamDesc(); -extern ClassDesc* GetOmniLightDesc(); -extern ClassDesc* GetDirLightDesc(); -extern ClassDesc *GetTDirLightDesc(); -extern ClassDesc* GetFSpotLightDesc(); -extern ClassDesc* GetTSpotLightDesc(); -extern ClassDesc* GetLookatCamDesc(); -extern ClassDesc* GetSplineDesc(); -#ifdef DESIGN_VER -extern ClassDesc* GetOrthoSplineDesc(); -#endif -extern ClassDesc* GetNGonDesc(); -extern ClassDesc* GetDonutDesc(); -extern ClassDesc* GetTargetObjDesc(); -extern ClassDesc* GetBonesDesc(); -extern ClassDesc* GetRingMasterDesc(); -extern ClassDesc* GetSlaveControlDesc(); -extern ClassDesc* GetQuadPatchDesc(); -extern ClassDesc* GetTriPatchDesc(); -extern ClassDesc* GetTorusDesc(); -extern ClassDesc* GetMorphObjDesc(); -extern ClassDesc* GetCubicMorphContDesc(); -extern ClassDesc* GetRectangleDesc(); -extern ClassDesc* GetBoolObjDesc(); -extern ClassDesc* GetTapeHelpDesc(); -extern ClassDesc* GetProtHelpDesc(); -extern ClassDesc* GetTubeDesc(); -extern ClassDesc* GetConeDesc(); -extern ClassDesc* GetHedraDesc(); -extern ClassDesc* GetCircleDesc(); -extern ClassDesc* GetEllipseDesc(); -extern ClassDesc* GetArcDesc(); -extern ClassDesc* GetStarDesc(); -extern ClassDesc* GetHelixDesc(); -extern ClassDesc* GetRainDesc(); -extern ClassDesc* GetSnowDesc(); -extern ClassDesc* GetTextDesc(); -extern ClassDesc* GetTeapotDesc(); -extern ClassDesc* GetBaryMorphContDesc(); -#ifdef DESIGN_VER -extern ClassDesc* GetOrthoSplineDesc(); -extern ClassDesc* GetParallelCamDesc(); -#endif -extern ClassDesc* GetGridobjDesc(); -extern ClassDesc* GetNewBonesDesc(); - -extern HINSTANCE hInstance; - - -#endif diff --git a/Sources/Tools/MaxPlasmaLights/target.h b/Sources/Tools/MaxPlasmaLights/target.h deleted file mode 100644 index c49fe8d6..00000000 --- a/Sources/Tools/MaxPlasmaLights/target.h +++ /dev/null @@ -1,124 +0,0 @@ -/*==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 . - -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==*/ -/********************************************************************** - *< - FILE: target.h - - DESCRIPTION: Defines a Target Object Class - - CREATED BY: Dan Silva - - HISTORY: created 11 January 1995 - - *> Copyright (c) 1994, All Rights Reserved. - **********************************************************************/ - -#ifndef __TARGET__H__ - -#define __TARGET__H__ - -class TargetObject: public GeomObject { - friend class TargetObjectCreateCallBack; - friend BOOL CALLBACK TargetParamDialogProc( HWND hDlg, UINT message, - WPARAM wParam, LPARAM lParam ); - - // Mesh cache - static HWND hSimpleCamParams; - static IObjParam* iObjParams; - static Mesh mesh; - static int meshBuilt; - - void GetMat(TimeValue t, INode* inode, ViewExp* vpt, Matrix3& tm); - void BuildMesh(); - - // inherited virtual methods for Reference-management - RefResult NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, - PartID& partID, RefMessage message ); - - public: - TargetObject(); - - // inherited virtual methods: - - // From BaseObject - int HitTest(TimeValue t, INode* inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt); - void Snap(TimeValue t, INode* inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt); - int Display(TimeValue t, INode* inode, ViewExp *vpt, int flags); - CreateMouseCallBack* GetCreateMouseCallBack(); - void BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev); - void EndEditParams( IObjParam *ip, ULONG flags,Animatable *next); - TCHAR *GetObjectName() { return GetString(IDS_DB_TARGET); } - - // From Object - ObjectState Eval(TimeValue time); - void InitNodeName(TSTR& s) { s = GetString(IDS_DB_TARGET); } - ObjectHandle ApplyTransform(Matrix3& matrix); - int UsesWireColor() { return 0; } - int IsRenderable() { return 0; } - - // From GeomObject - int IntersectRay(TimeValue t, Ray& r, float& at); - ObjectHandle CreateTriObjRep(TimeValue t); // for rendering, also for deformation - void GetWorldBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box ); - void GetLocalBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box ); - void GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel ); - - // From Animatable - void DeleteThis() { - delete this; - } - Class_ID ClassID() { return Class_ID(TARGET_CLASS_ID,0); } - void GetClassName(TSTR& s) { s = TSTR(GetString(IDS_DB_TARGET_CLASS)); } - int IsKeyable(){ return 1;} - LRESULT CALLBACK TrackViewWinProc( HWND hwnd, UINT message, - WPARAM wParam, LPARAM lParam ){return(0);} - - // From ref.h - RefTargetHandle Clone(RemapDir& remap = DEFAULTREMAP); - - // IO - IOResult Save(ISave *isave); - IOResult Load(ILoad *iload); - }; - - -#endif From 5ea652f9064f375a5aaed5c6dc0daac1467b52f2 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 21 Dec 2012 20:53:01 -0500 Subject: [PATCH 12/13] Fix MaxPlasmaMtls --- .../Tools/MaxComponent/plAnimObjInterface.h | 2 + Sources/Tools/MaxPlasmaMtls/CMakeLists.txt | 7 +- .../Layers/plAngleAttenLayer.cpp | 24 +++-- .../MaxPlasmaMtls/Layers/plAngleAttenLayer.h | 9 +- .../Layers/plDynamicEnvLayer.cpp | 12 ++- .../MaxPlasmaMtls/Layers/plDynamicEnvLayer.h | 6 +- .../Layers/plDynamicTextLayer.cpp | 16 ++- .../MaxPlasmaMtls/Layers/plDynamicTextLayer.h | 4 +- .../Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp | 12 ++- .../Tools/MaxPlasmaMtls/Layers/plLayerTex.h | 1 - .../MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp | 15 ++- .../MaxPlasmaMtls/Layers/plMAXCameraLayer.h | 4 +- .../MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp | 15 +-- .../MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h | 22 ++--- .../MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp | 34 ++++--- .../MaxPlasmaMtls/Layers/plStaticEnvLayer.h | 4 +- .../Materials/plAnimStealthConvert.cpp | 10 +- .../Materials/plAnimStealthNode.cpp | 13 ++- .../Materials/plAnimStealthNode.h | 16 ++- .../MaxPlasmaMtls/Materials/plBumpMtl.cpp | 21 ++-- .../Tools/MaxPlasmaMtls/Materials/plBumpMtl.h | 6 +- .../Materials/plBumpMtlAnimPBDec.h | 2 - .../Materials/plBumpMtlBasicPBDec.h | 2 - .../MaxPlasmaMtls/Materials/plClothingMtl.cpp | 19 +++- .../MaxPlasmaMtls/Materials/plClothingMtl.h | 7 +- .../Materials/plClothingMtlPBDec.h | 3 +- .../Materials/plCompositeMtl.cpp | 13 ++- .../MaxPlasmaMtls/Materials/plCompositeMtl.h | 10 +- .../Materials/plCompositeMtlDlg.cpp | 11 ++- .../MaxPlasmaMtls/Materials/plDecalMtl.cpp | 19 +++- .../MaxPlasmaMtls/Materials/plDecalMtl.h | 6 +- .../Materials/plDecalMtlAnimPBDec.h | 2 - .../Materials/plDecalMtlBasicPBDec.h | 2 - .../Materials/plDecalMtlLayersPBDec.h | 3 - .../Materials/plMultipassMtl.cpp | 12 +++ .../MaxPlasmaMtls/Materials/plMultipassMtl.h | 8 +- .../Materials/plMultipassMtlDlg.cpp | 11 ++- .../Materials/plNoteTrackWatcher.cpp | 12 ++- .../Materials/plNoteTrackWatcher.h | 6 -- .../MaxPlasmaMtls/Materials/plParticleMtl.cpp | 17 +++- .../MaxPlasmaMtls/Materials/plParticleMtl.h | 8 +- .../Materials/plPassAnimDlgProc.cpp | 9 +- .../Materials/plPassAnimDlgProc.h | 3 +- .../MaxPlasmaMtls/Materials/plPassMtl.cpp | 21 ++-- .../Tools/MaxPlasmaMtls/Materials/plPassMtl.h | 8 +- .../Materials/plPassMtlAnimPBDec.h | 2 - .../MaxPlasmaMtls/Materials/plPassMtlBase.cpp | 13 ++- .../MaxPlasmaMtls/Materials/plPassMtlBase.h | 2 - .../Materials/plPassMtlBasicPBDec.h | 2 - .../Materials/plPassMtlLayersPBDec.h | 3 - Sources/Tools/MaxPlasmaMtls/Pch.cpp | 51 ++++++++++ Sources/Tools/MaxPlasmaMtls/Pch.h | 81 +++++++++++++++ Sources/Tools/MaxPlasmaMtls/Shaders.cpp | 7 +- Sources/Tools/MaxPlasmaMtls/Shaders.h | 10 +- Sources/Tools/MaxPlasmaMtls/plBMSampler.cpp | 13 +-- Sources/Tools/MaxPlasmaMtls/plBMSampler.h | 3 - Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp | 68 +++++++++++++ .../Tools/MaxPlasmaMtls/plDetailCurveCtrl.cpp | 6 +- .../Tools/MaxPlasmaMtls/plDetailCurveCtrl.h | 4 - Sources/Tools/MaxPlasmaMtls/plDrawCurve.cpp | 99 ------------------- Sources/Tools/MaxPlasmaMtls/plMtlImport.h | 3 +- 61 files changed, 501 insertions(+), 333 deletions(-) create mode 100644 Sources/Tools/MaxPlasmaMtls/Pch.cpp create mode 100644 Sources/Tools/MaxPlasmaMtls/Pch.h create mode 100644 Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp delete mode 100644 Sources/Tools/MaxPlasmaMtls/plDrawCurve.cpp diff --git a/Sources/Tools/MaxComponent/plAnimObjInterface.h b/Sources/Tools/MaxComponent/plAnimObjInterface.h index e75c9b5b..5eca35b3 100644 --- a/Sources/Tools/MaxComponent/plAnimObjInterface.h +++ b/Sources/Tools/MaxComponent/plAnimObjInterface.h @@ -53,6 +53,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTemplates.h" #include "plString.h" +class plKey; + class plAnimObjInterface { public: diff --git a/Sources/Tools/MaxPlasmaMtls/CMakeLists.txt b/Sources/Tools/MaxPlasmaMtls/CMakeLists.txt index 4dfa698f..4469ec94 100644 --- a/Sources/Tools/MaxPlasmaMtls/CMakeLists.txt +++ b/Sources/Tools/MaxPlasmaMtls/CMakeLists.txt @@ -8,12 +8,7 @@ include_directories("../../Plasma/PubUtilLib") include_directories("../../Plasma/PubUtilLib/inc") include_directories(${3dsm_INCLUDE_DIR}) -if(Bink_SDK_AVAILABLE) - include_directories(${Bink_INCLUDE_DIR}) -endif() - set(MaxPlasmaMtls_HEADERS - plBinkBitmap.h plBMSampler.h plDetailCurveCtrl.h plMaterialRefMsg.h @@ -88,7 +83,6 @@ set(MaxPlasmaMtls_SOURCES plBinkBitmap.cpp plBMSampler.cpp plDetailCurveCtrl.cpp - plDrawCurve.cpp plMtlImport.cpp Shaders.cpp ) @@ -120,6 +114,7 @@ set(MaxPlasmaMtls_SOURCES_Materials Materials/plPassMtlBase.cpp ) +use_precompiled_header(Pch.h Pch.cpp MaxPlasmaMtls_HEADERS MaxPlasmaMtls_SOURCES) add_library(MaxPlasmaMtls STATIC ${MaxPlasmaMtls_HEADERS} diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp index 45d1b29b..44403337 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp @@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plAngleAttenLayer.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include "plAngleAttenLayer.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -147,6 +150,11 @@ plAngleAttenLayer::~plAngleAttenLayer() { } +void plAngleAttenLayer::GetClassName(TSTR& s) +{ + s = GetString(IDS_ANGLE_ATTEN_LAYER); +} + //From MtlBase void plAngleAttenLayer::Reset() { @@ -313,13 +321,13 @@ void plAngleAttenLayer::IChanged() void plAngleAttenLayer::ICacheCosines() { - fCosTransp0 = cosf(DegToRad(fParmsPB->GetFloat(kTranspAngle0))); - fCosOpaque0 = cosf(DegToRad(fParmsPB->GetFloat(kOpaqueAngle0))); + fCosTransp0 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kTranspAngle0))); + fCosOpaque0 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kOpaqueAngle0))); if( fParmsPB->GetInt(kDoubleFade) ) { - fCosTransp1 = cosf(DegToRad(fParmsPB->GetFloat(kTranspAngle1))); - fCosOpaque1 = cosf(DegToRad(fParmsPB->GetFloat(kOpaqueAngle1))); + fCosTransp1 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kTranspAngle1))); + fCosOpaque1 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kOpaqueAngle1))); } else { diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.h index ee5ad80a..09520e7b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.h @@ -43,12 +43,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plAngleAttenLayer_inc #define plAngleAttenLayer_inc -#include "Max.h" -#include "../resource.h" #include "plPlasmaMAXLayer.h" +class Box3; +class Class_ID; class ClassDesc2; +class Interval; class IParamBlock2; +class ParamDlg; +class TexHandleMaker; ClassDesc2* GetAngleAttenLayerDesc(); @@ -126,7 +129,7 @@ public: //From Animatable Class_ID ClassID() { return ANGLE_ATTEN_LAYER_CLASS_ID; } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_ANGLE_ATTEN_LAYER); } + void GetClassName(TSTR& s); RefTargetHandle Clone( RemapDir &remap ); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp index 11527815..7fb4c402 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp @@ -51,11 +51,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com /////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "plDynamicEnvLayer.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#include +#pragma hdrstop -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include "plDynamicEnvLayer.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h index 61a4b1e5..d1ee6187 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h @@ -53,12 +53,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plDynamicEnvLayer_h #define _plDynamicEnvLayer_h -#include "Max.h" #include "plPlasmaMAXLayer.h" -#include "../resource.h" class ClassDesc2; +class Interval; +class IMtlParams; class IParamBlock2; +class TexHandle; +class UVGen; ClassDesc2* GetDynamicEnvLayerDesc(); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp index 6202c42b..0a05aea4 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp @@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plDynamicTextLayer.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include "plDynamicTextLayer.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -89,6 +92,11 @@ plDynamicTextLayer::~plDynamicTextLayer() IDiscardTexHandle(); } +void plDynamicTextLayer::GetClassName(TSTR& s) +{ + s = GetString(IDS_DYN_TEXT_LAYER); +} + //From MtlBase void plDynamicTextLayer::Reset() { diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.h index 7423e762..822df8d9 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.h @@ -53,8 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plDynamicTextLayer_h #define _plDynamicTextLayer_h -#include "Max.h" -#include "../resource.h" #include "plPlasmaMAXLayer.h" class ClassDesc2; @@ -150,7 +148,7 @@ public: //From Animatable Class_ID ClassID() { return DYN_TEXT_LAYER_CLASS_ID; } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_DYN_TEXT_LAYER); } + void GetClassName(TSTR& s); RefTargetHandle Clone( RemapDir &remap ); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp index 0bfb47b5..a173087c 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp @@ -40,14 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plLayerTex.h" +#include "hsWindows.h" +#include "../resource.h" -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include +#include +#pragma hdrstop #include "../plBMSampler.h" -#include "../resource.h" + +#include "plLayerTex.h" #include "plLayerTexBitmapPB.h" #include "MaxMain/plPlasmaRefMsgs.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h index 066599e4..ce5a8bf5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h @@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __PLMAXLAYER__H #define __PLMAXLAYER__H -#include "Max.h" #include "plPlasmaMAXLayer.h" class ClassDesc2; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp index 9ce6812d..53eaa478 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp @@ -40,12 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" +#include "../resource.h" -#include "plMAXCameraLayer.h" +#include +#include +#pragma hdrstop -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include "plMAXCameraLayer.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -183,6 +185,11 @@ plMAXCameraLayer::~plMAXCameraLayer() { } +void plMAXCameraLayer::GetClassName(TSTR& s) +{ + s = GetString(IDS_MAX_CAMERA_LAYER); +} + //From MtlBase void plMAXCameraLayer::Reset() { diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.h index 710d2dae..c9b02d8a 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMAXCameraLayer_inc #define plMAXCameraLayer_inc -#include "Max.h" -#include "../resource.h" #include "plPlasmaMAXLayer.h" class ClassDesc2; @@ -114,7 +112,7 @@ public: //From Animatable Class_ID ClassID() { return MAX_CAMERA_LAYER_CLASS_ID; } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_MAX_CAMERA_LAYER); } + void GetClassName(TSTR& s); RefTargetHandle Clone( RemapDir &remap ); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp index df5405c7..9a885ef2 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp @@ -54,13 +54,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com /////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "hsResMgr.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#include +#pragma hdrstop + #include "plPlasmaMAXLayer.h" -#include "stdmat.h" -#include "istdplug.h" -#include "iparamb2.h" -#include "iparamm2.h" -#include "../resource.h" #ifdef MAXASS_AVAILABLE #include "../../AssetMan/PublicInterface/MaxAssInterface.h" #endif @@ -69,7 +73,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnKeyedObject/hsKeyedObject.h" #include "pnMessage/plRefMsg.h" #include "plSurface/plLayerInterface.h" -#include "hsResMgr.h" //// Derived Types List /////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h index b2f6a565..b3fd10cd 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h @@ -62,10 +62,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plPlasmaMAXLayer_h #define _plPlasmaMAXLayer_h -#include "Max.h" -#include "iparamm2.h" -#include "HeadSpin.h" - //// Derived Type Class IDs /////////////////////////////////////////////////// // If you create a new Plasma layer type, add a define for the class ID here // and also add the ID to the list in plPlasmaMAXLayer.cpp. @@ -79,18 +75,22 @@ const Class_ID MAX_CAMERA_LAYER_CLASS_ID( 0xfaf5ec7, 0x13d90d3f ); //// Class Definition ///////////////////////////////////////////////////////// -class plLayerInterface; -class plMaxNode; +class Bitmap; +class PBBitmap; +class plBitmapData; +class BitmapInfo; +class plBMSamplerData; +class plDynamicTextMap; class plErrorMsg; class plLayer; -class plDynamicTextMap; -class plBitmapData; -class plLocation; class plLayerConverter; class plLayerInterface; -class plBMSamplerData; -class jvUniqueId; class plLayerTargetContainer; +class plLocation; +class plMaxNode; +class Texmap; +class jvUniqueId; + class plPlasmaMAXLayer : public Texmap { friend class plLayerConverter; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp index b61ec6a5..ae4bf06b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp @@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plStaticEnvLayer.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop -#include "iparamb2.h" -#include "iparamm2.h" -#include "stdmat.h" +#include "plStaticEnvLayer.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -98,6 +101,11 @@ plStaticEnvLayer::~plStaticEnvLayer() IDiscardTexHandle(); } +void plStaticEnvLayer::GetClassName(TSTR& s) +{ + s = GetString(IDS_STATIC_ENVMAP_LAYER); +} + //From MtlBase void plStaticEnvLayer::Reset() { @@ -553,24 +561,24 @@ Matrix3 plStaticEnvLayer::IGetViewTM( int i ) switch( i ) { case kTopFace: - m.RotateX( -PI ); + m.RotateX( -M_PI ); break; case kBottomFace: break; case kLeftFace: - m.RotateX( -.5f * PI ); - m.RotateY( -.5f * PI ); + m.RotateX( -.5f * M_PI ); + m.RotateY( -.5f * M_PI ); break; case kRightFace: - m.RotateX( -.5f * PI ); - m.RotateY( +.5f * PI ); + m.RotateX( -.5f * M_PI ); + m.RotateY( +.5f * M_PI ); break; case kFrontFace: - m.RotateX( -.5f * PI ); - m.RotateY( PI ); + m.RotateX( -.5f * M_PI ); + m.RotateY( M_PI ); break; case kBackFace: - m.RotateX( -.5f * PI ); + m.RotateX( -.5f * M_PI ); break; } return m; @@ -644,7 +652,7 @@ void plStaticEnvLayer::RenderCubicMap( INode *node ) vp.projType = PROJ_PERSPECTIVE; vp.hither = .001f; vp.yon = 1.0e30f; - vp.fov = PI/2.0f; + vp.fov = M_PI/2.0f; if( fBitmapPB->GetInt( kBmpUseMAXAtmosphere ) ) { vp.nearRange = 0; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.h index f868f06f..f2c86bcf 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.h @@ -53,9 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plStaticEnvLayer_h #define _plStaticEnvLayer_h -#include "Max.h" #include "plPlasmaMAXLayer.h" -#include "../resource.h" class ClassDesc2; class IParamBlock2; @@ -160,7 +158,7 @@ public: //From Animatable Class_ID ClassID() { return STATIC_ENV_LAYER_CLASS_ID; } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_STATIC_ENVMAP_LAYER); } + void GetClassName(TSTR& s); RefTargetHandle Clone( RemapDir &remap ); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp index 2cae1609..7fc2d34e 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp @@ -46,19 +46,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "plAnimStealthNode.h" -#include "plPassMtlBase.h" #include "../resource.h" #include "MaxMain/plMaxNode.h" +#include +#pragma hdrstop + +#include "plAnimStealthNode.h" +#include "plPassMtlBase.h" + #include "MaxComponent/plMaxAnimUtils.h" #include "MaxConvert/plConvert.h" #include "MaxConvert/hsMaterialConverter.h" #include "plSurface/hsGMaterial.h" #include "plSurface/plLayerAnimation.h" -#include "iparamm2.h" - //// Helpers ///////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp index 1a1feebf..2035ac41 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp @@ -49,15 +49,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "pnKeyedObject/plKey.h" +#include "hsWindows.h" +#include +#include "../resource.h" + +#include "MaxMain/MaxCompat.h" +#include +#pragma hdrstop + #include "plAnimStealthNode.h" #include "plPassMtlBase.h" -#include "../resource.h" #include "MaxComponent/plMaxAnimUtils.h" #include "MaxComponent/plPickNodeBase.h" -#include "MaxMain/MaxCompat.h" - -#include "iparamm2.h" extern TCHAR *GetString( int id ); extern HINSTANCE hInstance; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h index d6991acb..4d26f193 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h @@ -51,12 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plAnimStealthNode_h #define _plAnimStealthNode_h -#include "Max.h" -#include "iparamb2.h" -#include "iparamm2.h" - -#include "HeadSpin.h" -#include "pnKeyedObject/plKey.h" #include "MaxComponent/plAnimObjInterface.h" #include "MaxComponent/plMaxAnimUtils.h" @@ -67,11 +61,13 @@ extern HINSTANCE hInstance; #define REFMSG_NOTETRACK_ADDED REFMSG_USER + 1 -class plPassMtlBase; -class NoteTrack; -class plMaxNode; -class plErrorMsg; class plAnimTimeConvert; +class plErrorMsg; +class plKey; +class plMaxNode; +class INode; +class NoteTrack; +class plPassMtlBase; //// Class Def /////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp index 3b2b7ebb..6843004f 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp @@ -40,19 +40,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plBumpMtl.h" +#include "pnKeyedObject/plKey.h" +#include "hsWindows.h" #include "../resource.h" -//extern ClassDesc2* GetMaxLayerDesc(); -#include "../Shaders.h" -#include "plBumpMtlBasicPB.h" +#include "MaxMain/MaxCompat.h" +#include +#include +#include +#pragma hdrstop -#include "iparamm2.h" +#include "../Shaders.h" +#include "plBumpMtl.h" +#include "plBumpMtlBasicPB.h" #include "../Layers/plLayerTex.h" #include "../Layers/plStaticEnvLayer.h" #include "MaxMain/plPlasmaRefMsgs.h" -#include "MaxMain/MaxCompat.h" extern HINSTANCE hInstance; @@ -89,6 +93,11 @@ plBumpMtl::plBumpMtl(BOOL loading) : plPassMtlBase( loading ) IVerifyStealthPresent(ENTIRE_ANIMATION_NAME); } +void plBumpMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_BUMP_MTL); +} + ParamDlg* plBumpMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) { fIMtlParams = imp; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h index 308e9050..b9edafef 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h @@ -42,10 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_BUMPMTL_H #define PL_BUMPMTL_H -#include "Max.h" -#include "iparamb2.h" - -#include "../resource.h" #include "plPassMtlBase.h" #define BUMP_MTL_CLASS_ID Class_ID(0x4dbf7b0a, 0x92226de) @@ -77,7 +73,7 @@ public: //From Animatable Class_ID ClassID() { return BUMP_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_BUMP_MTL); } + void GetClassName(TSTR& s); ParamDlg *CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp); void Update(TimeValue t, Interval& valid); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h index b7d6054f..0c4951c6 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plBumpMtl.h" #include "plPassBaseParamIDs.h" -#include "../resource.h" -#include "iparamm2.h" #include "plPassAnimDlgProc.h" #include "plAnimStealthNode.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h index 95630326..e180bdd0 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plBumpMtl.h" #include "plBumpMtlBasicPB.h" -#include "../resource.h" -#include "iparamm2.h" class BumpBasicDlgProc : public ParamMap2UserDlgProc { diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp index 74e98f87..686af313 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp @@ -40,15 +40,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include "plClothingMtl.h" +#include "HeadSpin.h" +#include "hsWindows.h" +#include #include "../resource.h" -#include "../Shaders.h" -#include "iparamm2.h" +#include +#include +#pragma hdrstop + +#include "plClothingMtl.h" + +#include "../Shaders.h" #include "MaxMain/plPlasmaRefMsgs.h" #include "../plBMSampler.h" -#include "stdmat.h" #include "../Layers/plLayerTex.h" #include "../Layers/plLayerTexBitmapPB.h" #include "plAvatar/plClothingLayout.h" @@ -136,6 +142,11 @@ plClothingMtl::plClothingMtl(BOOL loading) : fBasicPB(NULL) fBasicPB->SetValue(ParamID(kThumbnail), 0, new plLayerTex); } +void plClothingMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_CLOTHING_MTL); +} + void plClothingMtl::Reset() { fIValid.SetEmpty(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h index 89f14dc0..5d9bf4a4 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h @@ -42,16 +42,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_CLOTHINGMTL_H #define PL_CLOTHINGMTL_H -#include "HeadSpin.h" -#include "Max.h" -#include "iparamb2.h" -#include "../resource.h" #include "hsTemplates.h" class Bitmap; class plClothingItem; class plMaxNode; class plClothingElement; +class Texmap; #define CLOTHING_MTL_CLASS_ID Class_ID(0x792c6de4, 0x1f952b65) @@ -151,7 +148,7 @@ public: //From Animatable Class_ID ClassID() { return CLOTHING_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_CLOTHING_MTL); } + void GetClassName(TSTR& s); ParamDlg *CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp); void Update(TimeValue t, Interval& valid); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h index 10023c0f..b1a8c706 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h @@ -39,11 +39,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -//#include "plClothingMtl.h" + #ifdef MAXASS_AVAILABLE #include "../../AssetMan/PublicInterface/AssManBaseTypes.h" #endif -#include "max.h" class plClothingEditBox { diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp index ec4c2532..4092d645 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp @@ -40,9 +40,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop + #include "plCompositeMtl.h" #include "plPassMtl.h" -//#include "plCompositeMtlPB.h" #include "plCompositeMtlDlg.h" class plCompositeClassDesc : public ClassDesc2 @@ -90,6 +96,11 @@ plCompositeMtl::plCompositeMtl(BOOL loading) : fPassesPB(NULL) } } +void plCompositeMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_COMP_MTL); +} + void plCompositeMtl::Reset() { fIValid.SetEmpty(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.h index aa4f00c8..d7b14cb5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.h @@ -42,11 +42,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __PLCOMPMTL__H #define __PLCOMPMTL__H -#include "Max.h" -#include "../resource.h" -#include "istdplug.h" -#include "iparamb2.h" -#include "iparamm2.h" +class Interval; +class Mtl; +class IParamBlock2; extern TCHAR *GetString(int id); extern HINSTANCE hInstance; @@ -135,7 +133,7 @@ public: //From Animatable Class_ID ClassID() { return COMP_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_COMP_MTL); } + void GetClassName(TSTR& s); RefTargetHandle Clone(RemapDir &remap); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp index 78984289..3170bc7b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp @@ -40,13 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "max.h" -#include "MaxIcon.h" - +#include "hsWindows.h" #include "../resource.h" + +#include +#include +#pragma hdrstop + #include "plCompositeMtl.h" -//#include "plCompositeMtlPB.h" -//#include "plMaxLayer.h" #include "plCompositeMtlDlg.h" struct LayerID diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp index 49488fa7..b4eae76b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp @@ -40,9 +40,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plDecalMtl.h" +#include "hsWindows.h" #include "../resource.h" -//extern ClassDesc2* GetMaxLayerDesc(); + +#include "MaxMain/MaxCompat.h" +#include +#include +#include +#pragma hdrstop + +#include "plDecalMtl.h" + #include "../Shaders.h" #include "MaxComponent/plMaxAnimUtils.h" @@ -50,8 +58,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plDecalMtlBasicPB.h" #include "plDecalMtlLayersPB.h" -#include "iparamm2.h" - #include "../Layers/plLayerTex.h" #include "../Layers/plStaticEnvLayer.h" #include "MaxMain/plPlasmaRefMsgs.h" @@ -96,6 +102,11 @@ plDecalMtl::plDecalMtl(BOOL loading) : plPassMtlBase( loading ) IVerifyStealthPresent(ENTIRE_ANIMATION_NAME); } +void plDecalMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_DECAL_MTL); +} + ParamDlg* plDecalMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) { fIMtlParams = imp; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h index 4f924a78..4267c2f2 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h @@ -42,10 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_DECALMTL_H #define PL_DECALMTL_H -#include "Max.h" -#include "iparamb2.h" - -#include "../resource.h" #include "plPassMtlBase.h" #define DECAL_MTL_CLASS_ID Class_ID(0x691d2257, 0x419d629e) @@ -82,7 +78,7 @@ public: //From Animatable Class_ID ClassID() { return DECAL_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_DECAL_MTL); } + void GetClassName(TSTR& s); ParamDlg *CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp); void Update(TimeValue t, Interval& valid); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlAnimPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlAnimPBDec.h index 8b612c2b..945a5f87 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlAnimPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlAnimPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plDecalMtl.h" #include "plPassBaseParamIDs.h" -#include "../resource.h" -#include "iparamm2.h" #include "plPassAnimDlgProc.h" #include "plAnimStealthNode.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h index ab863892..63fffcf1 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plDecalMtl.h" #include "plDecalMtlBasicPB.h" -#include "../resource.h" -#include "iparamm2.h" class DecalBasicPBAccessor; extern DecalBasicPBAccessor basicAccessor; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlLayersPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlLayersPBDec.h index d8d28da4..e2b5e2a9 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlLayersPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlLayersPBDec.h @@ -41,9 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plDecalMtl.h" #include "plDecalMtlLayersPB.h" -#include "../resource.h" - -#include "iparamm2.h" #include "../Layers/plLayerTex.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp index 3739c6ca..a0b61471 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp @@ -40,6 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop + #include "plMultipassMtl.h" #include "plPassMtl.h" #include "plMultipassMtlPB.h" @@ -72,6 +79,11 @@ plMultipassMtl::plMultipassMtl(BOOL loading) : fPassesPB(NULL) SetNumSubMtls(1); } +void plMultipassMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_MULTI_MTL); +} + void plMultipassMtl::Reset() { fIValid.SetEmpty(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.h index ebc0b70b..0c2d928b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.h @@ -42,12 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __PLMAXMTL__H #define __PLMAXMTL__H -#include "Max.h" -#include "../resource.h" -#include "istdplug.h" -#include "iparamb2.h" -#include "iparamm2.h" - extern TCHAR *GetString(int id); extern HINSTANCE hInstance; @@ -108,7 +102,7 @@ public: //From Animatable Class_ID ClassID() { return MULTIMTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_MULTI_MTL); } + void GetClassName(TSTR& s); RefTargetHandle Clone(RemapDir &remap); RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtlDlg.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtlDlg.cpp index facc3966..a7ad56b0 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtlDlg.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtlDlg.cpp @@ -40,13 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "max.h" -#include "MaxIcon.h" - +#include "hsWindows.h" #include "../resource.h" + +#include +#include +#include +#pragma hdrstop + #include "plMultipassMtl.h" #include "plMultipassMtlPB.h" -//#include "plMaxLayer.h" #include "plMultipassMtlDlg.h" struct LayerID diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp index fdd2c142..21b43191 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp @@ -51,13 +51,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "plNoteTrackWatcher.h" -#include "plPassMtlBase.h" - -#include "iparamm2.h" - +#include "hsWindows.h" #include "../resource.h" +#include +#include +#pragma hdrstop + +#include "plNoteTrackWatcher.h" +#include "plPassMtlBase.h" //// Watcher Class Desc ////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.h b/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.h index 1aec216b..ba29e969 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.h @@ -53,12 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plNoteTrackWatcher_h #define _plNoteTrackWatcher_h -#include "Max.h" -#include "iparamb2.h" -#include "iparamm2.h" - -#include "HeadSpin.h" - extern TCHAR *GetString(int id); extern HINSTANCE hInstance; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp index 0cbe27b9..9f45ec06 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp @@ -40,16 +40,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plParticleMtl.h" +#include "hsWindows.h" #include "../resource.h" -//extern ClassDesc2* GetMaxLayerDesc(); -#include "../Shaders.h" -#include "iparamm2.h" +#include +#include +#pragma hdrstop + +#include "plParticleMtl.h" +#include "../Shaders.h" #include "MaxMain/plPlasmaRefMsgs.h" #include "../plBMSampler.h" -#include "stdmat.h" #include "../Layers/plLayerTex.h" #include "../Layers/plLayerTexBitmapPB.h" #include "MaxMain/MaxCompat.h" @@ -110,6 +112,11 @@ plParticleMtl::plParticleMtl(BOOL loading) : fBasicPB(NULL)//, fBM(NULL), fUVGen //fUVGen = GetNewDefaultUVGen(); } +void plParticleMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_PARTICLE_MTL); +} + void plParticleMtl::Reset() { fIValid.SetEmpty(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.h index 2316034f..ee130462 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.h @@ -42,12 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_PARTICLEMTL_H #define PL_PARTICLEMTL_H -#include "Max.h" -//#include "istdplug.h" -#include "iparamb2.h" -//#include "iparamm2.h" -#include "../resource.h" - class Bitmap; #define PARTICLE_MTL_CLASS_ID Class_ID(0x26df05ff, 0x60660749) @@ -121,7 +115,7 @@ public: //From Animatable Class_ID ClassID() { return PARTICLE_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_PARTICLE_MTL); } + void GetClassName(TSTR& s); ParamDlg *CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp); void Update(TimeValue t, Interval& valid); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp index a0cefab5..353bec80 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp @@ -46,12 +46,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#pragma hdrstop + #include "plPassAnimDlgProc.h" #include "plPassBaseParamIDs.h" #include "MaxComponent/plNotetrackAnim.h" -#include "../resource.h" -#include "iparamm2.h" #include "plAnimStealthNode.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h index 241c66ec..50ba0633 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h @@ -49,10 +49,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _plPassAnimDlgProc_h #include "plPassMtlBase.h" -#include "iparamm2.h" class plAnimStealthNode; +class Interval; class IParamMap2; +class ReferenceTarget; class plPassAnimDlgProc : public ParamMap2UserDlgProc, public plMtlChangeCallback { diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp index 306b5eb6..dcf4ef24 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp @@ -40,9 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "plPassMtl.h" +#include "hsBitVector.h" +#include "hsWindows.h" #include "../resource.h" -//extern ClassDesc2* GetMaxLayerDesc(); + +#include "MaxMain/MaxCompat.h" +#include +#include +#pragma hdrstop + +#include "plPassMtl.h" #include "../Shaders.h" #include "MaxComponent/plMaxAnimUtils.h" @@ -50,13 +57,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPassMtlBasicPB.h" #include "plPassMtlLayersPB.h" -#include "iparamm2.h" - #include "../Layers/plLayerTex.h" #include "../Layers/plStaticEnvLayer.h" -#include "MaxMain/MaxCompat.h" - -#include "hsBitVector.h" extern HINSTANCE hInstance; @@ -103,6 +105,11 @@ plPassMtl::~plPassMtl() { } +void plPassMtl::GetClassName(TSTR& s) +{ + s = GetString(IDS_PASS_MTL); +} + ParamDlg* plPassMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) { fIMtlParams = imp; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h index 8e37a0fd..1faf21b7 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h @@ -42,12 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_PASSMTL_H #define PL_PASSMTL_H -#include "Max.h" -//#include "istdplug.h" -#include "iparamb2.h" -//#include "iparamm2.h" - -#include "../resource.h" #include "plPassMtlBase.h" #include "hsTemplates.h" @@ -85,7 +79,7 @@ public: //From Animatable Class_ID ClassID() { return PASS_MTL_CLASS_ID; } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } - void GetClassName(TSTR& s) { s = GetString(IDS_PASS_MTL); } + void GetClassName(TSTR& s); ParamDlg *CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp); void Update(TimeValue t, Interval& valid); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlAnimPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlAnimPBDec.h index 7367eff1..7a8e4f1f 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlAnimPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlAnimPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plPassMtl.h" #include "plPassBaseParamIDs.h" -#include "../resource.h" -#include "iparamm2.h" #include "plPassAnimDlgProc.h" #include "plAnimStealthNode.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp index eaca018c..fca882e5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp @@ -47,11 +47,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsBitVector.h" - -#include "Max.h" -#include "iparamb2.h" -#include "notify.h" -#include "notetrck.h" +#include "hsWindows.h" +#include "../resource.h" + +#include +#include +#include +#include +#pragma hdrstop #include "plPassMtlBase.h" #include "plPassBaseParamIDs.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h index a0ec2bb6..a9c08f46 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h @@ -43,8 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define PL_PASSMTLBASE_H #include "hsTemplates.h" -#include "Max.h" -#include "iparamb2.h" #include "plInterp/plAnimEaseTypes.h" class plNoteTrackWatcher; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h index dae8f6a3..f83bfa83 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plPassMtl.h" #include "plPassMtlBasicPB.h" -#include "../resource.h" -#include "iparamm2.h" class PassBasicPBAccessor; extern PassBasicPBAccessor basicAccessor; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlLayersPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlLayersPBDec.h index e123c9e5..31f05d7f 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlLayersPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlLayersPBDec.h @@ -41,9 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plPassMtl.h" #include "plPassMtlLayersPB.h" -#include "../resource.h" - -#include "iparamm2.h" #include "../Layers/plLayerTex.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Pch.cpp b/Sources/Tools/MaxPlasmaMtls/Pch.cpp new file mode 100644 index 00000000..683039de --- /dev/null +++ b/Sources/Tools/MaxPlasmaMtls/Pch.cpp @@ -0,0 +1,51 @@ +/*==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 . + +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==*/ + +#include "Pch.h" + +/** + * \file Pch.cpp + * \brief Precompiled Header object for MaxPlasmaMtls + * + * This file prompts MSVC to generate a PCH file for the MaxPlasmaMtls project. It + * has no function if precompiled headers are disabled in cmake. + */ diff --git a/Sources/Tools/MaxPlasmaMtls/Pch.h b/Sources/Tools/MaxPlasmaMtls/Pch.h new file mode 100644 index 00000000..58990f75 --- /dev/null +++ b/Sources/Tools/MaxPlasmaMtls/Pch.h @@ -0,0 +1,81 @@ +/*==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 . + +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 _MaxPlasmaMtls_Pch_inc_ +#define _MaxPlasmaMtls_Pch_inc_ + +/** + * \file Pch.h + * \brief Precompiled Header for MaxPlasmaMtls + */ + +// Core Plasma +#include "HeadSpin.h" +#include "hsBitVector.h" +#include "pnKeyedObject/plKey.h" +#include "hsResMgr.h" + +// Windoze +#include "hsWindows.h" +#include +#include + +// MaxMain +#include "MaxMain/plMaxNode.h" +#include "MaxMain/MaxCompat.h" + +// Misc 3dsm SDK +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Local +#include "resource.h" + +#endif // _MaxPlasmaMtls_Pch_inc_ \ No newline at end of file diff --git a/Sources/Tools/MaxPlasmaMtls/Shaders.cpp b/Sources/Tools/MaxPlasmaMtls/Shaders.cpp index 8f376a6d..9177dec9 100644 --- a/Sources/Tools/MaxPlasmaMtls/Shaders.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Shaders.cpp @@ -39,9 +39,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ + #include "HeadSpin.h" -#include "max.h" -//#include "mtlhdr.h" +#include "hsWindows.h" +#include +#pragma hdrstop + #include "Shaders.h" //=========================================================================== diff --git a/Sources/Tools/MaxPlasmaMtls/Shaders.h b/Sources/Tools/MaxPlasmaMtls/Shaders.h index 20066b9d..4d317e59 100644 --- a/Sources/Tools/MaxPlasmaMtls/Shaders.h +++ b/Sources/Tools/MaxPlasmaMtls/Shaders.h @@ -42,6 +42,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef __SHADERS_H #define __SHADERS_H +class AColor; +class Color; +class Point3; +class ShadeContext; class Shader; //=========================================================================== @@ -93,7 +97,7 @@ public: shin_str = shineStr; } float EvalHilite(float x) { - return shin_str*(float)pow((double)cos(x*PI),(double)fs); + return shin_str*(float)pow((double)cos(x*M_PI),(double)fs); } }; @@ -112,7 +116,7 @@ public: shin_str = shineStr; } float EvalHilite(float x) { - return shin_str*(float)pow((double)cos(x*PI),(double)fs); + return shin_str*(float)pow((double)cos(x*M_PI),(double)fs); } }; @@ -144,7 +148,7 @@ public: shin_str = shineStr; } float EvalHilite(float x) { - return shin_str*(float)pow((double)cos(x*PI),(double)fs); + return shin_str*(float)pow((double)cos(x*M_PI),(double)fs); } }; diff --git a/Sources/Tools/MaxPlasmaMtls/plBMSampler.cpp b/Sources/Tools/MaxPlasmaMtls/plBMSampler.cpp index 849c5923..3619b05e 100644 --- a/Sources/Tools/MaxPlasmaMtls/plBMSampler.cpp +++ b/Sources/Tools/MaxPlasmaMtls/plBMSampler.cpp @@ -40,13 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "max.h" -#include "texutil.h" -#include "iparamb2.h" - +#include "hsWindows.h" #include -#include "bmmlib.h" -#include "bitmap.h" + +#include +#include +#include +#include +#pragma hdrstop #include "Layers/plPlasmaMAXLayer.h" #include "plBMSampler.h" diff --git a/Sources/Tools/MaxPlasmaMtls/plBMSampler.h b/Sources/Tools/MaxPlasmaMtls/plBMSampler.h index ae2c4ea9..264eba80 100644 --- a/Sources/Tools/MaxPlasmaMtls/plBMSampler.h +++ b/Sources/Tools/MaxPlasmaMtls/plBMSampler.h @@ -42,9 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plBMSampler_h #define _plBMSampler_h -#include "max.h" -#include "imtl.h" - class plPlasmaMAXLayer; class plBMSamplerData diff --git a/Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp b/Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp new file mode 100644 index 00000000..ae499a18 --- /dev/null +++ b/Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp @@ -0,0 +1,68 @@ +/*==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 . + +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==*/ + +#include "HeadSpin.h" +#include "hsWindows.h" +#include +#pragma hdrstop + +class BinkClassDesc : public ClassDesc2 +{ +public: + int IsPublic() { return 1; } + void* Create(BOOL loading=FALSE) + { + hsAssert(false, "bink layers removed due to license issues"); + return nil; + } + + const TCHAR* ClassName() { return "Bink"; } + SClass_ID SuperClassID() { return BMM_IO_CLASS_ID; } + Class_ID ClassID() { return Class_ID(0x71c75c3c, 0x206f480e); } + const TCHAR* Category() { return "Bitmap I/O"; } +}; + +static BinkClassDesc BinkDesc; +ClassDesc2* GetBinkClassDesc() +{ + return &BinkDesc; +} diff --git a/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.cpp b/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.cpp index 159b8975..6027492f 100644 --- a/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.cpp @@ -59,8 +59,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com /////////////////////////////////////////////////////////////////////////////// #include "HeadSpin.h" -#include "plDetailCurveCtrl.h" +#include "hsWindows.h" + #include "resource.h" +#pragma hdrstop + +#include "plDetailCurveCtrl.h" //// Static Stuff ///////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.h b/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.h index f268cd15..e18e6380 100644 --- a/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.h +++ b/Sources/Tools/MaxPlasmaMtls/plDetailCurveCtrl.h @@ -61,10 +61,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plDetailCurveCtrl_h #define _plDetailCurveCtrl_h -#include "Max.h" -#include "resource.h" - - #define GET_DETAIL_CURVE_CTRL( dlg, id ) (GetDlgItem( dlg, id ) ? (plDetailCurveCtrl *)GetWindowLong( GetDlgItem( dlg, id ), GWL_USERDATA ) : NULL ) // Message to parent to let it know a point got dragged. lParam = pointer to control, wParam = 1 if start point, 0 if end point diff --git a/Sources/Tools/MaxPlasmaMtls/plDrawCurve.cpp b/Sources/Tools/MaxPlasmaMtls/plDrawCurve.cpp deleted file mode 100644 index 7adba54c..00000000 --- a/Sources/Tools/MaxPlasmaMtls/plDrawCurve.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/*==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 . - -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==*/ -#if 0 - int ybot, ytop, ylast, i, iy; - HPEN linePen = (HPEN)GetStockObject(WHITE_PEN); - HPEN fgPen = CreatePen(PS_SOLID,0,GetSysColor(COLOR_BTNFACE)); - HPEN bgPen = CreatePen(PS_SOLID,0,GetSysColor(COLOR_BTNSHADOW)); - int width = rect.w() - 4; - int height = rect.h() - 4; - int miplevel = 0; - const float depth = 9; - float detailDropoffStart = theHsMaxLayer->GetDetailDropoffStart(curTime) * depth; - float detailDropoffStop = theHsMaxLayer->GetDetailDropoffStop(curTime) * depth; - float detailMax = theHsMaxLayer->GetDetailMax(curTime); - float detailMin = theHsMaxLayer->GetDetailMin(curTime); - int nextmip = 1; - - ytop = rect.top + 2; - ybot = ytop + height; - ylast = -1; - - for (i=0; i < width; i++) { - if (i==nextmip) { - miplevel++; - nextmip *= 2; - } - - int ix = i + rect.left + 2; - - float alpha = (miplevel - detailDropoffStart) * (detailMin - detailMax) / (detailDropoffStop - detailDropoffStart) - + detailMax; - - if (alpha > detailMax) - alpha = detailMax; - - if (alpha < detailMin) - alpha = detailMin; - - iy = (int)(ybot - alpha * height); - - SelectPen(hdc, fgPen); - VertLine(hdc, ix, ybot, iy); - - if (iy-1 > ytop) { - // Fill in above curve - SelectPen(hdc,bgPen); - VertLine(hdc, ix, ytop, iy-1); - } - if (ylast>=0) { - SelectPen(hdc,linePen); - VertLine(hdc, ix-1, iy-1, ylast); - } - - ylast = iy; - } - SelectObject( hdc, linePen ); - DeleteObject(fgPen); - DeleteObject(bgPen); - WhiteRect3D(hdc, rect, 1); -#endif \ No newline at end of file diff --git a/Sources/Tools/MaxPlasmaMtls/plMtlImport.h b/Sources/Tools/MaxPlasmaMtls/plMtlImport.h index 3738c838..653ad4a8 100644 --- a/Sources/Tools/MaxPlasmaMtls/plMtlImport.h +++ b/Sources/Tools/MaxPlasmaMtls/plMtlImport.h @@ -42,8 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plMtlImport_h #define _plMtlImport_h -#include "Max.h" -#include "iparamb2.h" +class ClassDesc2; namespace plPlasmaMtlImport { From 712d59281f91ada14ede3370bac1f77a86d091fe Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 31 Dec 2012 22:52:04 -0500 Subject: [PATCH 13/13] Fix issues from review - Use lowercase win32 header names for cross-compiling with MinGW - Correct a unix GUID forward declaration --- Sources/Plasma/Apps/plClient/winmain.cpp | 2 +- Sources/Plasma/CoreLib/hsWindows.h | 2 +- Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 29e327e4..4d086bfe 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include // windows directory handling fxns (for chdir) #include -#include // ShellExecuteA +#include // ShellExecuteA //#define DETACH_EXE // Microsoft trick to force loading of exe to memory #ifdef DETACH_EXE diff --git a/Sources/Plasma/CoreLib/hsWindows.h b/Sources/Plasma/CoreLib/hsWindows.h index e1b50c39..2bafc8f1 100644 --- a/Sources/Plasma/CoreLib/hsWindows.h +++ b/Sources/Plasma/CoreLib/hsWindows.h @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com # define NOMINMAX # define WIN32_LEAN_AND_MEAN -# include +# include # include // Pulls in WinSock 2 for us // This needs to be after #include , since it also includes windows.h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h index 1f465b12..d5c68c46 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h @@ -68,7 +68,7 @@ typedef struct _EAXREVERBPROPERTIES EAXREVERBPROPERTIES; #if HS_BUILD_FOR_WIN32 typedef struct _GUID GUID; #else -# define GUID char* + typedef char* GUID; #endif class plEAXListener