Exemple #1
0
void IN_DrawYAH(void)
{
	int i;
	int x;

	x = 160-MN_TextAWidth("NOW ENTERING:")/2;
	MN_DrTextA("NOW ENTERING:", x, 10);
	x = 160-MN_TextBWidth(LevelNames[(gameepisode-1)*9+gamemap-1]+7)/2;
	IN_DrTextB(LevelNames[(gameepisode-1)*9+gamemap-1]+7, x, 20);

	if(prevmap == 9)
	{
		prevmap = gamemap-1;
	}
	for(i=0; i<prevmap; i++)
	{
		V_DrawPatch(YAHspot[gameepisode-1][i].x, YAHspot[gameepisode-1][i].y,
			patchBEENTHERE);
	}
	if(players[consoleplayer].didsecret)
	{
		V_DrawPatch(YAHspot[gameepisode-1][8].x, YAHspot[gameepisode-1][8].y,
			patchBEENTHERE);
	}
	if(!(intertime&16) || interstate == 3)
	{ // draw the destination 'X'
		V_DrawPatch(YAHspot[gameepisode-1][gamemap-1].x,
			YAHspot[gameepisode-1][gamemap-1].y, patchGOINGTHERE);
	}
}
Exemple #2
0
static void DrNumberBold(int val, int x, int y, int wrapThresh)
{
	char buff[8] = "XX";

	if(!(val < -9 && wrapThresh < 1000))
	{
		sprintf(buff, "%d", val >= wrapThresh ? val%wrapThresh : val);
	}
	MN_DrTextAYellow(buff, x-MN_TextAWidth(buff)/2, y);
}
Exemple #3
0
void DrawMessage(void)
{
    player_t *player;

    player = &players[consoleplayer];
    if (player->messageTics <= 0 || !player->message)
    {                           // No message
        return;
    }
    MN_DrTextA(player->message, 160 - MN_TextAWidth(player->message) / 2, 1);
}
static void DrNumber(int val, int x, int y, int wrapThresh)
{
    char buff[8] = "XX";

    if (!(val < -9 && wrapThresh < 1000))
    {
        M_snprintf(buff, sizeof(buff), "%d",
                   val >= wrapThresh ? val % wrapThresh : val);
    }
    MN_DrTextA(buff, x - MN_TextAWidth(buff) / 2, y);
}
Exemple #5
0
static void DrawMessage(void)
{
    player_t *player;

    player = &players[consoleplayer];
    if (player->messageTics <= 0)
    {                           // No message
        return;
    }
    if (player->yellowMessage)
    {
        MN_DrTextAYellow(player->message,
                         160 - MN_TextAWidth(player->message) / 2, 1);
    }
    else
    {
        MN_DrTextA(player->message, 160 - MN_TextAWidth(player->message) / 2,
                   1);
    }
}
Exemple #6
0
void IN_DrawCoopStats(void)
{
    int i;
    int x;
    int ypos;

    static int sounds;

    IN_DrTextB(DEH_String("KILLS"), 95, 35);
    IN_DrTextB(DEH_String("BONUS"), 155, 35);
    IN_DrTextB(DEH_String("SECRET"), 232, 35);
    x = 160 - MN_TextBWidth(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] +
                            7) / 2;
    IN_DrTextB(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] + 7, x, 3);
    x = 160 - MN_TextAWidth(DEH_String("FINISHED")) / 2;
    MN_DrTextA(DEH_String("FINISHED"), x, 25);

    ypos = 50;
    for (i = 0; i < MAXPLAYERS; i++)
    {
        if (playeringame[i])
        {
            V_DrawShadowedPatch(25, ypos,
                                W_CacheLumpNum(patchFaceOkayBase + i,
                                               PU_CACHE));
            if (intertime < 40)
            {
                sounds = 0;
                ypos += 37;
                continue;
            }
            else if (intertime >= 40 && sounds < 1)
            {
                S_StartSound(NULL, sfx_dorcls);
                sounds++;
            }
            IN_DrawNumber(killPercent[i], 85, ypos + 10, 3);
            V_DrawShadowedPatch(121, ypos + 10, FontBPercent);
            IN_DrawNumber(bonusPercent[i], 160, ypos + 10, 3);
            V_DrawShadowedPatch(196, ypos + 10, FontBPercent);
            IN_DrawNumber(secretPercent[i], 237, ypos + 10, 3);
            V_DrawShadowedPatch(273, ypos + 10, FontBPercent);
            ypos += 37;
        }
    }
}
Exemple #7
0
void IN_DrawOldLevel(void)
{
    int i;
    int x;

    x = 160 - MN_TextBWidth(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] +
                            7) / 2;
    IN_DrTextB(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] + 7, x, 3);
    x = 160 - MN_TextAWidth(DEH_String("FINISHED")) / 2;
    MN_DrTextA(DEH_String("FINISHED"), x, 25);

    if (prevmap == 9)
    {
        for (i = 0; i < gamemap - 1; i++)
        {
            V_DrawPatch(YAHspot[gameepisode - 1][i].x,
                        YAHspot[gameepisode - 1][i].y, patchBEENTHERE);
        }
        if (!(intertime & 16))
        {
            V_DrawPatch(YAHspot[gameepisode - 1][8].x,
                        YAHspot[gameepisode - 1][8].y, patchBEENTHERE);
        }
    }
    else
    {
        for (i = 0; i < prevmap - 1; i++)
        {
            V_DrawPatch(YAHspot[gameepisode - 1][i].x,
                        YAHspot[gameepisode - 1][i].y, patchBEENTHERE);
        }
        if (players[consoleplayer].didsecret)
        {
            V_DrawPatch(YAHspot[gameepisode - 1][8].x,
                        YAHspot[gameepisode - 1][8].y, patchBEENTHERE);
        }
        if (!(intertime & 16))
        {
            V_DrawPatch(YAHspot[gameepisode - 1][prevmap - 1].x,
                        YAHspot[gameepisode - 1][prevmap - 1].y,
                        patchBEENTHERE);
        }
    }
}
Exemple #8
0
//==========================================================================
// R_DrawMapTitle
//==========================================================================
void R_DrawMapTitle(void)
{
	float   alpha = 1;
	int     y = 12;
	char   *lname, *lauthor;

	if(!cfg.mapTitle || actual_leveltime > 6 * 35)
		return;

	// Make the text a bit smaller.
	gl.MatrixMode(DGL_MODELVIEW);
	gl.PushMatrix();
	gl.Translatef(160, y, 0);
	gl.Scalef(.75f, .75f, 1);	// Scale to 3/4
	gl.Translatef(-160, -y, 0);

	if(actual_leveltime < 35)
		alpha = actual_leveltime / 35.0f;
	if(actual_leveltime > 5 * 35)
		alpha = 1 - (actual_leveltime - 5 * 35) / 35.0f;

	lname = (char *) Get(DD_MAP_NAME);
	lauthor = (char *) Get(DD_MAP_AUTHOR);

	// Use stardard map name if DED didn't define it.
	if(!lname)
		lname = P_GetMapName(gamemap);

	gl.Color4f(1, 1, 1, alpha);
	if(lname)
	{
		MN_DrTextB_CS(lname, 160 - MN_TextBWidth(lname) / 2, y);
		y += 20;
	}
	gl.Color4f(.5f, .5f, .5f, alpha);
	if(lauthor)
	{
		MN_DrTextA_CS(lauthor, 160 - MN_TextAWidth(lauthor) / 2, y);
	}

	gl.MatrixMode(DGL_MODELVIEW);
	gl.PopMatrix();
}
Exemple #9
0
void IN_DrawSingleStats(void)
{
	int x;
	static int sounds;

	IN_DrTextB("KILLS", 50, 65);
	IN_DrTextB("ITEMS", 50, 90);
	IN_DrTextB("SECRETS", 50, 115);

	x = 160-MN_TextBWidth(LevelNames[(gameepisode-1)*9+prevmap-1]+7)/2;
	IN_DrTextB(LevelNames[(gameepisode-1)*9+prevmap-1]+7, x, 3);
	x = 160-MN_TextAWidth("FINISHED")/2;
	MN_DrTextA("FINISHED", x, 25);

	if(intertime < 30)
	{
		sounds = 0;
		return;
	}
	if(sounds < 1 && intertime >= 30)
	{
		S_StartSound(NULL, sfx_dorcls);
		sounds++;
	}
	IN_DrawNumber(players[consoleplayer].killcount, 200, 65, 3);
	V_DrawShadowedPatch(237, 65, FontBSlash);
	IN_DrawNumber(totalkills, 248, 65, 3);
	if(intertime < 60)
	{
		return;
	}
	if(sounds < 2 && intertime >= 60)
	{
		S_StartSound(NULL, sfx_dorcls);
		sounds++;
	}
	IN_DrawNumber(players[consoleplayer].itemcount, 200, 90, 3);
	V_DrawShadowedPatch(237, 90, FontBSlash);
	IN_DrawNumber(totalitems, 248, 90, 3);
	if(intertime < 90)
	{
		return;
	}
	if(sounds < 3 && intertime >= 90)
	{
		S_StartSound(NULL, sfx_dorcls);
		sounds++;
	}
	IN_DrawNumber(players[consoleplayer].secretcount, 200, 115, 3);
	V_DrawShadowedPatch(237, 115, FontBSlash);
	IN_DrawNumber(totalsecret, 248, 115, 3);
	if(intertime < 150)
	{
		return;
	}
	if(sounds < 4 && intertime >= 150)
	{
		S_StartSound(NULL, sfx_dorcls);
		sounds++;
	}

	if(!ExtendedWAD || gameepisode < 4)
	{
		IN_DrTextB("TIME", 85, 160);
		IN_DrawTime(155, 160, hours, minutes, seconds);
	}
	else
	{
		x = 160-MN_TextAWidth("NOW ENTERING:")/2;
		MN_DrTextA("NOW ENTERING:", x, 160);
		x = 160-MN_TextBWidth(LevelNames[(gameepisode-1)*9+gamemap-1]+7)/2;
		IN_DrTextB(LevelNames[(gameepisode-1)*9+gamemap-1]+7, x, 170);
		skipintermission = false;
	}
}
Exemple #10
0
static void DrDeathTally(void)
{
    int i, j;
    fixed_t xPos, yPos;
    fixed_t xDelta, yDelta;
    fixed_t xStart, scale;
    int x, y;
    boolean bold;
    static boolean showTotals;
    int temp;

    V_DrawPatch(TALLY_TOP_X, TALLY_TOP_Y,
                W_CacheLumpName("tallytop", PU_CACHE));
    V_DrawPatch(TALLY_LEFT_X, TALLY_LEFT_Y,
                W_CacheLumpName("tallylft", PU_CACHE));
    if (intertime < TALLY_EFFECT_TICKS)
    {
        showTotals = false;
        scale = (intertime * FRACUNIT) / TALLY_EFFECT_TICKS;
        xDelta = FixedMul(scale, TALLY_FINAL_X_DELTA);
        yDelta = FixedMul(scale, TALLY_FINAL_Y_DELTA);
        xStart = TALLY_START_XPOS - FixedMul(scale,
                                             TALLY_START_XPOS -
                                             TALLY_STOP_XPOS);
        yPos =
            TALLY_START_YPOS - FixedMul(scale,
                                        TALLY_START_YPOS - TALLY_STOP_YPOS);
    }
    else
    {
        xDelta = TALLY_FINAL_X_DELTA;
        yDelta = TALLY_FINAL_Y_DELTA;
        xStart = TALLY_STOP_XPOS;
        yPos = TALLY_STOP_YPOS;
    }
    if (intertime >= TALLY_EFFECT_TICKS && showTotals == false)
    {
        showTotals = true;
        S_StartSound(NULL, SFX_PLATFORM_STOP);
    }
    y = yPos >> FRACBITS;
    for (i = 0; i < MAXPLAYERS; i++)
    {
        xPos = xStart;
        for (j = 0; j < MAXPLAYERS; j++, xPos += xDelta)
        {
            x = xPos >> FRACBITS;
            bold = (i == consoleplayer || j == consoleplayer);
            if (playeringame[i] && playeringame[j])
            {
                if (bold)
                {
                    DrNumberBold(players[i].frags[j], x, y, 100);
                }
                else
                {
                    DrNumber(players[i].frags[j], x, y, 100);
                }
            }
            else
            {
                temp = MN_TextAWidth("--") / 2;
                if (bold)
                {
                    MN_DrTextAYellow("--", x - temp, y);
                }
                else
                {
                    MN_DrTextA("--", x - temp, y);
                }
            }
        }
        if (showTotals && playeringame[i]
            && !((slaughterboy & (1 << i)) && !(intertime & 16)))
        {
            DrNumber(totalFrags[i], TALLY_TOTALS_X, y, 1000);
        }
        yPos += yDelta;
        y = yPos >> FRACBITS;
    }
}
void MN_Drawer(void)
{
    int i;
    int x;
    int y;
    MenuItem_t *item;
    char *message;
    char *selName;

    if (MenuActive == false)
    {
        if (askforquit)
        {
            message = DEH_String(QuitEndMsg[typeofask - 1]);

            MN_DrTextA(message, 160 - MN_TextAWidth(message) / 2, 80);
            if (typeofask == 3)
            {
                MN_DrTextA(SlotText[quicksave - 1], 160 -
                           MN_TextAWidth(SlotText[quicksave - 1]) / 2, 90);
                MN_DrTextA(DEH_String("?"), 160 +
                           MN_TextAWidth(SlotText[quicksave - 1]) / 2, 90);
            }
            if (typeofask == 4)
            {
                MN_DrTextA(SlotText[quickload - 1], 160 -
                           MN_TextAWidth(SlotText[quickload - 1]) / 2, 90);
                MN_DrTextA(DEH_String("?"), 160 +
                           MN_TextAWidth(SlotText[quickload - 1]) / 2, 90);
            }
            UpdateState |= I_FULLSCRN;
        }
        return;
    }
    else
    {
        UpdateState |= I_FULLSCRN;
        if (InfoType)
        {
            MN_DrawInfo();
            return;
        }
        if (screenblocks < 10)
        {
            BorderNeedRefresh = true;
        }
        if (CurrentMenu->drawFunc != NULL)
        {
            CurrentMenu->drawFunc();
        }
        x = CurrentMenu->x;
        y = CurrentMenu->y;
        item = CurrentMenu->items;
        for (i = 0; i < CurrentMenu->itemCount; i++)
        {
            if (item->type != ITT_EMPTY && item->text)
            {
                MN_DrTextB(DEH_String(item->text), x, y);
            }
            y += ITEM_HEIGHT;
            item++;
        }
        y = CurrentMenu->y + (CurrentItPos * ITEM_HEIGHT) + SELECTOR_YOFFSET;
        selName = DEH_String(MenuTime & 16 ? "M_SLCTR1" : "M_SLCTR2");
        V_DrawPatch(x + SELECTOR_XOFFSET, y,
                    W_CacheLumpName(selName, PU_CACHE));
    }
}