convert tabs to spaces
This commit is contained in:
parent
99e6abd89a
commit
093fa93825
@ -1 +1 @@
|
|||||||
Subproject commit 2f3f7bf6b3d6a9ea540ba01d5b4a3de9cba83442
|
Subproject commit 57a355602415294de7bcfdca9bd935db5b484388
|
@ -38,34 +38,34 @@ namespace hgl
|
|||||||
|
|
||||||
uint tile_width,tile_height; ///<Tile的宽和高
|
uint tile_width,tile_height; ///<Tile的宽和高
|
||||||
uint32_t tile_bytes; ///<一个tile字节数
|
uint32_t tile_bytes; ///<一个tile字节数
|
||||||
uint tile_count,tile_max_count; ///<当前Tile数量与最大数量
|
uint tile_count,tile_max_count; ///<当前Tile数量与最大数量
|
||||||
uint tile_rows,tile_cols; ///<贴图中可用的Tile行数和列数
|
uint tile_rows,tile_cols; ///<贴图中可用的Tile行数和列数
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool WriteTile(TileObject *,const void *,const uint,const int,const int); ///<写入一个Tile数据
|
bool WriteTile(TileObject *,const void *,const uint,const int,const int); ///<写入一个Tile数据
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
int GetWidth ()const{return tile_width;} ///<取得Tile宽
|
|
||||||
int GetHeight ()const{return tile_height;} ///<取得Tile高
|
|
||||||
int GetCount ()const{return tile_count;} ///<取得Tile数量
|
|
||||||
int GetMaxCount ()const{return tile_max_count;} ///<取得Tile最大数量
|
|
||||||
int GetFreeCount()const{return tile_max_count-tile_count;} ///<取得空余Tile数量
|
|
||||||
|
|
||||||
Texture2D * GetTexture ()const{return tile_texture;} ///<取得贴图
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TileData(Device *,Texture2D *,const uint tw,const uint th);
|
int GetWidth ()const{return tile_width;} ///<取得Tile宽
|
||||||
virtual ~TileData();
|
int GetHeight ()const{return tile_height;} ///<取得Tile高
|
||||||
|
int GetCount ()const{return tile_count;} ///<取得Tile数量
|
||||||
|
int GetMaxCount ()const{return tile_max_count;} ///<取得Tile最大数量
|
||||||
|
int GetFreeCount()const{return tile_max_count-tile_count;} ///<取得空余Tile数量
|
||||||
|
|
||||||
TileObject *Add(const void *,const uint,const int=-1,const int=-1); ///<增加一个Tile
|
Texture2D * GetTexture ()const{return tile_texture;} ///<取得贴图
|
||||||
TileObject *Add(BitmapData *bmp){return this->Add(bmp->data,bmp->total_bytes,bmp->width,bmp->height);} ///<增加一个Tile
|
|
||||||
|
|
||||||
bool Delete(TileObject *); ///<删除一个Tile
|
public:
|
||||||
bool Change(TileObject *,const void *,const uint,const int=-1,const int=-1); ///<更改一个Tile的数据内容
|
|
||||||
void Clear(); ///<清除Tile数据
|
TileData(Device *,Texture2D *,const uint tw,const uint th);
|
||||||
|
virtual ~TileData();
|
||||||
|
|
||||||
|
TileObject *Add(const void *,const uint,const int=-1,const int=-1); ///<增加一个Tile
|
||||||
|
TileObject *Add(BitmapData *bmp){return this->Add(bmp->data,bmp->total_bytes,bmp->width,bmp->height);} ///<增加一个Tile
|
||||||
|
|
||||||
|
bool Delete(TileObject *); ///<删除一个Tile
|
||||||
|
bool Change(TileObject *,const void *,const uint,const int=-1,const int=-1); ///<更改一个Tile的数据内容
|
||||||
|
void Clear(); ///<清除Tile数据
|
||||||
};//class TileData
|
};//class TileData
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
|
@ -3,26 +3,26 @@
|
|||||||
|
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
namespace graph
|
namespace graph
|
||||||
{
|
{
|
||||||
Font::Font()
|
Font::Font()
|
||||||
{
|
{
|
||||||
memset(this,0,sizeof(Font));
|
memset(this,0,sizeof(Font));
|
||||||
}
|
}
|
||||||
|
|
||||||
Font::Font(const os_char *n,int w,int h,bool b,bool i,bool aa)
|
Font::Font(const os_char *n,int w,int h,bool b,bool i,bool aa)
|
||||||
{
|
{
|
||||||
memset(this,0,sizeof(Font));
|
memset(this,0,sizeof(Font));
|
||||||
|
|
||||||
hgl::strcpy(name,MAX_FONT_NAME_LENGTH,n);
|
hgl::strcpy(name,MAX_FONT_NAME_LENGTH,n);
|
||||||
|
|
||||||
width=w;
|
width=w;
|
||||||
height=h;
|
height=h;
|
||||||
|
|
||||||
bold=b;
|
bold=b;
|
||||||
italic=i;
|
italic=i;
|
||||||
|
|
||||||
anti=aa;
|
anti=aa;
|
||||||
}
|
}
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user