X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fplanrpcx.c;h=d3ac3bef1a89547088d9eae05238bed35d8e9f1b;hb=6b164d70a5927e8955b1e0869c4ad32d63410d00;hp=bb473178e11221650b389cf03611fa484b4ed352;hpb=544ccf6efbf54ec3bf18c0dc1a71a9943f493905;p=16.git diff --git a/src/planrpcx.c b/src/planrpcx.c index bb473178..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 @@ -82,7 +84,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(); @@ -97,7 +99,7 @@ baka = 1; getch(); for(i=0; i<100 ;i++) { //(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-16, p.height-16, 16, 16, &p, 0);//(&gvar.video.page[0], 0, 0, 0+p.width, 0, p.width, p.height, &p, 0); + 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); @@ -106,7 +108,7 @@ getch(); while(!kbhit()) { } - VGAmodeX(0, &gvar); + VGAmodeX(0, 1, &gvar); //print out the contents of each plane for(plane=0; plane < 4; plane++) { @@ -119,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)); @@ -150,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", t3); - fprintf(stderr, "speed difference %f\n", t3/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); }