Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::gfx::TileTexture Class Reference

#include <TileTexture.h>

Inheritance diagram for kge::gfx::TileTexture:
kge::KgeUnknown

Public Member Functions

 TileTexture ()
 Constructor.
 ~TileTexture ()
 Destructor.
void CreateTileTexture (const char *pTextureFileName, int numCols, int numRows)
 Load a created tile texture from file.
void CreateTileTexture (int Width, int Height, int numCols, int numRows)
 Create the tile texture class with the needed data.
int AddTile (Tile *pTile)
 Add a tile to the tile texture and returns its ID. Returns -1 on fail.
TileGetTile (u32 TileID)
 Returns the tile by ID.
int GetTileCount ()
 Returns tile count.
float GetU ()
float GetV ()
double GetdU ()
double GetdV ()
TextureGetTexture ()
void Save (char *FileName)
 Save the current tile texture to the file.
void Load (char *FileName)
 Load the current tile texture to the file.
void TestTextureCompress ()
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Protected Member Functions

bool CheckTileCollision (int X, int Y, int XplusWidth, int YplusHeight)
void CreateCompressedTexture ()
 Create a compressed texture.
- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Protected Attributes

Texturem_pTexture
 Tile texture.
Texturem_pCompressedTexture
 Compressed texture.
int m_iNumCols
int m_iNumRows
int m_iWidth
int m_iHeight
int m_iMaxMipMapLevel
float m_fU
float m_fV
float m_fUO
float m_fVO
double m_dU
double m_dV
std::vector< Tile * > m_vTiles

Detailed Description

Definition at line 25 of file TileTexture.h.

Constructor & Destructor Documentation

kge::gfx::TileTexture::TileTexture ( )

Constructor.

kge::gfx::TileTexture::~TileTexture ( )

Destructor.

Member Function Documentation

int kge::gfx::TileTexture::AddTile ( Tile pTile)

Add a tile to the tile texture and returns its ID. Returns -1 on fail.

bool kge::gfx::TileTexture::CheckTileCollision ( int  X,
int  Y,
int  XplusWidth,
int  YplusHeight 
)
protected
void kge::gfx::TileTexture::CreateCompressedTexture ( )
protected

Create a compressed texture.

void kge::gfx::TileTexture::CreateTileTexture ( const char *  pTextureFileName,
int  numCols,
int  numRows 
)

Load a created tile texture from file.

void kge::gfx::TileTexture::CreateTileTexture ( int  Width,
int  Height,
int  numCols,
int  numRows 
)

Create the tile texture class with the needed data.

double kge::gfx::TileTexture::GetdU ( )
inline

Definition at line 141 of file TileTexture.h.

double kge::gfx::TileTexture::GetdV ( )
inline

Definition at line 143 of file TileTexture.h.

Texture* kge::gfx::TileTexture::GetTexture ( )
inline

Definition at line 145 of file TileTexture.h.

Tile* kge::gfx::TileTexture::GetTile ( u32  TileID)
inline

Returns the tile by ID.

Definition at line 132 of file TileTexture.h.

int kge::gfx::TileTexture::GetTileCount ( )
inline

Returns tile count.

Definition at line 135 of file TileTexture.h.

float kge::gfx::TileTexture::GetU ( )
inline

Definition at line 137 of file TileTexture.h.

float kge::gfx::TileTexture::GetV ( )
inline

Definition at line 139 of file TileTexture.h.

void kge::gfx::TileTexture::Load ( char *  FileName)

Load the current tile texture to the file.

void kge::gfx::TileTexture::Save ( char *  FileName)

Save the current tile texture to the file.

void kge::gfx::TileTexture::TestTextureCompress ( )
inline

Definition at line 153 of file TileTexture.h.

Member Data Documentation

double kge::gfx::TileTexture::m_dU
protected

Definition at line 172 of file TileTexture.h.

double kge::gfx::TileTexture::m_dV
protected

Definition at line 172 of file TileTexture.h.

float kge::gfx::TileTexture::m_fU
protected

Definition at line 168 of file TileTexture.h.

float kge::gfx::TileTexture::m_fUO
protected

Definition at line 168 of file TileTexture.h.

float kge::gfx::TileTexture::m_fV
protected

Definition at line 168 of file TileTexture.h.

float kge::gfx::TileTexture::m_fVO
protected

Definition at line 168 of file TileTexture.h.

int kge::gfx::TileTexture::m_iHeight
protected

Definition at line 162 of file TileTexture.h.

int kge::gfx::TileTexture::m_iMaxMipMapLevel
protected

Definition at line 162 of file TileTexture.h.

int kge::gfx::TileTexture::m_iNumCols
protected

Definition at line 162 of file TileTexture.h.

int kge::gfx::TileTexture::m_iNumRows
protected

Definition at line 162 of file TileTexture.h.

int kge::gfx::TileTexture::m_iWidth
protected

Definition at line 162 of file TileTexture.h.

Texture * kge::gfx::TileTexture::m_pCompressedTexture
protected

Compressed texture.

Definition at line 158 of file TileTexture.h.

Texture* kge::gfx::TileTexture::m_pTexture
protected

Tile texture.

Definition at line 158 of file TileTexture.h.

std::vector<Tile*> kge::gfx::TileTexture::m_vTiles
protected

Definition at line 176 of file TileTexture.h.


The documentation for this class was generated from the following file: