2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-13 18:17:49 -04:00

Merge remote-tracking branch 'origin/master' into plString

Conflicts:
	Sources/Plasma/FeatureLib/pfPython/pyVault.cpp
	Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp
	Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp
	Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp
	Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

--HG--
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxStr.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxStr.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxSync.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxSync.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxUuid.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxUuid.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/W32Int.h => Sources/Plasma/NucleusLib/pnUtils/Win32/W32Int.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Dll.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Misc.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Str.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Time.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Uuid.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAddr.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAddr.h => Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAllIncludes.h => Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtArray.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h => Sources/Plasma/NucleusLib/pnUtils/pnUtArray.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtBase64.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.h => Sources/Plasma/NucleusLib/pnUtils/pnUtBase64.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtBigNum.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.h => Sources/Plasma/NucleusLib/pnUtils/pnUtBigNum.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtCmd.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCmd.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCoreLib.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCoreLib.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtHash.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h => Sources/Plasma/NucleusLib/pnUtils/pnUtHash.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtList.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h => Sources/Plasma/NucleusLib/pnUtils/pnUtList.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMath.h => Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMisc.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtMisc.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMisc.h => Sources/Plasma/NucleusLib/pnUtils/pnUtMisc.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPath.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtPath.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPath.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPath.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPragma.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPragma.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPriQ.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPriQ.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRand.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtRand.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRand.h => Sources/Plasma/NucleusLib/pnUtils/pnUtRand.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h => Sources/Plasma/NucleusLib/pnUtils/pnUtRef.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSort.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtSpareList.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSpareList.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtStr.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtStr.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtStr.h => Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSync.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSync.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTime.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTime.h => Sources/Plasma/NucleusLib/pnUtils/pnUtTime.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTls.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtTls.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTls.h => Sources/Plasma/NucleusLib/pnUtils/pnUtTls.h
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtUuid.cpp
rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h => Sources/Plasma/NucleusLib/pnUtils/pnUtUuid.h
This commit is contained in:
2012-02-05 22:01:09 -08:00
280 changed files with 1099 additions and 1881 deletions

View File

