Example #1
0
void
Surface::vfunc_DisplayFormat (SDL_Surface * (*func) (SDL_Surface *))
{
    SDL_Surface *tmp = NULL;

    tmp = func (surface);
    validPtr(tmp);
    SDL_FreeSurface (surface);
    surface = tmp;
}
Example #2
0
void
Surface::ConvertSurface (const Surface & s, Uint32 flag)
{
    SDL_Surface *tmp = NULL;

    tmp = SDL_ConvertSurface (surface, s.surface->format, flag);
    SDL_FreeSurface (surface);
    surface = tmp;
    validPtr (surface);
}
Example #3
0
void
Surface::Resize (int width, int height)
{
    SDL_Surface *tmp = SDL_CreateRGBSurface (surface->flags, width, height,
					     surface->format->BitsPerPixel,
					     0, 0, 0, 0);
    validPtr (tmp);

    SDL_BlitSurface (surface, NULL, tmp, NULL);
    SDL_FreeSurface (surface);
    surface = tmp;

}
Example #4
0
File: heap.c Project: fmccabe/cafe
void verifyHeap(heapPo H) {
  for (termPo t = H->start; t < H->curr;) {
    clssPo clss = classOf(t);
    if (isSpecialClass(clss)) {
      specialClassPo sClass = (specialClassPo) clss;
      t = sClass->scanFun(sClass, verifyScanHelper, H, t);
    } else {
      normalPo trm = C_TERM(t);
      labelPo lbl = C_LBL((termPo) clss);
      for (integer ix = 0; ix < labelArity(lbl); ix++) {
        validPtr(H, trm->args[ix]);
      }
      t = t + termSize(trm);
    }
  }
}
Example #5
0
File: heap.c Project: fmccabe/cafe
static retCode verifyScanHelper(ptrPo arg, void *c) {
  heapPo H = (heapPo) c;
  validPtr(H, *arg);
  return Ok;
}
Example #6
0
Surface::Surface (SDL_Surface * s)
{
    validPtr (s);
    surface = s;
}