/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/input/mouse.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/input/input.hpp"

CSGXInputManager::CControllerMouse::CControllerMouse()
{
	reset();
}

void 
CSGXInputManager::CControllerMouse::reset()
{
	x = y = 0;
	for(tMEM_SIZE i=0;i<SGX_MAXINP_MOUSEBUTTONS;i++) {
		m_Buttons[i].reset();
	}
}

tBOOL 
CSGXInputManager::CControllerMouse::isPresent() const {
	return TRUE;
}

void 
CSGXInputManager::CControllerMouse::update(const tREAL32 telaps, CSGXInputManager::CControllerMouse &result)
{
	sgxMemcpy(&result, this, sizeof(result));

	for(tMEM_SIZE i=0;i<SGX_MAXINP_MOUSEBUTTONS;i++)
	{
		m_Buttons[i].update(telaps);
	}
}


