|
how to get width from sprite? |
Chaos Maker
Member #12,260
September 2010
|
how to get the width and height of sprite? |
StevenVI
Member #562
July 2000
|
In Allegro 4, BITMAP objects have w and h properties: BITMAP *myBitmap = load_bitmap("whatever.bmp", null); printf("myBitmap width: %d, height: %d", myBitmap->w, myBitmap->h); In Allegro 5, use the following functions on an ALLEGRO_BITMAP object: ALLEGRO_BITMAP *myBitmap = al_create_bitmap(32, 64); printf("myBitmap width: %d, height: %d", al_get_bitmap_width(myBitmap), al_get_bitmap_height(myBitmap));
__________________________________________________ |
Chaos Maker
Member #12,260
September 2010
|
|
|