From: sparky4 Date: Thu, 12 Jan 2017 23:50:07 +0000 (-0600) Subject: ==== PRE SHOWPAGE TO SHOWMV CONVERSION ==== i am going to work on a really big area... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=51b492de428068830f36b4ec57168f34c9477dab;p=16.git ==== PRE SHOWPAGE TO SHOWMV CONVERSION ==== i am going to work on a really big area of code it will be on the refresh system, the walking/scrolling system, things that use showpage, adding disableing 8087 functions if no 8087 detected, and a bunch of other things i cannot remember off the top of my head because i am BURNT. I need a small break~ -- -- -- -- update! i am working on this i made ZC_WALK and i am going to move to VRL/VRS soon! --- diff --git a/src/lib/16render.c b/src/lib/16render.c index 1a8f81f6..3a3a7a74 100755 --- a/src/lib/16render.c +++ b/src/lib/16render.c @@ -142,7 +142,7 @@ modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp) { void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp) { - word poffset = (word) page->data + y*(page->width/4) + x/4; + word poffset = (word)page->data + y*(page->width/4) + x/4; byte *data = bmp->data;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; word width = rw; diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 6d7f72ed..fba6fb05 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -184,7 +184,7 @@ bitmapLoadPcxTiles(char *filename, word twidth, word theight) { ts.palette = result.palette; /* allocate the pixel storage for the tiles */ - ts.data = malloc(sizeof(byte*) * ts.ntiles); + ts.data = _fmalloc(sizeof(byte*) * ts.ntiles); //ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight); for(i=1; i < ts.ntiles; i++) { ts.data[i] = ts.data[i-1] + twidth * theight; diff --git a/src/pcxtest.c b/src/pcxtest.c index 29183665..a7cb7cc7 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -77,12 +77,12 @@ void main() { modexPalUpdate1(&PCXBMP->palette); /* clear and draw one sprite and one bitmap */ - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1); + modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1); /* non sprite comparison */ - start = *clockw; + /*start = *clockw; //for(i=0; i<100 ;i++) { - oldDrawBmp(VGA, 20, 20, PCXBMPPTR, 0); + oldDrawBmp(VGA, 0, 0, PCXBMPPTR, 0); //} start = *clockw; @@ -97,20 +97,23 @@ void main() { //0000 modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 20, 20, 128, 20, 64, 64); modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 0, 0, 0, 0, 320, 240); //} - t2 = (*clockw-start)/18.2; + t2 = (*clockw-start)/18.2;*/ start = *clockw; //for(i=0; i<100 ;i++) { - oldDrawBmp(VGA, 20, 20, PCXBMPPTR, 1); + oldDrawBmp(VGA, 0, 0, PCXBMPPTR, 1); //} + t1 = (*clockw-start) /18.2; start = *clockw; //for(i=0; i<100 ;i++) { //0000 modexDrawSprite(&gvar.video.page[0], 20, 20, PCXBMPPTR); - modexDrawSprite(&gvar.video.page[0], 160, 120, PCXBMPPTR); + modexDrawSprite(&(gvar.video.page[0]), 160, 120, PCXBMPPTR); + modexDrawBmp(&gvar.video.page[0], 0, 128, PCXBMPPTR); //} + t2 = (*clockw-start)/18.2; //_fmemset(MK_FP(0xA000, 0), (int)p->plane, gvar.video.page[0].sw*(gvar.video.page[0].sh*2)); //modexDrawBmp(&gvar.video.page[0], 0, 0, PCXBMPPTR); while(!kbhit()) diff --git a/src/scroll.c b/src/scroll.c index be99ae36..ceb76bcc 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -129,7 +129,6 @@ void main(int argc, char *argv[]) if(!pageflipflop) VL_ShowPage(mv[1].page, 0, 0);//modexShowPage(mv[1].page); else ZC_ShowMV(&mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p) - modexDrawBmp(&gvar.video.page[0], 16, 16, PCXBMPPTR); /* buffer pages */ // modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 47); diff --git a/src/test.c b/src/test.c index a38f4b7e..bd0f7e7c 100755 --- a/src/test.c +++ b/src/test.c @@ -44,15 +44,10 @@ void main(int argc, char *argv[]) word startclk, endclk; word k; //====byte *pal, *pal2; - sword bakapee; //====word colo=LGQ; gvar.video.panp=0; - //argument - if(argv[1]) bakapee = atoi(argv[1]); - else bakapee = 1; - // DOSLIB: check our environment /*probe_dos(); @@ -94,7 +89,7 @@ void main(int argc, char *argv[]) IN_Default(0,&player,ctrl_Keyboard1); IN_initplayer(&player, 0); - VGAmodeX(bakapee, 1, &gvar); + VGAmodeX(1, 1, &gvar); //====modexPalBlack(); /* load our palette */ @@ -198,6 +193,7 @@ void main(int argc, char *argv[]) // if(i>PAL_SIZE) i=0; }//9*/ if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.panp]); IN_UserInput(1,1); }//p + if(IN_KeyDown(sc_F8)){ modexDrawSprite(&gvar.video.page[0], 160, 120, PCXBMPPTR); IN_UserInput(1,1); }//f8 //VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0); ZC_ShowMV(&mv, 0, 0); }