From: sparky4 Date: Thu, 29 Oct 2015 16:20:22 +0000 (-0500) Subject: >< X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=6c9777deaf1f9c47fd66742921770777c552a46e;p=16.git >< --- diff --git a/16.exe b/16.exe index 0927fe1f..4539202a 100755 Binary files a/16.exe and b/16.exe differ diff --git a/bakapi.exe b/bakapi.exe index 466745c8..54433751 100755 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 9c5f0558..a0b7911b 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fmemtest.exe b/fmemtest.exe index d2fbb904..01aa5079 100755 Binary files a/fmemtest.exe and b/fmemtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index 49039750..8e57c3f1 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttest.exe b/fonttest.exe index 7bf6f43c..245ac55a 100755 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/inputest.exe b/inputest.exe index f529b881..df1becf1 100755 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/maptest.exe b/maptest.exe index 76efbe59..30cd9163 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index c1a30ac5..a2b41e3c 100755 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/palettel.exe b/palettel.exe index 9dc86ef6..5a0c33cc 100755 Binary files a/palettel.exe and b/palettel.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 01b317fe..096baf80 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/pcxtest2.exe b/pcxtest2.exe index 4e01e76c..4c7ff50a 100755 Binary files a/pcxtest2.exe and b/pcxtest2.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 8a996516..97197764 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 48acb928..7b6dd23b 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 0534708c..08ce66fd 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -31,6 +31,7 @@ #include "src/lib/16_head.h" #include "src/lib/timer.h" #include "src/lib/bitmap.h" +#include "src/lib/planar.h" #ifdef __DEBUG__ //#define __DEBUG_InputMgr__ @@ -222,7 +223,8 @@ typedef struct word d; //direction!! wwww word q; //loop variable word speed; //player speed! - bitmap_t data; //supposively the sprite sheet data + planar_buf_t data; //supposively the sprite sheet data +// bitmap_t data; //supposively the sprite sheet data sword hp; //hitpoints of the player int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ CursorInfo info; diff --git a/src/lib/modex16.c b/src/lib/modex16.c index e77d5c1b..9b7f4c4c 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -398,47 +398,29 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) { //memory management needs to be added //void //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) +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; - int px, py, i; -// byte near *buff; - px=x; - py=y; -// buff = _nmalloc(p->pwidth+1); - // TODO Make this fast. It's SLOOOOOOW -// for(plane=0; plane < 4; plane++) { -// i=0; -// modexSelectPlane(PLANE(plane+x)); -// for(px = plane; px < p->width; px+=4) { -// offset=px; -// for(py=0; pyheight/2; py++) { -// //SELECT_ALL_PLANES(); -// if(!sprite || p->plane[offset]) -// page->data = &(p->plane[offset][i++]); -// offset+=p->width; -// offset++; -// } -// } -// } - for(plane=0; plane < 4; plane++) { - i=(rx/4)+((rx/4)*ry); - modexSelectPlane(PLANE(plane+x)); - for(; y < py+p->height; 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)), buff, p->pwidth); - _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth); - //} - } - x=px; - y=py; - } -// _nfree(buff); + int plane; + int px, py, i; + px=x; + py=y; + for(plane=0; plane < 4; plane++) { + i=(rx/4)+((rx/4)*ry); + 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+=rw]), rw/4); + //} + } + x=px; + y=py; + } } + /*temp*/ void DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite) diff --git a/src/pcxtest.c b/src/pcxtest.c index 7a8c3389..f423b6a5 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -29,31 +29,6 @@ global_game_variables_t gvar; -/* -void -DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite) -{ - byte plane; - word px, py; - word offset; - - // TODO Make this fast. It's SLOOOOOOW - for(plane=0; plane < 4; plane++) { - modexSelectPlane(PLANE(plane+x)); - for(px = plane; px < p->width; px+=4) { - offset=px; - for(py=0; pyheight/2; py++) { - SELECT_ALL_PLANES(); - if(!sprite || p->plane[offset]) - page->data = p->plane; - //offset+=p->width; - //offset++; - } - } - } -} -*/ - void main() { bitmap_t bmp; planar_buf_t *p; diff --git a/src/scroll.c b/src/scroll.c index 55df4a4b..1156d70f 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -35,7 +35,7 @@ player_t player[MaxPlayers]; //page_t screen, gvar.video.page[1], gvar.video.page[2]; map_view_t mv[3]; map_view_t *bg, *spri, *mask;//, *tmp; -planar_buf_t *p; +bitmap_t p; float t; sword bakapee; @@ -90,11 +90,11 @@ void main(int argc, char *argv[]) mappalptr = map.tiles->data->palette; /* data */ - player[0].data = bitmapLoadPcx("data/ptmp.pcx"); // load sprite + p = bitmapLoadPcx("data/ptmp.pcx"); // load sprite //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite /* create the planar buffer */ - p = planar_buf_from_bitmap(&player[0].data); + (player[0].data) = *planar_buf_from_bitmap(&p); //0000 printf("planar buffer ok\n"); #endif /* input! */ @@ -187,7 +187,7 @@ void main(int argc, char *argv[]) modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); #ifdef SPRITE #ifdef BMPTYPE - oldDrawBmp(VGA, player[0].x-4, player[0].y-TILEWH, &player[0].data, 1); + //oldDrawBmp(VGA, player[0].x-4, player[0].y-TILEWH, &player[0].data, 1); #else modexDrawSpriteRegion(spri->page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &player[0].data); #endif diff --git a/test.exe b/test.exe index 18b670ef..e7c3fc18 100755 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 7bb49f12..5e68112e 100755 Binary files a/test2.exe and b/test2.exe differ diff --git a/vgmtest.exe b/vgmtest.exe index f0bd57fe..f822b1ef 100755 Binary files a/vgmtest.exe and b/vgmtest.exe differ