diff --git a/CMCore b/CMCore index d4459cf4..339ee9a5 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit d4459cf4cd00f324f46fdb80522b8eb3c0beaea0 +Subproject commit 339ee9a5614211383999d725cd90e4278c9e1594 diff --git a/src/SceneGraph/TileData.cpp b/src/SceneGraph/TileData.cpp index 976685e9..019446e7 100644 --- a/src/SceneGraph/TileData.cpp +++ b/src/SceneGraph/TileData.cpp @@ -147,6 +147,9 @@ namespace hgl return(obj); } + /** + * 获取一个TileObject + */ TileObject *TileData::Acquire() { TileObject *obj; diff --git a/src/SceneGraph/font/TileFont.cpp b/src/SceneGraph/font/TileFont.cpp index 009f1b98..1b90790b 100644 --- a/src/SceneGraph/font/TileFont.cpp +++ b/src/SceneGraph/font/TileFont.cpp @@ -37,17 +37,27 @@ namespace hgl List new_chars; - for(uint i=0;itile_data->GetFreeCount()) //剩余空间不够了 { - if(!to_res.KeyExist(*cp)) - new_chars.Add(*cp); + int need=new_chars.GetCount()-tile_data->GetFreeCount(); //计算需要的tile数量差值 - cp++; + to_res.Get + + if(need>to_res.GetIdleCount()) //闲置项都不够,那没戏了 + return(false); } - if(new_chars.GetCount()>tile_data->GetFreeCount()) //剩余空间不够了 - return(false); - rs.ClearData(); rs.SetCount(ch_list.GetCount());