1
0
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/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:
2012-01-28 17:20:01 -08:00
1722 changed files with 24149 additions and 27599 deletions

View File

@ -49,9 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//#define LIMIT_VOICE_CHAT 1
#endif
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plAvatarInputInterface.h"
#include "pnInputCore/plKeyMap.h"
@ -80,7 +78,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsResMgr.h"
#include "plgDispatch.h"
#include "hsConfig.h"
#include "hsMatrix44.h"
#include "pnSceneObject/plSceneObject.h"
#include "pnSceneObject/plCoordinateInterface.h"
@ -210,7 +207,7 @@ void plAvatarInputInterface::IDeactivateCommand(plMouseInfo *info)
if (IHasControlFlag(info->fCode) && !(info->fControlFlags & (kControlFlagNoDeactivate | kControlFlagToggle)))
{
// The mapping is currently on, it's ok to deactivate, and it's not a toggle command
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fNetPropagateToPlayers = info->fControlFlags & kControlFlagNetPropagate;
pCmd->fControlActivated = false;
pCmd->fControlCode = info->fCode;
@ -243,26 +240,26 @@ void plAvatarInputInterface::IChangeInputMaps( plAvatarInputMap *newMap )
void plAvatarInputInterface::ISetSuspendMovementMode()
{
IChangeInputMaps(TRACKED_NEW plSuspendedMovementMap());
IChangeInputMaps(new plSuspendedMovementMap());
fCurrentCursor = kCursorUp;
}
void plAvatarInputInterface::ISetLadderMap()
{
IChangeInputMaps(TRACKED_NEW plLadderControlMap());
IChangeInputMaps(new plLadderControlMap());
fCurrentCursor = kCursorUp;
}
void plAvatarInputInterface::ISetPreLadderMap()
{
IChangeInputMaps(TRACKED_NEW plLadderMountMap());
IChangeInputMaps(new plLadderMountMap());
fCurrentCursor = kCursorUp;
}
void plAvatarInputInterface::ISetPostLadderMap()
{
IChangeInputMaps(TRACKED_NEW plLadderDismountMap());
IChangeInputMaps(new plLadderDismountMap());
fCurrentCursor = kCursorUp;
}
@ -270,9 +267,9 @@ void plAvatarInputInterface::ISetBasicMode()
{
plAvatarInputMap *map;
if (!f3rdPerson)
map = TRACKED_NEW plBasicFirstPersonControlMap();
map = new plBasicFirstPersonControlMap();
else
map = TRACKED_NEW plBasicThirdPersonControlMap();
map = new plBasicThirdPersonControlMap();
IChangeInputMaps(map);
fCurrentCursor = kCursorUp;
@ -281,11 +278,11 @@ void plAvatarInputInterface::ISetBasicMode()
void plAvatarInputInterface::ISetMouseWalkMode(ControlEventCode code)
{
if (code == S_SET_WALK_BACK_MODE)
IChangeInputMaps(TRACKED_NEW pl3rdWalkBackwardMap());
IChangeInputMaps(new pl3rdWalkBackwardMap());
else if (code == S_SET_WALK_BACK_LB_MODE)
IChangeInputMaps(TRACKED_NEW pl3rdWalkBackwardLBMap());
IChangeInputMaps(new pl3rdWalkBackwardLBMap());
else
IChangeInputMaps(TRACKED_NEW pl3rdWalkForwardMap());
IChangeInputMaps(new pl3rdWalkForwardMap());
fCurrentCursor = kCursorHidden;
}
@ -416,7 +413,7 @@ void plAvatarInputInterface::EnableControl(hsBool val, ControlEventCode code)
void plAvatarInputInterface::ForceAlwaysRun(hsBool val)
{
plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd *pCmd = new plCtrlCmd( this );
pCmd->fControlCode = B_CONTROL_ALWAYS_RUN;
pCmd->fControlActivated = val;
pCmd->fNetPropagateToPlayers = false;
@ -427,7 +424,7 @@ void plAvatarInputInterface::ForceAlwaysRun(hsBool val)
//// IEval ///////////////////////////////////////////////////////////////////
// Gets called once per IUpdate(), just like normal IEval()s
hsBool plAvatarInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
hsBool plAvatarInputInterface::IEval( double secs, float del, uint32_t dirty )
{
fCursorTimeout += del;
if( fCursorTimeout > fCursorFadeDelay )
@ -481,7 +478,7 @@ hsBool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd )
#if 0
case S_SET_FIRST_PERSON_MODE:
if( cmd->fControlActivated )
IChangeInputMaps( TRACKED_NEW plFirstPersonControlMap() );
IChangeInputMaps( new plFirstPersonControlMap() );
return true;
#endif
case S_SET_BASIC_MODE:
@ -489,7 +486,7 @@ hsBool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd )
{
ISetBasicMode();
#if 0
plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plgDispatch::MsgSend(Dmsg);
plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy);
#endif
@ -509,7 +506,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta
abort = true;
#if 0
plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plgDispatch::MsgSend(Dmsg);
plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy);
#endif
@ -534,7 +531,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta
abort = true;
#if 0
plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plgDispatch::MsgSend(Dmsg);
plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy);
#endif
@ -559,7 +556,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta
abort = true;
#if 0
plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy);
plgDispatch::MsgSend(Dmsg);
plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy);
#endif
@ -585,14 +582,14 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta
if (fMessageQueue[i]->fControlActivated)
{
// send a 'picked' message to the picked object
plPickedMsg* pPickedMsg = TRACKED_NEW plPickedMsg;
plPickedMsg* pPickedMsg = new plPickedMsg;
pPickedMsg->AddReceiver(fCurrentClickable);
plgDispatch::MsgSend(pPickedMsg);
}
else
{
// send an 'unpicked message'
plPickedMsg* pPickedMsg = TRACKED_NEW plPickedMsg;
plPickedMsg* pPickedMsg = new plPickedMsg;
pPickedMsg->AddReceiver(fCurrentClickable);
pPickedMsg->fPicked = false;
plgDispatch::MsgSend(pPickedMsg);
@ -671,7 +668,7 @@ void plAvatarInputInterface::MissedInputEvent( plInputEventMsg *pMsg )
if( IHasKeyControlFlag( binding.GetCode() ) && binding.GetCode() != B_CONTROL_ALWAYS_RUN )
{
plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd *pCmd = new plCtrlCmd( this );
pCmd->fControlCode = binding.GetCode();
pCmd->fControlActivated = false;
pCmd->SetCmdString( binding.GetExtendedString() );
@ -727,7 +724,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
plMouseEventMsg* pMouseMsg = plMouseEventMsg::ConvertNoRef(pMsg);
if (pMouseMsg)
{
UInt32 oldButtonState = fInputMap->fButtonState;
uint32_t oldButtonState = fInputMap->fButtonState;
// check for button presses...
if (fInputMap->fButtonState & kLeftButtonDown)
@ -845,10 +842,10 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
if ((mouseMap->fMap[i]->fControlFlags & kControlFlagRangePos) || (mouseMap->fMap[i]->fControlFlags & kControlFlagRangeNeg))
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = true;
pCmd->fControlCode = mouseMap->fMap[i]->fCode;
hsScalar pct = 0.0f;
float pct = 0.0f;
if (mouseMap->fMap[i]->fControlFlags & kControlFlagRangePos)
{
if (mouseMap->fMap[i]->fControlFlags & kControlFlagXAxisEvent)
@ -875,10 +872,10 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
}
if (mouseMap->fMap[i]->fControlFlags & kControlFlagDelta)
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = true;
pCmd->fControlCode = mouseMap->fMap[i]->fCode;
hsScalar pct = 0.0f;
float pct = 0.0f;
if (mouseMap->fMap[i]->fControlFlags & kControlFlagXAxisEvent)
pct = pMouseMsg->GetDX();
@ -899,7 +896,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
else // if it is an 'always if in box' command see if it's not in the box
if ( (mouseMap->fMap[i]->fControlFlags & kControlFlagInBox) && (!CursorInBox(pMouseMsg, mouseMap->fMap[i]->fBox)) )
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = false;
pCmd->fControlCode = mouseMap->fMap[i]->fCode;
pCmd->fNetPropagateToPlayers = mouseMap->fMap[i]->fControlFlags & kControlFlagNetPropagate;
@ -953,13 +950,13 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
if (!(mouseMap->fMap[i]->fControlFlags & kControlFlagInBox))
SetControlFlag(mouseMap->fMap[i]->fCode);
// issue the command
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = true;
pCmd->fControlCode = mouseMap->fMap[i]->fCode;
pCmd->fNetPropagateToPlayers = mouseMap->fMap[i]->fControlFlags & kControlFlagNetPropagate;
// figure out what percent (if any)
hsScalar pct = 0.0f;
float pct = 0.0f;
if (mouseMap->fMap[i]->fControlFlags & kControlFlagRangePos)
{
if (mouseMap->fMap[i]->fControlFlags & kControlFlagXAxisEvent)
@ -1022,7 +1019,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
plAvatarInputMap::plAvatarInputMap()
{
fMouseMap = TRACKED_NEW plMouseMap;
fMouseMap = new plMouseMap;
fButtonState = 0;
fInterface = plAvatarInputInterface::GetInstance();
@ -1035,50 +1032,50 @@ plAvatarInputMap::~plAvatarInputMap()
plSuspendedMovementMap::plSuspendedMovementMap() : plAvatarInputMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ACTION_MOUSE, kControlFlagLeftButtonEx, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_PICK, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ACTION_MOUSE, kControlFlagLeftButtonEx, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_PICK, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") );
}
plBasicControlMap::plBasicControlMap() : plSuspendedMovementMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ROTATE_RIGHT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.95f, 1.0f, 0.0f, 1.0f, "Rotate Player Right") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ROTATE_LEFT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 0.05f, 0.0f, 1.0f, "Rotate Player Left") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ROTATE_RIGHT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.95f, 1.0f, 0.0f, 1.0f, "Rotate Player Right") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ROTATE_LEFT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 0.05f, 0.0f, 1.0f, "Rotate Player Left") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_TURN_TO, kControlFlagLeftButtonEx, 0.05f, 0.95f, 0.0f, 0.95f, "Turn to") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Walk Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_BACK_LB_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.95f, 1.0f, "Set Walk Back LB Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_BACK_MODE, kControlFlagMiddleButton, 0.05f, 0.95f, 0.0f, 1.0f, "Set Walk Back Mode") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_TURN_TO, kControlFlagLeftButtonEx, 0.05f, 0.95f, 0.0f, 0.95f, "Turn to") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Walk Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_BACK_LB_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.95f, 1.0f, "Set Walk Back LB Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_BACK_MODE, kControlFlagMiddleButton, 0.05f, 0.95f, 0.0f, 1.0f, "Set Walk Back Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_UP, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.0f, 0.95f, "set cursor up") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.95f, 1.0f, "set cursor down") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_RIGHT, kControlFlagNormal | kControlFlagInBox, 0.95f, 1.0f, 0.0f, 1.0f, "set cursor right") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_LEFT, kControlFlagNormal | kControlFlagInBox, 0.0f, 0.05f, 0.0f, 1.0f, "set cursor left") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_UP, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.0f, 0.95f, "set cursor up") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.95f, 1.0f, "set cursor down") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_RIGHT, kControlFlagNormal | kControlFlagInBox, 0.95f, 1.0f, 0.0f, 1.0f, "set cursor right") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_LEFT, kControlFlagNormal | kControlFlagInBox, 0.0f, 0.05f, 0.0f, 1.0f, "set cursor left") );
}
plLadderControlMap::plLadderControlMap() : plSuspendedMovementMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.0f, 0.5f, "Set Walk Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.5f, 1.0f, "Set Walk Back LB Mode") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.0f, 0.5f, "Set Walk Mode") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.5f, 1.0f, "Set Walk Back LB Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_UPWARD, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.0f, 0.5f, "set cursor up") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.5f, 1.0f, "set cursor down") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_UPWARD, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.0f, 0.5f, "set cursor up") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.5f, 1.0f, "set cursor down") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
}
plLadderMountMap::plLadderMountMap() : plSuspendedMovementMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") );
}
plLadderDismountMap::plLadderDismountMap() : plSuspendedMovementMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") );
}
@ -1086,22 +1083,22 @@ plLadderDismountMap::plLadderDismountMap() : plSuspendedMovementMap()
plBasicThirdPersonControlMap::plBasicThirdPersonControlMap() : plBasicControlMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Freelook Mode") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Freelook Mode") );
}
plBasicFirstPersonControlMap::plBasicFirstPersonControlMap() : plBasicControlMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(A_CONTROL_TURN, kControlFlagRightButtonRepeat | kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(A_CONTROL_TURN, kControlFlagRightButtonRepeat | kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") );
}
// also used in 1st person walk mode
pl3rdWalkMap::pl3rdWalkMap() : plAvatarInputMap()
{
// control special to this mode.
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MODIFIER_FAST, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Run Modifier" ) );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(A_CONTROL_TURN, kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MODIFIER_FAST, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Run Modifier" ) );
fMouseMap->AddMapping( new plMouseInfo(A_CONTROL_TURN, kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") );
plInputManager::SetRecenterMouse(true);
plMouseDevice::HideCursor();
@ -1117,22 +1114,22 @@ pl3rdWalkMap::~pl3rdWalkMap()
pl3rdWalkForwardMap::pl3rdWalkForwardMap() : pl3rdWalkMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk forward") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk forward") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
}
pl3rdWalkBackwardMap::pl3rdWalkBackwardMap() : pl3rdWalkMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
}
// same as the other backward walk map, but this one is triggered by the left mouse button.
pl3rdWalkBackwardLBMap::pl3rdWalkBackwardLBMap() : pl3rdWalkMap()
{
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") );
fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") );
fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") );
}

