xoreos  0.0.5
txi.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef GRAPHICS_IMAGES_TXI_H
26 #define GRAPHICS_IMAGES_TXI_H
27 
28 #include <vector>
29 
30 #include "src/common/types.h"
31 #include "src/common/ustring.h"
32 
33 namespace Common {
34  class SeekableReadStream;
35 }
36 
37 namespace Graphics {
38 
40 class TXI {
41 public:
43  enum Blending {
47  };
48 
50  struct Coords {
51  float x, y, z;
52  };
53 
55  struct Features {
56  float alphaMean;
65  float caretIndent;
73  bool cube;
75  bool decal;
87  bool filter;
88  float fontHeight;
89  float fontWidth;
91  bool isBumpMap;
93  bool isLightMap;
98  bool mipMap;
103  bool onDemand;
104  float priority;
107  float spacingB;
108  float spacingR;
110  bool temporary;
112  bool unique;
116 
117  std::vector<Coords> upperLeftCoords;
118  std::vector<Coords> lowerRightCoords;
119 
120  Features();
121  };
122 
123  TXI();
125  ~TXI();
126 
127  void load(Common::SeekableReadStream &stream);
128 
129  bool empty() const;
130 
131  const Features &getFeatures() const;
133 
134 private:
135  enum Mode {
139  };
140 
141  bool _empty;
142 
144 
146 
148 
149  Blending parseBlending(const char *str);
150 };
151 
152 } // End of namespace Graphics
153 
154 #endif // GRAPHICS_IMAGES_TXI_H
float bumpMapScaling
Definition: txi.h:61
Blending parseBlending(const char *str)
Definition: txi.cpp:291
Definition: 2dafile.h:39
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::UString bumpMapTexture
Definition: txi.h:62
uint8_t uint8
Definition: types.h:200
std::vector< Coords > upperLeftCoords
Definition: txi.h:117
bool empty() const
Definition: txi.cpp:108
void load(Common::SeekableReadStream &stream)
Definition: txi.cpp:112
Blending blending
Definition: txi.h:60
uint8 downsampleFactor
Definition: txi.h:82
Coordinates.
Definition: txi.h:50
uint16_t uint16
Definition: types.h:202
uint8 distortAngle
Definition: txi.h:80
Common::UString procedureType
Definition: txi.h:105
bool compressTexture
Definition: txi.h:71
uint16 defaultWidth
Definition: txi.h:78
uint8 distortionAmplitude
Definition: txi.h:81
Low-level type definitions to handle fixed width types portably.
std::vector< Coords > lowerRightCoords
Definition: txi.h:118
bool _empty
Definition: txi.h:141
uint16 defaultHeight
Definition: txi.h:77
uint32 _curCoords
Definition: txi.h:147
Unicode string handling.
uint8 channelTranslate
Definition: txi.h:67
uint32_t uint32
Definition: types.h:204
Texture information.
Definition: txi.h:40
uint16 xBoxDownsample
Definition: txi.h:115
Texture features.
Definition: txi.h:55
Common::UString controllerScript
Definition: txi.h:72
uint8 arturoHeight
Definition: txi.h:57
Common::UString envMapTexture
Definition: txi.h:85
uint8 channelScale
Definition: txi.h:66
uint8 downsampleMin
Definition: txi.h:84
uint32 dbMapping
Definition: txi.h:74
float baselineHeight
Definition: txi.h:59
const Features & getFeatures() const
Definition: txi.cpp:283
Common::UString bumpyShinyTexture
Definition: txi.h:63
Blending
Blending type.
Definition: txi.h:43
uint16 numCharsPerSheet
Definition: txi.h:100
Features _features
Definition: txi.h:145
Interface for a seekable & readable data stream.
Definition: readstream.h:265
Mode _mode
Definition: txi.h:143
uint8 downsampleMax
Definition: txi.h:83