\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
unsigned int bufsz;\r
int fd, i;\r
char *bakapee1,*bakapee2;\r
+\r
boolean anim=1,noanim=0;\r
+\r
pan.pn=0;\r
\r
bakapee1=malloc(64);\r
#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
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
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
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
{\r
//gvar.kurokku.fpscap=!gvar.kurokku.fpscap;\r
anim=!anim;\r
+ DRAWCORNERBOXES;\r
+ IN_UserInput(1,1);\r
+ }\r
+ if(IN_KeyDown(sc_A)) //a\r
+ {\r
+ //gvar.kurokku.fpscap=!gvar.kurokku.fpscap;\r
+ noanim=!noanim;\r
+ DRAWCORNERBOXES;\r
IN_UserInput(1,1);\r
}\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
\r
if(anim && !noanim)\r
if(IN_KeyDown(25)){ modexpdump(mv[1].page); modexShowPage(&(gvar.video.page[1])); IN_UserInput(1,1); }\r
\r
////corner markers\r
-#define GVP gvar.video.page[0]\r
-#define GW GVP.width-16\r
-#define GH GVP.height-16\r
-#define GE GVP.sw\r
-#define GJ GVP.sh\r
-#define DCBF modexClearRegion(&GVP\r
+#define GVPO gvar.video.page[0]\r
+#define GVPI gvar.video.page[1]\r
+#define OW GVPO.width-16\r
+#define OH GVPO.height-16\r
+#define OE GVPO.sw\r
+#define OJ GVPO.sh\r
+#define IW GVPI.width-16\r
+#define IH GVPI.height-16\r
+#define IE GVPI.sw\r
+#define IJ GVPI.sh\r
+#define DCBO modexClearRegion(&GVPO\r
+#define DCBI modexClearRegion(&GVPI\r
\r
#define DRAWOTHERCORNERBOX_TOPLEFT \\r
-DCBF, 0, 0, 16, 16, 0); \\r
-DCBF, 16, 16, 16, 16, 2);\r
+DCBO, 0, 0, 16, 16, 0); \\r
+DCBO, 16, 16, 16, 16, 2); \\r
+DCBI, 0, 0, 16, 16, 0); \\r
+DCBI, 16, 16, 16, 16, 2);\r
\r
#define DRAWOTHERCORNERBOX_TOPRIGHT \\r
-DCBF, GW, 0, 16, 16, 0); \\r
-DCBF, GE, 16, 16, 16, 2);\r
+DCBO, OW, 0, 16, 16, 0); \\r
+DCBO, OE, 16, 16, 16, 2); \\r
+DCBI, IW, 0, 16, 16, 0); \\r
+DCBI, IE, 16, 16, 16, 2);\r
\r
#define DRAWOTHERCORNERBOX_BOTTOMLEFT \\r
-DCBF, 0, GH, 16, 16, 0); \\r
-DCBF, 16, GJ, 16, 16, 2);\r
+DCBO, 0, OH, 16, 16, 0); \\r
+DCBO, 16, OJ, 16, 16, 2); \\r
+DCBI, 0, IH, 16, 16, 0); \\r
+DCBI, 16, IJ, 16, 16, 2);\r
\r
#define DRAWOTHERCORNERBOX_BOTTOMRIGHT \\r
-DCBF, GE, GJ, 16, 16, 2);\\r
-DCBF, GW, GH, 16, 16, 0);\r
+DCBO, OE, OJ, 16, 16, 2); \\r
+DCBO, OW, OH, 16, 16, 0); \\r
+DCBI, IE, IJ, 16, 16, 2);\\r
+DCBI, IW, IH, 16, 16, 0);\r
\r
+#define DRAWCORNERBOXES \\r
+DRAWOTHERCORNERBOX_TOPLEFT; \\r
+DRAWOTHERCORNERBOX_TOPRIGHT; \\r
+DRAWOTHERCORNERBOX_BOTTOMLEFT; \\r
+DRAWOTHERCORNERBOX_BOTTOMRIGHT; \\r
\r
+#define TESTBG \\r
+ modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15); \\r
+ modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128); \\r
+ modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); \\r
+ modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); \\r
+ modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height); \\r
+ modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); \\r
+ modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45);\r
\r
typedef unsigned char far *VGA_RAM_PTR;\r
//VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000);\r