page.tilesh=page.height/TILEWH;\r
page.tilemidposscreenx = page.tw/2;\r
page.tilemidposscreeny = (page.th/2)+1;\r
- page.pagesize = (sdiword)page.width*page.height;\r
+ page.pagesize = (sdiword)(page.width/4)*page.height;\r
page.id = 0;\r
\r
return page;\r
modexNextPage(page_t *p) {\r
page_t result;\r
\r
- result.data = p->data + (byte)(p->width/4)*p->height;\r
+ result.data = p->data + (p->pagesize);\r
result.dx = 0;\r
result.dy = 0;\r
result.width = p->width;\r
{\r
page_t result;\r
\r
- result.data = p->data + (byte)(p->width/4)*p->height; /* compute the offset */\r
+ result.data = p->data + (p->pagesize); /* compute the offset */\r
result.dx = 0;\r
result.dy = 0;\r
result.width = x;\r
result.tilesw=result.width/TILEWH;\r
result.tilesh=result.height/TILEWH;\r
result.id = p->id+1;\r
- result.pagesize = (sdiword)result.width*result.height;\r
+ result.pagesize = (sdiword)(result.width/4)*result.height;\r
\r
return result;\r
}\r
(video->page[0]) = modexDefaultPage(&(video->page[0])); video->num_of_pages++;\r
//video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
(video->page[1]) = modexNextPage(&(video->page[0])); video->num_of_pages++;\r
- (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, video->page[0].sh-40); video->num_of_pages++;\r
- (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), TILEWH, TILEWH); video->num_of_pages++;\r
+ //(video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, video->page[0].sh-40); video->num_of_pages++;\r
+ //(video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), TILEWH, TILEWH); video->num_of_pages++;\r
modexCalcVmemRemain(video);\r
video->p=0;\r
}\r
modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42);\r
modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128);\r
modexShowPage(&gvar.video.page[0]);\r
- modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height);\r
+ modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width+32, gvar.video.page[0].height);\r
\r
/* fade in */\r
modexFadeOn(1, pal2);\r
switch (k)\r
{\r
case 0:\r
+ pee:\r
/* go right */\r
gvar.video.page[p].dx++;\r
+ if(i==5){ if(j>=31){ i++; j=0; goto baka; }else j++; }else\r
if(j>=32){ k++; j=0; }else j++;\r
break;\r
case 1:\r
\r
break;\r
}}else{\r
+ if(i==5) goto pee;\r
+ baka:\r
+ i++;\r
modexClearRegion(&gvar.video.page[1], 0, gvar.video.page[0].height/2, gvar.video.page[0].width-32, 16, 45);\r
if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, gvar.video.page[0].height/2, gvar.video.page[0].width, 16, 45);\r
+ if(IN_KeyDown(4+1)){\r
+ modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128);\r
+ modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42);\r
+ modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128);\r
+ }\r
}\r
if(IN_KeyDown(2)) p=0;\r
if(IN_KeyDown(3)) p=1;\r
for(i=0; i<gvar.video.num_of_pages;i++)\r
{\r
printf(" [%u]=", i);\r
- printf("(%Fp)\n", (gvar.video.page[i].data));\r
+ printf("(%Fp)", (gvar.video.page[i].data));\r
+ printf(" size=%ld", gvar.video.page[i].pagesize);\r
+ printf("\n");\r
}\r
IN_Shutdown();\r
modexPalBlack();\r