New HUD_Perks

This commit is contained in:
Steam Deck User 2023-01-03 20:43:24 -05:00
parent d8d6bce891
commit b4e0906fdb
1 changed files with 48 additions and 45 deletions

View File

@ -933,54 +933,57 @@ int current_perk_order;
void HUD_Perks (void) void HUD_Perks (void)
{ {
int i; int row, column = 0;
int y; int x, y = 0;
y = vid.height - sb_round[1]->height - jugpic->height - 14;
for (i = 0; i < 9; i++) #ifdef VITA
{ int x = 36;
if (perk_order[i]) int y = 4;
{ #else
if (perk_order[i] == P_JUG) int x = 26;
{ int y = 364;
Draw_Pic (2, y, jugpic); #endif // VITA
y = y - 34;
// Draw Even numbered Perks first -- these need to be
// overlayed below odd numbers/starts of columns.
for (int i = 0; i < 9; i++) {
if (i % 2 == 0) {
if (perk_order[i]) {
if (perk_order[i] == P_JUG) {Draw_StretchPic(x, y, jugpic, 28, 28);}
if (perk_order[i] == P_DOUBLE) {Draw_StretchPic(x, y, doublepic, 28, 28);}
if (perk_order[i] == P_SPEED) {Draw_StretchPic(x, y, speedpic, 28, 28);}
if (perk_order[i] == P_REVIVE) {Draw_StretchPic(x, y, revivepic, 28, 28);}
if (perk_order[i] == P_FLOP) {Draw_StretchPic(x, y, floppic, 28, 28);}
if (perk_order[i] == P_STAMIN) {Draw_StretchPic(x, y, staminpic, 28, 28);}
if (perk_order[i] == P_DEAD) {Draw_StretchPic(x, y, deadpic, 28, 28);}
if (perk_order[i] == P_MULE) {Draw_StretchPic(x, y, mulepic, 28, 28);}
} }
else if (perk_order[i] == P_DOUBLE) y += 28;
{ }
Draw_Pic (2, y, doublepic); }
y = y - 34;
} #ifdef VITA
else if (perk_order[i] == P_SPEED) int x = 12;
{ int y = 4;
Draw_Pic (2, y, speedpic); #else
y = y - 34; int x = 10;
} int y = 364;
else if (perk_order[i] == P_REVIVE) #endif // VITA
{
Draw_Pic (2, y, revivepic); // Now the Odd numbered ones.
y = y - 34; for (int i = 0; i < 9; i++) {
} if (i % 2 != 0) {
else if (perk_order[i] == P_FLOP) if (perk_order[i]) {
{ if (perk_order[i] == P_JUG) {Draw_StretchPic(x, y, jugpic, 28, 28);}
Draw_Pic (2, y, floppic); if (perk_order[i] == P_DOUBLE) {Draw_StretchPic(x, y, doublepic, 28, 28);}
y = y - 34; if (perk_order[i] == P_SPEED) {Draw_StretchPic(x, y, speedpic, 28, 28);}
} if (perk_order[i] == P_REVIVE) {Draw_StretchPic(x, y, revivepic, 28, 28);}
else if (perk_order[i] == P_STAMIN) if (perk_order[i] == P_FLOP) {Draw_StretchPic(x, y, floppic, 28, 28);}
{ if (perk_order[i] == P_STAMIN) {Draw_StretchPic(x, y, staminpic, 28, 28);}
Draw_Pic (2, y, staminpic); if (perk_order[i] == P_DEAD) {Draw_StretchPic(x, y, deadpic, 28, 28);}
y = y - 34; if (perk_order[i] == P_MULE) {Draw_StretchPic(x, y, mulepic, 28, 28);}
}
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 += 28;
} }
} }
} }