IBitmap IGraphicsLice::LoadIBitmap(int ID, const char* name, int nStates) { LICE_IBitmap* lb = s_bitmapCache.Find(ID); if (!lb) { lb = OSLoadBitmap(ID, name); bool imgResourceFound = (lb); assert(imgResourceFound); // Protect against typos in resource.h and .rc files. s_bitmapCache.Add(lb, ID); } return IBitmap(lb, lb->getWidth(), lb->getHeight(), nStates); }
IBitmap IGraphics::LoadIBitmap(int ID, const char* name, int nStates, bool framesAreHoriztonal) { LICE_IBitmap* lb = s_bitmapCache.Find(ID); if (!lb) { lb = OSLoadBitmap(ID, name); #ifndef NDEBUG bool imgResourceFound = lb; #endif assert(imgResourceFound); // Protect against typos in resource.h and .rc files. s_bitmapCache.Add(lb, ID); } return IBitmap(lb, lb->getWidth(), lb->getHeight(), nStates, framesAreHoriztonal); }
void IGraphics::RetainBitmap(IBitmap* pBitmap) { s_bitmapCache.Add((LICE_IBitmap*)pBitmap->mData); }
void IGraphics::RetainBitmap(IBitmap* pBitmap, int ID = -1) { s_bitmapCache.Add((LICE_IBitmap*)pBitmap->mData, ID); }