ScummVM API documentation
noctropolis_comicviewer.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 ACCESS_NOCTROPOLIS_NOCTROPOLIS_COMICVIEWER_H
23#define ACCESS_NOCTROPOLIS_NOCTROPOLIS_COMICVIEWER_H
24
25#include "common/rect.h"
26#include "access/noctropolis/noctropolis_game.h"
27#include "access/polygon.h"
28
29namespace Access {
30
31namespace Noctropolis {
32
33struct ComicBox {
34 byte style;
35 byte textColor;
36 int16 x, y;
37 const char *msgEn;
38 const char *msgFr;
39 const char *msgEs;
40 const char *msgDe;
41};
42
43struct ComicBlock {
44 const Common::Point *polygon;
45 int32 soundFileIndex, soundResIndex;
46 const ComicBox *boxes;
47 int32 numBoxes;
48};
49
50struct ComicPage {
51 const char *filename;
52 int32 musicFileIndex, musicResIndex;
53 bool musicRepeat;
54 int unk;
55 const ComicBlock *blocks;
56 int32 numBlocks;
57};
58
59class ComicResource : public Resource {
60public:
61 ComicResource(const ComicPage *pages[], int npages);
62 uint16 getCount() const { return _pages.size(); }
63 const ComicPage *getPage(int index) const { return _pages[index]; }
64
65protected:
67};
68
69
70enum PageResult {
71 kPageResultNone,
72 kPageResultExit,
73 kPageResultNextPage,
74 kPageResultPrevPage
75};
76
78public:
81
82 void run(const ComicResource *comic);
83
84protected:
86 ComicResource *_comic;
87 SpriteResource *_bubbleSprites;
88 int _currPage;
89 PageResult runPage(const ComicPage *page);
90 bool drawBubble(const ComicBox &bubble);
91};
92
93} // end namespace Noctropolis
94
95} // end namespace Access
96
97#endif // ACCESS_NOCTROPOLIS_NOCTROPOLIS_COMICVIEWER_H
Definition: noctropolis_comicviewer.h:59
Definition: noctropolis_comicviewer.h:77
Definition: noctropolis_game.h:46
Definition: files.h:55
Definition: asurface.h:146
Definition: array.h:52
Definition: access.h:62
Definition: noctropolis_comicviewer.h:43
Definition: noctropolis_comicviewer.h:33
Definition: noctropolis_comicviewer.h:50
Definition: rect.h:144