Esempio n. 1
0
// killough 3/5/98: reformatted and cleaned up
int wipe_ScreenWipe(int x, int y, int width, int height, int ticks)
{
  static boolean go;                               // when zero, stop the wipe
  if (!go)                                         // initial stuff
    {
      go = 1;
      wipe_scr = screens[0];
      wipe_initMelt(width, height, ticks);
    }
  // do a piece of wipe-in
  if (wipe_doMelt(width, height, ticks))     // final stuff
    {
      wipe_exitMelt(width, height, ticks);
      go = 0;
    }
  return !go;
}
Esempio n. 2
0
boolean wipe_ScreenWipe(int tics)
{
    // when zero, stop the wipe
    static boolean go = false;

    // initial stuff
    if (!go)
    {
        go = true;
        wipe_scr = screens[0];
        wipe_initMelt(tics);
    }

    // do a piece of wipe-in
    if (wipe_doMelt(tics))
    {
        // final stuff
        go = false;
        wipe_exitMelt(tics);
    }

    return !go;
}
Esempio n. 3
0
int wipe_ScreenWipe ( int wipeno, int width, int height, int ticks )
{
  int rc;

  //F**K YOU, CARMACK!!!!
  //F**K YOU AND YOUR F*****G FUNCTION POINTERS!!!
  //ESPECIALLY YOUR F*****G FUNCTION POINTERS!!!
  //F**K!!!!

  /*static int (*wipes[])(int, int, int) =
  {
  wipe_initColorXForm, wipe_doColorXForm, wipe_exitColorXForm,
  wipe_initMelt, wipe_doMelt, wipe_exitMelt
  };*/

  // initial stuff
  if (!go)
  {
    go = 1;
    //wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // carmack debug, don't touch!
    wipe_scr = screens[0];
    //(*wipes[wipeno*3])(width, height, ticks);
    switch (wipeno*3)
    {
    case 0:
      wipe_initColorXForm(width, height, ticks);
      break;
      /*case 1:
      wipe_doColorXForm(width, height, ticks);
      break;
      case 2:
      wipe_exitColorXForm(width, height, ticks);
      break;*/
    case 3:
      wipe_initMelt(width, height, ticks);
      break;
      /*case 4:
      wipe_doMelt(width, height, ticks);
      break;
      case 5:
      wipe_exitMelt(width, height, ticks);
      break;*/
    default:
      I_Error("wipe_ScreenWipe: INVALID FUNCTION INDICATOR");
    }
  }

  // do a piece of wipe-in
  V_MarkRect(0, 0, width, height);
  //rc = (*wipes[wipeno*3+1])(width, height, ticks);
  switch (1 + wipeno*3)
  {
    /*case 0:
    rc= wipe_initColorXForm(width, height, ticks);
    break;*/
  case 1:
    rc= wipe_doColorXForm(width, height, ticks);
    break;
    /*case 2:
    rc= wipe_exitColorXForm(width, height, ticks);
    break;
    case 3:
    rc= wipe_initMelt(width, height, ticks);
    break;*/
  case 4:
    rc= wipe_doMelt(width, height, ticks);
    break;
    /*case 5:
    rc= wipe_exitMelt(width, height, ticks);
    break;*/
  default:
    rc= 0;
    I_Error("wipe_ScreenWipe: INVALID FUNCTION INDICATOR");
  }
  //V_DrawBlock(x, y, 0, width, height, wipe_scr); // carmack debug, don't touch!

  // final stuff
  if (rc)
  {
    go = 0;
    switch (2 + wipeno*3)
    {
      /*case 0:
      wipe_initColorXForm(width, height, ticks);
      break;
      case 1:
      wipe_doColorXForm(width, height, ticks);
      break;*/
    case 2:
      wipe_exitColorXForm(width, height, ticks);
      break;
      /*case 3:
      wipe_initMelt(width, height, ticks);
      break;
      case 4:
      wipe_doMelt(width, height, ticks);
      break;*/
    case 5:
      wipe_exitMelt(width, height, ticks);
      break;
    default:
      I_Error("wipe_ScreenWipe: INVALID FUNCTION INDICATOR");
    }
    //(*wipes[wipeno*3+2])(width, height, ticks);
  }

  return !go;

}