#include "allegro.h" #define WHITE makecol(255,255,255) int main() { BITMAP *cowboy; int x, y, n; float size = 8; //initialize the program allegro_init(); install_keyboard(); set_color_depth(16); set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); //print some status information textprintf(screen,font,0,0,WHITE,"Resolution = %ix%i", SCREEN_W, SCREEN_H); textprintf(screen, font, 0, 10, WHITE, "Color depth = %i", bitmap_color_depth(screen)); //load the dragon bitmap cowboy = load_bitmap("spacecowboy1.bmp", NULL); //draw the sprite for (n = 0; n < 11; n++) { y = 30 + size; stretch_sprite(screen, cowboy, size, y, size, size); textprintf(screen,font,size+size+10,y,WHITE,"%ix%i",(int)size,(int)size); size *= 1.4; } //delete the bitmap destroy_bitmap(cowboy); while(!key[KEY_ESC]); return 0; } END_OF_MAIN();