style cleanup

This commit is contained in:
Glenn Maynard
2005-05-14 09:26:05 +00:00
parent e9ffb71c5f
commit bd8fb8f727
2 changed files with 16 additions and 16 deletions
+13 -13
View File
@@ -8,48 +8,48 @@
RageInput* INPUTMAN = NULL; // globally accessable input device RageInput* INPUTMAN = NULL; // globally accessable input device
RageInput::RageInput( CString drivers ) RageInput::RageInput( CString sDriverList )
{ {
LOG->Trace( "RageInput::RageInput()" ); LOG->Trace( "RageInput::RageInput()" );
/* Init optional devices. */ /* Init optional devices. */
MakeInputHandlers(drivers,Devices); MakeInputHandlers( sDriverList, m_pDevices );
/* If no input devices are loaded, the user won't be able to input anything. */ /* If no input devices are loaded, the user won't be able to input anything. */
if( Devices.size() == 0 ) if( m_pDevices.size() == 0 )
LOG->Warn( "No input devices were loaded." ); LOG->Warn( "No input devices were loaded." );
} }
RageInput::~RageInput() RageInput::~RageInput()
{ {
/* Delete optional devices. */ /* Delete optional devices. */
for(unsigned i = 0; i < Devices.size(); ++i) for( unsigned i = 0; i < m_pDevices.size(); ++i )
delete Devices[i]; delete m_pDevices[i];
} }
void RageInput::Update( float fDeltaTime ) void RageInput::Update( float fDeltaTime )
{ {
/* Update optional devices. */ /* Update optional devices. */
for(unsigned i = 0; i < Devices.size(); ++i) for( unsigned i = 0; i < m_pDevices.size(); ++i )
Devices[i]->Update(fDeltaTime); m_pDevices[i]->Update( fDeltaTime );
} }
void RageInput::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut) void RageInput::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut )
{ {
for(unsigned i = 0; i < Devices.size(); ++i) for( unsigned i = 0; i < m_pDevices.size(); ++i )
Devices[i]->GetDevicesAndDescriptions( vDevicesOut, vDescriptionsOut ); m_pDevices[i]->GetDevicesAndDescriptions( vDevicesOut, vDescriptionsOut );
} }
void RageInput::WindowReset() void RageInput::WindowReset()
{ {
for(unsigned i = 0; i < Devices.size(); ++i) for( unsigned i = 0; i < m_pDevices.size(); ++i )
Devices[i]->WindowReset(); m_pDevices[i]->WindowReset();
} }
void RageInput::AddHandler( InputHandler *pHandler ) void RageInput::AddHandler( InputHandler *pHandler )
{ {
ASSERT( pHandler != NULL ); ASSERT( pHandler != NULL );
Devices.push_back( pHandler ); m_pDevices.push_back( pHandler );
} }
/* /*
+3 -3
View File
@@ -9,16 +9,16 @@ class InputHandler;
class RageInput class RageInput
{ {
public: public:
RageInput( CString drivers ); RageInput( CString sDriverList );
~RageInput(); ~RageInput();
void Update( float fDeltaTime ); void Update( float fDeltaTime );
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut); void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void WindowReset(); void WindowReset();
void AddHandler( InputHandler *pHandler ); void AddHandler( InputHandler *pHandler );
private: private:
vector<InputHandler *> Devices; vector<InputHandler *> m_pDevices;
}; };
extern RageInput* INPUTMAN; // global and accessable from anywhere in our program extern RageInput* INPUTMAN; // global and accessable from anywhere in our program