ScummVM API documentation
autotext.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 NANCY_ACTION_AUTOTEXT_H
23
#define NANCY_ACTION_AUTOTEXT_H
24
25
#include "engines/nancy/misc/hypertext.h"
26
#include "engines/nancy/action/actionrecord.h"
27
28
namespace
Nancy
{
29
namespace
Action {
30
31
// Action record used for rendering text inside the game viewport.
32
// Can be used in two ways: for single-use texts that get thrown away
33
// after a scene change, or for permanent storage (used in nancy's journal)
34
// Does not own or display any image data; it draws to a surface inside
35
// GraphicsManager, which other ActionRecords (Overlay and PeepholePuzzle) can use.
36
class
Autotext
:
public
virtual
ActionRecord
,
public
Misc::HypertextParser
{
37
public
:
38
Autotext
() {}
39
virtual
~
Autotext
() {}
40
41
void
readData(
Common::SeekableReadStream
&stream)
override
;
42
void
execute()
override
;
43
44
protected
:
45
Common::String
getRecordTypeName()
const override
{
return
"Autotext"
; }
46
47
virtual
void
readExtraData(
Common::SeekableReadStream
&stream);
48
49
uint16 _transparency = kPlayOverlayPlain;
50
uint16 _surfaceID = 0;
51
uint16 _fontID = 0;
52
uint16 _textColor = 0;
53
Common::Point
_offset;
54
uint16 _surfWidth = 0;
55
uint16 _surfHeight = 0;
56
57
bool
_useAutotextChunk =
false
;
58
59
// Only one of these can be valid
60
Common::String
_textKey;
61
Common::String
_embeddedText;
62
63
uint16 _order = kListFIFO;
64
bool
_shouldDrawMarks =
false
;
65
66
Common::Array<uint16>
_hotspotScenes;
67
68
Graphics::ManagedSurface
_image;
69
};
70
71
}
// End of namespace Action
72
}
// End of namespace Nancy
73
74
#endif // NANCY_ACTION_AUTOTEXT_H
Graphics::ManagedSurface
Definition:
managed_surface.h:51
Common::String
Definition:
str.h:59
Common::Array< uint16 >
Common::SeekableReadStream
Definition:
stream.h:745
Nancy::Misc::HypertextParser
Definition:
hypertext.h:32
Nancy::Action::Autotext
Definition:
autotext.h:36
Nancy::Action::ActionRecord
Definition:
actionrecord.h:97
Common::Point
Definition:
rect.h:45
Nancy
Definition:
actionmanager.h:32
engines
nancy
action
autotext.h
Generated on Fri Nov 22 2024 09:21:02 for ScummVM API documentation by
1.8.13