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);
}
Esempio n. 3
0
void IGraphics::RetainBitmap(IBitmap* pBitmap)
{
  s_bitmapCache.Add((LICE_IBitmap*)pBitmap->mData);
}
Esempio n. 4
0
void IGraphics::RetainBitmap(IBitmap* pBitmap, int ID = -1)
{
  s_bitmapCache.Add((LICE_IBitmap*)pBitmap->mData, ID);
}