Adding test case.
authorchsieh <chester.developer@hotmail.com>
Tue, 17 May 2011 04:59:09 +0000 (21:59 -0700)
committerchsieh <chester.developer@hotmail.com>
Tue, 17 May 2011 04:59:09 +0000 (21:59 -0700)
etc/xmls/maintank.xml [new file with mode: 0644]
src/render/animation/AnimationContainer.mm

diff --git a/etc/xmls/maintank.xml b/etc/xmls/maintank.xml
new file mode 100644 (file)
index 0000000..71e84be
--- /dev/null
@@ -0,0 +1,3 @@
+<AnimationClips name='maintank' atlasXmlPath='etc/xmls/maintank.xml'>
+  <Clip name='default' frames='1' />
+</AnimationClips>
\ No newline at end of file
index 1bd37a5..f96504c 100644 (file)
@@ -5,7 +5,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////////
 // private method
-@interface AnimationContainer()
+@interface AnimationContainer (Private)
 
 -(void)parseContentXml:(NSString *)contentPath;
 
@@ -82,7 +82,7 @@
 ////////////////////////////////////////////////////////////////////////////////////
 // XML parser callback for the following format:
 //
-// <AnimationClips name='foo' xmlPath='dir/foo.xml'>
+// <AnimationClips name='foo' atlasXmlPath='dir/foo.xml'>
 //   <Clip name='do_bar' frames='15' />
 //   <Clip name='do_foo' frames='5' />
 // </AnimationClips>
@@ -94,7 +94,7 @@
   if ([elementName isEqualToString:@"AnimationClips"]) {
     mAnimationLookup    = [[NSMutableDictionary alloc] init];
     self.mAnimationName = [attributeDict valueForKey:@"name"];
-    self.mAtlasPath     = [attributeDict valueForKey:@"xmlPath"];
+    self.mAtlasPath     = [attributeDict valueForKey:@"atlasXmlPath"];
     mAtlas              = [[SPTextureAtlas alloc] initWithContentsOfFile:mAtlasPath];
   }
   else if ([elementName isEqualToString:@"Clip"]) {