diff options
| -rw-r--r-- | engines/tony/custom.cpp | 8 | ||||
| -rw-r--r-- | engines/tony/font.cpp | 4 | ||||
| -rw-r--r-- | engines/tony/game.cpp | 8 | ||||
| -rw-r--r-- | engines/tony/gfxengine.cpp | 50 | ||||
| -rw-r--r-- | engines/tony/input.cpp | 12 | ||||
| -rw-r--r-- | engines/tony/input.h | 26 | ||||
| -rw-r--r-- | engines/tony/inventory.cpp | 2 | 
7 files changed, 55 insertions, 55 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index 47089f3214..1ed7c8b5a6 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -2020,10 +2020,10 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr  		GLOBALS.Pointer->SetSpecialPointer(GLOBALS.Pointer->PTR_NONE);  		MainShowMouse(); -		while (!(GLOBALS.Input->MouseLeftClicked() && ((_ctx->sel = _ctx->dc.GetSelection()) != -1))) { +		while (!(GLOBALS.Input->mouseLeftClicked() && ((_ctx->sel = _ctx->dc.GetSelection()) != -1))) {  			CORO_INVOKE_0(GLOBALS.WaitFrame);  			GLOBALS.Freeze(); -			CORO_INVOKE_1(_ctx->dc.DoFrame, GLOBALS.Input->MousePos()); +			CORO_INVOKE_1(_ctx->dc.DoFrame, GLOBALS.Input->mousePos());  			GLOBALS.Unfreeze();  		} @@ -2361,9 +2361,9 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3  	while (_ctx->startTime + dwTime * 1000 > _vm->getTime()) {  		CORO_INVOKE_0(GLOBALS.WaitFrame); -		if (GLOBALS.Input->MouseLeftClicked() || GLOBALS.Input->MouseRightClicked()) +		if (GLOBALS.Input->mouseLeftClicked() || GLOBALS.Input->mouseRightClicked())  			break; -		if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB)) +		if (_vm->getEngine()->GetInput().getAsyncKeyState(Common::KEYCODE_TAB))  			break;  	} diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp index 567da3041c..a9f7759156 100644 --- a/engines/tony/font.cpp +++ b/engines/tony/font.cpp @@ -2086,13 +2086,13 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {  		}  		if (!m_bNoTab) { -			if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB)) +			if (_vm->getEngine()->GetInput().getAsyncKeyState(Common::KEYCODE_TAB))  				return;  		}  		if (!m_bNoTab) {  			if (m_input) { -				if (m_input->MouseLeftClicked() || m_input->MouseRightClicked()) +				if (m_input->mouseLeftClicked() || m_input->mouseRightClicked())  					return;  			}  		} diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index 42c33f2259..28d7cd5e8c 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -1032,9 +1032,9 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {  		return;  	// Reads input -	_ctx->mousePos = input->MousePos(); -	_ctx->bLeftClick = input->MouseLeftClicked(); -	_ctx->bRightClick = input->MouseRightClicked(); +	_ctx->mousePos = input->mousePos(); +	_ctx->bLeftClick = input->mouseLeftClicked(); +	_ctx->bRightClick = input->mouseRightClicked();  	_ctx->bRefresh = false; @@ -1097,7 +1097,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {  		}  	} -#define KEYPRESS(c)     (_vm->getEngine()->GetInput().GetAsyncKeyState(c)) +#define KEYPRESS(c)     (_vm->getEngine()->GetInput().getAsyncKeyState(c))  #define PROCESS_CHAR(cod,c)  if (KEYPRESS(cod)) { \  		m_EditName[strlen(m_EditName) +1 ] = '\0'; m_EditName[strlen(m_EditName)] = c; _ctx->bRefresh = true; } diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 4642ee0ab7..2ff57bf804 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -146,7 +146,7 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {  	g_system->lockMutex(csMainLoop);  	// Poll of input devices -	m_input.Poll(); +	m_input.poll();  	if (m_bMustEnterMenu && GLOBALS.bIdleExited) {  		m_bOption = true; @@ -172,12 +172,12 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {  		// Check the mouse input  		if (m_bInput && !m_tony.InAction()) {  			// If we are on the inventory, it is it who controls all input -			if (m_inv.HaveFocus(m_input.MousePos()) && !m_inter.Active()) { +			if (m_inv.HaveFocus(m_input.mousePos()) && !m_inter.Active()) {  				// Left Click  				// ********** -				if (m_input.MouseLeftClicked()/* && m_itemName.IsItemSelected()*/) { +				if (m_input.mouseLeftClicked()/* && m_itemName.IsItemSelected()*/) {  					// Left click activates the combine, if we are on an object -					if (m_inv.LeftClick(m_input.MousePos(), m_curActionObj)) { +					if (m_inv.LeftClick(m_input.mousePos(), m_curActionObj)) {  						m_curAction = TA_COMBINE;  						m_point.SetAction(m_curAction);  					} @@ -185,18 +185,18 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {  					// Right Click  					// *********** -					if (m_input.MouseRightClicked()) { +					if (m_input.mouseRightClicked()) {  						if (m_itemName.IsItemSelected()) {  							m_curActionObj = 0; -							m_inv.RightClick(m_input.MousePos()); +							m_inv.RightClick(m_input.mousePos());  						} else -							m_inv.RightClick(m_input.MousePos()); +							m_inv.RightClick(m_input.mousePos());  					} else  						// Right Release  						// ************* -						if (m_input.MouseRightReleased()) { -							if (m_inv.RightRelease(m_input.MousePos(), m_curAction)) { +						if (m_input.mouseRightReleased()) { +							if (m_inv.RightRelease(m_input.mousePos(), m_curAction)) {  								CORO_INVOKE_3(m_tony.MoveAndDoAction, m_itemName.GetHotspot(), m_itemName.GetSelectedItem(), m_curAction);  								m_curAction = TA_GOTO; @@ -208,16 +208,16 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {  				// ************  				if (m_bGUIOption) {  					if (!m_tony.InAction() && m_bInput) { -						if ((m_input.MouseLeftClicked() && m_input.MousePos().x < 3 && m_input.MousePos().y < 3)) { +						if ((m_input.mouseLeftClicked() && m_input.mousePos().x < 3 && m_input.mousePos().y < 3)) {  							CORO_INVOKE_1(OpenOptionScreen, 0);  							goto SKIPCLICKSINISTRO; -						} else if (m_input.GetAsyncKeyState(Common::KEYCODE_ESCAPE)) +						} else if (m_input.getAsyncKeyState(Common::KEYCODE_ESCAPE))  							CORO_INVOKE_1(OpenOptionScreen, 0);  						else if (!_vm->getIsDemo()) { -							if (m_input.GetAsyncKeyState(Common::KEYCODE_F3) || m_input.GetAsyncKeyState(Common::KEYCODE_F5)) +							if (m_input.getAsyncKeyState(Common::KEYCODE_F3) || m_input.getAsyncKeyState(Common::KEYCODE_F5))  								// Save game screen  								CORO_INVOKE_1(OpenOptionScreen, 3); -							else if (m_input.GetAsyncKeyState(Common::KEYCODE_F2) || m_input.GetAsyncKeyState(Common::KEYCODE_F7)) +							else if (m_input.getAsyncKeyState(Common::KEYCODE_F2) || m_input.getAsyncKeyState(Common::KEYCODE_F7))  								// Load game screen  								CORO_INVOKE_1(OpenOptionScreen, 4);  						} @@ -226,7 +226,7 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {  				// Left Click  				// ************** -				if (m_input.MouseLeftClicked() && !m_inter.Active()) { +				if (m_input.mouseLeftClicked() && !m_inter.Active()) {  					if (m_curAction != TA_COMBINE)  						CORO_INVOKE_3(m_tony.MoveAndDoAction, m_itemName.GetHotspot(), m_itemName.GetSelectedItem(), m_point.CurAction()); @@ -247,29 +247,29 @@ SKIPCLICKSINISTRO:  				// ************  				if (m_curAction == TA_COMBINE) {  					// During a combine, it cancels it -					if (m_input.MouseRightClicked()) { +					if (m_input.mouseRightClicked()) {  						m_inv.EndCombine();  						m_curActionObj = 0;  						m_curAction = TA_GOTO;  						m_point.SetAction(m_curAction);  						m_point.SetSpecialPointer(RMPointer::PTR_NONE);  					} -				} else if (m_input.MouseRightClicked() && m_itemName.IsItemSelected() && m_point.GetSpecialPointer() == RMPointer::PTR_NONE) { +				} else if (m_input.mouseRightClicked() && m_itemName.IsItemSelected() && m_point.GetSpecialPointer() == RMPointer::PTR_NONE) {  					if (m_bGUIInterface) {  						// Before opening the interface, replaces GOTO  						m_curAction = TA_GOTO;  						m_curActionObj = 0;  						m_point.SetAction(m_curAction); -						m_inter.Clicked(m_input.MousePos()); +						m_inter.Clicked(m_input.mousePos());  					}  				}  				// Right Release  				// ************* -				if (m_input.MouseRightReleased()) { +				if (m_input.mouseRightReleased()) {  					if (m_bGUIInterface) { -						if (m_inter.Released(m_input.MousePos(), m_curAction)) { +						if (m_inter.Released(m_input.mousePos(), m_curAction)) {  							m_point.SetAction(m_curAction);  							CORO_INVOKE_3(m_tony.MoveAndDoAction, m_itemName.GetHotspot(), m_itemName.GetSelectedItem(), m_curAction); @@ -281,14 +281,14 @@ SKIPCLICKSINISTRO:  			}  			// Update the name under the mouse pointer -			m_itemName.SetMouseCoord(m_input.MousePos()); +			m_itemName.SetMouseCoord(m_input.mousePos());  			if (!m_inter.Active() && !m_inv.MiniActive())  				CORO_INVOKE_4(m_itemName.DoFrame, m_bigBuf, m_loc, m_point, m_inv);  		}  		// Interface & Inventory -		m_inter.DoFrame(m_bigBuf, m_input.MousePos()); -		m_inv.DoFrame(m_bigBuf, m_point, m_input.MousePos(), (!m_tony.InAction() && !m_inter.Active() && m_bGUIInventory)); +		m_inter.DoFrame(m_bigBuf, m_input.mousePos()); +		m_inv.DoFrame(m_bigBuf, m_point, m_input.mousePos(), (!m_tony.InAction() && !m_inter.Active() && m_bGUIInventory));  	}  	// Animate Tony @@ -305,7 +305,7 @@ SKIPCLICKSINISTRO:  		m_tony.SetScrollPosition(m_loc.ScrollPosition());  	if ((!m_tony.InAction() && m_bInput) || m_bAlwaysDrawMouse) { -		m_point.SetCoord(m_input.MousePos()); +		m_point.SetCoord(m_input.mousePos());  		m_point.DoFrame(&m_bigBuf);  	} @@ -498,7 +498,7 @@ void RMGfxEngine::Init() {  	mpalInstallItemIrq(ItemIrq);  	// Initialise the input -	m_input.Init(); +	m_input.init();  	// Initialise the mouse pointer  	m_point.Init(); @@ -527,7 +527,7 @@ void RMGfxEngine::Close(void) {  	m_inv.Close();  	m_tony.Close();  	m_point.Close(); -	m_input.Close(); +	m_input.close();  }  void RMGfxEngine::SwitchFullscreen(bool bFull) { diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp index fc98544e14..4990b379b9 100644 --- a/engines/tony/input.cpp +++ b/engines/tony/input.cpp @@ -49,7 +49,7 @@ RMInput::~RMInput() {  } -void RMInput::Poll(void) { +void RMInput::poll(void) {  	_leftClickMouse = _leftReleaseMouse = _rightClickMouse = _rightReleaseMouse = false;  	// Get pending events @@ -102,24 +102,24 @@ void RMInput::Poll(void) {  	}  } -void RMInput::Init() { +void RMInput::init() {  } -void RMInput::Close(void) { +void RMInput::close(void) {  } -bool RMInput::MouseLeft() { +bool RMInput::mouseLeft() {  	return _leftButton;  } -bool RMInput::MouseRight() { +bool RMInput::mouseRight() {  	return _rightButton;  }  /**   * Return true if a key has been pressed   */ -bool RMInput::GetAsyncKeyState(Common::KeyCode kc) { +bool RMInput::getAsyncKeyState(Common::KeyCode kc) {  	// The act of testing for a particular key automatically clears the state, to prevent  	// the same key being registered in multiple different frames  	bool result = _keyDown[(int)kc]; diff --git a/engines/tony/input.h b/engines/tony/input.h index 524f604ec2..e7e200e1b7 100644 --- a/engines/tony/input.h +++ b/engines/tony/input.h @@ -55,45 +55,45 @@ public:  	~RMInput();  	// Class initialisation -	void Init(/*uint32 hInst*/); +	void init(/*uint32 hInst*/);  	// Closes the class -	void Close(void); +	void close(void);  	// Polling (must be performed once per frame) -	void Poll(void); +	void poll(void);  	// Reading of the mouse -	RMPoint MousePos() { +	RMPoint mousePos() {  		return _mousePos;  	}  	// Current status of the mouse buttons -	bool MouseLeft(); -	bool MouseRight(); +	bool mouseLeft(); +	bool mouseRight();  	// Events of mouse clicks -	bool MouseLeftClicked() { +	bool mouseLeftClicked() {  		return _leftClickMouse;  	} -	bool MouseRightClicked() { +	bool mouseRightClicked() {  		return _rightClickMouse;  	} -	bool MouseBothClicked() { +	bool mouseBothClicked() {  		return _leftClickMouse && _rightClickMouse;  	} -	bool MouseLeftReleased() { +	bool mouseLeftReleased() {  		return _leftReleaseMouse;  	} -	bool MouseRightReleased() { +	bool mouseRightReleased() {  		return _rightReleaseMouse;  	} -	bool MouseBothReleased() { +	bool mouseBothReleased() {  		return _leftReleaseMouse && _rightReleaseMouse;  	}  	// Returns true if the given key is pressed -	bool GetAsyncKeyState(Common::KeyCode kc); +	bool getAsyncKeyState(Common::KeyCode kc);  };  } // End of namespace Tony diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index 1a245d9aba..aec1e1a57b 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -530,7 +530,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo  		g_system->unlockMutex(m_csModifyInterface);  	} -	if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_i)) { +	if (_vm->getEngine()->GetInput().getAsyncKeyState(Common::KEYCODE_i)) {  		GLOBALS.bCfgInvLocked = !GLOBALS.bCfgInvLocked;  	}  | 
