ScummVM API documentation
safe_control.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ZVISION_SAFE_CONTROL_H
23 #define ZVISION_SAFE_CONTROL_H
24 
25 #include "zvision/scripting/control.h"
26 
27 #include "common/list.h"
28 #include "common/rect.h"
29 
30 namespace Video {
31  class VideoDecoder;
32 }
33 
34 namespace ZVision {
35 
36 // Only used in Zork Nemesis, handles the safe in the Asylum (ac4g)
37 class SafeControl : public Control {
38 public:
39  SafeControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
40  ~SafeControl() override;
41 
42 private:
43  int16 _statesCount;
44  int16 _curState;
45  Video::VideoDecoder *_animation;
46  Common::Point _center;
47  Common::Rect _rectangle;
48  int16 _innerRaduis;
49  int32 _innerRadiusSqr;
50  int16 _outerRadius;
51  int32 _outerRadiusSqr;
52  int16 _zeroPointer;
53  int16 _startPointer;
54  int16 _targetFrame;
55 
56 public:
57  bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
58  bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
59  bool process(uint32 deltaTimeInMillis) override;
60 };
61 
62 } // End of namespace ZVision
63 
64 #endif
Definition: control.h:43
Definition: rect.h:144
Definition: stream.h:745
Definition: clock.h:29
Definition: safe_control.h:37
Definition: video_decoder.h:53
Definition: rect.h:45
Definition: avi_frames.h:36