View File

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTemplates.h"
#include "hsGeometry3.h"
#include "hsUtils.h"
//// Class Definition ////////////////////////////////////////////////////////
@ -86,7 +86,7 @@ class plAvatarInputMap
virtual hsBool IsBasic() { return false; }
plMouseMap *fMouseMap;
UInt32 fButtonState;
uint32_t fButtonState;
};
// Basic avatar mappings, for when the avatar is in "suspended input" mode.
@ -178,8 +178,8 @@ class plAvatarInputInterface : public plInputInterface
{
protected:
UInt32 fCurrentCursor;
hsScalar fCursorOpacity, fCursorTimeout, fCursorFadeDelay;
uint32_t fCurrentCursor;
float fCursorOpacity, fCursorTimeout, fCursorFadeDelay;
plAvatarInputMap *fInputMap;
@ -188,7 +188,7 @@ class plAvatarInputInterface : public plInputInterface
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd );
// Gets called once per IUpdate(), just like normal IEval()s
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
virtual hsBool IEval( double secs, float del, uint32_t dirty );
void IDeactivateCommand(plMouseInfo *info);
void IChangeInputMaps(plAvatarInputMap *newMap);
@ -209,7 +209,7 @@ class plAvatarInputInterface : public plInputInterface
void Reset();
void RequestCursorToWorldPos(hsScalar xPos, hsScalar yPos, int ID);
void RequestCursorToWorldPos(float xPos, float yPos, int ID);
hsBitVector fControlFlags;
hsBool fMouseDisabled;
@ -228,9 +228,9 @@ class plAvatarInputInterface : public plInputInterface
// Always return true, since the cursor should be representing how we control the avatar
virtual hsBool HasInterestingCursorID( void ) const { return true; }
virtual UInt32 GetPriorityLevel( void ) const { return kAvatarInputPriority; }
virtual UInt32 GetCurrentCursorID( void ) const { return fCurrentCursor; }
virtual hsScalar GetCurrentCursorOpacity( void ) const { return fCursorOpacity; }
virtual uint32_t GetPriorityLevel( void ) const { return kAvatarInputPriority; }
virtual uint32_t GetCurrentCursorID( void ) const { return fCurrentCursor; }
virtual float GetCurrentCursorOpacity( void ) const { return fCursorOpacity; }
const char* GetInputMapName() { return fInputMap ? fInputMap->GetName() : ""; }
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg );
@ -256,7 +256,7 @@ class plAvatarInputInterface : public plInputInterface
void SetControlFlag(int f, hsBool val = true) { fControlFlags.SetBit(f, val); }
void SetCursorFadeDelay( hsScalar delay ) { fCursorFadeDelay = delay; }
void SetCursorFadeDelay( float delay ) { fCursorFadeDelay = delay; }
hsBool IsEnterChatModeBound();

