#! /bin/bash
-wmake -h clean
-wmake -h
-wmake -h comq
+. ./dld.sh
+./cleanup.sh
+./buildall.sh
+#cd ../../../
/*modexPalSave(gpal);\r
modexSavePalFile("data/g.pal", gpal);*/\r
printf("wwww loop wwww\n");\r
- VGAmodeX(1, &gvar);\r
+ VGAmodeX(1, 1, &gvar);\r
modexPalBlack(); //so player will not see loadings~\r
IN_Startup();\r
IN_Default(0,&player,ctrl_Joystick);\r
case 2: cpus = "386 or newer"; break;\r
default: cpus = "internal error"; break;\r
}\r
- VGAmodeX(0, &gvar);\r
+ VGAmodeX(0, 1, &gvar);\r
printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n");\r
printf("version %s\n", VERSION);\r
printf("detected CPU type: %s\n", cpus);\r
xdir=1;
ydir=1;
-#ifdef MXLIB
- VGAmodeX(vgamodex_mode, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C.
-#else
-# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
+ VGAmodeX(vgamodex_mode, 1, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C.
+ // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
// we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.
-#endif
+
bakapee.xx = rand()&0%gvar.video.page[0].width;
bakapee.yy = rand()&0%gvar.video.page[0].height;
bakapee.gq = 0;
{
int c;
-# ifndef MXLIB
-# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
+ // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
// we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.
-# else
- VGAmodeX(0, &gvar);
-# endif
+ VGAmodeX(0, 0, &gvar);
// user imput switch
- fprintf(stderr, "xx=%d yy=%d tile=%d\n", bakapee.xx, bakapee.yy, bakapee.tile);
- printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n");
+ //fprintf(stderr, "xx=%d yy=%d tile=%d\n", bakapee.xx, bakapee.yy, bakapee.tile);
+ printf("Tiled mode is ");
+ switch (bakapee.tile)
+ {
+ case 0:
+ printf("off.\n");
+ break;
+ case 1:
+ printf("on.\n");
+ break;
+ }
+ printf("Enter 1, 2, 3, 4, 5, 6, 8, or 9 to run a screensaver, or enter 0 to quit.\n");
c = getch();
switch (c) {
case '4':
case '5':
case '6':
+ case '9':
key = c - '0';
-# ifdef MXLIB
gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
gvar.video.page[0].width += (TILEWH*2);
gvar.video.page[0].height += (TILEWH*2);
- VGAmodeX(vgamodex_mode, &gvar);
-# else
-# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
+ VGAmodeX(vgamodex_mode, 0, &gvar);
+ // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.
// we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.
-# endif
modexShowPage(&gvar.video.page[0]);
break;
default:
}
#else // !defined(BOINK)
// FIXME: Does not compile. Do you want to remove this?
+// TODO: This is a testing sextion for textrendering and panning for project 16 --sparky4
while(1)
{ // conditions of screen saver
while(!kbhit())
}
// VGAmodeX(0, &gvar);
#endif // defined(BOINK)
- printf("bakapi ver. 1.04.13.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v3\n");
+ printf("bakapi ver. 1.04.16.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v3\n");
+ printf("compiled on %s\n", VERSION);
}
//pee!
// static byte *rosa;\r
static word chx, chy, colpee;\r
textInit();\r
- VGAmodeX(1, &gvar);\r
+ VGAmodeX(1, 1, &gvar);\r
/* setup camera and screen~ */\r
gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
//gvar.video.page[0].width += (16*2);\r
// modexprintbig(&gvar.video.page[0], 0, 0, 1, colpee, 0, "IBM");\r
// modexprint(0, 0, 1, 0, colpee, ROSE);\r
getch();\r
- VGAmodeX(0, &gvar);\r
+ VGAmodeX(0, 1, &gvar);\r
// rosa=malloc(sizeof(ROSE));\r
// (*rosa)=(byte)ROSE;\r
printf("\n%s\n", rose);\r
// setvideo() - This function Manages the video modes //\r
// //\r
/////////////////////////////////////////////////////////////////////////////\r
-void VGAmodeX(sword vq, global_game_variables_t *gv)\r
+void VGAmodeX(sword vq, byte cm, global_game_variables_t *gv)\r
{\r
union REGS in, out;\r
\r
//int86(0x10, &in, &out);\r
gv->video.old_mode = vgaGetMode();//out.h.al;\r
// enter mode\r
- modexEnter(vq, gv);\r
+ modexEnter(vq, cm, gv);\r
break;\r
}\r
}\r
\r
/* -========================= Entry Points ==========================- */\r
void\r
-modexEnter(sword vq, global_game_variables_t *gv)\r
+modexEnter(sword vq, boolean cm, global_game_variables_t *gv)\r
{\r
word i;\r
dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */\r
for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_320x240regs[i]);\r
}\r
-\r
- /* clear video memory */\r
- outpw(SC_INDEX, 0x0f02);\r
- for(i=0; i<0x8000; i++) {\r
- ptr[i] = 0x0000;\r
- }\r
break;\r
case 2:\r
CRTParmCount = sizeof(ModeX_160x120regs) / sizeof(ModeX_160x120regs[0]);\r
for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_160x120regs[i]);\r
}\r
-\r
- /* clear video memory */\r
- outpw(SC_INDEX, 0x0f02);\r
- for(i=0; i<0x8000; i++) {\r
- ptr[i] = 0x0000;\r
- }\r
break;\r
case 3:\r
CRTParmCount = sizeof(ModeX_320x200regs) / sizeof(ModeX_320x200regs[0]);\r
for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_320x200regs[i]);\r
}\r
-\r
- /* clear video memory */\r
- outpw(SC_INDEX, 0x0f02);\r
- for(i=0; i<0x8000; i++) {\r
- ptr[i] = 0x0000;\r
- }\r
break;\r
case 4:\r
CRTParmCount = sizeof(ModeX_192x144regs) / sizeof(ModeX_192x144regs[0]);\r
for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_192x144regs[i]);\r
}\r
-\r
- /* clear video memory */\r
- outpw(SC_INDEX, 0x0f02);\r
- for(i=0; i<0x8000; i++) {\r
- ptr[i] = 0x0000;\r
- }\r
break;\r
case 5:\r
CRTParmCount = sizeof(ModeX_256x192regs) / sizeof(ModeX_256x192regs[0]);\r
for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_256x192regs[i]);\r
}\r
+ break;\r
+ }\r
\r
- /* clear video memory */\r
- outpw(SC_INDEX, 0x0f02);\r
- for(i=0; i<0x8000; i++) {\r
- ptr[i] = 0x0000;\r
- }\r
+ /* clear video memory */\r
+ switch (cm)\r
+ {\r
+ case 1:\r
+ /* clear video memory */\r
+ outpw(SC_INDEX, 0x0f02);\r
+ for(i=0; i<0x8000; i++) {\r
+ ptr[i] = 0x0000;\r
+ }\r
break;\r
}\r
gv->video.page[0].tilesw = gv->video.page[0].sw/TILEWH;\r
/* -============================ Functions =============================- */
/* mode switching, page, and plane functions */
-void VGAmodeX(sword vq, global_game_variables_t *gv);
-void modexEnter(sword vq, global_game_variables_t *gv);
+void VGAmodeX(sword vq, byte cm, global_game_variables_t *gv)
+void modexEnter(sword vq, byte cm, global_game_variables_t *gv);
long vgaGetMode();
void modexLeave();
void modexsetBaseXMode(page_t *page);