NX/VITA: Total UI Re-Scale/Overhaul

Fixes the HUD completely on NX, some HUD issues on VITA. Most VITA Menus
are now properly scaled. Adds social badges to main menu. Fixes load
screens on both platforms.
This commit is contained in:
cypress 2023-09-01 11:44:39 -04:00
parent daab14944a
commit bc28b5c593
5 changed files with 458 additions and 368 deletions

View file

@ -30,9 +30,9 @@ include $(DEVKITPRO)/libnx/switch_rules
# - icon.jpg
# - <libnx folder>/default_icon.jpg
#---------------------------------------------------------------------------------
APP_TITLE := NaziZombiesPortableNX
APP_TITLE := Nazi Zombies Portable
APP_AUTHOR := NZP Team
APP_VERSION := 1.0.0
APP_VERSION := 2.0.0
ICON := assets/nx/icon.jpg
TARGET := nzportable

View file

@ -890,6 +890,45 @@ Draw_Pic -- johnfitz -- modified
=============
*/
void Draw_SubPic(int x, int y, int width, int height, int start_x, int start_y, int end_x, int end_y, qpic_t *pic)
{
glpic_t *gl;
if (scrap_dirty)
Scrap_Upload ();
gl = (glpic_t *)pic->data;
GL_Bind (gl->gltexture);
glBegin (GL_QUADS);
#ifdef VITA
// Calculate texture coordinates for the subsection
float subTexLeft = (start_x / (float)pic->width);
float subTexRight = (end_x / (float)pic->width);
float subTexTop = (start_y / (float)pic->height);
float subTexBottom = (end_y / (float)pic->height);
#else
// Calculate texture coordinates for the subsection
float subTexLeft = gl->sl + (start_x / (float)pic->width);
float subTexRight = gl->sl + (end_x / (float)pic->width);
float subTexTop = gl->tl + (start_y / (float)pic->height);
float subTexBottom = gl->tl + (end_y / (float)pic->height);
#endif // VITA
glTexCoord2f(subTexLeft, subTexTop);
glVertex2f(x, y);
glTexCoord2f(subTexRight, subTexTop);
glVertex2f(x + width, y);
glTexCoord2f(subTexRight, subTexBottom);
glVertex2f(x + width, y + height);
glTexCoord2f(subTexLeft, subTexBottom);
glVertex2f(x, y + height);
glEnd ();
}
// motolegacy -- ultimate draw function!! probably annihilates gl calls so use wisely lol
// TODO: color shifting?
void Draw_AlphaStretchPic (int x, int y, int width, int height, float alpha, qpic_t *pic)
@ -1022,10 +1061,22 @@ void Draw_LoadingFill(void)
if(!loading_num_step)
return;
#ifdef VITA
int size = 16;
int max_step = 500;
int x = (vid.width / 2) - (max_step / 2);
int y = vid.height - (size/ 2) - 40;
#else
int size = 8;
int max_step = 350;
int x = (vid.width / 2) - (max_step / 2);
int y = vid.height - (size/ 2) - 25;
int x = (640 / 2) - (max_step / 2);
int y = 360 - (size/ 2) - 29;
#endif // VITA
int l;
char str[64];
char* text;
@ -1047,13 +1098,22 @@ void Draw_LoadingFill(void)
switch(loading_step) {
case 1: text = "Loading Models.."; break;
case 2: text = "Loading World.."; break;
case 3: text = "Running Test Frame.."; break;
case 3: text = "Executing Spawn Functions.."; break;
case 4: text = "Loading Sounds.."; break;
default: text = "Initializing.."; break;
}
l = strlen (text);
Draw_String((vid.width - l*8)/2, y, text);
#ifdef VITA
Draw_ColoredStringScale((vid.width - l*16)/2, y, text, 1, 1, 1, 1, 2.0f);
#else
Draw_String((640 - l*8)/2, y, text);
#endif // VITA
loading_cur_step_bk = loading_cur_step;
}

View file

