ScummVM API documentation
te_frame_anim.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 TETRAEDGE_TE_TE_FRAME_ANIM_H
23 #define TETRAEDGE_TE_TE_FRAME_ANIM_H
24 
25 #include "tetraedge/te/te_signal.h"
26 #include "tetraedge/te/te_animation.h"
27 
28 namespace Tetraedge {
29 
30 class TeFrameAnim : public TeAnimation {
31 public:
32  TeFrameAnim();
33  virtual ~TeFrameAnim() {}
34 
35  void update(double millis) override;
36 
37  TeSignal0Param &frameChangedSignal() { return _frameChangedSignal; };
38 
39  void setFrameRate(float rate) { _frameRate = rate; }
40  void setNbFrames(int frames) { _nbFrames = frames; }
41  void setLoopCount(int count) { _loopCount = count; }
42  void setReversed(bool reverse) { _reversed = reverse; }
43 
44  void setStartTime(double start) { _startTime = start; }
45  void setEndTime(double end) { _endTime = end; }
46 
47  int lastFrameShown() const { return _lastFrameShown; }
48 
49 private:
50  float _frameRate;
51  // TODO: Isn't this the same as TeAnimation::_repeatCount??
52  int _loopCount;
53  int _nbFrames;
54  int _numFramesToShow;
55 
56  bool _reversed;
57 
58  int _lastFrameShown;
59  int _minFrame;
60 
61  double _startTime;
62  double _endTime;
63 
64  TeSignal0Param _frameChangedSignal;
65 };
66 
67 } // end namespace Tetraedge
68 
69 #endif // TETRAEDGE_TE_TE_FRAME_ANIM_H
Definition: te_signal.h:40
Definition: detection.h:27
Definition: te_frame_anim.h:30
Definition: te_animation.h:31