From bab5c6031578258a60169a75d25eda21c7f02c70 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 28 Nov 2017 16:57:38 -0500 Subject: [PATCH] Further improved player setup Now has all of the features, maybe needs spacing tweaks --- src/k_kart.h | 1 + src/m_menu.c | 99 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 17 deletions(-) diff --git a/src/k_kart.h b/src/k_kart.h index 394e4d61..b30e3cd4 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -9,6 +9,7 @@ #include "doomdef.h" #include "d_player.h" // Need for player_t +UINT8 colortranslations[MAXSKINCOLORS][16]; extern const char *KartColor_Names[MAXSKINCOLORS]; void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color); UINT8 K_GetKartColorByName(const char *name); diff --git a/src/m_menu.c b/src/m_menu.c index 74d7f912..f083173d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6462,9 +6462,6 @@ static void M_HandleConnectIP(INT32 choice) // ======================== // Tails 03-02-2002 -#define PLBOXW 8 -#define PLBOXH 9 - static INT32 multi_tics; static state_t *multi_state; @@ -6498,26 +6495,26 @@ static void M_DrawSetupMultiPlayerMenu(void) M_DrawGenericMenu(); // draw name string - M_DrawTextBox(mx + 40, my - 8, MAXPLAYERNAME, 1); - V_DrawString(mx + 56, my, V_ALLOWLOWERCASE, setupm_name); + M_DrawTextBox(mx + 32, my - 8, MAXPLAYERNAME, 1); + V_DrawString(mx + 40, my, V_ALLOWLOWERCASE, setupm_name); // draw skin string - V_DrawString(mx + 88, my + 16, + V_DrawString(mx + 80, my + 16, ((MP_PlayerSetupMenu[2].status & IT_TYPE) == IT_SPACE ? V_TRANSLUCENT : 0)|V_YELLOWMAP|V_ALLOWLOWERCASE, skins[setupm_fakeskin].realname); // draw the name of the color you have chosen // Just so people don't go thinking that "Default" is Green. - V_DrawString(mx + 56, my + 152, V_YELLOWMAP|V_ALLOWLOWERCASE, KartColor_Names[setupm_fakecolor]); // SRB2kart + V_DrawString(mx + 48, my + 152, V_YELLOWMAP|V_ALLOWLOWERCASE, KartColor_Names[setupm_fakecolor]); // SRB2kart // draw text cursor for name if (!itemOn && skullAnimCounter < 4) // blink cursor - V_DrawCharacter(mx + 56 + V_StringWidth(setupm_name, 0), my, '_',false); + V_DrawCharacter(mx + 48 + V_StringWidth(setupm_name, 0), my, '_',false); // SRB2Kart: draw the stat backer - V_DrawFixedPatch((mx+142)<= MAXSKINCOLORS) + col -= MAXSKINCOLORS-1; + x += w; + } + } +#undef indexwidth + + // character bar, ripped off the color bar :V +#define iconwidth 32 + { + const INT32 icons = 4; + INT32 i = -icons; + INT16 col = setupm_fakeskin - icons; + INT32 x = BASEVIDWIDTH/2 - ((icons+1)*24) - 4; + fixed_t scale = FRACUNIT/2; + INT32 offx = 8, offy = 8; + patch_t *cursor = W_CachePatchName("K_CHRCUR", PU_CACHE); + patch_t *face; + + if (col < 0) + col += numskins; + while (i <= icons) + { + if (!(i++)) + { + scale = FRACUNIT; + offx = 12; + offy = 0; + } + else + { + scale = FRACUNIT/2; + offx = 8; + offy = 8; + } + face = W_CachePatchName(skins[col].face, PU_CACHE); + V_DrawFixedPatch((x+offx)<= numskins) + col -= numskins; + x += FixedMul(iconwidth<