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
29
namespace
Access
{
30
31
namespace
Noctropolis {
32
33
struct
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
43
struct
ComicBlock
{
44
const
Common::Point
*polygon;
45
int32 soundFileIndex, soundResIndex;
46
const
ComicBox
*boxes;
47
int32 numBoxes;
48
};
49
50
struct
ComicPage
{
51
const
char
*filename;
52
int32 musicFileIndex, musicResIndex;
53
bool
musicRepeat;
54
int
unk;
55
const
ComicBlock
*blocks;
56
int32 numBlocks;
57
};
58
59
class
ComicResource
:
public
Resource
{
60
public
:
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
65
protected
:
66
Common::Array<const ComicPage *>
_pages;
67
};
68
69
70
enum
PageResult {
71
kPageResultNone,
72
kPageResultExit,
73
kPageResultNextPage,
74
kPageResultPrevPage
75
};
76
77
class
ComicViewer
{
78
public
:
79
ComicViewer
(
NoctropolisEngine
*vm);
80
~
ComicViewer
();
81
82
void
run(
const
ComicResource
*comic);
83
84
protected
:
85
NoctropolisEngine
*_vm;
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
Common::Array
Definition:
array.h:52
Access::Resource
Definition:
files.h:55
Access::SpriteResource
Definition:
asurface.h:146
Access::Noctropolis::ComicBox
Definition:
noctropolis_comicviewer.h:33
Access::Noctropolis::NoctropolisEngine
Definition:
noctropolis_game.h:46
Access::Noctropolis::ComicResource
Definition:
noctropolis_comicviewer.h:59
Common::Point
Definition:
rect.h:144
Access::Noctropolis::ComicBlock
Definition:
noctropolis_comicviewer.h:43
Access::Noctropolis::ComicPage
Definition:
noctropolis_comicviewer.h:50
Access
Definition:
access.h:62
Access::Noctropolis::ComicViewer
Definition:
noctropolis_comicviewer.h:77
engines
access
noctropolis
noctropolis_comicviewer.h
Generated on Tue Jun 2 2026 09:07:19 for ScummVM API documentation by
1.8.13