Exemple #1
0
Sint4 getinitial(Sint4 x,Sint4 y)
{
  Sint4 i;
  gwrite(x,y,'_',3);
  do {

#ifdef _WINDOWS
    do_windows_events();
#endif

    for (i=0;i<40;i++) {
      if (kbhit())
        return getkey();
#ifdef _WINDOWS
      flashywait(5);
#else
      flashywait(15);
#endif
    }
    for (i=0;i<40;i++) {
      if (kbhit()) {
        gwrite(x,y,'_',3);
        return getkey();
      }
#ifdef _WINDOWS
      flashywait(5);
#else
      flashywait(15);
#endif
    }
  } while (1);
}
Exemple #2
0
void newframe(void)
{

#ifndef ARM

  Uint5 t;
  if (synchvid) {
    for (;curtime<ftime;curtime+=17094) { /* 17094 = ticks in a refresh */
#ifdef _WINDOWS
      do_windows_events();
#endif
      fillbuffer();
      gretrace();
      checkkeyb();
    }
    curtime-=ftime;
    fillbuffer();
  }
  else {
    do {
#ifdef _WINDOWS
      do_windows_events();
#endif
      fillbuffer();             /* Idle time */
      t=gethrt();
      checkkeyb();
    } while (curtime+ftime>t && t>curtime);
    curtime=t;
  }

#else

  for (;curtime<ftime;curtime+=15000) {
    fillbuffer();
    gretrace();
    soundint();
    checkkeyb();
  }
  curtime-=ftime;

#endif

#ifdef INTDRF
  frame++;
#endif

}
Exemple #3
0
void flashywait(Sint4 n)
{
  Sint4 i,gt,cx,p=0;
  Sint3 gap=19;
  setretr(FALSE);
  for (i=0;i<(n<<1);i++)
    for (cx=0;cx<volume;cx++) {
      gpal(p=1-p);
#ifdef _WINDOWS
      for (gt=0;gt<gap;gt++)
        do_windows_events();
#else
      for (gt=0;gt<gap;gt++);
#endif
    }
}