Did forget instate in for loop the patternX, the right way. thx GvG to spot it and tell me how to fix.
Modified: trunk/reactos/tools/gendib/gendib.c

Modified: trunk/reactos/tools/gendib/gendib.c
--- trunk/reactos/tools/gendib/gendib.c	2005-07-07 18:07:40 UTC (rev 16491)
+++ trunk/reactos/tools/gendib/gendib.c	2005-07-07 18:21:44 UTC (rev 16492)
@@ -483,7 +483,7 @@
     }
   if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE))
     {
-      Output(Out, "PatternX = (BltInfo->DestRect.left + BltInfo->BrushOrigin.x) %%\n");
+      Output(Out, "BasePatternX = (BltInfo->DestRect.left + BltInfo->BrushOrigin.x) %%\n");
       Output(Out, "           BltInfo->PatternSurface->sizlBitmap.cx;\n");
     }
 
@@ -503,6 +503,11 @@
         }
       Output(Out, "DestPtr = (PULONG) DestBase;\n");
     }
+
+  if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE))
+   {
+    Output(Out, "PatternX = BasePatternX;\n");
+   }
   
   if (ROPCODE_SRCCOPY == RopInfo->RopCode &&
       0 != (Flags & FLAG_TRIVIALXLATE) && Bpp == SourceBpp)
@@ -744,7 +749,7 @@
 #endif
       if (RopInfo->UsesPattern)
         {
-          Output(Out, "ULONG PatternX, PatternY = 0;\n");
+          Output(Out, "ULONG PatternX =0, PatternY = 0, BasePatternX = 0;\n");
         }
       First = 1;
       if (RopInfo->UsesSource)