Exemplo n.º 1
0
/*
=====================
=
= CacheLayoutGraphics
=
= Scans an entire layout file (until a ^E) marking all graphics used, and
= counting pages, then caches the graphics in
=
=====================
*/
void CacheLayoutGraphics (void)
{
	char	*bombpoint,
         *textstart;
	char	ch;

	textstart = text;
	bombpoint = text+30000;
	numpages = pagenum = 0;

	do
	{
		if (*text == '^')
		{
			ch = toupper(*++text);
			if (ch == 'P')		// start of a page
				numpages++;
			if (ch == 'E')		// end of file, so load graphics and return
			{
//				CA_MarkGrChunk(H_TOPWINDOWPIC);
//				CA_MarkGrChunk(H_LEFTWINDOWPIC);
//				CA_MarkGrChunk(H_RIGHTWINDOWPIC);
//				CA_MarkGrChunk(H_BOTTOMINFOPIC);
//				CA_CacheMarks ();
				text = textstart;
				return;
			}
			if (ch == 'G')		// draw graphic command, so mark graphics
			{
				ParsePicCommand ();
//				CA_MarkGrChunk (picnum);
			}
			if (ch == 'T')		// timed draw graphic command, so mark graphics
			{
				ParseTimedCommand ();
//				CA_MarkGrChunk (picnum);
			}
		}
		else
			text++;

	} while (text<bombpoint);

	Error ("CacheLayoutGraphics: No ^E to terminate file!");
}
Exemplo n.º 2
0
/*
=====================
=
= CountPages
=
= Scans an entire layout file (until a ^E) marking all graphics used, and
= counting pages, then caches the graphics in
=
=====================
*/
void CountPages (void)
{
    const char    *bombpoint, *textstart;
    char    ch;

    textstart = text;
    bombpoint = text+30000;
    numpages = pagenum = 0;

    do
    {
        if (*text == '^')
        {
            ch = toupper(*++text);
            if (ch == 'P')          // start of a page
                numpages++;
            if (ch == 'E')          // end of file, so load graphics and return
            {
                text = textstart;
                return;
            }
            if (ch == 'G')          // draw graphic command, so mark graphics
            {
                ParsePicCommand (false);
            }
            if (ch == 'T')          // timed draw graphic command, so mark graphics
            {
                ParseTimedCommand (false);
            }
        }
        else if (*text == '\0')
        {
            text = textstart;
            return;
        }
        else
            text++;

    } while (text<bombpoint);

    Quit ("CacheLayoutGraphics: No ^E to terminate file!");
}
Exemplo n.º 3
0
void TimedPicCommand()
{
	ParseTimedCommand();

//
// update the screen, and wait for time delay
//
	VW_UpdateScreen();

//
// wait for time
//
	set_TimeCount(0);
	while (get_TimeCount() < picdelay) ;

//
// draw pic
//
	VWB_DrawPic(picx&~7, picy, picnum);
}
Exemplo n.º 4
0
void TimedPicCommand (bool helphack)
{
    ParseTimedCommand (helphack);

    //
    // update the screen, and wait for time delay
    //
    VW_UpdateScreen ();

    //
    // wait for time
    //
    Delay(picdelay);

    //
    // draw pic
    //
    if(picnum.isValid())
        VWB_DrawGraphic (TexMan(picnum), picx&~7, picy, MENU_CENTER);
}
Exemplo n.º 5
0
void	TimedPicCommand (void)
{
   int delay;

	ParseTimedCommand ();

//
// update the screen, and wait for time delay
//
	VW_UpdateScreen ();

//
// wait for time
//
   delay = ticcount;
	while (ticcount < (delay+picdelay))
	;

//
// draw pic
//
   Pic = (pic_t *) W_CacheLumpNum (GFX_STRT+(picnum-1), PU_CACHE);
   VWB_DrawPic (picx & ~7, picy, Pic);
}