示例#1
0
void I_FinishUpdate (void)
{
  if (I_SkipFrame()) return;

#ifdef MONITOR_VISIBILITY
  if (!(SDL_GetAppState()&SDL_APPACTIVE)) {
    return;
  }
#endif

#ifdef GL_DOOM
  if (V_GetMode() == VID_MODEGL) {
    // proff 04/05/2000: swap OpenGL buffers
    gld_Finish();
    return;
  }
#endif
/* Vladimir
  if (SDL_MUSTLOCK(screen)) {
      int h;
      byte *src;
      byte *dest;

      if (SDL_LockSurface(screen) < 0) {
        lprintf(LO_INFO,"I_FinishUpdate: %s\n", SDL_GetError());
        return;
      }
      dest=screen->pixels;
      src=screens[0].data;
      h=screen->h;
      for (; h>0; h--)
      {
        memcpy(dest,src,SCREENWIDTH*V_GetPixelDepth());
        dest+=screen->pitch;
        src+=screens[0].byte_pitch;
      }
      SDL_UnlockSurface(screen);
  }
  */
  /* Update the display buffer (flipping video pages if supported)
   * If we need to change palette, that implicitely does a flip */
  if (newpal != NO_PALETTE_CHANGE) {
    I_UploadNewPalette(newpal);
    newpal = NO_PALETTE_CHANGE;
  }
  
  // Vladimir SDL_Flip(screen);
  //JNI_UpdateRect(screen);
  JNI_Flip(screens[0].data, SCREENWIDTH, SCREENHEIGHT, colours);
}
示例#2
0
void I_FinishUpdate (void)
{
  if (I_SkipFrame()) return;

#ifndef GL_DOOM
	int h = 200;
	int w = 320;
	int step = 512;
	unsigned char *srcmain = screens[0];
	unsigned char *srcsub = screens[1];
	unsigned char *destmain = NULL, *destsub = NULL;

	// Jefklak 19/11/06 - sub screen rendering
	destmain = (unsigned char *)BG_GFX;
	if(!gen_console_enable)
		destsub = (unsigned char *)BG_GFX_SUB;
      for (; h>0; h--)
      {
		dmaCopy(srcmain, destmain, w);
		destmain += step;
		srcmain += SCREENWIDTH;

		if(!gen_console_enable)
		{
			// dmaCopy() uses DMA_CR(3) with syncs
			dmaCopy(srcsub, destsub, w);
			destsub += step;
			srcsub += SCREENWIDTH;
		}
	}

  // Update the display buffer (flipping video pages if supported)
  // If we need to change palette, that implicitely does a flip
  if (newpal != NO_PALETTE_CHANGE) {
    I_UploadNewPalette(newpal);
    newpal = NO_PALETTE_CHANGE;
	}
#else
  // proff 04/05/2000: swap OpenGL buffers
  gld_Finish();
#endif
}
示例#3
0
void I_FinishUpdate (void)
{
  //e6y: new mouse code
  UpdateGrab();

  // The screen wipe following pressing the exit switch on a level
  // is noticably jerkier with I_SkipFrame
  // if (I_SkipFrame())return;

#ifdef MONITOR_VISIBILITY
  if (!(SDL_GetAppState()&SDL_APPACTIVE)) {
    return;
  }
#endif

#ifdef GL_DOOM
  if (V_GetMode() == VID_MODEGL) {
    // proff 04/05/2000: swap OpenGL buffers
    gld_Finish();
    return;
  }
#endif

  if ((screen_multiply > 1) || SDL_MUSTLOCK(screen)) {
      int h;
      byte *src;
      byte *dest;

      if (SDL_LockSurface(screen) < 0) {
        lprintf(LO_INFO,"I_FinishUpdate: %s\n", SDL_GetError());
        return;
      }

      // e6y: processing of screen_multiply
      if (screen_multiply > 1)
      {
        R_ProcessScreenMultiply(screens[0].data, screen->pixels,
          V_GetPixelDepth(), screens[0].byte_pitch, screen->pitch);
      }
      else
      {
        dest=screen->pixels;
        src=screens[0].data;
        h=screen->h;
        for (; h>0; h--)
        {
          memcpy_fast(dest,src,SCREENWIDTH*V_GetPixelDepth()); //e6y
          dest+=screen->pitch;
          src+=screens[0].byte_pitch;
        }
      }

      SDL_UnlockSurface(screen);
  }

  /* Update the display buffer (flipping video pages if supported)
   * If we need to change palette, that implicitely does a flip */
  if (newpal != NO_PALETTE_CHANGE) {
    I_UploadNewPalette(newpal, false);
    newpal = NO_PALETTE_CHANGE;
  }

#ifdef GL_DOOM
  if (vid_8ingl.enabled)
  {
    gld_Draw8InGL();
  }
  else
#endif
  {
    SDL_Flip(screen);
  }
}