/* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
*\r
* This file is part of Project 16.\r
*\r
#include <dos.h>\r
#include <string.h>\r
#include "src/lib/modex16.h"\r
+#include "src/lib/modex16/16planar.h"\r
\r
global_game_variables_t gvar;\r
planar_buf_t p, ptmp;\r
{\r
\r
byte l[1024];\r
- static byte e;\r
- static word chx, chy, colpee;\r
byte pee[2];\r
\r
//w=0;\r
//getch();\r
\r
textInit();\r
- VGAmodeX(baka, &gvar);\r
+ VGAmodeX(baka, 1, &gvar);\r
gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
\r
//fix up the palette and everything\r
}\r
t1 = (*clockw-start) /18.2;\r
for(i=0; i<100 ;i++) {\r
- modexDrawBmpPBufRegion (&gvar.video.page[0], p.width+32, 32, 0, 0, p.width, p.height, &p);\r
+ modexDrawBmpPBufRegion (&gvar.video.page[0], p.width+32, 32, p.width-(p.width/4), p.height-(p.height/4), p.width/4, p.height/4, &p);\r
}\r
t2 = (*clockw-start) /18.2;\r
getch();\r
while(!kbhit())\r
{\r
}\r
- VGAmodeX(0, &gvar);\r
+ VGAmodeX(0, 1, &gvar);\r
\r
//print out the contents of each plane\r
for(plane=0; plane < 4; plane++) {\r
}\r
}\r
\r
- chx=0;\r
- chy=0;\r
- colpee=32;\r
- for(e=0x00; e<=0xFE; e++)\r
- {\r
- if(chx+8>(gvar.video.page[0].width/2))\r
- {\r
- chx=0;\r
- chy+=8;\r
- sprintf(pee,"%u", colpee);\r
- modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 0);\r
- //getch();\r
- }\r
- modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 0);\r
- chx+=9;\r
- colpee++;\r
- if(colpee>=32+24) colpee=32;\r
- }\r
-\r
fprintf(stderr,"Project 16 planrpcx.exe. This is just a test file!\n");\r
fprintf(stderr,"version %s\n", VERSION);\r
fprintf(stderr,"%d\n", sizeof(p.plane));\r
free(bakapeee);\r
fprintf(stderr, "modexDrawBmpPBufRegion: %f\n", t2);\r
fprintf(stderr, "modexDrawPBufRegion: %f\n", t4);\r
- fprintf(stderr, "speed difference %f\n", t4/t2);\r
+ fprintf(stderr, "speed difference %f\n", t2/t4);\r
//fprintf(stderr, "gvar.video.page[0].width: %u\n", gvar.video.page[0].width);\r
//fprintf(stderr, "gvar.video.page[0].height: %u\n", gvar.video.page[0].height);\r
}\r