From 78e507ffd601b0aca44733104a738c2e8da035e2 Mon Sep 17 00:00:00 2001 From: diafero Date: Sun, 28 Aug 2011 00:24:58 +0200 Subject: [PATCH] fix relative includes in NucleusLib, move them up to where they belong, remove some unused files --- .../NucleusLib/inc/pnNucleusCreatables.h | 14 +- .../NucleusLib/pnKeyedObject/plFixedKey.cpp | 10 +- .../NucleusLib/pnMessage/plEnvEffectMsg.cpp | 141 ------------ .../NucleusLib/pnMessage/plEnvEffectMsg.h | 214 ------------------ .../NucleusLib/pnMessage/plNotifyMsg.cpp | 3 +- .../NucleusLib/pnModifier/plLogicModBase.cpp | 55 ----- .../NucleusLib/pnNetCommon/CMakeLists.txt | 2 + .../NucleusLib/pnNetCommon/pnNetCommon.h | 2 +- .../pnNetCommon/pnNetCommonCreatable.h | 2 +- .../pnProduct/Private/pnPrBuildId.h | 12 +- 10 files changed, 23 insertions(+), 432 deletions(-) delete mode 100644 Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp delete mode 100644 Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h diff --git a/Sources/Plasma/NucleusLib/inc/pnNucleusCreatables.h b/Sources/Plasma/NucleusLib/inc/pnNucleusCreatables.h index 5fa1c115..7d88a38e 100644 --- a/Sources/Plasma/NucleusLib/inc/pnNucleusCreatables.h +++ b/Sources/Plasma/NucleusLib/inc/pnNucleusCreatables.h @@ -45,12 +45,12 @@ REGISTER_NONCREATABLE( plPhysical ); #include "plgDispatch.h" REGISTER_NONCREATABLE( plDispatchBase ); -#include "../pnDispatch/pnDispatchCreatable.h" -#include "../pnKeyedObject/pnKeyedObjectCreatable.h" -#include "../pnMessage/pnMessageCreatable.h" -#include "../pnModifier/pnModifierCreatable.h" -#include "../pnNetCommon/pnNetCommonCreatable.h" -#include "../pnSceneObject/pnSceneObjectCreatable.h" -#include "../pnTimer/pnTimerCreatable.h" +#include "pnDispatch/pnDispatchCreatable.h" +#include "pnKeyedObject/pnKeyedObjectCreatable.h" +#include "pnMessage/pnMessageCreatable.h" +#include "pnModifier/pnModifierCreatable.h" +#include "pnNetCommon/pnNetCommonCreatable.h" +#include "pnSceneObject/pnSceneObjectCreatable.h" +#include "pnTimer/pnTimerCreatable.h" #endif // pnNucleusCreatables_inc diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp index c6256045..a6c2d6a8 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp @@ -34,6 +34,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plUoid.h" #include +#include "plFixedKey.h" +#include "plCreatableIndex.h" +#include "pnKeyedObject/plKey.h" +#include "pnFactory/plCreator.h" + //// plKeySeed /////////////////////////////////////////////////////////////// // Our seed struct. Defined here so it doesn't have to be in the .h file @@ -55,11 +60,6 @@ struct plKeySeed } }; -#include "plFixedKey.h" -#include "plCreatableIndex.h" -#include "../pnKeyedObject/plKey.h" -#include "../pnFactory/plCreator.h" - // Rules for SeedList: // 1) Must be in the Same order as enum fixedKey // 2) For now at least, all your fixed keys get put into the kGlobalFixedLoc room, reserved just for fixed keys diff --git a/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp b/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp deleted file mode 100644 index 5e360884..00000000 --- a/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp +++ /dev/null @@ -1,141 +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 . - -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 "plEnvEffectMsg.h" - -/* Die, die, everybody die! - - -// real-time effects (non environmental); -plAudioEffectMsg::plAudioEffectMsg() : -fEffect(0), -delayModPct(0), -feedbackPct(0), -lfOscillator(0), -feedbackDelay(0), -waveform(0), -phaseDifferential(0), -gainDB(0), -attack(0), -release(0), -compThreshhold(0), -compRatio(0), -attackPreDelay(0), -intensity(0), -effectCenter(0), -effectWidth(0), -lfCutoff(0), -leftFeedbackDelay(0), -rightFeedbackDelay(0), -swapLeftRightDelay(0), -modulationRate(0) -{ - SetBCastFlag(plMessage::kPropagateToModifiers); -} - -plAudioEffectMsg::plAudioEffectMsg(const plKey &s,const plKey &r,const double* t) : -fEffect(0), -wetDryPct(0), -delayModPct(0), -feedbackPct(0), -lfOscillator(0), -feedbackDelay(0), -waveform(0), -phaseDifferential(0), -gainDB(0), -attack(0), -release(0), -compThreshhold(0), -compRatio(0), -attackPreDelay(0), -intensity(0), -effectCenter(0), -effectWidth(0), -lfCutoff(0), -leftFeedbackDelay(0), -rightFeedbackDelay(0), -swapLeftRightDelay(0), -modulationRate(0) - -{ - SetBCastFlag(plMessage::kPropagateToModifiers); -} - -// IO -void plAudioEffectMsg::Read(hsStream* stream, hsResMgr* mgr) -{ - plEnvEffectMsg::Read(stream, mgr); - stream->ReadSwap(&fEffect); - stream->ReadSwap(&wetDryPct); - stream->ReadSwap(&delayModPct); - stream->ReadSwap(&feedbackPct); - stream->ReadSwap(&lfOscillator); - stream->ReadSwap(&feedbackDelay); - stream->ReadSwap(&waveform); - stream->ReadSwap(&phaseDifferential); - stream->ReadSwap(&gainDB); - stream->ReadSwap(&attack); - stream->ReadSwap(&release); - stream->ReadSwap(&compThreshhold); - stream->ReadSwap(&compRatio); - stream->ReadSwap(&attackPreDelay); - stream->ReadSwap(&intensity); - stream->ReadSwap(&effectCenter); - stream->ReadSwap(&effectWidth); - stream->ReadSwap(&lfCutoff); - stream->ReadSwap(&leftFeedbackDelay); - stream->ReadSwap(&rightFeedbackDelay); - stream->ReadSwap(&swapLeftRightDelay); - stream->ReadSwap(&modulationRate); -} - -void plAudioEffectMsg::Write(hsStream* stream, hsResMgr* mgr) -{ - plEnvEffectMsg::Write(stream, mgr); - stream->WriteSwap(fEffect); - stream->WriteSwap(wetDryPct); - stream->WriteSwap(delayModPct); - stream->WriteSwap(feedbackPct); - stream->WriteSwap(lfOscillator); - stream->WriteSwap(feedbackDelay); - stream->WriteSwap(waveform); - stream->WriteSwap(phaseDifferential); - stream->WriteSwap(gainDB); - stream->WriteSwap(attack); - stream->WriteSwap(release); - stream->WriteSwap(compThreshhold); - stream->WriteSwap(compRatio); - stream->WriteSwap(attackPreDelay); - stream->WriteSwap(intensity); - stream->WriteSwap(effectCenter); - stream->WriteSwap(effectWidth); - stream->WriteSwap(lfCutoff); - stream->WriteSwap(leftFeedbackDelay); - stream->WriteSwap(rightFeedbackDelay); - stream->WriteSwap(swapLeftRightDelay); - stream->WriteSwap(modulationRate); - -} -*/ \ No newline at end of file diff --git a/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h deleted file mode 100644 index 786483b2..00000000 --- a/Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h +++ /dev/null @@ -1,214 +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 . - -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 plEnvEffectMsg_inc -#define plEnvEffectMsg_inc - -/* I'm dead, hear me cry - -#include "../pnMessage/plMessage.h" -#include "hsStream.h" - -class hsResMgr; - - -class plEnvEffectMsg : public plMessage -{ - - hsBool fEnable; - hsScalar fPriority; - -public: - plEnvEffectMsg() : fPriority(1.0), fEnable( true ) { SetBCastFlag(plMessage::kPropagateToModifiers); } - - plEnvEffectMsg(const plKey &s, - const plKey &r, - const double* t) : fPriority(1.0), fEnable( true ) {SetBCastFlag(plMessage::kPropagateToModifiers);} - - ~plEnvEffectMsg(){;} - - CLASSNAME_REGISTER( plEnvEffectMsg ); - GETINTERFACE_ANY( plEnvEffectMsg, plMessage ); - - hsBool Enabled() { return fEnable; } - void Enable(hsBool b) { fEnable = b; } - void SetPriority(hsScalar p) { fPriority = p; } - hsScalar GetPriority() { return fPriority; } - // IO - void Read(hsStream* stream, hsResMgr* mgr) - { - plMessage::IMsgRead(stream, mgr); - stream->ReadSwap(&fEnable); - stream->ReadSwap(&fPriority); - } - - void Write(hsStream* stream, hsResMgr* mgr) - { - plMessage::IMsgWrite(stream, mgr); - stream->WriteSwap(fEnable); - stream->WriteSwap(fPriority); - } -}; - - -class plEnvAudioEffectMsg : public plEnvEffectMsg -{ -public: - - int fPreset; - - Int32 fRoomAtten, fRoomHFAtten; - hsScalar fRoomRolloffFactor; - - hsScalar fDecayTime, fDecayHFRatio; - - Int32 fReflect; - hsScalar fReflectDelay; - - Int32 fReverb; - hsScalar fReverbDelay; - - hsScalar fDiffusion, fDensity; - hsScalar fHFReference; - - plEnvAudioEffectMsg(){SetBCastFlag(plMessage::kPropagateToModifiers);} - plEnvAudioEffectMsg(const plKey &s, - const plKey &r, - const double* t){SetBCastFlag(plMessage::kPropagateToModifiers);} - - ~plEnvAudioEffectMsg(){;} - - CLASSNAME_REGISTER( plEnvAudioEffectMsg ); - GETINTERFACE_ANY( plEnvAudioEffectMsg, plEnvEffectMsg ); - - // IO - void Read(hsStream* stream, hsResMgr* mgr) - { - plEnvEffectMsg::Read(stream, mgr); - stream->ReadSwap(&fPreset); - - stream->ReadSwap( &fRoomAtten ); - stream->ReadSwap( &fRoomHFAtten ); - stream->ReadSwap( &fRoomRolloffFactor ); - - stream->ReadSwap( &fDecayTime ); - stream->ReadSwap( &fDecayHFRatio ); - stream->ReadSwap( &fReflect ); - stream->ReadSwap( &fReflectDelay ); - stream->ReadSwap( &fReverb ); - stream->ReadSwap( &fReverbDelay ); - - stream->ReadSwap( &fDiffusion ); - stream->ReadSwap( &fDensity ); - stream->ReadSwap( &fHFReference ); - } - - void Write(hsStream* stream, hsResMgr* mgr) - { - plEnvEffectMsg::Write(stream, mgr); - stream->WriteSwap(fPreset); - - stream->WriteSwap( fRoomAtten ); - stream->WriteSwap( fRoomHFAtten ); - stream->WriteSwap( fRoomRolloffFactor ); - - stream->WriteSwap( fDecayTime ); - stream->WriteSwap( fDecayHFRatio ); - stream->WriteSwap( fReflect ); - stream->WriteSwap( fReflectDelay ); - stream->WriteSwap( fReverb ); - stream->WriteSwap( fReverbDelay ); - - stream->WriteSwap( fDiffusion ); - stream->WriteSwap( fDensity ); - stream->WriteSwap( fHFReference ); - } -}; - -class plAudioEffectMsg : public plEnvEffectMsg -{ -public: - - - enum effectType - { - kChorus = 0, - kCompressor, - kDistortion, - kEcho, - kFlanger, - kGargle, - kReverb, - kIDL32, - }; - - enum waveShape - { - kTriangular = 0, - kSquare, - kSine, - }; - - int fEffect; - int wetDryPct; - int delayModPct; - int feedbackPct; - int lfOscillator; - int feedbackDelay; - int waveform; - int phaseDifferential; - int gainDB; - hsScalar attack; - int release; - int compThreshhold; - int compRatio; - hsScalar attackPreDelay; - int intensity; - int effectCenter; - int effectWidth; - int lfCutoff; - int leftFeedbackDelay; - int rightFeedbackDelay; - hsBool swapLeftRightDelay; - int modulationRate; - - - plAudioEffectMsg(); - plAudioEffectMsg(const plKey &s, - const plKey &r, - const double* t); - - ~plAudioEffectMsg(){;} - - CLASSNAME_REGISTER( plAudioEffectMsg ); - GETINTERFACE_ANY( plAudioEffectMsg, plEnvEffectMsg ); - - void Read(hsStream* stream, hsResMgr* mgr); - void Write(hsStream* stream, hsResMgr* mgr); -}; - -*/ -#endif // plEnvEffectMsg_inc diff --git a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp index d4c0fa58..84ed8a85 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp +++ b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp @@ -35,6 +35,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plNotifyMsg.h" +#include "pnNetCommon/plNetApp.h" plNotifyMsg::plNotifyMsg(const plKey &s, const plKey &r) { @@ -878,8 +879,6 @@ enum NotifyMsgFlags kNotifyMsgEDs, }; -#include "../pnNetCommon/plNetApp.h" - void plNotifyMsg::ReadVersion(hsStream* s, hsResMgr* mgr) { plMessage::IMsgReadVersion(s, mgr); diff --git a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp index a37be119..76752567 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp +++ b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp @@ -330,58 +330,3 @@ void plLogicModBase::Write(hsStream* stream, hsResMgr* mgr) fFlags.Write(stream); stream->Writebool(fDisabled); } - - - -///////////////////////////////////////////////////////////////////////////////////////////////// -// -// Maintainers Marker Component -// -// -#if 0 -#include "../plModifier/plMaintainersMarkerModifier.h" - -//Class that accesses the paramblock below. -class plMaintainersMarkerComponent : public plComponent -{ -public: - plMaintainersMarkerComponent(); - void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); -}; - -//Max desc stuff necessary. -CLASS_DESC(plMaintainersMarkerComponent, gMaintainersDesc, "Maintainers Marker", "MaintainersMarker", COMP_TYPE_TYPE, Class_ID(0x7d7f1f72, 0x405355f5)) - -//The MAX paramblock stuff below -ParamBlockDesc2 gMaintainersBk -( - 1, _T("maintainersMarker"), 0, &gMaintainersDesc, P_AUTO_CONSTRUCT, plComponent::kRefComp, - end -); - -plMaintainersMarkerComponent::plMaintainersMarkerComponent() -{ - fClassDesc = &gMaintainersDesc; - fClassDesc->MakeAutoParamBlocks(this); -} - -hsBool plMaintainersMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) -{ - node->SetForceLocal(true); - return true; -} -hsBool plMaintainersMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) -{ - plMaintainersMarkerModifier* pSpawn = TRACKED_NEW plMaintainersMarkerModifier; - node->AddModifier(pSpawn); - return true; -} - -hsBool plMaintainersMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) -{ - return true; -} -#endif diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt index 3d7eac40..b88ce118 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt @@ -14,6 +14,8 @@ set(pnNetCommon_HEADERS plSDLTypes.h plSynchedObject.h plSynchedValue.h + pnNetCommon.h + pnNetCommonCreatable.h ) set(pnNetCommon_SOURCES diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h index ec93ea0c..9f1616ee 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h @@ -31,7 +31,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsStlUtils.h" #include "hsRefCnt.h" #include "hsStream.h" -#include "../pnFactory/plCreatable.h" +#include "pnFactory/plCreatable.h" // // main logging switch diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommonCreatable.h b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommonCreatable.h index a98cb90a..bab1d013 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommonCreatable.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommonCreatable.h @@ -26,7 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef pnNetCommonCreatable_inc #define pnNetCommonCreatable_inc -#include "../pnFactory/plCreator.h" +#include "pnFactory/plCreator.h" #include "plSynchedObject.h" REGISTER_CREATABLE( plSynchedObject ); diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h index eb40764c..77f57911 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h @@ -45,10 +45,10 @@ unsigned BuildId (); void OverrideBuildId (unsigned buildId); -/***************************************************************************** -* -* BuildType definition -* -***/ - +/***************************************************************************** +* +* BuildType definition +* +***/ + #define BUILD_TYPE_LIVE 50