Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Tyler Young 2023-01-05 20:56:29 -05:00
commit d0d656ce55
3 changed files with 105 additions and 67 deletions

View file

@ -783,9 +783,9 @@ void Draw_AlphaStretchPic (int x, int y, int width, int height, float alpha, qpi
glTexCoord2f (gl->sh, gl->tl); glTexCoord2f (gl->sh, gl->tl);
glVertex2f (x+width, y); glVertex2f (x+width, y);
glTexCoord2f (gl->sh, gl->th); glTexCoord2f (gl->sh, gl->th);
glVertex2f (x+width, yheight); glVertex2f (x+width, y+height);
glTexCoord2f (gl->sl, gl->th); glTexCoord2f (gl->sl, gl->th);
glVertex2f (x, yheight); glVertex2f (x, y+height);
glEnd (); glEnd ();
if (alpha <= 1.0) if (alpha <= 1.0)

View file

@ -492,7 +492,10 @@ void HUD_Blood (void)
if(alpha < 0.0) if(alpha < 0.0)
return; return;
// Set the canvas to default so we can stretch by normal bounds
GL_SetCanvas(CANVAS_DEFAULT);
Draw_AlphaStretchPic (0, 0, vid.width, vid.height, alpha, fx_blood_lu); Draw_AlphaStretchPic (0, 0, vid.width, vid.height, alpha, fx_blood_lu);
GL_SetCanvas(CANVAS_USEPRINT);
} }
//============================================================================= //=============================================================================
@ -930,55 +933,55 @@ int current_perk_order;
void HUD_Perks (void) void HUD_Perks (void)
{ {
int i; int x, y, scale;
int y;
y = vid.height - sb_round[1]->height - jugpic->height - 14;
for (i = 0; i < 9; i++) #ifdef VITA
{ x = 36;
if (perk_order[i]) y = 6;
{ scale = 45;
if (perk_order[i] == P_JUG) #else
{ x = 26;
Draw_Pic (2, y, jugpic); y = 366;
y = y - 34; scale = 30;
} #endif // VITA
else if (perk_order[i] == P_DOUBLE)
{ // Draw second column first -- these need to be
Draw_Pic (2, y, doublepic); // overlayed below the first column.
y = y - 34; for (int i = 4; i < 8; i++) {
} if (perk_order[i]) {
else if (perk_order[i] == P_SPEED) if (perk_order[i] == P_JUG) {Draw_StretchPic(x, y, jugpic, scale, scale);}
{ if (perk_order[i] == P_DOUBLE) {Draw_StretchPic(x, y, doublepic, scale, scale);}
Draw_Pic (2, y, speedpic); if (perk_order[i] == P_SPEED) {Draw_StretchPic(x, y, speedpic, scale, scale);}
y = y - 34; if (perk_order[i] == P_REVIVE) {Draw_StretchPic(x, y, revivepic, scale, scale);}
} if (perk_order[i] == P_FLOP) {Draw_StretchPic(x, y, floppic, scale, scale);}
else if (perk_order[i] == P_REVIVE) if (perk_order[i] == P_STAMIN) {Draw_StretchPic(x, y, staminpic, scale, scale);}
{ if (perk_order[i] == P_DEAD) {Draw_StretchPic(x, y, deadpic, scale, scale);}
Draw_Pic (2, y, revivepic); if (perk_order[i] == P_MULE) {Draw_StretchPic(x, y, mulepic, scale, scale);}
y = y - 34;
}
else if (perk_order[i] == P_FLOP)
{
Draw_Pic (2, y, floppic);
y = y - 34;
}
else if (perk_order[i] == P_STAMIN)
{
Draw_Pic (2, y, staminpic);
y = y - 34;
}
else if (perk_order[i] == P_DEAD)
{
Draw_Pic (2, y, deadpic);
y = y - 34;
}
else if (perk_order[i] == P_MULE)
{
Draw_Pic (2, y, mulepic);
y = y - 34;
}
} }
y += scale;
}
#ifdef VITA
x = 12;
y = 6;
#else
x = 10;
y = 366;
#endif // VITA
// Now the first column.
for (int i = 0; i < 4; i++) {
if (perk_order[i]) {
if (perk_order[i] == P_JUG) {Draw_StretchPic(x, y, jugpic, scale, scale);}
if (perk_order[i] == P_DOUBLE) {Draw_StretchPic(x, y, doublepic, scale, scale);}
if (perk_order[i] == P_SPEED) {Draw_StretchPic(x, y, speedpic, scale, scale);}
if (perk_order[i] == P_REVIVE) {Draw_StretchPic(x, y, revivepic, scale, scale);}
if (perk_order[i] == P_FLOP) {Draw_StretchPic(x, y, floppic, scale, scale);}
if (perk_order[i] == P_STAMIN) {Draw_StretchPic(x, y, staminpic, scale, scale);}
if (perk_order[i] == P_DEAD) {Draw_StretchPic(x, y, deadpic, scale, scale);}
if (perk_order[i] == P_MULE) {Draw_StretchPic(x, y, mulepic, scale, scale);}
}
y += scale;
} }
} }
@ -991,10 +994,39 @@ HUD_Powerups
*/ */
void HUD_Powerups (void) void HUD_Powerups (void)
{ {
if(cl.stats[STAT_X2]) int count;
Draw_Pic ((vid.width/4) - 32, vid.height/2, x2pic);
if(cl.stats[STAT_INSTA]) // horrible way to offset check :)))))))))))))))))) :DDDDDDDD XOXO
Draw_Pic ((vid.width/4) + 2, vid.height/2, instapic);
if (cl.stats[STAT_X2])
count++;
if (cl.stats[STAT_INSTA])
count++;
// both are avail draw fixed order
if (count == 2) {
#ifdef VITA
Draw_StretchPic(422, 486, x2pic, 55, 55);
Draw_StretchPic(480, 486, instapic, 55, 55);
#else
Draw_StretchPic(275, 714, x2pic, 42, 42);
Draw_StretchPic(319, 714, instapic, 42, 42);
#endif // VITA
} else {
if (cl.stats[STAT_X2])
#ifdef VITA
Draw_StretchPic(451, 486, x2pic, 55, 55);
#else
Draw_StretchPic(299, 714, x2pic, 42, 42);
#endif // VITA
if(cl.stats[STAT_INSTA])
#ifdef VITA
Draw_StretchPic(451, 486, instapic, 55, 55);
#else
Draw_StretchPic(299, 714, instapic, 42, 42);
#endif // VITA
}
} }
//============================================================================= //=============================================================================
@ -1289,27 +1321,33 @@ void HUD_Draw (void) {
if (key_dest == key_menu_pause || paused_hack == true) { if (key_dest == key_menu_pause || paused_hack == true) {
return; return;
} }
#ifdef VITA
GL_SetCanvas(CANVAS_HUD);
#else
GL_SetCanvas(CANVAS_USEPRINT); GL_SetCanvas(CANVAS_USEPRINT);
#endif
if (waypoint_mode.value) { if (waypoint_mode.value) {
Draw_String (vid.width/2 - 112, vid.height/2 + 0, "WAYPOINTMODE"); #ifndef VITA
Draw_String (vid.width/2 - 240, vid.height/2 + 8, "Press fire to create waypoint"); Draw_ColoredStringScale(475, 364, "WAYPOINT MODE", 1, 1, 1, 1, 1.5f);
Draw_String (vid.width/2 - 232, vid.height/2 + 16, "Press use to select waypoint"); Draw_ColoredStringScale(329, 382, "FIRE to Create Waypoint", 1, 1, 1, 1, 1.5f);
Draw_String (vid.width/2 - 216, vid.height/2 + 24, "Press aim to link waypoint"); Draw_ColoredStringScale(329, 395, "USE to Select Waypoint", 1, 1, 1, 1, 1.5f);
Draw_String (vid.width/2 - 248, vid.height/2 + 32, "Press knife to remove waypoint"); Draw_ColoredStringScale(329, 408, "AIM to Link Waypoint", 1, 1, 1, 1, 1.5f);
Draw_String (vid.width/2 - 272, vid.height/2 + 40, "Press switch to move waypoint here"); Draw_ColoredStringScale(329, 421, "KNIFE to Remove Waypoint", 1, 1, 1, 1, 1.5f);
Draw_String (vid.width/2 - 304, vid.height/2 + 48, "Press reload to make special waypoint"); Draw_ColoredStringScale(329, 434, "SWITCH to Move Waypoint", 1, 1, 1, 1, 1.5f);
GL_SetCanvas (CANVAS_DEFAULT); Draw_ColoredStringScale(329, 447, "RELOAD to Evolve Waypoint", 1, 1, 1, 1, 1.5f);
#else
Draw_ColoredStringScale(741, 4, "WAYPOINT MODE", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 29, "FIRE to Create Waypoint", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 49, "USE to Select Waypoint", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 69, "AIM to Link Waypoint", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 89, "KNIFE to Remove Waypoint", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 109, "SWITCH to Move Waypoint", 1, 1, 1, 1, 2.0f);
Draw_ColoredStringScale(549, 129, "RELOAD to Evolve Waypoint", 1, 1, 1, 1, 2.0f);
#endif
return; return;
} }
if (cl.stats[STAT_HEALTH] <= 0) if (cl.stats[STAT_HEALTH] <= 0)
{ {
HUD_EndScreen (); HUD_EndScreen ();
GL_SetCanvas(CANVAS_DEFAULT);
return; return;
} }

View file

@ -1502,7 +1502,7 @@ void SCR_DrawCrosshair (void)
else if (crosshair.value && cl.stats[STAT_ZOOM] != 1 && cl.stats[STAT_ZOOM] != 2) else if (crosshair.value && cl.stats[STAT_ZOOM] != 1 && cl.stats[STAT_ZOOM] != 2)
Draw_Character ((vid.width - 8)/4/* + crosshair_x*/, (vid.height - 8)*3/4/* + crosshair_y*/, '.'); Draw_Character ((vid.width - 8)/4/* + crosshair_x*/, (vid.height - 8)*3/4/* + crosshair_y*/, '.');
if (cl.stats[STAT_ZOOM] == 2) { if (cl.stats[STAT_ZOOM] == 2) {
Draw_AlphaStretchPic (0, 0, vid.width, vid.height, alpha, sniper_scope); Draw_AlphaStretchPic (0, 0, vid.width, vid.height, 1, sniper_scope);
} }
if (Hitmark_Time > sv.time) { if (Hitmark_Time > sv.time) {
Draw_Pic ((vid.width/2 - hitmark->width)/2,vid.height/2 + (vid.height/2 - hitmark->height)/2, hitmark); Draw_Pic ((vid.width/2 - hitmark->width)/2,vid.height/2 + (vid.height/2 - hitmark->height)/2, hitmark);