Rally X
ELEN3009 Project by Justin Wernick and David Schneider
source/presentation/ScreenPanel.cpp
Go to the documentation of this file.
00001 #include "ScreenPanel.h"
00002 
00003 const ALLEGRO_COLOR ScreenPanel::BLANK = al_map_rgb(0,0,0);
00004 
00005 ScreenPanel::ScreenPanel(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, int x, int y, int width, int height)
00006     :_width(width),
00007     _height(height)
00008 {
00009     _back = al_create_sub_bitmap(back, x, y, _width, _height);
00010     _front = al_create_sub_bitmap(front, x, y, _width, _height);
00011 }
00012 
00013 ScreenPanel::~ScreenPanel()
00014 {
00015     al_destroy_bitmap(_back);
00016     al_destroy_bitmap(_front);
00017 }
00018 
00019 void ScreenPanel::flip()
00020 {
00021     ALLEGRO_BITMAP* temp = _back;
00022     _back = _front;
00023     _front = temp;
00024 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator