97 #include "NxnaCommon.h"
100 #ifdef NXNA_ENABLE_MATH
105 #include "Quaternion.h"
114 int X, Y, Width, Height;
118 X = Y = Width = Height = 0;
121 Rectangle(
int x,
int y,
int width,
int height)
129 #ifdef NXNA_ENABLE_MATH
132 return Vector2(X + Width * 0.5f, Y + Height * 0.5f);
135 void GetCenter(
float* centerX,
float* centerY)
137 if (centerX !=
nullptr) *centerX = X + Width * 0.5f;
138 if (centerY !=
nullptr) *centerY = Y + Height * 0.5f;
144 #ifdef NXNA_ENABLE_RENDERER
145 #include "Graphics/GraphicsDevice.h"
146 #include "Graphics/PipelineState.h"
150 #ifdef NXNA_ENABLE_INPUT
151 #include "Input/Mouse.h"
154 #ifdef NXNA_ENABLE_SPRITEBATCH
155 #ifndef NXNA_ENABLE_RENDERER
156 #error NXNA_ENABLE_SPRITEBATCH requires NXNA_ENABLE_RENDERER
158 #include "Graphics/SpriteBatch.h"
161 #ifdef NXNA_ENABLE_SPRITEFONT
162 #ifndef NXNA_ENABLE_SPRITEBATCH
163 #error NXNA_ENABLE_SPRITEFONT requries NXNA_ENABLE_SPRITEBATCH
165 #include "Graphics/SpriteFont.h"
170 #ifdef NXNA2_IMPLEMENTATION
172 #ifdef NXNA_ENABLE_MATH
173 #include "Vector2.cpp"
174 #include "Vector3.cpp"
175 #include "Matrix.cpp"
176 #include "Quaternion.cpp"
179 #ifdef NXNA_ENABLE_RENDERER
180 #include "Graphics/GraphicsDevice.cpp"
181 #include "Graphics/OpenGL.cpp"
182 #include "Graphics/PipelineState.cpp"
185 #ifdef NXNA_ENABLE_INPUT
186 #include "Input/Mouse.cpp"
189 #ifdef NXNA_ENABLE_SPRITEBATCH
190 #include "Graphics/SpriteBatch.cpp"
193 #endif // NXNA2_IMPLEMENTATION