X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fplanrpcx.c;h=06b1f29c8eb812887bf6bd089ff940d67f81d64c;hb=7f10a2f8adaea4ec69576c0a8905fde6809ee27d;hp=9dc97ce492559b77cd9738786ff24760d247c43c;hpb=84aee10629e5f04d34de5e4997e305cd2fd746cf;p=16.git diff --git a/src/planrpcx.c b/src/planrpcx.c index 9dc97ce4..06b1f29c 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,14 @@ 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]; + static byte e; + static word chx, chy, colpee; + byte pee[2]; //w=0; //printf("%u ", w++); @@ -60,7 +63,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 +86,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(); @@ -94,18 +98,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 +123,26 @@ getch(); printf("\n"); } } - col=0x0d, bgcol=0; - /* - for(i=0; i<8; i++) + + chx=0; + chy=0; + colpee=32; + for(e=0x00; e<=0xFE; e++) { - //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) + if(chx+8>(gvar.video.page[0].width/2)) { - //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); + chx=0; + chy+=8; + sprintf(pee,"%u", colpee); + modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 0); + //getch(); } - //fprintf(stderr, "\n"); - }*/ - chw += xp; + 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)); @@ -149,9 +152,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); }