Browse Source

Merge pull request #78 from diafero/rel-include

These cleanups are always great.
Adam Johnson 13 years ago
parent
commit
34d27c54bb
  1. 2
      Sources/Plasma/CoreLib/hsThread_Unix.cpp
  2. 14
      Sources/Plasma/NucleusLib/inc/pnNucleusCreatables.h
  3. 10
      Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp
  4. 141
      Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp
  5. 214
      Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h
  6. 3
      Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp
  7. 55
      Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp
  8. 2
      Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt
  9. 2
      Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.h
  10. 2
      Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommonCreatable.h
  11. 12
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h
  12. 1
      Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp
  13. 5
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp
  14. 5
      Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp
  15. 4
      Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp
  16. 4
      Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp
  17. 7
      Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp
  18. 4
      Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp
  19. 3
      Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp
  20. 6
      Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp
  21. 1
      Sources/Plasma/PubUtilLib/plModifier/plAnimTimeConvertSDLModifier.cpp
  22. 2
      Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp
  23. 3
      Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp
  24. 103
      Sources/Plasma/PubUtilLib/plModifier/plTagModifier.cpp
  25. 51
      Sources/Plasma/PubUtilLib/plModifier/plTagModifier.h
  26. 164
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientVNodeMgr.cpp
  27. 234
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientVault.cpp
  28. 71
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientVault.h
  29. 4
      Sources/Plasma/PubUtilLib/plNetCommon/plServerGuid.cpp
  30. 8
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp
  31. 11
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp
  32. 33
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp
  33. 2
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h
  34. 2
      Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp
  35. 76
      Sources/Plasma/PubUtilLib/plPhysical/plEnvEffectDetector.cpp
  36. 57
      Sources/Plasma/PubUtilLib/plPhysical/plEnvEffectDetector.h
  37. 1254
      Sources/Plasma/PubUtilLib/plPipeline/hsGEnviron.cpp
  38. 273
      Sources/Plasma/PubUtilLib/plPipeline/hsGEnviron.h
  39. 18
      Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp
  40. 2
      Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h
  41. 2
      Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp
  42. 195
      Sources/Plasma/PubUtilLib/plResMgr/plIndexFile.cpp
  43. 152
      Sources/Plasma/PubUtilLib/plResMgr/plIndexFile.h
  44. 2
      Sources/Plasma/PubUtilLib/plResMgr/plLoc.cpp
  45. 3
      Sources/Plasma/PubUtilLib/plStatGather/plCalculatedProfiles.cpp
  46. 2
      Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.h
  47. 1
      Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp
  48. 36
      Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTimeCreatable.h
  49. 2743
      Sources/Plasma/PubUtilLib/plVault/plVaultNode.cpp
  50. 1013
      Sources/Plasma/PubUtilLib/plVault/plVaultNode.h
  51. 17
      Sources/Plasma/PythonLib/pyPlasma/creatables.cpp
  52. 15
      Sources/Tools/plFontConverter/plFontConverter.cpp
  53. 1
      Sources/Tools/plResBrowser/plResBrowser.cpp

2
Sources/Plasma/CoreLib/hsThread_Unix.cpp

@ -153,7 +153,7 @@ static void InitMutexTimerFile()
#include <time.h>
#include <stdio.h>
#include <unistd.h>
#include "../NucleusLib/inc/hsTimer.h"
#include "NucleusLib/inc/hsTimer.h"
static FILE * gEventLoggingFile = nil;

14
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

10
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 <string.h>
#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

141
Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.cpp

@ -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 <http://www.gnu.org/licenses/>.
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);
}
*/

214
Sources/Plasma/NucleusLib/pnMessage/plEnvEffectMsg.h

@ -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 <http://www.gnu.org/licenses/>.
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

3
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);

55
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

2
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

2
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

2
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 );

12
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

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

@ -39,7 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
// other
// #include "../pnMessage/plRefMsg.h"
#include "plMessage/plAnimCmdMsg.h"
#include "pnMessage/plSDLModifierMsg.h"
#include "pnMessage/plSDLNotificationMsg.h"

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

@ -70,6 +70,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMessage/plClimbEventMsg.h"
#include "pnNetCommon/plSDLTypes.h"
#include "plSDL/plSDL.h"
#include "plAvatarSDLModifier.h"
/////////////////////////////////////////////////////////////////
//
// IMPLEMENTATION
@ -769,8 +772,6 @@ hsBool plAvBrainClimb::IInitAnimations()
// SDL-BASED PERSISTENCE
//
/////////////////////////////////////////////////////////////////////////////////////////
#include "../plSDL/plSDL.h"
#include "plAvatarSDLModifier.h"
// SaveToSDL -----------------------------------------
// ---------

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

@ -36,6 +36,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// other
#include "plMessage/plAvatarMsg.h"
#include "plMessage/plOneShotMsg.h"
#include "plMessage/plOneShotCallbacks.h"
// CTOR()
plOneShotMod::plOneShotMod()
@ -91,9 +93,6 @@ plOneShotMod::~plOneShotMod()
}
#include "../plMessage/plOneShotMsg.h"
#include "../plMessage/plOneShotCallbacks.h"
// MSGRECEIVE
hsBool plOneShotMod::MsgReceive(plMessage* msg)
{

4
Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp

@ -83,6 +83,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plScene/plVisMgr.h"
#include "plScene/plVisRegion.h"
#include "plStatusLog/plStatusLog.h"
#include <algorithm>
//// Local Konstants /////////////////////////////////////////////////////////
@ -460,8 +462,6 @@ static inline hsMatrix44 IMatrixMul34(const hsMatrix44& lhs, const hsMatrix44& r
return ret;
}
#include "../plStatusLog/plStatusLog.h"
#ifdef MF_TEST_UPDATE
plProfile_CreateCounter("DSSetTrans", "Update", DSSetTrans);
plProfile_CreateCounter("DSMatSpans", "Update", DSMatSpans);

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

@ -68,6 +68,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnMessage/plPipeResMakeMsg.h"
#include "plGImage/plBumpMapGen.h"
// Stuff for creating a bumpenv decal on demand.
#include "plGImage/plMipmap.h"
#include "plSurface/plLayer.h"
@ -1547,8 +1549,6 @@ hsBool plDynaDecalMgr::ICutoutTargets(double secs)
//////////////////////////////////////////////////////////////////////////////////
#include "../plGImage/plBumpMapGen.h"
hsGMaterial* plDynaDecalMgr::IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap)
{
if( !mat || !envMap )

7
Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp

@ -41,6 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plScene/plSceneNode.h"
#include "plScene/plPageTreeMgr.h"
#include "plPipeline.h"
#include "pnSceneObject/plSceneObject.h"
// Stuff for cursor los
#include "plInputCore/plInputDevice.h"
#include "plPipeline.h"
@ -411,9 +415,6 @@ hsBool plVisLOSMgr::CursorCheck(plVisHit& hit)
/////////////////////////////////////////////////////////////////
#include "plPipeline.h"
#include "../pnSceneObject/plSceneObject.h"
static plSceneObject* marker = nil;
static plPipeline* pipe = nil;

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

@ -32,6 +32,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnKeyedObject/plKey.h"
#include "pnSceneObject/plSceneObject.h"
#include "plMessage/plOneShotCallbacks.h"
#ifndef SERVER
#include "plAvatar/plAvBrain.h"
#endif
@ -331,8 +333,6 @@ void plAvTaskSeekDoneMsg::Write(hsStream *stream, hsResMgr *mgr)
//
/////////////////
#include "../plMessage/plOneShotCallbacks.h"
// CTOR()
plAvOneShotMsg::plAvOneShotMsg()
: plAvSeekMsg(), fAnimName(nil), fDrivable(false), fReversible(false), fCallbacks(nil)

3
Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp

@ -31,7 +31,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetCommon/plNetServerSessionInfo.h"
#include "plNetCommon/plNetCommon.h"
#include "hsBitVector.h"
#include "pnNetCommon/plNetApp.h"
/////////////////////////////////////////////////////////////////////////
//
@ -203,7 +203,6 @@ enum LinkEffectsFlags
kLinkEffectsLinkInAnimKey,
};
#include "../pnNetCommon/plNetApp.h"
void plLinkEffectsTriggerMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgReadVersion(s, mgr);

