\r
global_game_variables_t gvar;\r
\r
-\r
void\r
DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite)\r
{\r
word plane;\r
word px, py;\r
word offset;\r
+ word i;\r
\r
// TODO Make this fast. It's SLOOOOOOW\r
for(plane=0; plane < 4; plane++) {\r
+ i=0;\r
modexSelectPlane(PLANE(plane+x));\r
for(px = plane; px < p->width; px+=4) {\r
offset=px;\r
for(py=0; py<p->height/2; py++) {\r
//SELECT_ALL_PLANES();\r
if(!sprite || p->plane[offset])\r
- page->data = (p->plane[offset]);\r
+ page->data = &(p->plane[offset][i++]);\r
offset+=p->width;\r
offset++;\r
}\r