ScummVM API documentation
bitmap.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_BITMAP_H
23 #define DIRECTOR_CASTMEMBER_BITMAP_H
24 
25 #include "director/castmember/castmember.h"
26 
27 namespace Image {
28 class ImageDecoder;
29 }
30 
31 namespace Director {
32 
33 class BitmapCastMember : public CastMember {
34 public:
35  BitmapCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint32 castTag, uint16 version, uint8 flags1 = 0);
36  BitmapCastMember(Cast *cast, uint16 castId, Image::ImageDecoder *img, uint8 flags1 = 0);
37  BitmapCastMember(Cast *cast, uint16 castId, BitmapCastMember &source);
39 
40  Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
41 
42  bool isModified() override;
43  void createMatte(Common::Rect &bbox);
44  Graphics::Surface *getMatte(Common::Rect &bbox);
45  Graphics::Surface *getDitherImg();
46 
47  bool hasField(int field) override;
48  Datum getField(int field) override;
49  bool setField(int field, const Datum &value) override;
50 
51  Common::String formatInfo() override;
52 
53  void load() override;
54  void unload() override;
55 
56  PictureReference *getPicture() const;
57  void setPicture(PictureReference &picture);
58  void setPicture(Image::ImageDecoder &image, bool adjustSize);
59 
60  Common::Point getRegistrationOffset() override;
61  Common::Point getRegistrationOffset(int16 width, int16 height) override;
62 
63  Picture *_picture = nullptr;
64  Graphics::Surface *_ditheredImg;
65  Graphics::Surface *_matte;
66 
67  uint16 _pitch;
68  int16 _regX;
69  int16 _regY;
70  uint16 _flags2;
71  uint16 _bytes;
72  CastMemberID _clut;
73  CastMemberID _ditheredTargetClut;
74 
75  uint8 _bitsPerPixel;
76 
77  uint32 _tag;
78  bool _noMatte;
79  bool _external;
80 };
81 
82 } // End of namespace Director
83 
84 #endif
Definition: cast.h:85
Definition: image_decoder.h:52
Definition: str.h:59
Definition: surface.h:67
Definition: channel.h:40
Definition: picture.h:33
Definition: rect.h:144
Definition: archive.h:35
Definition: lingo.h:213
Definition: rect.h:45
Definition: macwidget.h:39
Definition: lingo.h:130
Definition: stream.h:944
Definition: bitmap.h:33
Definition: movie_decoder.h:32
Definition: castmember.h:45
Definition: types.h:414