{
//right movement
case 3:
- if(pip[pip[0].pan->pn].tx >= -1 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw < pip[pip[0].pan->pn].page->tilesw+1)
+ if(pip[pip[0].pan->pn].tx >= 0 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw < pip[pip[0].pan->pn].page->tilesw)
{
if(player[pn].q<=player[pn].spt)
{
//left movement
case 1:
- if(pip[pip[0].pan->pn].tx > -1 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tilesw <= pip[pip[0].pan->pn].page->tilesw+1)
+ if(pip[pip[0].pan->pn].tx > 0 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw <= pip[pip[0].pan->pn].page->tilesw)
{
if(player[pn].q<=player[pn].spt)
{
//down movement
case 4:
- if(pip[pip[0].pan->pn].ty >= -1 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->tilesh < pip[pip[0].pan->pn].page->tilesh+1)
+ if(pip[pip[0].pan->pn].ty >= 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th < pip[pip[0].pan->pn].page->tilesh)
{
if(player[pn].q<=player[pn].spt)
{
//up movement
case 0:
- if(pip[pip[0].pan->pn].ty > -1 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->tilesh <= pip[pip[0].pan->pn].page->tilesh+1)
+ if(pip[pip[0].pan->pn].ty > 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th <= pip[pip[0].pan->pn].page->tilesh)
{
if(player[pn].q<=player[pn].spt)
{
modexPalBlack();\r
\r
IN_Startup();\r
- IN_Default(0,&player,ctrl_Joystick);\r
+ IN_Default(0,&player,ctrl_Keyboard1);\r
+ IN_initplayer(&player, 0);\r
\r
textInit();\r
VGAmodeX(bakapee, 1, &gvar);\r
\r
/* set up the page, but with 16 pixels on all borders in offscreen mem */\r
modexHiganbanaPageSetup(&gvar.video);\r
- for(i=0;i<gvar.video.num_of_pages-2;i++)\r
+ for(i=0;i<gvar.video.num_of_pages;i++)\r
{\r
mv[i].page = &gvar.video.page[i];\r
mv[i].video = &gvar.video;\r
mv[i].pan = &pan;\r
+ mv[i].tx = 0;\r
+ mv[i].ty = 0;\r
}\r
// gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
// gvar.video.page[1] = modexNextPage(&gvar.video.page[0]);\r
/* fade in */\r
modexFadeOn(1, pal2);\r
\r
- i=0,k=0,j=0,pan.pn=1;\r
+ i=0,k=0,j=0,pan.pn=0;\r
startclk = *clockw;\r
while(!IN_KeyDown(sc_Escape))\r
{\r
IN_ReadControl(0,&player);\r
- if(i<5){\r
+ panpagemanual(mv, player, 0);\r
+\r
+ /*if(i<5){\r
switch (k)\r
{\r
case 0:\r
pee:\r
- /* go right */\r
+ // go right\r
gvar.video.page[pan.pn].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
- /* go left */\r
+ // go left\r
gvar.video.page[pan.pn].dx--;\r
if(j>=32){ k++; j=0; }else j++;\r
break;\r
case 2:\r
- /* go up */\r
+ // go up\r
gvar.video.page[pan.pn].dy++;\r
if(j>=32){ k++; j=0; }else j++;\r
break;\r
case 3:\r
- /* go down */\r
+ // go down\r
gvar.video.page[pan.pn].dy--;\r
if(j>=32){ k=0; j=0; i++; }else j++;\r
break;\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
+ 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[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 128);\r
modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42);\r
modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128);\r
}\r
- panpagemanual(mv, player, 0);\r
- }\r
+ //}\r
if(IN_KeyDown(2)) pan.pn=0;\r
if(IN_KeyDown(3)) pan.pn=1;\r
//if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[0].sw-64, gvar.video.page[0].sh-16, 45);\r
printf(" size=%ld", gvar.video.page[i].pagesize);\r
printf("\n");\r
}\r
+ printf("tx=%d ", mv[pan.pn].tx); printf("ty=%d ", mv[pan.pn].ty); printf("player.d=%d\n", player[0].d);\r
IN_Shutdown();\r
modexPalBlack();\r
modexFadeOn(1, pal);\r