View File

@ -41,8 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
// plDInputDevice.cpp
#include "hsConfig.h"
#include "hsWindows.h"
#include "HeadSpin.h"
#include "plDInputDevice.h"
#include "plgDispatch.h"
@ -75,7 +74,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
int i = (int)(js->dwData);
if (i <= -1)
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MOVE_FORWARD );
pMsg->SetControlActivated( true );
plgDispatch::MsgSend( pMsg );
@ -83,7 +82,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
else
if (i >= 1)
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD );
pMsg->SetControlActivated( true );
plgDispatch::MsgSend( pMsg );
@ -91,11 +90,11 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
else
if (i == 0)
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD );
pMsg->SetControlActivated( false );
plgDispatch::MsgSend( pMsg );
plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg2 = new plControlEventMsg;
pMsg2->SetControlCode( B_CONTROL_MOVE_FORWARD );
pMsg2->SetControlActivated( false );
plgDispatch::MsgSend( pMsg2 );
@ -107,7 +106,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
{
int i = (int)(js->dwData);
float f = ((float)i) * 0.001f;
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( A_CONTROL_TURN );
if (f <= 0.02 && f >= -0.02)
pMsg->SetControlActivated( false );
@ -119,7 +118,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_ACTION:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_ACTION );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -127,7 +126,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_MODIFIER_FAST:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MODIFIER_FAST );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -135,7 +134,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_JUMP:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_JUMP );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -143,7 +142,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_STRAFE_LEFT:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_STRAFE_LEFT );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -151,7 +150,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_STRAFE_RIGHT:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_STRAFE_RIGHT);
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -159,7 +158,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_EQUIP:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_EQUIP );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -167,7 +166,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_DROP:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_DROP );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -175,7 +174,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_MOVE_FORWARD:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MOVE_FORWARD );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -183,7 +182,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_MOVE_BACKWARD:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -191,7 +190,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_ROTATE_RIGHT:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_ROTATE_RIGHT);
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -199,7 +198,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_ROTATE_LEFT:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_ROTATE_LEFT );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -207,7 +206,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CONTROL_TURN_TO:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CONTROL_TURN_TO );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -215,7 +214,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
break;
case B_CAMERA_RECENTER:
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlCode( B_CAMERA_RECENTER );
pMsg->SetControlActivated(js->dwData & 0x80);
plgDispatch::MsgSend(pMsg);
@ -228,12 +227,12 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
float f = ((float)i) * 0.001f;
if (f <= 0.02 && f >= -0.02)
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlActivated( false );
pMsg->SetControlCode(B_CAMERA_ROTATE_DOWN);
pMsg->SetControlPct(0);
plgDispatch::MsgSend( pMsg );
plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg2 = new plControlEventMsg;
pMsg2->SetControlActivated( false );
pMsg2->SetControlCode(B_CAMERA_ROTATE_UP);
pMsg2->SetControlPct(0);
@ -241,7 +240,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
}
else
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlActivated( true );
if (f < 0)
pMsg->SetControlCode(B_CAMERA_ROTATE_DOWN);
@ -259,12 +258,12 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
float f = ((float)i) * 0.001f;
if (f <= 0.02 && f >= -0.02)
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlActivated( false );
pMsg->SetControlCode(B_CAMERA_ROTATE_RIGHT);
pMsg->SetControlPct(0);
plgDispatch::MsgSend( pMsg );
plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg2 = new plControlEventMsg;
pMsg2->SetControlActivated( false );
pMsg2->SetControlCode(B_CAMERA_ROTATE_LEFT);
pMsg2->SetControlPct(0);
@ -272,7 +271,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js)
}
else
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetControlActivated( true );
if (f < 0)
pMsg->SetControlCode(B_CAMERA_ROTATE_RIGHT);

View File

@ -59,7 +59,7 @@ public:
virtual void Update(DIDEVICEOBJECTDATA* js);
protected:
hsScalar fX,fY;
float fX,fY;
};

View File

