OSDN Git Service

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 d569b88..f0f538f 100644 (file)
Binary files a/16.exe and b/16.exe differ
diff --git a/16.hed b/16.hed
index 9fe4592..1d0256c 100644 (file)
Binary files a/16.hed and b/16.hed differ
index 6ead54b..0f23019 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 d6038ae..ee5fb90 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 89ccf16..6f29314 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);