コード例 #1
0
ファイル: f_wipe.c プロジェクト: arneolavhal/doomretro
boolean wipe_EndScreen(void)
{
    wipe_scr_end = (byte *)Z_Malloc(SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);
    I_ReadScreen(wipe_scr_end);
    V_DrawBlock(0, 0, 0, SCREENWIDTH, SCREENHEIGHT, wipe_scr_start);
    return false;
}
コード例 #2
0
ファイル: f_wipe.c プロジェクト: ComputerNerd/cgdoom
int wipe_EndScreen( int x, int y, int width, int height )
{
  wipe_scr_end = screens[3];
  I_ReadScreen(wipe_scr_end);
  V_DrawBlock(x, y, 0, width, height, wipe_scr_start); // restore start scr.
  return 0;
}
コード例 #3
0
ファイル: f_finale.c プロジェクト: hexameron/DOOM
void F_TextWrite (void)
{
  {
    // erase the entire screen to a tiled background
    const byte *src; // cph - const
    int         x,y;
    int         lump;
    
    // killough 4/17/98: 
    src = W_CacheLumpNum(lump = firstflat + R_FlatNumForName(finaleflat));
    
    V_DrawBlock(0, 0, 0, 64, 64, src, 0);
    
    for (y=0 ; y<SCREENHEIGHT ; y+=64)
      for (x=y ? 0 : 64; x<SCREENWIDTH ; x+=64)
	V_CopyRect(0, 0, 0, ((SCREENWIDTH-x) < 64) ? (SCREENWIDTH-x) : 64, 
		   ((SCREENHEIGHT-y) < 64) ? (SCREENHEIGHT-y) : 64, x, y, 0);
    W_UnlockLumpNum(lump);
  }
  V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
  { // draw some of the text onto the screen
    int         cx = 10;
    int         cy = 10;
    const char* ch = finaletext; // CPhipps - const
    int         count = (finalecount - 10)/Get_TextSpeed();                 // phares
    int         w;
    
    if (count < 0)
      count = 0;
    
    for ( ; count ; count-- ) {
      int       c = *ch++;
      
      if (!c)
	break;
      if (c == '\n') {
	cx = 10;
	cy += 11;
	continue;
      }
              
      c = toupper(c) - HU_FONTSTART;
      if (c < 0 || c> HU_FONTSIZE) {
	cx += 4;
	continue;
      }
      
      w = SHORT (hu_font[c]->width);
      if (cx+w > SCREENWIDTH)
	break;
      // CPhipps - patch drawing updated
      V_DrawMemPatch(cx, cy, 0, hu_font[c], NULL, VPT_STRETCH);
      cx+=w;
    }
  }
}
コード例 #4
0
ファイル: f_wipe.c プロジェクト: MP2E/chocolate-doom
int
wipe_EndScreen
( int	x,
  int	y,
  int	width,
  int	height )
{
    wipe_scr_end = Z_Malloc(SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);
    I_ReadScreen(wipe_scr_end);
    V_DrawBlock(x, y, width, height, wipe_scr_start); // restore start scr.
    return 0;
}
コード例 #5
0
ファイル: d_main.c プロジェクト: M-Code/chocolate-doom
//
// D_DrawIntroSequence
//
// [STRIFE] New function
// haleyjd 20110206: Refresh the intro sequence
//
static void D_DrawIntroSequence(void)
{
    int laserpos;
    int robotpos;

    if(!showintro)
        return;

    D_IntroBackground(); // haleyjd: refresh the background

    // Laser position
    laserpos = (200 * introprogress / MAXINTROPROGRESS) + 60;

    // BUG: (?) Due to this clip, the laser never even comes close to
    // touching the peasant; confirmed with vanilla. This MAY have been
    // intentional, for effect, however, since no death frames are shown 
    // either... kind of a black-out death.
    if(laserpos > 200)
        laserpos = 200;

    // Draw the laser
    // Blitted 16 bytes for 16 rows starting at 705280 + laserpos
    // (705280 - 0xA0000) / 320 == 156
    V_DrawBlock(laserpos, 156, 16, 16, rawgfx_startlz[laserpos % 2]);

    // Robot position
    robotpos = laserpos % 5 - 2;

    // Draw the robot
    // Blitted 48 bytes for 48 rows starting at 699534 + (320*robotpos)
    // 699534 - 0xA0000 == 44174, which % 320 == 14, / 320 == 138
    V_DrawBlock(14, 138 + robotpos, 48, 48, rawgfx_startbot);

    // Draw the peasant
    // Blitted 32 bytes for 64 rows starting at 699142
    // 699142 - 0xA0000 == 43782, which % 320 == 262, / 320 == 136
    V_DrawBlock(262, 136, 32, 64, rawgfx_startp[laserpos % 4]);

    I_FinishUpdate();
}
コード例 #6
0
ファイル: f_wipe.c プロジェクト: Lord-Ptolemy/strife-ve
// haleyjd 08/26/10: [STRIFE] Verified unmodified.
int
wipe_ScreenWipe
( int	wipeno,
  int	x,
  int	y,
  int	width,
  int	height,
  int	ticks )
{
    int rc;
    static int (*wipes[])(int, int, int) =
    {
	    wipe_initColorXForm, wipe_doColorXForm, wipe_exitColorXForm,
	    wipe_initMelt, wipe_doMelt, wipe_exitMelt
    };

    // initial stuff
    if(!go)
    {
	    go = 1;
            // haleyjd 20110629 [STRIFE]: We *must* use a temp buffer here.
	    wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG
	    //wipe_scr = I_VideoBuffer;
	    (*wipes[wipeno*3])(width, height, ticks);
    }

    // do a piece of wipe-in
    V_MarkRect(0, 0, width, height);
    rc = (*wipes[wipeno*3+1])(width, height, ticks);

    // [SVE] svillarreal
    if(!use3drenderer)
    {
        // haleyjd 20110629 [STRIFE]: Copy temp buffer to the real screen.
        V_DrawBlock(x, y, width, height, wipe_scr);
    }

    // final stuff
    if(rc)
    {
	    go = 0;
	    (*wipes[wipeno*3+2])(width, height, ticks);
    }

    return !go;
}
コード例 #7
0
ファイル: f_wipe.c プロジェクト: Lord-Ptolemy/strife-ve
// haleyjd 08/26/10: [STRIFE] Verified unmodified.
int
wipe_EndScreen
( int	x,
  int	y,
  int	width,
  int	height )
{
    // [SVE] svillarreal
    if(use3drenderer)
    {
        return 0;
    }

    wipe_scr_end = Z_Malloc(SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);
    I_ReadScreen(wipe_scr_end);
    V_DrawBlock(x, y, width, height, wipe_scr_start); // restore start scr.
    return 0;
}
コード例 #8
0
ファイル: st_stuff.cpp プロジェクト: rlsosborne/doom
OVERLAY void ST_refreshBackground(void)
{
    if (st_statusbaron)
    {
        // CPhipps - patch drawing updated
        V_DrawBlock(ST_X, 0, BG, sbar_width, sbar_height, sbar, VPT_NONE);

        // killough 3/7/98: make face background change with displayplayer
        if (netgame) {
            int whattrans = playernumtotrans[displayplayer];
            V_DrawMemPatch(ST_FX, 0, BG, faceback,
                           whattrans ? translationtables + 256*(whattrans-1) : NULL,
                           whattrans ? VPT_TRANS : VPT_NONE);
        }

        V_CopyRect(ST_X, 0, BG, ST_WIDTH, ST_HEIGHT, ST_X, ST_Y, FG);
    }
}
コード例 #9
0
ファイル: f_wipe.c プロジェクト: Logan-A/SRB2-Public
/** Save the "after" screen of a wipe.
  *
  * \param x      Starting x coordinate of the starting screen to restore.
  * \param y      Starting y coordinate of the starting screen to restore.
  * \param width  Width of the starting screen to restore.
  * \param height Height of the starting screen to restore.
  */
void F_WipeEndScreen(INT32 x, INT32 y, INT32 width, INT32 height)
{
	if(rendermode != render_soft)
	{
#if defined (SHUFFLE) && defined (HWRENDER)
		HWR_EndScreenWipe();
#endif
		return;
	}
#ifdef NOWIPE
	(void)x;
	(void)y;
	(void)width;
	(void)height;
#else
	wipe_scr_end = screens[3];
	I_ReadScreen(wipe_scr_end);
	V_DrawBlock(x, y, 0, width, height, wipe_scr_start);
#endif
}
コード例 #10
0
ファイル: d_main.c プロジェクト: M-Code/chocolate-doom
//
// D_IntroBackground
//
// [STRIFE] New function
// haleyjd 20110206: Strife only drew this once, but for supporting double-
// buffered or page-flipped surfaces it is best to redraw the entire screen
// every frame.
//
static void D_IntroBackground(void)
{
    if(!showintro)
        return;

    // Fill the background entirely (wasn't needed in vanilla)
    V_DrawFilledBox(0, 0, SCREENWIDTH, SCREENHEIGHT, 0);

    // Strife cleared the screen somewhere in the low-level code between the
    // intro and the titlescreen, so this is to take care of that and get
    // proper fade-in behavior on the titlescreen
    if(introprogress >= MAXINTROPROGRESS)
    {
        I_FinishUpdate();
        return;
    }

    // Draw a 95-pixel rect from STARTUP0 starting at y=57 to (0,41) on the
    // screen (this was a memcpy directly to 0xA3340 in low DOS memory)
    V_DrawBlock(0, 41, 320, 95, rawgfx_startup0 + (320*57));
}
コード例 #11
0
//
// R_RenderView
//
void R_RenderPlayerView (player_t* player)
{       
  R_SetupFrame (player);

  // Clear buffers.
  R_ClearClipSegs ();
  R_ClearDrawSegs ();
  R_ClearPlanes ();
  R_ClearSprites ();
    
  rendered_segs = rendered_visplanes = 0;
  if (autodetect_hom)
    { // killough 2/10/98: add flashing red HOM indicators
      char c[47*47];
      extern int lastshottic;
      int i,color=(gametic % 20) < 9 ? 0xb0 : 0;
      memset(*screens+viewwindowy*SCREENWIDTH,color,viewheight*SCREENWIDTH);
      for (i=0;i<47*47;i++)
        {
          char t =
"/////////////////////////////////////////////////////////////////////////////"
"/////////////////////////////////////////////////////////////////////////////"
"///////jkkkkklk////////////////////////////////////hkllklklkklkj/////////////"
"///////////////////jkkkkklklklkkkll//////////////////////////////kkkkkklklklk"
"lkkkklk//////////////////////////jllkkkkklklklklklkkklk//////////////////////"
"//klkkllklklklkllklklkkklh//////////////////////kkkkkjkjjkkj\3\205\214\3lllkk"
"lkllh////////////////////kllkige\211\210\207\206\205\204\203\203\203\205`\206"
"\234\234\234\234kkllg//////////////////klkkjhfe\210\206\203\203\203\202\202"
"\202\202\202\202\203\205`\207\211eikkk//////////////////kkkk\3g\211\207\206"
"\204\203\202\201\201\200\200\200\200\200\201\201\202\204b\210\211\3lkh///////"
"//////////lklki\213\210b\206\203\201\201\200\200\200\200\200Z\200\200\200\202"
"\203\204\205\210\211jll/////////////////lkkk\3\212\210b\205\202\201\200\200"
"\200XW\200\200\200\200\200\200\202\203\204\206\207eklj////////////////lkkjg"
"\211b\206\204\202\200\200\200YWWX\200Z\200\200\200\202\203\203\205bdjkk//////"
"//////////llkig\211a\205\203\202\200\200\200YXWX\200\200\200\200\200\201\202"
"\203\203\206\207ekk////////////////lkki\3\211\206\204\202\201\200\200XXWWWXX"
"\200\200\200\200\202\202\204\206\207ekk////////////////lkkj\3e\206\206\204\\"
"\200\200XWVVWWWXX\200\200\200\\\203\205\207\231kk////////////////lkkjjgcccfd"
"\207\203WVUVW\200\200\202\202\204\204\205\204\206\210gkk////////////////kkkkj"
"e``\210hjjgb\200W\200\205\206fhghcbdcdfkk////////////////jkkj\3\207ab\211e"
"\213j\3g\204XX\207\213jii\212\207\203\204\210gfkj///////////////j\211lkjf\210"
"\214\3\3kj\213\213\211\205X\200\205\212\210\213\213\213\211\210\203\205gelj//"
"////////////hf\211\213kh\212\212i\212gkh\202\203\210\210\202\201\206\207\206"
"\\kkhf\210aabkk//////////////je\210\210\3g\210\207\210e\210c\205\204\202\210"
"\207\203\202\210\205\203\203fjbe\213\210bbieW/////////////ke\207\206ie\206"
"\203\203\203\205\205\204\203\210\211\207\202\202\206\210\203\204\206\207\210"
"\211\231\206\206`\206\206]/////////////kf\\\202ig\204\203\202\201\\\202\202"
"\205\207\210\207\203\202\206\206\206\205\203\203\203\202\202\203\204b\206\204"
"Z/////////////i\3\\\204j\212\204\202\201\200\202\202\202\203\206\211\210\203"
"\203c\205\202\201\201\201\200\200\201\202\204a\204\201W/////////////j\3\207"
"\210jh\206\202\200\200\200\200\200\202\206\211\205\202\202bb\201\200\200\200"
"\200\200\200\202\203b\\WW/////////////jke\206jic\203\201\200\200\200\200\202"
"\211\211\201\200\200\204\210\201\200\200W\200\200\200\201\204c\\\200]////////"
"//////kd\210\3\3e\205\202\200\200W\200\202\211\210\210\201\202\207\210\203"
"\200WWW\200\200\202\205d\\\202///////////////kkdhigb\203\201\200\200\200\202"
"\206\210\210\205\210\211\206\203\200WWW\200\201\203ce\203\205////////////////"
"ijkig\211\203\201\200\200\202\206\207\207\205\206\207\210\206\203\200\200WW"
"\200\203\206ce\202_//////////////////jig\210\203\202\200\201\206\210\210\205"
"\204\204\205\206\206\204\202\200\200\200\200\203bcd////////////////////hjgc"
"\205\202\201\203\206\210\206\204\204\202\202\204\205\206\204\200\200\200\201"
"\206\207c//////////////////////j\3\207\204\203\202\202\211c\204\201W\200\200"
"\203\205\206\203\200\200\200\203\206b///////////////////////ihd\204\203\202"
"\201\207f\205VTVTW\202\210\206Z\200\200\203aa////////////////////////jg\204"
"\204\203\201\202\210\211\211c\206\205\210d\210\200\200\200\202\204ac/////////"
"///////////////j\3b\203\203\202\202\205\207\206\205\207\207\206\206\202\200"
"\201\202\203ac/////////////////////////iid\206\204\203\202\204\205\377\205"
"\204\205\204\203\201\200\202\203\203bc//////////////////////////ej\207\205"
"\203\201\202\202\203\207\204\203\202\202\201\201\203\203bd///////////////////"
"////////ee\3a\204\201\200\201\202\205\203\201\200\200\201\202\204\205cc//////"
"//////////////////////c\3ec\203\201\200\200\201\202\201\200\200\202\203\206cc"
"//////////////////////////////c\3f\206\203\201\200\200\200\200\200\201\203bdc"
"////////////////////////////////g\3\211\206\202\\\201\200\201\202\203dde/////"
"/////////////////////////////\234\3db\203\203\203\203adec////////////////////"
"/////////////////hffed\211de////////////////////"[i];
          c[i] = t=='/' ? color : t;
        }
      if (gametic-lastshottic < TICRATE*2 && gametic-lastshottic > TICRATE/8)
        V_DrawBlock(viewwindowx +  viewwidth/2 - 24,
                    viewwindowy + viewheight/2 - 24, 0, 47, 47, c, VPT_NONE);
      R_DrawViewBorder();
    }

  // check for new console commands.
  NetUpdate ();

  // The head node is the last node output.
  R_RenderBSPNode (numnodes-1);
    
  // Check for new console commands.
  NetUpdate ();
    
  R_DrawPlanes ();
    
  // Check for new console commands.
  NetUpdate ();
    
  R_DrawMasked ();

  // Check for new console commands.
  NetUpdate ();

  if (rendering_stats) R_ShowStats();
}