ScummVM API documentation
intro.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/*
23 * This code is based on original Hugo Trilogy source code
24 *
25 * Copyright (c) 1989-1995 David P. Gray
26 *
27 */
28
29#ifndef INTRO_H
30#define INTRO_H
31#include "graphics/surface.h"
32#include "graphics/fonts/winfont.h"
33
34namespace Hugo {
35
36enum seqTextIntro {
37 kIntro1 = 0,
38 kIntro2 = 1,
39 kIntro3 = 2
40};
41
43public:
47
48 virtual ~IntroHandler();
49
50 virtual void preNewGame() = 0;
51 virtual void introInit() = 0;
52 virtual bool introPlay() = 0;
53
54 void freeIntroData();
55 void loadIntroData(Common::SeekableReadStream &in);
56
57 byte getIntroSize() const;
58
59protected:
60 HugoEngine *_vm;
61
62 byte *_introX;
63 byte *_introY;
64 byte _introXSize;
65 int16 _introTicks; // Count calls to introPlay()
66 byte *_logo_v1d;
67
68 void loadFont(const char *fileName, const char *faceName, uint16 sizeInPoints);
69 bool wait(uint32 delay);
70};
71
72class intro_v1w : public IntroHandler {
73public:
75 ~intro_v1w() override;
76
77 void preNewGame() override;
78 void introInit() override;
79 bool introPlay() override;
80};
81
82class intro_v1d : public IntroHandler {
83public:
85 ~intro_v1d() override;
86
87 void preNewGame() override;
88 void introInit() override;
89 bool introPlay() override;
90private:
91 void drawLogo(int left, int top, int color);
92
93 int _introState;
94};
95
96class intro_v2w : public IntroHandler {
97public:
99 ~intro_v2w() override;
100
101 void preNewGame() override;
102 void introInit() override;
103 bool introPlay() override;
104};
105
106class intro_v2d : public IntroHandler {
107public:
109 ~intro_v2d() override;
110
111 void preNewGame() override;
112 void introInit() override;
113 bool introPlay() override;
114};
115
116class intro_v3w : public IntroHandler {
117public:
119 ~intro_v3w() override;
120
121 void preNewGame() override;
122 void introInit() override;
123 bool introPlay() override;
124};
125
126class intro_v3d : public IntroHandler {
127public:
129 ~intro_v3d() override;
130
131 void preNewGame() override;
132 void introInit() override;
133 bool introPlay() override;
134};
135
136} // End of namespace Hugo
137
138#endif
Definition: stream.h:745
Definition: winfont.h:46
Definition: hugo.h:219
Definition: intro.h:42
Definition: intro.h:82
Definition: intro.h:72
Definition: intro.h:106
Definition: intro.h:96
Definition: intro.h:126
Definition: intro.h:116
Definition: console.h:27
Definition: surface.h:67