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); }
LICE_IBitmap* IGraphics::FindBitmap(int ID) { return s_bitmapCache.Find(ID); }