@ -424,12 +424,13 @@ void HUD_Points (void)
#else
Draw_StretchPic(8, 629, sb_moneyback, 86, 21);
#endif // VITA
xplus = HUD_itoa (f, str);
#ifdef VITA
Draw_ColoredStringScale (((100 - xplus)/2)-5, 415, va("%i", current_points), 1, 1, 1, 1, 2.0f); //2x Scale/White
xplus = HUD_itoa (f, str)*16;
Draw_ColoredStringScale (((160 - xplus)/2)-5, 413, va("%i", current_points), 1, 1, 1, 1, 2.0f); //2x Scale/White
#else
Draw_String (vid.width/2 - (xplus*8) - 16, y + 3, va("%i", current_points));
xplus = HUD_itoa (f, str)*12;
Draw_ColoredStringScale (((111 - xplus)/2)-5, 633, va("%i", current_points), 1, 1, 1, 1, 1.5f);
#endif // VITA
if (old_points != f)
@ -437,17 +438,17 @@ void HUD_Points (void)
if (f > old_points)
{
#ifdef VITA
HUD_Parse_Point_Change(f - old_points, 0, 80 - (xplus*12), 415);
HUD_Parse_Point_Change(f - old_points, 0, 80 - (xplus), 415);
#else
HUD_Parse_Point_Change(f - old_points, 0, vid.width/2 - (xplus*8) - 16, y + 3);
HUD_Parse_Point_Change(f - old_points, 0, 140 - (xplus), y);
#endif // VITA
}
else
{
#ifdef VITA
HUD_Parse_Point_Change(old_points - f, 1, 80 - (xplus*12), 415);
HUD_Parse_Point_Change(old_points - f, 1, 80 - (xplus), 415);
#else
HUD_Parse_Point_Change(old_points - f, 1, vid.width/2 - (xplus*8) - 16, y + 3);
HUD_Parse_Point_Change(old_points - f, 1, 140 - (xplus), y);
#endif // VITA
}
old_points = f;
@ -477,7 +478,7 @@ void HUD_Point_Change (void)
#ifdef VITA
Draw_ColoredStringScale (point_change[i].x, point_change[i].y, va ("-%i", point_change[i].points), 1, 0, 0, 1, 2);
#else
Draw_ColoredString (point_change[i].x, point_change[i].y, va ("-%i", point_change[i].points), 1, 0, 0, 1);
Draw_ColoredStringScale (point_change[i].x, point_change[i].y, va ("-%i", point_change[i].points), 1, 0, 0, 1, 1.25f);
#endif
}
else
@ -485,7 +486,7 @@ void HUD_Point_Change (void)
#ifdef VITA
Draw_ColoredStringScale (point_change[i].x, point_change[i].y, va ("+%i", point_change[i].points), 1, 1, 0, 1, 2);
#else
Draw_ColoredString (point_change[i].x, point_change[i].y, va ("+%i", point_change[i].points), 1, 1, 0, 1);
Draw_ColoredStringScale (point_change[i].x, point_change[i].y, va ("+%i", point_change[i].points), 1, 1, 0, 1, 1.25f);
#endif
}
point_change[i].y = point_change[i].y + point_change[i].move_y;
@ -1184,7 +1185,7 @@ void HUD_Perks (void)
#else
x = 26;
y = 366;
scale = 30;
scale = 26;
#endif // VITA
// Draw second column first -- these need to be
@ -1207,7 +1208,7 @@ void HUD_Perks (void)
x = 12;
y = 6;
#else
x = 10;
x = 8;
y = 366;
#endif // VITA
@ -1252,21 +1253,21 @@ void HUD_Powerups (void)
Draw_StretchPic(422, 480, x2pic, 64, 64);
Draw_StretchPic(480, 480, instapic, 64, 64);
#else
Draw_StretchPic(275, 672, x2pic, 42, 42);
Draw_StretchPic(319, 672, instapic, 42, 42);
Draw_StretchPic(277, 678, x2pic, 32, 32);
Draw_StretchPic(317, 678, instapic, 32, 32);
#endif // VITA
} else {
if (cl.stats[STAT_X2])
#ifdef VITA
Draw_StretchPic(451, 480, x2pic, 64, 64);
#else
Draw_StretchPic(299, 672, x2pic, 42, 42);
Draw_StretchPic(306, 678, x2pic, 32, 32);
#endif // VITA
if(cl.stats[STAT_INSTA])
#ifdef VITA
Draw_StretchPic(451, 480, instapic, 64, 64);
#else
Draw_StretchPic(299, 672, instapic, 42, 42);
Draw_StretchPic(306, 678, instapic, 32, 32);
#endif // VITA
}
}
@ -1389,59 +1390,55 @@ int IsDualWeapon(int weapon)
void HUD_Ammo (void)
{
char str[12];
char str2[12];
int xplus, xplus2;
char *magstring;
char *mag2string;
char* magstring;
int reslen;
#ifdef VITA
float scale = 2.0f;
y_value = vid.height - 36;
x_value = 860;
#else
y_value = vid.height - 16;
#endif
if (GetLowAmmo(cl.stats[STAT_ACTIVEWEAPON], 1) >= cl.stats[STAT_CURRENTMAG])
magstring = va ("%i",cl.stats[STAT_CURRENTMAG]);
else
magstring = va ("%i",cl.stats[STAT_CURRENTMAG]);
xplus = HUD_itoa (cl.stats[STAT_CURRENTMAG], str);
#ifdef VITA
Draw_ColoredStringScale (790 - (xplus*16), y_value, magstring, 1, 1, 1, 1, 2.0f);
#else
Draw_ColoredString (vid.width/2 - 42 - (xplus*8), y_value, magstring, 1, 1, 1, 1);
#endif
float scale = 1.25f;
y_value = vid.height - 3 - fragpic->height;
x_value = 575;
mag2string = va("%i", cl.stats[STAT_CURRENTMAG2]);
xplus2 = HUD_itoa (cl.stats[STAT_CURRENTMAG2], str2);
#endif // VITA
reslen = strlen(va("/%i", cl.stats[STAT_AMMO]));
//
// Magazine
//
magstring = va("%i", cl.stats[STAT_CURRENTMAG]);
if (GetLowAmmo(cl.stats[STAT_ACTIVEWEAPON], 1) >= cl.stats[STAT_CURRENTMAG]) {
Draw_ColoredStringScale((x_value - (reslen*8*scale)) - strlen(magstring)*8*scale, y_value, magstring, 1, 0, 0, 1, scale);
} else {
Draw_ColoredStringScale((x_value - (reslen*8*scale)) - strlen(magstring)*8*scale, y_value, magstring, 1, 1, 1, 1, scale);
}
//
// Reserve Ammo
//
magstring = va("/%i", cl.stats[STAT_AMMO]);
if (GetLowAmmo(cl.stats[STAT_ACTIVEWEAPON], 0) >= cl.stats[STAT_AMMO]) {
Draw_ColoredStringScale(x_value - strlen(magstring)*8*scale, y_value, magstring, 1, 0, 0, 1, scale);
} else {
Draw_ColoredStringScale(x_value - strlen(magstring)*8*scale, y_value, magstring, 1, 1, 1, 1, scale);
}
//
// Second Magazine
//
if (IsDualWeapon(cl.stats[STAT_ACTIVEWEAPON])) {
#ifdef VITA
Draw_ColoredStringScale (790 - (xplus2*16), y_value, mag2string, 1, 1, 1, 1, 2.0f);
#else
Draw_ColoredString (vid.width/2 - 56 - (xplus2*8), y_value, mag2string, 1, 1, 1, 1);
#endif
}
if (GetLowAmmo(cl.stats[STAT_ACTIVEWEAPON], 0) >= cl.stats[STAT_AMMO])
{
#ifdef VITA
Draw_ColoredStringScale (795, y_value, "/", 1, 0, 0, 1, 2.0f);
Draw_ColoredStringScale (810, y_value, va ("%i",cl.stats[STAT_AMMO]), 1, 0, 0, 1, 2.0f);
#else
Draw_ColoredString (vid.width/2 - 42, y_value, "/", 1, 0, 0, 1);
Draw_ColoredString (vid.width/2 - 34, y_value, va ("%i",cl.stats[STAT_AMMO]), 1, 0, 0, 1);
#endif
}
else
{
#ifdef VITA
Draw_ColoredStringScale (795, y_value, "/", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale (810, y_value, va ("%i",cl.stats[STAT_AMMO]), 1, 1, 1, 1, 2.0f);
#else
Draw_Character (vid.width/2 - 42, y_value, '/');
Draw_String (vid.width/2 - 34, y_value, va ("%i",cl.stats[STAT_AMMO]));
#endif
magstring = va("%i", cl.stats[STAT_CURRENTMAG2]);
if (GetLowAmmo(cl.stats[STAT_ACTIVEWEAPON], 0) >= cl.stats[STAT_CURRENTMAG2]) {
Draw_ColoredStringScale(x_value - 34*scale - strlen(magstring)*8*scale, y_value, magstring, 1, 0, 0, 1, scale);
} else {
Draw_ColoredStringScale(x_value - 34*scale - strlen(magstring)*8*scale, y_value, magstring, 1, 1, 1, 1, scale);
}
}
}
@ -1498,8 +1495,8 @@ void HUD_Grenades (void)
x_value = vid.width - bettypic->width - 70;
y_value = vid.height - 40 - fragpic->height;
#else
x_value = vid.width/2 - 50;
y_value = vid.height - 16 - fragpic->height - 4;
x_value = vid.width/2 - 40;
y_value = vid.height - 16 - fragpic->height;
#endif
}
if (cl.stats[STAT_GRENADES] & UI_FRAG)
@ -1511,28 +1508,28 @@ void HUD_Grenades (void)
else
Draw_ColoredStringScale (x_value + 36, y_value + 44, va ("%i",cl.stats[STAT_PRIGRENADES]), 1, 1, 1, 1, 2.0f);
#else
Draw_Pic (x_value, y_value, fragpic);
Draw_StretchPic (x_value - 24, y_value, fragpic, 26, 26);
if (cl.stats[STAT_PRIGRENADES] <= 0)
Draw_ColoredString (x_value + 24, y_value + 28, va ("%i",cl.stats[STAT_PRIGRENADES]), 1, 0, 0, 1);
Draw_ColoredStringScale (x_value + 15 - 24, y_value + 18, va ("%i",cl.stats[STAT_PRIGRENADES]), 1, 0, 0, 1, 1.25f);
else
Draw_String (x_value + 24, y_value + 28, va ("%i",cl.stats[STAT_PRIGRENADES]));
Draw_ColoredStringScale (x_value + 15 - 24, y_value + 18, va ("%i",cl.stats[STAT_PRIGRENADES]), 1, 1, 1, 1, 1.25f);
#endif
}
if (cl.stats[STAT_GRENADES] & UI_BETTY)
{
#ifdef VITA
Draw_StretchPic (x_value + fragpic->width + 15, y_value, bettypic, 64, 64);
if (cl.stats[STAT_PRIGRENADES] <= 0) {
if (cl.stats[STAT_SECGRENADES] <= 0) {
Draw_ColoredStringScale (x_value + 46, y_value + 44, va ("%i",cl.stats[STAT_SECGRENADES]), 1, 0, 0, 1, 2.0f);
} else {
Draw_ColoredStringScale (x_value + fragpic->width + 46, y_value + 44, va ("%i",cl.stats[STAT_SECGRENADES]), 1, 1, 1, 1, 2.0f);
}
#else
Draw_Pic (x_value - fragpic->width - 5, y_value, bettypic);
if (cl.stats[STAT_PRIGRENADES] <= 0) {
Draw_ColoredString (x_value + 24, y_value + 28, va ("%i",cl.stats[STAT_SECGRENADES]), 1, 0, 0, 1);
Draw_StretchPic (x_value, y_value, bettypic, 26, 26);
if (cl.stats[STAT_SECGRENADES] <= 0) {
Draw_ColoredStringScale (x_value + 15, y_value + 18, va ("%i",cl.stats[STAT_SECGRENADES]), 1, 0, 0, 1, 1.25f);
} else {
Draw_String (x_value - fragpic->width + 20, y_value + 28, va ("%i",cl.stats[STAT_SECGRENADES]));
Draw_ColoredStringScale (x_value + 15, y_value + 18, va ("%i",cl.stats[STAT_SECGRENADES]), 1, 1, 1, 1, 1.25f);
}
#endif
}
@ -1660,7 +1657,7 @@ void HUD_Weapon (void)
#ifdef VITA
y_value = 480;
#else
y_value = vid.height - 16 - fragpic->height - 4 - 16;
y_value = vid.height - 16 - fragpic->height;
#endif
strcpy(str, pr_strings+sv_player->v.Weapon_Name);
//strcpy(str, GetWeaponName(cl.stats[STAT_ACTIVEWEAPON]));
@ -1669,8 +1666,8 @@ void HUD_Weapon (void)
x_value = vid.width - fragpic->width - 65 - l*16;
Draw_ColoredStringScale (x_value, y_value, str, 1, 1, 1, 1, 2.0f);
#else
x_value = vid.width/2 - 8 - l*8;
Draw_String (x_value, y_value, str);
x_value = vid.width/2 - 63 - l*10;
Draw_ColoredStringScale (x_value, y_value, str, 1, 1, 1, 1, 1.25f);
#endif
}

View file

@ -141,6 +141,7 @@ float oldscreensize, oldfov;
int scr_tileclear_updates = 0; //johnfitz
char scr_usestring[1024];
char scr_usestring2[32];
float scr_usetime_off = 0.0f;
int button_pic_x;
@ -271,93 +272,115 @@ void SCR_UsePrint (int type, int cost, int weapon)
{
char w[128];
char s[128];
char c[128];
switch (type)
{
case 0://clear
strcpy(s, "");
strcpy(c, "");
break;
case 1://door
strcpy(s, va("Hold %s to open door [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to open Door\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 2://debris
strcpy(s, va("Hold %s to remove debris [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to remove Debris\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 3://ammo
strcpy(w, PR_GetString(sv_player->v.Weapon_Name_Touch));
strcpy(s, va("Hold %s to buy ammo for %s [Cost:%i]\n", GetUseButtonL(), w, cost));
strcpy(s, va("Hold %s to buy Ammo for %s\n", GetUseButtonL(), w, cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 4://weapon
strcpy(w, PR_GetString(sv_player->v.Weapon_Name_Touch));
strcpy(s, va("Hold %s to buy %s [Cost:%i]\n", GetUseButtonL(), w, cost));
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), w, cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 5://window
strcpy(s, va("Hold %s to Rebuild Barrier\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 6://box
strcpy(s, va("Hold %s for Mystery Box [Cost: %i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s for Mystery Box\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 7://box take
strcpy(w, PR_GetString(sv_player->v.Weapon_Name_Touch));
strcpy(s, va("Hold %s for %s\n", GetUseButtonL(), w));
button_pic_x = 6;
strcpy(c, "");
button_pic_x = 5;
break;
case 8://power
strcpy(s, "The power must be activated first\n");
strcpy(s, "The Power must be Activated first\n");
strcpy(c, "");
button_pic_x = 100;
break;
case 9://perk
strcpy(s, va("Hold %s to buy %s [Cost:%i]\n", GetUseButtonL(), GetPerkName(weapon), cost));
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 10://turn on power
strcpy(s, va("Hold %s to turn on the power\n", GetUseButtonL()));
strcpy(s, va("Hold %s to Turn On the Power\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 11://turn on trap
strcpy(s, va("Hold %s to activate the electric barrier [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 12://PAP
strcpy(s, va("Hold %s to Pack a Punch [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 13://revive
strcpy(s, va("Hold %s to Fix your Code.. :)\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 14://use teleporter (free)
strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 15://use teleporter (cost)
strcpy(s, va("Hold %s to use Teleporter [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
case 16://tp cooldown
strcpy(s, "Teleporter is cooling down\n");
strcpy(c, "");
button_pic_x = 100;
break;
case 17://link
strcpy(s, va("Hold %s to initiate link to pad\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 18://no link
strcpy(s, "Link not active\n");
strcpy(c, "");
button_pic_x = 100;
break;
case 19://finish link
strcpy(s, va("Hold %s to link pad with core\n", GetUseButtonL()));
strcpy(c, "");
button_pic_x = 5;
break;
case 20://buyable ending
strcpy(s, va("Hold %s to End the Game [Cost:%i]\n", GetUseButtonL(), cost));
strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL(), cost));
strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5;
break;
default:
@ -366,31 +389,47 @@ void SCR_UsePrint (int type, int cost, int weapon)
}
strncpy (scr_usestring, va(s), sizeof(scr_usestring)-1);
strncpy (scr_usestring2, va(c), sizeof(scr_usestring2)-1);
scr_usetime_off = 0.1;
}
void SCR_DrawUseString (void)
{
int l;
int x, y;
int l, l2;
int x, x2, y;
if (cl.stats[STAT_HEALTH] < 0) {
return;
}
#ifdef VITA
float scale = 1.0f;
#else
float scale = 1.25f;
#endif // VITA
// The scale is double, so basically subtract the difference here...
y = vid.height*0.85;
l = strlen (scr_usestring);
x = ((vid.width/2 - l*8)/2);
x = ((vid.width/2 - l*8*scale)/2);
l2 = strlen (scr_usestring2);
x2 = ((vid.width/2 - l2*8*scale)/2);
#ifdef VITA
GL_SetCanvas(CANVAS_HUD);
#else
GL_SetCanvas(CANVAS_USEPRINT);
#endif
Draw_String (x, y, scr_usestring);
Draw_ColoredStringScale(x, y, scr_usestring, 1, 1, 1, 1, scale);
Draw_ColoredStringScale(x2, y + 12*scale, scr_usestring2, 1, 1, 1, 1, scale);
GL_SetCanvas(CANVAS_DEFAULT);
Draw_Pic (x*2 + button_pic_x*16, y*0.8125, GetButtonIcon("+use"));
Draw_Pic (x*2 + button_pic_x*16*scale, y*0.8125, GetButtonIcon("+use"));
}
void SCR_CheckDrawUseString (void)
@ -1283,15 +1322,15 @@ void SCR_DrawLoadScreen (void)
}
#ifdef VITA
Draw_FillByColor(0, 0, 480, 24, 0, 0, 0, 150);
Draw_FillByColor(x - 62, 478, 480, 24, 0, 0, 0, 150);
Draw_FillByColor(0, 0, 960, 48, 0, 0, 0, 150);
Draw_FillByColor(0, 1000 - 48, 960, 48, 0, 0, 0, 150);
Draw_ColoredStringScale(4, 8, loadnamespec, 255, 255, 0, 255, 2.0f);
Draw_ColoredStringScale(4, 8, loadnamespec, 255, 255, 0, 255, 4.0f);
#else
Draw_FillByColor(0, 0, 1280, 36, 0, 0, 0, 150);
Draw_FillByColor(0, 324, 1280, 36, 0, 0, 0, 150);
Draw_FillByColor(0, 0, 1280, 29, 0, 0, 0, 150);
Draw_FillByColor(0, 331, 1280, 29, 0, 0, 0, 150);
Draw_ColoredStringScale(5, 5, loadnamespec, 255, 255, 0, 255, 3.0f);
Draw_ColoredStringScale(5, 7, loadnamespec, 255, 255, 0, 255, 2.0f);
#endif // VITA
}
@ -1304,12 +1343,12 @@ void SCR_DrawLoadScreen (void)
if (key_dest == key_game) {
#ifdef VITA
Draw_ColoredString((vid.width - loadingtextwidth*8)/2/* - loadingtextwidth/2*/, 486, lodinglinetext, 255, 255, 255, 255);
Draw_ColoredStringScale((vid.width - loadingtextwidth*16)/2, 544 - 16 - 8, lodinglinetext, 255, 255, 255, 255, 2.0f);
//if (strcmp(lodinglinetext, "Please help me find the meaning of . Thanks.") == 0) {
//Draw_Pic(335, 255, awoo);
#else
Draw_ColoredStringScale((640 - loadingtextwidth*12)/2, 340, lodinglinetext, 255, 255, 255, 255, 1.5f);
Draw_ColoredStringScale((640 - loadingtextwidth*10)/2, 342, lodinglinetext, 255, 255, 255, 255, 1.25f);
//if (strcmp(lodinglinetext, "Please help me find the meaning of . Thanks.") == 0)
//Draw_StretchPic(335, 337, awoo, 17, 17);

View file

@ -79,6 +79,7 @@ char* game_build_date;
qpic_t *menu_bk;
qpic_t *start_bk;
qpic_t *pause_bk;
qpic_t *social_badges;
void (*vid_menucmdfn)(void); //johnfitz
void (*vid_menudrawfn)(void);
@ -201,6 +202,93 @@ char m_return_reason [32];
void M_ConfigureNetSubsystem(void);
//
// Macros to make menu design for NX & VITA easier
//
int menu_offset_y;
#ifdef VITA
#define OFFSET_SPACING 19
#define MENU_INITVARS() int y = 0; menu_offset_y = y + 70;
#define DRAW_HEADER(title) Draw_ColoredStringScale(10, y + 10, title, 1, 1, 1, 1, 4.0f);
#define DRAW_VERSIONSTRING() Draw_ColoredStringScale(vid.width - (strlen(game_build_date) * 16), y + 5, game_build_date, 1, 1, 1, 1, 2.0f);
#define DRAW_MENUOPTION(id, txt, cursor, divider) { \
menu_offset_y += OFFSET_SPACING; \
if (cursor == id) \
Draw_ColoredStringScale(10, menu_offset_y, txt, 1, 0, 0, 1, 2.0f); \
else \
Draw_ColoredStringScale(10, menu_offset_y, txt, 1, 1, 1, 1, 2.0f); \
if (divider == true) { \
menu_offset_y += OFFSET_SPACING + 4; \
Draw_FillByColor(10, menu_offset_y, 325, 4, 220, 220, 220, 255); \
menu_offset_y -= OFFSET_SPACING/3; \
} \
}
#define DRAW_BLANKOPTION(txt, divider) { \
menu_offset_y += OFFSET_SPACING; \
Draw_ColoredStringScale(10, menu_offset_y, txt, 0.5, 0.5, 0.5, 1, 2.0f); \
if (divider == true) { \
menu_offset_y += OFFSET_SPACING + 4; \
Draw_FillByColor(10, menu_offset_y, 325, 4, 220, 220, 220, 255); \
menu_offset_y -= OFFSET_SPACING/3; \
} \
}
#define DRAW_DESCRIPTION(txt) Draw_ColoredStringScale(10, y + 475, txt, 1, 1, 1, 1, 2.0f);
#define DRAW_BACKBUTTON(id, cursor) { \
if (cursor == id) \
Draw_ColoredStringScale(10, 500, "Back", 1, 0, 0, 1, 2.0f); \
else \
Draw_ColoredStringScale(10, 500, "Back", 1, 1, 1, 1, 2.0f); \
}
#define DRAW_MAPTHUMB(img) Draw_StretchPic(x_map_info_disp + 252, y + 68, img, 450, 255);
#define DRAW_MAPDESC(id, txt) Draw_ColoredStringScale(x_map_info_disp + 217, y + 329 + (18 * id), txt, 1, 1, 1, 1, 2.0f);
#define DRAW_MAPAUTHOR(id, txt) Draw_ColoredStringScale(x_map_info_disp + 217, y + 329 + (18 * id), txt, 1, 1, 0, 1, 2.0f);
#define DRAW_CREDITLINE(id, txt) Draw_ColoredStringScale(10, menu_offset_y + (OFFSET_SPACING * id), txt, 1, 1, 1, 1, 2.0f);
#else
#define OFFSET_SPACING 15
#define MENU_INITVARS() int y = vid.height * 0.5; menu_offset_y = y + 55;
#define DRAW_HEADER(title) Draw_ColoredStringScale(10, y + 10, title, 1, 1, 1, 1, 3.0f);
#define DRAW_VERSIONSTRING() Draw_ColoredString(635 - (strlen(game_build_date) * 8), y + 10, game_build_date, 1, 1, 1, 1);
#define DRAW_MENUOPTION(id, txt, cursor, divider) { \
menu_offset_y += OFFSET_SPACING; \
if (cursor == id) \
Draw_ColoredStringScale(10, menu_offset_y, txt, 1, 0, 0, 1, 1.5f); \
else \
Draw_ColoredStringScale(10, menu_offset_y, txt, 1, 1, 1, 1, 1.5f); \
if (divider == true) { \
menu_offset_y += OFFSET_SPACING + 4; \
Draw_FillByColor(10, menu_offset_y, 240, 3, 220, 220, 220, 255); \
menu_offset_y -= OFFSET_SPACING/3; \
} \
}
#define DRAW_BLANKOPTION(txt, divider) { \
menu_offset_y += OFFSET_SPACING; \
Draw_ColoredStringScale(10, menu_offset_y, txt, 0.5, 0.5, 0.5, 1, 1.5f); \
if (divider == true) { \
menu_offset_y += OFFSET_SPACING + 4; \
Draw_FillByColor(10, menu_offset_y, 240, 3, 220, 220, 220, 255); \
menu_offset_y -= OFFSET_SPACING/3; \
} \
}
#define DRAW_DESCRIPTION(txt) Draw_ColoredStringScale(10, y + 305, txt, 1, 1, 1, 1, 1.5f);
#define DRAW_BACKBUTTON(id, cursor) { \
if (cursor == id) \
Draw_ColoredStringScale(10, y + 335, "Back", 1, 0, 0, 1, 1.5f); \
else \
Draw_ColoredStringScale(10, y + 335, "Back", 1, 1, 1, 1, 1.5f); \
}
#define DRAW_MAPTHUMB(img) Draw_StretchPic(x_map_info_disp + 290, y + 45, img, 300, 170);
#define DRAW_MAPDESC(id, txt) Draw_ColoredStringScale(x_map_info_disp + 280, y + 218 + (15 * id), txt, 1, 1, 1, 1, 1.25f);
#define DRAW_MAPAUTHOR(id, txt) Draw_ColoredStringScale(x_map_info_disp + 280, y + 218 + (15 * id), txt, 1, 1, 0, 1, 1.25f);
#define DRAW_CREDITLINE(id, txt) Draw_ColoredStringScale(10, menu_offset_y + ((OFFSET_SPACING - 2) * id), txt, 1, 1, 1, 1, 1.25f);
#endif // VITA
/*
================
M_DrawCharacter
@ -537,11 +625,10 @@ void M_Menu_Main_f (void)
void M_Main_Draw (void)
{
#ifdef VITA
int y = 0;
#else
int y = vid.height * 0.5;
#endif
MENU_INITVARS();
// Social Badges
social_badges = Draw_CachePic("gfx/menu/social.tga");
// Menu Background
menu_bk = Draw_CachePic("gfx/menu/menu_background.tga");
@ -551,92 +638,73 @@ void M_Main_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 1);
// Version String
Draw_ColoredString(vid.width - (strlen(game_build_date) * 8), y + 5, game_build_date, 1, 1, 1, 1);
DRAW_VERSIONSTRING();
// Header
Draw_ColoredStringScale(10, y + 10, "MAIN MENU", 1, 1, 1, 1, 3.0f);
// Solo
if (m_main_cursor == 0)
Draw_ColoredStringScale(10, y + 55, "Solo", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 55, "Solo", 1, 1, 1, 1, 1.5f);
DRAW_HEADER("MAIN MENU");
DRAW_MENUOPTION(0, "Solo", m_main_cursor, false);
DRAW_BLANKOPTION("Co-Op (Coming Soon!)", true);
DRAW_MENUOPTION(1, "Settings", m_main_cursor, false);
// Co-Op (Unfinished, so non-selectable)
Draw_ColoredStringScale(10, y + 70, "Co-Op (Coming Soon!)", 0.5, 0.5, 0.5, 1, 1.5f);
// Divider
Draw_FillByColor(10, y + 90, 240, 3, 220, 220, 220, 255);
// Settings
if (m_main_cursor == 1)
Draw_ColoredStringScale(10, y + 100, "Settings", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 100, "Settings", 1, 1, 1, 1, 1.5f);
// Achievements (Unavailable, so non-selectable)
//Draw_ColoredStringScale(10, y + 115, "Achievements", 0.5, 0.5, 0.5, 1, 1.5f);
#ifdef VITA
if (m_main_cursor == 2)
Draw_ColoredStringScale(10, y + 122, "Achievements", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 122, "Achievements", 1, 1, 1, 1, 1.5f);
#else
// Achievements (Unavailable, so non-selectable)
Draw_ColoredStringScale(10, y + 115, "Achievements", 0.5, 0.5, 0.5, 1, 1.5f);
#endif
// Divider
Draw_FillByColor(10, y + 135, 240, 3, 220, 220, 220, 255);
DRAW_MENUOPTION(2, "Achievements", m_main_cursor, true);
DRAW_MENUOPTION(3, "Credits", m_main_cursor, true);
DRAW_MENUOPTION(4, "Exit", m_main_cursor, false);
#else
DRAW_BLANKOPTION("Achievements", true);
DRAW_MENUOPTION(2, "Credits", m_main_cursor, true);
DRAW_MENUOPTION(3, "Exit", m_main_cursor, false);
#endif // VITA
switch(m_main_cursor) {
case 0: DRAW_DESCRIPTION("Take on the Hordes by yourself."); break;
case 1: DRAW_DESCRIPTION("Adjust Control or Graphic Settings."); break;
#ifdef VITA
// Credits
if (m_main_cursor == 3)
case 2: DRAW_DESCRIPTION("View Locked/Unlocked Achievements."); break;
case 3: DRAW_DESCRIPTION("View Credits for NZ:P."); break;
case 4: DRAW_DESCRIPTION("Return to LiveArea."); break;
#else
if (m_main_cursor == 2)
#endif
Draw_ColoredStringScale(10, y + 145, "Credits", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 145, "Credits", 1, 1, 1, 1, 1.5f);
// Divider
Draw_FillByColor(10, y + 165, 240, 3, 220, 220, 220, 255);
#ifdef VITA
// Exit
if (m_main_cursor == 4)
#else
if (m_main_cursor == 3)
#endif
Draw_ColoredStringScale(10, y + 175, "Exit", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 175, "Exit", 1, 1, 1, 1, 1.5f);
case 2: DRAW_DESCRIPTION("View Credits for NZ:P."); break;
case 3: DRAW_DESCRIPTION("Return to Horizon."); break;
#endif // VITA
// future note: 335 = back
switch (m_main_cursor) {
#ifdef VITA
case 0: Draw_ColoredStringScale(10, y + 305, "Take on the Hordes by yourself.", 1, 1, 1, 1, 1.5f); break;
case 1: Draw_ColoredStringScale(10, y + 305, "Adjust your Settings to Optimize your Experience.", 1, 1, 1, 1, 1.5f); break;
case 2: Draw_ColoredStringScale(10, y + 305, "View locked or unlocked Achievements.", 1, 1, 1, 1, 1.5f); break;
case 3: Draw_ColoredStringScale(10, y + 305, "See who made NZ:P possible.", 1, 1, 1, 1, 1.5f); break;
case 4:
Draw_ColoredStringScale(10, y + 305, "Return to Vita Homescreen.", 1, 1, 1, 1, 1.5f);
break;
default: break;
#else
case 0: Draw_ColoredStringScale(10, y + 305, "Take on the Hordes by yourself.", 1, 1, 1, 1, 1.5f); break;
case 1: Draw_ColoredStringScale(10, y + 305, "Adjust your Settings to Optimize your Experience.", 1, 1, 1, 1, 1.5f); break;
//case 2: Draw_ColoredStringScale(10, y + 305, "View locked or unlocked Achievements.", 1, 1, 1, 1, 1.5f); break;
case 2: Draw_ColoredStringScale(10, y + 305, "See who made NZ:P possible.", 1, 1, 1, 1, 1.5f); break;
case 3:
Draw_ColoredStringScale(10, y + 305, "Return to Horizon (SwitchOS).", 1, 1, 1, 1, 1.5f);
break;
default: break;
#endif
}
#ifdef VITA
Draw_SubPic(915, 510, 26, 26, 32, 0, 64, 32, social_badges); // YouTube
Draw_ColoredStringScale(840, 510 + 6, "@nzpteam", 1, 1, 0, 1, 1.0f);
Draw_SubPic(915, 510 - 26 - 5, 26, 26, 0, 32, 32, 64, social_badges); // Twitter
Draw_ColoredStringScale(840, 510 - 25, "/NZPTeam", 1, 1, 0, 1, 1.0f);
Draw_SubPic(915, 510 - 52 - 10, 26, 26, 32, 32, 64, 64, social_badges); // Patreon
Draw_ColoredStringScale(792, 510 - 52 - 3, "/cypressimplex", 1, 1, 0, 1, 1.0f);
#else
Draw_SubPic(610, y + 330, 22, 22, 32, 0, 64, 32, social_badges); // YouTube
Draw_ColoredStringScale(542, y + 337, "@nzpteam", 1, 1, 0, 1, 1.0f);
Draw_SubPic(610, y + 302, 22, 22, 0, 32, 32, 64, social_badges); // Twitter
Draw_ColoredStringScale(542, y + 309, "/NZPTeam", 1, 1, 0, 1, 1.0f);
Draw_SubPic(610, y + 274, 22, 22, 32, 32, 64, 64, social_badges); // Patreon
Draw_ColoredStringScale(494, y + 280, "/cypressimplex", 1, 1, 0, 1, 1.0f);
#endif // VITA
}
@ -864,11 +932,7 @@ void M_SinglePlayer_Draw (void)
qpic_t* menu_ch = Draw_CachePic("gfx/menu/christmas_special.tga");
qpic_t* menu_custom = Draw_CachePic("gfx/menu/custom.tga");
#ifdef VITA
int y = 0;
#else
int y = vid.height * 0.5;
#endif
MENU_INITVARS();
paused_hack = false;
// Menu Background
@ -878,80 +942,49 @@ void M_SinglePlayer_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Version String
Draw_ColoredString(vid.width - (strlen(game_build_date) * 8), y + 5, game_build_date, 1, 1, 1, 1);
DRAW_VERSIONSTRING();
// Header
Draw_ColoredStringScale(10, y + 10, "SOLO", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("SOLO");
// Nacht der Untoten
if (m_singleplayer_cursor == 0)
Draw_ColoredStringScale(10, y + 55, "Nacht der Untoten", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 55, "Nacht der Untoten", 1, 1, 1, 1, 1.5f);
// Kino der Toten
Draw_ColoredStringScale(10, y + 70, "Kino der Toten", 0.5, 0.5, 0.5, 1, 1.5f);
// Warehouse
if (m_singleplayer_cursor == 1)
Draw_ColoredStringScale(10, y + 85, "Warehouse", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 85, "Warehouse", 1, 1, 1, 1, 1.5f);
// Wahnsinn
Draw_ColoredStringScale(10, y + 100, "Wahnsinn", 0.5, 0.5, 0.5, 1, 1.5f);
// Christmas Special
if (m_singleplayer_cursor == 2)
Draw_ColoredStringScale(10, y + 115, "Christmas Special", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 115, "Christmas Special", 1, 1, 1, 1, 1.5f);
// Divider
Draw_FillByColor(10, y + 135, 240, 3, 220, 220, 220, 255);
// Custom Maps
if (m_singleplayer_cursor == 3)
Draw_ColoredStringScale(10, y + 145, "Custom Maps", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 145, "Custom Maps", 1, 1, 1, 1, 1.5f);
// Back
if (m_singleplayer_cursor == 4)
Draw_ColoredStringScale(10, y + 335, "Back", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 335, "Back", 1, 1, 1, 1, 1.5f);
DRAW_MENUOPTION(0, "Nacht der Untoten", m_singleplayer_cursor, false);
DRAW_BLANKOPTION("Kino der Toten", false);
DRAW_MENUOPTION(1, "Warehouse", m_singleplayer_cursor, false);
DRAW_BLANKOPTION("Wahnsinn", false);
DRAW_MENUOPTION(2, "Christmas Special", m_singleplayer_cursor, true);
DRAW_MENUOPTION(3, "Custom Maps", m_singleplayer_cursor, false);
DRAW_BACKBUTTON(4, m_singleplayer_cursor);
// Map description & pic
switch (m_singleplayer_cursor) {
case 0:
Draw_StretchPic(x_map_info_disp + 290, y + 55, menu_ndu, 300, 170);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 235, "Desolate bunker located on a Ge-", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 250, "rman airfield, stranded after a", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 265, "brutal plane crash surrounded by", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 280, "hordes of undead. Exploit myste-", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 295, "rious forces at play and hold o-", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 310, "ut against relentless waves. Der", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 325, "Anstieg ist jetzt. Will you fall", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 340, "to the overwhelming onslaught?", 1, 1, 1, 1, 1.5f);
DRAW_MAPTHUMB(menu_ndu);
DRAW_MAPDESC(0, "Desolate bunker located on a Ge-");
DRAW_MAPDESC(1, "rman airfield, stranded after a");
DRAW_MAPDESC(2, "brutal plane crash surrounded by");
DRAW_MAPDESC(3, "hordes of undead. Exploit myste-");
DRAW_MAPDESC(4, "rious forces at play and hold o-");
DRAW_MAPDESC(5, "ut against relentless waves. Der");
DRAW_MAPDESC(6, "Anstieg ist jetzt. Will you fall");
DRAW_MAPDESC(7, "to the overwhelming onslaught?");
break;
case 1:
Draw_StretchPic(x_map_info_disp + 290, y + 55, menu_wh, 300, 170);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 235, "Old Warehouse full of Zombies!", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 250, "Fight your way to the Power", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 265, "Switch through the Hordes!", 1, 1, 1, 1, 1.5f);
DRAW_MAPTHUMB(menu_wh);
DRAW_MAPDESC(0, "Old Warehouse full of Zombies!");
DRAW_MAPDESC(1, "Fight your way to the Power");
DRAW_MAPDESC(2, "Switch through the Hordes!");
break;
case 2:
Draw_StretchPic(x_map_info_disp + 290, y + 55, menu_ch, 300, 170);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 235, "No Santa this year. Though we're", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 250, "sure you will get presents from", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 265, "the undead! Will you accept them?", 1, 1, 1, 1, 1.5f);
DRAW_MAPTHUMB(menu_ch);
DRAW_MAPDESC(0, "No Santa this year. Though we're");
DRAW_MAPDESC(1, "sure you will get presents from");
DRAW_MAPDESC(2, "the undead! Will you accept them?");
break;
case 3:
Draw_StretchPic(x_map_info_disp + 290, y + 55, menu_custom, 300, 170);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 235, "Custom Maps made by Community", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 250, "Members on the Fourm and on", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(x_map_info_disp + 245, y + 265, "Discord!", 1, 1, 1, 1, 1.5f);
DRAW_MAPTHUMB(menu_custom);
DRAW_MAPDESC(0, "Custom Maps made by Community");
DRAW_MAPDESC(1, "Members on GitHub and the NZ:P");
DRAW_MAPDESC(2, "Forum!");
break;
default: break;
}
@ -1330,7 +1363,7 @@ void M_Achievement_Draw (void)
Draw_FillByColor(0, 0, 960, 544, 0, 0, 0, 1);
// Version String
Draw_ColoredStringScale(vid.width - 40, 5, "v1.0", 255, 255, 255, 1, 1.0f);
//DRAW_VERSIONSTRING();
if (!m_achievement_selected)
{
@ -1488,13 +1521,10 @@ void M_Menu_Maps_f (void)
extern vrect_t scr_vrect;
void M_Menu_Maps_Draw (void)
{
#ifdef VITA
int y = scr_vrect.y * 0.5;
#else
int y = vid.height * 0.5;
#endif
qpic_t* menu_cuthum;
MENU_INITVARS();
// Menu Background
Draw_BgMenu();
@ -1502,10 +1532,10 @@ void M_Menu_Maps_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Version String
Draw_ColoredString(vid.width - (strlen(game_build_date) * 8), y + 5, game_build_date, 1, 1, 1, 1);
DRAW_VERSIONSTRING();
// Header
Draw_ColoredStringScale(10, y + 10, "CUSTOM MAPS", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("CUSTOM MAPS");
int line_increment;
line_increment = 0;
@ -1519,103 +1549,99 @@ void M_Menu_Maps_Draw (void)
if (custom_maps[i + multiplier].occupied == false)
continue;
if (custom_maps[i + multiplier].map_name_pretty != 0) {
DRAW_MENUOPTION(i, custom_maps[i + multiplier].map_name_pretty, m_maps_cursor, false);
} else {
DRAW_MENUOPTION(i, custom_maps[i + multiplier].map_name, m_maps_cursor, false);
}
if (m_maps_cursor == i) {
if (custom_maps[i + multiplier].map_use_thumbnail == 1) {
menu_cuthum = Draw_CachePic(custom_maps[i + multiplier].map_thumbnail_path);
if (menu_cuthum != NULL)
{
Draw_StretchPic(x_map_info_disp + 290, y + 55, menu_cuthum, 300, 170);
}
}
if (custom_maps[i + multiplier].map_name_pretty != 0)
Draw_ColoredStringScale(10, y + (55 + (15 * i)), custom_maps[i + multiplier].map_name_pretty, 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + (55 + (15 * i)), custom_maps[i + multiplier].map_name, 1, 0, 0, 1, 1.5f);
if (menu_cuthum != NULL)
DRAW_MAPTHUMB(menu_cuthum);
}
if (custom_maps[i + multiplier].map_desc_1 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_1, " ") != 0) {
Draw_ColoredStringScale(x_map_info_disp + 245, y + 235, custom_maps[i + multiplier].map_desc_1, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(0, custom_maps[i + multiplier].map_desc_1);
}
}
if (custom_maps[i + multiplier].map_desc_2 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_2, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 250, custom_maps[i + multiplier].map_desc_2, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(1, custom_maps[i + multiplier].map_desc_2);
}
}
if (custom_maps[i + multiplier].map_desc_3 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_3, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 265, custom_maps[i + multiplier].map_desc_3, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(2, custom_maps[i + multiplier].map_desc_3);
}
}
if (custom_maps[i + multiplier].map_desc_4 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_4, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 280, custom_maps[i + multiplier].map_desc_4, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(3, custom_maps[i + multiplier].map_desc_4);
}
}
if (custom_maps[i + multiplier].map_desc_5 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_5, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 295, custom_maps[i + multiplier].map_desc_5, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(4, custom_maps[i + multiplier].map_desc_5);
}
}
if (custom_maps[i + multiplier].map_desc_6 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_6, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 310, custom_maps[i + multiplier].map_desc_6, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(5, custom_maps[i + multiplier].map_desc_6);
}
}
if (custom_maps[i + multiplier].map_desc_7 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_7, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 325, custom_maps[i + multiplier].map_desc_7, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(6, custom_maps[i + multiplier].map_desc_7);
}
}
if (custom_maps[i + multiplier].map_desc_8 != 0) {
if (strcmp(custom_maps[i + multiplier].map_desc_8, " ") != 0) {
line_increment++;
Draw_ColoredStringScale(x_map_info_disp + 245, y + 340, custom_maps[i + multiplier].map_desc_8, 1, 1, 1, 1, 1.5f);
DRAW_MAPDESC(7, custom_maps[i + multiplier].map_desc_8);
}
}
if (custom_maps[i + multiplier].map_author != 0) {
if (strcmp(custom_maps[i + multiplier].map_author, " ") != 0) {
int author_offset = 250 + (15 * line_increment);
Draw_ColoredStringScale(x_map_info_disp + 245, y + author_offset, custom_maps[i + multiplier].map_author, 1, 1, 0, 1, 1.5f);
line_increment++;
DRAW_MAPAUTHOR(line_increment, custom_maps[i + multiplier].map_author);
}
}
} else {
if (custom_maps[i + multiplier].map_name_pretty != 0)
Draw_ColoredStringScale(10, y + (55 + (15 * i)), custom_maps[i + multiplier].map_name_pretty, 1, 1, 1, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + (55 + (15 * i)), custom_maps[i + multiplier].map_name, 1, 1, 1, 1, 1.5f);
}
}
#ifdef VITA
menu_offset_y += 136;
#else
menu_offset_y += 20;
#endif // VITA
if (current_custom_map_page != custom_map_pages) {
if (m_maps_cursor == 15)
Draw_ColoredStringScale(10, y + 305, "Next Page", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 305, "Next Page", 1, 1, 1, 1, 1.5f);
DRAW_MENUOPTION(15, "Next Page", m_maps_cursor, false);
} else {
Draw_ColoredStringScale(10, y + 305, "Next Page", 0.5, 0.5, 0.5, 1, 1.5f);
DRAW_BLANKOPTION("Next Page", false);
}
if (current_custom_map_page != 1) {
if (m_maps_cursor == 16)
Draw_ColoredStringScale(10, y + 320, "Previous Page", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 320, "Previous Page", 1, 1, 1, 1, 1.5f);
DRAW_MENUOPTION(16, "Previous Page", m_maps_cursor, false);
} else {
Draw_ColoredStringScale(10, y + 320, "Previous Page", 0.5, 0.5, 0.5, 1, 1.5f);
DRAW_BLANKOPTION("Previous Page", false);
}
if (m_maps_cursor == 17)
Draw_ColoredStringScale(10, y + 335, "Back", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 335, "Back", 1, 1, 1, 1, 1.5f);
DRAW_BACKBUTTON(17, m_maps_cursor);
}
@ -2448,11 +2474,7 @@ void M_DrawCheckbox (int x, int y, int on)
void M_Options_Draw (void)
{
#ifdef VITA
int y = 0;
#else
int y = vid.height * 0.5;
#endif
MENU_INITVARS();
// Menu Background
if (paused_hack == false)
@ -2462,50 +2484,24 @@ void M_Options_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Version String
Draw_ColoredString(vid.width - (strlen(game_build_date) * 8), y + 5, game_build_date, 1, 1, 1, 1);
DRAW_VERSIONSTRING();
// Header
Draw_ColoredStringScale(10, y + 10, "SETTINGS", 1, 1, 1, 1, 3.0f);
// Graphics Settings
if (options_cursor == 0)
Draw_ColoredStringScale(10, y + 55, "Graphics Settings", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 55, "Graphics Settings", 1, 1, 1, 1, 1.5f);
DRAW_HEADER("SETTINGS");
// Controls
if (options_cursor == 1)
Draw_ColoredStringScale(10, y + 70, "Controls", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 70, "Controls", 1, 1, 1, 1, 1.5f);
DRAW_MENUOPTION(0, "Graphics Settings", options_cursor, false);
DRAW_MENUOPTION(1, "Controls", options_cursor, false);
DRAW_MENUOPTION(2, "Control Settings", options_cursor, true);
DRAW_MENUOPTION(3, "Console", options_cursor, false);
// Control Settings
if (options_cursor == 2)
Draw_ColoredStringScale(10, y + 85, "Control Settings", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 85, "Control Settings", 1, 1, 1, 1, 1.5f);
// Divider
Draw_FillByColor(10, y + 105, 240, 3, 220, 220, 220, 255);
// Console
if (options_cursor == 3)
Draw_ColoredStringScale(10, y + 115, "Console", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 115, "Console", 1, 1, 1, 1, 1.5f);
// Back
if (options_cursor == 4)
Draw_ColoredStringScale(10, y + 335, "Back", 1, 0, 0, 1, 1.5f);
else
Draw_ColoredStringScale(10, y + 335, "Back", 1, 1, 1, 1, 1.5f);
DRAW_BACKBUTTON(4, options_cursor);
// Descriptions
switch(options_cursor) {
case 0: Draw_ColoredStringScale(10, y + 305, "Adjust settings relating to Graphical Fidelity.", 1, 1, 1, 1, 1.5f); break;
case 1: Draw_ColoredStringScale(10, y + 305, "Customize your Control Scheme.", 1, 1, 1, 1, 1.5f); break;
case 2: Draw_ColoredStringScale(10, y + 305, "Adjust settings in relation to how NZ:P Controls.", 1, 1, 1, 1, 1.5f); break;
case 3: Draw_ColoredStringScale(10, y + 305, "Open the Console to input Commands.", 1, 1, 1, 1, 1.5f); break;
case 0: DRAW_DESCRIPTION("Adjust settings relating to Graphical Fidelity."); break;
case 1: DRAW_DESCRIPTION("Customize your Control Scheme."); break;
case 2: DRAW_DESCRIPTION("Adjust settings in relation to how NZ:P Controls."); break;
case 3: DRAW_DESCRIPTION("Option the Console to input Commands."); break;
default: break;
}
}
@ -2608,7 +2604,7 @@ void M_Graphics_Settings_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Header
Draw_ColoredStringScale(10, y + 10, "GRAPHICS SETTINGS", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("GRAPHICS SETTINGS");
// Show FPS
if (gsettings_cursor == 0)
@ -2827,7 +2823,7 @@ void M_Control_Settings_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Header
Draw_ColoredStringScale(10, y + 10, "CONTROL SETTINGS", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("CONTROL SETTINGS");
// Draw Crosshair
if (csettings_cursor == 0)
@ -3150,7 +3146,7 @@ void M_Keys_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Header
Draw_ColoredStringScale(10, y + 10, "CONTROLS", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("CONTROLS");
if (bind_grab) {
Draw_ColoredStringScale(86, y + 305, "Press a key or button for this action", 1, 1, 1, 1, 1.5f);
@ -3400,11 +3396,7 @@ void M_Menu_Credits_f (void)
void M_Credits_Draw (void)
{
#ifdef VITA
int y = 0;
#else
int y = vid.height * 0.5;
#endif
MENU_INITVARS();
// Menu Background
Draw_BgMenu();
@ -3413,32 +3405,34 @@ void M_Credits_Draw (void)
Draw_FillByColor(0, 0, 1280, 720, 0, 0, 0, 0.4);
// Version String
Draw_ColoredString(vid.width - (strlen(game_build_date) * 8), y + 5, game_build_date, 1, 1, 1, 1);
DRAW_VERSIONSTRING();
// Header
Draw_ColoredStringScale(10, y + 10, "CREDITS", 1, 1, 1, 1, 3.0f);
DRAW_HEADER("CREDITS");
DRAW_CREDITLINE(0, "Programming:");
DRAW_CREDITLINE(1, "Blubswillrule, Jukki, DR_Mabuse1981, Naievil, MotoLegacy");
DRAW_CREDITLINE(2, "ScatterBox");
DRAW_CREDITLINE(3, "");
DRAW_CREDITLINE(4, "Models:");
DRAW_CREDITLINE(5, "Blubswillrule, Ju[s]tice, Derped_Crusader");
DRAW_CREDITLINE(6, "");
DRAW_CREDITLINE(7, "GFX:");
DRAW_CREDITLINE(8, "Blubswillrule, Ju[s]tice, MotoLegacy, Derped_Crusader");
DRAW_CREDITLINE(9, "");
DRAW_CREDITLINE(10, "Sounds/Music:");
DRAW_CREDITLINE(11, "Blubswillrule, Biodude, MotoLegacy, Marty P.");
DRAW_CREDITLINE(12, "");
DRAW_CREDITLINE(13, "Special Thanks:");
DRAW_CREDITLINE(14, "- Spike, Eukara: FTEQW");
DRAW_CREDITLINE(15, "- Shpuld: CleanQC4FTE");
DRAW_CREDITLINE(16, "- Crow_Bar, st1x51: dQuake(plus)");
DRAW_CREDITLINE(17, "- fgsfdsfgs: Quakespasm-NX");
DRAW_CREDITLINE(18, "- Rinnegatamante: Initial VITA Port, VITA Auto-Updater");
DRAW_CREDITLINE(19, "- Azenn: GFX Help");
DRAW_CREDITLINE(20, "- BCDeshiG: Extensive Testing");
Draw_ColoredStringScale(10, y + 55, "Blubswillrule: Coding, Models, GFX, Sounds, Music", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 70, "Ju[s]tice: Maps, Models, GFX", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 85, "Jukki: Coding", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 100, "Biodude: Sounds", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 115, "DR_Mabuse1981: Coding", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 130, "Naievil: Coding, NX Maintaining", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 145, "MotoLegacy: Coding, GFX, Music, NX Maintaining", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 160, "Derped_Crusader: Models, GFX", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 175, "Rinnegatamante: Vita Maintaining", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 205, "Special Thanks:", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 220, "- Spike: FTEQW", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 235, "- Shpuld: CleanQC4FTE", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 250, "- Crow_Bar: DQuake", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 265, "- st1x51: DQuakePlus", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 280, "- fgsfdsfgs: Quakespasm-NX", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 295, "- Azenn: GFX help", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 310, "- tavo: Music help", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 325, "- BCDeshiG: Heavy bug testing", 1, 1, 1, 1, 1.5f);
Draw_ColoredStringScale(10, y + 350, "Back", 1, 0, 0, 1, 1.5f);
DRAW_BACKBUTTON(0, 0);
}