scroll size improvement
[picodrive.git] / pico / draw.c
index 7b4dd99..2aa37f8 100644 (file)
@@ -394,8 +394,11 @@ static void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells,
 \r
   ts.xmask=(1<<shift[width])-1; // X Mask in tiles (0x1f-0x7f)\r
   ymask=(height<<8)|0xff;       // Y Mask in pixels\r
-  if(width == 1)   ymask&=0x1ff;\r
-  else if(width>1) ymask =0x0ff;\r
+  switch (width) {\r
+    case 1: ymask &= 0x1ff; break;\r
+    case 2: ymask =  0x007; break;\r
+    case 3: ymask =  0x0ff; break;\r
+  }\r
 \r
   // Find name table:\r
   if (plane_sh&1) ts.nametab=(pvid->reg[4]&0x07)<<12; // B\r