ScummVM API documentation
te_tiled_texture.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 TETRAEDGE_TE_TE_TILED_TEXTURE_H
23 #define TETRAEDGE_TE_TE_TILED_TEXTURE_H
24 
25 #include "common/path.h"
26 #include "common/ptr.h"
27 
28 #include "tetraedge/te/te_3d_texture.h"
29 #include "tetraedge/te/te_image.h"
30 #include "tetraedge/te/te_palette.h"
31 #include "tetraedge/te/te_resource.h"
32 #include "tetraedge/te/te_vector2s32.h"
33 #include "tetraedge/te/te_vector3f32.h"
34 
35 namespace Tetraedge {
36 
37 class TeTiledTexture : public TeResource {
38 public:
40 
41  typedef struct {
42  TeVector3f32 _vec1;
43  TeVector3f32 _vec2;
45  } Tile;
46 
47  uint imageFormat();
48  bool isLoaded();
49  bool load(const Common::Path &path);
50  bool load(const TeImage &image);
51  bool load(const TeIntrusivePtr<Te3DTexture> &texture);
52  uint32 numberOfColumns() const;
53  uint32 numberOfRow() const;
54 
55  TeImage *optimisedTileImage(Common::Array<TeImage> &images, const TeVector2s32 &size,
56  const Common::SharedPtr<TePalette> &pal, enum TeImage::Format format);
57 
58  void release();
59  void save() {};
60  Tile *tile(const TeVector2s32 &loc);
61  void update(const TeImage &image);
62 
63  TeVector2s32 totalSize() const { return _totalSize; }
64 
65 private:
66  TeVector2s32 _totalSize;
67  Common::Array<Tile> _tileArray;
68  TeVector2s32 _tileSize;
69  TeVector2s32 _somethingSize;
70  bool _skipBlank; // note: not clear if this can ever get set?
71 
72 };
73 
74 } // end namespace Tetraedge
75 
76 #endif // TETRAEDGE_TE_TE_TILED_TEXTURE_H
Definition: te_image.h:40
Definition: detection.h:27
Definition: array.h:52
Definition: te_resource.h:31
Definition: path.h:52
Definition: te_tiled_texture.h:37
Definition: te_intrusive_ptr.h:31
Definition: te_tiled_texture.h:41
Definition: te_vector2s32.h:31
Definition: te_vector3f32.h:33
Definition: ptr.h:159