\r
boolean anim=1,noanim=0,zerostoppause=1;\r
\r
- gvar.video.panp=0;\r
-\r
bakapee1=malloc(64);\r
bakapee2=malloc(1024);\r
\r
/* setup camera and screen~ */\r
modexHiganbanaPageSetup(&gvar.video);\r
ZC_MVSetup(&mv, &map, &gvar);\r
- ZC_ShowMV(&mv, gvar.video.panp, 0);\r
+ ZC_ShowMV(&mv, gvar.video.p, 0);\r
\r
// VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw);\r
- VL_PatternDraw(&gvar.video, 0/*gvar.video.panp*/, 0, 1);\r
+ VL_PatternDraw(&gvar.video, 0/*gvar.video.p*/, 0, 1);\r
TESTBG34\r
DRAWCORNERBOXES\r
\r
if(IN_KeyDown(sc_R)){\r
gvar.video.page[0].dx=gvar.video.page[0].dy=gvar.video.page[1].dx=gvar.video.page[1].dy=16;\r
mv[0].tx = mv[0].ty = mv[1].tx = mv[1].ty = INITTNUM;\r
- VL_ShowPage(&gvar.video.page[gvar.video.panp], 1, 0);\r
+ VL_ShowPage(&gvar.video.page[gvar.video.p], 1, 0);\r
player[0].enti.q = 1; player[0].enti.d = 2;\r
x=y=0;\r
xdir=ydir=1;\r
#include "src/lib/16_in.h"\r
#include "src/lib/testpatt.h"\r
\r
-//VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 1);\r
-//VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0);\r
+//VL_ShowPage(&gvar.video.page[gvar.video.p], 0, 1);\r
+//VL_ShowPage(&gvar.video.page[gvar.video.p], 0, 0);\r
\r
#define FUNCTIONKEYFUNCTIONS \\r
if(IN_KeyDown(88)){ panswitch=!panswitch; IN_UserInput(1,1); } \\r
\r
#define FUNCTIONKEYFUNCTIONS0EXE \\r
if(IN_KeyDown(sc_F4)){ turboXT(12); IN_UserInput(1,1); } \\r
- if(IN_KeyDown(87/*sc_F11*/)){ pageflipflop=!pageflipflop; IN_UserInput(1,1); } \\r
+ if(IN_KeyDown(87/*sc_F11*/)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1,1); } \\r
if(IN_KeyDown(68/*sc_F10*/)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1,1); } \\r
if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap; IN_UserInput(1,1); } \\r
if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&mv, 0, 1); IN_UserInput(1,1); } \\r
if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&mv, 0, 0); IN_UserInput(1,1); } \\r
- if(IN_KeyDown(sc_F5)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1,1); } \\r
if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1,1); } \\r
if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1,1); }\r
\r
ZC_panPageManual(&mv, &player, 0);\r
\r
#define FUNCTIONKEYDRAWJUNK \\r
- if(IN_KeyDown(1+1)){ gvar.video.panp=0; ZC_ShowMV(&mv, 0, 0); } \\r
- if(IN_KeyDown(2+1)){ gvar.video.panp=1; ZC_ShowMV(&mv, 0, 0); } \\r
- if(IN_KeyDown(3+1)){ gvar.video.panp=2; ZC_ShowMV(&mv, 0, 1); } \\r
- if(IN_KeyDown(4+1)){ gvar.video.panp=3; ZC_ShowMV(&mv, 0, 1); } \\r
+ if(IN_KeyDown(1+1)){ gvar.video.p=0; ZC_ShowMV(&mv, 0, 0); } \\r
+ if(IN_KeyDown(2+1)){ gvar.video.p=1; ZC_ShowMV(&mv, 0, 0); } \\r
+ if(IN_KeyDown(3+1)){ gvar.video.p=2; ZC_ShowMV(&mv, 0, 1); } \\r
+ if(IN_KeyDown(4+1)){ gvar.video.p=3; ZC_ShowMV(&mv, 0, 1); } \\r
FUNCTIONKEYDRAWJUNKNOMV\r
\r
#define FUNCTIONKEYDRAWJUNKNOMV \\r
//end of doslib origi vars\r
boolean __near rss; //render sprite switch\r
sword __near sprifilei; //player file's i\r
- boolean __near p; //render page number //BLEH\r
+ nibble __near p; //render page number //BLEH\r
boolean __near r; //page flip, showpage, or render if true\r
word pr[MAXPAGE][4]; //render sections of pages (this is supposed to be set up to draw sections of the screen if updated)\r
\r
nibble sfip; //shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible.\r
- nibble panp; //pan_t replacement\r
word vh; //video combined height\r
//0000word startclk; float clk, tickclk; //timer\r
//newer vars\r
//// (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), TILEWH*4, TILEWH*4); video->num_of_pages++;\r
//// (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].sw, 208); video->num_of_pages++;\r
(video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, 96); video->num_of_pages++;\r
- (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].width, video->page[2].height); video->num_of_pages++;\r
+ (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].width, 96); video->num_of_pages++;\r
modexCalcVmemRemain(video);\r
video->p=0;\r
video->r=1;\r
pip[0].page = &gv->video.page[0];\r
pip[0].map = map;\r
pip[0].video = &gv->video;\r
- pip[0].panp = &gv->video.panp;\r
+ pip[0].p = &gv->video.p;\r
ZC_MVInit(pip, 1, 1);\r
\r
for(i=ZC_MVI;i<gv->video.num_of_pages;i++)\r
pip[i].page = &gv->video.page[i];\r
pip[i].map = pip[0].map;\r
pip[i].video = pip[0].video;\r
- pip[i].panp = pip[0].panp;\r
+ pip[i].p = pip[0].p;\r
// if(i>ZC_MVI) {\r
pip[i].tx = 1;\r
pip[i].ty = 1;\r
byte crtcOffset;\r
\r
/* calculate offset */\r
- offset = (word) moo[moo[0].video->panp].page->data;\r
+ offset = (word) moo[moo[0].video->p].page->data;\r
offset += moo[0].page->dy * (moo[0].page->width >> 2 );\r
offset += moo[0].page->dx >> 2;\r
\r
switch(sr)\r
{\r
case 1:\r
- crtcOffset = moo[0].page->sw >> 3;\r
+ crtcOffset = moo[moo[0].video->p].page->sw >> 3;\r
break;\r
default:\r
case 0:\r
#endif\r
if(id==0)\r
mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, DRAWCOLNUM);\r
- else\r
- if(!pageflipflop && !pageploop)\r
- modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));\r
+// else\r
+// if(!pageflipflop && !pageploop)\r
+// modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));\r
mv[0].video->r=1;\r
}\r
\r
#endif\r
if(id==0)\r
mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, DRAWCOLNUM);\r
- else\r
- if(!pageflipflop && !pageploop)\r
- modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));\r
+// else\r
+// if(!pageflipflop && !pageploop)\r
+// modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));\r
mv[0].video->r=1;\r
}\r
\r
#endif\r
if(id==0)\r
mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, DRAWCOLNUM);\r
- else\r
- if(!pageflipflop && !pageploop)\r
- modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);\r
+// else\r
+// if(!pageflipflop && !pageploop)\r
+// modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);\r
mv[0].video->r=1;\r
}\r
\r
#endif\r
if(id==0)\r
mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, DRAWCOLNUM);\r
- else\r
- if(!pageflipflop && !pageploop)\r
- modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);\r
+// else\r
+// if(!pageflipflop && !pageploop)\r
+// modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);\r
mv[0].video->r=1;\r
}\r
\r
mapDrawWRow(&mv[0], tx-1, ty, py);\r
i+=mv->map->width - tx;\r
}\r
- if(!pageploop)\r
- modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);\r
-// {\r
-// unsigned int k,j,o;\r
-// /* fill screen with a distinctive pattern */\r
-// for (k=0;k < vga_state.vga_width;k++) {\r
-// o = k >> 2;\r
-// vga_write_sequencer(0x02/*map mask*/,1 << (k&3));\r
-// for (j=0;j < (mv[0].page->height)+(mv[1].page->height)+(mv[2].page->height)+(mv[3].page->height);j++,o += vga_state.vga_stride)\r
-// vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15!\r
-// }\r
-// }\r
+// if(!pageploop) modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);\r
modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 0, 0, 24, 32);\r
}\r
\r
//setkb(0);\r
}*/\r
\r
-boolean pageflipflop = 1;\r
-boolean pageploop = 1;\r
+//boolean pageflipflop = 1;\r
+//boolean pageploop = 1;\r
boolean pagenorendermap = 0;\r
boolean pagedelayrendermap = 0;\r
\r
break;\r
}\r
//render!!\r
- if(pageflipflop){\r
+// if(pageflipflop){\r
if(gv->video.r ){//r=1\r
//vga_setup_wm1_block_copy();\r
//_fmemcpy((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize);\r
//vga_restore_rm0wm0();\r
- if(!pageploop) modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height);\r
- VL_ShowPage(&(gv->video.page[gv->video.panp]), gv->kurokku.fpscap, 0);//VL_ShowPage(&(gv->video.page[gv->video.p]), gv->kurokku.fpscap, 0);\r
- if(!pageploop) gv->video.p=!gv->video.p;\r
+// if(!pageploop) modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height);\r
+ VL_ShowPage(&(gv->video.page[gv->video.p]), gv->kurokku.fpscap, 0);//VL_ShowPage(&(gv->video.page[gv->video.p]), gv->kurokku.fpscap, 0);\r
+// if(!pageploop) gv->video.p=!gv->video.p;\r
gv->video.r =!gv->video.r ;\r
//0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;\r
- }\r
+// }\r
}\r
}\r
\r
break;\r
}\r
\r
- if(!pageflipflop)\r
- modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 36);\r
- else{\r
- //copy old bg to page0\r
- //modexCopyPageRegion(pip[3].page, pip[0].page, bx, by, 0, 0, 20, 36);\r
- //update buffer\r
- //modexCopyPageRegion(pip[0].page, pip[3].page, 0, 0, x, y, 20, 36);\r
- }\r
+// if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 36);\r
+// else{\r
+// //copy old bg to page0\r
+// //modexCopyPageRegion(pip[3].page, pip[0].page, bx, by, 0, 0, 20, 36);\r
+// //update buffer\r
+// //modexCopyPageRegion(pip[0].page, pip[3].page, 0, 0, x, y, 20, 36);\r
+// }\r
//modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height);\r
//modexCopyPageRegion(pip[3].page, pip[!(pip->video->p)].page, x-4, y-4, 0, 128, 28, 36);\r
/*modexCopyPageRegion(pip[pip->video->p].page,\r
word dxThresh; //Threshold for physical tile switch\r
word dyThresh; //Threshold for physical tile switch\r
video_t *video; //pointer to game variables of the video\r
- nibble *panp; // pointer to video's pan page num\r
+ nibble __near *p; // pointer to video's render page num\r
int dx, dy; // draw row and col var\r
//newer vars!\r
int delta, d;\r
\r
//if(player[0].enti.hp==0) printf("%d wwww\n", player[0].enti.y+8);\r
//else printf("\nplayer[0].enti.y: %d\n", player[0].enti.y);\r
-// printf("palette offset: %d\n", paloffset/3);\r
-//++++ printf("Total used: %zu\n", oldfreemem-GetFreeSize());\r
-//++++ printf("Total free: %zu\n", GetFreeSize());\r
+//printf("gvar.video.p=%u ", gvar.video.p);\r
//not used now printf("temporary player sprite 0: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45556867\n");\r
//not used now printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n");\r
//printf("mv[%u].tx: %d", gvar.video.panp, mv[gvar.video.panp].tx); printf(" mv[%u].ty: %d ", gvar.video.panp, mv[gvar.video.panp].ty);\r
//printf("gvar.kurokku: "); printf("%.0f ", clock()); printf("tiku=%lu ", gvar.kurokku.tiku); printf("t=%.0f ", gvar.kurokku.t); printf("ticktock()=%f ", ticktock(&gvar)); printf("%.0f fps", (double)gvar.kurokku.tiku/ticktock(&gvar));\r
//printf("map.width=%d map.height=%d map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);\r
+//printf("pageflipflop=%u", pageflipflop);\r
//printf("&global_temp_status_text = %Fp\n", &global_temp_status_text);\r
//printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny);\r
-//printf("Virtual Screen: %dx", gvar.video.page[0].width); printf("%d ", gvar.video.page[0].height); printf("Tile: %dx", gvar.video.page[0].tilesw); printf("%d", gvar.video.page[0].tilesh); printf("=((Virtual Screen)/16)\n");\r
-//printf(" Screen: %dx", gvar.video.page[0].sw); printf("%d ", gvar.video.page[0].sh); printf("Tile: %dx", gvar.video.page[0].tw); printf("%d", gvar.video.page[0].th); printf("=((Screen)/16)\n");\r
-//print_anim_ids(player[0].ent->spri);\r
//printf(" aniframe=%u", player[0].enti.persist_aniframe);\r
#define SCROLLEXITMESG printf("txy: %dx%d\n", mv[0].tx, mv[0].ty);\\r
printf("\n");\\r
printf("\n\n");\\r
VL_PrintmodexmemInfo(&gvar.video);\\r
\\r
- printf("gvar.video.p=%u ", gvar.video.p); printf("gvar.video.r=%u ", gvar.video.r);\\r
- printf("pageflipflop=%u\n", pageflipflop);\\r
- printf("\n");\r
+ printf("gvar.video.r=%u ", gvar.video.r);\\r
+printf("\n\n");\r
\r
-extern boolean pageflipflop, pageploop, pagenorendermap, pagedelayrendermap;\r
+//pageflipflop, pageploop,\r
+extern boolean pagenorendermap, pagedelayrendermap;\r
\r
extern char global_temp_status_text[512];\r
\r
\r
Startup16(&gvar);\r
\r
- gvar.video.panp=0;\r
-\r
/* create the map */\r
// fprintf(stderr, "testing map load~ ");\r
loadmap("data/test.map", &map);\r
modexDrawSpriteRegion(&gvar.video.page[0], player[0].enti.x, player[0].enti.y-TILEWH, 16, 64, 16, 32, PCXBMPPTR);\r
#endif\r
\r
- if(!pageflipflop) VL_ShowPage(mv[1].page, 0, 0);//modexShowPage(mv[1].page);\r
- else ZC_ShowMV(&mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
+ //if(!pageflipflop)\r
+ VL_ShowPage(mv[1].page, 0, 0);//modexShowPage(mv[1].page);\r
+ //else ZC_ShowMV(&mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
\r
//modexDrawBmp(&gvar.video.page[0], 16, 16, PCXBMPPTR);\r
/* buffer pages */\r
//====byte *pal, *pal2;\r
\r
//====word colo=LGQ;\r
- gvar.video.panp=0;\r
\r
// DOSLIB: check our environment\r
/*probe_dos();\r
{\r
IN_ReadControl(0,&player);\r
ZC_panPageManual(&mv, &player, 0);\r
- //[gvar.video.panp]\r
+ //[gvar.video.p]\r
//ZC_MVSync(&mv);\r
\r
/*if(i<5){\r
case 0:\r
pee:\r
// go right\r
- gvar.video.page[gvar.video.panp].dx++;\r
+ gvar.video.page[gvar.video.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
// go left\r
- gvar.video.page[gvar.video.panp].dx--;\r
+ gvar.video.page[gvar.video.p].dx--;\r
if(j>=32){ k++; j=0; }else j++;\r
break;\r
case 2:\r
// go up\r
- gvar.video.page[gvar.video.panp].dy++;\r
+ gvar.video.page[gvar.video.p].dy++;\r
if(j>=32){ k++; j=0; }else j++;\r
break;\r
case 3:\r
// go down\r
- gvar.video.page[gvar.video.panp].dy--;\r
+ gvar.video.page[gvar.video.p].dy--;\r
if(j>=32){ k=0; j=0; i++; }else j++;\r
break;\r
default:\r
}\r
// if(i>PAL_SIZE) i=0;\r
}//9*/\r
- if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.panp]); IN_UserInput(1,1); }//p\r
- //VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0);\r
+ if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.p]); IN_UserInput(1,1); }//p\r
+ //VL_ShowPage(&gvar.video.page[gvar.video.p], 0, 0);\r
ZC_ShowMV(&mv, 0, 0);\r
}\r
\r
printf("Project 16 test.exe. This is just a test file!\n");\r
printf("version %s\n", VERSION);\r
VL_PrintmodexmemInfo(&gvar.video);\r
- printf("tx=%d ", mv[gvar.video.panp].tx); printf("ty=%d ", mv[gvar.video.panp].ty); printf("player.d=%d\n", player[0].enti.d);\r
+ printf("tx=%d ", mv[gvar.video.p].tx); printf("ty=%d ", mv[gvar.video.p].ty); printf("player.d=%d\n", player[0].enti.d);\r
//IN_Shutdown();\r
//====modexPalBlack();\r
//====modexFadeOn(1, pal);\r
\r
Startup16(&gvar);\r
\r
- gvar.video.panp=0;\r
-\r
bakapee1=malloc(64);\r
bakapee1p=malloc(64);\r
\r