projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
renamed Mutex to Lock
[physics.git]
/
src
/
entityManager.cpp
diff --git
a/src/entityManager.cpp
b/src/entityManager.cpp
index
398901d
..
10b2d1e
100644
(file)
--- a/
src/entityManager.cpp
+++ b/
src/entityManager.cpp
@@
-18,7
+18,7
@@
#include "entityManager.h"
#include <pg/debug.h>
#include "entityManager.h"
#include <pg/debug.h>
-#include <pg/
Mutex
.h>
+#include <pg/
Lock
.h>
#include <pg/Autolock.h>
using namespace pg;
#include <pg/Autolock.h>
using namespace pg;
@@
-51,8
+51,8
@@
static setPhys physics_To_Add;
static setPhys active_Physics;
static setPhys physics_To_Remove;
static setPhys active_Physics;
static setPhys physics_To_Remove;
-static
Mutex
muSetPart;
-static
Mutex
muSetPhys;
+static
Lock
muSetPart;
+static
Lock
muSetPhys;
/// ***** Initializers/Cleaners *****
/// ***** Initializers/Cleaners *****
@@
-67,8
+67,8
@@
void manager::clean()
{
collision::clean();
{
collision::clean();
- muSetPhys.
deinit
();
- muSetPart.
deinit
();
+ muSetPhys.
fini
();
+ muSetPart.
fini
();
}
/// ***** Public Methods *****
}
/// ***** Public Methods *****
@@
-102,7
+102,7
@@
void manager::remove(Entity* pe)
DASSERT(pe != NULL);
{
DASSERT(pe != NULL);
{
- Autolock lock( muSetPart );
+ Autolock lock(
&
muSetPart );
Particle* p = dynamic_cast<Particle*>(pe);
if( p != NULL )
{
Particle* p = dynamic_cast<Particle*>(pe);
if( p != NULL )
{
@@
-112,7
+112,7
@@
void manager::remove(Entity* pe)
}
{
}
{
- Autolock lock( muSetPhys );
+ Autolock lock(
&
muSetPhys );
PhysicsEntity* ppe = dynamic_cast<PhysicsEntity*>(pe);
if( ppe != NULL )
{
PhysicsEntity* ppe = dynamic_cast<PhysicsEntity*>(pe);
if( ppe != NULL )
{
@@
-138,7
+138,7
@@
void manager::update(float time_step)
void manager::draw()
{
{
void manager::draw()
{
{
- Autolock lock( muSetPart );
+ Autolock lock(
&
muSetPart );
addOrRemoveParticles();
addOrRemoveParticles();
@@
-152,7
+152,7
@@
void manager::draw()
}
{
}
{
- Autolock lock( muSetPhys );
+ Autolock lock(
&
muSetPhys );
addOrRemovePhysics();
addOrRemovePhysics();
@@
-197,7
+197,7
@@
void updatePhysics(float time_step)
}
void addOrRemoveParticles()
{
}
void addOrRemoveParticles()
{
- Autolock lock( muSetPart );
+ Autolock lock(
&
muSetPart );
// add new Particle*s to Active
for( setPart::iterator it = particles_To_Add.begin();
// add new Particle*s to Active
for( setPart::iterator it = particles_To_Add.begin();
@@
-219,7
+219,7
@@
void addOrRemoveParticles()
}
void addOrRemovePhysics()
{
}
void addOrRemovePhysics()
{
- Autolock lock( muSetPhys );
+ Autolock lock(
&
muSetPhys );
// add new PhysicsEntity*s to Active
for( setPhys::iterator it = physics_To_Add.begin();
// add new PhysicsEntity*s to Active
for( setPhys::iterator it = physics_To_Add.begin();