Allegro Mouse

ok this is whats happening. whenever i move my mouse over some graphic, lets say some tiles i've loaded, there will be white squares drawn behind the mouse. im showing my mouse onto the DoubleBuffer, not the screen :

void blitBuffer(){
  blit(DoubleBuffer, screen, 0, 0, 0, 0, DoubleBuffer->w, DoubleBuffer->h);
  clear_to_color(DoubleBuffer, makecol(255,255,255));

i tried replacing clear_to_color() with clear(). now black rectangles appear. and when the mouse move over sprites(NPC and stuff), the sprite will flicker. how do i fix that?

Kitty Cat

Don't use show_mouse on a memory bitmap. Call show_mouse(NULL) at init, and do:
draw_sprite(DoubleBuffer, mouse_sprite, mouse_x, mouse_y);
before blitting the double buffer to the screen.


woot that was fast :o thank you, it solved the problem! ;D

Thread #591826. Printed from