mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00: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:
@ -117,7 +117,7 @@ typedef int (__stdcall * Pfunc1) (const DIDEVICEINSTANCE* device, void* pRef);
|
||||
|
||||
plInputManager* plInputManager::fInstance = nil;
|
||||
|
||||
plInputManager::plInputManager( HWND hWnd ) :
|
||||
plInputManager::plInputManager( hsWindowHndl hWnd ) :
|
||||
fDInputMgr(nil),
|
||||
fInterfaceMgr(nil)
|
||||
{
|
||||
@ -178,7 +178,7 @@ void plInputManager::CreateInterfaceMod(plPipeline* p)
|
||||
fInterfaceMgr->Init();
|
||||
}
|
||||
|
||||
void plInputManager::InitDInput(HINSTANCE hInst, HWND hWnd)
|
||||
void plInputManager::InitDInput(hsWindowInst hInst, hsWindowHndl hWnd)
|
||||
{
|
||||
if (fUseDInput)
|
||||
{
|
||||
@ -259,8 +259,9 @@ plKeyDef plInputManager::UntranslateKey(plKeyDef key, hsBool extended)
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM Lparam, HWND hWnd)
|
||||
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM Lparam, hsWindowHndl hWnd)
|
||||
{
|
||||
if( !fhWnd )
|
||||
fhWnd = hWnd;
|
||||
@ -294,7 +295,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM
|
||||
break;
|
||||
|
||||
BYTE scan = (BYTE)(Lparam >> 16);
|
||||
UINT vkey = MapVirtualKey(scan, MAPVK_VSC_TO_VK);
|
||||
UINT vkey = MapVirtualKey(scan, 1); //MAPVK_VSC_TO_VK
|
||||
|
||||
bExtended = Lparam >> 24 & 1;
|
||||
hsBool bRepeat = ((Lparam >> 29) & 0xf) != 0;
|
||||
@ -431,6 +432,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
//// Activate ////////////////////////////////////////////////////////////////
|
||||
// Handles what happens when the app (window) activates/deactivates
|
||||
|
@ -62,7 +62,7 @@ private:
|
||||
static hsBool fUseDInput;
|
||||
public:
|
||||
plInputManager();
|
||||
plInputManager( HWND hWnd );
|
||||
plInputManager( hsWindowHndl hWnd );
|
||||
~plInputManager();
|
||||
|
||||
CLASSNAME_REGISTER( plInputManager );
|
||||
@ -70,7 +70,7 @@ public:
|
||||
|
||||
|
||||
void AddInputDevice(plInputDevice* pDev);
|
||||
void InitDInput(HINSTANCE hInst, HWND hWnd);
|
||||
void InitDInput(hsWindowInst hInst, hsWindowHndl hWnd);
|
||||
|
||||
static void UseDInput(hsBool b) { fUseDInput = b; }
|
||||
void Update();
|
||||
@ -97,16 +97,19 @@ protected:
|
||||
bool fActive, fFirstActivated;
|
||||
|
||||
float fMouseScale;
|
||||
static uint8_t bRecenterMouse;
|
||||
static HWND fhWnd;
|
||||
static uint8_t bRecenterMouse;
|
||||
static hsWindowHndl fhWnd;
|
||||
|
||||
public:
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
// event handlers
|
||||
void HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM Lparam, HWND hWnd);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
// {049DE53E-23A2-4d43-BF68-36AC1B57E357}
|
||||
static const GUID PL_ACTION_GUID = { 0x49de53e, 0x23a2, 0x4d43, { 0xbf, 0x68, 0x36, 0xac, 0x1b, 0x57, 0xe3, 0x57 } };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ plSceneInputInterface::plSceneInputInterface()
|
||||
{
|
||||
fPipe = nil;
|
||||
fSpawnPoint = nil;
|
||||
GuidClear(&fAgeInstanceGuid);
|
||||
fAgeInstanceGuid.Clear();
|
||||
fInstance = this;
|
||||
SetEnabled( true ); // Always enabled
|
||||
}
|
||||
@ -608,7 +608,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
|
||||
if (fBookMode == kBookOffered)
|
||||
{
|
||||
// and put our own dialog back up...
|
||||
ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false);
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
ISendOfferNotification(avKey, 0, false);
|
||||
//IManageIgnoredAvatars(fOffereeKey, false);
|
||||
fOffereeKey = nil;
|
||||
fBookMode = kNotOffering;
|
||||
@ -627,7 +628,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
|
||||
// tell them to ignore us
|
||||
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
|
||||
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
pMsg->SetAvKey(avKey);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
pMsg->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
@ -754,7 +756,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
|
||||
if (fBookMode == kBookOffered)
|
||||
{
|
||||
// and put our own dialog back up...
|
||||
ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false);
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
ISendOfferNotification(avKey, 0, false);
|
||||
//IManageIgnoredAvatars(fOffereeKey, false);
|
||||
fBookMode = kOfferBook;
|
||||
fOffereeKey = nil;
|
||||
@ -790,7 +793,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
|
||||
}
|
||||
else if ( mgrMsg->GetCommand() == plInputIfaceMgrMsg::kSetShareAgeInstanceGuid )
|
||||
{
|
||||
fAgeInstanceGuid = mgrMsg->GetAgeInstanceGuid();
|
||||
fAgeInstanceGuid = plUUID(mgrMsg->GetAgeInstanceGuid());
|
||||
}
|
||||
}
|
||||
plVaultNotifyMsg* pVaultMsg = plVaultNotifyMsg::ConvertNoRef(msg);
|
||||
@ -817,20 +820,21 @@ void plSceneInputInterface::ILinkOffereeToAge()
|
||||
info.SetAgeFilename(fOfferedAgeFile);
|
||||
info.SetAgeInstanceName(fOfferedAgeInstance);
|
||||
|
||||
bool isAgeInstanceGuidSet = !GuidIsNil(fAgeInstanceGuid);
|
||||
bool isAgeInstanceGuidSet = fAgeInstanceGuid.IsSet();
|
||||
|
||||
plAgeLinkStruct link;
|
||||
|
||||
if (isAgeInstanceGuidSet) {
|
||||
info.SetAgeInstanceGuid(&plUUID(fAgeInstanceGuid));
|
||||
info.SetAgeInstanceGuid(&fAgeInstanceGuid);
|
||||
link.GetAgeInfo()->CopyFrom(&info);
|
||||
|
||||
GuidClear(&fAgeInstanceGuid);
|
||||
fAgeInstanceGuid.Clear();
|
||||
}
|
||||
else if (!VaultGetOwnedAgeLink(&info, &link)) {
|
||||
|
||||
// We must have an owned copy of the age before we can offer it, so make one now
|
||||
info.SetAgeInstanceGuid(&plUUID(GuidGenerate()));
|
||||
plUUID guid(GuidGenerate());
|
||||
info.SetAgeInstanceGuid(&guid);
|
||||
std::string title;
|
||||
std::string desc;
|
||||
|
||||
@ -858,7 +862,8 @@ void plSceneInputInterface::ILinkOffereeToAge()
|
||||
VaultAgeLinkNode linkAcc(linkNode);
|
||||
if (linkAcc.volat) {
|
||||
if (VaultUnregisterOwnedAgeAndWait(link.GetAgeInfo())) {
|
||||
link.GetAgeInfo()->SetAgeInstanceGuid(&plUUID(GuidGenerate()));
|
||||
plUUID guid(GuidGenerate());
|
||||
link.GetAgeInfo()->SetAgeInstanceGuid(&guid);
|
||||
VaultRegisterOwnedAgeAndWait(&link);
|
||||
}
|
||||
}
|
||||
@ -882,7 +887,8 @@ void plSceneInputInterface::ILinkOffereeToAge()
|
||||
if (!fPendingLink && stricmp(fOfferedAgeFile, kPersonalAgeFilename))
|
||||
{
|
||||
// tell our local dialog to pop up again...
|
||||
ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false);
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
ISendOfferNotification(avKey, 0, false);
|
||||
// make them clickable again(in case they come back?)
|
||||
//IManageIgnoredAvatars(fOffereeKey, false);
|
||||
|
||||
@ -1041,7 +1047,8 @@ hsBool plSceneInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
{
|
||||
// and put our own dialog back up...
|
||||
ISendOfferNotification(fOffereeKey, -999, true);
|
||||
ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false);
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
ISendOfferNotification(avKey, 0, false);
|
||||
//IManageIgnoredAvatars(fOffereeKey, false);
|
||||
fBookMode = kOfferBook;
|
||||
fOffereeKey = nil;
|
||||
@ -1138,7 +1145,8 @@ void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled)
|
||||
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable);
|
||||
else
|
||||
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
|
||||
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
pMsg->SetAvKey(avKey);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
pMsg->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
@ -1236,4 +1244,4 @@ uint32_t plSceneInputInterface::SetCurrentCursorID(uint32_t id)
|
||||
void plSceneInputInterface::RequestAvatarTurnToPointLOS()
|
||||
{
|
||||
IRequestLOSCheck( plMouseDevice::Instance()->GetCursorX(), plMouseDevice::Instance()->GetCursorY(), ID_FIND_WALKABLE_GROUND );
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plInputInterface.h"
|
||||
#include "hsGeometry3.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "pnUtils/pnUtils.h"
|
||||
#include "pnUUID/pnUUID.h"
|
||||
|
||||
//// Class Definition ////////////////////////////////////////////////////////
|
||||
|
||||
@ -86,7 +86,7 @@ class plSceneInputInterface : public plInputInterface
|
||||
const char* fOfferedAgeFile;
|
||||
const char* fOfferedAgeInstance;
|
||||
const char* fSpawnPoint;
|
||||
Uuid fAgeInstanceGuid;
|
||||
plUUID fAgeInstanceGuid;
|
||||
struct clickableTest
|
||||
{
|
||||
clickableTest(plKey k)
|
||||
|
Reference in New Issue
Block a user