ScummVM API documentation
movie.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 WATCHMAKER_MOVIE_H
23
#define WATCHMAKER_MOVIE_H
24
25
#include "common/memstream.h"
26
#include "watchmaker/3d/dds_header.h"
27
#include "watchmaker/types.h"
28
#include "watchmaker/utils.h"
29
30
namespace
Watchmaker
{
31
32
struct
gMovie
{
33
private
:
34
Common::MemoryReadStream
*_frameStream =
nullptr
;
35
public
:
36
Common::String
_name;
37
Common::SharedPtr<Common::SeekableReadStream>
_stream;
38
uint16 _numFrames;
39
uint16 _curFrame;
40
uint16 _width;
41
uint16 _height;
42
uint16 _numBlocks;
43
uint32 _startTime;
44
uint8 _keyFrame;
45
uint8 _frameRate;
46
47
uint32 *_frameOffsets;
48
uint8 *_buffer;
49
uint8 *_surfaceBuffer;
50
51
DDSHeader
_header;
52
53
Texture
*_texture =
nullptr
;
54
55
bool
_paused =
false
;
56
57
gMovie
(
Common::SharedPtr<Common::SeekableReadStream>
stream,
Texture
*texture,
const
Common::String
&name);
58
~
gMovie
();
59
60
bool
setFrame(uint16 newFrame);
61
void
loadThisFrameData(uint16 frame);
62
void
buildNewFrame(byte *surf, uint16 frame);
63
bool
updateMovie();
64
private
:
65
int
frameSize(
int
index);
66
uint32 bufferSize()
const
;
67
};
68
69
class
WorkDirs
;
70
Common::SharedPtr<gMovie>
gLoadMovie(
WorkDirs
&workDirs,
const
char
*TextName,
Texture
*texture);
71
72
}
// End of namespace Watchmaker
73
74
#endif // WATCHMAKER_MOVIE_H
Watchmaker
Definition:
2d_stuff.h:30
Common::String
Definition:
str.h:59
Watchmaker::DDSHeader
Definition:
dds_header.h:58
Watchmaker::gMovie
Definition:
movie.h:32
Watchmaker::WorkDirs
Definition:
work_dirs.h:30
Common::MemoryReadStream
Definition:
memstream.h:43
Common::SharedPtr< Common::SeekableReadStream >
Watchmaker::Texture
Definition:
dds_header.h:50
engines
watchmaker
3d
movie.h
Generated on Wed Dec 25 2024 09:11:48 for ScummVM API documentation by
1.8.13