// render box bounds. y does not need modification, but x and width must be multiple of 4\r
if(!video->rss)\r
{\r
- if(!video->bgps)\r
- {\r
- if (x >= enti->overdraww) rx = (x - enti->overdraww) & (~3);\r
- else rx = -(video->page[0].dx);\r
- if (y >= enti->overdrawh) ry = (y - enti->overdrawh);\r
- else ry = -(video->page[0].dy);\r
- h = enti->spri->sprite_vrl_cont->vrl_header->height + enti->overdrawh + y - ry;\r
- w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (enti->overdraww*2) + 3 - rx) & (~3) - enti->overdraww;//round up\r
- if ((rx+w) > video->page[0].width) w = video->page[0].width-rx;\r
- if ((ry+h) > video->page[0].height) h = video->page[0].height-ry;\r
-\r
+ if (x >= enti->overdraww) rx = (x - enti->overdraww) & (~3);\r
+ else rx = -(video->page[0].dx);\r
+ if (y >= enti->overdrawh) ry = (y - enti->overdrawh);\r
+ else ry = -(video->page[0].dy);\r
+ h = enti->spri->sprite_vrl_cont->vrl_header->height + enti->overdrawh + y - ry;\r
+ w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (enti->overdraww*2) + 3 - rx) & (~3) - enti->overdraww;//round up\r
+ if ((rx+w) > video->page[0].width) w = video->page[0].width-rx;\r
+ if ((ry+h) > video->page[0].height) h = video->page[0].height-ry;\r
+\r
+ if(!video->bgps){\r
// block copy pattern to where we will draw the sprite\r
vga_setup_wm1_block_copy();\r
o2 = video->ofs.offscreen_ofs;\r
\r
// must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally\r
vga_restore_rm0wm0();\r
-\r
- // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0)\r
- vga_state.vga_draw_stride = w >> 2;\r
- vga_state.vga_graphics_ram = omemptr + video->ofs.offscreen_ofs;\r
- }else{\r
- w=h=i=o=o2=0;\r
- modexCopyPageRegion(&video->page[2], &video->page[0], enti->x, enti->y, 0, 0, 24, 32);\r
}\r
+ // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0)\r
+ vga_state.vga_draw_stride = w >> 2;\r
+ vga_state.vga_graphics_ram = omemptr + video->ofs.offscreen_ofs;\r
}else{ rx=ry=w=h=0; vga_state.vga_graphics_ram = (VGA_RAM_PTR)video->page[0].data; }\r
vga_state.vga_draw_stride_limit = (video->page[0].width + 3 - x) >> 2;//round up\r
\r
#endif\r
if(!video->rss)\r
{\r
- if(!video->bgps)\r
- {\r
- // restore ptr\r
- vga_state.vga_graphics_ram = omemptr;\r
+ // restore ptr\r
+ vga_state.vga_graphics_ram = omemptr;\r
\r
+ if(!video->bgps){\r
// block copy to visible RAM from offscreen\r
vga_setup_wm1_block_copy();\r
o = video->ofs.offscreen_ofs; // source offscreen\r
for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += video->page[0].stridew) vga_wm1_mem_block_copy(o2,o,w >> 2);\r
// must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally\r
vga_restore_rm0wm0();\r
- }else{\r
- //modexCopyPageRegion(&video->page[0], &video->page[2], 0, 0, enti->x, enti->y, 24, 32);\r
}\r
}\r
// restore stride\r