Przeglądaj źródła

Nothing worth mentioning

Panagiotis Christopoulos Charitos 15 lat temu
rodzic
commit
c9140e0f29

+ 8 - 8
extern/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h

@@ -863,23 +863,23 @@ inline void		btDbvt::collideTT(	const btDbvtNode* root0,
 					{
 						if(p.b->isinternal())
 						{					
-							stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]);
-							stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]);
-							stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]);
-							stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]);
+							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b->objChilds[0]);
+							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b->objChilds[0]);
+							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b->objChilds[1]);
+							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b->objChilds[1]);
 						}
 						else
 						{
-							stkStack[depth++]=sStkNN(p.a->childs[0],p.b);
-							stkStack[depth++]=sStkNN(p.a->childs[1],p.b);
+							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b);
+							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b);
 						}
 					}
 					else
 					{
 						if(p.b->isinternal())
 						{
-							stkStack[depth++]=sStkNN(p.a,p.b->childs[0]);
-							stkStack[depth++]=sStkNN(p.a,p.b->childs[1]);
+							stkStack[depth++]=sStkNN(p.a,p.b->objChilds[0]);
+							stkStack[depth++]=sStkNN(p.a,p.b->objChilds[1]);
 						}
 						else
 						{

+ 2 - 1
src/Util/App.cpp

@@ -37,7 +37,8 @@ void App::parseCommandLineArgs(int argc, char* argv[])
 //======================================================================================================================
 // Constructor                                                                                                         =
 //======================================================================================================================
-App::App(int argc, char* argv[]):
+App::App(int argc, char* argv[], Object* parent):
+	Object(parent),
 	windowW(1280),
 	windowH(720),
 	terminalColoringEnabled(true),

+ 3 - 2
src/Util/App.h

@@ -4,13 +4,14 @@
 #include <SDL/SDL.h>
 #include <boost/filesystem.hpp>
 #include "Common.h"
+#include "Object.h"
 
 
 /**
  * This class holds all the global objects of the application and its also responsible for some of the SDL stuff.
  * It should be singleton
  */
-class App
+class App: public Object
 {
 	PROPERTY_R(uint, windowW, getWindowWidth) ///< The main window width
 	PROPERTY_R(uint, windowH, getWindowHeight) ///< The main window height
@@ -35,7 +36,7 @@ class App
 	public:
 		uint timerTick;
 
-		App(int argc, char* argv[]);
+		App(int argc, char* argv[], Object* parent = NULL);
 		~App() {}
 		void initWindow();
 		void quit(int code);

+ 12 - 12
src/Util/Object.h

@@ -18,13 +18,13 @@ class Object
 		 * @name Accessors
 		 */
 		/**@{*/
-		const Object* getParent() const;
-		const Vec<Object*> getChilds() const; ///< Get the childs Vec
+		const Object* getObjParent() const;
+		const Vec<Object*> getObjChilds() const; ///< Get the childs Vec
 		/**@}*/
 
 	private:
-		Object* parent;
-		Vec<Object*> childs;
+		Object* objParent;
+		Vec<Object*> objChilds;
 
 		void addChild(Object* child);
 };
@@ -43,32 +43,32 @@ inline Object::Object(Object* parent)
 
 inline Object::~Object()
 {
-	for(Vec<Object*>::iterator it=childs.begin(); it!=childs.end(); it++)
+	for(Vec<Object*>::iterator it=objChilds.begin(); it!=objChilds.end(); it++)
 	{
 		delete *it;
 	}
 }
 
 
-inline const Object* Object::getParent() const
+inline const Object* Object::getObjParent() const
 {
-	return parent;
+	return objParent;
 }
 
 
-inline const Vec<Object*> Object::getChilds() const
+inline const Vec<Object*> Object::getObjChilds() const
 {
-	return childs;
+	return objChilds;
 }
 
 
 inline void Object::addChild(Object* child)
 {
 	DEBUG_ERR(child == NULL);
-	DEBUG_ERR(child->parent != NULL); // Child already has parent
+	DEBUG_ERR(child->objParent != NULL); // Child already has parent
 
-	child->parent = this;
-	childs.push_back(child);
+	child->objParent = this;
+	objChilds.push_back(child);
 }