X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fplanrpcx.c;h=eea4796ca6dc515ba0eedc765c0087a0d88857a9;hb=3baebbddf8e57357bc4c5d3e512c91c8e9c84773;hp=e3e6c658c74ac945cbfacc6f55c09594767ebae2;hpb=1eb98f11e608736e9884db079e609812ad96f902;p=16.git diff --git a/src/planrpcx.c b/src/planrpcx.c index e3e6c658..eea4796c 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -24,6 +24,7 @@ #include #include #include "src/lib/modex16.h" +#include "src/lib/modex16/16planar.h" global_game_variables_t gvar; planar_buf_t p, ptmp; @@ -41,8 +42,6 @@ void main(int argc, char *argv[]) { byte l[1024]; - static byte e; - static word chx, chy, colpee; byte pee[2]; //w=0; @@ -64,7 +63,7 @@ baka = 1; //getch(); textInit(); - VGAmodeX(baka, &gvar); + VGAmodeX(baka, 1, &gvar); gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); //fix up the palette and everything @@ -86,7 +85,7 @@ baka = 1; } t1 = (*clockw-start) /18.2; for(i=0; i<100 ;i++) { - modexDrawBmpPBufRegion (&gvar.video.page[0], p.width+32, 32, 0, 0, p.width, p.height, &p); + 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); } t2 = (*clockw-start) /18.2; getch(); @@ -110,7 +109,7 @@ getch(); while(!kbhit()) { } - VGAmodeX(0, &gvar); + VGAmodeX(0, 1, &gvar); //print out the contents of each plane for(plane=0; plane < 4; plane++) { @@ -124,25 +123,6 @@ getch(); } } - chx=0; - chy=0; - colpee=32; - for(e=0x00; e<=0xFE; e++) - { - if(chx+8>(gvar.video.page[0].width/2)) - { - chx=0; - chy+=8; - sprintf(pee,"%u", colpee); - modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 0); - //getch(); - } - modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 0); - chx+=9; - colpee++; - if(colpee>=32+24) colpee=32; - } - fprintf(stderr,"Project 16 planrpcx.exe. This is just a test file!\n"); fprintf(stderr,"version %s\n", VERSION); fprintf(stderr,"%d\n", sizeof(p.plane)); @@ -154,7 +134,7 @@ getch(); free(bakapeee); fprintf(stderr, "modexDrawBmpPBufRegion: %f\n", t2); fprintf(stderr, "modexDrawPBufRegion: %f\n", t4); - fprintf(stderr, "speed difference %f\n", t4/t2); + fprintf(stderr, "speed difference %f\n", t2/t4); //fprintf(stderr, "gvar.video.page[0].width: %u\n", gvar.video.page[0].width); //fprintf(stderr, "gvar.video.page[0].height: %u\n", gvar.video.page[0].height); }