ScummVM API documentation
subtitles.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
* This file is dual-licensed.
22
* In addition to the GPLv3 license mentioned above, MojoTouch has
23
* exclusively licensed this code on March 23th, 2024, to be used in
24
* closed-source products.
25
* Therefore, any contributions (commits) to it will also be dual-licensed.
26
*
27
*/
28
29
#ifndef TOON_SUBTITLES_H
30
#define TOON_SUBTITLES_H
31
32
#include "graphics/surface.h"
33
#include "toon/toon.h"
34
35
namespace
Toon
{
36
37
class
TimeWindow
{
38
public
:
39
uint16 _startFrame;
40
uint16 _endFrame;
41
Common::String
_text;
42
TimeWindow
(
int
startFrame,
int
endFrame,
const
Common::String
&text) {
43
_startFrame = startFrame;
44
_endFrame = endFrame;
45
_text = text;
46
}
47
};
48
49
class
SubtitleRenderer
{
50
public
:
51
SubtitleRenderer
(
ToonEngine
*vm);
52
~
SubtitleRenderer
();
53
54
bool
load(
const
Common::Path
&video);
55
void
render(
const
Graphics::Surface
&frame, uint32 frameNumber, byte color);
56
protected
:
57
ToonEngine
*_vm;
58
Graphics::Surface
*_subSurface;
59
bool
_hasSubtitles;
60
Common::List<TimeWindow>
_tw;
61
};
62
63
}
// End of namespace Toon
64
65
#endif
Common::String
Definition:
str.h:59
Graphics::Surface
Definition:
surface.h:67
Common::List
Definition:
list.h:44
Common::Path
Definition:
path.h:52
Toon::SubtitleRenderer
Definition:
subtitles.h:49
Toon::TimeWindow
Definition:
subtitles.h:37
Toon::ToonEngine
Definition:
toon.h:118
Toon
Definition:
anim.h:39
engines
toon
subtitles.h
Generated on Thu Nov 14 2024 09:11:16 for ScummVM API documentation by
1.8.13