From: sparky4 Date: Tue, 10 Nov 2015 19:17:13 +0000 (-0600) Subject: hmmm let me see what i did before wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=406b5fda9569ccdcf5fad9944f442b24ec0662fa;p=16.git hmmm let me see what i did before wwww --- diff --git a/16.exe b/16.exe index d5d82999..2f888ff5 100755 Binary files a/16.exe and b/16.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 058950a1..a57147b3 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/maptest.exe b/maptest.exe index 52f66585..b9ff97de 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 9bbd7e12..42a26c7e 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/pcxtest2.exe b/pcxtest2.exe index b1c39e31..5ce969cc 100755 Binary files a/pcxtest2.exe and b/pcxtest2.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 489d0e87..0ca8800a 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 8c3a3e17..dc868b0e 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/modex16.h b/src/lib/modex16.h index f4a07ad4..81f24bea 100755 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -24,7 +24,6 @@ */ #ifndef MODEX16_H #define MODEX16_H -//#include #include "src/lib/16_head.h" #include "src/lib/bitmap.h" @@ -134,9 +133,6 @@ extern byte far* VGA; /* The VGA Memory */ #define SET_MODE 0x00 #define VGA_256_COLOR_MODE 0x13 #define TEXT_MODE 0x03 -//#define SCREEN_WIDTH 320 -//#define SCREEN_HEIGHT 240 -//#define PAGE_SIZE (word)(SCREEN_WIDTH/4 * SCREEN_HEIGHT) #define AC_INDEX 0x03c0 #define SC_INDEX 0x03c4 diff --git a/src/lib/modex16/16render.c b/src/lib/modex16/16render.c index 89ba13dc..0a6298bc 100755 --- a/src/lib/modex16/16render.c +++ b/src/lib/modex16/16render.c @@ -289,8 +289,8 @@ modexDrawBmpPBufRegion(page_t *page, int x, int y, word poffset = (word) page->data + y*(page->width/4) + x/4; byte *data = *bmp->plane;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; - word width = rw/4; - word height = rh/4; + word width = rw; + word height = rh; byte plane = 1 << ((byte) x & 0x03); word scanCount = width/4 + (width%4 ? 1 :0); word nextPageRow = page->width/4 - scanCount; @@ -356,8 +356,8 @@ modexDrawSpritePBufRegion(page_t *page, int x, int y, word poffset = (word)page->data + y*(page->width/4) + x/4; byte *data = *bmp->plane;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; - word width = rw/4; - word height = rh/4; + word width = rw; + word height = rh; byte plane = 1 << ((byte) x & 0x03); word scanCount = width/4 + (width%4 ? 1 :0); word nextPageRow = page->width/4 - scanCount; diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 9f4936b9..2e1cd488 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -56,7 +56,7 @@ typedef struct { } tileset_t; typedef struct { - byte far *plane[4]; /* 4 planes of image data */ + byte huge *plane[4]; /* 4 planes of image data */ word width; /* width of the image (spread across 4 planes) */ word height; /* height of the image (spread across 4 planes) */ word pwidth; /* the number of bytes in each plane */ diff --git a/src/planrpcx.c b/src/planrpcx.c index cb12e6ad..46aea023 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -30,7 +30,7 @@ planar_buf_t p, ptmp; int i; word start;//, w; int plane; -float t1, t2, tpee; +float t1, t2, t3, t4, tpee; int x,y; word px,py; sword baka; @@ -78,23 +78,30 @@ baka = 1; start = *clockw; // oldDrawBmp(VGA, 20, 20, &bmp, 0); for(i=0; i<100 ;i++) { - modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, p.width, p.height, &p); -// 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); + } + t2 = (*clockw-start) /18.2; getch(); // start = *clockw; // modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 0, 0, 0, 0, 320, 240); // t2 = (*clockw-start)/18.2; start = *clockw; for(i=0; i<100 ;i++) { -// modexDrawPBuf(&gvar.video.page[0], 0, 0, &p, 0); - modexDrawBmpPBuf (&gvar.video.page[0], p.width+32, 32, &p); + modexDrawPBuf (&gvar.video.page[0], 0, 0, &p, 0); } - t2 = (*clockw-start) /18.2; -//++++ modexPalUpdate1(ptmp.palette); + t3 = (*clockw-start) /18.2; + for(i=0; i<100 ;i++) { + modexDrawPBufRegion (&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); + //modexDrawPBuf(&gvar.video.page[0], 64, 64, &ptmp, 0); +getch(); while(!kbhit()) { } @@ -135,12 +142,12 @@ baka = 1; 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)); - //fprintf(stderr,"pw=%d\n", p.width); - //fprintf(stderr,"ph=%d\n", p.height); - //fprintf(stderr,"ppw=%d\n", p.pwidth); - //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)); + fprintf(stderr,"%d\n", sizeof(p.plane)); + fprintf(stderr,"pw=%d\n", p.width); + fprintf(stderr,"ph=%d\n", p.height); + fprintf(stderr,"ppw=%d\n", p.pwidth); + 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); diff --git a/test.exe b/test.exe index c42ae469..5caab693 100755 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 886eb317..6cddf533 100755 Binary files a/test2.exe and b/test2.exe differ