ScummVM API documentation
action_cel.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 PINK_ACTION_CEL_H
23 #define PINK_ACTION_CEL_H
24 
25 #include "pink/cel_decoder.h"
26 #include "pink/objects/actions/action.h"
27 
28 namespace Pink {
29 
30 class CelDecoder;
31 
32 class ActionCEL : public Action {
33 public:
34  ~ActionCEL() override;
35 
36  void deserialize(Archive &archive) override;
37 
38  bool initPalette(Screen *screen) override;
39 
40  void start() override;
41  void end() override;
42 
43  bool needsUpdate() { return _decoder.needsUpdate(); }
44  virtual void update() {};
45 
46  void pause(bool paused) override;
47 
48  Coordinates getCoordinates() override;
49 
50  const Common::Rect &getBounds() const { return _bounds; }
51  uint32 getZ() { return _z; }
52  CelDecoder *getDecoder() { return &_decoder; }
53 
54  void setCenter(Common::Point center);
55 
56 
57  void loadDecoder();
58 
59 protected:
60  virtual void onStart() = 0;
61 
62  void decodeNext();
63  void setFrame(uint frame);
64 
65  CelDecoder _decoder;
66  Common::String _fileName;
67  Common::Rect _bounds;
68  uint32 _z;
69 };
70 
71 } // End of namespace Pink
72 
73 #endif
Definition: archive.h:39
Definition: str.h:59
bool needsUpdate() const
Definition: rect.h:144
Definition: walk_mgr.h:37
Definition: action.h:33
Definition: archive.h:35
Definition: screen.h:44
Definition: rect.h:45
Definition: action_cel.h:32
Definition: cel_decoder.h:29