\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
cmp r10, #1\r
biclt r1, r1, #0xfc00\r
biceq r1, r1, #0xfe00\r
- bicgt r1, r1, #0xff00 @ r1=ymask=(height<<8)|0xff; ...; // Y Mask in pixels\r
+ cmp r10, #2\r
+ moveq r1, #0x0007\r
+ movgt r1, #0x00ff @ r1=ymask=(height<<8)|0xff; ...; // Y Mask in pixels\r
\r
add r10, r10, #5\r
cmp r10, #7\r