ScummVM API documentation
animation.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 SWORD1_ANIMATION_H
23
#define SWORD1_ANIMATION_H
24
25
#include "common/list.h"
26
27
#include "sword1/screen.h"
28
#include "sword1/sound.h"
29
30
namespace
Graphics
{
31
struct
Surface;
32
}
33
34
namespace
Video {
35
class
VideoDecoder;
36
}
37
38
namespace
Sword1
{
39
40
enum
DecoderType {
41
kVideoDecoderDXA = 0,
42
kVideoDecoderSMK = 1,
43
kVideoDecoderPSX = 2,
44
kVideoDecoderMP2 = 3
45
};
46
47
class
MovieText
{
48
public
:
49
uint16 _startFrame;
50
uint16 _endFrame;
51
uint16 _color;
52
Common::String
_text;
53
MovieText
(
int
startFrame,
int
endFrame,
const
Common::String
&text,
int
color) {
54
_startFrame = startFrame;
55
_endFrame = endFrame;
56
_text = text;
57
_color = color;
58
}
59
};
60
61
class
MoviePlayer
{
62
public
:
63
MoviePlayer
(
SwordEngine
*vm,
Text
*textMan,
ResMan
*resMan,
Sound
*sound,
OSystem
*system,
Video::VideoDecoder
*decoder, DecoderType decoderType);
64
virtual
~MoviePlayer
();
65
Common::Error
load(uint32
id
);
66
void
play();
67
68
protected
:
69
SwordEngine
*_vm;
70
Text
*_textMan;
71
ResMan
*_resMan;
72
Sound
*_sound;
73
OSystem
*_system;
74
Common::List<MovieText>
_movieTexts;
75
int
_textX, _textY, _textWidth, _textHeight;
76
int
_textColor;
77
uint32 _black;
78
uint32 _c1Color, _c2Color, _c3Color, _c4Color;
79
DecoderType _decoderType;
80
bool
_modeChange;
81
82
Video::VideoDecoder
*_decoder;
83
84
bool
playVideo();
85
void
performPostProcessing(
byte
*screen);
86
void
drawFramePSX(
const
Graphics::Surface
*frame);
87
88
uint32 getBlackColor();
89
uint32 findTextColor();
90
void
convertColor(
byte
r,
byte
g,
byte
b,
float
&h,
float
&s,
float
&v);
91
};
92
93
MoviePlayer
*makeMoviePlayer(uint32
id
,
SwordEngine
*vm,
Text
*textMan,
ResMan
*resMan,
Sound
*sound,
OSystem
*system);
94
95
}
// End of namespace Sword1
96
97
#endif
Common::Error
Definition:
error.h:81
Common::List
Definition:
list.h:44
Common::String
Definition:
str.h:59
OSystem
Definition:
system.h:166
Sword1::MoviePlayer
Definition:
animation.h:61
Sword1::MovieText
Definition:
animation.h:47
Sword1::ResMan
Definition:
resman.h:65
Sword1::Sound
Definition:
sound.h:109
Sword1::SwordEngine
Definition:
sword1.h:104
Sword1::Text
Definition:
text.h:48
Video::VideoDecoder
Definition:
video_decoder.h:53
Graphics
Definition:
formatinfo.h:28
Sword1
Definition:
animation.h:38
Graphics::Surface
Definition:
surface.h:67
engines
sword1
animation.h
Generated on Sun Oct 25 2026 09:25:37 for ScummVM API documentation by
1.9.4