Esempio n. 1
0
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);
}
Esempio n. 2
0
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);
}