#include "ScreenPanel.h" const ALLEGRO_COLOR ScreenPanel::BLANK = al_map_rgb(0,0,0); ScreenPanel::ScreenPanel(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, int x, int y, int width, int height) :_width(width), _height(height) { _back = al_create_sub_bitmap(back, x, y, _width, _height); _front = al_create_sub_bitmap(front, x, y, _width, _height); } ScreenPanel::~ScreenPanel() { al_destroy_bitmap(_back); al_destroy_bitmap(_front); } void ScreenPanel::flip() { ALLEGRO_BITMAP* temp = _back; _back = _front; _front = temp; }