fixes to anigif

This commit is contained in:
p.kosyh 2009-10-02 14:13:37 +00:00
parent 4d416adc0a
commit 764d0df2db
2 changed files with 8 additions and 5 deletions

View file

@ -1150,11 +1150,11 @@ int game_cmd(char *cmd)
if (game_theme.gfx_mode != GFX_MODE_EMBEDDED) {
el_draw(el_ways);
if ((new_pict || new_place)) {
if ((new_pict || new_place))
el_draw(el_spic);
gfx_start_gif(el_img(el_spic));
}
}
gfx_start_gif(el_img(el_spic));
txt_box_resize(el_box(el_scene), game_theme.win_w, game_theme.win_h - title_h - ways_h - pict_h);
el_draw(el_scene);

View file

@ -257,9 +257,12 @@ extern int timer_counter;
static void anigif_frame(anigif_t g)
{
SDL_Rect dest;
SDL_Rect clip;
img_t *img = NULL;
AG_Frame *frame;
frame = &g->frames[g->cur_frame];
SDL_GetClipRect(screen, &clip);
dest.x = g->x;
dest.y = g->y;
@ -295,7 +298,7 @@ static void anigif_frame(anigif_t g)
dest.y += frame->y;
SDL_BlitSurface(frame->surface, NULL, screen, &dest);
g->delay = timer_counter;
gfx_noclip();
SDL_SetClipRect(screen, &clip);
}
/*
@ -2369,5 +2372,5 @@ timer_t gfx_add_timer(int delay, int (*fn)(int, void*), void *aux)
void gfx_del_timer(timer_t han)
{
if (han)
SDL_RemoveTimer((SDL_TimerID*)han);
SDL_RemoveTimer((SDL_TimerID)han);
}