mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -427,7 +427,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, hsScalar del, uint32_t dirty )
|
||||
{
|
||||
fCursorTimeout += del;
|
||||
if( fCursorTimeout > fCursorFadeDelay )
|
||||
@ -727,7 +727,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)
|
||||
|
@ -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,7 +178,7 @@ class plAvatarInputInterface : public plInputInterface
|
||||
{
|
||||
protected:
|
||||
|
||||
UInt32 fCurrentCursor;
|
||||
uint32_t fCurrentCursor;
|
||||
hsScalar 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, hsScalar del, uint32_t dirty );
|
||||
|
||||
void IDeactivateCommand(plMouseInfo *info);
|
||||
void IChangeInputMaps(plAvatarInputMap *newMap);
|
||||
@ -228,8 +228,8 @@ 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 uint32_t GetPriorityLevel( void ) const { return kAvatarInputPriority; }
|
||||
virtual uint32_t GetCurrentCursorID( void ) const { return fCurrentCursor; }
|
||||
virtual hsScalar GetCurrentCursorOpacity( void ) const { return fCursorOpacity; }
|
||||
const char* GetInputMapName() { return fInputMap ? fInputMap->GetName() : ""; }
|
||||
|
||||
|
@ -139,7 +139,7 @@ void plDebugInputInterface::RestoreDefaultKeyMappings( void )
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plDebugInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
|
||||
hsBool plDebugInputInterface::IEval( double secs, hsScalar del, uint32_t dirty )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -60,11 +60,11 @@ class plDebugInputInterface : public plInputInterface
|
||||
{
|
||||
protected:
|
||||
|
||||
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
|
||||
virtual hsBool IEval( double secs, hsScalar 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 );
|
||||
|
||||
|
@ -309,7 +309,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)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
kDisabled = 0x1
|
||||
};
|
||||
protected:
|
||||
UInt32 fFlags;
|
||||
uint32_t fFlags;
|
||||
public:
|
||||
|
||||
plInputDevice() {;}
|
||||
@ -72,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) {;}
|
||||
@ -172,7 +172,7 @@ public:
|
||||
void SetCursorY(hsScalar y);
|
||||
hsScalar GetCursorX() { return fXPos; }
|
||||
hsScalar GetCursorY() { return fYPos; }
|
||||
UInt32 GetButtonState() { return fButtonState; }
|
||||
uint32_t GetButtonState() { return fButtonState; }
|
||||
hsScalar GetCursorOpacity() { return fOpacity; }
|
||||
void SetDisplayResolution(hsScalar Width, hsScalar Height);
|
||||
|
||||
@ -189,7 +189,7 @@ public:
|
||||
static bool GetInverted() { return plMouseDevice::bInverted; }
|
||||
static void SetInverted(bool inverted) { plMouseDevice::bInverted = inverted; }
|
||||
static void AddNameToCursor(const char* name);
|
||||
static void AddIDNumToCursor(UInt32 idNum);
|
||||
static void AddIDNumToCursor(uint32_t idNum);
|
||||
static void AddCCRToCursor();
|
||||
|
||||
protected:
|
||||
@ -206,7 +206,7 @@ protected:
|
||||
hsScalar fYPos;
|
||||
int fWXPos; // the windows coordinates of the cursor
|
||||
int fWYPos;
|
||||
UInt32 fButtonState;
|
||||
uint32_t fButtonState;
|
||||
hsScalar fOpacity;
|
||||
hsBitVector fControlFlags;
|
||||
|
||||
|
@ -153,7 +153,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 +223,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() )
|
||||
|
@ -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, hsScalar 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,13 +175,13 @@ 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; }
|
||||
|
@ -249,7 +249,7 @@ void plInputInterfaceMgr::ResetClickableState()
|
||||
|
||||
//// IUpdateCursor ///////////////////////////////////////////////////////////
|
||||
|
||||
void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
|
||||
void plInputInterfaceMgr::IUpdateCursor( int32_t newCursor )
|
||||
{
|
||||
char* mouseCursorResID;
|
||||
|
||||
@ -297,7 +297,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, hsScalar del, uint32_t dirty )
|
||||
{
|
||||
const char *inputEval = "Eval";
|
||||
plProfile_BeginLap(Input, inputEval);
|
||||
@ -432,7 +432,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
|
||||
|
@ -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;
|
||||
int32_t fCurrentCursor;
|
||||
hsScalar 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, hsScalar 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 );
|
||||
|
@ -64,7 +64,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
|
||||
|
||||
|
@ -97,7 +97,7 @@ protected:
|
||||
bool fActive, fFirstActivated;
|
||||
|
||||
hsScalar fMouseScale;
|
||||
static UInt8 bRecenterMouse;
|
||||
static uint8_t bRecenterMouse;
|
||||
static HWND fhWnd;
|
||||
|
||||
public:
|
||||
|
@ -207,7 +207,7 @@ void plSceneInputInterface::ResetClickableState()
|
||||
}
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plSceneInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
|
||||
hsBool plSceneInputInterface::IEval( double secs, hsScalar 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)
|
||||
@ -1157,8 +1157,8 @@ void plSceneInputInterface::IRequestLOSCheck( hsScalar xPos, hsScalar yPos, i
|
||||
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;
|
||||
|
||||
@ -1197,8 +1197,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 +1215,7 @@ hsBool plSceneInputInterface::IWorldPosMovedSinceLastLOSCheck( void )
|
||||
|
||||
//// GetCurrentCursorID ///////////////////////////////////////////////////////
|
||||
|
||||
UInt32 plSceneInputInterface::SetCurrentCursorID(UInt32 id)
|
||||
uint32_t plSceneInputInterface::SetCurrentCursorID(uint32_t id)
|
||||
{
|
||||
if (fBookMode == kOfferBook || fBookMode == kBookOffered)
|
||||
{
|
||||
|
@ -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,7 +106,7 @@ class plSceneInputInterface : public plInputInterface
|
||||
hsPoint3 fLastStartPt, fLastEndPt;
|
||||
plPipeline *fPipe;
|
||||
|
||||
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
|
||||
virtual hsBool IEval( double secs, hsScalar del, uint32_t dirty );
|
||||
|
||||
|
||||
void IRequestLOSCheck( hsScalar xPos, hsScalar yPos, int ID );
|
||||
@ -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();
|
||||
|
||||
|
@ -100,7 +100,7 @@ void plTelescopeInputInterface::Init( plInputInterfaceMgr *manager )
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plTelescopeInputInterface::IEval( double secs, hsScalar del, UInt32 dirty )
|
||||
hsBool plTelescopeInputInterface::IEval( double secs, hsScalar del, uint32_t dirty )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class plTelescopeInputInterface : public plInputInterface
|
||||
{
|
||||
protected:
|
||||
|
||||
virtual hsBool IEval( double secs, hsScalar del, UInt32 dirty );
|
||||
virtual hsBool IEval( double secs, hsScalar del, uint32_t dirty );
|
||||
|
||||
public:
|
||||
|
||||
@ -74,10 +74,10 @@ 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; }
|
||||
|
Reference in New Issue
Block a user