@ -45,9 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plDebugInputInterface.h"
#include "plInputInterfaceMgr.h"
@ -61,7 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
#include "plPipeline.h"
#include "hsConfig.h"
plDebugInputInterface *plDebugInputInterface::fInstance = nil;
@ -139,7 +136,7 @@ void plDebugInputInterface::RestoreDefaultKeyMappings( void )
//// IEval ///////////////////////////////////////////////////////////////////
hsBool plDebugInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
hsBool plDebugInputInterface::IEval( double secs, float del, uint32_t dirty )
{
return true;
}
@ -228,7 +225,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
if (disable)
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate;
pCmd->fControlActivated = false;
pCmd->fControlCode = fMouseMap.fMap[i]->fCode;
@ -241,10 +238,10 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
if ((fMouseMap.fMap[i]->fControlFlags & kControlFlagRangePos) || (fMouseMap.fMap[i]->fControlFlags & kControlFlagRangeNeg))
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = true;
pCmd->fControlCode = fMouseMap.fMap[i]->fCode;
hsScalar pct = 0.0f;
float pct = 0.0f;
if (fMouseMap.fMap[i]->fControlFlags & kControlFlagRangePos)
{
if (fMouseMap.fMap[i]->fControlFlags & kControlFlagXAxisEvent)
@ -273,7 +270,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
else // if it is an 'always if in box' command see if it's not in the box
if ( (fMouseMap.fMap[i]->fControlFlags & kControlFlagInBox) && (!CursorInBox(pMouseMsg, fMouseMap.fMap[i]->fBox)) )
{
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = false;
pCmd->fControlCode = fMouseMap.fMap[i]->fCode;
pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate;
@ -313,13 +310,13 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
if (!(fMouseMap.fMap[i]->fControlFlags & kControlFlagInBox))
fControlFlags.SetBit(fMouseMap.fMap[i]->fCode);
// issue the command
plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd* pCmd = new plCtrlCmd( this );
pCmd->fControlActivated = true;
pCmd->fControlCode = fMouseMap.fMap[i]->fCode;
pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate;
// figure out what percent (if any)
hsScalar pct = 0.0f;
float pct = 0.0f;
if (fMouseMap.fMap[i]->fControlFlags & kControlFlagRangePos)
{
if (fMouseMap.fMap[i]->fControlFlags & kControlFlagXAxisEvent)

View File

@ -60,11 +60,11 @@ class plDebugInputInterface : public plInputInterface
{
protected:
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
virtual hsBool IEval( double secs, float del, uint32_t dirty );
hsBool CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box);
plMouseMap fMouseMap;
UInt32 fButtonState;
uint32_t fButtonState;
hsBitVector fControlFlags;
static plDebugInputInterface *fInstance;
@ -76,9 +76,9 @@ class plDebugInputInterface : public plInputInterface
// Always return false,
virtual hsBool HasInterestingCursorID( void ) const { return false; }
virtual UInt32 GetPriorityLevel( void ) const { return kDebugCmdPrioity; }
virtual uint32_t GetPriorityLevel( void ) const { return kDebugCmdPrioity; }
virtual void RestoreDefaultKeyMappings( void );
virtual UInt32 GetCurrentCursorID( void ) const { return 0; }
virtual uint32_t GetCurrentCursorID( void ) const { return 0; }
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg );

View File

@ -42,22 +42,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// plInputDevice.cpp
//#include "STRING"
#include "hsConfig.h"
#include "hsWindows.h"
#include "HeadSpin.h"
#include "plInputDevice.h"
#include "plInputManager.h"
#include "plAvatarInputInterface.h"
#include "plMessage/plInputEventMsg.h"
#include "pnMessage/plTimeMsg.h"
#include "hsUtils.h"
#include "plgDispatch.h"
#include "plPipeline/plPlates.h"
#include "plPipeline/plDebugText.h"
#include "plGImage/plMipmap.h"
#include "hsWindows.h"
#include "plPipeline.h"
// The resolution that uses the base size of the cursor.
@ -109,7 +108,7 @@ void plKeyboardDevice::ReleaseAllKeys()
fKeyboardState[i] = false;
// fake a key-up command
plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg;
plKeyEventMsg* pMsg = new plKeyEventMsg;
pMsg->SetKeyCode( (plKeyDef)i );
pMsg->SetKeyDown( false );
pMsg->SetShiftKeyDown( fShiftKeyDown );
@ -129,7 +128,7 @@ void plKeyboardDevice::ReleaseAllKeys()
fKeyboardState[KEY_SHIFT] = false;
fShiftKeyDown = false;
plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg;
plKeyEventMsg* pMsg = new plKeyEventMsg;
pMsg->SetKeyCode( KEY_SHIFT );
pMsg->SetKeyDown( false );
pMsg->SetShiftKeyDown( false );
@ -143,7 +142,7 @@ void plKeyboardDevice::ReleaseAllKeys()
fKeyboardState[KEY_CTRL] = false;
fCtrlKeyDown = false;
plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg;
plKeyEventMsg* pMsg = new plKeyEventMsg;
pMsg->SetKeyCode( KEY_CTRL );
pMsg->SetKeyDown( false );
pMsg->SetShiftKeyDown( false );
@ -188,7 +187,7 @@ void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDo
}
// send a key event...
plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg;
plKeyEventMsg* pMsg = new plKeyEventMsg;
pMsg->SetKeyChar( c );
pMsg->SetKeyCode( key );
pMsg->SetKeyDown( bKeyDown );
@ -225,8 +224,8 @@ bool plMouseDevice::bMsgAlways = true;
bool plMouseDevice::bCursorHidden = false;
bool plMouseDevice::bCursorOverride = false;
bool plMouseDevice::bInverted = false;
hsScalar plMouseDevice::fWidth = BASE_WIDTH;
hsScalar plMouseDevice::fHeight = BASE_HEIGHT;
float plMouseDevice::fWidth = BASE_WIDTH;
float plMouseDevice::fHeight = BASE_HEIGHT;
plMouseDevice* plMouseDevice::fInstance = 0;
plMouseDevice::plMouseDevice()
@ -259,7 +258,7 @@ plMouseDevice::~plMouseDevice()
fCursor = nil;
plMouseDevice::fInstance = nil;
}
void plMouseDevice::SetDisplayResolution(hsScalar Width, hsScalar Height)
void plMouseDevice::SetDisplayResolution(float Width, float Height)
{
fWidth = Width;
fHeight = Height;
@ -309,7 +308,7 @@ void plMouseDevice::AddCCRToCursor()
txt.DrawString(fInstance->fWXPos + 12, fInstance->fWYPos - 17, "CCR");
}
}
void plMouseDevice::AddIDNumToCursor(UInt32 idNum)
void plMouseDevice::AddIDNumToCursor(uint32_t idNum)
{
if (fInstance && idNum)
{
@ -321,7 +320,7 @@ void plMouseDevice::AddIDNumToCursor(UInt32 idNum)
}
void plMouseDevice::SetCursorX(hsScalar x)
void plMouseDevice::SetCursorX(float x)
{
/// Set the cursor position
if( fCursor == nil && !plMouseDevice::bCursorHidden)
@ -335,7 +334,7 @@ void plMouseDevice::SetCursorX(hsScalar x)
// txt.DrawString(fWXPos + 20,fWYPos - 5,"test");
}
void plMouseDevice::SetCursorY(hsScalar y)
void plMouseDevice::SetCursorY(float y)
{
/// Set the cursor position
if( fCursor == nil && !plMouseDevice::bCursorHidden)
@ -387,7 +386,7 @@ void plMouseDevice::NewCursor(char* cursor)
fInstance->fCursor->SetVisible( true );
}
void plMouseDevice::SetCursorOpacity( hsScalar opacity )
void plMouseDevice::SetCursorOpacity( float opacity )
{
fInstance->fOpacity = opacity;
if( fInstance->fCursor != nil )
@ -406,7 +405,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
}
else
{
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
pMsg->SetXPos( fXPos );
pMsg->SetYPos( fYPos );
pMsg->SetDX(0);
@ -421,7 +420,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
}
else
{
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
pMsg->SetXPos( fXPos );
pMsg->SetYPos( fYPos );
pMsg->SetDX(0);
@ -467,7 +466,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
if (pXMsg)
{
// send a mouse event
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
if (pXMsg->fX == 999)
pMsg->SetXPos( fXPos + 0.001f );
else
@ -505,7 +504,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
if (pYMsg)
{
// send a mouse event
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
pMsg->SetXPos( fXPos );
if (pYMsg->fY == 999)
pMsg->SetYPos( fYPos + 0.01f );
@ -544,7 +543,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
{
// send a mouse event
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
pMsg->SetXPos( fXPos );
pMsg->SetYPos( fYPos );
pMsg->SetDX(0);
@ -604,7 +603,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
if (pBMsg->fButton & kRightButtonDblClk)
{
// right button dbl clicked, send TWO messages
plMouseEventMsg* pMsg2 = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg2 = new plMouseEventMsg;
pMsg2->SetXPos( fXPos );
pMsg2->SetYPos( fYPos );
pMsg2->SetDX(0);
@ -622,7 +621,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
if (pBMsg->fButton & kLeftButtonDblClk)
{
// left button dbl clicked, send TWO messages
plMouseEventMsg* pMsg2 = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg2 = new plMouseEventMsg;
pMsg2->SetXPos( fXPos );
pMsg2->SetYPos( fYPos );
pMsg2->SetDX(0);

View File

@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define PL_INPUT_DEVICE_H
#include "HeadSpin.h"
#include "hsWindows.h"
#include "hsWindowHndl.h"
//#include "pnInputCore/plControlDefinition.h"
#include "pnInputCore/plOSMsg.h"
#include "pnInputCore/plKeyDef.h"
@ -65,7 +64,7 @@ public:
kDisabled = 0x1
};
protected:
UInt32 fFlags;
uint32_t fFlags;
public:
plInputDevice() {;}
@ -73,8 +72,8 @@ public:
virtual const char* GetInputName() = 0;
UInt32 GetFlags() { return fFlags; }
void SetFlags(UInt32 f) { fFlags = f; }
uint32_t GetFlags() { return fFlags; }
void SetFlags(uint32_t f) { fFlags = f; }
virtual void HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, hsBool bKeyRepeat, wchar_t c = nil) {;}
virtual void HandleMouseEvent(plOSMsg message, plMouseState state) {;}
virtual void HandleWindowActivate(bool bActive, hsWindowHndl hWnd) {;}
@ -169,13 +168,13 @@ public:
fControlFlags.SetBit(f);
}
void ClearControlFlag(int which) { fControlFlags.ClearBit( which ); }
void SetCursorX(hsScalar x);
void SetCursorY(hsScalar y);
hsScalar GetCursorX() { return fXPos; }
hsScalar GetCursorY() { return fYPos; }
UInt32 GetButtonState() { return fButtonState; }
hsScalar GetCursorOpacity() { return fOpacity; }
void SetDisplayResolution(hsScalar Width, hsScalar Height);
void SetCursorX(float x);
void SetCursorY(float y);
float GetCursorX() { return fXPos; }
float GetCursorY() { return fYPos; }
uint32_t GetButtonState() { return fButtonState; }
float GetCursorOpacity() { return fOpacity; }
void SetDisplayResolution(float Width, float Height);
virtual hsBool MsgReceive(plMessage* msg);
@ -186,12 +185,12 @@ public:
static void NewCursor(char* cursor);
static void HideCursor(hsBool override = false);
static bool GetHideCursor() { return plMouseDevice::bCursorHidden; }
static void SetCursorOpacity( hsScalar opacity = 1.f );
static void SetCursorOpacity( float opacity = 1.f );
static bool GetInverted() { return plMouseDevice::bInverted; }
static void SetInverted(bool inverted) { plMouseDevice::bInverted = inverted; }
static void AddNameToCursor(const char* name);
static void AddNameToCursor(const plString& name) { AddNameToCursor(_TEMP_CONVERT_TO_CONST_CHAR(name)); }
static void AddIDNumToCursor(UInt32 idNum);
static void AddIDNumToCursor(uint32_t idNum);
static void AddCCRToCursor();
protected:
@ -204,12 +203,12 @@ protected:
plInputEventMsg* fRightBMsg[2];
plInputEventMsg* fMiddleBMsg[2];
hsScalar fXPos;
hsScalar fYPos;
float fXPos;
float fYPos;
int fWXPos; // the windows coordinates of the cursor
int fWYPos;
UInt32 fButtonState;
hsScalar fOpacity;
uint32_t fButtonState;
float fOpacity;
hsBitVector fControlFlags;
@ -224,7 +223,7 @@ protected:
static bool bCursorHidden;
static bool bCursorOverride;
static bool bInverted;
static hsScalar fWidth, fHeight;
static float fWidth, fHeight;
};

View File

@ -49,9 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plInputInterface.h"
#include "plInputInterfaceMgr.h"
@ -67,7 +65,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
plInputInterface::plInputInterface()
{
fEnabled = false;
fControlMap = TRACKED_NEW plKeyMap;
fControlMap = new plKeyMap;
}
plInputInterface::~plInputInterface()
@ -125,7 +123,7 @@ void plInputInterface::IDeactivateBinding(const plKeyBinding *binding)
{
if( !(binding->GetCodeFlags() & kControlFlagNoDeactivate) && !(binding->GetCodeFlags() & kControlFlagToggle) )
{
plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd *pCmd = new plCtrlCmd( this );
pCmd->fControlCode = binding->GetCode();
pCmd->fControlActivated = false;
pCmd->SetCmdString( binding->GetExtendedString() );
@ -153,7 +151,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg )
/// We might have controls that are currently enabled that are triggered in part by
/// modifiers (ctrl or shift)...if that is true, then we want to disable them if either
/// of those modifiers are up, no matter what key this message is for
hsTArray<Int16> enabledCtrls;
hsTArray<int16_t> enabledCtrls;
fKeyControlFlags.Enumerate( enabledCtrls );
for( i = 0; i < enabledCtrls.GetCount(); i++ )
@ -223,7 +221,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg )
if (!binding)
return false;
UInt32 codeFlags = binding->GetCodeFlags();
uint32_t codeFlags = binding->GetCodeFlags();
// Filter out no-repeat messages
if( ( codeFlags & kControlFlagNoRepeat ) && keyMsg->GetRepeat() )
@ -295,7 +293,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg )
return true;
/// OK, generate the message to send
plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this );
plCtrlCmd *pCmd = new plCtrlCmd( this );
pCmd->fControlCode = binding->GetCode();
pCmd->fControlActivated = activate;

View File

@ -125,7 +125,7 @@ class plInputInterface : public hsRefCnt
// Gets called once per IUpdate(), just like normal IEval()s
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty ) { return false; }
virtual hsBool IEval( double secs, float del, uint32_t dirty ) { return false; }
// Override to handle special-cased control messages of your own (same as receiving them via a message, but if you process them, nobody else gets them). Return false if you don't handle it.
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ) { return false; }
@ -175,16 +175,16 @@ class plInputInterface : public hsRefCnt
virtual void Write( hsStream* s, hsResMgr* mgr );
// Returns the priority of this interface layer, based on the Priorities enum
virtual UInt32 GetPriorityLevel( void ) const = 0;
virtual uint32_t GetPriorityLevel( void ) const = 0;
// Returns true if the message was handled, false if not and we want to pass it on to others in the stack
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) = 0;
// Returns the currently active mouse cursor for this layer, as defined in pnMessage/plCursorChangeMsg.h
virtual UInt32 GetCurrentCursorID( void ) const = 0;
virtual uint32_t GetCurrentCursorID( void ) const = 0;
// Returns the current opacity that this layer wants the cursor to be, from 0 (xparent) to 1 (opaque)
virtual hsScalar GetCurrentCursorOpacity( void ) const { return 1.f; }
virtual float GetCurrentCursorOpacity( void ) const { return 1.f; }
// Returns true if this layer is wanting to change the mouse, false if it isn't interested
virtual hsBool HasInterestingCursorID( void ) const = 0;

