ScummVM API documentation
tm.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 STARK_FORMATS_TM_H
23 #define STARK_FORMATS_TM_H
24 
25 #include "engines/stark/formats/biff.h"
26 
27 #include "common/str.h"
28 #include "graphics/surface.h"
29 
30 namespace Stark {
31 
32 class ArchiveReadStream;
33 
34 namespace Gfx {
35 class TextureSet;
36 class Texture;
37 }
38 
39 namespace Formats {
40 
45 public:
51  static Gfx::TextureSet *read(ArchiveReadStream *stream);
52 
54  static BiffArchive *readArchive(ArchiveReadStream *stream);
55 
56 private:
57  static BiffObject *biffObjectBuilder(uint32 type);
58 
59 };
60 
61 enum TextureSetType {
62  kTextureSetGroup = 0x02faf082,
63  kTextureSetTexture = 0x02faf080
64 };
65 
71 class Texture : public BiffObject {
72 public:
73  static const uint32 TYPE = kTextureSetTexture;
74 
75  Texture();
76  ~Texture() override;
77 
78  Common::String getName() const {
79  return _name;
80  }
81 
89  Gfx::Texture *acquireTexturePointer();
90 
92  Graphics::Surface *getSurface() const;
93 
94  // BiffObject API
95  void readData(ArchiveReadStream *stream, uint32 dataLength) override;
96 
97 private:
98  Common::String _name;
99  Gfx::Texture *_texture;
100  Graphics::Surface _surface;
101  byte _u;
102 };
103 
104 } // End of namespace Formats
105 } // End of namespace Stark
106 
107 #endif // STARK_FORMATS_TM_H
Definition: str.h:59
Definition: biff.h:72
Definition: surface.h:67
Definition: biff.h:43
Definition: texture.h:37
Definition: console.h:27
Definition: texture.h:61
Definition: tm.h:71
Definition: archiveloader.h:46