1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -99,7 +99,7 @@ plKeyCombo::plKeyCombo()
fFlags = 0;
}
hsBool plKeyCombo::IsSatisfiedBy(const plKeyCombo &combo) const
bool plKeyCombo::IsSatisfiedBy(const plKeyCombo &combo) const
{
if (fKey != combo.fKey)
return false;
@ -164,7 +164,7 @@ void plKeyBinding::ClearKeys( void )
fKey1 = fKey2 = plKeyCombo::kUnmapped;
}
hsBool plKeyBinding::HasUnmappedKey() const
bool plKeyBinding::HasUnmappedKey() const
{
return fKey1.fKey == KEY_UNMAPPED || fKey2.fKey == KEY_UNMAPPED;
}
@ -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_t codeFlags )
bool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags )
{
if( IFindBinding( code ) != nil )
return false;
@ -209,7 +209,7 @@ hsBool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags )
// Same but for console commands. No flags b/c console commands always use
// the same flags.
hsBool plKeyMap::AddConsoleCommand( const char *command )
bool plKeyMap::AddConsoleCommand( const char *command )
{
if( IFindConsoleBinding( command ) != nil )
return false;
@ -265,7 +265,7 @@ void plKeyMap::IFindAllBindingsByKey(const plKeyCombo &combo, hsTArray<plKeyBind
uint8_t bestScore = 0;
for (i = 0; i < fBindings.GetCount(); i++)
{
hsBool s1, s2;
bool s1, s2;
s1 = fBindings[i]->GetKey1().IsSatisfiedBy(combo);
s2 = fBindings[i]->GetKey2().IsSatisfiedBy(combo);
if (s1 || s2)
@ -351,7 +351,7 @@ void plKeyMap::IActuallyBind( plKeyBinding *binding, const plKeyCombo &combo,
// Adds a key binding to a given code. Returns false if the code isn't in
// this map or if key is already mapped.
hsBool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref /*= kNoPreference*/ )
bool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref /*= kNoPreference*/ )
{
plKeyBinding* binding = nil;
@ -380,7 +380,7 @@ hsBool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindP
//// BindKeyToConsoleCmd /////////////////////////////////////////////////////
// Console command version
hsBool plKeyMap::BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref /*= kNoPreference*/ )
bool plKeyMap::BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref /*= kNoPreference*/ )
{
plKeyBinding* binding = nil;

View File

@ -79,10 +79,10 @@ class plKeyCombo
plKeyCombo();
plKeyCombo( plKeyDef k, uint8_t flags = 0 ) : fKey( k ), fFlags( flags ) { }
hsBool IsSatisfiedBy(const plKeyCombo &combo) const;
bool IsSatisfiedBy(const plKeyCombo &combo) const;
hsBool operator==( const plKeyCombo &rhs ) const { return ( fKey == rhs.fKey ) && ( fFlags == rhs.fFlags ); }
hsBool operator!=( const plKeyCombo &rhs ) const { return ( fKey != rhs.fKey ) || ( fFlags != rhs.fFlags ); }
bool operator==( const plKeyCombo &rhs ) const { return ( fKey == rhs.fKey ) && ( fFlags == rhs.fFlags ); }
bool operator!=( const plKeyCombo &rhs ) const { return ( fKey != rhs.fKey ) || ( fFlags != rhs.fFlags ); }
};
//// For the Particularly Lazy... ////////////////////////////////////////////
@ -135,7 +135,7 @@ class plKeyBinding
void SetKey1( const plKeyCombo &newCombo );
void SetKey2( const plKeyCombo &newCombo );
void ClearKeys( void );
hsBool HasUnmappedKey() const;
bool HasUnmappedKey() const;
};
//// plKeyMap ////////////////////////////////////////////////////////////////
@ -172,17 +172,17 @@ 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_t codeFlags );
bool 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 );
bool AddConsoleCommand( const char *command );
// Adds a key binding to a given code. Returns false if the code isn't in this map or if key is already mapped.
hsBool BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref = kNoPreference );
bool BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref = kNoPreference );
// Console command version
hsBool BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref = kNoPreference );
bool BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref = kNoPreference );
// Searches for the binding for a given code. Returns nil if not found