diff options
| author | Nipun Garg | 2019-06-27 04:19:35 +0530 | 
|---|---|---|
| committer | Eugene Sandulenko | 2019-09-03 17:17:01 +0200 | 
| commit | e3808675d2ccbeb629da24623fc91ba733199701 (patch) | |
| tree | d5e29b38c1f1ad71e3cfafc6287fe04c88ea2d28 | |
| parent | 3f01af23cfad61bfe142c2b1b490d6d1ccd9895b (diff) | |
| download | scummvm-rg350-e3808675d2ccbeb629da24623fc91ba733199701.tar.gz scummvm-rg350-e3808675d2ccbeb629da24623fc91ba733199701.tar.bz2 scummvm-rg350-e3808675d2ccbeb629da24623fc91ba733199701.zip | |
HDB: Add stubbed Input class
| -rw-r--r-- | engines/hdb/input.cpp | 61 | ||||
| -rw-r--r-- | engines/hdb/input.h | 73 | ||||
| -rw-r--r-- | engines/hdb/module.mk | 1 | 
3 files changed, 135 insertions, 0 deletions
| diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp new file mode 100644 index 0000000000..d20a2034d8 --- /dev/null +++ b/engines/hdb/input.cpp @@ -0,0 +1,61 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "hdb/hdb.h" + +namespace HDB { + +bool Input::init() { +	_stylusDown = false; + +	warning("STUB: Input::init: Set the default key values"); + +	_mouseX = kScreenWidth / 2; +	_mouseY = kScreenHeight / 2; +	_lastMouseX = _mouseX; +	_lastMouseY = _mouseY; + +	return true; +} + +void Input::setButtons(uint16 b) { +	warning("STUB: Input: setButtons required"); +} + +uint16 Input::getButtons() { +	warning("STUB: Input: getButtons required"); +	return 0; +} + +void Input::stylusDown(int x, int y) { +	warning("STUB: Input: stylusDown required"); +} + +void stylusUp(int x, int y) { +	warning("STUB: Input: stylusUp required"); +} + +void stylusMove(int x, int y) { +	warning("STUB: Input: stylusMove required"); +} + +}
\ No newline at end of file diff --git a/engines/hdb/input.h b/engines/hdb/input.h new file mode 100644 index 0000000000..57e145b518 --- /dev/null +++ b/engines/hdb/input.h @@ -0,0 +1,73 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef HDB_INPUT_H +#define HDB_INPUT_H + +#include "common/system.h" + +namespace HDB { + +enum Button { +	kButtonUp		= 2 << 0, +	kButtonDown		= 2 << 1, +	kButtonLeft		= 2 << 2, +	kButtonRight	= 2 << 3, +	kButtonA		= 2 << 4, +	kButtonB		= 2 << 5, +	kButtonC		= 2 << 6, +	kButtonD		= 2 << 7, +	kButtonMouseL	= 2 << 8, +	kButtonMouseM	= 2 << 9, +	kButtonMouseR	= 2 << 10, +	kButtonExit		= 2 << 11 +}; + +class Input { +public: + +	bool init(); + +	void setButtons(uint16 b); +	uint16 getButtons(); +	void stylusDown(int x, int y); +	void stylusUp(int x, int y); +	void stylusMove(int x, int y); + +private: + +	uint16 _buttons;	// Flags for buttons +	bool _stylusDown; +	int _stylusDownX, _stylusDownY; +	int _mouseX, _mouseY; +	int _lastMouseX, _lastMouseY; + +	// Definable Keys +	int _keyUp, _keyDown, _keyLeft, _keyRight; +	int _keyInv, _keyUse, _keyMenu, _keyDebug; +	int _keyQuit; +}; + +} // End of Namespace + +#endif // !HDB_INPUT_H + diff --git a/engines/hdb/module.mk b/engines/hdb/module.mk index bf53ad0473..af3236149a 100644 --- a/engines/hdb/module.mk +++ b/engines/hdb/module.mk @@ -15,6 +15,7 @@ MODULE_OBJS := \  	detection.o \  	file-manager.o \  	hdb.o \ +	input.o \  	lua-script.o \  	map-loader.o \  	window.o | 
