ScummVM API documentation
propertytimers.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 ILLUSIONS_DUCKMAN_PROPERTYTIMERS_H
23 #define ILLUSIONS_DUCKMAN_PROPERTYTIMERS_H
24 
25 #include "illusions/illusions.h"
26 #include "common/algorithm.h"
27 #include "common/stack.h"
28 
29 namespace Illusions {
30 
31 class IllusionsEngine_Duckman;
32 
33 struct PropertyTimer {
34  uint32 _propertyId;
35  uint32 _startTime;
36  uint32 _duration;
37  uint32 _endTime;
38  PropertyTimer() : _propertyId(0) {}
39 };
40 
41 const uint kPropertyTimersCount = 6;
42 
44 public:
46  ~PropertyTimers();
47 private:
49  PropertyTimer _propertyTimers[kPropertyTimersCount];
50  bool _propertyTimersActive;
51  bool _propertyTimersPaused;
52 public:
53  void addPropertyTimer(uint32 propertyId);
54  void setPropertyTimer(uint32 propertyId, uint32 duration);
55  void removePropertyTimer(uint32 propertyId);
56  bool findPropertyTimer(uint32 propertyId, PropertyTimer *&propertyTimer);
57  int updatePropertyTimers(uint flags);
58 };
59 
60 } // End of namespace Illusions
61 
62 #endif // ILLUSIONS_ILLUSIONS_H
Definition: propertytimers.h:33
Definition: actor.h:34
Definition: illusions_duckman.h:78
Definition: propertytimers.h:43