From 8b19e2264d3bafb0fbe65519ea22ac23ca04ef6f Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 18 Jan 2017 12:14:32 -0600 Subject: [PATCH] fine tuning animation still --- src/lib/16_sprit.c | 4 ++++ src/lib/scroll16.c | 8 ++++---- src/lib/scroll16.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index e32e9f96..53cfc691 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -117,6 +117,9 @@ void oldanimate_spri(struct sprite *spri, video_t *video) // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0) vga_state.vga_draw_stride_limit = (video->page[0].width + 3 - spri->x) >> 2; +#ifndef SPRITE + modexClearRegion(&video->page[0], spri->x, spri->y, 16, 32, 1); +#else draw_vrl1_vgax_modex( spri->x,//-video->page[0].dx, spri->y,//-video->page[0].dy, @@ -125,6 +128,7 @@ void oldanimate_spri(struct sprite *spri, video_t *video) spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header), spri->sprite_vrl_cont->data_size ); +#endif // restore stride vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = video->page[0].stridew; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index d7b79bf5..9b07cb27 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -1209,7 +1209,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr word dire=10; //direction sword qq; //scroll offset word ls = player[pn].enti.persist_aniframe; -#ifdef SPRITE +#ifndef SPRITO int i=0; #endif switch(scrollswitch) @@ -1259,9 +1259,9 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr //#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire); //#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); -#ifdef SPRITE -//#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) +#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 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 b9bfed95..13809cd8 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -42,6 +42,7 @@ #include //#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); -- 2.39.5