mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -112,7 +112,7 @@ enum
|
||||
|
||||
struct Win32keyConvert
|
||||
{
|
||||
UInt32 fVKey;
|
||||
uint32_t fVKey;
|
||||
const char* fKeyName;
|
||||
};
|
||||
|
||||
@ -125,14 +125,14 @@ struct CommandConvert
|
||||
|
||||
struct plMouseInfo
|
||||
{
|
||||
plMouseInfo(ControlEventCode _code, UInt32 _flags, hsPoint4 _box, char* _desc)
|
||||
plMouseInfo(ControlEventCode _code, uint32_t _flags, hsPoint4 _box, char* _desc)
|
||||
{
|
||||
fCode = _code;
|
||||
fControlFlags = _flags;
|
||||
fBox = _box;
|
||||
fControlDescription = _desc;
|
||||
}
|
||||
plMouseInfo(ControlEventCode _code, UInt32 _flags, hsScalar pt1, hsScalar pt2, hsScalar pt3, hsScalar pt4, char* _desc)
|
||||
plMouseInfo(ControlEventCode _code, uint32_t _flags, hsScalar pt1, hsScalar pt2, hsScalar pt3, hsScalar pt4, char* _desc)
|
||||
{
|
||||
fCode = _code;
|
||||
fControlFlags = _flags;
|
||||
@ -140,7 +140,7 @@ struct plMouseInfo
|
||||
fControlDescription = _desc;
|
||||
}
|
||||
ControlEventCode fCode;
|
||||
UInt32 fControlFlags;
|
||||
uint32_t fControlFlags;
|
||||
hsPoint4 fBox;
|
||||
char* fControlDescription;
|
||||
};
|
||||
|
@ -125,7 +125,7 @@ plKeyBinding::plKeyBinding()
|
||||
fString = nil;
|
||||
}
|
||||
|
||||
plKeyBinding::plKeyBinding( ControlEventCode code, UInt32 codeFlags, const plKeyCombo &key1, const plKeyCombo &key2, const char *string /*= nil*/ )
|
||||
plKeyBinding::plKeyBinding( ControlEventCode code, uint32_t codeFlags, const plKeyCombo &key1, const plKeyCombo &key2, const char *string /*= nil*/ )
|
||||
{
|
||||
fCode = code;
|
||||
fCodeFlags = codeFlags;
|
||||
@ -184,7 +184,7 @@ plKeyMap::~plKeyMap()
|
||||
|
||||
void plKeyMap::ClearAll( void )
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
@ -196,7 +196,7 @@ void plKeyMap::ClearAll( void )
|
||||
// Adds a given control code to the map. Once you add it, you can't change its flags.
|
||||
// Returns false if the code is already present
|
||||
|
||||
hsBool plKeyMap::AddCode( ControlEventCode code, UInt32 codeFlags )
|
||||
hsBool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags )
|
||||
{
|
||||
if( IFindBinding( code ) != nil )
|
||||
return false;
|
||||
@ -226,7 +226,7 @@ hsBool plKeyMap::AddConsoleCommand( const char *command )
|
||||
|
||||
plKeyBinding *plKeyMap::IFindBinding( ControlEventCode code ) const
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
@ -243,7 +243,7 @@ plKeyBinding *plKeyMap::IFindBinding( ControlEventCode code ) const
|
||||
|
||||
plKeyBinding *plKeyMap::IFindBindingByKey( const plKeyCombo &combo ) const
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
@ -261,8 +261,8 @@ plKeyBinding *plKeyMap::IFindBindingByKey( const plKeyCombo &combo ) const
|
||||
// We guarantee that the first binding in the result array is that one with priority.
|
||||
void plKeyMap::IFindAllBindingsByKey(const plKeyCombo &combo, hsTArray<plKeyBinding*> &result) const
|
||||
{
|
||||
UInt32 i;
|
||||
UInt8 bestScore = 0;
|
||||
uint32_t i;
|
||||
uint8_t bestScore = 0;
|
||||
for (i = 0; i < fBindings.GetCount(); i++)
|
||||
{
|
||||
hsBool s1, s2;
|
||||
@ -270,7 +270,7 @@ void plKeyMap::IFindAllBindingsByKey(const plKeyCombo &combo, hsTArray<plKeyBind
|
||||
s2 = fBindings[i]->GetKey2().IsSatisfiedBy(combo);
|
||||
if (s1 || s2)
|
||||
{
|
||||
UInt8 myScore = 0;
|
||||
uint8_t myScore = 0;
|
||||
if (s1)
|
||||
myScore = fBindings[i]->GetKey1().fFlags;
|
||||
if (s2 && (fBindings[i]->GetKey2().fFlags > myScore))
|
||||
@ -289,7 +289,7 @@ void plKeyMap::IFindAllBindingsByKey(const plKeyCombo &combo, hsTArray<plKeyBind
|
||||
|
||||
plKeyBinding *plKeyMap::IFindConsoleBinding( const char *command ) const
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
@ -490,7 +490,7 @@ void plKeyMap::UnmapBinding( ControlEventCode code )
|
||||
|
||||
void plKeyMap::UnmapAllBindings( void )
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
fBindings[ i ]->ClearKeys();
|
||||
@ -502,7 +502,7 @@ void plKeyMap::UnmapAllBindings( void )
|
||||
|
||||
void plKeyMap::EraseBinding( ControlEventCode code )
|
||||
{
|
||||
UInt32 i;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for( i = 0; i < fBindings.GetCount(); i++ )
|
||||
@ -517,7 +517,7 @@ void plKeyMap::EraseBinding( ControlEventCode code )
|
||||
}
|
||||
|
||||
|
||||
const char* plKeyMap::ConvertVKeyToChar( UInt32 vk )
|
||||
const char* plKeyMap::ConvertVKeyToChar( uint32_t vk )
|
||||
{
|
||||
Win32keyConvert* keyConvert = &fKeyConversionEnglish[0];
|
||||
switch (plLocalization::GetLanguage())
|
||||
|
@ -64,7 +64,7 @@ class plKeyCombo
|
||||
{
|
||||
public:
|
||||
plKeyDef fKey;
|
||||
UInt8 fFlags;
|
||||
uint8_t fFlags;
|
||||
|
||||
// The ordering of this lets us treat the flags as a priority number.
|
||||
// kCtrl + kShift > kCtrl > kShift > no flags
|
||||
@ -77,7 +77,7 @@ class plKeyCombo
|
||||
static plKeyCombo kUnmapped;
|
||||
|
||||
plKeyCombo();
|
||||
plKeyCombo( plKeyDef k, UInt8 flags = 0 ) : fKey( k ), fFlags( flags ) { }
|
||||
plKeyCombo( plKeyDef k, uint8_t flags = 0 ) : fKey( k ), fFlags( flags ) { }
|
||||
|
||||
hsBool IsSatisfiedBy(const plKeyCombo &combo) const;
|
||||
|
||||
@ -114,7 +114,7 @@ class plKeyBinding
|
||||
protected:
|
||||
|
||||
ControlEventCode fCode;
|
||||
UInt32 fCodeFlags; // Needed?
|
||||
uint32_t fCodeFlags; // Needed?
|
||||
plKeyCombo fKey1; // KEY_UNMAPPED for not-used
|
||||
plKeyCombo fKey2;
|
||||
char *fString;
|
||||
@ -122,11 +122,11 @@ class plKeyBinding
|
||||
public:
|
||||
|
||||
plKeyBinding();
|
||||
plKeyBinding( ControlEventCode code, UInt32 codeFlags, const plKeyCombo &key1, const plKeyCombo &key2, const char *string = nil );
|
||||
plKeyBinding( ControlEventCode code, uint32_t codeFlags, const plKeyCombo &key1, const plKeyCombo &key2, const char *string = nil );
|
||||
virtual ~plKeyBinding();
|
||||
|
||||
ControlEventCode GetCode( void ) const { return fCode; }
|
||||
UInt32 GetCodeFlags( void ) const { return fCodeFlags; }
|
||||
uint32_t GetCodeFlags( void ) const { return fCodeFlags; }
|
||||
const plKeyCombo &GetKey1( void ) const { return fKey1; }
|
||||
const plKeyCombo &GetKey2( void ) const { return fKey2; }
|
||||
const char *GetExtendedString( void ) const { return fString; }
|
||||
@ -172,7 +172,7 @@ class plKeyMap : public plInputMap
|
||||
virtual ~plKeyMap();
|
||||
|
||||
// Adds a given control code to the map. Once you add it, you can't change its flags. Returns false if the code is already present
|
||||
hsBool AddCode( ControlEventCode code, UInt32 codeFlags );
|
||||
hsBool AddCode( ControlEventCode code, uint32_t codeFlags );
|
||||
|
||||
// Same but for console commands. No flags b/c console commands always use the same flags
|
||||
hsBool AddConsoleCommand( const char *command );
|
||||
@ -220,11 +220,11 @@ class plKeyMap : public plInputMap
|
||||
static const char* GetStringUnmapped();
|
||||
|
||||
|
||||
UInt32 GetNumBindings( void ) const { return fBindings.GetCount(); }
|
||||
const plKeyBinding &GetBinding( UInt32 i ) const { return *fBindings[ i ]; }
|
||||
uint32_t GetNumBindings( void ) const { return fBindings.GetCount(); }
|
||||
const plKeyBinding &GetBinding( uint32_t i ) const { return *fBindings[ i ]; }
|
||||
void HandleAutoDualBinding( plKeyDef key1, plKeyDef key2 );
|
||||
|
||||
static const char* ConvertVKeyToChar( UInt32 vk );
|
||||
static const char* ConvertVKeyToChar( uint32_t vk );
|
||||
static plKeyDef ConvertCharToVKey( const char *c );
|
||||
|
||||
static Win32keyConvert fKeyConversionEnglish[];
|
||||
|
@ -95,7 +95,7 @@ struct plMouseState
|
||||
};
|
||||
float fX;
|
||||
float fY;
|
||||
UInt32 fButtonState;
|
||||
uint32_t fButtonState;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user