View File

@ -49,9 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plInputInterfaceMgr.h"
#include "plInputInterface.h"
#include "plInputDevice.h" // For mouse device stuff
@ -160,15 +158,15 @@ void plInputInterfaceMgr::Init( void )
plgDispatch::Dispatch()->RegisterForExactType( plClientMsg::Index(), GetKey() );
/// Hacks (?) for now
plAvatarInputInterface *avatar = TRACKED_NEW plAvatarInputInterface();
plAvatarInputInterface *avatar = new plAvatarInputInterface();
IAddInterface( avatar );
hsRefCnt_SafeUnRef( avatar );
plSceneInputInterface *scene = TRACKED_NEW plSceneInputInterface();
plSceneInputInterface *scene = new plSceneInputInterface();
IAddInterface( scene );
hsRefCnt_SafeUnRef( scene );
plDebugInputInterface *camDrive = TRACKED_NEW plDebugInputInterface();
plDebugInputInterface *camDrive = new plDebugInputInterface();
IAddInterface( camDrive );
hsRefCnt_SafeUnRef( camDrive );
@ -249,7 +247,7 @@ void plInputInterfaceMgr::ResetClickableState()
//// IUpdateCursor ///////////////////////////////////////////////////////////
void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
void plInputInterfaceMgr::IUpdateCursor( int32_t newCursor )
{
char* mouseCursorResID;
@ -297,7 +295,7 @@ void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
//// IEval ///////////////////////////////////////////////////////////////////
// Inherited from plSingleModifier, gets called once per IUpdate() loop.
hsBool plInputInterfaceMgr::IEval( double secs, hsScalar del, UInt32 dirty )
hsBool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty )
{
const char *inputEval = "Eval";
plProfile_BeginLap(Input, inputEval);
@ -315,7 +313,7 @@ hsBool plInputInterfaceMgr::IEval( double secs, hsScalar del, UInt32 dirty )
if( !fMessageQueue[ i ]->GetSource()->IHandleCtrlCmd( fMessageQueue[ i ] ) )
{
// Nope, just dispatch it like normal
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
for (int j = 0; j < fReceivers.Count(); j++)
pMsg->AddReceiver( fReceivers[ j ] );
pMsg->SetControlActivated( fMessageQueue[i]->fControlActivated );
@ -332,7 +330,7 @@ hsBool plInputInterfaceMgr::IEval( double secs, hsScalar del, UInt32 dirty )
if (fMessageQueue[i]->fNetPropagateToPlayers)
{
pMsg = TRACKED_NEW plControlEventMsg;
pMsg = new plControlEventMsg;
for (int j = 0; j < fReceivers.Count(); j++)
if (fReceivers[j] == plNetClientApp::GetInstance()->GetLocalPlayerKey())
pMsg->AddReceiver( fReceivers[j] );
@ -432,7 +430,7 @@ hsBool plInputInterfaceMgr::MsgReceive( plMessage *msg )
const char *inputIEM = "InputEventMsg";
plProfile_BeginLap(Input, inputIEM);
hsBool handled = false;
UInt32 missedInputStartIdx = 0;
uint32_t missedInputStartIdx = 0;
plInputInterface *oldCurrentFocus = fCurrentFocus;
// Current focus (if there is one) gets first crack

View File

@ -83,24 +83,24 @@ class plInputInterfaceMgr : public plSingleModifier
#ifdef MCN_DISABLE_OLD_WITH_NEW_HACK
hsTArray<ControlEventCode> fDisabledCodes;
hsTArray<UInt32> fDisabledKeys;
hsTArray<uint32_t> fDisabledKeys;
#endif
hsBool fClickEnabled;
Int32 fCurrentCursor;
hsScalar fCursorOpacity;
int32_t fCurrentCursor;
float fCursorOpacity;
hsBool fForceCursorHidden;
Int32 fForceCursorHiddenCount;
int32_t fForceCursorHiddenCount;
plInputInterface *fCurrentFocus;
plDefaultKeyCatcher *fDefaultCatcher;
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
virtual hsBool IEval( double secs, float del, uint32_t dirty );
void IAddInterface( plInputInterface *iface );
void IRemoveInterface( plInputInterface *iface );
void IUpdateCursor( Int32 newCursor );
void IUpdateCursor( int32_t newCursor );
hsBool ICheckCursor(plInputInterface *iFace); // returns true if the iface changed cursor settings
void IWriteConsoleCmdKeys( plKeyMap *keyMap, FILE *keyFile );
@ -170,7 +170,7 @@ class plCtrlCmd
ControlEventCode fControlCode;
hsBool fControlActivated;
hsPoint3 fPt;
hsScalar fPct;
float fPct;
hsBool fNetPropagateToPlayers;

View File

@ -39,14 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "hsConfig.h"
#include "hsWindows.h"
#include "HeadSpin.h"
// plInputManager.cpp
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "hsTypes.h"
#include "plInputManager.h"
#include "plPipeline.h"
#include "plInputDevice.h"
@ -64,7 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnMessage/plPlayerPageMsg.h"
hsBool plInputManager::fUseDInput = false;
UInt8 plInputManager::bRecenterMouse = 0;
uint8_t plInputManager::bRecenterMouse = 0;
HWND plInputManager::fhWnd = nil;
#define NUM_ACTIONS 17
@ -177,7 +174,7 @@ void plInputManager::RecenterCursor()
}
void plInputManager::CreateInterfaceMod(plPipeline* p)
{
fInterfaceMgr = TRACKED_NEW plInputInterfaceMgr();
fInterfaceMgr = new plInputInterfaceMgr();
fInterfaceMgr->Init();
}
@ -185,7 +182,7 @@ void plInputManager::InitDInput(HINSTANCE hInst, HWND hWnd)
{
if (fUseDInput)
{
fDInputMgr = TRACKED_NEW plDInputMgr;
fDInputMgr = new plDInputMgr;
fDInputMgr->Init(hInst, hWnd);
}
}
@ -208,7 +205,7 @@ void plInputManager::Update()
fDInputMgr->Update();
}
void plInputManager::SetMouseScale( hsScalar s )
void plInputManager::SetMouseScale( float s )
{
/* RECT rect;
POINT currPos;
@ -312,7 +309,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM
break;
case MOUSEWHEEL:
{
plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg;
plMouseEventMsg* pMsg = new plMouseEventMsg;
int zDelta = GET_WHEEL_DELTA_WPARAM(Wparam);
pMsg->SetWheelDelta((float)zDelta);
if (zDelta < 0)
@ -342,9 +339,9 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM
RECT rect;
GetClientRect(hWnd, &rect);
plIMouseXEventMsg* pXMsg = TRACKED_NEW plIMouseXEventMsg;
plIMouseYEventMsg* pYMsg = TRACKED_NEW plIMouseYEventMsg;
plIMouseBEventMsg* pBMsg = TRACKED_NEW plIMouseBEventMsg;
plIMouseXEventMsg* pXMsg = new plIMouseXEventMsg;
plIMouseYEventMsg* pYMsg = new plIMouseYEventMsg;
plIMouseBEventMsg* pBMsg = new plIMouseBEventMsg;
pXMsg->fWx = LOWORD(Lparam);
pXMsg->fX = (float)LOWORD(Lparam) / (float)rect.right;
@ -469,7 +466,7 @@ void plInputManager::AddInputDevice( plInputDevice *pDev )
plDInputMgr::plDInputMgr() :
fDI(nil)
{
fDI = TRACKED_NEW plDInput;
fDI = new plDInput;
}
plDInputMgr::~plDInputMgr()
@ -506,7 +503,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd)
// set up the action mapping
fDI->fActionFormat = TRACKED_NEW DIACTIONFORMAT;
fDI->fActionFormat = new DIACTIONFORMAT;
fDI->fActionFormat->dwSize = sizeof(DIACTIONFORMAT);
fDI->fActionFormat->dwActionSize = sizeof(DIACTION);
fDI->fActionFormat->dwDataSize = NUM_ACTIONS * sizeof(DWORD);
@ -530,7 +527,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd)
for (i = 0; i < fDI->fSticks.Count(); i++)
{
fDI->fSticks[i]->fCaps = TRACKED_NEW DIDEVCAPS;
fDI->fSticks[i]->fCaps = new DIDEVCAPS;
fDI->fSticks[i]->fCaps->dwSize = sizeof(DIDEVCAPS);
hr = fDI->fSticks[i]->fDevice->GetCapabilities(fDI->fSticks[i]->fCaps);
hsAssert(!hr, "Unable to acquire devcaps in DInput Device!");
@ -541,7 +538,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd)
fhWnd = hWnd;
for (i = 0; i < fDI->fSticks.Count(); i++)
fInputDevice.Append( TRACKED_NEW plDInputDevice );
fInputDevice.Append( new plDInputDevice );
}
void plDInputMgr::Update()
@ -635,7 +632,7 @@ int __stdcall plDInputMgr::EnumGamepadCallback(const DIDEVICEINSTANCE* device, v
if(!FAILED(hr))
{
pDI->fSticks.Append(TRACKED_NEW plDIDevice(fStick));
pDI->fSticks.Append(new plDIDevice(fStick));
// the following code pertaining to the action map shouldn't be here.
// in fact this shouldn't work at all according to MS, but this is

View File

@ -44,8 +44,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef PL_INPUT_MANAGER_H
#define PL_INPUT_MANAGER_H
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "hsTemplates.h"
#include "pnKeyedObject/hsKeyedObject.h"
#include "pnInputCore/plInputMap.h"
@ -84,8 +84,8 @@ public:
void Activate( bool activating );
hsScalar GetMouseScale( void ) const { return fMouseScale; }
void SetMouseScale( hsScalar s );
float GetMouseScale( void ) const { return fMouseScale; }
void SetMouseScale( float s );
static plKeyDef UntranslateKey(plKeyDef key, hsBool extended);
@ -96,8 +96,8 @@ protected:
plInputInterfaceMgr *fInterfaceMgr;
bool fActive, fFirstActivated;
hsScalar fMouseScale;
static UInt8 bRecenterMouse;
float fMouseScale;
static uint8_t bRecenterMouse;
static HWND fhWnd;
public:

View File

@ -45,10 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plSceneInputInterface.h"
#include "plInputInterfaceMgr.h"
@ -152,7 +149,7 @@ void plSceneInputInterface::Init( plInputInterfaceMgr *manager )
fPendingLink = false;
// register for control messages
plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg;
plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg;
pModMsg->SetBCastFlag(plMessage::kBCastByExactType);
pModMsg->SetSender(fManager->GetKey());
pModMsg->SetCmd(plCmdIfaceModMsg::kAdd);
@ -182,7 +179,7 @@ void plSceneInputInterface::ClearClickableMap()
void plSceneInputInterface::IHalfFadeAvatar(hsBool out)
{
plIfaceFadeAvatarMsg* pMsg = TRACKED_NEW plIfaceFadeAvatarMsg();
plIfaceFadeAvatarMsg* pMsg = new plIfaceFadeAvatarMsg();
pMsg->SetSubjectKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
pMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE);
@ -207,7 +204,7 @@ void plSceneInputInterface::ResetClickableState()
}
//// IEval ///////////////////////////////////////////////////////////////////
hsBool plSceneInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
hsBool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty )
{
// this needs to always go no matter what...
// ...unless we have cliclability disabled (as in the case of certain multistage behaviors)
@ -227,7 +224,7 @@ hsBool plSceneInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
int i;
for (i=0; i < fClickableMap.Count(); i++)
{
plFakeOutMsg *pMsg = TRACKED_NEW plFakeOutMsg;
plFakeOutMsg *pMsg = new plFakeOutMsg;
pMsg->SetSender( fManager->GetKey() );
pMsg->AddReceiver( fClickableMap[i]->key );
plgDispatch::MsgSend( pMsg );
@ -298,7 +295,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
fCurrentClickableLogicMod = pLogicMod->GetKey();
fCurrentClickPoint = pLOSMsg->fHitPoint;
for (int x = 0; x < pMod->GetNumReferencedKeys(); x++)
fClickableMap.Append( TRACKED_NEW clickableTest(pMod->GetReferencedKey(x)));
fClickableMap.Append( new clickableTest(pMod->GetReferencedKey(x)));
}
else
{
@ -395,10 +392,10 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
{
hsVector3 ourView = locPlayer->GetCoordinateInterface()->GetLocalToWorld().GetAxis(hsMatrix44::kView);
hsVector3 theirView = pObj->GetCoordinateInterface()->GetLocalToWorld().GetAxis(hsMatrix44::kView);
hsScalar viewdot = ourView * theirView;
float viewdot = ourView * theirView;
hsVector3 towards(locPlayer->GetCoordinateInterface()->GetLocalToWorld().GetTranslate() - pObj->GetCoordinateInterface()->GetLocalToWorld().GetTranslate());
towards.Normalize();
hsScalar towardsdot = ourView * towards;
float towardsdot = ourView * towards;
if (viewdot > SHARE_FACING_TOLERANCE || towardsdot > SHARE_FACING_TOLERANCE )
{
ResetClickableState();
@ -629,7 +626,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
{
// tell them to ignore us
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
@ -639,7 +636,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
// and tell them to ignore our victim
//plInputIfaceMgrMsg* pMsg2 = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
//plInputIfaceMgrMsg* pMsg2 = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
//pMsg2->SetAvKey(fOffereeKey);
//pMsg2->SetBCastFlag(plMessage::kNetPropagate);
//pMsg2->SetBCastFlag(plMessage::kNetForce);
@ -653,7 +650,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg )
{
if (fGUIIgnoredAvatars[x] == plNetClientMgr::GetInstance()->GetLocalPlayerKey())
{
plInputIfaceMgrMsg* pMsg3 = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
plInputIfaceMgrMsg* pMsg3 = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
pMsg3->SetAvKey(fGUIIgnoredAvatars[x]);
pMsg3->SetBCastFlag(plMessage::kNetPropagate);
pMsg3->SetBCastFlag(plMessage::kNetForce);
@ -919,14 +916,14 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint )
// Send an "un-picked" message to it
if( !fLastClickIsAvatar )
{
plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg;
plPickedMsg *pPickedMsg = new plPickedMsg;
pPickedMsg->AddReceiver( fLastClicked );
pPickedMsg->fPicked = false;
plgDispatch::MsgSend( pPickedMsg );
}
else
{
plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg;
plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg;
pMsg->SetAvatarKey( nil );
plgDispatch::MsgSend( pMsg );
}
@ -939,7 +936,7 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint )
{
#ifdef MATT_WAS_HERE
// now we send pick messages to avatars as well...
plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg;
plPickedMsg *pPickedMsg = new plPickedMsg;
pPickedMsg->AddReceiver( fLastClicked );
pPickedMsg->fHitPoint = hitPoint;
plgDispatch::MsgSend( pPickedMsg );
@ -947,7 +944,7 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint )
// if it's an avatar, we also send this thing
if(fLastClickIsAvatar)
{
plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg;
plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg;
pMsg->SetAvatarKey( fLastClicked );
plgDispatch::MsgSend( pMsg );
}
@ -955,14 +952,14 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint )
// Send a "picked" message to it
if( !fLastClickIsAvatar )
{
plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg;
plPickedMsg *pPickedMsg = new plPickedMsg;
pPickedMsg->AddReceiver( fLastClicked );
pPickedMsg->fHitPoint = hitPoint;
plgDispatch::MsgSend( pPickedMsg );
}
else
{
plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg;
plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg;
pMsg->SetAvatarKey( fLastClicked );
plgDispatch::MsgSend( pMsg );
}
@ -1077,9 +1074,9 @@ void plSceneInputInterface::IManageIgnoredAvatars(plKey& offeree, hsBool add)
// tell everyone else to be able to / not to be able to select this avatar
plInputIfaceMgrMsg* pMsg = 0;
if (!add)
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable);
else
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
pMsg->SetAvKey(offeree);
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
@ -1115,7 +1112,7 @@ void plSceneInputInterface::ISendOfferNotification(plKey& offeree, int ID, hsBoo
delete [] members;
}
plNotifyMsg* pMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pMsg = new plNotifyMsg;
pMsg->AddOfferBookEvent(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), ID, offereeID);
pMsg->AddReceiver(fBookKey);
if (net)
@ -1138,9 +1135,9 @@ void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled)
{
plInputIfaceMgrMsg* pMsg = 0;
if (enabled)
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable);
else
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable);
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
@ -1151,14 +1148,14 @@ void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled)
//// IRequestLOSCheck ////////////////////////////////////////////////////////
void plSceneInputInterface::IRequestLOSCheck( hsScalar xPos, hsScalar yPos, int ID )
void plSceneInputInterface::IRequestLOSCheck( float xPos, float yPos, int ID )
{
if( fPipe == nil )
return;
Int32 x=(Int32) ( xPos * fPipe->Width() );
Int32 y=(Int32) ( yPos * fPipe->Height() );
int32_t x=(int32_t) ( xPos * fPipe->Width() );
int32_t y=(int32_t) ( yPos * fPipe->Height() );
hsPoint3 endPos, startPos;
@ -1173,12 +1170,12 @@ void plSceneInputInterface::IRequestLOSCheck( hsScalar xPos, hsScalar yPos, i
plLOSRequestMsg* pMsg;
if(ID == ID_FIND_CLICKABLE) {
pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
pMsg->SetCullDB(plSimDefs::kLOSDBUIBlockers);
} else if(ID == ID_FIND_WALKABLE_GROUND) {
pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBAvatarWalkable, plLOSRequestMsg::kTestClosest);
pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBAvatarWalkable, plLOSRequestMsg::kTestClosest);
} else
pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBLocalAvatar, plLOSRequestMsg::kTestClosest);
pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBLocalAvatar, plLOSRequestMsg::kTestClosest);
pMsg->SetReportType( plLOSRequestMsg::kReportHitOrMiss );
@ -1197,8 +1194,8 @@ hsBool plSceneInputInterface::IWorldPosMovedSinceLastLOSCheck( void )
if( fPipe == nil )
return false;
Int32 x=(Int32) ( plMouseDevice::Instance()->GetCursorX() * fPipe->Width() );
Int32 y=(Int32) ( plMouseDevice::Instance()->GetCursorY() * fPipe->Height() );
int32_t x=(int32_t) ( plMouseDevice::Instance()->GetCursorX() * fPipe->Width() );
int32_t y=(int32_t) ( plMouseDevice::Instance()->GetCursorY() * fPipe->Height() );
hsPoint3 endPos, startPos;
@ -1215,7 +1212,7 @@ hsBool plSceneInputInterface::IWorldPosMovedSinceLastLOSCheck( void )
//// GetCurrentCursorID ///////////////////////////////////////////////////////
UInt32 plSceneInputInterface::SetCurrentCursorID(UInt32 id)
uint32_t plSceneInputInterface::SetCurrentCursorID(uint32_t id)
{
if (fBookMode == kOfferBook || fBookMode == kBookOffered)
{

View File

@ -71,8 +71,8 @@ class plSceneInputInterface : public plInputInterface
protected:
static plSceneInputInterface *fInstance;
UInt32 fCurrentCursor;
UInt8 fButtonState;
uint32_t fCurrentCursor;
uint8_t fButtonState;
hsBool fClickability;
plKey fCurrentClickable, fLastClicked, fCurrentClickableLogicMod;
hsPoint3 fCurrentClickPoint;
@ -82,7 +82,7 @@ class plSceneInputInterface : public plInputInterface
int fBookMode; // are we in offer book mode?
plKey fBookKey; // key for the python file modifier for the book we are offering
plKey fOffereeKey;
UInt32 fOffereeID; // ID for the guy who's accepted our link offer
uint32_t fOffereeID; // ID for the guy who's accepted our link offer
const char* fOfferedAgeFile;
const char* fOfferedAgeInstance;
const char* fSpawnPoint;
@ -106,10 +106,10 @@ class plSceneInputInterface : public plInputInterface
hsPoint3 fLastStartPt, fLastEndPt;
plPipeline *fPipe;
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
virtual hsBool IEval( double secs, float del, uint32_t dirty );
void IRequestLOSCheck( hsScalar xPos, hsScalar yPos, int ID );
void IRequestLOSCheck( float xPos, float yPos, int ID );
void ISetLastClicked( plKey obj, hsPoint3 hitPoint );
void IHalfFadeAvatar(hsBool out);
@ -128,9 +128,9 @@ class plSceneInputInterface : public plInputInterface
// Always return true, since the cursor should be representing how we control the avatar
virtual hsBool HasInterestingCursorID( void ) const { return ( fCurrentCursor != kNullCursor ) ? true : false; }
virtual UInt32 GetPriorityLevel( void ) const { return kSceneInteractionPriority; }
virtual UInt32 GetCurrentCursorID( void ) const {return fCurrentCursor;}
UInt32 SetCurrentCursorID(UInt32 id);
virtual uint32_t GetPriorityLevel( void ) const { return kSceneInteractionPriority; }
virtual uint32_t GetCurrentCursorID( void ) const {return fCurrentCursor;}
uint32_t SetCurrentCursorID(uint32_t id);
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg );
void RequestAvatarTurnToPointLOS();

View File

@ -45,10 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "hsConfig.h"
#include "hsWindows.h"
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plTelescopeInputInterface.h"
#include "plInputInterfaceMgr.h"
@ -100,7 +97,7 @@ void plTelescopeInputInterface::Init( plInputInterfaceMgr *manager )
//// IEval ///////////////////////////////////////////////////////////////////
hsBool plTelescopeInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
hsBool plTelescopeInputInterface::IEval( double secs, float del, uint32_t dirty )
{
return true;
}

View File

@ -57,7 +57,7 @@ class plTelescopeInputInterface : public plInputInterface
{
protected:
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
virtual hsBool IEval( double secs, float del, uint32_t dirty );
public:
@ -74,13 +74,13 @@ class plTelescopeInputInterface : public plInputInterface
virtual void Shutdown( void ) {;}
// Returns the priority of this interface layer, based on the Priorities enum
virtual UInt32 GetPriorityLevel( void ) const { return kTelescopeInputPriority; }
virtual uint32_t GetPriorityLevel( void ) const { return kTelescopeInputPriority; }
// Returns the currently active mouse cursor for this layer, as defined in pnMessage/plCursorChangeMsg.h
virtual UInt32 GetCurrentCursorID( void ) const { return kCursorUp; }
virtual uint32_t GetCurrentCursorID( void ) const { return kCursorUp; }
// Returns the current opacity that this layer wants the cursor to be, from 0 (xparent) to 1 (opaque)
virtual hsScalar GetCurrentCursorOpacity( void ) const { return 1.f; }
virtual float GetCurrentCursorOpacity( void ) const { return 1.f; }
// Returns true if this layer is wanting to change the mouse, false if it isn't interested
virtual hsBool HasInterestingCursorID( void ) const { return false; }