]> 4ch.mooo.com Git - 16.git/blobdiff - 16/src/bakapi4b.c
====----==== this is a messed up build that contains a busted 0.exe pan page system
[16.git] / 16 / src / bakapi4b.c
diff --git a/16/src/bakapi4b.c b/16/src/bakapi4b.c
new file mode 100755 (executable)
index 0000000..6e5c5a1
--- /dev/null
@@ -0,0 +1,89 @@
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You screen.heightould have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include "src/bakapi.h"\r
+\r
+/*\r
+ * BAKAPEE!\r
+ */\r
+global_game_variables_t gvar;\r
+static bakapee_t bakapee;\r
+word key,d,xpos,ypos,xdir,ydir;\r
+int ch=0x0;\r
+\r
+void\r
+main(int argc, char *argvar[])\r
+{\r
+       // main variables values\r
+       d=4; // switch variable\r
+       key=2; // default screensaver number\r
+       xpos=TILEWH*2;\r
+       ypos=TILEWH*2;\r
+       xdir=1;\r
+       ydir=1;\r
+\r
+       VGAmodeX(1, &gvar);\r
+       bakapee.xx = rand()&0%gvar.video.page[0].width;\r
+       bakapee.yy = rand()&0%gvar.video.page[0].height;\r
+       bakapee.gq = 0;\r
+       bakapee.sx=0;\r
+       bakapee.sy=0;\r
+       bakapee.bakax=0;\r
+       bakapee.bakay=0;\r
+       bakapee.coor=0;\r
+\r
+       /* setup camera and screen~ */\r
+       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
+       gvar.video.page[0].width += (TILEWH*2);\r
+       gvar.video.page[0].height += (TILEWH*2);\r
+       textInit();\r
+\r
+       modexShowPage(&gvar.video.page[0]);\r
+\r
+// screen savers\r
+       while(d>0)      // on!\r
+       {\r
+               if(!kbhit())\r
+               { // conditions of screen saver\r
+                       ding(&gvar.video.page[0], &bakapee, key);\r
+               }\r
+               else\r
+               {\r
+                       VGAmodeX(0, &gvar);\r
+                       // user imput switch\r
+                       fprintf(stderr, "xx=%d  yy=%d\n", bakapee.xx, bakapee.yy);\r
+                       printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n", getch());  // prompt the user\r
+                       scanf("%d", &key);\r
+                       //if(key==3){xx=yy=0;} // crazy screen saver wwww\r
+                       if(key==0){ d=0; }else{\r
+                               gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
+                               gvar.video.page[0].width += (TILEWH*2);\r
+                               gvar.video.page[0].height += (TILEWH*2);\r
+                               VGAmodeX(1, &gvar);\r
+\r
+                               modexShowPage(&gvar.video.page[0]);\r
+                       }\r
+               }\r
+       }\r
+       printf("bakapi ver. 1.04.13.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v3\n");\r
+}\r
+//pee!\r