//4 this dose the screen
{
unsigned int i,j,o;
-
/* fill screen with a distinctive pattern */
for (i=0;i < gvar.video.page[0].width;i++) {
o = i >> 2;
}
}
- while (getch() != 13);
+ //while (getch() != 13);
/* make distinctive pattern offscreen, render sprite, copy onscreen.
* this time, we render the distinctive pattern to another offscreen location and just copy.
h = vrl_header->height + overdraw + y - ry;
w = (x + vrl_header->width + (overdraw*2) + 3/*round up*/ - rx) & (~3);
if ((rx+w) > gvar.video.page[0].width) w = gvar.video.page[0].width-rx;
- if ((ry+h) > VMEMHEIGHT) h = (VMEMHEIGHT)-ry;
+ if ((ry+h) > gvar.video.page[0].height) h = (gvar.video.page[0].height)-ry;
/* block copy pattern to where we will draw the sprite */
vga_setup_wm1_block_copy();
/* step */
x += xdir;
y += ydir;
- if (x >= (gvar.video.page[0].width - 1) || x == 0)
+ if (x >= (gvar.video.page[0].width - 1) || x == -(gvar.video.page[0].dx))
xdir = -xdir;
- if (y >= (VMEMHEIGHT - 1) || y == 0)
+ if (y >= (gvar.video.page[0].height - 1) || y == -(gvar.video.page[0].dy))
ydir = -ydir;
}
}