ScummVM API documentation
te_warp_bloc.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_WARP_BLOC_H
23 #define TETRAEDGE_TE_TE_WARP_BLOC_H
24 
25 #include "tetraedge/te/te_color.h"
26 #include "tetraedge/te/te_vector2f32.h"
27 #include "tetraedge/te/te_vector2s32.h"
28 #include "tetraedge/te/te_vector3f32.h"
29 #include "tetraedge/te/te_intrusive_ptr.h"
30 #include "tetraedge/te/te_3d_texture.h"
31 #include "tetraedge/te/te_mesh.h"
32 
33 #include "common/file.h"
34 
35 namespace Tetraedge {
36 
37 class TeWarpBloc {
38 public:
39  // TODO; Better names than this.
40  enum CubeFace {
41  Face0 = 0,
42  Face1 = 1,
43  Face2 = 2,
44  Face3 = 3,
45  Face4 = 4,
46  Face5 = 5,
47  FaceInvalid = 6,
48  };
49  TeWarpBloc();
50  ~TeWarpBloc();
51 
52  void color(const TeColor &col);
53  void color(uint num, const TeColor &col);
54  void create(CubeFace face, uint i, uint j, const TeVector2s32 &offset);
55  void create();
56  void index(uint offset, uint val);
57  bool isLoaded() const;
58  void loadTexture(Common::File &file, const Common::String &type);
59  //void operator=(const TeWarpBloc &other); // unused
60  //bool operator==(const TeWarpBloc &other); // unused
61  void render();
62  void texture(uint idx, float x, float y);
63  void unloadTexture();
64  void vertex(uint n, float x, float y, float z);
65  TeVector3f32 vertex(uint n) const;
66 
67  const TeVector2s32 offset() const { return _offset; }
68  CubeFace face() const { return _cubeFace; }
69  void setCubeFace(CubeFace face) { _cubeFace = face; }
70  void setTextureFileOffset(long offset) { _textureDataFileOffset = offset; }
71 
72 private:
73  TeVector2s32 _offset;
74  CubeFace _cubeFace;
75  // Tex UV / indexes / texture from orig now in here.
77  long _textureDataFileOffset;
78 };
79 
80 } // end namespace Tetraedge
81 
82 #endif // TETRAEDGE_TE_TE_WARP_BLOC_H
Definition: te_warp_bloc.h:37
Definition: str.h:59
Definition: detection.h:27
Definition: te_color.h:30
Definition: file.h:47
Definition: te_vector2s32.h:31
Definition: te_vector3f32.h:33
Definition: ptr.h:159