]> 4ch.mooo.com Git - 16.git/blobdiff - src/0.c
added stuff to help me study 0.exe it is a complex program wwww
[16.git] / src / 0.c
diff --git a/src/0.c b/src/0.c
index ee5f5c44f9bacf37d256d567a49abe0b857c5023..47a0e29ac66bbc8d195d96b5088cca2679bc2be7 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -5,17 +5,13 @@
 \r
 #include "src/tesuto.h"\r
 \r
-#define FILENAME_1 "data/aconita.vrl"\r
-#define FILENAME_2 "data/aconita.pal"\r
-//#define FILENAME_2 "data/default.pal"\r
+//#define FILENAME_1 "data/aconita.vrl"\r
+//#define FILENAME_2 "data/aconita.pal"\r
+#define FILENAME_1 "data/spri/chikyuu.vrl"\r
+#define FILENAME_2 "data/spri/chikyuu.pal"\r
 \r
 //#define PATTERN\r
 #define INITTNUM 1\r
-#define DRAWCORNERBOXES \\r
-DRAWOTHERCORNERBOX_TOPLEFT; \\r
-DRAWOTHERCORNERBOX_TOPRIGHT; \\r
-DRAWOTHERCORNERBOX_BOTTOMLEFT; \\r
-DRAWOTHERCORNERBOX_BOTTOMRIGHT; \\r
 \r
 static unsigned char palette[768];\r
 player_t player[MaxPlayers];\r
@@ -31,7 +27,9 @@ int main(int argc,char **argv)
        unsigned int bufsz;\r
        int fd, i;\r
        char *bakapee1,*bakapee2;\r
-       boolean anim=1,noanim=0;\r
+\r
+       boolean anim=1,noanim=1;\r
+\r
        pan.pn=0;\r
 \r
        bakapee1=malloc(64);\r
@@ -115,6 +113,7 @@ int main(int argc,char **argv)
        #define VMEMHEIGHT gvar.video.page[0].height+gvar.video.page[1].height\r
 \r
        //4     this draws that pattern on the screen\r
+#ifdef PATTERN\r
        {\r
                unsigned int i,j,o;\r
                /* fill screen with a distinctive pattern */\r
@@ -125,6 +124,9 @@ int main(int argc,char **argv)
                                vga_state.vga_graphics_ram[o] = (i^j)&15; // VRL samples put all colors in first 15!\r
                }\r
        }\r
+#else\r
+       TESTBG;\r
+#endif\r
 \r
        DRAWCORNERBOXES;\r
 \r
@@ -139,6 +141,7 @@ int main(int argc,char **argv)
                VGA_RAM_PTR omemptr;\r
                int xdir=1,ydir=1;\r
 \r
+#ifdef PATTERN\r
                int j;\r
                /* fill pattern offset with a distinctive pattern */\r
                for (i=0;i < gvar.video.page[0].width;i++) {\r
@@ -147,7 +150,9 @@ int main(int argc,char **argv)
                        for (j=0;j < VMEMHEIGHT;j++,o += gvar.video.page[0].stridew)\r
                                vga_state.vga_graphics_ram[o] = (i^j)&15; // VRL samples put all colors in first 15!\r
                }\r
-\r
+#else\r
+       TESTBG;\r
+#endif\r
                DRAWCORNERBOXES;\r
 \r
                /* starting coords. note: this technique is limited to x coordinates of multiple of 4 */\r
@@ -165,16 +170,20 @@ int main(int argc,char **argv)
                        {\r
                                //gvar.kurokku.fpscap=!gvar.kurokku.fpscap;\r
                                anim=!anim;\r
+                               DRAWCORNERBOXES;\r
                                IN_UserInput(1,1);\r
                        }\r
-                       FUNCTIONKEYFUNCTIONS0EXE;\r
                        if(IN_KeyDown(sc_R)){\r
                                gvar.video.page[0].dx=gvar.video.page[0].dy=gvar.video.page[1].dx=gvar.video.page[1].dy=16;\r
+                               mv[0].tx = mv[0].ty = mv[1].tx = mv[1].ty = INITTNUM;\r
                                modexShowPage(&(gvar.video.page[pan.pn]));\r
                                player[0].q = 1; player[0].d = 2;\r
+                               x=y=0;\r
+                               xdir=ydir=1;\r
                        } //R\r
+                       FUNCTIONKEYFUNCTIONS0EXE;\r
 \r
-                       if(anim && !noanim)\r
+                       if(anim/* && !noanim*/)\r
                        {\r
                                /* render box bounds. y does not need modification, but x and width must be multiple of 4 */\r
                                if (x >= overdraw) rx = (x - overdraw) & (~3);\r