}\r
\r
void\r
-modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) {\r
+modexClearRegion(page_t *page, int x, int y, int w, int h, byte color)\r
+{\r
word pageOff = (word) page->data;\r
- word xoff=x/4; /* xoffset that begins each row */\r
- word scanCount=w/4; /* number of iterations per row (excluding right clip)*/\r
- word poffset = pageOff + y*(page->stridew) + xoff; /* starting offset */\r
- word nextRow = page->stridew-scanCount-1; /* loc of next row */\r
- byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; /* clips for rectangles not on 4s */\r
+ word xoff=(x>>2); // xoffset that begins each row\r
+ word poffset = pageOff + y*(page->stridew) + xoff; // starting offset\r
+ word scanCount=w>>2; // number of iterations per row (excluding right clip)\r
+ word nextRow = page->stridew-scanCount-1; // loc of next row\r
+ byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; // clips for rectangles not on 4s\r
byte rclip[] = {0x00, 0x01, 0x03, 0x07};\r
byte left = lclip[x&0x03];\r
byte right = rclip[(x+w)&0x03];\r
\r
- /* handle the case which requires an extra group */\r
+ // handle the case which requires an extra group\r
if((x & 0x03) && !((x+w) & 0x03)) {\r
- right=0x0f;\r
+ right=0x0f;\r
}\r
\r
//printf("modexClearRegion(x=%u, y=%u, w=%u, h=%u, left=%u, right=%u)\n", x, y, w, h, left, right);\r
word dx, word dy,\r
word width, word height)\r
{\r
- word doffset = (word)dest->data + dy*(dest->stridew) + dx/4;\r
- word soffset = (word)src->data + sy*(src->stridew) + sx/4;\r
- word scans = vga_state.vga_stride; //++++0000 the quick and dirty fix of the major issue with p16 video display wwww\r
+ word doffset = (word)dest->data + dy*(dest->stridew) + (dx>>2);\r
+ word soffset = (word)src->data + sy*(src->stridew) + (sx>>2);\r
+ word scans = vga_state.vga_stride+8; //++++0000 the quick and dirty fix of the major issue with p16 video display wwww\r
word nextSrcRow = src->stridew - scans - 1;\r
word nextDestRow = dest->stridew - scans - 1;\r
- byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; /* clips for rectangles not on 4s */\r
+ byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; // clips for rectangles not on 4s\r
byte rclip[] = {0x00, 0x01, 0x03, 0x07};\r
byte left = lclip[sx&0x03];\r
byte right = rclip[(sx+width)&0x03];\r
\r
- /* handle the case which requires an extra group */\r
+ // handle the case which requires an extra group\r
if((sx & 0x03) && !((sx+width) & 0x03)) {\r
right=0x0f;\r
}\r