X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2F16.c;h=004d8ebfae51c196750b4b232cfd3c0e5c16e301;hb=fd22359b3cf8abccf814365b79906b15a98c8e4e;hp=6ead54ba69e1c33432b1d0dec2edd2cd891db969;hpb=79ef6da1ef02e32f0335839aa146a7773b45d66f;p=16.git
diff --git a/src/16.c b/src/16.c
old mode 100644
new mode 100755
index 6ead54ba..004d8ebf
--- a/src/16.c
+++ b/src/16.c
@@ -1,49 +1,59 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * This file is part of Project 16.
- *
- * Project 16 is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Project 16 is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see , or
- * write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-#include "src/16.h"
-
-void
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see , or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "src/16.h"
+
+void
main(int argc, char *argv[])
-{
- const char *cpus;
- byte *dpal, *gpal;
- /* 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("wwww loop wwww\n");
- switch(detectcpu())
- {
- 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;
- }
- printf("detected CPU type: %s\n", cpus);
- modexFadeOn(4, dpal);
-}
+{
+ static global_game_variables_t gvar;
+ Startup16(&gvar);//initgame equ
+
+ /* save the palette */
+ 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(1)
+ {
+ IN_ReadControl(&gvar.player[0], &gvar);
+ if(gvar.in.inst->Keyboard[sc_Escape]) break;
+ shinku(&gvar);
+ _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);
+ }
+ 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);
+ WCPU_cpufpumesg();
+ modexFadeOn(4, gvar.video.dpal);
+// InitGame ();//to be defined in 16_tail
+
+//++++ DemoLoop();//to be defined in 16_tail
+
+//++++ Quit(&gvar, "Demo loop exited???");
+
+}