|
|
|
|
@ -98,10 +98,10 @@ fixed_t M_DueFrac(tic_t start, tic_t duration)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define SKULLXOFF -32
|
|
|
|
|
#define LINEHEIGHT 16
|
|
|
|
|
#define STRINGHEIGHT 8
|
|
|
|
|
#define LINEHEIGHT 17
|
|
|
|
|
#define STRINGHEIGHT 9
|
|
|
|
|
#define FONTBHEIGHT 20
|
|
|
|
|
#define SMALLLINEHEIGHT 8
|
|
|
|
|
#define SMALLLINEHEIGHT 9
|
|
|
|
|
#define SLIDER_RANGE 10
|
|
|
|
|
#define SLIDER_WIDTH (8*SLIDER_RANGE+6)
|
|
|
|
|
#define SERVERS_PER_PAGE 11
|
|
|
|
|
@ -112,65 +112,59 @@ static void M_CentreText(INT32 xoffs, INT32 y, const char *string)
|
|
|
|
|
{
|
|
|
|
|
INT32 x;
|
|
|
|
|
//added : 02-02-98 : centre on 320, because V_DrawString centers on vid.width...
|
|
|
|
|
x = ((BASEVIDWIDTH - V_StringWidth(string, V_OLDSPACING))>>1) + xoffs;
|
|
|
|
|
V_DrawString(x,y,V_OLDSPACING,string);
|
|
|
|
|
x = ((BASEVIDWIDTH - V_MenuStringWidth(string, 0))>>1) + xoffs;
|
|
|
|
|
V_DrawMenuString(x,y,0,string);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// A smaller 'Thermo', with range given as percents (0-100)
|
|
|
|
|
static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop)
|
|
|
|
|
static INT32 M_SliderX(INT32 range)
|
|
|
|
|
{
|
|
|
|
|
INT32 i;
|
|
|
|
|
INT32 range;
|
|
|
|
|
patch_t *p;
|
|
|
|
|
|
|
|
|
|
for (i = 0; cv->PossibleValue[i+1].strvalue; i++);
|
|
|
|
|
|
|
|
|
|
x = BASEVIDWIDTH - x - SLIDER_WIDTH;
|
|
|
|
|
|
|
|
|
|
if (ontop)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(x - 16 - (skullAnimCounter/5), y,
|
|
|
|
|
'\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(x+(SLIDER_RANGE*8) + 8 + (skullAnimCounter/5), y,
|
|
|
|
|
'\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((range = atoi(cv->defaultvalue)) != cv->value)
|
|
|
|
|
{
|
|
|
|
|
range = ((range - cv->PossibleValue[0].value) * 100 /
|
|
|
|
|
(cv->PossibleValue[1].value - cv->PossibleValue[0].value));
|
|
|
|
|
|
|
|
|
|
if (range < 0)
|
|
|
|
|
range = 0;
|
|
|
|
|
if (range > 100)
|
|
|
|
|
range = 100;
|
|
|
|
|
|
|
|
|
|
// draw the default
|
|
|
|
|
p = W_CachePatchName("M_SLIDEC", PU_CACHE);
|
|
|
|
|
V_DrawScaledPatch(x - 4 + (((SLIDER_RANGE)*8 + 4)*range)/100, y, 0, p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawScaledPatch(x - 8, y, 0, W_CachePatchName("M_SLIDEL", PU_CACHE));
|
|
|
|
|
|
|
|
|
|
p = W_CachePatchName("M_SLIDEM", PU_CACHE);
|
|
|
|
|
for (i = 0; i < SLIDER_RANGE; i++)
|
|
|
|
|
V_DrawScaledPatch (x+i*8, y, 0,p);
|
|
|
|
|
|
|
|
|
|
p = W_CachePatchName("M_SLIDER", PU_CACHE);
|
|
|
|
|
V_DrawScaledPatch(x+SLIDER_RANGE*8, y, 0, p);
|
|
|
|
|
|
|
|
|
|
range = ((cv->value - cv->PossibleValue[0].value) * 100 /
|
|
|
|
|
(cv->PossibleValue[1].value - cv->PossibleValue[0].value));
|
|
|
|
|
|
|
|
|
|
if (range < 0)
|
|
|
|
|
range = 0;
|
|
|
|
|
if (range > 100)
|
|
|
|
|
range = 100;
|
|
|
|
|
|
|
|
|
|
return -4 + (((SLIDER_RANGE)*8 + 4)*range)/100;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// A smaller 'Thermo', with range given as percents (0-100)
|
|
|
|
|
static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop)
|
|
|
|
|
{
|
|
|
|
|
x = BASEVIDWIDTH - x - SLIDER_WIDTH;
|
|
|
|
|
V_DrawFill(x - 5, y + 3, SLIDER_WIDTH + 3, 5, 31);
|
|
|
|
|
V_DrawFill(x - 4, y + 4, SLIDER_WIDTH, 2, orangemap[0]);
|
|
|
|
|
|
|
|
|
|
if (ontop)
|
|
|
|
|
{
|
|
|
|
|
V_DrawMenuString(x - 16 - (skullAnimCounter/5), y,
|
|
|
|
|
highlightflags, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(x+(SLIDER_RANGE*8) + 8 + (skullAnimCounter/5), y,
|
|
|
|
|
highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
INT32 range = cv->PossibleValue[1].value - cv->PossibleValue[0].value;
|
|
|
|
|
INT32 val = atoi(cv->defaultvalue);
|
|
|
|
|
|
|
|
|
|
val = (val - cv->PossibleValue[0].value) * 100 / range;
|
|
|
|
|
// draw the default tick
|
|
|
|
|
V_DrawFill(x + M_SliderX(val), y + 2, 3, 4, 31);
|
|
|
|
|
|
|
|
|
|
val = (cv->value - cv->PossibleValue[0].value) * 100 / range;
|
|
|
|
|
INT32 px = x + M_SliderX(val);
|
|
|
|
|
|
|
|
|
|
// draw the slider cursor
|
|
|
|
|
p = W_CachePatchName("M_SLIDEC", PU_CACHE);
|
|
|
|
|
V_DrawScaledPatch(x - 4 + (((SLIDER_RANGE)*8 + 4)*range)/100, y, 0, p);
|
|
|
|
|
V_DrawFill(px - 1, y - 1, 5, 11, 31);
|
|
|
|
|
V_DrawFill(px, y, 2, 8, aquamap[0]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void M_DrawCursorHand(INT32 x, INT32 y)
|
|
|
|
|
{
|
|
|
|
|
V_DrawScaledPatch(x - 24 - (I_GetTime() % 16 < 8), y, 0, W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void M_DrawUnderline(INT32 left, INT32 right, INT32 y)
|
|
|
|
|
{
|
|
|
|
|
if (menutransition.tics == menutransition.dest)
|
|
|
|
|
V_DrawFill(left - 1, y + 5, (right - left) + 11, 2, 31);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static patch_t *addonsp[NUM_EXT+5];
|
|
|
|
|
@ -894,7 +888,7 @@ void M_DrawMenuMessage(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawString((BASEVIDWIDTH - V_StringWidth(string, 0))/2, y, 0, string);
|
|
|
|
|
y += 8;
|
|
|
|
|
y += 9;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1083,9 +1077,9 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
cursory = y;
|
|
|
|
|
|
|
|
|
|
if ((currentMenu->menuitems[i].status & IT_DISPLAY)==IT_STRING)
|
|
|
|
|
V_DrawString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
else
|
|
|
|
|
V_DrawString(x, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
// Cvar specific handling
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_TYPE)
|
|
|
|
|
@ -1109,7 +1103,7 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
if (itemOn == i)
|
|
|
|
|
{
|
|
|
|
|
xoffs += 8;
|
|
|
|
|
V_DrawString(x + (skullAnimCounter/5) + 6, y + 12, highlightflags, "\x1D");
|
|
|
|
|
V_DrawMenuString(x + (skullAnimCounter/5) + 6, y + 12, highlightflags, "\x1D");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawString(x + xoffs + 8, y + 12, 0, cv->string);
|
|
|
|
|
@ -1118,15 +1112,15 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
w = V_StringWidth(cv->string, 0);
|
|
|
|
|
V_DrawString(BASEVIDWIDTH - x - w, y,
|
|
|
|
|
w = V_MenuStringWidth(cv->string, 0);
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x - w, y,
|
|
|
|
|
((cv->flags & CV_CHEAT) && !CV_IsSetToDefault(cv) ? warningflags : highlightflags), cv->string);
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(BASEVIDWIDTH - x - 10 - w - (skullAnimCounter/5), y,
|
|
|
|
|
'\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(BASEVIDWIDTH - x + 2 + (skullAnimCounter/5), y,
|
|
|
|
|
'\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x - 10 - w - (skullAnimCounter/5), y,
|
|
|
|
|
highlightflags, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x + 2 + (skullAnimCounter/5), y,
|
|
|
|
|
highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -1135,7 +1129,7 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
y += STRINGHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
case IT_STRING2:
|
|
|
|
|
V_DrawString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
/* FALLTHRU */
|
|
|
|
|
case IT_DYLITLSPACE:
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
@ -1151,21 +1145,21 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
/* FALLTHRU */
|
|
|
|
|
case IT_TRANSTEXT2:
|
|
|
|
|
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
case IT_QUESTIONMARKS:
|
|
|
|
|
if (currentMenu->menuitems[i].mvar1)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
|
|
|
|
|
V_DrawString(x, y, V_TRANSLUCENT|V_OLDSPACING, M_CreateSecretMenuOption(currentMenu->menuitems[i].text));
|
|
|
|
|
V_DrawMenuString(x, y, V_TRANSLUCENT|V_OLDSPACING, M_CreateSecretMenuOption(currentMenu->menuitems[i].text));
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
case IT_HEADERTEXT: // draws 16 pixels to the left, in yellow text
|
|
|
|
|
if (currentMenu->menuitems[i].mvar1)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
|
|
|
|
|
V_DrawString(x-16, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x-16, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -1185,7 +1179,7 @@ void M_DrawGenericMenu(void)
|
|
|
|
|
{
|
|
|
|
|
V_DrawScaledPatch(currentMenu->x - 24, cursory, 0,
|
|
|
|
|
W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
V_DrawString(currentMenu->x, cursory, highlightflags, currentMenu->menuitems[itemOn].text);
|
|
|
|
|
V_DrawMenuString(currentMenu->x, cursory, highlightflags, currentMenu->menuitems[itemOn].text);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1354,12 +1348,12 @@ void M_DrawHorizontalMenu(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (itemOn != 0)
|
|
|
|
|
V_DrawCharacter((BASEVIDWIDTH - width)/2 + 3 - (skullAnimCounter/5), y + 1,
|
|
|
|
|
'\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawMenuString((BASEVIDWIDTH - width)/2 + 3 - (skullAnimCounter/5), y + 1,
|
|
|
|
|
highlightflags, "\x1C"); // left arrow
|
|
|
|
|
|
|
|
|
|
if (itemOn != currentMenu->numitems-1)
|
|
|
|
|
V_DrawCharacter((BASEVIDWIDTH + width)/2 - 10 + (skullAnimCounter/5), y + 1,
|
|
|
|
|
'\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
V_DrawMenuString((BASEVIDWIDTH + width)/2 - 10 + (skullAnimCounter/5), y + 1,
|
|
|
|
|
highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define MAXMSGLINELEN 256
|
|
|
|
|
@ -1371,7 +1365,7 @@ void M_DrawHorizontalMenu(void)
|
|
|
|
|
void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines)
|
|
|
|
|
{
|
|
|
|
|
// Solid color textbox.
|
|
|
|
|
V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 159);
|
|
|
|
|
V_DrawFill(x+5, y+5, width*7+6, boxlines*9+6, 159);
|
|
|
|
|
//V_DrawFill(x+8, y+8, width*8, boxlines*8, 31);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1434,7 +1428,7 @@ void M_DrawMessageMenu(void)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawString((BASEVIDWIDTH - V_StringWidth(string, 0))/2,y,0,string);
|
|
|
|
|
V_DrawMenuString((BASEVIDWIDTH - V_MenuStringWidth(string, 0))/2,y,0,string);
|
|
|
|
|
y += 8; //SHORT(hu_font[0]->height);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -2032,7 +2026,7 @@ static void M_DrawCharSelectPreview(UINT8 num)
|
|
|
|
|
UINT8 cy = ypos+16 + (i*10);
|
|
|
|
|
|
|
|
|
|
if (p->changeselect == i)
|
|
|
|
|
V_DrawScaledPatch(xpos, cy, 0, W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
M_DrawCursorHand(xpos + 20, cy);
|
|
|
|
|
|
|
|
|
|
V_DrawThinString(xpos+16, cy, (p->changeselect == i ? highlightflags : 0), choices[i]);
|
|
|
|
|
}
|
|
|
|
|
@ -2548,30 +2542,31 @@ void M_DrawRaceDifficulty(void)
|
|
|
|
|
|
|
|
|
|
INT32 f = (i == itemOn) ? highlightflags : 0;
|
|
|
|
|
|
|
|
|
|
V_DrawString(140 + tx + (i == itemOn ? 1 : 0), y, f, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
if (currentMenu->menuitems[i].status & IT_CVAR)
|
|
|
|
|
{
|
|
|
|
|
// implicitely we'll only take care of normal cvars
|
|
|
|
|
INT32 cx = 260 + tx;
|
|
|
|
|
consvar_t *cv = currentMenu->menuitems[i].itemaction.cvar;
|
|
|
|
|
|
|
|
|
|
V_DrawCenteredString(cx, y, f, cv->string);
|
|
|
|
|
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
INT32 w = V_StringWidth(cv->string, 0)/2;
|
|
|
|
|
INT32 w = V_MenuStringWidth(cv->string, 0)/2;
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter(cx - 10 - w - (skullAnimCounter/5), y, '\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(cx + w + 2 + (skullAnimCounter/5), y, '\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
M_DrawUnderline(140, 260 + w, y);
|
|
|
|
|
|
|
|
|
|
V_DrawMenuString(cx - 10 - w - (skullAnimCounter/5), y, highlightflags, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(cx + w + 2 + (skullAnimCounter/5), y, highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawCenteredMenuString(cx, y, f, cv->string);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawMenuString(140 + tx + (i == itemOn ? 1 : 0), y, f, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
{
|
|
|
|
|
V_DrawScaledPatch(140 + tx - 24, y, 0,
|
|
|
|
|
W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
M_DrawCursorHand(140 + tx, y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
@ -3352,7 +3347,7 @@ void M_DrawTimeAttack(void)
|
|
|
|
|
|
|
|
|
|
if (!mapheaderinfo[map])
|
|
|
|
|
{
|
|
|
|
|
V_DrawRightAlignedString(rightedge-12, opty, 0, "No map!?");
|
|
|
|
|
V_DrawRightAlignedMenuString(rightedge-12, opty, 0, "No map!?");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3438,7 +3433,7 @@ void M_DrawTimeAttack(void)
|
|
|
|
|
if ((gametypes[levellist.newgametype]->rules & GTR_CIRCUIT)
|
|
|
|
|
&& (mapheaderinfo[map]->numlaps != 1))
|
|
|
|
|
{
|
|
|
|
|
V_DrawRightAlignedString(rightedge-12, timeheight, highlightflags, "BEST LAP:");
|
|
|
|
|
V_DrawRightAlignedMenuString(rightedge-12, timeheight, M_ALTCOLOR, "BEST LAP:");
|
|
|
|
|
K_drawKartTimestamp(laprec, 162+t, timeheight+6, 0, 2);
|
|
|
|
|
timeheight += 30;
|
|
|
|
|
}
|
|
|
|
|
@ -3447,7 +3442,7 @@ void M_DrawTimeAttack(void)
|
|
|
|
|
timeheight += 15;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawRightAlignedString(rightedge-12, timeheight, highlightflags, "BEST TIME:");
|
|
|
|
|
V_DrawRightAlignedMenuString(rightedge-12, timeheight, M_ALTCOLOR, "BEST TIME:");
|
|
|
|
|
K_drawKartTimestamp(timerec, 162+t, timeheight+6, 0, 1);
|
|
|
|
|
|
|
|
|
|
// SPB Attack control hint + menu overlay
|
|
|
|
|
@ -3480,16 +3475,26 @@ void M_DrawTimeAttack(void)
|
|
|
|
|
|
|
|
|
|
case IT_HEADERTEXT:
|
|
|
|
|
|
|
|
|
|
V_DrawString(leftedge, opty, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(leftedge, opty, M_ALTCOLOR, currentMenu->menuitems[i].text);
|
|
|
|
|
opty += 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IT_STRING:
|
|
|
|
|
|
|
|
|
|
if (i >= currentMenu->numitems-1)
|
|
|
|
|
V_DrawRightAlignedString(rightedge, opty, f, currentMenu->menuitems[i].text);
|
|
|
|
|
{
|
|
|
|
|
V_DrawRightAlignedMenuString(rightedge, opty, f, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
M_DrawCursorHand(rightedge - V_MenuStringWidth(currentMenu->menuitems[i].text, 0), opty);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
V_DrawString(leftedge, opty, f, currentMenu->menuitems[i].text);
|
|
|
|
|
{
|
|
|
|
|
V_DrawMenuString(leftedge, opty, f, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
M_DrawCursorHand(leftedge, opty);
|
|
|
|
|
}
|
|
|
|
|
opty += 10;
|
|
|
|
|
|
|
|
|
|
// Cvar specific handling
|
|
|
|
|
@ -3533,12 +3538,12 @@ void M_DrawTimeAttack(void)
|
|
|
|
|
|
|
|
|
|
if (str)
|
|
|
|
|
{
|
|
|
|
|
w = V_StringWidth(str, optflags);
|
|
|
|
|
V_DrawString(leftedge+12, opty, optflags, str);
|
|
|
|
|
w = V_MenuStringWidth(str, optflags);
|
|
|
|
|
V_DrawMenuString(leftedge+12, opty, optflags, str);
|
|
|
|
|
if (drawarrows)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(leftedge+12 - 10 - (skullAnimCounter/5), opty, '\x1C' | f, false); // left arrow
|
|
|
|
|
V_DrawCharacter(leftedge+12 + w + 2+ (skullAnimCounter/5), opty, '\x1D' | f, false); // right arrow
|
|
|
|
|
V_DrawMenuString(leftedge+12 - 10 - (skullAnimCounter/5), opty, f, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(leftedge+12 + w + 2+ (skullAnimCounter/5), opty, f, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
opty += 10;
|
|
|
|
|
}
|
|
|
|
|
@ -4205,17 +4210,107 @@ void M_DrawOptions(void)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void M_DrawOptionsBoxTerm(INT32 x, INT32 top, INT32 bottom)
|
|
|
|
|
{
|
|
|
|
|
INT32 px = x - 20;
|
|
|
|
|
|
|
|
|
|
V_DrawFill(px, top + 4, 2, bottom - top, orangemap[0]);
|
|
|
|
|
V_DrawFill(px + 1, top + 5, 2, bottom - top, 31);
|
|
|
|
|
|
|
|
|
|
V_DrawFill(BASEVIDWIDTH - px - 2, top + 4, 2, bottom - top, orangemap[0]);
|
|
|
|
|
V_DrawFill(BASEVIDWIDTH - px, top + 5, 1, bottom - top, 31);
|
|
|
|
|
|
|
|
|
|
V_DrawFill(px, bottom + 2, BASEVIDWIDTH - (2 * px), 2, orangemap[0]);
|
|
|
|
|
V_DrawFill(px, bottom + 3, BASEVIDWIDTH - (2 * px), 2, 31);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void M_DrawGenericOptions(void)
|
|
|
|
|
{
|
|
|
|
|
INT32 x = currentMenu->x - M_EaseWithTransition(Easing_Linear, 5 * 48), y = currentMenu->y, w, i, cursory = 0;
|
|
|
|
|
INT32 x = currentMenu->x - M_EaseWithTransition(Easing_Linear, 5 * 48), y = currentMenu->y, w, i, cursory = -100;
|
|
|
|
|
INT32 expand = -1;
|
|
|
|
|
INT32 boxy = 0;
|
|
|
|
|
boolean collapse = false;
|
|
|
|
|
boolean opening = false;
|
|
|
|
|
fixed_t boxt = 0;
|
|
|
|
|
|
|
|
|
|
M_DrawMenuTooltips();
|
|
|
|
|
M_DrawOptionsMovingButton();
|
|
|
|
|
|
|
|
|
|
for (i = itemOn; i >= 0; --i)
|
|
|
|
|
{
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_DISPLAY)
|
|
|
|
|
{
|
|
|
|
|
case IT_DYBIGSPACE:
|
|
|
|
|
goto box_found;
|
|
|
|
|
|
|
|
|
|
case IT_HEADERTEXT:
|
|
|
|
|
expand = i;
|
|
|
|
|
goto box_found;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
box_found:
|
|
|
|
|
if (optionsmenu.box.dist != expand)
|
|
|
|
|
{
|
|
|
|
|
optionsmenu.box.dist = expand;
|
|
|
|
|
optionsmenu.box.start = I_GetTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < currentMenu->numitems; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
boolean term = false;
|
|
|
|
|
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_DISPLAY)
|
|
|
|
|
{
|
|
|
|
|
case IT_DYBIGSPACE:
|
|
|
|
|
collapse = false;
|
|
|
|
|
term = (boxy != 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IT_HEADERTEXT:
|
|
|
|
|
collapse = (i != expand);
|
|
|
|
|
|
|
|
|
|
if (collapse)
|
|
|
|
|
{
|
|
|
|
|
term = (boxy != 0);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (menutransition.tics == menutransition.dest)
|
|
|
|
|
{
|
|
|
|
|
INT32 px = x - 20;
|
|
|
|
|
V_DrawFill(px, y + 6, BASEVIDWIDTH - (2 * px), 2, orangemap[0]);
|
|
|
|
|
V_DrawFill(px + 1, y + 7, BASEVIDWIDTH - (2 * px), 2, 31);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
y += 2;
|
|
|
|
|
boxy = y;
|
|
|
|
|
|
|
|
|
|
boxt = optionsmenu.box.dist == expand ? M_DueFrac(optionsmenu.box.start, 5) : FRACUNIT;
|
|
|
|
|
opening = boxt < FRACUNIT;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
if (collapse)
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (term)
|
|
|
|
|
{
|
|
|
|
|
if (menutransition.tics == menutransition.dest)
|
|
|
|
|
M_DrawOptionsBoxTerm(x, boxy, Easing_Linear(boxt, boxy, y));
|
|
|
|
|
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
boxy = 0;
|
|
|
|
|
opening = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (i == itemOn && !opening)
|
|
|
|
|
{
|
|
|
|
|
cursory = y;
|
|
|
|
|
M_DrawUnderline(x, BASEVIDWIDTH - x, y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_DISPLAY)
|
|
|
|
|
{
|
|
|
|
|
case IT_PATCH:
|
|
|
|
|
@ -4245,19 +4340,50 @@ void M_DrawGenericOptions(void)
|
|
|
|
|
break;
|
|
|
|
|
#endif
|
|
|
|
|
case IT_STRING:
|
|
|
|
|
case IT_WHITESTRING:
|
|
|
|
|
case IT_WHITESTRING: {
|
|
|
|
|
if (opening)
|
|
|
|
|
{
|
|
|
|
|
if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_CVAR &&
|
|
|
|
|
(currentMenu->menuitems[i].status & IT_CVARTYPE) == IT_CV_STRING)
|
|
|
|
|
{
|
|
|
|
|
y += LINEHEIGHT;
|
|
|
|
|
}
|
|
|
|
|
y += STRINGHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
INT32 px = x + ((currentMenu->menuitems[i].status & IT_TYPE) == IT_SUBMENU ? 8 : 0);
|
|
|
|
|
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
cursory = y;
|
|
|
|
|
|
|
|
|
|
if ((currentMenu->menuitems[i].status & IT_DISPLAY)==IT_STRING)
|
|
|
|
|
V_DrawString(x + (i == itemOn ? 1 : 0), y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
{
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
V_DrawMenuString(px + 1, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
else
|
|
|
|
|
V_DrawMenuString(px, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
V_DrawString(x, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(px, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
// Cvar specific handling
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_TYPE)
|
|
|
|
|
case IT_CVAR:
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
case IT_SUBMENU: {
|
|
|
|
|
UINT8 ch = currentMenu->menuitems[i].text[0];
|
|
|
|
|
|
|
|
|
|
V_DrawMenuString(
|
|
|
|
|
x + (i == itemOn ? 1 + skullAnimCounter/5 : 0),
|
|
|
|
|
y - 1,
|
|
|
|
|
// Use color of first character in text label
|
|
|
|
|
i == itemOn ? highlightflags : (((max(ch, 0x80) - 0x80) & 15) << V_CHARCOLORSHIFT),
|
|
|
|
|
"\x1D"
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case IT_CVAR: {
|
|
|
|
|
consvar_t *cv = currentMenu->menuitems[i].itemaction.cvar;
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_CVARTYPE)
|
|
|
|
|
{
|
|
|
|
|
@ -4274,39 +4400,42 @@ void M_DrawGenericOptions(void)
|
|
|
|
|
if (itemOn == i)
|
|
|
|
|
{
|
|
|
|
|
xoffs += 8;
|
|
|
|
|
V_DrawString(x + (skullAnimCounter/5) + 6, y + 12, highlightflags, "\x1D");
|
|
|
|
|
V_DrawMenuString(x + (skullAnimCounter/5) + 7, y + 11, highlightflags, "\x1D");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawString(x + xoffs + 8, y + 12, 0, cv->string);
|
|
|
|
|
|
|
|
|
|
y += 16;
|
|
|
|
|
y += LINEHEIGHT;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default: {
|
|
|
|
|
boolean isDefault = CV_IsSetToDefault(cv);
|
|
|
|
|
w = V_StringWidth(cv->string, 0);
|
|
|
|
|
V_DrawString(BASEVIDWIDTH - x - w, y,
|
|
|
|
|
w = V_MenuStringWidth(cv->string, 0);
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x - w, y,
|
|
|
|
|
(!isDefault ? warningflags : highlightflags), cv->string);
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(BASEVIDWIDTH - x - 10 - w - (skullAnimCounter/5), y,
|
|
|
|
|
'\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(BASEVIDWIDTH - x + 2 + (skullAnimCounter/5), y,
|
|
|
|
|
'\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x - 10 - w - (skullAnimCounter/5), y - 1,
|
|
|
|
|
highlightflags, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x + 2 + (skullAnimCounter/5), y - 1,
|
|
|
|
|
highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
if (!isDefault)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(BASEVIDWIDTH - x + (i == itemOn ? 13 : 5), y - 2, '.' | warningflags, false);
|
|
|
|
|
V_DrawMenuString(BASEVIDWIDTH - x + (i == itemOn ? 13 : 5), y - 2, warningflags, ".");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
y += STRINGHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
y += STRINGHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case IT_STRING2:
|
|
|
|
|
V_DrawString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
/* FALLTHRU */
|
|
|
|
|
case IT_DYLITLSPACE:
|
|
|
|
|
case IT_SPACE:
|
|
|
|
|
@ -4323,26 +4452,29 @@ void M_DrawGenericOptions(void)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
/* FALLTHRU */
|
|
|
|
|
case IT_TRANSTEXT2:
|
|
|
|
|
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
case IT_QUESTIONMARKS:
|
|
|
|
|
if (currentMenu->menuitems[i].mvar1)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
|
|
|
|
|
V_DrawString(x, y, V_TRANSLUCENT|V_OLDSPACING, M_CreateSecretMenuOption(currentMenu->menuitems[i].text));
|
|
|
|
|
V_DrawMenuString(x, y, V_TRANSLUCENT|V_OLDSPACING, M_CreateSecretMenuOption(currentMenu->menuitems[i].text));
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
break;
|
|
|
|
|
case IT_HEADERTEXT: // draws 16 pixels to the left, in yellow text
|
|
|
|
|
if (currentMenu->menuitems[i].mvar1)
|
|
|
|
|
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
|
|
|
|
|
|
|
|
|
|
V_DrawString(x-16, y, highlightflags, currentMenu->menuitems[i].text);
|
|
|
|
|
y += SMALLLINEHEIGHT;
|
|
|
|
|
V_DrawMenuString(x - (collapse ? 0 : 16), y, M_ALTCOLOR, currentMenu->menuitems[i].text);
|
|
|
|
|
y += SMALLLINEHEIGHT + 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (boxy && menutransition.tics == menutransition.dest)
|
|
|
|
|
M_DrawOptionsBoxTerm(x, boxy, Easing_Linear(boxt, boxy, y));
|
|
|
|
|
|
|
|
|
|
// DRAW THE SKULL CURSOR
|
|
|
|
|
if (((currentMenu->menuitems[itemOn].status & IT_DISPLAY) == IT_PATCH)
|
|
|
|
|
|| ((currentMenu->menuitems[itemOn].status & IT_DISPLAY) == IT_NOTHING))
|
|
|
|
|
@ -4352,9 +4484,7 @@ void M_DrawGenericOptions(void)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
V_DrawScaledPatch(x - 24, cursory, 0,
|
|
|
|
|
W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
V_DrawString(x + 1, cursory, highlightflags, currentMenu->menuitems[itemOn].text);
|
|
|
|
|
M_DrawCursorHand(x, cursory);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -4375,10 +4505,10 @@ void M_DrawProfileErase(void)
|
|
|
|
|
if (i == optionsmenu.eraseprofilen)
|
|
|
|
|
{
|
|
|
|
|
cursory = y;
|
|
|
|
|
V_DrawScaledPatch(x - 24, cursory, 0, W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
M_DrawCursorHand(x, cursory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawString(x, y,
|
|
|
|
|
V_DrawMenuString(x, y,
|
|
|
|
|
(i == optionsmenu.eraseprofilen ? highlightflags : 0),
|
|
|
|
|
va("%sPRF%03d - %s (%s)",
|
|
|
|
|
(cv_currprofile.value == i) ? "[In use] " : "",
|
|
|
|
|
@ -4462,8 +4592,7 @@ void M_DrawEditProfile(void)
|
|
|
|
|
{
|
|
|
|
|
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_CACHE);
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter(x - 10 - (skullAnimCounter/5), y+1,
|
|
|
|
|
'\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawMenuString(x - 10 - (skullAnimCounter/5), y+1, highlightflags, "\x1C"); // left arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Text
|
|
|
|
|
@ -4597,13 +4726,13 @@ void M_DrawProfileControls(void)
|
|
|
|
|
switch (currentMenu->menuitems[i].status & IT_DISPLAY)
|
|
|
|
|
{
|
|
|
|
|
case IT_HEADERTEXT:
|
|
|
|
|
V_DrawFill(0, y+17, 124, 1, 0); // underline
|
|
|
|
|
V_DrawString(x, y+8, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawFill(0, y+18, 124, 1, 0); // underline
|
|
|
|
|
V_DrawMenuString(x, y+8, 0, currentMenu->menuitems[i].text);
|
|
|
|
|
y += spacing;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IT_STRING:
|
|
|
|
|
V_DrawString(x, y+1, (i == itemOn ? highlightflags : 0), currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y+2, (i == itemOn ? highlightflags : 0), currentMenu->menuitems[i].text);
|
|
|
|
|
y += spacing;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
@ -4617,19 +4746,19 @@ void M_DrawProfileControls(void)
|
|
|
|
|
drawnpatch = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
V_DrawString(x, y+1, (i == itemOn ? highlightflags : 0), currentMenu->menuitems[i].text);
|
|
|
|
|
V_DrawMenuString(x, y+2, (i == itemOn ? highlightflags : 0), currentMenu->menuitems[i].text);
|
|
|
|
|
|
|
|
|
|
if (currentMenu->menuitems[i].status & IT_CVAR) // not the proper way to check but this menu only has normal onoff cvars.
|
|
|
|
|
{
|
|
|
|
|
INT32 w;
|
|
|
|
|
consvar_t *cv = currentMenu->menuitems[i].itemaction.cvar;
|
|
|
|
|
|
|
|
|
|
w = V_StringWidth(cv->string, 0);
|
|
|
|
|
V_DrawString(x + 12, y + 12, ((cv->flags & CV_CHEAT) && !CV_IsSetToDefault(cv) ? warningflags : highlightflags), cv->string);
|
|
|
|
|
w = V_MenuStringWidth(cv->string, 0);
|
|
|
|
|
V_DrawMenuString(x + 12, y + 13, ((cv->flags & CV_CHEAT) && !CV_IsSetToDefault(cv) ? warningflags : highlightflags), cv->string);
|
|
|
|
|
if (i == itemOn)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCharacter(x - (skullAnimCounter/5), y+12, '\x1C' | highlightflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(x + 12 + w + 2 + (skullAnimCounter/5) , y+12, '\x1D' | highlightflags, false); // right arrow
|
|
|
|
|
V_DrawMenuString(x - (skullAnimCounter/5), y+12, highlightflags, "\x1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(x + 12 + w + 2 + (skullAnimCounter/5) , y+13, highlightflags, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (currentMenu->menuitems[i].status & IT_CONTROL)
|
|
|
|
|
@ -4774,7 +4903,7 @@ void M_DrawVideoModes(void)
|
|
|
|
|
M_DrawMenuTooltips();
|
|
|
|
|
M_DrawOptionsMovingButton();
|
|
|
|
|
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2 + t, currentMenu->y,
|
|
|
|
|
V_DrawCenteredMenuString(BASEVIDWIDTH/2 + t, currentMenu->y,
|
|
|
|
|
highlightflags, "Choose mode, reselect to change default");
|
|
|
|
|
|
|
|
|
|
row = 41 + t;
|
|
|
|
|
@ -4782,12 +4911,12 @@ void M_DrawVideoModes(void)
|
|
|
|
|
for (i = 0; i < optionsmenu.vidm_nummodes; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i == optionsmenu.vidm_selected)
|
|
|
|
|
V_DrawString(row, col, highlightflags, optionsmenu.modedescs[i].desc);
|
|
|
|
|
V_DrawMenuString(row, col, highlightflags, optionsmenu.modedescs[i].desc);
|
|
|
|
|
// Show multiples of 320x200 as green.
|
|
|
|
|
else
|
|
|
|
|
V_DrawString(row, col, (optionsmenu.modedescs[i].goodratio) ? recommendedflags : 0, optionsmenu.modedescs[i].desc);
|
|
|
|
|
V_DrawMenuString(row, col, (optionsmenu.modedescs[i].goodratio) ? recommendedflags : 0, optionsmenu.modedescs[i].desc);
|
|
|
|
|
|
|
|
|
|
col += 8;
|
|
|
|
|
col += 9;
|
|
|
|
|
if ((i % optionsmenu.vidm_column_size) == (optionsmenu.vidm_column_size-1))
|
|
|
|
|
{
|
|
|
|
|
row += 7*13;
|
|
|
|
|
@ -4803,11 +4932,11 @@ void M_DrawVideoModes(void)
|
|
|
|
|
va("Previewing mode %c%dx%d",
|
|
|
|
|
(SCR_IsAspectCorrect(vid.width, vid.height)) ? 0x83 : 0x80,
|
|
|
|
|
vid.width, vid.height));
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+8,
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+9,
|
|
|
|
|
"Press ENTER again to keep this mode");
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+16,
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+18,
|
|
|
|
|
va("Wait %d second%s", testtime, (testtime > 1) ? "s" : ""));
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+24,
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+27,
|
|
|
|
|
"or press ESC to return");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -4817,12 +4946,12 @@ void M_DrawVideoModes(void)
|
|
|
|
|
va("Current mode is %c%dx%d",
|
|
|
|
|
(SCR_IsAspectCorrect(vid.width, vid.height)) ? 0x83 : 0x80,
|
|
|
|
|
vid.width, vid.height));
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+8,
|
|
|
|
|
M_CentreText(t, currentMenu->y + 75+9,
|
|
|
|
|
va("Default mode is %c%dx%d",
|
|
|
|
|
(SCR_IsAspectCorrect(cv_scr_width.value, cv_scr_height.value)) ? 0x83 : 0x80,
|
|
|
|
|
cv_scr_width.value, cv_scr_height.value));
|
|
|
|
|
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2 + t, currentMenu->y + 75+24,
|
|
|
|
|
V_DrawCenteredMenuString(BASEVIDWIDTH/2 + t, currentMenu->y + 75+24,
|
|
|
|
|
recommendedflags, "Modes marked in GREEN are recommended.");
|
|
|
|
|
/*
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2 + t, currentMenu->y + 75+16,
|
|
|
|
|
@ -4834,10 +4963,9 @@ void M_DrawVideoModes(void)
|
|
|
|
|
|
|
|
|
|
// Draw the cursor for the VidMode menu
|
|
|
|
|
i = 41 - 10 + ((optionsmenu.vidm_selected / optionsmenu.vidm_column_size)*7*13) + t;
|
|
|
|
|
j = currentMenu->y + 14 + ((optionsmenu.vidm_selected % optionsmenu.vidm_column_size)*8);
|
|
|
|
|
j = currentMenu->y + 14 + ((optionsmenu.vidm_selected % optionsmenu.vidm_column_size)*9);
|
|
|
|
|
|
|
|
|
|
V_DrawScaledPatch(i - 8, j, 0,
|
|
|
|
|
W_CachePatchName("M_CURSOR", PU_CACHE));
|
|
|
|
|
M_DrawCursorHand(i + 14, j);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Gameplay Item Tggles:
|
|
|
|
|
@ -5203,8 +5331,8 @@ void M_DrawPause(void)
|
|
|
|
|
INT32 w = V_LSTitleLowStringWidth(selectabletext, selectableflags)/2;
|
|
|
|
|
V_DrawLSTitleLowString(220-w + offset*2, 103, selectableflags, selectabletext);
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter(220-w + offset*2 - 8 - (skullAnimCounter/5), 103+6, '\x1C' | selectableflags, false); // left arrow
|
|
|
|
|
V_DrawCharacter(220+w + offset*2 + (skullAnimCounter/5), 103+6, '\x1D' | selectableflags, false); // right arrow
|
|
|
|
|
V_DrawMenuString(220-w + offset*2 - 8 - (skullAnimCounter/5), 103+6, selectableflags, "\1C"); // left arrow
|
|
|
|
|
V_DrawMenuString(220+w + offset*2 + (skullAnimCounter/5), 103+6, selectableflags, "\1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (maintext != NULL)
|
|
|
|
|
@ -5517,9 +5645,9 @@ void M_DrawAddons(void)
|
|
|
|
|
M_CacheAddonPatches();
|
|
|
|
|
|
|
|
|
|
if (Playing())
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2, 4, warningflags, "Adding files mid-game may cause problems.");
|
|
|
|
|
V_DrawCenteredMenuString(BASEVIDWIDTH/2, 4, warningflags, "Adding files mid-game may cause problems.");
|
|
|
|
|
else
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2, 4, 0,
|
|
|
|
|
V_DrawCenteredMenuString(BASEVIDWIDTH/2, 4, 0,
|
|
|
|
|
LOCATIONSTRING1);
|
|
|
|
|
|
|
|
|
|
// DRAW MENU
|
|
|
|
|
@ -5544,7 +5672,7 @@ void M_DrawAddons(void)
|
|
|
|
|
if (itemOn == 0)
|
|
|
|
|
{
|
|
|
|
|
xoffs += 8;
|
|
|
|
|
V_DrawString(x + (skullAnimCounter/5) - 20, y+8, highlightflags, "\x1D");
|
|
|
|
|
V_DrawMenuString(x + (skullAnimCounter/5) - 20, y+8, highlightflags, "\x1D");
|
|
|
|
|
}
|
|
|
|
|
V_DrawString(x + xoffs - 18, y+8, tflag, str);
|
|
|
|
|
}
|
|
|
|
|
@ -5588,7 +5716,7 @@ void M_DrawAddons(void)
|
|
|
|
|
i = m - (2*numaddonsshown + 1);
|
|
|
|
|
|
|
|
|
|
if (i != 0)
|
|
|
|
|
V_DrawString(19, y+4 - (skullAnimCounter/5), highlightflags, "\x1A");
|
|
|
|
|
V_DrawMenuString(19, y+4 - (skullAnimCounter/5), highlightflags, "\x1A");
|
|
|
|
|
|
|
|
|
|
if (skullAnimCounter < 4)
|
|
|
|
|
flashcol = V_GetStringColormap(highlightflags);
|
|
|
|
|
@ -5629,7 +5757,7 @@ void M_DrawAddons(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m != (ssize_t)sizedirmenu)
|
|
|
|
|
V_DrawString(19, y-12 + (skullAnimCounter/5), highlightflags, "\x1B");
|
|
|
|
|
V_DrawMenuString(19, y-12 + (skullAnimCounter/5), highlightflags, "\x1B");
|
|
|
|
|
|
|
|
|
|
if (m < (2*numaddonsshown + 1))
|
|
|
|
|
{
|
|
|
|
|
@ -5644,7 +5772,7 @@ void M_DrawAddons(void)
|
|
|
|
|
|
|
|
|
|
m = numwadfiles-(mainwads+musicwads+1);
|
|
|
|
|
|
|
|
|
|
V_DrawCenteredString(BASEVIDWIDTH/2, y+4, (majormods ? highlightflags : V_TRANSLUCENT), va("%ld ADD-ON%s LOADED", (long)m, (m == 1) ? "" : "S")); //+2 for music, sounds, +1 for bios.pk3
|
|
|
|
|
V_DrawCenteredMenuString(BASEVIDWIDTH/2, y+4, (majormods ? highlightflags : V_TRANSLUCENT), va("%ld ADD-ON%s LOADED", (long)m, (m == 1) ? "" : "S")); //+2 for music, sounds, +1 for bios.pk3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef addonsseperation
|
|
|
|
|
@ -6620,7 +6748,7 @@ void M_DrawChallenges(void)
|
|
|
|
|
|
|
|
|
|
if (gamedata->challengegrid == NULL || challengesmenu.extradata == NULL)
|
|
|
|
|
{
|
|
|
|
|
V_DrawCenteredString(x, y, V_REDMAP, "No challenges available!?");
|
|
|
|
|
V_DrawCenteredMenuString(x, y, V_REDMAP, "No challenges available!?");
|
|
|
|
|
goto challengedesc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -6969,8 +7097,8 @@ static void M_DrawStatsMaps(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (location)
|
|
|
|
|
V_DrawCharacter(10, 80-(skullAnimCounter/5),
|
|
|
|
|
'\x1A' | highlightflags, false); // up arrow
|
|
|
|
|
V_DrawMenuString(10, 80-(skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1A"); // up arrow
|
|
|
|
|
|
|
|
|
|
i = -1;
|
|
|
|
|
|
|
|
|
|
@ -7136,8 +7264,8 @@ static void M_DrawStatsMaps(void)
|
|
|
|
|
}
|
|
|
|
|
bottomarrow:
|
|
|
|
|
if (dobottomarrow)
|
|
|
|
|
V_DrawCharacter(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
'\x1B' | highlightflags, false); // down arrow
|
|
|
|
|
V_DrawMenuString(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1B"); // down arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef STATSSTEP
|
|
|
|
|
@ -7157,8 +7285,8 @@ static void M_DrawStatsChars(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (location)
|
|
|
|
|
V_DrawCharacter(10, y-(skullAnimCounter/5),
|
|
|
|
|
'\x1A' | highlightflags, false); // up arrow
|
|
|
|
|
V_DrawMenuString(10, y-(skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1A"); // up arrow
|
|
|
|
|
|
|
|
|
|
i = -1;
|
|
|
|
|
|
|
|
|
|
@ -7191,8 +7319,8 @@ static void M_DrawStatsChars(void)
|
|
|
|
|
|
|
|
|
|
bottomarrow:
|
|
|
|
|
if (dobottomarrow)
|
|
|
|
|
V_DrawCharacter(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
'\x1B' | highlightflags, false); // down arrow
|
|
|
|
|
V_DrawMenuString(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1B"); // down arrow
|
|
|
|
|
|
|
|
|
|
UINT32 x = BASEVIDWIDTH - 20 - 90;
|
|
|
|
|
y = 88;
|
|
|
|
|
@ -7244,8 +7372,8 @@ static void M_DrawStatsGP(void)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (location)
|
|
|
|
|
V_DrawCharacter(10, y-(skullAnimCounter/5),
|
|
|
|
|
'\x1A' | highlightflags, false); // up arrow
|
|
|
|
|
V_DrawMenuString(10, y-(skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1A"); // up arrow
|
|
|
|
|
|
|
|
|
|
const INT32 width = 53;
|
|
|
|
|
|
|
|
|
|
@ -7321,8 +7449,8 @@ static void M_DrawStatsGP(void)
|
|
|
|
|
|
|
|
|
|
bottomarrow:
|
|
|
|
|
if (dobottomarrow)
|
|
|
|
|
V_DrawCharacter(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
'\x1B' | highlightflags, false); // down arrow
|
|
|
|
|
V_DrawMenuString(10, BASEVIDHEIGHT-20 + (skullAnimCounter/5),
|
|
|
|
|
highlightflags, "\x1B"); // down arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef STATSSTEP
|
|
|
|
|
@ -7374,11 +7502,11 @@ void M_DrawStatistics(void)
|
|
|
|
|
V_DrawThinString((BASEVIDWIDTH - pagenamewidth)/2, 12, 0, pagename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter((BASEVIDWIDTH - pagenamewidth)/2 - 10 - (skullAnimCounter/5), 12,
|
|
|
|
|
'\x1C', false); // left arrow
|
|
|
|
|
V_DrawMenuString((BASEVIDWIDTH - pagenamewidth)/2 - 10 - (skullAnimCounter/5), 12,
|
|
|
|
|
0, "\x1C"); // left arrow
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter((BASEVIDWIDTH + pagenamewidth)/2 + 2 + (skullAnimCounter/5), 12,
|
|
|
|
|
'\x1D', false); // right arrow
|
|
|
|
|
V_DrawMenuString((BASEVIDWIDTH + pagenamewidth)/2 + 2 + (skullAnimCounter/5), 12,
|
|
|
|
|
0, "\x1D"); // right arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
beststr[0] = 0;
|
|
|
|
|
@ -7600,7 +7728,7 @@ void M_DrawSoundTest(void)
|
|
|
|
|
{
|
|
|
|
|
UINT32 currenttime = min(Music_Elapsed(tune), Music_TotalDuration(tune));
|
|
|
|
|
|
|
|
|
|
V_DrawRightAlignedString(x + 272-1, 18+32, 0,
|
|
|
|
|
V_DrawRightAlignedMenuString(x + 272-1, 18+32, 0,
|
|
|
|
|
va("%02u:%02u",
|
|
|
|
|
G_TicsToMinutes(currenttime, true),
|
|
|
|
|
G_TicsToSeconds(currenttime)
|
|
|
|
|
@ -7614,7 +7742,7 @@ void M_DrawSoundTest(void)
|
|
|
|
|
{
|
|
|
|
|
UINT32 exittime = Music_TotalDuration(tune);
|
|
|
|
|
|
|
|
|
|
V_DrawRightAlignedString(x + 272-1, 18+32+10, 0,
|
|
|
|
|
V_DrawRightAlignedMenuString(x + 272-1, 18+32+10, 0,
|
|
|
|
|
va("%02u:%02u",
|
|
|
|
|
G_TicsToMinutes(exittime, true),
|
|
|
|
|
G_TicsToSeconds(exittime)
|
|
|
|
|
@ -7797,8 +7925,8 @@ void M_DrawSoundTest(void)
|
|
|
|
|
x += 25;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
V_DrawCharacter(cursorx - 4, currentMenu->y - 8 - (skullAnimCounter/5),
|
|
|
|
|
'\x1B' | V_SNAPTOTOP|highlightflags, false); // up arrow
|
|
|
|
|
V_DrawMenuString(cursorx - 4, currentMenu->y - 8 - (skullAnimCounter/5),
|
|
|
|
|
V_SNAPTOTOP|highlightflags, "\x1B"); // up arrow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_DISCORDRPC
|
|
|
|
|
|