From: sparky4 Date: Mon, 23 Jan 2017 14:39:14 +0000 (-0600) Subject: dang it./wbuild.sh vga_state.vga_graphics_ram = video->omemptr; causes it to not... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=8622c796df9132f646b1b8ce375a1f334589a33f;p=16.git dang it./wbuild.sh vga_state.vga_graphics_ram = video->omemptr; causes it to not have sprite in right spot! --- diff --git a/qdl.sh b/qdl.sh new file mode 100755 index 00000000..ac14d9e8 --- /dev/null +++ b/qdl.sh @@ -0,0 +1 @@ +grep -iR "$1" src/lib/doslib/* diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index 53cfc691..6c6cde55 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -172,6 +172,7 @@ void animate_spri(struct sprite *spri, video_t *video) // Events go here + //omemptr = vga_state.vga_graphics_ram; // save original mem ptr omemptr = (VGA_RAM_PTR)video->page[0].data;//vga_state.vga_graphics_ram; // save original mem ptr x=spri->x; y=spri->y; @@ -222,6 +223,7 @@ void animate_spri(struct sprite *spri, video_t *video) ); #endif // restore ptr + //vga_state.vga_graphics_ram = video->omemptr; vga_state.vga_graphics_ram = omemptr; // block copy to visible RAM from offscreen @@ -233,6 +235,7 @@ void animate_spri(struct sprite *spri, video_t *video) vga_restore_rm0wm0(); // restore stride + //vga_state.vga_draw_stride_limit= video->vga_draw_stride_limit; vga_state.vga_draw_stride= video->vga_draw_stride; vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = GVARVIDEO->page[0].stridew; // Depending on delay, update indices diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 5936022d..cc96f290 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -260,6 +260,11 @@ typedef struct page_t page[MAXPAGE]; //can be used as a pointer to root page[0] word vmem_remain; //remaining video memory byte num_of_pages; //number of actual pages + //doslib origi vars + byte far * omemptr; + byte vga_draw_stride; + byte vga_draw_stride_limit; // further X clipping +// boolean __near p; //render page number //BLEH boolean __near r; //page flip if true word pr[MAXPAGE][4]; //render sections of pages (this is supposed to be set up to draw sections of the screen if updated) diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 07eb939f..1c9f94d5 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -292,6 +292,10 @@ void modexHiganbanaPageSetup(video_t *video) modexCalcVmemRemain(video); video->p=0; video->r=1; + //doslib origi var + video->omemptr= vga_state.vga_graphics_ram; + video->vga_draw_stride= vga_state.vga_draw_stride; + video->vga_draw_stride_limit= vga_state.vga_draw_stride_limit; //setup the buffersize video->page[0].dx=video->page[0].dy= diff --git a/src/lib/doslib b/src/lib/doslib index b9ab630a..8d600cad 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit b9ab630a721c6f7503b9b76f981ef89046219a6a +Subproject commit 8d600cad129e0cc05c1474a492b7fd7acb6b2f0a diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 9b07cb27..07ee2714 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -1260,8 +1260,8 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr //#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, dire); //#define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire); #ifndef SPRITO -#define DRAWFRAME if (i == -1) return; oldanimate_spri(player[pn].ent->spri, pip->video) -//#define DRAWFRAME if (i == -1) return; animate_spri(player[pn].ent->spri, pip->video) +//#define DRAWFRAME if (i == -1) return; oldanimate_spri(player[pn].ent->spri, pip->video) +#define DRAWFRAME if (i == -1) return; animate_spri(player[pn].ent->spri, pip->video) #define NFRAME1 i = set_anim_by_id(player[pn].ent->spri, 2+dire); DRAWFRAME; #define NFRAME2 i = set_anim_by_id(player[pn].ent->spri, 1+dire); DRAWFRAME; #define NFRAME3 i = set_anim_by_id(player[pn].ent->spri, dire); DRAWFRAME; diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 13809cd8..fe3fe4eb 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -41,12 +41,10 @@ #include #include -//#define SPRITE -#define SPRITO +#define SPRITE +//#define SPRITO //#define TILERENDER -//extern void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp); - //modexDrawSpritePBufRegion //modexDrawBmpPBufRegion //#define PBUFSFUN modexDrawSpriteRegion