From 62aa3c856664ec4ad329cfaf28ee5fc7f65aa20e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 4 Oct 2008 14:45:57 +0000 Subject: Draw loading disk into a temporary buffer rather than the screen, to fix bug with leftover junk at startup melt. Subversion-branch: /branches/raven-branch Subversion-revision: 1333 --- src/i_video.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/i_video.c b/src/i_video.c index 7fab7731..f72e70ae 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -282,6 +282,7 @@ static void UpdateFocus(void) void I_EnableLoadingDisk(void) { patch_t *disk; + byte *tmpbuf; char *disk_name; int y; char buf[20]; @@ -304,9 +305,16 @@ void I_EnableLoadingDisk(void) disk = W_CacheLumpName(disk_name, PU_STATIC); - V_DrawPatch(0, 0, disk); + // Draw the patch into a temporary buffer + + tmpbuf = Z_Malloc(SCREENWIDTH * (disk->height + 1), PU_STATIC, NULL); + V_UseBuffer(tmpbuf); + disk_image_w = SHORT(disk->width); disk_image_h = SHORT(disk->height); + V_DrawPatch(0, 0, disk); + + // Copy the disk into the disk_image buffer. disk_image = Z_Malloc(disk_image_w * disk_image_h, PU_STATIC, NULL); saved_background = Z_Malloc(disk_image_w * disk_image_h, PU_STATIC, NULL); @@ -314,12 +322,16 @@ void I_EnableLoadingDisk(void) for (y=0; y