diff --git a/src/v_video.c b/src/v_video.c index 9ce67dde6..0f3306696 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1565,10 +1565,8 @@ void V_DrawPatchFill(patch_t *pat) // Draws a patch and tries to always fill the screen with the patch void V_DrawAdaptiveScaledFullScreenPatch(patch_t *patch) { - fixed_t x = 0, y = 0, scale = FRACUNIT; - - scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally - + fixed_t x = 0, y = 0; + fixed_t scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); // however, if this means the patch doesent fill out the screen vertically then @@ -1588,6 +1586,7 @@ void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch) { fixed_t scale = ((vid.height * FRACUNIT) / patch->height); fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths + V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); } @@ -1596,9 +1595,7 @@ void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch) void V_DrawHorizontallyScaledFullScreenPatch(patch_t *patch) { fixed_t scale = ((vid.width * FRACUNIT) / patch->width); - fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); - fixed_t y = (vid.height << FRACBITS) - scaled_height; // center it if it does not fit the screen vertically diff --git a/src/y_inter.c b/src/y_inter.c index 48edf3a9e..4ace2a562 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -934,21 +934,25 @@ static void Y_DrawVoteBackground(patch_t *patch) // static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch) { + INT32 nextframe = 0; patch_t *votebg = NULL; char tempAnimPrefix[7]; + const INT32 tempFoundAnimVoteFrames = ((widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1); + strcpy(tempAnimPrefix, (widePatch ? animWidePrefix : animPrefix)); - const INT32 tempFoundAnimVoteFrames = (widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1; // Just in case someone provides LESS widescreen frames than normal frames or vice versa, reset the frame counter to 0 if (currentAnimFrame > tempFoundAnimVoteFrames) currentAnimFrame = 0; - votebg = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_PATCH); + nextframe = (currentAnimFrame + 1); + + votebg = W_CachePatchName(va("%s%d", (widePatch ? animWidePrefix : animPrefix), nextframe), PU_PATCH); Y_DrawVoteBackground(votebg); if (renderisnewtic && (votetic % 2 == 0) && !paused) - currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames) ? 0 : (currentAnimFrame + 1); + currentAnimFrame = (nextframe > tempFoundAnimVoteFrames) ? 0 : nextframe; } static void Y_DrawVoteScreenPatch(void) @@ -1027,6 +1031,7 @@ void Y_VoteDrawer(void) } y = (200-height)/2; + for (i = 0; i < 4; i++) { const char *str;