From 98ba22e7064db57316dfff1ae127feb3dceeb73e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Thu, 31 Jul 2014 13:58:22 +0200 Subject: Initial commit --- docs/html/_allegro_wrappers_8cpp_source.html | 223 +++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 docs/html/_allegro_wrappers_8cpp_source.html (limited to 'docs/html/_allegro_wrappers_8cpp_source.html') diff --git a/docs/html/_allegro_wrappers_8cpp_source.html b/docs/html/_allegro_wrappers_8cpp_source.html new file mode 100644 index 0000000..60278e3 --- /dev/null +++ b/docs/html/_allegro_wrappers_8cpp_source.html @@ -0,0 +1,223 @@ + + + + +Rally X: source/logic/AllegroWrappers.cpp Source File + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+
Rally X + +
+
ELEN3009 Project by Justin Wernick and David Schneider
+
+
+ + + + + +
+
+
source/logic/AllegroWrappers.cpp
+
+
+Go to the documentation of this file.
00001 #include "AllegroWrappers.h"
+00002 
+00003 int AllegroInit::_initCount = 0;
+00004 
+00005 AllegroInit::AllegroInit()
+00006 {
+00007     if (_initCount==0)
+00008     {
+00009         if (!al_init())
+00010         {
+00011             throw InstallFailure();
+00012         }
+00013     }
+00014     ++_initCount;
+00015 }
+00016 
+00017 AllegroInit::AllegroInit(const AllegroInit& ref)
+00018 {
+00019     if (_initCount==0)
+00020     {
+00021         if (!al_init())
+00022         {
+00023             throw InstallFailure();
+00024         }
+00025     }
+00026     ++_initCount;
+00027 }
+00028 
+00029 AllegroInit::~AllegroInit()
+00030 {
+00031     --_initCount;
+00032     if (_initCount==0)
+00033     {
+00034         al_uninstall_system();
+00035     }
+00036 }
+00037 
+00038 
+00039 int AllegroKeyboardInit::_initCount = 0;
+00040 
+00041 AllegroKeyboardInit::AllegroKeyboardInit()
+00042 {
+00043     if (_initCount==0)
+00044     {
+00045         if (!al_install_keyboard())
+00046         {
+00047             throw InstallFailure();
+00048         }
+00049     }
+00050     ++_initCount;
+00051 }
+00052 
+00053 AllegroKeyboardInit::AllegroKeyboardInit(const AllegroKeyboardInit& ref)
+00054 {
+00055     if (_initCount==0)
+00056     {
+00057         if (!al_install_keyboard())
+00058         {
+00059             throw InstallFailure();
+00060         }
+00061     }
+00062     ++_initCount;
+00063 }
+00064 
+00065 AllegroKeyboardInit::~AllegroKeyboardInit()
+00066 {
+00067     --_initCount;
+00068     if (_initCount==0) al_uninstall_keyboard();
+00069 }
+00070 
+00071 int AllegroDrawingInit::_initCount = 0;
+00072 
+00073 AllegroDrawingInit::AllegroDrawingInit()
+00074 {
+00075     if (_initCount==0)
+00076     {
+00077         if (!al_init_primitives_addon())
+00078         {
+00079             throw InstallFailure();
+00080         }
+00081         al_init_font_addon();
+00082         if (!al_init_ttf_addon())
+00083         {
+00084             throw InstallFailure();
+00085         }
+00086     }
+00087     ++_initCount;
+00088 }
+00089 
+00090 AllegroDrawingInit::AllegroDrawingInit(const AllegroDrawingInit& ref)
+00091 {
+00092     if (_initCount==0)
+00093     {
+00094         if (!al_init_primitives_addon())
+00095         {
+00096             throw InstallFailure();
+00097         }
+00098         al_init_font_addon();
+00099         if (!al_init_ttf_addon())
+00100         {
+00101             throw InstallFailure();
+00102         }
+00103     }
+00104     ++_initCount;
+00105 }
+00106 
+00107 AllegroDrawingInit::~AllegroDrawingInit()
+00108 {
+00109     --_initCount;
+00110     if (_initCount==0)
+00111     {
+00112         al_shutdown_ttf_addon();
+00113         al_shutdown_font_addon();
+00114         al_shutdown_primitives_addon();
+00115     }
+00116 }
+
+
+ +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator
+ + +
+ +
+ + + + + + + -- cgit v1.2.3