ScummVM API documentation
setplayerclock.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_SETPLAYERCLOCK_H
23 #define NANCY_ACTION_SETPLAYERCLOCK_H
24 
25 #include "engines/nancy/action/actionrecord.h"
26 
27 namespace Nancy {
28 namespace Action {
29 
30 // Action record implementing an alarm clock. First used in nancy3
32 public:
33  enum AlarmState { kTimeMode, kAlarmMode, kWait };
35  virtual ~SetPlayerClock();
36 
37  void init() override;
38 
39  void readData(Common::SeekableReadStream &stream) override;
40  void execute() override;
41  void handleInput(NancyInput &input) override;
42 
43 protected:
44  Common::String getRecordTypeName() const override { return "SetPlayerClock"; }
45  bool isViewportRelative() const override { return true; }
46 
47  void drawTime(uint16 hours, uint16 minutes);
48 
49  Common::Path _imageName;
50 
51  Common::Rect _minutesDest;
52  Common::Rect _hoursDest;
53  Common::Rect _AMPMDest;
54  Common::Rect _timeButtonDest;
55  Common::Rect _alarmButtonDest;
56  Common::Rect _setButtonDest;
57  Common::Rect _cancelButtonDest;
58  Common::Rect _upButtonDest;
59  Common::Rect _downButtonDest;
60  Common::Rect _modeLightDest;
61 
62  Common::Array<Common::Rect> _minutesSrc;
64  Common::Rect _AMSrc;
65  Common::Rect _PMSrc;
66  Common::Rect _timeButtonSrc;
67  Common::Rect _alarmButtonSrc;
68  Common::Rect _setButtonSrc;
69  Common::Rect _cancelButtonSrc;
70  Common::Rect _upButtonSrc;
71  Common::Rect _downButtonSrc;
72  Common::Rect _timeLightSrc;
73  Common::Rect _alarmLightSrc;
74 
75  SoundDescription _buttonSound;
76  SceneChangeWithFlag _alarmSetScene;
77  uint16 _alarmSoundDelay = 0;
78  SoundDescription _alarmSetSound; // NO SOUND in MHM
79  SceneChangeWithFlag _exitScene;
80 
82 
83  int8 _lastDrawnHours = -1;
84  int8 _lastDrawnMinutes = -1;
85  int8 _alarmHours = -1;
86  bool _clearButton = true;
87  Time _sceneChangeTime;
88 
89  AlarmState _alarmState = kTimeMode;
90 };
91 
92 } // End of namespace Action
93 } // End of namespace Nancy
94 
95 #endif // NANCY_ACTION_SETPLAYERCLOCK_H
Definition: managed_surface.h:51
Definition: str.h:59
Definition: time.h:30
Definition: rect.h:144
Definition: path.h:52
Definition: stream.h:745
Definition: input.h:41
Definition: commontypes.h:171
Definition: actionrecord.h:149
Definition: setplayerclock.h:31
Definition: commontypes.h:254
Definition: actionmanager.h:32