From: sparky4 Date: Thu, 30 Jul 2015 00:23:03 +0000 (-0500) Subject: made basic core wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=aa8618bc6582b36d233980ddda9818b05771075d;p=16.git made basic core wwww modified: 16.exe modified: 16.hed modified: src/16.c modified: src/16.h modified: src/lib/16_head.h --- diff --git a/16.exe b/16.exe index d569b88d..f0f538fe 100644 Binary files a/16.exe and b/16.exe differ diff --git a/16.hed b/16.hed index 9fe45929..1d0256cd 100644 Binary files a/16.hed and b/16.hed differ diff --git a/src/16.c b/src/16.c index 6ead54ba..0f230198 100644 --- a/src/16.c +++ b/src/16.c @@ -25,18 +25,31 @@ void main(int argc, char *argv[]) { + 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); } diff --git a/src/16.h b/src/16.h index d6038ae8..ee5fb90b 100644 --- a/src/16.h +++ b/src/16.h @@ -24,8 +24,16 @@ #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 { + ENGI_EXIT, + ENGI_QUIT, + ENGI_RUN, + ENGI_INPUT +} engi_stat_t; + #endif /*__16_H_*/ diff --git a/src/lib/16_head.h b/src/lib/16_head.h index 89ccf169..6f293147 100644 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -164,7 +164,7 @@ typedef void __based(__self) * memptr; typedef struct { int old_mode; //old video mode before game! -} global_game_variables_t; +} global_game_variables_t; /* local function */ void wait(clock_t wait);