From 563db69aa499d6044c2ca2bac2f375e207be697f Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Mon, 18 May 2009 13:34:10 -0400 Subject: [PATCH] renamed Mutex to Lock --- src/entityManager.cpp | 22 +++++++++++----------- src/main.cpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/entityManager.cpp b/src/entityManager.cpp index 398901d..10b2d1e 100644 --- a/src/entityManager.cpp +++ b/src/entityManager.cpp @@ -18,7 +18,7 @@ #include "entityManager.h" #include -#include +#include #include using namespace pg; @@ -51,8 +51,8 @@ static setPhys physics_To_Add; static setPhys active_Physics; static setPhys physics_To_Remove; -static Mutex muSetPart; -static Mutex muSetPhys; +static Lock muSetPart; +static Lock muSetPhys; /// ***** Initializers/Cleaners ***** @@ -67,8 +67,8 @@ void manager::clean() { collision::clean(); - muSetPhys.deinit(); - muSetPart.deinit(); + muSetPhys.fini(); + muSetPart.fini(); } /// ***** Public Methods ***** @@ -102,7 +102,7 @@ void manager::remove(Entity* pe) DASSERT(pe != NULL); { - Autolock lock( muSetPart ); + Autolock lock( &muSetPart ); Particle* p = dynamic_cast(pe); if( p != NULL ) { @@ -112,7 +112,7 @@ void manager::remove(Entity* pe) } { - Autolock lock( muSetPhys ); + Autolock lock( &muSetPhys ); PhysicsEntity* ppe = dynamic_cast(pe); if( ppe != NULL ) { @@ -138,7 +138,7 @@ void manager::update(float time_step) void manager::draw() { { - Autolock lock( muSetPart ); + Autolock lock( &muSetPart ); addOrRemoveParticles(); @@ -152,7 +152,7 @@ void manager::draw() } { - Autolock lock( muSetPhys ); + Autolock lock( &muSetPhys ); addOrRemovePhysics(); @@ -197,7 +197,7 @@ void updatePhysics(float time_step) } void addOrRemoveParticles() { - Autolock lock( muSetPart ); + Autolock lock( &muSetPart ); // add new Particle*s to Active for( setPart::iterator it = particles_To_Add.begin(); @@ -219,7 +219,7 @@ void addOrRemoveParticles() } void addOrRemovePhysics() { - Autolock lock( muSetPhys ); + Autolock lock( &muSetPhys ); // add new PhysicsEntity*s to Active for( setPhys::iterator it = physics_To_Add.begin(); diff --git a/src/main.cpp b/src/main.cpp index 65161a0..ce5a7ae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -112,7 +112,7 @@ void mainInit() } void mainClean() { - debug::deinit(); + debug::fini(); } void updatesInit() -- 2.10.2