![]() |
|
ALLEGRO_NO_ASM incompatibility |
Milan Mimica
Member #3,877
September 2003
![]() |
I've spent some time on trying to find out why AGL needs a #define ALLEGRO_NO_ASM in order to work with C-only Allegro on Windows and now I reduced the problem to Allegro itself.
This code does not work with C-only Allegro in Release mode. It crashes on _getpixel32() and I think I know why. The problem doesn't show in debug mode because function inlining is disabled, so this is more like a theory and I cannot prove this using a debuger. If you place #define ALLEGRO_NO_ASM before #include <allegro.h>, it works. It doesn't crash on getpixel() because it isn't inlined. edit: edit: To be more specific, it's a matter of which definition (ASM or C) of bmp_[read|write|unread]_line() is inlined inside _[get|put]_pixel().
-- |
|