delete TileData::FindSpace function.
This commit is contained in:
@@ -42,7 +42,6 @@ namespace hgl
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TileObject *FindSpace(); ///<寻找一个空位
|
|
||||||
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:
|
public:
|
||||||
|
@@ -59,16 +59,6 @@ namespace hgl
|
|||||||
SAFE_CLEAR(tile_texture);
|
SAFE_CLEAR(tile_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
TileObject *TileData::FindSpace()
|
|
||||||
{
|
|
||||||
TileObject *obj;
|
|
||||||
|
|
||||||
if(!to_pool.Get(obj))
|
|
||||||
return(nullptr);
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TileData::WriteTile(TileObject *obj,const void *data,const uint bytes,int ctw,int cth)
|
bool TileData::WriteTile(TileObject *obj,const void *data,const uint bytes,int ctw,int cth)
|
||||||
{
|
{
|
||||||
if(!obj||!data||!bytes||ctw<=0||cth<=0)
|
if(!obj||!data||!bytes||ctw<=0||cth<=0)
|
||||||
@@ -107,9 +97,9 @@ namespace hgl
|
|||||||
if(!data||!bytes||ctw<=0||cth<=0)
|
if(!data||!bytes||ctw<=0||cth<=0)
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
|
|
||||||
TileObject *obj=FindSpace();
|
TileObject *obj;
|
||||||
|
|
||||||
if(!obj)
|
if(!to_pool.Get(obj))
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
|
|
||||||
WriteTile(obj,data,bytes,ctw,cth);
|
WriteTile(obj,data,bytes,ctw,cth);
|
||||||
|
Reference in New Issue
Block a user