#define LGQ 32\r
#define HGQ 55\r
\r
-static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+static word far* clockw= (word far*) 0x046C; // 18.2hz clock //\r
\r
void drawboxesmodex(page_t *pg)\r
{\r
void main(int argc, char *argv[])\r
{\r
static word paloffset=0;\r
- global_game_variables_t gvar;\r
-\r
-// map_view_t mv[4];\r
- map_t map;\r
+ static global_game_variables_t gvar;\r
\r
int i, j;\r
word startclk, endclk;\r
word k;\r
\r
+#ifndef DONOTPALCHECK\r
imgtestpal_t bmp1, bmp2;\r
-\r
-\r
bmp1.width=bmp2.width= 40;\r
bmp1.width=bmp2.height= 30;\r
+#endif\r
\r
//====word colo=LGQ;\r
\r
- // DOSLIB: check our environment\r
- /*probe_dos();\r
-\r
- // DOSLIB: what CPU are we using?\r
- // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
- // So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
- // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
- // the CPU to carry out tasks. --J.C.\r
- cpu_probe();\r
-\r
- // DOSLIB: check for VGA\r
- if (!probe_vga()) {\r
- printf("VGA probe failed\n");\r
- return;\r
- }\r
- // hardware must be VGA or higher!\r
- if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
- printf("This program requires VGA or higher graphics hardware\n");\r
- return;\r
- }\r
-\r
- if (_DEBUG_INIT() == 0) {\r
-#ifdef DEBUGSERIAL\r
- printf("WARNING: Failed to initialize DEBUG output\n");\r
-#endif\r
- }\r
- _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
- _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);*/\r
Startup16(&gvar);\r
\r
- /* save the palette */\r
+ // save the palette //\r
//====modexPalSave(pal);\r
//====modexFadeOff(1, pal);\r
//====modexPalBlack();\r
\r
- //IN_Startup();\r
IN_Default(0,&gvar.player[0],ctrl_Keyboard1, &gvar);\r
EN_initPlayer(&gvar.player[0], &gvar.video);\r
\r
- VGAmodeX(1, 1, &gvar);\r
- modexPalBlack();\r
+ VL_Startup(&gvar);//VGAmodeX(1, 1, &gvar);\r
+ modexPalBlack(); VL_PaletteSync(&gvar);\r
\r
- /* load our palette */\r
+ // load our palette //\r
VL_LoadPalFile("data/16.pal", &gvar.video.palette, &gvar);\r
+#ifndef DONOTPALCHECK\r
bmp1.offset=(paloffset/3);\r
- VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0, &gvar);\r
+// VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0, &gvar);\r
\r
//VL_LoadPalFilewithoffset("data/default.pal", &palette, paloffset);\r
modexLoadPalFile("data/16t.pal", &gvar.video.dpal);\r
+ //VLL_LoadPalFilewithoffset("data/16t.pal", &gvar.video.palette, paloffset, 8, &gvar);\r
bmp2.offset=(paloffset/3);\r
- VL_palette(&bmp2, &gvar.video.dpal, &paloffset, 0, 0, &gvar);\r
+// VL_palette(&bmp2, &gvar.video.dpal, &paloffset, 0, 0, &gvar);\r
//====modexLoadPalFile("data/default.pal", &pal2);\r
+#endif\r
+ VL_PaletteSync(&gvar);\r
\r
- /* overscan show */\r
+ // overscan show //\r
//modexPalOverscan(44+1);\r
\r
- /* set up the page, but with 16 pixels on all borders in offscreen mem */\r
+ // set up the page, but with 16 pixels on all borders in offscreen mem //\r
modexHiganbanaPageSetup(&gvar);\r
- ZC_MVSetup(&gvar.mv, &map, &gvar);\r
-\r
- /* fill the page with one color, but with a black border */\r
- /*modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 15);\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
- modexShowPage(&gvar.video.page[1]);\r
- modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15);\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
- modexShowPage(&gvar.video.page[0]);*/\r
+ ZC_MVSetup(&gvar.mv, &gvar.map, &gvar);\r
\r
+ // fill the page with one color, but with a black border //\r
drawboxesmodex(&gvar.video.page[0]);\r
copyboxesmodex(&gvar.video.page, 1);\r
modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 4);\r
modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 6);\r
\r
\r
- /* fade in */\r
+ // fade in //\r
//====modexFadeOn(1, pal2);\r
\r
i=0,k=0,j=0;\r
TAIL_PANKEYFUN;\r
if(gvar.in.inst->Keyboard[12]) modexClearRegion(&gvar.video.page[0], (gvar.video.page[0].width/2)-4, (gvar.video.page[0].height/2)-16, 24, 32, 15);\r
if(gvar.in.inst->Keyboard[13]) modexClearRegion(&gvar.video.page[1], (gvar.video.page[1].width/2)-4, (gvar.video.page[1].height/2)-16, 24, 32, 15);\r
-/*==== if(gvar.in.inst->Keyboard[7)){\r
+#if 0\r
+//==== if(gvar.in.inst->Keyboard[7)){\r
for(i=0;i<3;i++)\r
{\r
pal2[i] = rand()%64;\r
if(colo>HGQ) colo=LGQ;\r
}\r
// if(i>PAL_SIZE) i=0;\r
- }//9*/\r
+ }//9\r
+#endif\r
if(gvar.in.inst->Keyboard[25]){ modexpdump(gvar.video.sp, &gvar); IN_UserInput(1, &gvar); }//p\r
if(gvar.in.inst->Keyboard[sc_I]){ drawboxesmodex(&gvar.video.page[gvar.video.sp]); IN_UserInput(1, &gvar); }//i\r
if(gvar.in.inst->Keyboard[sc_O]){ copyboxesmodex(&gvar.video.page, !gvar.video.sp); IN_UserInput(1, &gvar); }//o\r
\r
endclk = *clockw;\r
\r
- /* fade back to text mode */\r
+ // fade back to text mode //\r
//====modexFadeOff(1, pal2);\r
//====modexPalBlack();\r
- VGAmodeX(0, 1, &gvar);\r
- Shutdown16(&gvar);\r
- printf("Project 16 vidtest.exe. This is just a test file!\n");\r
+ Shutdown16(&gvar);//VGAmodeX(0, 1, &gvar);\r
+ printf("Project 16 paltest.exe. This is just a test file!\n");\r
printf("version %s\n", VERSION);\r
VL_PrintmodexmemInfo(&gvar.video);\r
printf("tx=%d ", gvar.mv[gvar.video.sp].tx); printf("ty=%d ", gvar.mv[gvar.video.sp].ty); printf("gvar.player.d=%d\n", gvar.player[0].enti.d);\r
printf("\n====\n");\r
printf("0 paloffset= %d\n", paloffset/3);\r
printf("====\n\n");\r
- //IN_Shutdown();\r
//====modexPalBlack();\r
//====modexFadeOn(1, pal);\r
}\r
#define LGQ 32\r
#define HGQ 55\r
\r
-static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+static word far* clockw= (word far*) 0x046C; // 18.2hz clock //\r
\r
void drawboxesmodex(page_t *pg)\r
{\r
void main(int argc, char *argv[])\r
{\r
static global_game_variables_t gvar;\r
- map_t map;\r
\r
int i, j;\r
word startclk, endclk;\r
word k;\r
\r
+ //====word colo=LGQ;\r
+\r
Startup16(&gvar);\r
\r
- /* save the palette */\r
+ // save the palette //\r
//====modexPalSave(pal);\r
//====modexFadeOff(1, pal);\r
//====modexPalBlack();\r
\r
- //IN_Startup();\r
IN_Default(0,&gvar.player[0],ctrl_Keyboard1, &gvar);\r
EN_initPlayer(&gvar.player[0], &gvar.video);\r
\r
- VGAmodeX(1, 1, &gvar);\r
+ VL_Startup(&gvar);//VGAmodeX(1, 1, &gvar);\r
modexPalBlack();\r
\r
- /* load our palette */\r
+ // load our palette //\r
VL_LoadPalFile("data/16.pal", &gvar.video.palette, &gvar);\r
\r
- /* overscan show */\r
+ // overscan show //\r
//modexPalOverscan(44+1);\r
\r
- /* set up the page, but with 16 pixels on all borders in offscreen mem */\r
+ // set up the page, but with 16 pixels on all borders in offscreen mem //\r
modexHiganbanaPageSetup(&gvar);\r
- ZC_MVSetup(&gvar.mv, &map, &gvar);\r
+ ZC_MVSetup(&gvar.mv, &gvar.map, &gvar);\r
\r
- /* fill the page with one color, but with a black border */\r
+ // fill the page with one color, but with a black border //\r
drawboxesmodex(&gvar.video.page[0]);\r
copyboxesmodex(&gvar.video.page, 1);\r
modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 4);\r
modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 6);\r
\r
\r
- /* fade in */\r
+ // fade in //\r
//====modexFadeOn(1, pal2);\r
\r
i=0,k=0,j=0;\r
\r
endclk = *clockw;\r
\r
- /* fade back to text mode */\r
+ // fade back to text mode //\r
//====modexFadeOff(1, pal2);\r
//====modexPalBlack();\r
- VGAmodeX(0, 1, &gvar);\r
- Shutdown16(&gvar);\r
+ Shutdown16(&gvar);//VGAmodeX(0, 1, &gvar);\r
printf("Project 16 vidtest.exe. This is just a test file!\n");\r
printf("version %s\n", VERSION);\r
VL_PrintmodexmemInfo(&gvar.video);\r
printf("tx=%d ", gvar.mv[gvar.video.sp].tx); printf("ty=%d ", gvar.mv[gvar.video.sp].ty); printf("gvar.player.d=%d\n", gvar.player[0].enti.d);\r
- //IN_Shutdown();\r
//====modexPalBlack();\r
//====modexFadeOn(1, pal);\r
}\r