X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fplanrpcx.c;h=d3ac3bef1a89547088d9eae05238bed35d8e9f1b;hb=e3ac78ae7ba30101e388236f6312a04c79a94c35;hp=46aea023793616085b150acef4ccf337723f8d0d;hpb=406b5fda9569ccdcf5fad9944f442b24ec0662fa;p=16.git diff --git a/src/planrpcx.c b/src/planrpcx.c index 46aea023..d3ac3bef 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 * * This file is part of Project 16. * @@ -36,11 +36,12 @@ word px,py; sword baka; char *bakapeee; + void main(int argc, char *argv[]) { - //byte l[1024]; - word j,chw,xp,col,bgcol; + byte l[1024]; + byte pee[2]; //w=0; //printf("%u ", w++); @@ -60,7 +61,8 @@ baka = 1; //fprintf(stderr, "^^;", w++); //getch(); - VGAmodeX(baka, &gvar); + textInit(); + VGAmodeX(baka, 1, &gvar); gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); //fix up the palette and everything @@ -78,11 +80,11 @@ baka = 1; start = *clockw; // oldDrawBmp(VGA, 20, 20, &bmp, 0); for(i=0; i<100 ;i++) { - modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, &p); + //modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, &p); } 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(); @@ -94,18 +96,19 @@ baka = 1; modexDrawPBuf (&gvar.video.page[0], 0, 0, &p, 0); } t3 = (*clockw-start) /18.2; +getch(); for(i=0; i<100 ;i++) { - modexDrawPBufRegion (&gvar.video.page[0], 0, 0, 0+p.width, 0, p.width, p.height, &p, 0); + //(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite); + modexDrawPBufRegion (&gvar.video.page[0], p.width, 0, p.width-(p.width/4), p.height-(p.height/4), p.width/4, p.height/4, &p, 0);//(&gvar.video.page[0], 0, 0, 0+p.width, 0, p.width, p.height, &p, 0); } t4 = (*clockw-start) /18.2; //++++ modexPalUpdate1(ptmp.palette); //modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, ptmp); //modexDrawPBuf(&gvar.video.page[0], 64, 64, &ptmp, 0); -getch(); while(!kbhit()) { } - VGAmodeX(0, &gvar); + VGAmodeX(0, 1, &gvar); //print out the contents of each plane for(plane=0; plane < 4; plane++) { @@ -118,28 +121,7 @@ getch(); printf("\n"); } } - col=0x0d, bgcol=0; - /* - for(i=0; i<8; i++) - { - //modexSelectPlane(PLANE(x)); - //j=1<<8; - //*bakapee=(l[i] & j ? col:bgcol); - //_fmemcpy(page->data + (((page->width/4) * (y+page->dy+i)) + ((x+page->dx+chw) / 4)), bakapee, 8); - j=4<<8; - fprintf(stderr, "j<<=%u\n", j); - xp=0; - while(j) - { - //modexputPixel(page, x+xp+chw, y+i, l[i] & j ? col:bgcol); - //fprintf(stderr, "%u", l[i] & j ? col:bgcol); - xp++; - j>>=4; - fprintf(stderr, " j>>=%u\n", j); - } - //fprintf(stderr, "\n"); - }*/ - chw += xp; + 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)); @@ -149,9 +131,9 @@ getch(); fprintf(stderr,"%d\n", sizeof(p)); fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(p.width), gvar.video.page[0].sh-(p.height)); free(bakapeee); - //fprintf(stderr, "modexDrawBmpPBuf: %f\n", t1); - //fprintf(stderr, "modexDrawPBuf: %f\n", t2); - //fprintf(stderr, "speed difference %f\n", t2/t1); + fprintf(stderr, "modexDrawBmpPBufRegion: %f\n", t2); + fprintf(stderr, "modexDrawPBufRegion: %f\n", t4); + 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); }