X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2F0.c;h=28d5ff052871dd9d7c2ff40a7e80c9abfd985809;hb=86619c6a50b07c52481161da4b549ffb5e403e66;hp=a79f455c46a0c4156c88f0a8c91ac9241ec2a34f;hpb=c97b854807379d39e5cc97c5c8c4f4390302528d;p=16.git
diff --git a/src/0.c b/src/0.c
index a79f455c..28d5ff05 100755
--- a/src/0.c
+++ b/src/0.c
@@ -1,3 +1,25 @@
+/* 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
#include
#include
@@ -12,9 +34,7 @@
#define INITTNUM 1
-player_t player[MaxPlayers];
map_view_t mv[4];
-
map_t map;//junk var
int main(int argc,char **argv)
@@ -31,7 +51,7 @@ int main(int argc,char **argv)
boolean anim=1,noanim=0,zerostoppause=1;
bakapee1=malloc(64);
- bakapee2=malloc(1024);
+ bakapee2=malloc(64);
if (argc < 2) {
//fprintf(stderr,"drawvrl \n palette file optional\n");
@@ -82,13 +102,13 @@ int main(int argc,char **argv)
if (vrl_lineoffs == NULL) return 1;
IN_Startup();
- IN_Default(0,&player,ctrl_Keyboard1);
- EN_initplayer(&player, 0);
+ IN_Default(0,&gvar.player[0],ctrl_Keyboard1);
+ EN_initPlayer(&gvar.player[0], &gvar.video);
/* setup camera and screen~ */
modexHiganbanaPageSetup(&gvar.video);
- ZC_MVSetup(&mv, &map, &gvar);
- ZC_ShowMV(&mv, gvar.video.sp, 0);
+ ZC_MVSetup(&gvar.mv, &map, &gvar);
+ ZC_ShowMV(&gvar.mv, gvar.video.sp, 0);
// VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw);
VL_PatternDraw(&gvar.video, 0/*gvar.video.sp*/, 0, 1);
@@ -120,24 +140,24 @@ int main(int argc,char **argv)
while(!IN_KeyDown(sc_Escape))
{
- IN_ReadControl(0,&player);
- if(IN_KeyDown(68)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1,1); } //f10
- PANKEYFUN;
+ IN_ReadControl(&gvar.player[0]);
+ if(IN_KeyDown(68)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1); } //f10
+ TAIL_PANKEYFUN;
if(IN_KeyDown(sc_Space) || zerostoppause) //space
{
anim=!anim;
DRAWCORNERBOXES;
- if(!zerostoppause) IN_UserInput(1,1); else zerostoppause=0;
+ if(!zerostoppause) IN_UserInput(1); else zerostoppause=0;
}
if(IN_KeyDown(sc_R)){
gvar.video.page[0].dx=gvar.video.page[0].dy=gvar.video.page[1].dx=gvar.video.page[1].dy=16;
- mv[0].tx = mv[0].ty = mv[1].tx = mv[1].ty = INITTNUM;
+ gvar.mv[0].tx = gvar.mv[0].ty = gvar.mv[1].tx = gvar.mv[1].ty = INITTNUM;
VL_ShowPage(&gvar.video.page[gvar.video.sp], 1, 0);
- player[0].enti.q = 1; player[0].enti.d = 2;
+ gvar.player[0].enti.q = 1; gvar.player[0].enti.d = 2;
x=y=0;
xdir=ydir=1;
} //R
- FUNCTIONKEYFUNCTIONS0EXE;
+ TAIL_FUNCTIONKEYFUNCTIONS0EXE;
if(anim && !noanim)
{
@@ -193,11 +213,11 @@ draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header
}
}
- IN_UserInput(1,1);
+ IN_UserInput(1);
//===========================================================================//
- ZC_ShowMV(&mv, 0, 0);
+ ZC_ShowMV(&gvar.mv, 0, 0);
if(!noanim) {
/* another handy "demo" effect using VGA write mode 1.
* we can take what's on screen and vertically squash it like an old analog TV set turning off. */
@@ -292,7 +312,7 @@ if(!noanim) {
printf("\nProject 16 0.exe. This is just a test file!\n");
printf("version %s\n", VERSION);
//SCROLLEXITMESG;
- printf("mv 0\n- tx=%d ty=%d dx=%d dy=%d\n", mv[0].tx, mv[0].ty, gvar.video.page[0].dx, gvar.video.page[0].dy);
- printf("mv 1\n- tx=%d ty=%d dx=%d dy=%d\n", mv[1].tx, mv[1].ty, gvar.video.page[1].dx, gvar.video.page[1].dy);
+ printf("mv 0\n- tx=%d ty=%d dx=%d dy=%d\n", gvar.mv[0].tx, gvar.mv[0].ty, gvar.video.page[0].dx, gvar.video.page[0].dy);
+ printf("mv 1\n- tx=%d ty=%d dx=%d dy=%d\n", gvar.mv[1].tx, gvar.mv[1].ty, gvar.video.page[1].dx, gvar.video.page[1].dy);
return 0;
}