}
////////////////////////////////////////////////////////////////////////////////////
-@property(nonatomic,retain) NSMutableDictionary* mAnimationLookup;
-@property(nonatomic,retain) SPTextureAtlas* mAtlas;
+@property (nonatomic, retain) NSMutableDictionary* mAnimationLookup;
+@property (nonatomic, retain) SPTextureAtlas* mAtlas;
-@property(nonatomic,retain) NSString* mAtlasPath;
-@property(nonatomic,retain) NSString* mAnimationName;
+@property (nonatomic, retain) NSString* mAtlasPath;
+@property (nonatomic, retain) NSString* mAnimationName;
////////////////////////////////////////////////////////////////////////////////////
--(id)init;
--(id)initWithContainer:(NSString*)containerPath;
--(void)dealloc;
+- (id) init;
+- (id) initWithContainer:(NSString*)containerPath;
+- (void) dealloc;
--(void)releaseVRAM;
+- (void) releaseVRAM;
@end
// private method
@interface QQAnimationContainer (Private)
--(void)parseContentXml:(NSString *)contentPath;
+- (void) parseContentXml:(NSString *)contentPath;
@end
@synthesize mAnimationName;
////////////////////////////////////////////////////////////////////////////////////
--(id)init {
+- (id) init {
if ((self = [super init])) {
self.mAnimationLookup = [[NSMutableDictionary alloc] init];
}
}
////////////////////////////////////////////////////////////////////////////////////
--(id)initWithContainer:(NSString *)containerPath {
+- (id) initWithContainer:(NSString *)containerPath {
if ((self = [super init])) {
[self parseContentXml:containerPath];
}
}
////////////////////////////////////////////////////////////////////////////////////
--(void)dealloc {
+- (void) dealloc {
[mAnimationLookup removeAllObjects];
[mAnimationLookup release];
[mAtlas release];
////////////////////////////////////////////////////////////////////////////////////
// need a way to get the VRAM back
--(void)releaseVRAM {
+- (void) releaseVRAM {
[mAnimationLookup removeAllObjects]; // remove all the movie clips, since they hold on to stuff in the atlas, but keep the dictionary
[mAtlas release]; // remove the atlas
mAtlas = nil; // is this extraneous?
}
////////////////////////////////////////////////////////////////////////////////////
--(void)parseContentXml:(NSString *)contentPath {
+- (void) parseContentXml:(NSString *)contentPath {
NSAutoreleasePool* autoreleasePool = [[NSAutoreleasePool alloc] init];
if (!contentPath) return;
// <Clip name='do_foo' frames='5' />
// </AnimationClips>
//
-- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
+- (void) parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI: (NSString *)namespaceURI
qualifiedName: (NSString *)qName
attributes: (NSDictionary *)attributeDict {