//API Sanity check //Graphcis check: Steps to first blit in potential API. Uses autodetection, but no feature requests. int main(int argc, const char *argv) { al_initialize(); //Autodetection/driver name, Driver mode, Use emulation mode, Width, height, driver features, array of blit-params, number of blit-params in array ALG_DRIVER *graphics_driver = alg_create_driver(ALG_AUTODETECTION, ALG_FULLSCREEN, AL_FALSE, 800, 600, NULL, NULL, 0); //Driver, framebuffer index to retrieve (multiple frame buffers), buffering/update logic. ALG_BITMAP *frame_buffer = alg_create_framebuffer(graphics_driver, 0, ALG_UPDATE_DONT_CARE); //Bitmap, color to clear to. alg_clear_bitmap(frame_buffer, ALG_COLOR_RGB(0, 0, 0)); //Driver, memory "hint", pixel format, pixel size, width, height ALG_BITMAP *source_bmp = alg_create_bitmap(graphics_driver, ALG_STATIC_SOURCE, ALG_RGB, ALG_565, 200, 200); /* LOAD/CREATE BITMAP DATA */ //Bitmap to load into, pixel format of data, pixel size of data, pointer to data. alg_load_bitmap_data(source_bmp, ALG_RGB, ALG_565, bitmap_data); ALG_BLIT_PARAM the_params; //ALG_BLIT_PARAM struct to initialize with default values. alg_init_params(&the_params); /* SETUP THE BLIT PARAMS*/ //dest bitmap, source bitmap, dest x, dest y, source x, source y alg_blit(frame_buffer, source_bmp, 0, 0, 0, 0, the_params); //Driver, Which framebuffer to display for multi-buffer drivers. alg_display_framebuffer(graphics_driver, 0); //Driver alg_destroy_driver(graphics_driver); al_terminate(); }