@ -45,6 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "pfPython/cyPythonInterface.h"
#include "HeadSpin.h"
#include "pfConsole.h"
#include "pfConsoleCore/pfConsoleEngine.h"
@ -62,7 +64,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
#include "plPipeline.h"
#include "pfPython/cyPythonInterface.h"
#include "plNetClient/plNetClientMgr.h"
#ifndef PLASMA_EXTERNAL_RELEASE
@ -225,7 +226,6 @@ void pfConsole::Init( pfConsoleEngine *engine )
fWorkingCursor = 0;
memset( fHistory, 0, sizeof( fHistory ) );
fHistoryCursor = fHistoryRecallCursor = 0;
fEffectCounter = 0;
fMode = 0;
@ -540,8 +540,9 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
static hsBool findAgain = false;
static uint32_t findCounter = 0;
if( !msg->GetKeyDown() )
// filter out keyUps and ascii control characters
// as the control functions are handled on the keyDown event
if( !msg->GetKeyDown() || (msg->GetKeyChar() > '\0' && msg->GetKeyChar() < ' '))
return;
if( msg->GetKeyCode() == KEY_ESCAPE )
@ -625,11 +626,11 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
}
else if( msg->GetKeyCode() == KEY_UP )
{
i = ( fHistoryRecallCursor > 0 ) ? fHistoryRecallCursor - 1 : kNumHistoryItems - 1;
if( fHistory[ i ][ 0 ] != 0 )
i = ( fHistory[ fPythonMode ].fRecallCursor > 0 ) ? fHistory[ fPythonMode ].fRecallCursor - 1 : kNumHistoryItems - 1;
if( fHistory[ fPythonMode ].fData[ i ][ 0 ] != 0 )
{
fHistoryRecallCursor = i;
strcpy( fWorkingLine, fHistory[ fHistoryRecallCursor ] );
fHistory[ fPythonMode ].fRecallCursor = i;
strcpy( fWorkingLine, fHistory[ fPythonMode ].fData[ fHistory[ fPythonMode ].fRecallCursor ] );
findAgain = false;
findCounter = 0;
fWorkingCursor = strlen( fWorkingLine );
@ -638,18 +639,18 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
}
else if( msg->GetKeyCode() == KEY_DOWN )
{
if( fHistoryRecallCursor != fHistoryCursor )
if( fHistory[ fPythonMode ].fRecallCursor != fHistory[ fPythonMode ].fCursor )
{
i = ( fHistoryRecallCursor < kNumHistoryItems - 1 ) ? fHistoryRecallCursor + 1 : 0;
if( i != fHistoryCursor )
i = ( fHistory[ fPythonMode ].fRecallCursor < kNumHistoryItems - 1 ) ? fHistory[ fPythonMode ].fRecallCursor + 1 : 0;
if( i != fHistory[ fPythonMode ].fCursor )
{
fHistoryRecallCursor = i;
strcpy( fWorkingLine, fHistory[ fHistoryRecallCursor ] );
fHistory[ fPythonMode ].fRecallCursor = i;
strcpy( fWorkingLine, fHistory[ fPythonMode ].fData[ fHistory[ fPythonMode ].fRecallCursor ] );
}
else
{
memset( fWorkingLine, 0, sizeof( fWorkingLine ) );
fHistoryRecallCursor = fHistoryCursor;
fHistory[ fPythonMode ].fRecallCursor = fHistory[ fPythonMode ].fCursor;
}
findAgain = false;
findCounter = 0;
@ -725,9 +726,9 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
if( fWorkingLine[ 0 ] != 0 )
{
// Save to history
strcpy( fHistory[ fHistoryCursor ], fWorkingLine );
fHistoryCursor = ( fHistoryCursor < kNumHistoryItems - 1 ) ? fHistoryCursor + 1 : 0;
fHistoryRecallCursor = fHistoryCursor;
strcpy( fHistory[ fPythonMode ].fData[ fHistory[ fPythonMode ].fCursor ], fWorkingLine );
fHistory[ fPythonMode ].fCursor = ( fHistory[ fPythonMode ].fCursor < kNumHistoryItems - 1 ) ? fHistory[ fPythonMode ].fCursor + 1 : 0;
fHistory[ fPythonMode ].fRecallCursor = fHistory[ fPythonMode ].fCursor;
}
// EXECUTE!!! (warning: DESTROYS fWorkingLine)
@ -771,10 +772,10 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
for ( i=fPythonMultiLines; i>0 ; i--)
{
// reach back in the history and find this line and paste it in here
int recall = fHistoryCursor - i;
int recall = fHistory[ fPythonMode ].fCursor - i;
if ( recall < 0 )
recall += kNumHistoryItems;
strcat(biglines,fHistory[ recall ]);
strcat(biglines,fHistory[ fPythonMode ].fData[ recall ]);
strcat(biglines,"\n");
}
// now evaluate this mess they made
@ -873,7 +874,7 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
}
}
// or are they just typing in a working line
else if( fWorkingCursor < kMaxCharsWide - 2 && key != 0 )
else if( strlen( fWorkingLine ) < kMaxCharsWide - 2 && key != 0 )
{
for( i = strlen( fWorkingLine ) + 1; i > fWorkingCursor; i-- )
fWorkingLine[ i ] = fWorkingLine[ i - 1 ];
@ -1141,7 +1142,7 @@ void pfConsole::Draw( plPipeline *p )
strcpy( tmp, "]" );
drawText.DrawString( 10, y, tmp, 255, 255, 255, 255 );
i = 10 + drawText.CalcStringWidth( tmp ) + 4;
i = 19 + drawText.CalcStringWidth( tmp );
drawText.DrawString( i, y, fWorkingLine, fConsoleTextColor );
if( fCursorTicks >= 0 )
@ -1214,7 +1215,7 @@ void pfConsole::AddLineF(const char * fmt, ...) {
char str[1024];
va_list args;
va_start(args, fmt);
_vsnprintf(str, arrsize(str), fmt, args);
hsVsnprintf(str, arrsize(str), fmt, args);
va_end(args);
AddLine(str);
}

View File

@ -76,6 +76,7 @@ class pfConsole : public hsKeyedObject
enum Konstants
{
kNumHistoryItems = 16,
kNumHistoryTypes = 2,
kModeHidden = 0,
kModeSingleLine = 1,
kModeFull = 2,
@ -100,8 +101,10 @@ class pfConsole : public hsKeyedObject
short fCursorTicks;
uint32_t fMsgTimeoutTimer;
char fHistory[ kNumHistoryItems ][ kMaxCharsWide ];
uint32_t fHistoryCursor, fHistoryRecallCursor;
struct _fHistory {
char fData[ kNumHistoryItems ][ kMaxCharsWide ];
uint32_t fCursor, fRecallCursor;
} fHistory[ kNumHistoryTypes ];
char *fDisplayBuffer;
char fWorkingLine[ kWorkingLineSize ];
uint32_t fWorkingCursor;
@ -114,7 +117,7 @@ class pfConsole : public hsKeyedObject
static uint32_t fConsoleTextColor;
static pfConsole *fTheConsole;
static void _cdecl IAddLineCallback( const char *string );
static void CDECL IAddLineCallback( const char *string );
static plPipeline *fPipeline;

View File

@ -49,6 +49,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define LIMIT_CONSOLE_COMMANDS 1
#endif
#include "pfPython/cyPythonInterface.h"
#include "pfPython/plPythonSDLModifier.h"
#include "pfConsoleCore/pfConsoleCmd.h"
#include "plgDispatch.h"
@ -163,10 +165,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsStlUtils.h"
#include "hsTemplates.h"
#include "pfPython/cyPythonInterface.h"
#include "pfPython/plPythonSDLModifier.h"
#include "plResMgr/plResManagerHelper.h"
#include "plResMgr/plResMgrSettings.h"
#include "plResMgr/plLocalization.h"
@ -2466,11 +2464,10 @@ PF_CONSOLE_CMD( App, // groupName
"", // paramList
"Quit the client app" ) // helpString
{
if( plClient::GetInstance() )
PostMessage(plClient::GetInstance()->GetWindowHandle(),
WM_SYSCOMMAND,
SC_CLOSE,
0);
if( plClient::GetInstance() ) {
plClientMsg* msg = new plClientMsg(plClientMsg::kQuit);
msg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));
}
}
#ifndef LIMIT_CONSOLE_COMMANDS
@ -2510,8 +2507,12 @@ PF_CONSOLE_CMD(App,
"",
"Set low priority for this process")
{
#if HS_BUILD_FOR_WIN32
SetPriorityClass( GetCurrentProcess(), IDLE_PRIORITY_CLASS );
PrintString( "Set process priority to lowest setting" );
#else
PrintString("Not implemented on your platform!");
#endif
}
@ -3932,6 +3933,8 @@ PF_CONSOLE_CMD( Nav, PageInNodeList, // Group name, Function name
"string roomNameBase", // Params
"Pages in all scene nodes that start with name." ) // Help string
{
/* This is really old and hasn't worked since 2002 anyways. */
#if HS_BUILD_FOR_WIN32
plSynchEnabler ps(false); // disable dirty tracking while paging in
std::string pageInNodesStr;
@ -3949,6 +3952,7 @@ PF_CONSOLE_CMD( Nav, PageInNodeList, // Group name, Function name
}
pMsg1->AddReceiver( plClient::GetInstance()->GetKey() );
plgDispatch::MsgSend(pMsg1);
#endif
}
#ifndef LIMIT_CONSOLE_COMMANDS

View File

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif
#include "pfPython/plPythonSDLModifier.h"
#include "pfConsoleCore/pfConsoleCmd.h"
#include "plgDispatch.h"
@ -355,7 +356,8 @@ PF_CONSOLE_CMD( Net, // groupName
link.GetAgeInfo()->SetAgeFilename( params[0] );
//link.GetAgeInfo()->SetAgeInstanceName( params[0] );
//link.GetAgeInfo()->SetAgeUserDefinedName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID( params[1] ) );
plUUID guid(params[1]);
link.GetAgeInfo()->SetAgeInstanceGuid( &guid );
link.SetLinkingRules( plNetCommon::LinkingRules::kBasicLink );
plNetLinkingMgr::GetInstance()->LinkToAge( &link );
PrintString("Linking to age...");
@ -637,7 +639,6 @@ PF_CONSOLE_CMD( Net_DebugObject, // groupName
plNetObjectDebugger::GetInstance()->ClearAllDebugObjects();
}
#include "pfPython/plPythonSDLModifier.h"
PF_CONSOLE_CMD( Net_DebugObject, // groupName
DumpAgeSDLHook, // fxnName
"bool dirtyOnly", // paramList
@ -810,7 +811,8 @@ PF_CONSOLE_CMD( Net_Vault,
plAgeLinkStruct link;
link.GetAgeInfo()->SetAgeFilename( params[0] );
link.GetAgeInfo()->SetAgeInstanceName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID(GuidGenerate()));
plUUID guid(GuidGenerate());
link.GetAgeInfo()->SetAgeInstanceGuid( &guid);
link.SetSpawnPoint( kDefaultSpawnPoint );
bool success = VaultRegisterOwnedAgeAndWait(&link);
PrintStringF(PrintString, "Operation %s.", success ? "Successful" : "Failed");
@ -837,7 +839,8 @@ PF_CONSOLE_CMD( Net_Vault,
plAgeLinkStruct link;
link.GetAgeInfo()->SetAgeFilename( params[0] );
link.GetAgeInfo()->SetAgeInstanceName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID(GuidGenerate()));
plUUID guid(GuidGenerate());
link.GetAgeInfo()->SetAgeInstanceGuid( &guid);
link.SetSpawnPoint( kDefaultSpawnPoint );
bool success = VaultRegisterOwnedAgeAndWait(&link);
PrintStringF(PrintString, "Operation %s.", success ? "Successful" : "Failed");