ScummVM API documentation
filmloop.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 DIRECTOR_CASTMEMBER_FILMLOOP_H
23 #define DIRECTOR_CASTMEMBER_FILMLOOP_H
24 
25 #include "director/director.h"
26 #include "director/castmember/castmember.h"
27 
28 namespace Director {
29 
30 class Sprite;
31 
32 struct FilmLoopFrame {
34 };
35 
37 public:
38  FilmLoopCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
39  FilmLoopCastMember(Cast *cast, uint16 castId, FilmLoopCastMember &source);
41 
42  CastMember *duplicate(Cast *cast, uint16 castId) override { return (CastMember *)(new FilmLoopCastMember(cast, castId, *this)); }
43 
44  bool isModified() override;
45  //Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
46 
47  virtual Common::Array<Channel> *getSubChannels(Common::Rect &bbox, uint frame);
48  virtual CastMemberID getSubChannelSound1(uint frame);
49  virtual CastMemberID getSubChannelSound2(uint frame);
50 
51  void loadFilmLoopDataD2(Common::SeekableReadStreamEndian &stream);
52  void loadFilmLoopDataD4(Common::SeekableReadStreamEndian &stream);
53  void loadFilmLoopDataD5(Common::SeekableReadStreamEndian &stream);
54  void loadFilmLoopDataD6(Common::SeekableReadStreamEndian &stream);
55 
56  Common::String formatInfo() override;
57 
58  void load() override;
59  void unload() override;
60 
61  Common::Point getRegistrationOffset() override;
62  Common::Point getRegistrationOffset(int16 currentWidth, int16 currentHeight) override;
63 
64  uint32 getCastDataSize() override;
65  void writeCastData(Common::SeekableWriteStream *writeStream) override;
66 
67  void writeSCVWResource(Common::SeekableWriteStream *writeStream, uint32 offset);
68  uint32 getSCVWResourceSize();
69 
70  bool _enableSound;
71  bool _looping;
72  bool _crop;
73  bool _center;
74 
76  Common::Array<Channel> _subchannels;
77 };
78 
79 } // End of namespace Director
80 
81 #endif
Definition: cast.h:87
Definition: filmloop.h:36
Definition: str.h:59
Definition: array.h:52
Definition: rect.h:524
Definition: archive.h:36
Definition: hashmap.h:85
Definition: filmloop.h:32
Definition: rect.h:144
Definition: stream.h:351
Definition: stream.h:944
Definition: castmember.h:48
Definition: types.h:411