2013-06-24 00:43:57 -05:00
|
|
|
/* 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 ZVISION_CONTROL_H
|
|
|
|
#define ZVISION_CONTROL_H
|
|
|
|
|
2013-07-06 16:15:10 -05:00
|
|
|
#include "common/types.h"
|
2013-06-24 00:43:57 -05:00
|
|
|
|
2013-08-18 15:42:45 -05:00
|
|
|
#include "zvision/mouse_event.h"
|
|
|
|
|
2013-07-29 21:50:36 -05:00
|
|
|
namespace Common {
|
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
|
|
|
|
2013-06-24 00:43:57 -05:00
|
|
|
namespace ZVision {
|
|
|
|
|
2013-07-29 21:50:36 -05:00
|
|
|
class ZVision;
|
|
|
|
|
|
|
|
class Control {
|
|
|
|
public:
|
2013-08-18 15:28:16 -05:00
|
|
|
Control() : _key(0), _enabled(false) {}
|
2013-07-29 21:50:36 -05:00
|
|
|
virtual ~Control() {}
|
2013-08-18 15:28:16 -05:00
|
|
|
virtual bool enable(ZVision *engine) = 0;
|
|
|
|
virtual bool disable(ZVision *engine) { return true; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
uint32 _key;
|
2013-07-29 21:50:36 -05:00
|
|
|
|
|
|
|
protected:
|
2013-08-18 15:28:16 -05:00
|
|
|
bool _enabled;
|
2013-06-24 00:43:57 -05:00
|
|
|
|
2013-07-29 21:50:36 -05:00
|
|
|
// Static member functions
|
|
|
|
public:
|
|
|
|
static void parseFlatControl(ZVision *engine);
|
|
|
|
static void parsePanoramaControl(ZVision *engine, Common::SeekableReadStream &stream);
|
|
|
|
static void parseTiltControl(ZVision *engine, Common::SeekableReadStream &stream);
|
2013-06-24 00:43:57 -05:00
|
|
|
};
|
|
|
|
|
2013-08-18 15:42:45 -05:00
|
|
|
class PushToggleControl : public Control {
|
|
|
|
public:
|
|
|
|
PushToggleControl(uint32 key, Common::SeekableReadStream &stream);
|
|
|
|
bool enable(ZVision *engine);
|
|
|
|
bool disable(ZVision *engine);
|
|
|
|
|
|
|
|
private:
|
|
|
|
MouseEvent _event;
|
|
|
|
};
|
|
|
|
|
2013-08-20 20:29:28 -05:00
|
|
|
// TODO: Implement InputControl
|
|
|
|
// TODO: Implement SaveControl
|
|
|
|
// TODO: Implement SlotControl
|
|
|
|
// TODO: Implement LeverControl
|
|
|
|
// TODO: Implement SafeControl
|
|
|
|
// TODO: Implement FistControl
|
|
|
|
// TODO: Implement HotMovieControl
|
|
|
|
// TODO: Implement PaintControl
|
|
|
|
// TODO: Implement TilterControl
|
|
|
|
|
2013-06-24 13:38:40 -05:00
|
|
|
} // End of namespace ZVision
|
2013-06-24 00:43:57 -05:00
|
|
|
|
|
|
|
#endif
|