6
Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp

@ -32,6 +32,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnMessage/plEnableMsg.h"
#include "pnMessage/plEventCallbackMsg.h"
#include "pnNetCommon/plNetApp.h"
#include "pnMessage/plNotifyMsg.h"
plAnimEventModifier::plAnimEventModifier() : fCallback(nil), fDisabled(false)
{
}
@ -105,9 +108,6 @@ hsBool plAnimEventModifier::MsgReceive(plMessage* msg)
return plSingleModifier::MsgReceive(msg);
}
#include "../pnNetCommon/plNetApp.h"
#include "../pnMessage/plNotifyMsg.h"
void plAnimEventModifier::ISendNotify(bool triggered)
{
if (fDisabled)

1
Sources/Plasma/PubUtilLib/plModifier/plAnimTimeConvertSDLModifier.cpp

@ -61,7 +61,6 @@ void plAnimTimeConvertSDLModifier::IPutATC(plStateDataRecord* atcStateDataRec, p
//
// Apply state in SDL record to current animation state
//
//#include "../pnSceneObject/plSceneObject.h"
void plAnimTimeConvertSDLModifier::ISetCurrentATC(const plStateDataRecord* atcStateDataRec, plAnimTimeConvert* objAtc)
{
// if ( GetTarget(0)->GetKeyName() && stricmp( GetTarget(0)->GetKeyName(), "RTDirLight01" )==0 )

2
Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp

@ -35,6 +35,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
#include "pnMessage/plWarpMsg.h"
#include "pnMessage/plNodeRefMsg.h"
#include "plMessage/plLoadCloneMsg.h"
plCloneSpawnModifier::plCloneSpawnModifier() : fTemplateName(nil), fExportTime(false)
{
@ -80,7 +81,6 @@ void plCloneSpawnModifier::SetTarget(plSceneObject* so)
}
}
#include "../plMessage/plLoadCloneMsg.h"
plKey plCloneSpawnModifier::SpawnClone(const char* cloneName, const char* cloneAge, const hsMatrix44& pos, plKey requestor)
{

3
Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp

@ -59,6 +59,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAvatar/plArmatureMod.h"
#include "plAvatar/plAvatarMgr.h"
#include "plPipeline/plDebugText.h"
//#ifdef HS_DEBUGGING
#define STATUS_LOG
@ -699,7 +701,6 @@ void plResponderModifier::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteByte(fFlags);
}
#include "../plPipeline/plDebugText.h"
bool plResponderModifier::fDebugAnimBox = false;

103
Sources/Plasma/PubUtilLib/plModifier/plTagModifier.cpp

@ -1,103 +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 <http://www.gnu.org/licenses/>.
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 "plTagModifier.h"
#include "hsResMgr.h"
#include "../pnMessage/plRemoteAvatarInfoMsg.h"
#include "../plMessage/plAvatarMsg.h"
//#include "../pfMessage/plClothingMsg.h"
#include "../plMessage/plCollideMsg.h"
#include "../plMessage/plSimInfluenceMsg.h"
#include "../plStatusLog/plStatusLog.h"
static plStatusLog* gLog = nil;
plTagModifier::plTagModifier()
{
if (!gLog)
gLog = plStatusLogMgr::GetInstance().CreateStatusLog(15, "Tag", plStatusLog::kFilledBackground | plStatusLog::kDeleteForMe | plStatusLog::kDontWriteFile | plStatusLog::kAlignToTop);
}
plTagModifier::~plTagModifier()
{
}
hsBool plTagModifier::MsgReceive(plMessage* msg)
{
plCollideMsg* collideMsg = plCollideMsg::ConvertNoRef(msg);
if (collideMsg)
{
gLog->AddLineF("Kicked by %s", collideMsg->fOtherKey->GetName());
return true;
}
plRemoteAvatarInfoMsg* avInfoMsg = plRemoteAvatarInfoMsg::ConvertNoRef(msg);
if (avInfoMsg)
{
// TODO
// Check if the local av is frozen
// plKey localAvKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
// Freeze clicked av
plKey clickedAvKey = avInfoMsg->GetAvatarKey();
if (clickedAvKey)
{
static hsBool tempHack = true;
tempHack = !tempHack;
plAvEnableMsg* avEnableMsg = new plAvEnableMsg(GetKey(), clickedAvKey, tempHack);
avEnableMsg->SetBCastFlag(plMessage::kNetPropagate | plMessage::kPropagateToModifiers);
avEnableMsg->Send();
gLog->AddLineF("Tagged %s", clickedAvKey->GetName());
}
return true;
}
return plSingleModifier::MsgReceive(msg);
}
void plTagModifier::Read(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Read(stream, mgr);
}
void plTagModifier::Write(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Write(stream, mgr);
}
#include "plgDispatch.h"
void plTagModifier::SetTarget(plSceneObject* so)
{
if (so)
plgDispatch::Dispatch()->RegisterForExactType(plRemoteAvatarInfoMsg::Index(), GetKey());
else
plgDispatch::Dispatch()->UnRegisterForExactType(plRemoteAvatarInfoMsg::Index(), GetKey());
}

51
Sources/Plasma/PubUtilLib/plModifier/plTagModifier.h

@ -1,51 +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 <http://www.gnu.org/licenses/>.
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 plTagModifier_inc
#define plTagModifier_inc
#include "../pnModifier/plSingleModifier.h"
class plTagModifier : public plSingleModifier
{
protected:
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return true; }
public:
plTagModifier();
virtual ~plTagModifier();
CLASSNAME_REGISTER(plTagModifier);
GETINTERFACE_ANY(plTagModifier, plSingleModifier);
virtual hsBool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
virtual void SetTarget(plSceneObject* so);
};
#endif // plTagModifier_inc

164
Sources/Plasma/PubUtilLib/plNetClient/plNetClientVNodeMgr.cpp

@ -1,164 +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 <http://www.gnu.org/licenses/>.
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 "plNetClientMgr.h"
#include "plNetClientVNodeMgr.h"
#include "../plNetMessage/plNetMessage.h"
#include "../plGImage/plMipmap.h"
#include "../plJPEG/plJPEG.h"
#include "../plVault/plVault.h"
#include "hsResMgr.h"
#include "../pnMessage/plRefMsg.h"
#include "../plVault/plDniCoordinateInfo.h"
#include "../plVault/plAgeInfoSource.h"
#include "plNetLinkingMgr.h"
#include "../plStatusLog/plStatusLog.h"
#include "../plClientState/plClientStateMgr.h"
#include "../plSDL/plSDL.h"
#include "../plAgeLoader/plAgeLoader.h"
#include "../../FeatureLib/pfMessage/pfKIMsg.h"
////////////////////////////////////////////////////////////////////
class plNetClientAgeInfoSource : public plAgeInfoSource
{
plDniCoordinateInfo fNilCoords; // TEMPORARY
public:
const plDniCoordinateInfo * GetAgeCoords( void ) const
{
return &fNilCoords; // tmp
}
const plUnifiedTime * GetAgeTime( void ) const
{
static plUnifiedTime ut;
ut.SetSecsDouble(plNetClientMgr::GetInstance()->GetCurrentAgeElapsedSeconds());
return &ut;
}
const char * GetAgeName( void ) const
{
return plNetLinkingMgr::GetInstance()->GetAgeLink()->GetAgeInfo()->GetAgeInstanceName();
}
const plUUID * GetAgeGuid( void ) const
{
return plNetLinkingMgr::GetInstance()->GetAgeLink()->GetAgeInfo()->GetAgeInstanceGuid();
}
static plNetClientAgeInfoSource * GetInstance( void )
{
static plNetClientAgeInfoSource Me;
return &Me;
}
};
//// Image/Mipmap Conversion //////////////////////////////////////////////////
hsBool StuffImageIntoNode( plMipmap * src, RelVaultNode * dst )
{
VaultImageNode image(dst);
hsRAMStream ramStream;
// Create our JPEG stream
plJPEG::Instance().SetWriteQuality( 30 ); // In percent quality
if( !plJPEG::Instance().WriteToStream( &ramStream, src ) )
return false;
unsigned bytes = ramStream.GetEOF();
byte * buffer = (byte *)ALLOC(bytes);
ramStream.CopyToMem(buffer);
image.SetImageData(buffer, bytes);
image.SetImageType( VaultImageNode::kJPEG );
// possibly make a plKey for the mipmap.
return ExtractImageFromNode( dst );
}
hsBool ExtractImageFromNode( RelVaultNode * src)
{
// no id? exit now. we will be called again when element is given an id.
if ( src->nodeId == 0 )
return false;
VaultCliImageNode image(src);
// already have a mipmap and it has a key? release it
if ( image.fMipmap && image.fMipmap->GetKey()!=nil )
{
plNetClientMgr::GetInstance()->GetKey()->Release( image.fMipmap->GetKey() );
image.fMipmap = nil;
}
// convert image data to a plMipmap
switch( image.imgType )
{
case VaultImageNode::kJPEG:
{
// Copy to a RAM stream so the JPEG class is happy
hsRAMStream ramStream;
ramStream.Write( image.imgDataLen, image.imgData );
ramStream.Rewind();
// create mipmap from image data
image.fMipmap = plJPEG::Instance().ReadFromStream( &ramStream );
}
break;
default:
{
hsAssert( false, "ExtractImageFromNode: Invalid image type" );
return false; // Invalid image type
}
}
if ( !image.fMipmap )
{
hsAssert( false, "ExtractImageFromNode failed" );
return false;
}
// we now have a mipmap, but it doesn't have a key. make a key for it
static int UniqueIdentifier = 0;
char keyName[512];
sprintf( keyName, "VaultImage_%lu_%d", src->nodeId, UniqueIdentifier++ );
// create a key for the mipmap
plKey imageKey = hsgResMgr::ResMgr()->NewKey( keyName, image.fMipmap, plLocation::kGlobalFixedLoc );
// ref the image key
hsgResMgr::ResMgr()->AddViaNotify( imageKey, TRACKED_NEW plGenRefMsg(
plNetClientMgr::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, plNetClientMgr::kVaultImage ),
plRefFlags::kActiveRef );
return ( image.fMipmap->GetKey()!=nil );
}
////////////////////////////////////////////////////////////////////
// End.

234
Sources/Plasma/PubUtilLib/plNetClient/plNetClientVault.cpp

@ -1,234 +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 <http://www.gnu.org/licenses/>.
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 "plNetClientMgr.h"
#include "plNetClientVault.h"
#include "../pnNetCommon/plNetMsg.h"
#include "../plGImage/plMipmap.h"
#include "../plJPEG/plJPEG.h"
#include "../plVault/plVaultTasks.h"
#include "hsResMgr.h"
#include "../pnMessage/plRefMsg.h"
#include "../plVault/plDniCoordinateInfo.h"
#include "../plVault/plAgeInfoSource.h"
////////////////////////////////////////////////////////////////////
class plNetClientAgeInfoSource : public plAgeInfoSource
{
plDniCoordinateInfo fNilCoords; // TEMPORARY
public:
const plDniCoordinateInfo * GetAgeCoords( void ) const
{
return &fNilCoords; // tmp
}
const plUnifiedTime * GetAgeTime( void ) const
{
static plUnifiedTime ut;
ut.SetSecsDouble(plNetClientMgr::GetInstance()->GetCurrentAgeElapsedSeconds());
return &ut;
}
const char * GetAgeName( void ) const
{
return plNetClientMgr::GetInstance()->GetAgeName();
}
const plServerGuid * GetAgeGuid( void ) const
{
return plNetClientMgr::GetInstance()->GetCurrSessionInfo()->GetServerGuid();
}
static plNetClientAgeInfoSource * GetInstance( void )
{
static plNetClientAgeInfoSource Me;
return &Me;
}
};
////////////////////////////////////////////////////////////////////
plNetClientVault::plNetClientVault()
{
}
plNetApp * plNetClientVault::GetNetApp( void ) const
{
return plNetClientMgr::GetInstance();
}
plAgeInfoSource * plNetClientVault::GetAgeInfo( void ) const
{
return plNetClientAgeInfoSource::GetInstance();
}
void plNetClientVault::IInitNode( plVaultNode * node )
{
plVaultImageNode * IMG = plVaultImageNode::ConvertNoRef( node );
if ( IMG )
{
plNetClientVault::ExtractImageFromNode( IMG );
}
}
void plNetClientVault::IFiniNode( plVaultNode * node )
{
plVaultImageNode * IMG = plVaultImageNode::ConvertNoRef( node );
if ( IMG && IMG->GetMipmap() )
{
plNetClientMgr::GetInstance()->GetKey()->Release( IMG->GetMipmap()->GetKey() );
IMG->ISetMipmap( nil );
}
}
int plNetClientVault::ISendNetMsg( plNetMsgVault * msg, UInt32 sendFlags )
{
return plNetClientMgr::GetInstance()->SendMsg( msg, sendFlags );
}
void plNetClientVault::IOnTaskTimedOut( plVaultTask * task )
{
std::string msg;
xtl::format( msg, "KI task timed out: %s", task->ClassName() );
plNetClientMgr::GetInstance()->OnNetFailure( msg.c_str(), true );
}
bool plNetClientVault::IAmOnline( void ) const
{
return plNetClientMgr::GetInstance()->IsEnabled()!=0;
}
//// Image/Mipmap Conversion //////////////////////////////////////////////////
hsBool plNetClientVault::StuffImageIntoNode( plMipmap * src, plVaultImageNode * dst )
{
hsRAMStream ramStream;
// Create our JPEG stream
plJPEG::Instance().SetWriteQuality( 50 ); // In percent quality
if( !plJPEG::Instance().WriteToStream( &ramStream, src ) )
return false;
// Copy the stream to the image element now
void * buffer = dst->AllocBuffer( ramStream.GetEOF() );
if( buffer == nil )
return false;
ramStream.CopyToMem( buffer );
dst->SetImageType( plVaultImageNode::kJPEG );
// possibly make a plKey for the mipmap.
return plNetClientVault::ExtractImageFromNode( dst );
}
hsBool plNetClientVault::ExtractImageFromNode( plVaultImageNode * src)
{
// no id? exit now. we will be called again when element is given an id.
if ( src->GetID()==0 )
return false;
// already have a mipmap and it has a key? release it
if ( src->GetMipmap() && src->GetMipmap()->GetKey()!=nil )
{
plNetClientMgr::GetInstance()->GetKey()->Release( src->GetMipmap()->GetKey() );
src->ISetMipmap( nil );
}
// convert image data to a plMipmap
switch( src->GetImageType() )
{
case plVaultImageNode::kJPEG:
{
// Copy to a RAM stream so the JPEG class is happy
hsRAMStream ramStream;
ramStream.Write( src->GetBufSize(), src->GetBuffer() );
ramStream.Rewind();
// create mipmap from image data
src->ISetMipmap( plJPEG::Instance().ReadFromStream( &ramStream ) );
}
break;
default:
{
hsAssert( false, "ExtractImageFromNode: Invalid image type" );
return false; // Invalid image type
}
}
if ( !src->GetMipmap() )
{
hsAssert( false, "ExtractImageFromNode failed" );
return false;
}
// we now have a mipmap, but it doesn't have a key. make a key for it
static int UniqueIdentifier = 0;
char keyName[512];
sprintf( keyName, "VaultImage_%lu_%d", src->GetID(), UniqueIdentifier++ );
// create a key for the mipmap
plKey imageKey = hsgResMgr::ResMgr()->NewKey( keyName, src->IGetMipmap(),
plLocation::kGlobalFixedLoc );
// ref the image key
hsgResMgr::ResMgr()->AddViaNotify( imageKey, new plGenRefMsg(
plNetClientMgr::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, 0 ),
plRefFlags::kActiveRef );
return ( src->GetMipmap()->GetKey()!=nil );
}
////////////////////////////////////////////////////////////////////
plNetPlayerVault::plNetPlayerVault()
{
}
bool plNetPlayerVault::IIsThisMe( plVaultPlayerInfoNode * node ) const
{
return GetPlayer()->GetPlayerInfo()->GetID()==node->GetID();
}
plVaultPlayerNode * plNetPlayerVault::GetPlayer( void ) const
{
return plVaultPlayerNode::ConvertNoRef( GetRootNode() );
}
void plNetPlayerVault::IFillOutConnectFields( plNetMsgVault * msg ) const
{
msg->AddInt( plVault::kArg_VaultClientType, plVault::kNodeType_VaultPlayer );
msg->AddInt( plVault::kArg_VaultClientID, plNetClientMgr::GetInstance()->GetDesiredPlayerID() );
}
bool plNetPlayerVault::IIsThisMsgMine( plNetMsgVault * msg ) const
{
if ( plVaultClient::IIsThisMsgMine( msg ) )
return true;
return ( msg->GetInt( plVault::kArg_VaultClientID )==plNetClientMgr::GetInstance()->GetDesiredPlayerID() );
}
////////////////////////////////////////////////////////////////////
// End.

71
Sources/Plasma/PubUtilLib/plNetClient/plNetClientVault.h

@ -1,71 +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 <http://www.gnu.org/licenses/>.
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 plNetClientVault_h_inc
#define plNetClientVault_h_inc
#include "../plVault/plVaultClient.h"
class plMipmap;
class plVaultImageNode;
////////////////////////////////////////////////////////////////////
class plNetClientVault : public plVaultClient
{
protected:
void IInitNode( plVaultNode * node );
void IFiniNode( plVaultNode * node );
int ISendNetMsg( plNetMsgVault * msg, UInt32 sendFlags=0 );
void IOnTaskTimedOut( plVaultTask * task );
bool IAmOnline( void ) const;
public:
plNetClientVault();
plNetApp * GetNetApp( void ) const;
plAgeInfoSource * GetAgeInfo( void ) const;
// static helpers to convert between plMipmap and plVaultImageNode
static hsBool StuffImageIntoNode( plMipmap * src, plVaultImageNode * dst );
static hsBool ExtractImageFromNode( plVaultImageNode * src );
};
////////////////////////////////////////////////////////////////////
class plNetPlayerVault : public plNetClientVault
{
protected:
bool IIsThisMe( plVaultPlayerInfoNode * node ) const;
void IFillOutConnectFields( plNetMsgVault * msg ) const;
bool IIsThisMsgMine( plNetMsgVault * msg ) const;
public:
plNetPlayerVault();
plVaultPlayerNode * GetPlayer( void ) const;
};
#endif // plNetClientVault_h_inc

4
Sources/Plasma/PubUtilLib/plNetCommon/plServerGuid.cpp

@ -25,8 +25,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsWindows.h"
#include "plServerGuid.h"
#include "../pnMessage/plMessage.h"
#include "../PubUtilLib/plStreamLogger/plStreamLogger.h"
#include "pnMessage/plMessage.h"
#include "PubUtilLib/plStreamLogger/plStreamLogger.h"
#if HS_BUILD_FOR_WIN32
#include <process.h>
#else

8
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp

@ -56,7 +56,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plPXConvert.h"
#include "plPXPhysicalControllerCore.h"
#include "../plModifier/plDetectorLog.h"
#include "plModifier/plDetectorLog.h"
#include "plSurface/hsGMaterial.h"
#include "plSurface/plLayerInterface.h"
#if 0
@ -1254,9 +1257,6 @@ hsBool plPXPhysical::IsDynamic() const
!GetProperty(plSimulationInterface::kPhysAnim);
}
#include "../plSurface/hsGMaterial.h"
#include "../plSurface/plLayerInterface.h"
// Some helper functions for pulling info out of a PhysX trimesh description
inline hsPoint3& GetTrimeshVert(NxTriangleMeshDesc& desc, int idx)
{

11
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp

@ -35,9 +35,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDrawable/plDrawableGenerator.h"
#include "plPhysical/plPhysicalProxy.h"
#include "pnMessage/plSetNetGroupIDMsg.h"
#include "pnMessage/plSetNetGroupIDMsg.h
#include "plSurface/hsGMaterial.h"
#include "plSurface/plLayerInterface.h""
#include "plMessage/plCollideMsg.h"
#include <NxPhysics.h>
#include <ControllerManager.h>
#include <NxCapsuleController.h>
@ -55,6 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef PLASMA_EXTERNAL_RELEASE
#include "plPipeline/plDebugText.h"
hsBool plPXPhysicalController::fDebugDisplay = false;
#endif // PLASMA_EXTERNAL_RELEASE
@ -1197,9 +1202,6 @@ void plPXPhysicalController::IDeleteController()
}
}
#include "../plSurface/hsGMaterial.h"
#include "../plSurface/plLayerInterface.h"
// Make a visible object that can be viewed by users for debugging purposes.
plDrawableSpans* plPXPhysicalController::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
{
@ -1226,7 +1228,6 @@ plDrawableSpans* plPXPhysicalController::CreateProxy(hsGMaterial* mat, hsTArray<
}
#ifndef PLASMA_EXTERNAL_RELEASE
#include "../plPipeline/plDebugText.h"
void plPXPhysicalController::IDrawDebugDisplay()
{

33
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp

@ -27,22 +27,31 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plSimulationMgr.h"
#include "plPXPhysical.h"
#include "plPXConvert.h"
#include "../pnSceneObject/plSimulationInterface.h"
#include "../pnSceneObject/plSceneObject.h"
#include "../pnMessage/plCorrectionMsg.h"
#include "../plAvatar/plArmatureMod.h"
#include "../pnSceneObject/plCoordinateInterface.h"
#include "../plDrawable/plDrawableGenerator.h"
#include "../plPhysical/plPhysicalProxy.h"
#include "../pnMessage/plSetNetGroupIDMsg.h"
#include "../plMessage/plCollideMsg.h"
#include "../plModifier/plDetectorLog.h"
#include "pnSceneObject/plSimulationInterface.h"
#include "pnSceneObject/plSceneObject.h"
#include "pnMessage/plCorrectionMsg.h"
#include "plAvatar/plArmatureMod.h"
#include "pnSceneObject/plCoordinateInterface.h"
#include "plDrawable/plDrawableGenerator.h"
#include "plPhysical/plPhysicalProxy.h"
#include "pnMessage/plSetNetGroupIDMsg.h"
#include "plMessage/plCollideMsg.h"
#include "plModifier/plDetectorLog.h"
//#include "NxVecExtendedVec3.h"
#include "NxPhysics.h"
#include "ControllerManager.h"
#include "NxCapsuleController.h"
#include "NxCapsuleShape.h"
#include "plSurface/hsGMaterial.h"
#include "plSurface/plLayerInterface.h"
#ifndef PLASMA_EXTERNAL_RELEASE
#include "plPipeline/plDebugText.h"
#endif
#define kPhysxSkinWidth 0.1f
#define kPhysZOffset ((fRadius + (fHeight / 2)) + kPhysxSkinWidth)
//#define kSLOPELIMIT (cosf(NxMath::degToRad(55.f)))
@ -1162,9 +1171,6 @@ const hsVector3& plPXPhysicalControllerCore::GetLinearVelocity()
}
}
#include "../plSurface/hsGMaterial.h"
#include "../plSurface/plLayerInterface.h"
// Make a visible object that can be viewed by users for debugging purposes.
plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
{
@ -1189,7 +1195,6 @@ plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTAr
return myDraw;
}
#ifndef PLASMA_EXTERNAL_RELEASE
#include "../plPipeline/plDebugText.h"
void plPXPhysicalControllerCore::IDrawDebugDisplay()
{

2
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h

@ -23,7 +23,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "../plAvatar/plPhysicalControllerCore.h"
#include "plAvatar/plPhysicalControllerCore.h"
#include "hsQuat.h"
#define PHYSX_ONLY_TRIGGER_FROM_KINEMATIC 1

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

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plModifier/plDetectorLog.h"
#ifndef PLASMA_EXTERNAL_RELEASE
#include "plPipeline/plDebugText.h"
bool plSimulationMgr::fDisplayAwakeActors=false;
#endif //PLASMA_EXTERNAL_RELEASE
// This gets called by PhysX whenever a trigger gets penetrated. This is used
@ -989,7 +990,6 @@ void plSimulationMgr::ClearLog()
}
}
#ifndef PLASMA_EXTERNAL_RELEASE
#include "../plPipeline/plDebugText.h"
void plSimulationMgr::IDrawActiveActorList()
{

76
Sources/Plasma/PubUtilLib/plPhysical/plEnvEffectDetector.cpp

@ -1,76 +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 <http://www.gnu.org/licenses/>.
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 "hsTypes.h"
#include "plEnvEffectDetector.h"
#include "../plMessage/plCollideMsg.h"
#include "plgDispatch.h"
#include "../pnMessage/plEnvEffectMsg.h"
/*
hsBool plEnvEffectDetector::MsgReceive(plMessage* msg)
{
plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg);
if (pCollMsg)
{
for (int i = 0; i < fEffectMsg.Count(); i++)
{
fEffectMsg[i]->ClearReceivers();
if(pCollMsg->fEntering)
{
fEffectMsg[i]->Enable( true );
} else {
fEffectMsg[i]->Enable( false );
}
fEffectMsg[i]->AddReceiver( pCollMsg->fOtherKey );
hsRefCnt_SafeRef(fEffectMsg[i]);
plgDispatch::MsgSend( fEffectMsg[i] );
}
}
return plDetectorModifier::MsgReceive(msg);
}
void plEnvEffectDetector::Read(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Read(stream, mgr);
int n = stream->ReadSwap32();
fEffectMsg.SetCountAndZero(n);
for(int i = 0; i < n; i++ )
{
plEnvEffectMsg* pMsg = plEnvEffectMsg::ConvertNoRef(mgr->ReadCreatable(stream));
fEffectMsg[i] = pMsg;
}
}
void plEnvEffectDetector::Write(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Write(stream, mgr);
stream->WriteSwap32(fEffectMsg.GetCount());
for(int i = 0; i < fEffectMsg.GetCount(); i++ )
mgr->WriteCreatable( stream, fEffectMsg[i] );
}
*/

57
Sources/Plasma/PubUtilLib/plPhysical/plEnvEffectDetector.h

@ -1,57 +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 <http://www.gnu.org/licenses/>.
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 plEnvEffectDetector_inc
#define plEnvEffectDetector_inc
#include "plDetectorModifier.h"
class plEnvEffectMsg;
class plMessage;
class hsStream;
class hsResMgr;
class plEnvEffectDetector : public plDetectorModifier
{
protected:
public:
plEnvEffectDetector(){;}
virtual ~plEnvEffectDetector(){;}
virtual hsBool MsgReceive(plMessage* msg);
CLASSNAME_REGISTER( plEnvEffectDetector );
GETINTERFACE_ANY( plEnvEffectDetector, plDetectorModifier );
hsTArray<plEnvEffectMsg*> fEffectMsg;
void Read(hsStream* stream, hsResMgr* mgr);
void Write(hsStream* stream, hsResMgr* mgr);
};
#endif plEnvEffectDetector_inc

1254
Sources/Plasma/PubUtilLib/plPipeline/hsGEnviron.cpp

File diff suppressed because it is too large Load Diff

273
Sources/Plasma/PubUtilLib/plPipeline/hsGEnviron.h

@ -1,273 +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 <http://www.gnu.org/licenses/>.
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 hsGEnviron_inc
#define hsGEnviron_inc
#include "hsGeometry3.h" // hsPoint3
#include "../plInterp/hsTimedValue.h"
#include "../plResMgr/hsKeyedObject.h"
#include "hsColorRGBA.h"
#include "hsTemplates.h"
//
//-----------------------------------
// Environment
//-----------------------------------
//
class hsGMaterial;
class hsGDevEnvCache;
class hsFogControl;
class hsSceneNode;
class hsScene;
class hsGRenderProcs;
class hsG3DDevice;
class plKey;
class hsResMgr;
class hsGEnvironment : public hsKeyedObject {
private:
static const UInt16 kSaveMagicNumber;
static const UInt16 kSaveVersion;
public:
struct FogState {
private:
static const UInt16 kSaveMagicNumber;
static const UInt16 kSaveVersion;
public:
FogState() : fFlags(0) {};
enum {
kColorSet = 0x1,
kDistanceSet = 0x2,
kDepthSet = 0x4,
kDensitySet = 0x8,
kYonSet = 0x10,
kClearSet = 0x20,
kLinear = 0x10000000,
kExp = 0x20000000,
kExp2 = 0x40000000,
kTypeMask = kLinear | kExp | kExp2
};
UInt32 fFlags;
hsTimedValue<hsColorRGBA> fColor;
hsTimedValue<hsColorRGBA> fClear;
hsTimedValue<hsScalar> fDistance;
hsTimedValue<hsScalar> fDensity;
hsTimedValue<hsScalar> fDepth;
hsTimedValue<hsScalar> fYon;
void ValidateEnv(class hsGEnvironment* env);
void SetFromEnv(class hsGEnvironment* env);
void SetToEnv(class hsGEnvironment* env);
void Save(hsStream *stream, hsResMgr* mgr);
void Load(hsStream *stream, hsResMgr* mgr);
};
enum {
kMapSet = 0x1,
kCenterSet = 0x2,
kRadiusSet = 0x4,
kEnvironMapSet = kMapSet | kCenterSet | kRadiusSet,
kFogDepthSet = 0x8,
kFogColorSet = 0x10,
kFogDensitySet = 0x20,
kYonSet = 0x40,
kOverride = 0x80,
kFarOut = 0x100,
kFogDistanceSet = 0x200,
kCacheInvalid = 0x400,
kClearColorSet = 0x800,
kCurrentDepthSet = 0x1000,
kFogControl = 0x2000,
kSortObjects = 0x4000,
kHasRenderProcs = 0x8000,
kFogLinear = 0x10000,
kFogExp = 0x20000,
kFogExp2 = 0x40000,
kFogTypeMask = kFogLinear | kFogExp | kFogExp2,
kClearColorAmbient = 0x80000,
kFogColorAmbient = 0x100000,
kFogColorDiffuse = 0x200000
};
protected:
static hsScalar fYonScale;
UInt32 fFlags;
hsGMaterial* fMap;
char fMapName[256];
hsPoint3 fPos;
hsScalar fRadius;
hsScalar fValidScale;
hsTArray<FogState*> fFogStateStack;
hsTimedValue<hsScalar> fFogDistance;
hsTimedValue<hsScalar> fFogDepth; // value 0..1, as fraction of yon, 0 is no fog
hsTimedValue<hsScalar> fFogDensity;
hsTimedValue<hsColorRGBA> fFogColor;
hsTimedValue<hsColorRGBA> fClearColor;
hsTimedValue<hsScalar> fYon;
hsScalar fCurrentDepth; // function of Depth and Distance
FogState fResetState;
hsGDevEnvCache* fDevCache;
hsDynamicArray<hsGRenderProcs*> fRenderProcs;
hsTArray<plKey*> fNodeKeys;
hsFogControl* fFogControl;
void IReadFogControl(hsStream* s, hsResMgr* mgr);
void IWriteFogControl(hsStream* s, hsResMgr* mgr);
public:
hsGEnvironment();
virtual ~hsGEnvironment();
hsBool32 AddNode(hsSceneNode *node);
hsBool32 AddNodeKey(plKey *key);
Int32 GetNumNodes() { return fNodeKeys.GetCount(); }
hsSceneNode* GetNode(Int32 i);
plKey* GetNodeKey(Int32 i) { return fNodeKeys[i]; }
char* GetMapName() { return fMapName; }
hsGMaterial* GetMap() const { return fMap; }
hsPoint3 GetCenter() const { return fPos; }
hsScalar GetRadius() const { return fRadius; }
hsScalar GetFogDistance() const { return fFogDistance.GetValue(); }
hsScalar GetFogDepth() const { return fFogDepth.GetValue(); }
hsScalar GetCurrentDepth() const { return fCurrentDepth; }
hsScalar GetFogDensity() const { return fFogDensity.GetValue(); }
hsColorRGBA GetFogColor() const { return fFogColor.GetValue(); }
hsColorRGBA GetClearColor() const { return fClearColor.GetValue(); }
hsScalar GetYon() const { return fYonScale * fYon.GetValue(); }
hsScalar GetUnscaledYon() const { return fYon.GetValue(); }
hsBool32 GetOverride() const { return 0 != (fFlags & kOverride); }
UInt32 GetFlags() const { return fFlags; }
hsScalar GoalFogDistance() const { return fFogDistance.GetGoal(); }
hsScalar GoalFogDepth() const { return fFogDepth.GetGoal(); }
hsScalar GoalFogDensity() const { return fFogDensity.GetGoal(); }
hsColorRGBA GoalFogColor() const { return fFogColor.GetGoal(); }
hsColorRGBA GoalClearColor() const { return fClearColor.GetGoal(); }
hsScalar GoalYon() const { return fYon.GetGoal(); }
const hsTimedValue<hsScalar>& FogDistanceState() const { return fFogDistance; }
const hsTimedValue<hsScalar>& FogDepthState() const { return fFogDepth; }
const hsTimedValue<hsScalar>& FogDensityState() const { return fFogDensity; }
const hsTimedValue<hsColorRGBA>& FogColorState() const { return fFogColor; }
const hsTimedValue<hsColorRGBA>& ClearColorState() const { return fClearColor; }
const hsTimedValue<hsScalar>& YonState() const { return fYon; }
void SetFogDistance(const hsTimedValue<hsScalar>& v);
void SetFogDepth(const hsTimedValue<hsScalar>& v);
void SetFogDensity(const hsTimedValue<hsScalar>& v);
void SetFogColor(const hsTimedValue<hsColorRGBA>& v);
void SetClearColor(const hsTimedValue<hsColorRGBA>& v);
void SetYon(const hsTimedValue<hsScalar>& v);
void SetMapName(const char *name);
void SetMap(hsGMaterial *m); // refs
void SetCenter(const hsPoint3 &p);
void SetRadius(hsScalar r);
void SetFogDistance(hsScalar d);
void SetFogDepth(hsScalar f);
void SetCurrentDepth(hsScalar f);
void SetFogDensity(hsScalar f);
void SetFogColor(const hsColorRGBA &c);
void SetClearColor(const hsColorRGBA &c);
void SetYon(hsScalar f);
void SetOverride(hsBool32 on);
void SetIsFar(hsBool32 on=true);
void SetHasFogControl(hsBool32 on=true);
void SetSortObjects(hsBool32 on=true);
void SetFogType(UInt32 t);
void SetFogColorAmbient(hsBool32 on=true);
void SetFogColorDiffuse(hsBool32 on=true);
void SetClearColorAmbient(hsBool32 on=true);
void SetTimedFogDistance(const hsScalar g, const hsScalar s);
void SetTimedFogDepth(const hsScalar g, const hsScalar s);
void SetTimedFogDensity(const hsScalar g, const hsScalar s);
void SetTimedFogColor(const hsColorRGBA& g, const hsScalar s);
void SetTimedClearColor(const hsColorRGBA& g, const hsScalar s);
void SetTimedYon(const hsScalar g, const hsScalar s);
void UnSetMapName() { *fMapName = 0; }
void UnSetEnvironMap() { fFlags &= ~kEnvironMapSet; }
void UnSetFogDistance() { fFlags &= ~kFogDistanceSet; }
void UnSetFogDepth() { fFlags &= ~kFogDepthSet; }
void UnSetFogDensity() { fFlags &= ~kFogDensitySet; }
void UnSetFogColor() { fFlags &= ~kFogColorSet; }
void UnSetClearColor() { fFlags &= ~kClearColorSet; }
void UnSetYon() { fFlags &= ~kYonSet; }
hsGEnvironment* Copy(hsGEnvironment* env); // returns this
void MixEnvirons(hsGEnvironment* env, hsGEnvironment* def);
void Push(hsG3DDevice* d);
void Pop(hsG3DDevice* d);
void Blend();
void Restore();
void Init(hsSceneNode* node);
void SetDeviceCache(hsGDevEnvCache* p);
hsGDevEnvCache* GetDeviceCache(){ return fDevCache; }
void SetFogControl(hsFogControl* fc);
hsFogControl* GetFogControl() { return fFogControl; }
void SaveFogState(); // push
hsGEnvironment::FogState* PopFogState() { return fFogStateStack.GetCount() ? fFogStateStack.Pop() : nil; } // doesn't restore
void RestoreFogState(); // pop and restore
void AddRenderProc(hsGRenderProcs* rp); // refs
hsGRenderProcs* GetRenderProc(int i); // no ref
UInt32 GetNumRenderProcs();
virtual void SetResetState();
virtual void Reset();
virtual void ValidateInResetState();
virtual void Save(hsStream *stream, hsResMgr* mgr);
virtual void Load(hsStream *stream, hsResMgr* mgr);
virtual void Update(hsScalar secs, const hsPoint3& vPos);
virtual void Read(hsStream* s);
virtual void Write(hsStream* s);
virtual void Write(hsStream *stream, hsResMgr *group);
virtual void Read(hsStream *stream, hsResMgr *group);
static hsScalar GetYonScale() { return fYonScale; }
static hsScalar SetYonScale(hsScalar s);
virtual hsBool MsgReceive(plMessage* msg);
};
#endif // hsGEnviron_inc

18
Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp

@ -40,6 +40,18 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pfGameGUIMgr/pfGameGUIMgr.h"
#else // MF_FRONTBUFF_CAPTURE
#include "plPipeline.h"
#include "plgDispatch.h"
#include "plMessage/plCaptureRenderMsg.h"
#include "plGImage/plMipmap.h"
#endif // MF_FRONTBUFF_CAPTURE
#ifndef MF_FRONTBUFF_CAPTURE
// CaptureRenderRequest
//
void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
@ -179,12 +191,6 @@ void plCaptureRender::Update()
#else // MF_FRONTBUFF_CAPTURE
#include "plPipeline.h"
#include "plgDispatch.h"
#include "../plMessage/plCaptureRenderMsg.h"
#include "../plGImage/plMipmap.h"
hsTArray<plCaptureRender::CapInfo> plCaptureRender::fCapReqs;
void plCaptureRender::Update(plPipeline* pipe)

2
Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h

@ -62,7 +62,7 @@ public:
#else // MF_FRONTBUFF_CAPTURE
#include "hsTemplates.h"
#include "../pnKeyedObject/plKey.h"
#include "pnKeyedObject/plKey.h"
class plPipeline;

2
Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp

@ -38,7 +38,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plProgressMgr.h"
#include "hsTimer.h"
#include "../plPipeline/plPlates.h"
#include "plPipeline/plPlates.h"
#include <string.h>

195
Sources/Plasma/PubUtilLib/plResMgr/plIndexFile.cpp

@ -1,195 +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 <http://www.gnu.org/licenses/>.
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==*/
#define plIndexFile_cpp // for version numbers in plVersion.h
#include "plIndexFile.h"
#include "hsStream.h"
#include "plVersion.h"
//--------------------
// plIndexFileHeader
//--------------------
plIndexFileHeader::plIndexFileHeader()
{
fTimeStamp[ 0 ] = fTimeStamp[ 1 ] = 0;
fStrTblStartPos = 0;
fStrTblKnt = 0;
fMajorVersion = plVersion::GetMajorVersion();
fMinorVersion = plVersion::GetMinorVersion();
fExportLocal = 0;
}
void plIndexFileHeader::Write(hsStream *s)
{
s->WriteSwap32(2,fTimeStamp);
s->WriteSwap32(fStrTblStartPos);
s->WriteSwap16(fStrTblKnt);
s->WriteSwap16(fMajorVersion);
s->WriteSwap16(fMinorVersion);
s->WriteSwap16(fExportLocal);
}
void plIndexFileHeader::Read(hsStream *s)
{
s->ReadSwap32(2,fTimeStamp);
fStrTblStartPos = s->ReadSwap32();
fStrTblKnt = s->ReadSwap16();
fMajorVersion = s->ReadSwap16();
fMinorVersion = s->ReadSwap16();
fExportLocal = s->ReadSwap16();
}
//--------------------
// plIndexFileRoom
//--------------------
void plIndexFileRoom::Write(hsStream *s)
{
fRmUoid.Write(s);
s->WriteSwap32(fTypesInRoom);
s->WriteSwap16(fFiller1_16);
s->WriteSwap32(fFiller2_32);
s->WriteSwap32(fFiller3_32);
}
void plIndexFileRoom::Read(hsStream *s)
{
fRmUoid.Read(s);
fTypesInRoom = s->ReadSwap32();
s->ReadSwap16();
s->ReadSwap32();
s->ReadSwap32();
}
//--------------------
// plIndexFileType
//--------------------
void plIndexFileType::Write(hsStream *s)
{
fTypeUoid.Write(s);
s->WriteSwap32(fNumKeys);
s->WriteSwap32(fFiller1_32);
s->WriteSwap32(fFiller2_32);
}
void plIndexFileType::Read(hsStream *s)
{
fTypeUoid.Read(s);
fNumKeys = s->ReadSwap32();
s->ReadSwap32();
s->ReadSwap32();
}
//--------------------
// plIndexFileKey
//--------------------
void plIndexFileKey::Write(hsStream *s)
{
fKeyUoid.Write(s);
s->WriteSwap32(fStartPos);
s->WriteSwap32(fDataLen);
s->WriteSwap16(fNameIx);
s->WriteSwap16(fFiller1_16);
}
void plIndexFileKey::Read(hsStream *s)
{
fKeyUoid.Read(s);
fStartPos = s->ReadSwap32();
fDataLen = s->ReadSwap32();
fNameIx = s->ReadSwap16();
s->ReadSwap16();
}
//--------------------
// plIxStrTbl
//--------------------
plIxStrTbl::~plIxStrTbl()
{
if (fpStrings) delete []fpStrings; // if strings came from elsewhere, not our responsibility
}
UInt16 plIxStrTbl::AddString(const char *p)
{ Int16 ix = FindString(p);
if (ix != -1)
return ix; // duplicate
fStringTbl.push_back(p); return fStringTbl.size() - 1;
}
Int16 plIxStrTbl::FindString(const char *p)
{
for (int i=0; i < fStringTbl.size(); i++)
{
if (!_stricmp(p,fStringTbl[i]))
return i;
}
return -1;
}
void plIxStrTbl::Write(hsStream *s)
{
for (int i=0; i < fStringTbl.size(); i++)
{ Int32 len= fStringTbl[i] ? strlen(fStringTbl[i]) : 0;
hsAssert(len < 256,"Name string too long");
UInt8 l = (UInt8) len;
s->WriteByte(l); // FUTURE, don't really need length!
if (len)
{
s->Write(len, fStringTbl[i]);
}
s->WriteByte(0); // Null terminate
}
}
void plIxStrTbl::Read(hsStream *s)
{ UInt32 pos = s->GetPosition();
s->FastFwd();
fTabSize = s->GetPosition() - pos; // Get size of table
s->SetPosition(pos);
fpStrings = new char[fTabSize];
hsAssert(fpStrings,"new failed");
s->Read(fTabSize,fpStrings); // Read all the string in
char *p = fpStrings;
while (p < fpStrings + fTabSize)
{
UInt8 len = *p;
p++;
hsAssert(p < fpStrings + fTabSize,"String Index error");
fStringTbl.push_back(p);
p += len + 1; // past len and NULL
};
}

152
Sources/Plasma/PubUtilLib/plResMgr/plIndexFile.h

@ -1,152 +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 <http://www.gnu.org/licenses/>.
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 PLINDEXFILE_H
#define PLINDEXFILE_H
#include "../pnKeyedObject/plUoid.h"
#include <vector>
//---------------------------------------------------------------
// These Classes are used to Read and Write the Index file for the Database
// Records are kept the same size Currently 20 Bytes
// At the End of the file, the Strings are stored
// plIxStrTbl is used to Read and Write the String section of the Index
//---------------------------------------------------------------
//---------------------------------------------------------------
// Main header Entry, One per Index file
//---------------------------------------------------------------
class plIndexFileHeader
{
public:
plIndexFileHeader(); // I buried Paul
~plIndexFileHeader(){}
UInt32 fTimeStamp[2];
UInt32 fStrTblStartPos; // where the String table starts in the Index file
UInt16 fStrTblKnt; // how many strings in the string table
UInt16 fMajorVersion;
UInt16 fMinorVersion;
UInt16 fExportLocal; // was this file exported locally or downloaded from server?
void Write(hsStream *s);
void Read(hsStream *s);
};
//---------------------------------------------------------------
// Room Entry One Entry per Room
//---------------------------------------------------------------
class plIndexFileRoom
{
public:
plIndexFileRoom() { memset(this,1,sizeof(this)); } // no virtuals...relax
~plIndexFileRoom(){}
plUoid fRmUoid;
UInt16 fTypesInRoom;
UInt16 fFiller1_16;
UInt32 fFiller2_32;
UInt32 fFiller3_32;
void Write(hsStream *s);
void Read(hsStream *s);
};
//---------------------------------------------------------------
// Type Entry One Entry per Type in each Room
//---------------------------------------------------------------
class plIndexFileType
{
public:
plIndexFileType() { memset(this,1,sizeof(this)); } // no virtuals...relax
~plIndexFileType(){}
plUoid fTypeUoid;
UInt16 fNumKeys;
UInt32 fFiller1_32;
UInt32 fFiller2_32;
void Write(hsStream *s);
void Read(hsStream *s);
};
//---------------------------------------------------------------
// Key Entry One Entry per Type in each Room
//---------------------------------------------------------------
class plIndexFileKey
{
public:
plIndexFileKey() { memset(this,1,sizeof(this)); } // no virtuals...relax
~plIndexFileKey(){}
plUoid fKeyUoid;
UInt32 fStartPos;
UInt32 fDataLen;
UInt16 fNameIx; // Index into string table of name
UInt16 fFiller1_16;
void Write(hsStream *s) ;
void Read(hsStream *s);
};
//---------------------------------------------------------------
// String Table, Lives at the end of the Index File
//---------------------------------------------------------------
class plIxStrTbl
{
std::vector<const char *>fStringTbl;
char *fpStrings;
UInt32 fTabSize; // buffer size for strings
public:
plIxStrTbl() :fpStrings(nil), fTabSize(0){}
~plIxStrTbl();
Int16 FindString(const char *p); // returns -1 if not found, otherwise the index from zero
UInt16 AddString(const char *p);
UInt16 NumStrings() { return fStringTbl.size(); }
const char * GetString(UInt16 x) { return fStringTbl[x]; }
void Write(hsStream *s);
void Read(hsStream *s);
};
class plLinkRecord
{
public:
plLinkRecord(UInt16 a, UInt16 d, UInt16 r) : fAgeIx(a), fDistIx(d), fRoomIx(r){}
~plLinkRecord(){}
UInt16 fAgeIx; // Index into string table
UInt16 fDistIx;
UInt16 fRoomIx;
UInt32 fTimeStamp[2];
};
#endif

2
Sources/Plasma/PubUtilLib/plResMgr/plLoc.cpp

@ -24,7 +24,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plLoc.h"
#include "../pnKeyedObject/hsKeyedObject.h"
#include "pnKeyedObject/hsKeyedObject.h"
plLocFileParser::plLocFileParser(): fThrowBack(nil), fThrowBackLevel(0)

3
Sources/Plasma/PubUtilLib/plStatGather/plCalculatedProfiles.cpp

@ -27,6 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plProfileManager.h"
#include "plNetClient/plNetClientMgr.h"
#include "hsTimer.h"
#include "plPipeline/plPlates.h"
plProfile_CreateCounter("Age Upload BitsPerSec", "Network", UploadAgeBitsPerSec);
plProfile_CreateMemCounter("Upload Bytes", "Network", UploadBW);
@ -119,8 +120,6 @@ void CalculateProfiles()
}
}
#include "../plPipeline/plPlates.h"
static plGraphPlate* fFPSPlate = nil;
static plGraphPlate* fNetBWPlate = nil;
static plGraphPlate* fNetPPSPlate = nil;

