]> 4ch.mooo.com Git - 16.git/commitdiff
made basic core wwww
authorsparky4 <sparky4@cock.li>
Thu, 30 Jul 2015 00:23:03 +0000 (19:23 -0500)
committersparky4 <sparky4@cock.li>
Thu, 30 Jul 2015 00:23:03 +0000 (19:23 -0500)
modified:   16.exe
modified:   16.hed
modified:   src/16.c
modified:   src/16.h
modified:   src/lib/16_head.h

16.exe
16.hed
src/16.c
src/16.h
src/lib/16_head.h

diff --git a/16.exe b/16.exe
index d569b88dae7935bf252d3f88073ffd04fbb13323..f0f538fef00661ff84f6900ba37c50260601d52f 100644 (file)
Binary files a/16.exe and b/16.exe differ
diff --git a/16.hed b/16.hed
index 9fe459299af93f00829c4175b235ff20aec889d4..1d0256cd6ada56b99d89f9b3cc9181d41ea8a444 100644 (file)
Binary files a/16.hed and b/16.hed differ
index 6ead54ba69e1c33432b1d0dec2edd2cd891db969..0f230198e8ca3b776ef2f32a326b9da07134996e 100644 (file)
--- a/src/16.c
+++ b/src/16.c
 void
 main(int argc, char *argv[])\r
 {
+       engi_stat_t engi_stat;
        const char *cpus;
        byte *dpal, *gpal;
+       player_t player[MaxPlayers];
+
+       engi_stat = ENGI_RUN;
+
        /* save the palette */
        dpal = modexNewPal();
        modexPalSave(dpal);
        modexFadeOff(4, dpal);
-       printf("pal load\n");
-       gpal = modexNewPal();
-       modexPalSave(gpal);
-       modexSavePalFile("data/g.pal", gpal);
-       modexPalBlack();        //so player will not see loadings~
+       //printf("pal load\n");
+       //gpal = modexNewPal();
+       /*modexPalSave(gpal);
+       modexSavePalFile("data/g.pal", gpal);*/
        printf("wwww loop wwww\n");
+       VGAmodeX(1);
+       modexPalBlack();        //so player will not see loadings~
+       IN_Startup();
+       IN_Default(0,&player,ctrl_Joystick);
+       while(ENGI_EXIT != engi_stat)
+       {
+               IN_ReadControl(0,&player);
+               if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT;
+       }
        switch(detectcpu())
        {
                case 0: cpus = "8086/8088 or 186/88"; break;
@@ -45,5 +58,7 @@ main(int argc, char *argv[])
                default: cpus = "internal error"; break;
        }
        printf("detected CPU type: %s\n", cpus);
+       VGAmodeX(0);
+       IN_Shutdown();
        modexFadeOn(4, dpal);
 }
index d6038ae86439a53daac77ea60817a091a25f5eaf..ee5fb90b4909b503dd8c0b10039513fe9c7275a2 100644 (file)
--- a/src/16.h
+++ b/src/16.h
 #define __16_H_
 
 #include "src/lib/16_head.h"
+#include "src/lib/16_in.h"
 #include "src/lib/modex16.h"
 #include "src/lib/wcpu/wcpu.h"
 #include "src/lib/planar.h"
 
+typedef enum {\r
+       ENGI_EXIT,\r
+       ENGI_QUIT,\r
+       ENGI_RUN,\r
+       ENGI_INPUT\r
+} engi_stat_t;
+
 #endif /*__16_H_*/
index 89ccf169b33e769498b92ed21815f3cdf80e4670..6f293147053dca3027fe81a528c544ee4d013735 100644 (file)
@@ -164,7 +164,7 @@ typedef void __based(__self) * memptr;
 typedef struct
 {\r
        int old_mode;   //old video mode before game!
-} global_game_variables_t;
+} global_game_variables_t;\r
 
 /* local function */\r
 void wait(clock_t wait);