diff --git a/src/y_inter.c b/src/y_inter.c index b5d18b537..67b190bfa 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -1224,7 +1224,7 @@ static fixed_t Y_CalculatePicScale(fixed_t picscale, INT32 hypoti) // void Y_VoteDrawer(void) { - INT32 rowval, i, lvls, x, picdiff, y = 0, height = 0; + INT32 rowval, i, px, lvls, x, picdiff, y = 0, height = 0; UINT8 selected[12]; fixed_t rubyheight = 0; fixed_t scale; @@ -1238,6 +1238,9 @@ void Y_VoteDrawer(void) fixed_t hypotf = 0; INT32 hypoti = 0; + INT32 numplayers = 0; + boolean highplayers = false; + // get the hypotenuse hypoti = (vidx*vidx) + (vidy*vidy); hypotf = FixedSqrt(hypoti); @@ -1481,8 +1484,25 @@ void Y_VoteDrawer(void) x = 20; y = 10; + for (px = 0; px < MAXPLAYERS; px++) + { + if (playeringame[px]) + { + numplayers++; + } + } + + highplayers = numplayers > 16; + for (i = 0; i < MAXPLAYERS; i++) { + INT32 bigaddx = 60; INT32 bigaddy = 30; + INT32 smalladdx = 42; INT32 smalladdy = 18; + INT32 smallfaceheight = 0; INT32 bigfaceheight = 9; + INT32 smallrectheight = 18; INT32 bigrectheight = 27; + INT32 smallrubyoffset = 4<width, scale))<width, scale))<leftoffset, y+9+facerank->topoffset, V_SNAPTOLEFT, facerank, colormap); + V_DrawMappedPatch(x+24+facerank->leftoffset, y+(highplayers ? smallfaceheight : bigfaceheight)+facerank->topoffset, V_SNAPTOLEFT, facerank, colormap); } if (!splitscreen && i == consoleplayer) { UINT8 cursorframe = (votetic / 4) % 8; patch_t *highlight = W_CachePatchName(va("K_CHILI%d", cursorframe+1), PU_CACHE); - V_DrawScaledPatch(x+24+highlight->leftoffset, y+9+highlight->topoffset, V_SNAPTOLEFT, highlight); + V_DrawScaledPatch(x+24+highlight->leftoffset, y+(highplayers ? smallfaceheight : bigfaceheight)+highlight->topoffset, V_SNAPTOLEFT, highlight); } } - y += 30; + y += highplayers ? smalladdy : bigaddy; if (y > BASEVIDHEIGHT-40) { - x += 60; + x += highplayers ? smalladdx : bigaddx; y = 10; } }