faster gif render
This commit is contained in:
parent
a2d831d5bf
commit
87950856e8
|
@ -459,7 +459,7 @@ static void anigif_do(void *data)
|
|||
{
|
||||
if (gfx_frame_gif(el_img(el_spic))) {
|
||||
game_cursor(CURSOR_ON);
|
||||
gfx_flip();
|
||||
gfx_update_gif(el_img(el_spic));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -658,6 +658,17 @@ int gfx_frame_gif(img_t img)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void gfx_update_gif(img_t img)
|
||||
{
|
||||
anigif_t ag;
|
||||
ag = is_anigif(img);
|
||||
if (!ag)
|
||||
return;
|
||||
if (!ag->drawn)
|
||||
return;
|
||||
gfx_update(ag->x, ag->y, gfx_img_w(img), gfx_img_h(img));
|
||||
}
|
||||
|
||||
void gfx_draw_wh(img_t p, int x, int y, int w, int h)
|
||||
{
|
||||
SDL_Surface *pixbuf = (SDL_Surface *)p;
|
||||
|
|
|
@ -127,5 +127,6 @@ extern void gfx_stop_gif(img_t img);
|
|||
extern int gfx_frame_gif(img_t img);
|
||||
extern void gfx_del_timer(timer_t han);
|
||||
extern timer_t gfx_add_timer(int delay, int (*fn)(int, void*), void *aux);
|
||||
extern void gfx_update_gif(img_t img);
|
||||
#endif
|
||||
|
||||
|
|
Reference in a new issue