Alpha Engine: AEEngine.h Source File

AlphaEngine

AEEngine.h
Go to the documentation of this file.
1 /******************************************************************************/
29 /******************************************************************************/
30 
31 #ifndef AE_ENGINE_H
32 #define AE_ENGINE_H
33 
34 // ---------------------------------------------------------------------------
35 // Includes
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <string.h>
39 #include <assert.h>
40 
41 #include <windows.h>
42 
43 #include "AEExport.h"
44 
45 // ---------------------------------------------------------------------------
46 // assert defines
47 
48 #ifndef AE_FINAL //User should define AE_FINAL to remove asserts
49 
50 // ---------------------------------------------------------------------------
51 
52 #define AE_ASSERT(x) \
53 { \
54  if((x) == 0) \
55  { \
56  PRINT("AE_ASSERT: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
57  #x, __LINE__, __FUNCTION__, __FILE__); \
58  exit(1); \
59  } \
60 }
61 
62 // ---------------------------------------------------------------------------
63 
64 #define AE_ASSERT_MESG(x, ...) \
65 { \
66  if((x) == 0) \
67  { \
68  PRINT("AE_ASSERT_MESG: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
69  #x, __LINE__, __FUNCTION__, __FILE__); \
70  PRINT("Mesg: "__VA_ARGS__); \
71  PRINT("\n"); \
72  exit(1); \
73  } \
74 }
75 
76 // ---------------------------------------------------------------------------
77 
78 #define AE_ASSERT_PARM(x) \
79 { \
80  if((x) == 0) \
81  { \
82  PRINT("AE_ASSERT_PARM: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
83  #x, __LINE__, __FUNCTION__, __FILE__); \
84  exit(1); \
85  } \
86 }
87 
88 // ---------------------------------------------------------------------------
89 
90 #define AE_ASSERT_ALLOC(x) \
91 { \
92  if((x) == 0) \
93  { \
94  PRINT("AE_ASSERT_ALLOC: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
95  #x, __LINE__, __FUNCTION__, __FILE__); \
96  exit(1); \
97  } \
98 }
99 
100 
101 // ---------------------------------------------------------------------------
102 
103 #define AE_WARNING(x) \
104 { \
105  if((x) == 0) \
106  { \
107  PRINT("AE_WARNING: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
108  #x, __LINE__, __FUNCTION__, __FILE__); \
109  } \
110 }
111 
112 // ---------------------------------------------------------------------------
113 
114 #define AE_WARNING_MESG(x, ...) \
115 { \
116  if((x) == 0) \
117  { \
118  PRINT("AE_WARNING_MESG: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
119  #x, __LINE__, __FUNCTION__, __FILE__); \
120  PRINT("Mesg: "__VA_ARGS__); \
121  PRINT("\n"); \
122  } \
123 }
124 
125 // ---------------------------------------------------------------------------
126 
127 #define AE_WARNING_PARM(x) \
128 { \
129  if((x) == 0) \
130  { \
131  PRINT("AE_WARNING_PARM: %s\nLine: %d\nFunc: %s\nFile: %s\n", \
132  #x, __LINE__, __FUNCTION__, __FILE__); \
133  } \
134 }
135 
136 // ---------------------------------------------------------------------------
137 
138 #else // AE_FINAL
139 
140 // ---------------------------------------------------------------------------
141 
142 #define AE_ASSERT(x)
143 #define AE_ASSERT_MESG(x, ...)
144 #define AE_ASSERT_PARM(x)
145 #define AE_ASSERT_ALLOC(x)
146 
147 #define AE_WARNING(x)
148 #define AE_WARNING_MESG(x, ...)
149 #define AE_WARNING_PARM(x)
150 #define AE_WARNING_ALLOC(x)
151 
152 // ---------------------------------------------------------------------------
153 
154 #endif // AE_FINAL
155 
156 // ---------------------------------------------------------------------------
157 
158 #define AE_FATAL_ERROR(...) \
159 { \
160  PRINT("AE_FATAL_ERROR: "__VA_ARGS__); \
161  exit(1); \
162 }
163 
164 // ---------------------------------------------------------------------------
165 // Alpha engine includes
166 
167 #include "AETypes.h" //Typedefs
168 #include "AEMath.h" //Maths libraray
169 #include "AEUtil.h" //Utility library
170 #include "AEFrameRateController.h" //Frame controller
171 #include "AESystem.h" //System library
172 #include "AEGraphics.h" //Graphics library
173 #include "AEInput.h" //Input library
174 #include "AEGameStateMgr.h" //Gamestates manager
175 
176 // ---------------------------------------------------------------------------
177 
178 #endif // AE_ENGINE_H
179 
Header file for the system library.
Header file for the math library.
Header file for the graphics library.
Header file for the library settings.
Header file for the game state manager.
Header file for the frame rate controller.
Header file for the typedefs.
Header file for the input library.
Header file for the utility library.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by   doxygen 1.8.5