ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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/morph.h"
26 #include "darkseed/pal.h"
27 #include "darkseed/titlefont.h"
28 #include "zhmenufont.h"
29 
30 namespace Darkseed {
31 
32 struct I18NTextWithPosition;
33 
34 class Cutscene {
35  char _cutsceneId = 0;
36  uint16 _movieStep = 9999;
37  TitleFont *_titleFont = nullptr;
38  ZhMenuFont *_zhFont = nullptr;
39  Pal _palette;
40  Anm _animation;
41  int _animIdx = 0;
42  int _animCount = 0;
43  int _animDelayCount = 0;
44  int _animDirection = 0;
45  uint32 _startTime = 0;
46  Morph *_morph = nullptr;
47  int _valvesIdx = 0;
48  int _faceIdx = 0;
49 
50 public:
51  Cutscene() {}
52  virtual ~Cutscene();
53  void play(char cutsceneId);
54  bool isPlaying() const {
55  return _movieStep != 9999;
56  }
57  void update();
58 
59 private:
60  bool introScene();
61  bool embryoInsertedScene();
62  bool shipLaunchScene();
63  bool alienBornScene();
64  bool babyDollScene();
65  bool bookScene();
66  bool nightmare2Scene();
67  bool nightmare3Scene();
68 
69  void runAnim(int direction = 1);
70  bool stepAnim(int drawMode = 1);
71 
72  bool stepValveAnim(bool doFaceAnim);
73 
74  void putHouse();
75 
76  void registTime();
77  bool waitTime(int16 duration) const;
78 
79  void freeMorph();
80 
81  void displayTitleText(const I18NTextWithPosition &text);
82  void displayZhString(const char *text, int y);
83 };
84 
85 } // namespace Darkseed
86 
87 #endif // DARKSEED_CUTSCENE_H
Definition: morph.h:34
Definition: anm.h:30
Definition: titlefont.h:28
Definition: pal.h:34
Definition: cutscene.h:34
Definition: langtext.h:52
Definition: adlib_dsf.h:27
Definition: zhmenufont.h:41