ScummVM API documentation
anim.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/*
23 * This code is based on Labyrinth of Time code with assistance of
24 *
25 * Copyright (c) 1993 Terra Nova Development
26 * Copyright (c) 2004 The Wyrmkeep Entertainment Co.
27 *
28 */
29
30#ifndef LAB_ANIM_H
31#define LAB_ANIM_H
32
33namespace Lab {
34
35class LabEngine;
36#define CONTINUOUS 0xFFFF
37
38struct DIFFHeader {
39 uint16 _width;
40 uint16 _height;
41 char _fps;
42 uint32 _flags;
43};
44
45class Anim {
46private:
47 LabEngine *_vm;
48
49 uint32 _lastBlockHeader;
50 uint16 _numChunks;
51 uint32 _delayMicros;
52 bool _continuous;
53 bool _isPlaying;
54 bool _isAnim;
55 bool _isPal;
56 bool _donePal;
57 uint16 _frameNum;
58 bool _playOnce;
59 Common::File *_diffFile;
60 uint32 _diffFileStart;
61 uint32 _size;
62 bool _stopPlayingEnd;
63 uint16 _sampleSpeed;
64
65 byte *_outputBuffer;
66 DIFFHeader _headerdata;
67
68public:
69 Anim(LabEngine *vm);
70 ~Anim();
71
72 char _diffPalette[256 * 3];
73 bool _waitForEffect; // Wait for each sound effect to finish before continuing.
74 bool _doBlack; // Black the screen before new picture
75 bool _noPalChange; // Don't change the palette.
76 byte *_scrollScreenBuffer;
77
81 void setOutputBuffer(byte *memoryBuffer); // nullptr for output to screen
82 void readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData);
83 void diffNextFrame(bool onlyDiffData = false);
84
88 void stopDiff();
89
94
95 uint16 getDIFFHeight();
96
97 bool isPlaying() const { return _isPlaying; }
98};
99
100} // End of namespace Lab
101
102#endif // LAB_ANIM_H
Definition: file.h:47
Definition: anim.h:45
void stopDiffEnd()
void stopDiff()
void setOutputBuffer(byte *memoryBuffer)
Definition: lab.h:158
Definition: anim.h:38