#ifndef AUTOLOCK_H
#define AUTOLOCK_H
+
namespace pg
{
} // namespace pg
-/// ***** Header Methods *****
#endif // AUTOLOCK_H
class SDL_mutex;
+
namespace pg
{
~Mutex();
void init();
- void clean();
+ void deinit();
bool IsValid();
} // namespace pg
+
#endif // MUTEX_H
#define VECTOR2_H
#include <string>
-
using std::string;
+
namespace pg
{
} // namespace pg
+
#endif // VECTOR2_H
#ifndef DEBUG_H
#define DEBUG_H
-#include <iostream>
-using std::cout;
-using std::cerr;
-using std::endl;
namespace pg
{
- void DPF(int level, const char* pstr);
-
namespace debug
{
void init();
- void clean();
+ void deinit();
}
- void DASSERT(bool fBreak);
+ void DASSERT(bool fAssert);
+ void DPF(int iLevel, const char* pstr);
} // namespace pg
-// comment out when not debugging
-#define DEBUGGING
-
#endif // DEBUG_H
#ifndef MATHW_H
#define MATHW_H
-#include <math.h>
-#include "Vector2.h"
-
namespace pg
{
+ class Vector2;
+
/// ***** Public Variables *****
static const float PI = 3.1415926535897;
#include "Vector2.h"
#include "debug.h"
+#include <math.h>
+
#include "mathw.h"
using namespace pg;
using namespace pg;
+
/// ***** Public Methods *****
Mutex muDPF;
-void pg::DPF(int level, const char* pstr)
+void pg::DPF(int iLevel, const char* pstr)
{
Autolock lock(muDPF);
muDPF.init();
}
-void pg::debug::clean()
+void pg::debug::deinit()
{
- muDPF.clean();
+ muDPF.deinit();
}
-void pg::DASSERT(bool fBreak)
+void pg::DASSERT(bool fAssert)
{
- assert(fBreak);
+ assert(fAssert);
}
/// ***** Private Methods *****
{
m_pSDL_mutex = SDL_CreateMutex();
}
-void Mutex::clean()
+void Mutex::deinit()
{
SDL_DestroyMutex(m_pSDL_mutex);
m_pSDL_mutex = NULL;
*/
#include "mathw.h"
+#include "debug.h"
+
+#include <math.h>
+
+#include "Vector2.h"
using namespace pg;