ScummVM API documentation
visual.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 STARK_VISUAL_VISUAL_H
23
#define STARK_VISUAL_VISUAL_H
24
25
#include "common/scummsys.h"
26
27
namespace
Stark
{
28
29
class
Visual
{
30
public
:
31
enum
VisualType {
32
kImageXMG = 2,
33
kRendered = 3,
34
kImageText = 4,
35
kSmackerStream = 5,
36
kActor = 6,
37
kSmackerFMV = 7,
38
kEffectFish = 8,
39
kEffectBubbles = 9,
40
kEffectFirefly = 10,
41
kExplodingImage = 100,
42
kFlashingImage = 101
43
};
44
45
explicit
Visual
(VisualType type) : _type(type) {}
46
virtual
~
Visual
() {}
47
51
template
<
class
T>
52
T *
get
();
53
54
private
:
55
VisualType _type;
56
};
57
58
template
<
class
T>
59
T *
Visual::get
() {
60
if
(_type != T::TYPE) {
61
return
nullptr
;
62
}
63
64
return
(T *)
this
;
65
}
66
67
}
// End of namespace Stark
68
69
#endif // STARK_VISUAL_VISUAL_H
Stark::Visual
Definition:
visual.h:29
Stark
Definition:
console.h:27
Stark::Visual::get
T * get()
Definition:
visual.h:59
engines
stark
visual
visual.h
Generated on Fri Nov 22 2024 09:24:20 for ScummVM API documentation by
1.8.13