ScummVM API documentation
wwintro.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 WAYNESWORLD_WWINTRO_H
23 #define WAYNESWORLD_WWINTRO_H
24 
25 #include "common/scummsys.h"
26 
27 #define MAX_SOUNDS 20
28 
29 namespace WaynesWorld {
30 
31 class WaynesWorldEngine;
32 class GxlArchive;
33 class WWSurface;
34 
35 struct Frame {
36  const char *filename;
37  int x;
38  int y;
39  int delay;
40 };
41 
42 class WWIntro {
43 protected:
44  WaynesWorldEngine *_vm;
45 
46  WWSurface *_outlineSurface = nullptr;
47  WWSurface *_logoSurface = nullptr;
48  WWSurface *_backg2Surface = nullptr;
49  WWSurface *_introBackg1Image = nullptr;
50  WWSurface *_introWhead1[8] = {nullptr};
51  WWSurface *_introWbodyImage[5] = {nullptr};
52  WWSurface *_introGhead1[11] = {nullptr};
53  WWSurface *_introGbodyImage = nullptr;
54 
55  int _oldRefreshBackgFl = -1;
56  int _oldWBodyIndex = -1;
57  int _oldGBodyIndex = -1;
58  int _oldWHead1Index = -1;
59  int _oldGHead1Index = -1;
60 
61 public:
63  virtual ~WWIntro() {}
64 
65  virtual void runIntro() = 0;
66  WWSurface *_demoPt2Surface = nullptr;
67 
68 protected:
69  GxlArchive *_oanGxl = nullptr;
70  int _startOawPos = 0;
71  int _startOagPos = 0;
72  int _startOaoPos = 0;
73 
74 
75  bool initOanGxl();
76  void cleanOanGxl();
77  void wwEffect(int arg0, int arg1, bool flag = false);
78  void setColor236(int index);
79  void sub2FEFB(int arg_refreshBackgFl, int arg_wBodyIndex, int arg_gBodyIndex, int arg_wHead1Index, int arg_gHead1Index, int arg_TextId);
80  void introPt3_init();
81  void introPt3_clean();
82  bool introPt4();
83  virtual void introPt4_init() = 0;
84  virtual bool introPt4_intro() = 0;
85  bool introPt4_displayCallInTime();
86  virtual bool introPt4_caller1() = 0;
87  virtual bool introPt4_caller2() = 0;
88  virtual bool introPt4_caller3() = 0;
89  virtual bool introPt4_caller4() = 0;
90  void introPt4_cleanup();
91  bool introPt4_playGuitar();
92 
93 
94 private:
95  void sub3009A(int textId);
96 };
97 
98 class WWIntro_full : public WWIntro {
99 public:
101  ~WWIntro_full() override;
102 
103  void runIntro() override;
104 
105 private:
106  bool introPt1();
107  bool introPt3(bool flag);
108  void introDisplaySign();
109  void introPt7();
110 
111 protected:
112  bool introPt4_intro() override;
113  void introPt4_init() override;
114  bool introPt4_caller1() override;
115  bool introPt4_caller2() override;
116  bool introPt4_caller3() override;
117  bool introPt4_caller4() override;
118 };
119 
120 class WWIntro_demo1 : public WWIntro {
121 public:
123  ~WWIntro_demo1() override;
124 
125  void runIntro() override;
126 
127 private:
128  bool introPt1();
129  bool introPt1_selectware();
130  bool introPt3();
131  bool introPt3Bis();
132  bool introDisplaySign();
133  bool introPreviewRoom00();
134  bool introMapStonebridge();
135  bool introPreviewRoom08and22();
136  bool introMapButterfield();
137  bool introPreviewRoom07and15and16();
138  bool introMapDowntown();
139  bool introPreviewRoom10();
140  bool introMapNorthAurora();
141  bool introPreviewRoom03and23();
142  bool introMapSouthEastArea();
143  bool introPreviewRoom13and18();
144  bool introMapWestAurora();
145  bool introPreviewRoom01();
146 
147 protected:
148  bool introPt4_intro() override;
149  void introPt4_init() override;
150  bool introPt4_caller1() override;
151  bool introPt4_caller2() override;
152  bool introPt4_caller3() override;
153  bool introPt4_caller4() override;
154 };
155 } // End of namespace WaynesWorld
156 
157 #endif /* WAYNESWORLD_WWINTRO_H*/
Definition: graphics.h:30
Definition: detection.h:25
Definition: waynesworld.h:112
Definition: wwintro.h:98
Definition: gxlarchive.h:44
Definition: wwintro.h:42
Definition: wwintro.h:35
Definition: wwintro.h:120