From: sparky4 Date: Thu, 29 Oct 2015 18:24:31 +0000 (-0500) Subject: eeeeeeeeeeeeee hmmm i do not know why it is fack! ww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=e05d04b2d480b4490ee5b2b5d6a4a439265a8cfb;p=16.git eeeeeeeeeeeeee hmmm i do not know why it is fack! ww --- diff --git a/16.exe b/16.exe index e9b826c7..0eac45e6 100755 Binary files a/16.exe and b/16.exe differ diff --git a/bakapi.exe b/bakapi.exe index c1dc4e1d..4bc4733b 100755 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 3fb55e35..0645e31e 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index 78118a32..13953f93 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/maptest.exe b/maptest.exe index de0a26ee..0ebfa9fa 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index 21f15bbf..38431222 100755 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/palettel.exe b/palettel.exe index f0f993b7..de042c2f 100755 Binary files a/palettel.exe and b/palettel.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 597fad83..a5070a2f 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/pcxtest2.exe b/pcxtest2.exe index 7f3ebbd2..0e215b4c 100755 Binary files a/pcxtest2.exe and b/pcxtest2.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index af2dd6a4..390b3783 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 2ff8350a..c93f9c18 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 63231108..19ab89c7 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -400,22 +400,33 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) { //modexDrawBmpRegion (page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp) void modexDrawPBufRegion (page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite) { - int plane; - //const int px, py; + sword plane; int i; - const int px=x-page->dx; - const int py=y-page->dy; + const int px=x;//-page->dx; + const int py=y;//-page->dy; + #define PEEE ((rw)/4)-rx + //-(rx/4) + #define PEEEE ((p->pwidth)*(ry)) + //y=py; + //x=px; + //printf("%d,%d p(%d,%d) r(%d,%d) rwh(%d,%d)\n", x, y, px, py, rx, ry, rw, rh); for(plane=0; plane < 4; plane++) { - i=(rw/4)+((p->pwidth)*ry); + i=PEEE+PEEEE; + //printf("PEEE=%d ", PEEE); + //printf("PEEEE=%d ", PEEEE); + //printf("i=%d\n", i); modexSelectPlane(PLANE(plane+x)); for(; y < py+rh; y++) { //for(px=0; px < p->width; px++) { //printf("%02X ", (int) p->plane[plane][i++]); // _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth); // printf("buff %u==%s\n", y, *buff); - _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), rw/4); + _fmemcpy(page->data + (((page->width/4) * y) + (x / 4)), &(p->plane[plane][i+=p->pwidth]), (rw/4)); //} + //if(plane==3) IN_Ack(); } + /*printf("y%d=%d ", plane, y); + if(plane==3) printf("y%d=%d\n", plane, y);*/ x=px; y=py; } @@ -429,8 +440,10 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite) int plane; int i; // byte near *buff; - const int px=x; - const int py=y; + const int px=x+page->dx; + const int py=y+page->dy; + x=px; + y=py; // buff = _nmalloc(p->pwidth+1); // TODO Make this fast. It's SLOOOOOOW // for(plane=0; plane < 4; plane++) { @@ -456,7 +469,7 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite) // _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth); // printf("buff %u==%s\n", y, *buff); // _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), buff, p->pwidth); - _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth); + _fmemcpy(page->data + (((page->width/4) * y) + (x / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth); //} } x=px; @@ -507,10 +520,6 @@ modexDrawBmpRegion(page_t *page, int x, int y, word rowCounter; byte planeCounter = 4; -/* printf("bmp->data=%Fp\n",bmp->data); - printf("*bmp->data=%Fp\n",*(bmp->data)); - printf("&bmp->data=%Fp\n",&(bmp->data));*/ - //code is a bit slow here __asm { MOV AX, SCREEN_SEG ; go to the VGA memory diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index a60d13ea..ccc347a5 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -65,6 +65,7 @@ void walk(map_view_t *pip, player_t *player, word pn) #else modexDrawSpriteRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, &player[pn].data); #endif +#else modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 14); #endif modexShowPage(pip[1].page); diff --git a/src/planrpcx.c b/src/planrpcx.c index dda07176..95940152 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -58,7 +58,7 @@ baka = 1; bmp = bitmapLoadPcx(bakapeee); p = planar_buf_from_bitmap(&bmp); ptmpbt = bitmapLoadPcx("data/ptmp.pcx"); - ptmp = planar_buf_from_bitmap(&bmp); + ptmp = planar_buf_from_bitmap(&ptmpbt); VGAmodeX(baka, &gvar); gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); @@ -88,9 +88,8 @@ baka = 1; modexDrawPBuf(&gvar.video.page[0], 0, 0, p, 0); } t2 = (*clockw-start) /18.2; - getch(); modexPalUpdate1(ptmpbt.palette); - modexDrawPBufRegion(&gvar.video.page[0], 140, 140, 48, 32, 24, 32, ptmp, 1); + modexDrawPBufRegion(&gvar.video.page[0], 160, 140, 48, 32, 24, 32, ptmp, 1); while(!kbhit()) { } @@ -104,20 +103,20 @@ baka = 1; for(plane=0; plane < 4; plane++) { i=0; printf("Plane %d\n", plane); - for(py=0; py < p->height; py++) { - for(px=0; px < p->pwidth; px++) { - printf("%02X ", (int) p->plane[plane][i++]); + for(py=0; py < ptmp->height; py++) { + for(px=0; px < ptmp->pwidth; px++) { + printf("%02X ", (int) ptmp->plane[plane][i++]); } printf("\n"); } } col=0x0d, bgcol=0; - for(i=0; i<8; i++) + /*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);*/ + //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; @@ -130,7 +129,7 @@ baka = 1; 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); diff --git a/test.exe b/test.exe index a5a0ebae..0ad7e77c 100755 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index e1fc73c8..3b0ebe5d 100755 Binary files a/test2.exe and b/test2.exe differ