]> 4ch.mooo.com Git - 16.git/commitdiff
=error= ww src/lib/modex16.h(86): Error! E1024: Declared symbol 'modexEnter' is not...
authorsparky4 <sparky4@cock.li>
Mon, 4 Apr 2016 18:34:28 +0000 (13:34 -0500)
committersparky4 <sparky4@cock.li>
Mon, 4 Apr 2016 18:34:28 +0000 (13:34 -0500)
builq.sh
src/16.c
src/bakapi.c
src/fontgfx.c
src/lib/modex16.c
src/lib/modex16.h

index f518246b8436f6a642c1dad0938b64dcd20d5964..e60e695a4e6f37b371c1ceb978d1dec95d42c9ee 100755 (executable)
--- a/builq.sh
+++ b/builq.sh
@@ -1,4 +1,5 @@
 #! /bin/bash
-wmake -h clean
-wmake -h
-wmake -h comq
+. ./dld.sh
+./cleanup.sh
+./buildall.sh
+#cd ../../../
index 10aad071ee088930de3f96cfc7ff7599e8d325ae..bfe777e253ad2ed5b686b1b9be92fd29e54c4cc3 100755 (executable)
--- a/src/16.c
+++ b/src/16.c
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
        /*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
@@ -62,7 +62,7 @@ main(int argc, char *argv[])
                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
index 410524d0ab2e4364bd0fa84af16fef0f59e284cb..6c357276ae79d74c844defe8c3bb948e08227c2a 100755 (executable)
@@ -93,12 +93,10 @@ main(int argc, char *argvar[])
        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;
@@ -138,15 +136,22 @@ main(int argc, char *argvar[])
                {
                        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) {
@@ -174,16 +179,14 @@ main(int argc, char *argvar[])
                                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:
@@ -194,6 +197,7 @@ main(int argc, char *argvar[])
        }
 #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())
@@ -268,6 +272,7 @@ main(int argc, char *argvar[])
        }
 //     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!
index 3edf22d56d576b13ed54387904b405b785974023..2abb13ffe93dfa88a15c9b88a486a67c169c7177 100755 (executable)
@@ -63,7 +63,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 //     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
@@ -96,7 +96,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 //     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
index ee2f1a8608b459c89d5e7a329171debf5f27eb0b..7d7d7631dce9b3a3217de6ac55a465706d075e3f 100755 (executable)
@@ -35,7 +35,7 @@ static byte tmppal[PAL_SIZE];
 // 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
@@ -54,7 +54,7 @@ void VGAmodeX(sword vq, global_game_variables_t *gv)
                        //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
@@ -87,7 +87,7 @@ vgaGetMode()
 \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
@@ -107,12 +107,6 @@ modexEnter(sword vq, global_game_variables_t *gv)
                        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
@@ -124,12 +118,6 @@ modexEnter(sword vq, global_game_variables_t *gv)
                        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
@@ -141,12 +129,6 @@ modexEnter(sword vq, global_game_variables_t *gv)
                        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
@@ -158,12 +140,6 @@ modexEnter(sword vq, global_game_variables_t *gv)
                        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
@@ -175,12 +151,18 @@ modexEnter(sword vq, global_game_variables_t *gv)
                        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
index 3c47ee074a949a9e359bbeb43ae14bc7fc4a789a..1ba62683527887668c14be8fb960562d69da93aa 100755 (executable)
@@ -82,8 +82,8 @@ typedef union
 
 /* -============================ 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);