ScummVM API documentation
preview.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 MYST_SCRIPTS_PREVIEW_H
23 #define MYST_SCRIPTS_PREVIEW_H
24 
25 #include "mohawk/sound.h"
26 #include "mohawk/myst_stacks/myst.h"
27 
28 #include "common/scummsys.h"
29 #include "common/util.h"
30 
31 namespace Mohawk {
32 
33 struct MystScriptEntry;
34 
35 namespace MystStacks {
36 
37 #define DECLARE_OPCODE(x) void x(uint16 var, const ArgumentsArray &args)
38 
39 class Preview : public Myst {
40 public:
41  explicit Preview(MohawkEngine_Myst *vm);
42  ~Preview() override;
43 
44  void disablePersistentScripts() override;
45  void runPersistentScripts() override;
46 
47 private:
48  void setupOpcodes();
49 
50  DECLARE_OPCODE(o_fadeToBlack);
51  DECLARE_OPCODE(o_fadeFromBlack);
52  DECLARE_OPCODE(o_stayHere);
53  DECLARE_OPCODE(o_speechStop);
54 
55  DECLARE_OPCODE(o_libraryBookcaseTransformDemo_init);
56  DECLARE_OPCODE(o_speech_init);
57  DECLARE_OPCODE(o_library_init);
58 
59  uint16 _libraryState; // 4
60  MystAreaImageSwitch *_library; // 32
61 
62  bool _speechRunning;
63  uint _speechStep;
64  CueList _cueList;
65  int16 _currentCue;
66  uint32 _speechNextTime; // 6
67 
68  void speech_run();
69  void speechUpdateCue();
70 
71  void libraryBookcaseTransform_run() override;
72 };
73 
74 } // End of namespace MystStacks
75 } // End of namespace Mohawk
76 
77 #undef DECLARE_OPCODE
78 
79 #endif
Definition: myst.h:129
Definition: sound.h:74
Definition: myst_areas.h:154
Definition: myst.h:37
Definition: bitmap.h:32
Definition: preview.h:39