ScummVM API documentation
cutscene.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 DARKSEED_CUTSCENE_H
23 #define DARKSEED_CUTSCENE_H
24 
25 #include "darkseed/pal.h"
26 #include "darkseed/titlefont.h"
27 #include "darkseed/morph.h"
28 
29 namespace Darkseed {
30 
31 class Cutscene {
32  char _cutsceneId = 0;
33  uint16 _movieStep = 9999;
34  TitleFont *_titleFont = nullptr;
35  Pal _palette;
36  Anm _animation;
37  int _animIdx = 0;
38  int _animCount = 0;
39  int _animDelayCount = 0;
40  int _animDirection = 0;
41  uint32 _startTime = 0;
42  Morph *_morph = nullptr;
43  int _valvesIdx = 0;
44  int _faceIdx = 0;
45 
46 public:
47  Cutscene() {}
48  virtual ~Cutscene();
49  void play(char cutsceneId);
50  bool isPlaying() const {
51  return _movieStep != 9999;
52  }
53  void update();
54 
55 private:
56  bool introScene();
57  bool embryoInsertedScene();
58  bool shipLaunchScene();
59  bool alienBornScene();
60  bool babyDollScene();
61  bool bookScene();
62  bool nightmare2Scene();
63  bool nightmare3Scene();
64 
65  void runAnim(int direction = 1);
66  bool stepAnim(int drawMode = 1);
67 
68  bool stepValveAnim(bool doFaceAnim);
69 
70  void putHouse();
71 
72  void registTime();
73  bool waitTime(int16 duration) const;
74 
75  void freeMorph();
76 };
77 
78 }; // End of namespace Darkseed
79 
80 #endif // DARKSEED_CUTSCENE_H
Definition: morph.h:34
Definition: anm.h:30
Definition: titlefont.h:28
Definition: pal.h:33
Definition: cutscene.h:31
Definition: adlib_worx.h:27