Loonim.TextureReader Class Reference

Detailed Description

A loader which is used to load textures.

Inheritance diagram for Loonim.TextureReader:
BinaryIO.Reader

Public Member Functions

 TextureReader (byte[] str)
 
 TextureReader (Stream str)
 
TextureNode ReadTextureNode ()
 
virtual PropertyValue ReadPropertyValue ()
 Reads a value from the stream. More...
 
- Public Member Functions inherited from BinaryIO.Reader
 Reader (Stream stream)
 Creates a new reader for the given stream. More...
 
 Reader (byte[] src)
 Creates a new reader for the given block of bytes. More...
 
byte[] ReadImageBytes ()
 Reads the bytes of a texture from the stream. More...
 
void Skip (int count)
 
int PeekByte ()
 Gets the value of the next byte in the stream. More...
 
virtual long MarkStart ()
 The current starting location. More...
 
long PackedInt ()
 Reads a packed integer from the stream. Not the opposite of More...
 
float ReadInt16F (float low, float width)
 Reads a compressed floating point value from the stream. Compressed floats are stored as a ushort. Their value represents a percentage of a range (i.e. it gets divided by the max ushort value 64k), where 64k = 100% (the top of the range, low + width). More...
 
ulong ReadUInt48 ()
 
ulong ReadUInt40 ()
 
long ReadInt40 ()
 
uint ReadUInt24 ()
 Reads a 3 byte unsigned integer from the stream. More...
 
int ReadInt24 ()
 Reads a 3 byte integer from the stream. More...
 
ulong ReadCompressed ()
 Reads a compressed integer - the opposite of Writer.WriteCompressed. More...
 
long ReadCompressedSigned ()
 Reads a signed compressed number. More...
 
override string ReadString ()
 Reads a string from the stream; it has no length limit. More...
 
string ReadString (int length)
 Reads a string with the given length from the stream. More...
 
string ReadZeroString ()
 Reads a string that is terminated with the null character. No length limit but slower to read. More...
 
string ReadLongString ()
 Reads a long string from the stream. Maximum length of 2GB. More...
 
float ReadRange (bool[] data, int start, int count, float min, float max)
 Reverses Writer.WriteRange. Converts a compressed float stored in a block of bits back into a floating point. More...
 
float ReadRange (int value, int valueMax, float min, float max)
 Reverses Writer.WriteRange. Converts a compressed float back into a floating point. More...
 
float UnmapRotation ()
 Unmaps a single byte rotation. More...
 
long BytesLeft ()
 Gets how many bytes are left in this stream, if it can be known. More...
 
bool More (int manyMore)
 Checks if there are at least the given number of bytes more in this stream. More...
 
bool More ()
 Checks if there are any more bytes in this stream. More...
 
long GetPosition ()
 Gets the current position in the stream this reader is at. More...
 
bool[] ReadBitsFrom (byte byteValue)
 Reads the bits from the given byte as a block of booleans. More...
 
int ReadFromBits (bool[] bits)
 Converts the given block of bits into an integer. More...
 
int ReadFromBits (bool[] bits, int start, int length)
 Converts the given portion of a block of bits into an integer. More...
 
bool[] ReadBits (int bytes)
 Reads the given number of bytes from the stream into a set of bits. More...
 
void Seek (long to)
 
void Seek (int to, SeekOrigin origin)
 Seek the stream to the given location. More...
 

Public Attributes

SurfaceTexture CurrentSurface
 The current surface being read. More...
 
- Public Attributes inherited from BinaryIO.Reader
long Length
 The length of the stream. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryIO.Reader
static int ValueMax (int bitCount)
 Returns the maximum number that x bits can hold. More...
 
static int CompressedSize (ulong l)
 How many bytes the given value would create if written out. More...
 
- Static Public Attributes inherited from BinaryIO.Reader
static Encoding TextEncoding =Encoding.UTF8
 The text encoding in use. More...
 
- Properties inherited from BinaryIO.Reader
virtual int DataIndex [get]
 The current data index. More...
 
bool IsMore [get]
 Checks if there are any more bytes in this stream. More...
 
long Position [get, set]
 

Constructor & Destructor Documentation

Loonim.TextureReader.TextureReader ( byte[]  str)
inline
Loonim.TextureReader.TextureReader ( Stream  str)
inline

Member Function Documentation

virtual PropertyValue Loonim.TextureReader.ReadPropertyValue ( )
inlinevirtual

Reads a value from the stream.

TextureNode Loonim.TextureReader.ReadTextureNode ( )
inline

Member Data Documentation

SurfaceTexture Loonim.TextureReader.CurrentSurface

The current surface being read.