jajajajaja 
 
 amigos no se preocupen .............ya encontre la forma en que se hacia .........jiiii........es más sencillo de lo que yo me imaginaba........jajajaaja 
 
 les dejo el codigo por si a alguien le sirve..........chauuuuuuu.....
/*hace rebotar una pelota por una ventana*/
#include <allegro.h>
void init();
void deinit();
int main()
{
    init();
    BITMAP *pelota;
    BITMAP *bufer;
    PALETTE paleta;    
    int x_anterior;
    int y_anterior;
    int x,y,sel;
    int guar_x;
    int guar_y;    
    pelota=load_bitmap("pelota.bmp",paleta);    
    pelota=load_bitmap("pelota.bmp",paleta);
    set_palette(paleta);    
     if(pelota==NULL)
        deinit();     
     bufer=create_bitmap(pelota->w,pelota->h);     
     clear(bufer);     
     if(bufer==NULL)
        deinit();     
     x=SCREEN_W/2;
     y=SCREEN_H/2;
     guar_x=SCREEN_W/2-1;
     guar_y=SCREEN_W/2+1;
     while (!key[KEY_ESC]) 
     {                    
       if(x>guar_x)
       {
          guar_x=x;
          if(x>=SCREEN_W-pelota->w)
             x--;
          else
             x++;
       }
       if(x<guar_x)
       {
          guar_x=x;
          if(x<=SCREEN_W-SCREEN_W)
             x++;
          else
             x--;
       }
       if(y<guar_y)
       {
          guar_y=y;
          if(y<=0)
             y++;
          else
             y--;
       }
       if(y>guar_y)
       {
          guar_y=y;
          if(y>=SCREEN_H-pelota->h)
             y--;
          else 
             y++;
       }                                      
       blit(bufer,screen,0,0,x_anterior,y_anterior,bufer->w,bufer->h);
       blit(screen,bufer,x,y,0,0,bufer->w,bufer->h);                                       
       draw_sprite(screen,pelota,x,y);     
       vsync();//espera a que se muestre toda la imagen en pantalla
                     //para escribir la otra              
          x_anterior=x;
          y_anterior=y;
     }
     deinit();
     return 0;
}END_OF_MAIN();
void deinit() 
{
   clear_keybuf();
   /* añadir otras desintalaciones */
   allegro_exit();
}
void init() 
{
   int depth, res;
   allegro_init();
   depth = desktop_color_depth();
   if (depth == 0) 
        depth = 32;
   set_color_depth(depth);
   res = set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 400, 0, 0);
   if (res != 0) 
    {
      allegro_message(allegro_error);
      exit(-1);
    }
    install_keyboard();
}