Rally X
ELEN3009 Project by Justin Wernick and David Schneider
|
00001 #ifndef ALLEGRO_WRAPPERS_H 00002 #define ALLEGRO_WRAPPERS_H 00003 00004 #include <allegro5/allegro.h> 00005 #include <allegro5/allegro_primitives.h> 00006 #include <allegro5/allegro_font.h> 00007 #include <allegro5/allegro_ttf.h> 00008 00015 class InstallFailure {}; 00016 00025 class AllegroInit 00026 { 00027 public: 00031 AllegroInit(); 00035 AllegroInit(const AllegroInit& ref); 00040 //assignment operator provided by compiler. _initCount does not need incrementing on assignment, 00041 //because assignment does not make a new instance, just changes one. 00042 00043 ~AllegroInit(); 00044 private: 00045 static int _initCount; 00046 }; 00047 00057 class AllegroKeyboardInit 00058 { 00059 public: 00063 AllegroKeyboardInit(); 00067 AllegroKeyboardInit(const AllegroKeyboardInit& ref); 00071 ~AllegroKeyboardInit(); 00072 private: 00073 static int _initCount; 00074 AllegroInit _allegro; 00075 00076 //assignment operator provided by compiler. _initCount does not need incrementing on assignment, 00077 //because assignment does not make a new instance, just changes one. 00078 }; 00079 00089 class AllegroDrawingInit 00090 { 00091 public: 00095 AllegroDrawingInit(); 00099 AllegroDrawingInit(const AllegroDrawingInit& ref); 00103 ~AllegroDrawingInit(); 00104 private: 00105 static int _initCount; 00106 AllegroInit _allegro; 00107 00108 //assignment operator provided by compiler. _initCount does not need incrementing on assignment, 00109 //because assignment does not make a new instance, just changes one. 00110 }; 00111 00112 #endif