Browse Source

Adding ATOMIC BEGIN/ATOMIC END block and comment

Josh Engebretson 9 years ago
parent
commit
eeda841b9e
1 changed files with 8 additions and 3 deletions
  1. 8 3
      Source/Atomic/Graphics/AnimationController.cpp

+ 8 - 3
Source/Atomic/Graphics/AnimationController.cpp

@@ -194,10 +194,12 @@ bool AnimationController::Play(const String& name, unsigned char layer, bool loo
     {
     {
         for (unsigned i = 0; i < animationResources_.Size(); i++)
         for (unsigned i = 0; i < animationResources_.Size(); i++)
         {
         {
+            // ATOMIC BEGIN
+            // Check whether the animation resource isn't loaded
             if (animationResources_[i] == NULL)
             if (animationResources_[i] == NULL)
                 continue;
                 continue;
+            // ATOMIC END
 
 
-        
             if (name == animationResources_[i]->GetAnimationName())
             if (name == animationResources_[i]->GetAnimationName())
             {
             {
                 newAnimation = animationResources_[i];
                 newAnimation = animationResources_[i];
@@ -706,9 +708,9 @@ void AnimationController::SetNetAnimationsAttr(const PODVector<unsigned char>& v
             animations_[index].autoFadeTime_ = (float)buf.ReadUByte() / 64.0f; // 6 bits of decimal precision, max. 4 seconds fade
             animations_[index].autoFadeTime_ = (float)buf.ReadUByte() / 64.0f; // 6 bits of decimal precision, max. 4 seconds fade
         else
         else
             animations_[index].autoFadeTime_ = 0.0f;
             animations_[index].autoFadeTime_ = 0.0f;
-        
+
         animations_[index].removeOnCompletion_ = (ctrl & CTRL_REMOVEONCOMPLETION) != 0;
         animations_[index].removeOnCompletion_ = (ctrl & CTRL_REMOVEONCOMPLETION) != 0;
-        
+
         if (ctrl & CTRL_SETTIME)
         if (ctrl & CTRL_SETTIME)
         {
         {
             unsigned char setTimeRev = buf.ReadUByte();
             unsigned char setTimeRev = buf.ReadUByte();
@@ -934,8 +936,11 @@ void AnimationController::FindAnimation(const String& name, unsigned& index, Ani
     {
     {
         for (unsigned i = 0; i < animationResources_.Size(); i++)
         for (unsigned i = 0; i < animationResources_.Size(); i++)
         {
         {
+            // ATOMIC BEGIN
+            // Check whether the animation resource isn't loaded
             if (animationResources_[i] == NULL)
             if (animationResources_[i] == NULL)
                 continue;
                 continue;
+            // ATOMIC END        
 
 
             if (name == animationResources_[i]->GetAnimationName())
             if (name == animationResources_[i]->GetAnimationName())
             {
             {