//int ch=0x0;\r
\r
#define SETUPPAGEBAKAPI \\r
-gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video); \\r
+gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/); \\r
gvar.video.page[1] = modexNextPage(&gvar.video.page[0]);\r
\r
\r
int i;\r
word panq=1, pand=0;\r
boolean panswitch=0;\r
- word showpage=0;\r
\r
ggvv=&gvar;\r
\r
//getch(); //____\r
//VL_SetLineWidth (40, &gvar);\r
\r
- VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
+ VL_ShowPage(&gvar.video.page[0], 1, 0);\r
{\r
word w;\r
for(w=0;w<64000;w++)\r
{\r
- ding(&gvar.video.page[showpage], &bakapee, 2);\r
+ ding(&gvar.video.page[0], &bakapee, 2);\r
ding(&gvar.video.page[1], &bakapee, 2);\r
}\r
#ifdef BAKAFIZZUNSIGNED\r
- baka_FizzleFade (gvar.video.ofs.bufferofs, gvar.video.ofs.displayofs, vga_state.vga_width, vga_state.vga_height, 70, true, &gvar);\r
+ baka_FizzleFade (gvar.video.ofs.bufferofs, gvar.video.ofs.displayofs, gvar.video.page[0].width, gvar.video.page[0].height, 70, true, &gvar);\r
#else\r
baka_FizzleFade (&gvar.video.page[1], &gvar.video.page[0], vga_state.vga_width, vga_state.vga_height, 70, true, &gvar);\r
#endif\r
- //ding(&gvar.video.page[showpage], &bakapee, 9);\r
-// modexprint(&gvar.video.page[0], gvar.video.page[0].sw/2, gvar.video.page[0].sh/2, 1, 0, 47, 0, 1, "bakapi ok");\r
}\r
while(!kbhit()){}\r
\r
printf("on.");\r
break;\r
}\r
- printf(" Showing page %u", showpage);\r
printf("\n");\r
printf("Incrementation of color happens at every %uth plot.\n", bakapee.bonk);\r
printf("Enter 1, 2, 3, 4, 5, 6, 8, or 9 to run a screensaver, or enter 0 to quit.\n");\r
}\r
key=0;\r
break;\r
- case 'q':\r
- switch (showpage)\r
- {\r
- case 0:\r
- showpage=1;\r
- break;\r
- case 1:\r
- showpage=0;\r
- break;\r
- }\r
- key=0;\r
- break;\r
case '8':\r
c+=8;\r
case '1':\r
case '9':\r
key = c - '0';\r
VGAmodeX(vgamodex_mode, 0, &gvar);\r
- VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
SETUPPAGEBAKAPI\r
// this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.\r
// we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.\r
- VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
- break;\r
+ VL_ShowPage(&gvar.video.page[0], 0, 0);\r
+ break;\r
case '-':\r
if(bakapee.bonk>0)\r
bakapee.bonk-=100;\r
break;\r
default:\r
key=0;\r
+ clrscr(); //added to clear screen wwww\r
break;\r
}\r
- clrscr(); //added to clear screen wwww\r
}\r
}\r
+ clrscr(); //added to clear screen wwww\r
#if 0\r
//#else // !defined(BOINK)\r
// FIXME: Does not compile. Do you want to remove this?\r
\r
////////////////////////////////////////////////////////////////////////////\r
#ifdef NOVID\r
-//void VL_Startup (global_game_variables_t *gvar){}\r
+void VL_Startup (global_game_variables_t *gvar){}\r
void VL_Shutdown (global_game_variables_t *gvar){}\r
void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv)\r
{\r
\r
//===========================================================================\r
\r
-#define NOMAPS\r
+//#define NOMAPS\r
#define NOGRAPHICS\r
#define NOAUDIO\r
\r
#define __DEBUG_InputMgr__\r
#define __DEBUG_MAP__\r
//#define __DEBUG_2__\r
-#define __DEBUG_CA__\r
+//#define __DEBUG_CA__\r
//#define __DEBUG_PM__\r
//#define __DEBUG_MM__\r
//#define __DEBUG_RF__\r
switch(vq)\r
{\r
case 1:\r
- case 8: //320x240 no buffer\r
+// case 8: //320x240 no buffer\r
//CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);\r
/*for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_320x240regs[i]);\r
case 2: // TODO: 160x120 according to ModeX_160x120regs\r
return;\r
case 3: // TODO: 160x120 according to ModeX_320x200regs\r
- gv->video.page[0].sw = vga_state.vga_width = 300; // VGA lib currently does not update this\r
- gv->video.page[0].sh = vga_state.vga_height = 200; // VGA lib currently does not update this\r
- // virtual width and height. match screen, at first //\r
- gv->video.page[0].height = gv->video.page[0].sh;\r
- gv->video.page[0].width = gv->video.page[0].sw;\r
-\r
- cm.offset = (vga_state.vga_width / (4 * 2)); // 320 wide (40 x 4 pixel groups x 2)\r
- //return;\r
- break;\r
+ return;\r
case 4: // TODO: 160x120 according to ModeX_192x144regs\r
return;\r
case 5: // TODO: 160x120 according to ModeX_256x192regs\r
// VL_SetLineWidth (cm.offset, gv);\r
gv->video.ofs.displayofs = 0;\r
gv->video.ofs.bufferofs = gv->video.page[0].width*gv->video.page[0].height;//gvar->video.page[0].pagesize;\r
- gv->video.curr_mode=vq;\r
+// gv->video.curr_mode=vq;\r
gv->video.VL_Started=1;\r
}\r
\r
VL_vgaSetMode(TEXT_MODE);\r
}\r
\r
-#if 0\r
page_t\r
modexDefaultPage(page_t *p)\r
{\r
page.pi=page.width*4;\r
page.id = 0;\r
\r
- if(ggvv->video.curr_mode = 1)\r
- {\r
- page.width += TILEWHD;\r
- page.height += TILEWHD;\r
- }\r
-\r
return page;\r
}\r
-#endif\r
+#if 0\r
page_t\r
modexDefaultPage(page_t *p, video_t *v)\r
{\r
\r
return page;\r
}\r
-\r
+#endif\r
/* returns the next page in contiguous memory\r
* the next page will be the same size as p, by default\r
*/\r
{\r
video->vmem_remain=65535U;\r
video->num_of_pages=0;\r
- (video->page[0]) = modexDefaultPage(&(video->page[0]), video); video->num_of_pages++; //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
+ (video->page[0]) = modexDefaultPage(&(video->page[0])/*, video*/); video->num_of_pages++; //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
(video->page[1]) = modexNextPage(&(video->page[0])); video->num_of_pages++;\r
//0000 (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), (video->page[0]).width, TILEWH*4); video->num_of_pages++;\r
//0000 (video->page[3]) = (video->page[2]); video->num_of_pages++;\r
VL_DePlaneVGA (),\r
VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv),\r
modexEnter(sword vq, boolean cmem, global_game_variables_t *gv);\r
-void VL_vgaSetMode(byte mode);\r
+//void VL_vgaSetMode(byte mode);\r
byte VL_vgaGetMode(void);\r
extern void TL_VidInit(global_game_variables_t *gvar);\r
void modexLeave(void);\r
void modexsetBaseXMode();\r
-page_t modexDefaultPage(page_t *p, video_t *v);\r
+page_t modexDefaultPage(page_t *p/*, video_t *v*/);\r
page_t modexNextPage(page_t *p);\r
page_t modexNextPageFlexibleSize(page_t *p, word x, word y);\r
void modexCalcVmemRemain(video_t *video);\r
pagedelta = dest-source;\r
rndval = 1; esorig = 0; q = 16;\r
x = y = 0;\r
- pixperframe = 64000/(dword)frames;\r
+ pixperframe = /*64000*/76800/(dword)frames;\r
\r
// IN_StartAck ();\r
\r
frame=0;\r
do // while (1)\r
{\r
-sprintf(global_temp_status_text, "%u", frame);\r
-modexprint(&(gvar->video.page[0]), PIXPOSX, PIXPOSY, 1, 0, 47, 0, 1, global_temp_status_text);\r
if (abortable && kbhit())//IN_CheckAck () )\r
return true;\r
\r
if ((x>width || y>height) && (x<width*2 && y<height*2))\r
continue;\r
//drawofs = source+(gvar->video.ofs.ylookup[y]) + (x>>2);\r
+ //drawofs = source+((y+1)*gvar->video.page[0].stridew) + (x>>2);\r
drawofs = source+(y*gvar->video.page[0].stridew) + (x>>2);\r
/*\r
sprintf(global_temp_status_text, "draw - %Fp", drawofs);\r
//\r
// copy one pixel\r
//\r
-//*\r
mask = x&3;\r
VGAREADMAP(mask);\r
mask = maskb[mask];\r
VGAMAPMASK(mask);\r
-//*/\r
-// modexputPixel(&(gvar->video.page[0]), x, y, rand());\r
-// VL_Plot (x, y, 15, &(gvar->video.ofs));\r
\r
__asm {\r
mov di,[drawofs]\r
\r
TL_VidInit(&gvar); VGAmodeX(1, 0, &gvar);\r
\r
- gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);\r
+ gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
modexpdump(&gvar.video.page[0]);\r
while(!kbhit()){ VL_modexPalScramble(&gvar.video.palette); }\r
\r
TL_VidInit(&gvar); VGAmodeX(1, 0, &gvar);\r
modexSavePalFile(bakapee, &gvar.video.palette);\r
- gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);// modexFadeOn(4, &gvar.video.palette);\r
+ gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);// modexFadeOn(4, &gvar.video.palette);\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
modexpdump(&gvar.video.page[0]);\r
while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r
\r
TL_VidInit(&gvar); VGAmodeX(1, 0, &gvar);\r
VL_LoadPalFile(bakapee, &gvar.video.palette, &gvar); //modexLoadPalFile(bakapee, &(gvar.video.palette));\r
- gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);// modexFadeOn(4, &gvar.video.palette);\r
+ gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);// modexFadeOn(4, &gvar.video.palette);\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
modexpdump(&gvar.video.page[0]);\r
while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r