0

when I using masked_blit function:

masked_blit( animations[which], buffer, 0, 0, x, y, animations[which]->w, animations[which]->h )

I get wrong colors on my buffer, my bmp is something like shifted or shocked.

this is my problem.

enter image description here

thanks for help

herohuyongtao
  • 49,413
  • 29
  • 133
  • 174

1 Answers1

0

The most likely cause of your problem is that you are using a video bitmap with this call and your hardware does not support it OR the two bitmaps (animations[] and buffer) are different color depths.

To discard the possibility of hardware not supporting this feature, check that the GFX_HW_VRAM_BLIT_MASKED bit in the gfx_capabilities flag is set on your PC.

If they are the same color depth, but your hardware does not support the feature, you can always use the calls with memory bitmaps as a source, so the animations will reside in RAM instead of the video memory.

Source:

Allegro 4.2.1 manual (pdf) - Sections 1.15.3 masked_blit and 1.9.13 gfx_capabilities

rlam12
  • 603
  • 5
  • 16