${TARGET}: ${TARGETTMP} | ${WORKINGDIR}
${Q1}${PRNTFMT} "cp" "$@"
${Q2}cp $< $@
- ${Q2}ln -s ${REALNAME} ${WORKINGDIR}/${LINKERNAME}
- ${Q2}ln -s ${REALNAME} ${WORKINGDIR}/${SONAME}
+ ${Q2}ln -sfn ${REALNAME} ${WORKINGDIR}/${LINKERNAME}
+ ${Q2}ln -sfn ${REALNAME} ${WORKINGDIR}/${SONAME}
# how to make a directory
${BLDDIRS}:
#ifndef AUTOLOCK_H
#define AUTOLOCK_H
-class Mutex;
-
-/// ***** Header Class *****
-class Autolock
+namespace pg
{
-public:
- Autolock(Mutex& mu);
- ~Autolock();
- void Lock();
- void Unlock();
+ 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&);
-// hide copying methods!
-private:
- Autolock(const Autolock&);
- const Autolock& operator ==(const Autolock&);
+ private:
+ Mutex& m_mu;
+ };
-private:
- Mutex& m_mu;
-};
+} // namespace pg
/// ***** Header Methods *****
#ifndef MUTEX_H
#define MUTEX_H
-/// ***** Header Class *****
-
class SDL_mutex;
-class Mutex
+namespace pg
{
-public:
- Mutex();
- ~Mutex();
- void init();
- void clean();
+ /// ***** Header Class *****
+
+ class Mutex
+ {
+ public:
+ Mutex();
+ ~Mutex();
+
+ void init();
+ void clean();
+
+ bool IsValid();
- bool IsValid();
+ void Lock();
+ void Unlock();
- void Lock();
- void Unlock();
+ // hide copying methods!
+ private:
+ Mutex(const Mutex&);
+ const Mutex& operator ==(const Mutex&);
-// hide copying methods!
-private:
- Mutex(const Mutex&);
- const Mutex& operator ==(const Mutex&);
+ private:
+ SDL_mutex* m_pSDL_mutex;
+ unsigned int m_uiThreadID;
+ };
-private:
- SDL_mutex* m_pSDL_mutex;
- unsigned int m_uiThreadID;
-};
+} // namespace pg
#endif // MUTEX_H
using std::string;
-/// ***** Header Class *****
-class Vector2
+namespace pg
{
- public:
- float m_fX;
- float m_fY;
- Vector2();
- Vector2(float, float);
+ /// ***** Header Class *****
+ class Vector2
+ {
+ public:
+ float m_fX;
+ float m_fY;
- void zero();
- void unit();
+ Vector2();
+ Vector2(float, float);
- float angle() const;
- float length() const;
- float sqrLength() const;
+ void zero();
+ void unit();
- float dot(const Vector2&) const;
+ float angle() const;
+ float length() const;
+ float sqrLength() const;
- Vector2 add(const Vector2&) const;
- Vector2 subtract(const Vector2&) const;
- Vector2 divide(float) const;
- Vector2 multiply(float) const;
+ float dot(const Vector2&) const;
- string toString() const;
- void print() const;
-};
+ Vector2 add(const Vector2&) const;
+ Vector2 subtract(const Vector2&) const;
+ Vector2 divide(float) const;
+ Vector2 multiply(float) const;
-/// ***** Header Methods *****
+ string toString() const;
+ void print() const;
+ };
-// definitions of the operators are external because (float, Vector2) would
-// fail inside the class
+ /// ***** Header Methods *****
-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);
+ // definitions of the operators are external to Vector2 because
+ // methodname(float, Vector2) would fail inside the class
-void operator+=(Vector2&, const Vector2&);
-void operator-=(Vector2&, const Vector2&);
-void operator*=(Vector2&, float);
-void operator/=(Vector2&, float);
+ 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);
+
+} // namespace pg
#endif // VECTOR2_H
using std::cerr;
using std::endl;
-void DPF(int level, const char* pstr);
-
-namespace debug
+namespace pg
{
- void init();
- void clean();
-}
-void DASSERT(bool fBreak);
+ void DPF(int level, const char* pstr);
+
+ namespace debug
+ {
+ void init();
+ void clean();
+ }
+
+ void DASSERT(bool fBreak);
+
+} // namespace pg
// comment out when not debugging
#define DEBUGGING
#include "Vector2.h"
-/// ***** Public Variables *****
+namespace pg
+{
-static const float PI = 3.1415926535897;
+ /// ***** Public Variables *****
-/// ***** Header Methods *****
+ static const float PI = 3.1415926535897;
-int mod(int, int);
+ /// ***** Header Methods *****
-/// Vector2 Math
+ int mod(int, int);
-Vector2 vectorToLine
-(
- const Vector2& vec,
- float x1,
- float y1,
- float x2,
- float y2
-);
+ /// Vector2 Math
-//Vector2 lineIntersection(Vector2&, Vector2&, Vector2&, Vector2&) const;
+ Vector2 vectorToLine
+ (
+ const Vector2& vec,
+ float x1,
+ float y1,
+ float x2,
+ float y2
+ );
-//void Rotate(float rads);
+ //Vector2 lineIntersection(Vector2&, Vector2&, Vector2&, Vector2&) const;
-float dot(const Vector2&, const Vector2&);
-Vector2 perp(const Vector2&);
+ //void Rotate(float rads);
-//TODO float projectionCoeff(const Vector2&, const Vector2&) const;
-//TODO void projection(const Vector2&, const Vector2&);
+ 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&);
+
+} // namespace pg
#endif // MATHW_H
#include "mathw.h"
+using namespace pg;
+
+
/// ***** Constructors/Destructors *****
Vector2::Vector2()
#include "Mutex.h"
#include "Autolock.h"
+using namespace pg;
+
/// ***** Public Methods *****
Mutex muDPF;
#include "Mutex.h"
+using namespace pg;
+
+
/// ***** Constructors/Destructors *****
Autolock::Autolock(Mutex& mu)
: m_mu(mu)
#include <SDL/SDL.h>
+using namespace pg;
+
+
Mutex::Mutex()
: m_pSDL_mutex(NULL)
{
#include "mathw.h"
+using namespace pg;
+
/// ***** Public Methods *****