Index: f_wipe.c
===================================================================
--- f_wipe.c	(revision 521)
+++ f_wipe.c	(working copy)
@@ -38,10 +38,10 @@
 #include "m_random.h"
 #include "f_wipe.h"
 
-// array of pointers to the
-// column data for 'superfast' melt
-static byte *start_screen[MAX_SCREENWIDTH] = {0};
+// Buffer containing the old, melting screen
 
+static byte *wipe_buffer = NULL;
+
 // y co-ordinate of various columns
 static int worms[SCREENWIDTH];
 
@@ -73,8 +73,6 @@
    }
 }
 
-static byte *wipe_buffer = NULL;
-
 void Wipe_StartScreen(void)
 {
    register int x, y;
@@ -88,29 +86,22 @@
       // haleyjd: make purgable, allocate at required size
       wipe_buffer = Z_Malloc(video.height * video.width, PU_STATIC, 
                              (void **)&wipe_buffer);
-      
-      for(x = 0; x < video.width; ++x)
-         start_screen[x] = wipe_buffer + (x * video.height);
    }
    else
+   {
       Z_ChangeTag(wipe_buffer, PU_STATIC); // buffer is in use
+   }
 
    // SoM 2-4-04: ANYRES
-   for(x = 0; x < video.width; ++x)
+
+   dest = wipe_buffer;
+   src = vbscreen.data;
+
+   for (y = 0; y < video.height; ++y)
    {
-      // limit check
-      int wormx = (x << FRACBITS) / video.xscale;
-      int wormy = video.y1lookup[worms[wormx] > 0 ? worms[wormx] : 0];
-      
-      src = vbscreen.data + x;
-      dest = start_screen[x];
-      
-      for(y = 0; y < video.height - wormy; y++)
-      {
-         *dest = *src;
-         src += vbscreen.pitch;
-         dest++;
-      }
+      memcpy(dest, src, video.width);
+      dest += video.width;
+      src += vbscreen.pitch;
    }
    
    return;
@@ -167,26 +158,36 @@
 void Wipe_Drawer(void)
 {
    register int x, y;
-   register byte *dest, *src;
+   byte *dest, *src;
+   register byte *dp, *sp;
+   register int offset;
+   int start_y;
 
-   // SoM 2-4-04: ANYRES
-   for(x = 0; x < video.width; ++x)
+   dest = vbscreen.data;
+
+   for (y=0; y < video.width; ++y)
    {
-      int wormy, wormx;
-      
-      wormx = (x << FRACBITS) / video.xscale;
-      wormy = worms[wormx] > 0 ? worms[wormx] : 0;  // limit check
+      dp = dest;
 
-      wormy = video.y1lookup[wormy];
+      for (x=0; x < video.width; ++x)
+      {
+         int wormy, wormx;
+         wormx = (x << FRACBITS) / video.xscale;
+         wormy = worms[wormx] > 0 ? worms[wormx] : 0;  // limit check
 
-      src = start_screen[x];
-      dest = vbscreen.data + vbscreen.pitch * wormy + x;
-      
-      for(y = video.height - wormy; y--;)
-      {
-         *dest = *src++;
-         dest += vbscreen.pitch;
+         wormy = video.y1lookup[wormy];
+
+         offset = y - wormy;
+
+         if (offset >= 0)
+         {
+            *dp = wipe_buffer[offset * video.width + x];
+         }
+
+         ++dp;
       }
+
+      dest += vbscreen.pitch;
    }
  
    redrawsbar = true; // clean up status bar
