drop_invalid_objects (pData); }
mng_retcode MNG_DECL mng_display_resume (mng_handle hHandle){  mng_datap   pData;                   /* local vars */  mng_retcode iRetcode;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (((mng_datap)hHandle), MNG_FN_DISPLAY_RESUME, MNG_LC_START)#endif  MNG_VALIDHANDLE (hHandle)            /* check validity handle */  pData = ((mng_datap)hHandle);        /* and make it addressable */  if (!pData->bDisplaying)             /* can we expect this call ? */    MNG_ERROR (pData, MNG_FUNCTIONINVALID)  cleanup_errors (pData);              /* cleanup previous errors */  if (pData->bRunning)                 /* was it running ? */  {                                    /* are we expecting this call ? */    if ((pData->bTimerset) || (pData->bSuspended) || (pData->bSectionwait))     {      pData->bTimerset    = MNG_FALSE; /* reset the flags */      pData->bSectionwait = MNG_FALSE;#ifdef MNG_SUPPORT_READ      if (pData->bReading)             /* set during read&display ? */      {        if (pData->bSuspended)         /* calculate proper synchronization */          pData->iSynctime = pData->iSynctime - pData->iSuspendtime +                             pData->fGettickcount (hHandle);        else          pData->iSynctime = pData->fGettickcount (hHandle);        pData->bSuspended = MNG_FALSE; /* now reset this flag */                                         /* and continue reading */        iRetcode = read_graphic (pData);        if (pData->bEOF)               /* already at EOF ? */          pData->bReading = MNG_FALSE; /* then we're no longer reading */      }      else#endif /* MNG_SUPPORT_READ */      {                                /* synchronize timing */        pData->iSynctime = pData->fGettickcount (hHandle);                                       /* resume display processing */        iRetcode = process_display (pData);      }    }    else    {      MNG_ERROR (pData, MNG_FUNCTIONINVALID)    }  }  else  {                                    /* synchronize timing */    pData->iSynctime = pData->fGettickcount (hHandle);    pData->bRunning  = MNG_TRUE;       /* it's restarted again ! */                                       /* resume display processing */    iRetcode = process_display (pData);  }  if (iRetcode)                        /* on error bail out */    return iRetcode;  if (pData->bSuspended)               /* read suspension ? */  {     iRetcode            = MNG_NEEDMOREDATA;     pData->iSuspendtime = pData->fGettickcount ((mng_handle)pData);  }  else  if (pData->bTimerset)                /* indicate timer break ? */    iRetcode = MNG_NEEDTIMERWAIT;  else  if (pData->bSectionwait)             /* indicate section break ? */    iRetcode = MNG_NEEDSECTIONWAIT;  else  {                                    /* no breaks = end of run */    pData->bRunning        = MNG_FALSE;    if (pData->bFreezing)              /* trying to freeze ? */    {                                  /* then we're there ! */      pData->bFreezing     = MNG_FALSE;    }    if (pData->bResetting)             /* trying to reset as well ? */    {                                  /* full stop!!! */      pData->bDisplaying   = MNG_FALSE;      pData->bTimerset     = MNG_FALSE;      pData->iBreakpoint   = 0;      pData->bSectionwait  = MNG_FALSE;      pData->bFreezing     = MNG_FALSE;      pData->bResetting    = MNG_FALSE;      pData->pCurraniobj   = MNG_NULL;      pData->iFrameseq     = 0;        /* reset all display-state variables */      pData->iLayerseq     = 0;      pData->iFrametime    = 0;      pData->iRequestframe = 0;      pData->iRequestlayer = 0;      pData->iRequesttime  = 0;      pData->bSearching    = MNG_FALSE;                                       /* drop all display objects */      iRetcode = mng_drop_objects (pData, MNG_FALSE);      if (!iRetcode)                   /* drop the savebuffer */        iRetcode = mng_drop_savedata (pData);      if (iRetcode)                    /* on error bail out */        return iRetcode;    }  }  #ifdef MNG_SUPPORT_TRACE  MNG_TRACE (((mng_datap)hHandle), MNG_FN_DISPLAY_RESUME, MNG_LC_END)#endif  return iRetcode;}