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  bool isLoaded();
48  bool load(const Common::Path &path);
49  bool load(const TeImage &image);
50  bool load(const TeIntrusivePtr<Te3DTexture> &texture);
51  uint32 numberOfColumns() const;
52  uint32 numberOfRow() const;
53 
54  TeImage *optimisedTileImage(Common::Array<TeImage> &images, const TeVector2s32 &size,
55  const Common::SharedPtr<TePalette> &pal, const Graphics::PixelFormat &format);
56 
57  void release();
58  void save() {};
59  Tile *tile(const TeVector2s32 &loc);
60  void update(const TeImage &image);
61 
62  TeVector2s32 totalSize() const { return _totalSize; }
63 
64 private:
65  TeVector2s32 _totalSize;
66  Common::Array<Tile> _tileArray;
67  TeVector2s32 _tileSize;
68  TeVector2s32 _somethingSize;
69  bool _skipBlank; // note: not clear if this can ever get set?
70 
71 };
72 
73 } // end namespace Tetraedge
74 
75 #endif // TETRAEDGE_TE_TE_TILED_TEXTURE_H
Definition: te_image.h:42
Definition: detection.h:27
Definition: array.h:52
Definition: pixelformat.h:138
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