mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -358,14 +358,14 @@ PF_CONSOLE_CMD( Avatar_Multistage, Trigger, "string multiComp", "Triggers the na
|
||||
|
||||
if (key)
|
||||
{
|
||||
plNotifyMsg *msg = TRACKED_NEW plNotifyMsg;
|
||||
plNotifyMsg *msg = new plNotifyMsg;
|
||||
|
||||
msg->fType = plNotifyMsg::kActivator;
|
||||
msg->fState = 1; // Triggered
|
||||
|
||||
// Setup the event data in case this is a OneShot responder that needs it
|
||||
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
||||
proPickedEventData *ed = TRACKED_NEW proPickedEventData;
|
||||
proPickedEventData *ed = new proPickedEventData;
|
||||
ed->fPicker = playerKey;
|
||||
ed->fPicked = key; // ???
|
||||
msg->AddEvent(ed);
|
||||
@ -385,7 +385,7 @@ PF_CONSOLE_CMD( Avatar_Multistage, Advance, "", "Advances the avatar's current m
|
||||
{
|
||||
plKey avKey = avatar->GetKey();
|
||||
|
||||
plAvBrainGenericMsg *msg = TRACKED_NEW plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kNextStage, 0, true, 0.5f);
|
||||
plAvBrainGenericMsg *msg = new plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kNextStage, 0, true, 0.5f);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -399,7 +399,7 @@ PF_CONSOLE_CMD( Avatar_Multistage, Regress, "", "Regresses the avatar's current
|
||||
{
|
||||
plKey avKey = avatar->GetKey();
|
||||
|
||||
plAvBrainGenericMsg *msg = TRACKED_NEW plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kPrevStage, 0, true, 0.5f);
|
||||
plAvBrainGenericMsg *msg = new plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kPrevStage, 0, true, 0.5f);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -502,8 +502,8 @@ PF_CONSOLE_CMD( Avatar, SeekPoint, "string seekpoint", "Move to the given seekpo
|
||||
plKey targetKey = seekTarget->GetKey();
|
||||
|
||||
plKey avKey = avatar->GetKey();
|
||||
hsScalar unused = 0.0f;
|
||||
plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, avKey, targetKey, unused, false);
|
||||
float unused = 0.0f;
|
||||
plAvSeekMsg *msg = new plAvSeekMsg(nil, avKey, targetKey, unused, false);
|
||||
|
||||
plgDispatch::MsgSend(msg);
|
||||
}
|
||||
@ -525,7 +525,7 @@ PF_CONSOLE_CMD( Avatar,
|
||||
|
||||
if (avMod)
|
||||
{
|
||||
plArmatureEffectStateMsg *msg = TRACKED_NEW plArmatureEffectStateMsg();
|
||||
plArmatureEffectStateMsg *msg = new plArmatureEffectStateMsg();
|
||||
msg->AddReceiver(avMod->GetArmatureEffects()->GetKey());
|
||||
msg->fSurface = (int)params[0];
|
||||
plgDispatch::MsgSend(msg);
|
||||
@ -542,7 +542,7 @@ PF_CONSOLE_CMD( Avatar, SetStealthMode, "int mode", "Set the stealth mode of you
|
||||
int level = mode==plAvatarStealthModeMsg::kStealthVisible ? 0 : 1;
|
||||
|
||||
// send msg to make myself invisible locally
|
||||
plAvatarStealthModeMsg *msg = TRACKED_NEW plAvatarStealthModeMsg();
|
||||
plAvatarStealthModeMsg *msg = new plAvatarStealthModeMsg();
|
||||
msg->SetSender(avKey);
|
||||
msg->fMode = mode;
|
||||
msg->fLevel = level;
|
||||
@ -551,7 +551,7 @@ PF_CONSOLE_CMD( Avatar, SetStealthMode, "int mode", "Set the stealth mode of you
|
||||
// send net msg to other players to synch them up
|
||||
// the msg will go to their NetClientMgr who will decide whether they see
|
||||
// our avatar as total or semi-invisible based on the invis level.
|
||||
plCCRInvisibleMsg *invisMsg = TRACKED_NEW plCCRInvisibleMsg; // ctor sets flags and receiver
|
||||
plCCRInvisibleMsg *invisMsg = new plCCRInvisibleMsg; // ctor sets flags and receiver
|
||||
invisMsg->fInvisLevel=level;
|
||||
invisMsg->fAvKey=avKey;
|
||||
invisMsg->Send();
|
||||
@ -594,7 +594,7 @@ PF_CONSOLE_CMD( Avatar, FakeLinkToObj, "string objName", "Pseudo-Link the avatar
|
||||
PrintString("Can't find object with that name, fake link failed.");
|
||||
return;
|
||||
}
|
||||
plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg;
|
||||
plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg;
|
||||
msg->fAvatarKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
msg->fLinkObjKey = seekKey;
|
||||
plgDispatch::MsgSend(msg);
|
||||
@ -616,7 +616,7 @@ PF_CONSOLE_CMD( Avatar_Physics, TogglePhysical, "", "Disable/enable physics on t
|
||||
|
||||
if(avatar)
|
||||
{
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
pMsg->SetControlActivated(true);
|
||||
pMsg->SetControlCode(B_CONTROL_TOGGLE_PHYSICAL);
|
||||
|
||||
@ -779,7 +779,7 @@ PF_CONSOLE_CMD( Avatar_Climb, Start, "string direction", "Specify initial mount
|
||||
mode = plAvBrainClimb::kMountingLeft;
|
||||
else if(stricmp(dirStr, "right") == 0)
|
||||
mode = plAvBrainClimb::kMountingRight;
|
||||
plAvBrainClimb *brain = TRACKED_NEW plAvBrainClimb(mode);
|
||||
plAvBrainClimb *brain = new plAvBrainClimb(mode);
|
||||
avMod->PushBrain(brain);
|
||||
}
|
||||
}
|
||||
@ -801,7 +801,7 @@ PF_CONSOLE_CMD( Avatar_Climb, EnableDismount, "string direction", "Let the avata
|
||||
dir = plClimbMsg::kLeft;
|
||||
else if(stricmp(dirStr, "right") == 0)
|
||||
dir = plClimbMsg::kRight;
|
||||
plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kEnableDismount, dir, true);
|
||||
plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kEnableDismount, dir, true);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -824,7 +824,7 @@ PF_CONSOLE_CMD( Avatar_Climb, EnableClimb, "string direction, int onOff", "Allow
|
||||
else if(stricmp(dirStr, "right") == 0)
|
||||
dir = plClimbMsg::kRight;
|
||||
hsBool enable = static_cast<int>(params[1]) ? true : false;
|
||||
plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kEnableClimb, dir, enable);
|
||||
plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kEnableClimb, dir, enable);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -836,7 +836,7 @@ PF_CONSOLE_CMD( Avatar_Climb, Release, "", "")
|
||||
{
|
||||
plKey mgr = plAvatarMgr::GetInstance()->GetKey();
|
||||
plKey avKey = avMod->GetKey();
|
||||
plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kRelease);
|
||||
plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kRelease);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -848,7 +848,7 @@ PF_CONSOLE_CMD( Avatar_Climb, FallOff, "", "")
|
||||
{
|
||||
plKey mgr = plAvatarMgr::GetInstance()->GetKey();
|
||||
plKey avKey = avMod->GetKey();
|
||||
plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kFallOff);
|
||||
plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kFallOff);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -868,7 +868,7 @@ PF_CONSOLE_CMD( Avatar_Swim, Start, "", "")
|
||||
plArmatureMod *avMod = const_cast<plArmatureMod*>(plAvatarMgr::GetInstance()->GetLocalAvatar());
|
||||
if(avMod)
|
||||
{
|
||||
plAvBrainSwim * brayne = TRACKED_NEW plAvBrainSwim();
|
||||
plAvBrainSwim * brayne = new plAvBrainSwim();
|
||||
avMod->PushBrain(brayne);
|
||||
}
|
||||
}
|
||||
@ -880,7 +880,7 @@ PF_CONSOLE_CMD( Avatar_Swim, Start, "", "")
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// void WarpPlayerToAnother(hsBool iMove, UInt32 remoteID)
|
||||
// void WarpPlayerToAnother(hsBool iMove, uint32_t remoteID)
|
||||
PF_CONSOLE_CMD( Avatar_Warp, WarpToPlayer, "int PlayerID", "Warp our player to the same position as another player.")
|
||||
{
|
||||
plAvatarMgr::WarpPlayerToAnother(true, (int)params[0]);
|
||||
|
@ -45,6 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "pfConsole.h"
|
||||
#include "pfConsoleCore/pfConsoleEngine.h"
|
||||
#include "plPipeline/plDebugText.h"
|
||||
@ -60,7 +61,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsTimer.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "plPipeline.h"
|
||||
#include "hsConfig.h"
|
||||
|
||||
#include "pfPython/cyPythonInterface.h"
|
||||
#include "plNetClient/plNetClientMgr.h"
|
||||
@ -73,7 +73,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//// Static Class Stuff //////////////////////////////////////////////////////
|
||||
|
||||
pfConsole *pfConsole::fTheConsole = nil;
|
||||
UInt32 pfConsole::fConsoleTextColor = 0xff00ff00;
|
||||
uint32_t pfConsole::fConsoleTextColor = 0xff00ff00;
|
||||
plPipeline *pfConsole::fPipeline = nil;
|
||||
|
||||
|
||||
@ -136,8 +136,8 @@ class pfConsoleInputInterface : public plInputInterface
|
||||
// RestoreDefaultKeyMappings()!!!!
|
||||
}
|
||||
|
||||
virtual UInt32 GetPriorityLevel( void ) const { return kConsolePriority; }
|
||||
virtual UInt32 GetCurrentCursorID( void ) const { return kCursorHidden; }
|
||||
virtual uint32_t GetPriorityLevel( void ) const { return kConsolePriority; }
|
||||
virtual uint32_t GetCurrentCursorID( void ) const { return kCursorHidden; }
|
||||
virtual hsBool HasInterestingCursorID( void ) const { return false; }
|
||||
|
||||
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
@ -185,7 +185,7 @@ pfConsole::~pfConsole()
|
||||
{
|
||||
if( fInputInterface != nil )
|
||||
{
|
||||
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
|
||||
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
|
||||
msg->SetIFace( fInputInterface );
|
||||
plgDispatch::MsgSend( msg );
|
||||
|
||||
@ -218,7 +218,7 @@ pfConsole * pfConsole::GetInstance () {
|
||||
|
||||
void pfConsole::Init( pfConsoleEngine *engine )
|
||||
{
|
||||
fDisplayBuffer = TRACKED_NEW char[ fNumDisplayLines * kMaxCharsWide ];
|
||||
fDisplayBuffer = new char[ fNumDisplayLines * kMaxCharsWide ];
|
||||
memset( fDisplayBuffer, 0, fNumDisplayLines * kMaxCharsWide );
|
||||
|
||||
memset( fWorkingLine, 0, sizeof( fWorkingLine ) );
|
||||
@ -239,8 +239,8 @@ void pfConsole::Init( pfConsoleEngine *engine )
|
||||
memset( fLastHelpMsg, 0, sizeof( fLastHelpMsg ) );
|
||||
fEngine = engine;
|
||||
|
||||
fInputInterface = TRACKED_NEW pfConsoleInputInterface( this );
|
||||
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface );
|
||||
fInputInterface = new pfConsoleInputInterface( this );
|
||||
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface );
|
||||
msg->SetIFace( fInputInterface );
|
||||
plgDispatch::MsgSend( msg );
|
||||
|
||||
@ -255,7 +255,7 @@ void pfConsole::Init( pfConsoleEngine *engine )
|
||||
|
||||
//// ISetMode ////////////////////////////////////////////////////////////////
|
||||
|
||||
void pfConsole::ISetMode( UInt8 mode )
|
||||
void pfConsole::ISetMode( uint8_t mode )
|
||||
{
|
||||
fMode = mode;
|
||||
fEffectCounter = ( fFXEnabled ? kEffectDivisions : 0 );
|
||||
@ -538,7 +538,7 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
|
||||
wchar_t key;
|
||||
int i,eol;
|
||||
static hsBool findAgain = false;
|
||||
static UInt32 findCounter = 0;
|
||||
static uint32_t findCounter = 0;
|
||||
|
||||
|
||||
if( !msg->GetKeyDown() )
|
||||
@ -1089,7 +1089,7 @@ void pfConsole::Draw( plPipeline *p )
|
||||
HGLOBAL hdl = LoadResource( nil, rsrc );
|
||||
if( hdl != nil )
|
||||
{
|
||||
UInt8 *ptr = (UInt8 *)LockResource( hdl );
|
||||
uint8_t *ptr = (uint8_t *)LockResource( hdl );
|
||||
if( ptr != nil )
|
||||
{
|
||||
for( i = 0; i < SizeofResource( nil, rsrc ); i++ )
|
||||
|
@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _pfConsole_h
|
||||
#define _pfConsole_h
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "pnKeyedObject/hsKeyedObject.h"
|
||||
|
||||
|
||||
@ -88,23 +88,23 @@ class pfConsole : public hsKeyedObject
|
||||
};
|
||||
|
||||
|
||||
UInt32 fNumDisplayLines;
|
||||
uint32_t fNumDisplayLines;
|
||||
|
||||
Int32 fEffectCounter;
|
||||
int32_t fEffectCounter;
|
||||
float fLastTime;
|
||||
UInt32 fHelpTimer;
|
||||
uint32_t fHelpTimer;
|
||||
char fLastHelpMsg[ kWorkingLineSize ];
|
||||
UInt8 fMode; // 0 - invisible, 1 - single line, 2 - full
|
||||
uint8_t fMode; // 0 - invisible, 1 - single line, 2 - full
|
||||
hsBool fInited, fHelpMode, fPythonMode, fPythonFirstTime, fFXEnabled;
|
||||
UInt32 fPythonMultiLines;
|
||||
uint32_t fPythonMultiLines;
|
||||
short fCursorTicks;
|
||||
UInt32 fMsgTimeoutTimer;
|
||||
uint32_t fMsgTimeoutTimer;
|
||||
|
||||
char fHistory[ kNumHistoryItems ][ kMaxCharsWide ];
|
||||
UInt32 fHistoryCursor, fHistoryRecallCursor;
|
||||
uint32_t fHistoryCursor, fHistoryRecallCursor;
|
||||
char *fDisplayBuffer;
|
||||
char fWorkingLine[ kWorkingLineSize ];
|
||||
UInt32 fWorkingCursor;
|
||||
uint32_t fWorkingCursor;
|
||||
|
||||
pfConsoleInputInterface *fInputInterface;
|
||||
|
||||
@ -112,7 +112,7 @@ class pfConsole : public hsKeyedObject
|
||||
|
||||
void IHandleKey( plKeyEventMsg *msg );
|
||||
|
||||
static UInt32 fConsoleTextColor;
|
||||
static uint32_t fConsoleTextColor;
|
||||
static pfConsole *fTheConsole;
|
||||
static void _cdecl IAddLineCallback( const char *string );
|
||||
|
||||
@ -122,7 +122,7 @@ class pfConsole : public hsKeyedObject
|
||||
void IAddParagraph( const char *string, short margin = 0 );
|
||||
void IClear( void );
|
||||
|
||||
void ISetMode( UInt8 mode );
|
||||
void ISetMode( uint8_t mode );
|
||||
void IEnableFX( hsBool e ) { fFXEnabled = e; }
|
||||
hsBool IFXEnabled( void ) { return fFXEnabled; }
|
||||
|
||||
@ -151,8 +151,8 @@ class pfConsole : public hsKeyedObject
|
||||
|
||||
static void EnableEffects( hsBool enable ) { fTheConsole->IEnableFX( enable ); }
|
||||
static hsBool AreEffectsEnabled( void ) { return fTheConsole->IFXEnabled(); }
|
||||
static void SetTextColor( UInt32 color ) { fConsoleTextColor = color; }
|
||||
static UInt32 GetTextColor() { return fConsoleTextColor; }
|
||||
static void SetTextColor( uint32_t color ) { fConsoleTextColor = color; }
|
||||
static uint32_t GetTextColor() { return fConsoleTextColor; }
|
||||
|
||||
static void SetPipeline( plPipeline *pipe ) { fPipeline = pipe; }
|
||||
static plPipeline *GetPipeline( void ) { return fPipeline; }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -143,7 +143,7 @@ PF_CONSOLE_FILE_DUMMY(Net)
|
||||
// name isn't obvious (i.e. SetFogColor doesn't really need one)
|
||||
//
|
||||
// The actual C code prototype looks like:
|
||||
// void pfConsoleCmd_groupName_functionName( UInt32 numParams, pfConsoleCmdParam *params,
|
||||
// void pfConsoleCmd_groupName_functionName( uint32_t numParams, pfConsoleCmdParam *params,
|
||||
// void (*PrintString)( char * ) );
|
||||
//
|
||||
// numParams is exactly what it sounds like. params is an array of console
|
||||
@ -237,7 +237,7 @@ PF_CONSOLE_CMD( Net, // groupName
|
||||
text += plString::FromUtf8( (char*)params[i] );
|
||||
text += _TEMP_CONVERT_FROM_LITERAL(" ");
|
||||
}
|
||||
plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, text.c_str() );
|
||||
plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kAddLine, text.c_str() );
|
||||
cMsg->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce);
|
||||
cMsg->SetBCastFlag(plMessage::kLocalPropagate, 0);
|
||||
plgDispatch::MsgSend( cMsg );
|
||||
@ -792,8 +792,8 @@ PF_CONSOLE_CMD( Net_Vault,
|
||||
"string stationName, string mtSpawnPt",
|
||||
"Register an MT Station with your Nexus" )
|
||||
{
|
||||
wchar wName[MAX_PATH];
|
||||
wchar wObj[MAX_PATH];
|
||||
wchar_t wName[MAX_PATH];
|
||||
wchar_t wObj[MAX_PATH];
|
||||
StrToUnicode(wName, params[0], arrsize(wName));
|
||||
StrToUnicode(wObj, params[1], arrsize(wObj));
|
||||
VaultRegisterMTStationAndWait ( wName, wObj );
|
||||
|
@ -46,20 +46,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "pfConsoleDirSrc.h"
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsExceptions.h"
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifndef _WINDOWS_H_ // redundant include guard to minimize compile times
|
||||
#define _WINDOWS_H_
|
||||
#include <windows.h>
|
||||
#endif // _WINDOWS_H_
|
||||
|
||||
#include <winbase.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -67,8 +58,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
hsBool pfConsoleDirSrc::ParseDirectory(const std::string& path, const std::string& mask /* = "*.*" */)
|
||||
{
|
||||
wchar* wPath = hsStringToWString(path.c_str());
|
||||
wchar* wMask = hsStringToWString(mask.c_str());
|
||||
wchar_t* wPath = hsStringToWString(path.c_str());
|
||||
wchar_t* wMask = hsStringToWString(mask.c_str());
|
||||
hsBool ret = ParseDirectory(wPath, wMask);
|
||||
delete [] wPath;
|
||||
delete [] wMask;
|
||||
@ -104,8 +95,8 @@ hsBool pfConsoleDirSrc::ParseDirectory(const std::wstring& path, const std::wst
|
||||
// errors in the parsing
|
||||
std::wstringstream error;
|
||||
std::wstringstream caption;
|
||||
wchar* errorMsg = hsStringToWString(fEngine->GetErrorMsg());
|
||||
wchar* errorLine = hsStringToWString(fEngine->GetLastErrorLine());
|
||||
wchar_t* errorMsg = hsStringToWString(fEngine->GetErrorMsg());
|
||||
wchar_t* errorLine = hsStringToWString(fEngine->GetLastErrorLine());
|
||||
|
||||
caption << L"Error parsing " << findInfo.cFileName;
|
||||
error << errorMsg << L":\n\nCommand: '" << errorLine << L"'\n\nPress OK to continue parsing files.";
|
||||
@ -161,5 +152,5 @@ hsBool pfConsoleDirSrc::AlreadyProcessedFile(const std::wstring& path, const std
|
||||
|
||||
void pfConsoleDirSrc::AddProcessedFile(const std::wstring& path, const std::wstring& file)
|
||||
{
|
||||
fProcessedFiles.push_back(TRACKED_NEW FileName(path, file));
|
||||
fProcessedFiles.push_back(new FileName(path, file));
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _pfConsoleDirSrc_h
|
||||
#define _pfConsoleDirSrc_h
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pfConsoleCore/pfConsoleEngine.h"
|
||||
|
||||
|
@ -44,7 +44,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plStatusLog/plStatusLog.h"
|
||||
#include "pnMessage/plMessage.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "hsWindows.h"
|
||||
#include "plString.h"
|
||||
|
||||
static bool DumpSpecificMsgInfo(plMessage* msg, std::string& info);
|
||||
@ -80,7 +79,7 @@ void plDispatchLog::LogStatusBarChange(const char* name, const char* action)
|
||||
memset(&mbi, 0, sizeof(MEMORY_BASIC_INFORMATION));
|
||||
|
||||
// Note: this will return shared mem too on Win9x. There's a way to catch that, but it's too slow -Colin
|
||||
UInt32 processMemUsed = 0;
|
||||
uint32_t processMemUsed = 0;
|
||||
void* curAddress = 0;
|
||||
while (VirtualQuery(curAddress, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == sizeof(MEMORY_BASIC_INFORMATION))
|
||||
{
|
||||
@ -98,7 +97,7 @@ void plDispatchLog::LogStatusBarChange(const char* name, const char* action)
|
||||
#endif // HS_BUILD_FOR_WIN32
|
||||
}
|
||||
|
||||
void plDispatchLog::LogLongReceive(const char* keyname, const char* className, UInt32 clonePlayerID, plMessage* msg, float ms)
|
||||
void plDispatchLog::LogLongReceive(const char* keyname, const char* className, uint32_t clonePlayerID, plMessage* msg, float ms)
|
||||
{
|
||||
std::string info;
|
||||
if (DumpSpecificMsgInfo(msg, info))
|
||||
@ -107,7 +106,7 @@ void plDispatchLog::LogLongReceive(const char* keyname, const char* className, U
|
||||
fLog->AddLineF("%-30s[%7u](%-20s) took %6.1f ms to receive %s\n", keyname, clonePlayerID, className, ms, msg->ClassName());
|
||||
}
|
||||
|
||||
void plDispatchLog::DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, Int32 indent)
|
||||
void plDispatchLog::DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, int32_t indent)
|
||||
{
|
||||
if (!msg)
|
||||
return;
|
||||
@ -120,8 +119,8 @@ void plDispatchLog::DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, In
|
||||
// it's an include list and we didn't find it
|
||||
return;
|
||||
|
||||
static hsScalar lastTime=0;
|
||||
hsScalar curTime = (hsScalar)hsTimer::GetSysSeconds();
|
||||
static float lastTime=0;
|
||||
float curTime = (float)hsTimer::GetSysSeconds();
|
||||
|
||||
if (lastTime!=curTime)
|
||||
{
|
||||
@ -146,7 +145,7 @@ void plDispatchLog::DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, In
|
||||
lastTime=curTime;
|
||||
}
|
||||
|
||||
void plDispatchLog::AddFilterType(UInt16 hClass)
|
||||
void plDispatchLog::AddFilterType(uint16_t hClass)
|
||||
{
|
||||
if (hClass>=plFactory::GetNumClasses())
|
||||
return;
|
||||
@ -159,13 +158,13 @@ void plDispatchLog::AddFilterType(UInt16 hClass)
|
||||
}
|
||||
}
|
||||
|
||||
void plDispatchLog::AddFilterExactType(UInt16 type)
|
||||
void plDispatchLog::AddFilterExactType(uint16_t type)
|
||||
{
|
||||
if (type<plFactory::GetNumClasses())
|
||||
fIncludeTypes.SetBit(type);
|
||||
}
|
||||
|
||||
void plDispatchLog::RemoveFilterType(UInt16 hClass)
|
||||
void plDispatchLog::RemoveFilterType(uint16_t hClass)
|
||||
{
|
||||
if (hClass>=plFactory::GetNumClasses())
|
||||
return;
|
||||
@ -178,7 +177,7 @@ void plDispatchLog::RemoveFilterType(UInt16 hClass)
|
||||
}
|
||||
}
|
||||
|
||||
void plDispatchLog::RemoveFilterExactType(UInt16 type)
|
||||
void plDispatchLog::RemoveFilterExactType(uint16_t type)
|
||||
{
|
||||
if (type<plFactory::GetNumClasses())
|
||||
fIncludeTypes.ClearBit(type);
|
||||
|
@ -51,7 +51,7 @@ class plDispatchLog : public plDispatchLogBase
|
||||
{
|
||||
private:
|
||||
hsBitVector fIncludeTypes; // include/exclude list
|
||||
UInt64 fStartTicks;
|
||||
uint64_t fStartTicks;
|
||||
plStatusLog* fLog;
|
||||
|
||||
public:
|
||||
@ -60,16 +60,16 @@ public:
|
||||
|
||||
static void InitInstance();
|
||||
|
||||
void AddFilterType(UInt16 type);
|
||||
void AddFilterExactType(UInt16 type);
|
||||
void AddFilterType(uint16_t type);
|
||||
void AddFilterExactType(uint16_t type);
|
||||
|
||||
void RemoveFilterType(UInt16 type);
|
||||
void RemoveFilterExactType(UInt16 type);
|
||||
void RemoveFilterType(uint16_t type);
|
||||
void RemoveFilterExactType(uint16_t type);
|
||||
|
||||
void LogStatusBarChange(const char* name, const char* action);
|
||||
void LogLongReceive(const char* keyname, const char* className, UInt32 clonePlayerID, plMessage* msg, float ms);
|
||||
void LogLongReceive(const char* keyname, const char* className, uint32_t clonePlayerID, plMessage* msg, float ms);
|
||||
|
||||
void DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, Int32 indent);
|
||||
void DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, int32_t indent);
|
||||
};
|
||||
|
||||
#endif // pfDispatchLog_inc
|
||||
|
@ -122,7 +122,7 @@ PF_CONSOLE_CMD( Game, TakeScreenshot, "...", "Takes a shot of the current frame
|
||||
|
||||
plMipmap myMipmap;
|
||||
char fileName[ 512 ];
|
||||
UInt32 uniqueNumber;
|
||||
uint32_t uniqueNumber;
|
||||
|
||||
|
||||
if( numParams > 1 )
|
||||
@ -167,7 +167,7 @@ PF_CONSOLE_CMD( Game, LoadDialog, "string dlgName", "Loads the given GUI dialog
|
||||
plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu );
|
||||
if( mgrKey )
|
||||
{
|
||||
pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog );
|
||||
pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog );
|
||||
msg->SetString( params[ 0 ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
@ -179,7 +179,7 @@ PF_CONSOLE_CMD( Game, LoadLocalDialog, "string ageName, string dlgName", "Loads
|
||||
plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu );
|
||||
if( mgrKey )
|
||||
{
|
||||
pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog );
|
||||
pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog );
|
||||
msg->SetString( params[ 1 ] );
|
||||
msg->SetAge( params[ 0 ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
@ -192,7 +192,7 @@ PF_CONSOLE_CMD( Game, ShowDialog, "string dlgName", "Shows the given GUI dialog"
|
||||
plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu );
|
||||
if( mgrKey )
|
||||
{
|
||||
pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog );
|
||||
pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog );
|
||||
msg->SetString( params[ 0 ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
@ -204,7 +204,7 @@ PF_CONSOLE_CMD( Game, HideDialog, "string dlgName", "Hides the given GUI dialog"
|
||||
plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu );
|
||||
if( mgrKey )
|
||||
{
|
||||
pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog );
|
||||
pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog );
|
||||
msg->SetString( params[ 0 ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
@ -218,11 +218,11 @@ PF_CONSOLE_CMD( Game, SwitchDialog, "string olddlgName, string newdlgName", "Hid
|
||||
plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu );
|
||||
if( mgrKey )
|
||||
{
|
||||
pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog );
|
||||
pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog );
|
||||
msg->SetString( params[ 0 ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
|
||||
pfGameGUIMsg *msg2 = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog );
|
||||
pfGameGUIMsg *msg2 = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog );
|
||||
msg2->SetString( params[ 1 ] );
|
||||
plgDispatch::MsgSend( msg2 );
|
||||
}
|
||||
@ -275,116 +275,116 @@ PF_CONSOLE_CMD( Game_GUI, CreateDialog, "string name", "" )
|
||||
|
||||
PF_CONSOLE_CMD( Game, EnterChatMode, "", "Enters in-game chat mode" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kEnterChatMode);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kEnterChatMode);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIToggleMini, "", "Toggle between mini and big KI" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kMiniBigKIToggle);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kMiniBigKIToggle);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIPutAway, "", "Put KI completely away" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIPutAway);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIPutAway);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatPageUp, "", "Scroll chat display one page up" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaPageUp);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaPageUp);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatPageDown, "", "Scroll chat display one page down" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaPageDown);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaPageDown);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatToStart, "", "Scroll chat display to top of buffer" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaGoToBegin);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaGoToBegin);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatToEnd, "", "Scroll chat display to bottom of buffer" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaGoToEnd);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaGoToEnd);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KITakePicture, "", "Take picture with KI" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKITakePicture);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKITakePicture);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KICreateJournal, "", "Create journal note entry" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateJournalNote);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateJournalNote);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatToggleFaded, "", "Toggle fade of chat display" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIToggleFade);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIToggleFade);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIChatToggleFadeEnable, "", "Toggle enable of chat fade" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIToggleFadeEnable);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIToggleFadeEnable);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIUpSizeFont, "", "Up size the KI font (chatarea)" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIUpSizeFont);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIUpSizeFont);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIDownSizeFont, "", "Down size the KI font (chatarea)" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIDownSizeFont);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIDownSizeFont);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIOpenYeeshaBook, "", "Open the player's Yeesha book" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIOpenYeehsaBook);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIOpenYeehsaBook);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIOpenKI, "", "Open the KI a little at a time" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIOpenKI);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIOpenKI);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KIHelp, "", "Open the CCR help dialog" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIShowCCRHelp);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIShowCCRHelp);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KICreateMarker, "", "Create marker in the working marker folder" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateMarker);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateMarker);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, KICreateMarkerFolder, "", "Create marker folder in current Age's journal folder" )
|
||||
{
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateMarkerFolder);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateMarkerFolder);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Game, SetChatFadeDelay, "float delayInSecs", "Sets the time in seconds before the chat text disappears" )
|
||||
{
|
||||
// pfKI::GetInstance()->SetChatFadeDelay( params[ 0 ] );
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kSetChatFadeDelay);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kSetChatFadeDelay);
|
||||
msg->SetDelay( params[0] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
@ -448,7 +448,7 @@ PF_CONSOLE_CMD( Game_Emote, Sit, "", "")
|
||||
PF_CONSOLE_CMD( Game, SetLocalClientAsAdmin, "bool enable", "Makes chat messages from this client appear as admin messages" )
|
||||
{
|
||||
// pfKI::GetInstance()->SetTextChatAdminMode( (bool)params[ 0 ] );
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kSetTextChatAdminMode);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kSetTextChatAdminMode);
|
||||
msg->SetFlags( params[0] ? pfKIMsg::kAdminMsg : 0 );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
Reference in New Issue
Block a user