ScummVM API documentation
bballpuzzle.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 NANCY_ACTION_BBALLPUZZLE_H
23 #define NANCY_ACTION_BBALLPUZZLE_H
24 
25 #include "engines/nancy/action/actionrecord.h"
26 #include "engines/nancy/misc/mousefollow.h"
27 
28 namespace Nancy {
29 namespace Action {
30 
32 public:
34  virtual ~BBallPuzzle() {}
35 
36  void init() override;
37 
38  void readData(Common::SeekableReadStream &stream) override;
39  void execute() override;
40  void handleInput(NancyInput &input) override;
41 
42 protected:
43  Common::String getRecordTypeName() const override { return "BBallPuzzle"; };
44  bool isViewportRelative() const override { return true; }
45 
46  Common::Path _imageName;
47 
48  uint16 _positions = 0;
49  uint16 _powers = 0;
50  uint16 _angles = 0;
51 
52  Common::Array<Common::Point> _correctVals;
53 
54  Common::Rect _shootButtonDest;
55  Common::Rect _minusButtonDest;
56  Common::Rect _plusButtonDest;
57 
58  Common::Rect _playerDest;
59  Common::Rect _powerDest;
60  Common::Rect _angleDest;
61  Common::Array<Common::Rect> _angleSliderHotspots;
62 
63  Common::Rect _shootButtonSrc;
64  Common::Rect _minusButtonSrc;
65  Common::Rect _plusButtonSrc;
66 
67  Common::Array<Common::Rect> _playerSrcs;
68  Common::Array<Common::Rect> _powerSrcs;
69  Common::Array<Common::Rect> _anglesSrcs;
70 
71  SoundDescription _shootSound;
72  SoundDescription _minusSound;
73  SoundDescription _plusSound;
74 
75  SceneChangeDescription _shootSceneChange;
76 
77  Common::Array<int16> _badShootFlags;
78  int16 _goodShootFlag = 0;
79  Common::Array<int16> _playerPositionFlags;
80 
81  int16 _winFlag = 0;
82 
83  SceneChangeWithFlag _exitScene;
84  Common::Rect _exitHotspot;
85 
87 
88  uint _curAngle = 0;
89  uint _curPower = 0;
90  uint _curPosition = 0;
91 
92  bool _pressedButton = false;
93 };
94 
95 } // End of namespace Action
96 } // End of namespace Nancy
97 
98 #endif // NANCY_ACTION_BBALLPUZZLE_H
Definition: managed_surface.h:51
Definition: str.h:59
Definition: commontypes.h:151
Definition: rect.h:144
Definition: bballpuzzle.h:31
Definition: path.h:52
Definition: stream.h:745
Definition: input.h:41
Definition: commontypes.h:171
Definition: actionrecord.h:149
Definition: commontypes.h:254
Definition: actionmanager.h:32