Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation.h	(revision 8540)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation.h	(revision 8541)
@@ -11,4 +11,6 @@
 #include <string>
 
+namespace md3
+{
 
 typedef enum MD3AnimationType {
@@ -43,8 +45,5 @@
     void init();
 
-    std::string toString()
-    {
-      return std::string("Name: " + this->name);
-    }
+    std::string toString() { return std::string("Name: " + this->name); }
 
 
@@ -62,4 +61,4 @@
 };
 
-
+}
 #endif /* _MD3_ANIMATION_H */
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 8540)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 8541)
@@ -17,5 +17,8 @@
 #include "md3_animation_cfg.h"
 
+#include "md3_animation.h"
+
 #include "tokenizer.h"
+#include "helper_functions.h"
 
 #include "debug.h"
@@ -23,4 +26,5 @@
 #include <stdio.h>
 #include <stdlib.h>
+
 
 using namespace std;
@@ -67,5 +71,4 @@
     int      firstTorsoFrame = -1; //!< first of the TORSO animation frames
     bool     inHeader = true;      //!< are we still in the header of the .cfg file?
-    char     buffer[1024];         //!< buffer to write stuff into
 
 
@@ -130,6 +133,6 @@
           Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
 
-//           newAnimCfg.footsteps=st.nextToken().trim();
-
+          this->footsteps = tokens.back();
+//           std::transform(this->footsteps.begin(), this->footsteps.end(), this->footsteps.begin(), std::tolower);
 
            while( !tokens.empty())
@@ -139,65 +142,70 @@
           }
 
-
-/*          if (!(newAnimCfg.footsteps.toLowerCase().equals("default") ||
-                newAnimCfg.footsteps.toLowerCase().equals("normal") ||
-                newAnimCfg.footsteps.toLowerCase().equals("boot") ||
-                newAnimCfg.footsteps.toLowerCase().equals("flesh") ||
-                newAnimCfg.footsteps.toLowerCase().equals("mech") ||
-                newAnimCfg.footsteps.toLowerCase().equals("energy")
-               ))*/
-            //don't throw an exception, non-fatal error
-//             newAnimCfg.footsteps="illegal footsteps value (" + newAnimCfg.footsteps + ")";
+          //check if value is ok
+          if (!(nocaseCmp(this->footsteps, "default")   ||
+                nocaseCmp(this->footsteps, "normal")    ||
+                nocaseCmp(this->footsteps, "boot")      ||
+                nocaseCmp(this->footsteps, "flesh")     ||
+                nocaseCmp(this->footsteps, "mech")      ||
+                nocaseCmp(this->footsteps, "energy")) ) {
+            this->footsteps="illegal footsteps value (" + this->footsteps + ")";
+          }
+          PRINTF(0)("got footsteps: %s\n", this->footsteps.c_str());
+        }
+        else {
+          // assume it's an animation line
+          inHeader = false;
+
+          MD3Animation* animation = new MD3Animation(line);
+
+          animation->name = MD3Animation::animationList[i].animationName;
+          animation->type = MD3Animation::animationList[i].animationType;
+
+          // workaround for strange numbering in animation.cfg: skip TORSO frames
+          // for LEGS animation lines...
+          if (animation->type == LEGS) {
+                                                //when first LEGS animation is found, calc # of TORSO frames
+            if( torsoOffset == -1)
+              torsoOffset = animation->first - firstTorsoFrame;
+
+            animation->first -= torsoOffset;
+            animation->offset = torsoOffset;
+          }
+          else if (animation->type == TORSO)
+            if( firstTorsoFrame == -1)
+              firstTorsoFrame = animation->first;
+
+
+          //newAnimCfg.putAnimation(animation);
         }
       }
+
+
     }
-    /*
-        else {
-                                        //assume it's an animation line
-          IN_HEADER=false; //no longer in header
-
-          MD3Animation animation=MD3ModelFactory.getFactory().makeMD3Animation(line);
-
-          animation.name=animationNames[i];
-          animation.type=animationTypes[i++];
-
-                                        //workaround for strange numbering in animation.cfg: skip TORSO frames
-                                        //for LEGS animation lines...
-          if (animation.type==AnimationType.LEGS) {
-                                                //when first LEGS animation is found, calc # of TORSO frames
-            if (TORSO_OFFSET==-1)
-              TORSO_OFFSET=animation.first-firstTORSOFrame;
-
-            animation.first-=TORSO_OFFSET;
-            animation.offset=TORSO_OFFSET;
-          }
-          else if (animation.type==AnimationType.TORSO)
-            if (firstTORSOFrame==-1)
-              firstTORSOFrame=animation.first;
-
-          newAnimCfg.putAnimation(animation);
-        }
-      }
-
-      line=bin.readLine();
-    }
-    catch (Exception e) {
-      throw new IOException(e.getMessage());
-    }*/
-
-  }
-
-
-
-  /**
-  * <p>Look up the animation data for the animation with the specified name.
+
+  }
+
+
+
+  /**
+  * Look up the animation data for the animation with the specified name.
   *
   * @param name Name of the animation.
   * @return The animation data associated with the name or null if no data was found.
   */
-  MD3Animation* getAnimation(std::string name)
+  MD3Animation* MD3AnimationCfg::getAnimation(std::string name)
   {
 //     return (MD3Animation)animations.get(name);
   }
+
+
+  /**
+   * Add the specified animation to the list of known animations.
+   */
+   void MD3AnimationCfg::putAnimation(MD3Animation* anim)
+   {
+//        animations.put(anim.name, anim);
+   }
+
 
 }
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h	(revision 8540)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h	(revision 8541)
@@ -37,4 +37,7 @@
       void loadConfig(std::string filename);
 
+      MD3Animation* getAnimation(std::string name);
+      void putAnimation(MD3Animation* animation);
+
       std::string toString() { return std::string("Name: " + this->filename); }
 
