X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2F16.c;h=e87446c6378f1192920ec09c11ff0c2b05db0f5e;hb=52fab2ff9ef6a39ed9303b0df1ce0ad9c9180ef1;hp=b3fa067375cb088359064972737c6e7934a9e16e;hpb=e1e1e6b60d5b1808fc4ac80784118287a0437f2d;p=16.git diff --git a/src/16.c b/src/16.c index b3fa0673..e87446c6 100755 --- a/src/16.c +++ b/src/16.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -22,33 +22,25 @@ #include "src/16.h" -engi_stat_t engi_stat; -byte *dpal, *gpal; -player_t player[MaxPlayers]; - void main(int argc, char *argv[]) { static global_game_variables_t gvar; Startup16(&gvar); - engi_stat = ENGI_RUN; - /* save the palette */ - dpal = modexNewPal(); - modexPalSave(dpal); - modexFadeOff(4, dpal); - gpal = modexNewPal(); - modexPalSave(gpal); - modexSavePalFile("data/g.pal", gpal); + 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,&player,ctrl_Joystick); + IN_Default(0,&gvar.player[0],ctrl_Joystick, &gvar); //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1); - while(ENGI_EXIT != engi_stat) + while(1) { - IN_ReadControl(0,&player); - if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT; + IN_ReadControl(&gvar.player[0], &gvar); + if(IN_KeyDown(sc_Escape)) break; shinku(&gvar); _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); } @@ -57,5 +49,11 @@ main(int argc, char *argv[]) printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n"); printf("version %s\n", VERSION); WCPU_cpufpumesg(); - modexFadeOn(4, dpal); + modexFadeOn(4, gvar.video.dpal); +// InitGame ();//to be defined in 16_tail + +// DemoLoop();//to be defined in 16_tail + +// Quit("Demo loop exited???"); + }