2
Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.h

@ -28,7 +28,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsStream.h"
#include "hsStlUtils.h"
#include "../../NucleusLib/pnNetCommon/plGenericVar.h"
#include "pnNetCommon/plGenericVar.h"
class plStreamLogger
{

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

@ -29,7 +29,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTypes.h"
#include "hsMemory.h"
//#include "../plGeometry/hsTriangle3.h"
#include "hsResMgr.h"
#include "plLayerInterface.h"
#include "plLayer.h"

36
Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTimeCreatable.h

@ -1,36 +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 <http://www.gnu.org/licenses/>.
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 plUnifiedTimeCreatable_inc
#define plUnifiedTimeCreatable_inc
#if 0
#include "../pnFactory/plCreator.h"
#include "plUnifiedTime.h"
REGISTER_CREATABLE( plUnifiedTime );
#endif
#endif // plUnifiedTimeCreatable_inc

2743
Sources/Plasma/PubUtilLib/plVault/plVaultNode.cpp

File diff suppressed because it is too large Load Diff

1013
Sources/Plasma/PubUtilLib/plVault/plVaultNode.h

File diff suppressed because it is too large Load Diff

17
Sources/Plasma/PythonLib/pyPlasma/creatables.cpp

@ -23,12 +23,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "../plNetClientComm/plNetClientCommCreatable.h"
#include "../plUnifiedTime/plUnifiedTimeCreatable.h"
#include "../pnKeyedObject/pnKeyedObjectCreatable.h"
#include "../pnNetCommon/pnNetCommonCreatable.h"
#include "../pnMessage/pnMessageCreatable.h"
#include "../plNetMessage/plNetMessageCreatable.h"
#include "../plNetCommon/plNetCommonCreatable.h"
#include "../plVault/plVaultCreatable.h"
#include "../plSDL/plSDLCreatable.h"
#include "plNetClientComm/plNetClientCommCreatable.h"
#include "pnKeyedObject/pnKeyedObjectCreatable.h"
#include "pnNetCommon/pnNetCommonCreatable.h"
#include "pnMessage/pnMessageCreatable.h"
#include "plNetMessage/plNetMessageCreatable.h"
#include "plNetCommon/plNetCommonCreatable.h"
#include "plVault/plVaultCreatable.h"
#include "plSDL/plSDLCreatable.h"

15
Sources/Tools/plFontConverter/plFontConverter.cpp

@ -32,18 +32,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "res/resource.h"
#include "pnAllCreatables.h"
#include "../plResMgr/plResManager.h"
#include "../plResMgr/plResMgrCreatable.h"
#include "../plResMgr/plResMgrSettings.h"
#include "../plMessage/plResMgrHelperMsg.h"
#include "../plUnifiedTime/plUnifiedTimeCreatable.h"
#include "plResMgr/plResManager.h"
#include "plResMgr/plResMgrCreatable.h"
#include "plResMgr/plResMgrSettings.h"
#include "plMessage/plResMgrHelperMsg.h"
REGISTER_CREATABLE(plResMgrHelperMsg);
#include "../plGImage/plFont.h"
#include "plGImage/plFont.h"
REGISTER_CREATABLE(plFont);
#include "../plGImage/plBitmap.h"
#include "../plGImage/plMipmap.h"
#include "plGImage/plBitmap.h"
#include "plGImage/plMipmap.h"
REGISTER_NONCREATABLE(plBitmap);
REGISTER_CREATABLE(plMipmap);

1
Sources/Tools/plResBrowser/plResBrowser.cpp

@ -36,7 +36,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plResMgr/plResManager.h"
#include "plResMgr/plResMgrSettings.h"
#include "plMessage/plResMgrHelperMsg.h"
#include "plUnifiedTime/plUnifiedTimeCreatable.h"
REGISTER_CREATABLE(plResMgrHelperMsg);

Loading…
Cancel
Save