X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2F16.c;h=af711c37aa1d794319d6f6351b0ab87f0dc9d4d6;hb=af2715fef8681d909afe82f7baaf5e13baabb76f;hp=c9cd55d50093386cec31ab277ae6312ec10fba52;hpb=5e61851e7bb3c2e579db3e83c502dc51803799f4;p=16.git diff --git a/src/16.c b/src/16.c index c9cd55d5..af711c37 100755 --- a/src/16.c +++ b/src/16.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -22,50 +22,40 @@ #include "src/16.h" -global_game_variables_t gvar; -engi_stat_t engi_stat; -const char *cpus; -byte *dpal, *gpal; -player_t player[MaxPlayers]; -//page_t screen; - void main(int argc, char *argv[]) { - //screen = modexDefaultPage(); - engi_stat = ENGI_RUN; - //textInit(); + static global_game_variables_t gvar; + Startup16(&gvar); + + gvar.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);*/ - printf("wwww loop wwww\n"); - VGAmodeX(1, &gvar); - modexPalBlack(); //so player will not see loadings~ - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); - //modexprint(&screen, 32, 32, 1, 2, 0, "a"); - while(ENGI_EXIT != engi_stat) - { - IN_ReadControl(0,&player); - if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT; - } - switch(detectcpu()) + modexPalSave(gvar.video.dpal); + modexFadeOff(4, gvar.video.dpal); + modexPalSave(gvar.video.palette); + modexSavePalFile("data/g.pal", gvar.video.palette); + VGAmodeX(1, 1, &gvar); +// modexPalBlack(); //so player will not see loadings~ + IN_Default(0,&gvar.player[0],ctrl_Joystick, &gvar); + //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1); + while(ENGI_QUIT != gvar.engi_stat) { - case 0: cpus = "8086/8088 or 186/88"; break; - case 1: cpus = "286"; break; - case 2: cpus = "386 or newer"; break; - default: cpus = "internal error"; break; + IN_ReadControl(&gvar.player[0], &gvar); + if(IN_KeyDown(sc_Escape)) gvar.engi_stat = ENGI_QUIT; + shinku(&gvar); + _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); } - VGAmodeX(0, &gvar); + Shutdown16(&gvar); + VGAmodeX(0, 1, &gvar); printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n"); printf("version %s\n", VERSION); - printf("detected CPU type: %s\n", cpus); - IN_Shutdown(); - modexFadeOn(4, dpal); + WCPU_cpufpumesg(); + modexFadeOn(4, gvar.video.dpal); +// InitGame ();//to be defined in 16_tail + +// DemoLoop();//to be defined in 16_tail + +// Quit("Demo loop exited???"); + }