#ifndef COLLISIONINFO_H
#define COLLISIONINFO_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Header Class *****
#ifndef EFFECT_H
#define EFFECT_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
// Mutual headers ...
#ifndef GRAVITY_H
#define GRAVITY_H
+#include <pg/Vector2.h>
+
#include "Effect.h"
-#include "Vector2.h"
/// ***** Header Class *****
#ifndef GRAVITYWELL_H
#define GRAVITYWELL_H
+#include <pg/Vector2.h>
+
#include "Effect.h"
-#include "Vector2.h"
/// ***** Header Class *****
#ifndef SCREEN_H
#define SCREEN_H
+#include <pg/Vector2.h>
+
#include "Effect.h"
-#include "Vector2.h"
/// ***** Header Class *****
*/
#include "Ball.h"
-#include "debug.h"
-#include "Vector2.h"
+#include <pg/debug.h>
+#include <pg/Vector2.h>
+
#include "graphics/graphics.h"
#ifndef BALL_H
#define BALL_H
+#include <pg/Vector2.h>
+
#include "PhysicsEntity.h"
-#include "Vector2.h"
/// ***** Header Class *****
#include "Entity.h"
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Constructors/Destructors *****
#ifndef ENTITY_H
#define ENTITY_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Header Class *****
#include "Line.h"
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Constructors/Destructors *****
#ifndef LINE_H
#define LINE_H
+#include <pg/Vector2.h>
+
#include "Particle.h"
-#include "Vector2.h"
/// ***** Header Class *****
#include "Particle.h"
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Constructors/Destructors *****
#ifndef PARTICLE_H
#define PARTICLE_H
+#include <pg/Vector2.h>
+
#include "Entity.h"
-#include "Vector2.h"
/// NOTE to SELF
*/
#include "PhysicsEntity.h"
-#include "debug.h"
+
+#include <pg/debug.h>
+#include <pg/Vector2.h>
#include "effectManager.h"
-#include "Vector2.h"
/// ***** Constructors/Destructors *****
#ifndef PHYSICS_H
#define PHYSICS_H
+#include <pg/Vector2.h>
+
#include "Entity.h"
-#include "Vector2.h"
/// ***** Header Class *****
#include "Point.h"
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Constructors/Destructors *****
#ifndef POINT_H
#define POINT_H
+#include <pg/Vector2.h>
+
#include "Particle.h"
-#include "Vector2.h"
/// ***** Header Class *****
*/
#include "Polygon.h"
-#include "debug.h"
-#include "Vector2.h"
+#include <pg/debug.h>
+#include <pg/Vector2.h>
#include "graphics/graphics.h"
#ifndef POLYGON_H
#define POLYGON_H
+#include <pg/Vector2.h>
+
#include "PhysicsEntity.h"
-#include "Vector2.h"
#include <vector>
using std::vector;
#include "WindParticle.h"
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Constructors/Destructors *****
#ifndef WINDPARTICLE_H
#define WINDPARTICLE_H
+#include <pg/Vector2.h>
+
#include "Point.h"
-#include "Vector2.h"
/// ***** Header Class *****
+++ /dev/null
-/*
- * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef VECTOR2_H
-#define VECTOR2_H
-
-#include <string>
-
-using std::string;
-
-/// ***** Header Class *****
-class Vector2
-{
- public:
- float m_fX;
- float m_fY;
-
- Vector2();
- Vector2(float, float);
-
- void zero();
- void unit();
-
- float angle() const;
- float length() const;
- float sqrLength() const;
-
- float dot(const Vector2&) const;
-
- Vector2 add(const Vector2&) const;
- Vector2 subtract(const Vector2&) const;
- Vector2 divide(float) const;
- Vector2 multiply(float) const;
-
- string toString() const;
- void print() const;
-};
-
-/// ***** Header Methods *****
-
-// definitions of the operators are external because (float, Vector2) would
-// fail inside the class
-
-Vector2 operator+(const Vector2&, const Vector2&);
-Vector2 operator-(const Vector2&, const Vector2&);
-Vector2 operator*(float, const Vector2&);
-Vector2 operator*(const Vector2&, float);
-Vector2 operator/(const Vector2&, float);
-
-void operator+=(Vector2&, const Vector2&);
-void operator-=(Vector2&, const Vector2&);
-void operator*=(Vector2&, float);
-void operator/=(Vector2&, float);
-
-#endif // VECTOR2_H
*/
#include "collisionManager.h"
-#include "debug.h"
-#include "Vector2.h"
+#include <pg/debug.h>
+#include <pg/Vector2.h>
+#include <pg/mathw.h>
#include "Entities/Ball.h"
#include "Entities/Polygon.h"
#include "CollisionInfo.h"
-#include "mathw.h"
-
/// ***** Private Method Headers *****
static void clearEntities();
*/
#include "config.h"
-#include "debug.h"
+
+#include <pg/debug.h>
#include <SDL/SDL.h>
#include "keys.h"
*/
#include "keys.h"
-#include "debug.h"
+
+#include <pg/debug.h>
#include <SDL/SDL.h>
#ifndef KEYS_H
#define KEYS_H
+#include <pg/debug.h>
+
#include <SDL/SDL.h>
#include <map>
#include <string>
-#include "debug.h"
-
/// ***** Header Methods *****
namespace key
{
*/
#include "reader.h"
-#include "debug.h"
+
+#include <pg/debug.h>
#include <iostream>
using std::cerr;
+++ /dev/null
-/*
- * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <iostream>
-using std::cout;
-using std::cerr;
-using std::endl;
-
-void DPF(int level, const char* pstr);
-
-namespace debug
-{
- void init();
- void clean();
-}
-
-void DASSERT(bool fBreak);
-
-// comment out when not debugging
-#define DEBUGGING
-
-
-#endif // DEBUG_H
#include "effectManager.h"
+#include <pg/Vector2.h>
+
#include <set>
#include "Effects/Effect.h"
#include "Effects/GravityWell.h"
#include "Effects/Screen.h"
-#include "Vector2.h"
#include "input/inputManager.h"
#include "config/config.h"
#ifndef EFFECTMANAGER_H
#define EFFECTMANAGER_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
+
#include "Entities/PhysicsEntity.h"
/// ***** Header Methods *****
#ifndef ENTITYCREATOR_H
#define ENTITYCREATOR_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
/// ***** Header Methods *****
namespace creator
*/
#include "entityManager.h"
-#include "debug.h"
+
+#include <pg/debug.h>
+#include <pg/Mutex.h>
+#include <pg/Autolock.h>
#include <set>
#include <SDL/SDL.h>
-#include "locks/Mutex.h"
-#include "locks/Autolock.h"
-
#include "Entities/Entity.h"
#include "Entities/Particle.h"
#include "Entities/PhysicsEntity.h"
*/
#include "game.h"
-#include "debug.h"
+
+#include <pg/debug.h>
#include <vector>
using std::vector;
*/
#include "graphics.h"
-#include "debug.h"
+
+#include <pg/debug.h>
+#include <pg/mathw.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <SDL/SDL.h>
#include <cmath>
-#include "mathw.h"
-
#include <iostream>
using std::cerr;
using std::cout;
#ifndef GRAPHICS_H
#define GRAPHICS_H
-#include "Vector2.h"
+#include <pg/Vector2.h>
+
#include <vector>
*/
#include "inputManager.h"
-#include "debug.h"
+
+#include <pg/debug.h>
#include <SDL/SDL.h>
#ifndef INPUT_H
#define INPUT_H
+#include <pg/Vector2.h>
+
#include <SDL/SDL.h>
-#include "Vector2.h"
/// ***** Header Methods *****
+++ /dev/null
-/*
- * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef AUTOLOCK_H
-#define AUTOLOCK_H
-
-class Mutex;
-
-/// ***** Header Class *****
-class Autolock
-{
-public:
- Autolock(Mutex& mu);
- ~Autolock();
-
- void Lock();
- void Unlock();
-
-// hide copying methods!
-private:
- Autolock(const Autolock&);
- const Autolock& operator ==(const Autolock&);
-
-private:
- Mutex& m_mu;
-};
-
-/// ***** Header Methods *****
-
-#endif // AUTOLOCK_H
+++ /dev/null
-/*
- * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef MUTEX_H
-#define MUTEX_H
-
-/// ***** Header Class *****
-
-class SDL_mutex;
-
-class Mutex
-{
-public:
- Mutex();
- ~Mutex();
-
- void init();
- void clean();
-
- bool IsValid();
-
- void Lock();
- void Unlock();
-
-// hide copying methods!
-private:
- Mutex(const Mutex&);
- const Mutex& operator ==(const Mutex&);
-
-private:
- SDL_mutex* m_pSDL_mutex;
- unsigned int m_uiThreadID;
-};
-
-#endif // MUTEX_H
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <pg/debug.h>
+
#include <GL/gl.h>
#include <GL/glu.h>
#include <SDL/SDL.h>
-#include "debug.h"
#include "handleSignal.h"
#include "game.h"
+++ /dev/null
-/*
- * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MATHW_H
-#define MATHW_H
-
-#include <math.h>
-#include "Vector2.h"
-
-
-/// ***** Public Variables *****
-
-static const float PI = 3.1415926535897;
-
-/// ***** Header Methods *****
-
-int mod(int, int);
-
-/// Vector2 Math
-
-Vector2 vectorToLine
-(
- const Vector2& vec,
- float x1,
- float y1,
- float x2,
- float y2
-);
-
-//Vector2 lineIntersection(Vector2&, Vector2&, Vector2&, Vector2&) const;
-
-//void Rotate(float rads);
-
-float dot(const Vector2&, const Vector2&);
-Vector2 perp(const Vector2&);
-
-//TODO float projectionCoeff(const Vector2&, const Vector2&) const;
-//TODO void projection(const Vector2&, const Vector2&);
-
-#endif // MATHW_H