Permalink
Browse files

First commit

  • Loading branch information...
0 parents commit 8381eec188c86ebc2bdf0c907d97730fc641b189 Jordi Martinez committed Mar 16, 2012
Showing with 11,258 additions and 0 deletions.
  1. +15 −0 FlashToCocosARC/FTCAnimEvent.h
  2. +30 −0 FlashToCocosARC/FTCAnimEvent.m
  3. +18 −0 FlashToCocosARC/FTCAnimationInfo.h
  4. +17 −0 FlashToCocosARC/FTCAnimationInfo.m
  5. +75 −0 FlashToCocosARC/FTCCharacter.h
  6. +263 −0 FlashToCocosARC/FTCCharacter.m
  7. +15 −0 FlashToCocosARC/FTCEventInfo.h
  8. +16 −0 FlashToCocosARC/FTCEventInfo.m
  9. +23 −0 FlashToCocosARC/FTCFrameInfo.h
  10. +17 −0 FlashToCocosARC/FTCFrameInfo.m
  11. +25 −0 FlashToCocosARC/FTCParser.h
  12. +245 −0 FlashToCocosARC/FTCParser.m
  13. +35 −0 FlashToCocosARC/FTCSprite.h
  14. +69 −0 FlashToCocosARC/FTCSprite.m
  15. +62 −0 README.markdown
  16. BIN example/.DS_Store
  17. BIN example/F2C_RobotTutorial/.DS_Store
  18. +1,539 −0 example/F2C_RobotTutorial/F2C_RobotTutorial.xcodeproj/project.pbxproj
  19. +7 −0 example/F2C_RobotTutorial/F2C_RobotTutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  20. BIN ...codeproj/project.xcworkspace/xcuserdata/jordi.martinez.xcuserdatad/UserInterfaceState.xcuserstate
  21. +10 −0 ....xcodeproj/project.xcworkspace/xcuserdata/jordi.martinez.xcuserdatad/WorkspaceSettings.xcsettings
  22. +86 −0 ...obotTutorial.xcodeproj/xcuserdata/jordi.martinez.xcuserdatad/xcschemes/F2C_RobotTutorial.xcscheme
  23. +22 −0 ..._RobotTutorial.xcodeproj/xcuserdata/jordi.martinez.xcuserdatad/xcschemes/xcschememanagement.plist
  24. +20 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/AppDelegate.h
  25. +154 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/AppDelegate.m
  26. +17 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/CCRobot.h
  27. +37 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/CCRobot.m
  28. +45 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/GameConfig.h
  29. +27 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/HelloWorldLayer.h
  30. +131 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/HelloWorldLayer.m
  31. +14 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/Prefix.pch
  32. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Default.png
  33. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon-72.png
  34. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon-Small-50.png
  35. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon-Small.png
  36. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon-Small@2x.png
  37. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon.png
  38. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Icon@2x.png
  39. +56 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Info.plist
  40. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/.DS_Store
  41. +894 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robot_animations.xml
  42. +18 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robot_sheets.xml
  43. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ArmL.png
  44. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ArmR.png
  45. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_Body.png
  46. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ForeArmL.png
  47. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ForeArmR.png
  48. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_HandL.png
  49. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_HandR.png
  50. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_Head.png
  51. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_Leg.png
  52. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_NeckBottom.png
  53. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_NeckTop.png
  54. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ShoulderL.png
  55. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_ShoulderR.png
  56. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/Robot/data/robotcharactermc_Wheel.png
  57. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/fps_images.png
  58. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/Resources/iTunesArtwork
  59. +16 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/RootViewController.h
  60. +153 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/RootViewController.m
  61. BIN example/F2C_RobotTutorial/F2C_RobotTutorial/libs/.DS_Store
  62. +20 −0 example/F2C_RobotTutorial/F2C_RobotTutorial/main.m
  63. +15 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCAnimEvent.h
  64. +30 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCAnimEvent.m
  65. +18 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCAnimationInfo.h
  66. +17 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCAnimationInfo.m
  67. +75 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCCharacter.h
  68. +263 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCCharacter.m
  69. +15 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCEventInfo.h
  70. +16 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCEventInfo.m
  71. +23 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCFrameInfo.h
  72. +17 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCFrameInfo.m
  73. +25 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCParser.h
  74. +245 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCParser.m
  75. +35 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCSprite.h
  76. +69 −0 example/F2C_RobotTutorial/FlashToCocosARC/FTCSprite.m
  77. BIN example/F2C_RobotTutorial/TBXML/.DS_Store
  78. +63 −0 example/F2C_RobotTutorial/TBXML/TBXML+Compression.h
  79. +308 −0 example/F2C_RobotTutorial/TBXML/TBXML+Compression.m
  80. +35 −0 example/F2C_RobotTutorial/TBXML/TBXML+HTTP.h
  81. +104 −0 example/F2C_RobotTutorial/TBXML/TBXML+HTTP.m
  82. +7 −0 example/F2C_RobotTutorial/TBXML/TBXML-Prefix.pch
  83. +7 −0 example/F2C_RobotTutorial/TBXML/TBXML-iOS-Prefix.pch
  84. +208 −0 example/F2C_RobotTutorial/TBXML/TBXML.h
  85. +934 −0 example/F2C_RobotTutorial/TBXML/TBXML.m
  86. +2 −0 example/README.markdown
  87. BIN example/assets/armleg_piece.png
  88. BIN example/assets/body.png
  89. BIN example/assets/hand.png
  90. BIN example/assets/head.png
  91. BIN example/assets/neck_bottom.png
  92. BIN example/assets/neck_top.png
  93. BIN example/assets/shoulder.png
  94. BIN example/assets/wheel.png
  95. BIN example/flash/robot_01.fla
  96. BIN example/flash/robot_01.swf
  97. BIN example/flash/robot_02.fla
  98. BIN example/flash/robot_02.swf
  99. BIN grapefrukt/.DS_Store
  100. +8 −0 grapefrukt/.gitignore
  101. +19 −0 grapefrukt/README.markdown
  102. +116 −0 grapefrukt/src/com/grapefrukt/exporter/animations/Animation.as
  103. +74 −0 grapefrukt/src/com/grapefrukt/exporter/animations/AnimationFrame.as
  104. +51 −0 grapefrukt/src/com/grapefrukt/exporter/animations/AnimationMarker.as
  105. +47 −0 grapefrukt/src/com/grapefrukt/exporter/animations/AnimationPart.as
  106. +84 −0 grapefrukt/src/com/grapefrukt/exporter/collections/AnimationCollection.as
  107. +42 −0 grapefrukt/src/com/grapefrukt/exporter/collections/FontSheetCollection.as
  108. +88 −0 grapefrukt/src/com/grapefrukt/exporter/collections/TextureSheetCollection.as
  109. +111 −0 grapefrukt/src/com/grapefrukt/exporter/debug/AnimationExtractorDebug.as
  110. +99 −0 grapefrukt/src/com/grapefrukt/exporter/debug/ConsoleLog.as
  111. +68 −0 grapefrukt/src/com/grapefrukt/exporter/debug/LogEvent.as
  112. +64 −0 grapefrukt/src/com/grapefrukt/exporter/debug/Logger.as
  113. +83 −0 grapefrukt/src/com/grapefrukt/exporter/debug/TextureSheetDebug.as
  114. +23 −0 grapefrukt/src/com/grapefrukt/exporter/events/FunctionQueueEvent.as
  115. +170 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/AnimationExtractor.as
  116. +117 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/ChildFinder.as
  117. +69 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/ExtractorBase.as
  118. +70 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/FontExtractor.as
  119. +121 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/MultiframeUtil.as
  120. +178 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/TextureExtractor.as
  121. +118 −0 grapefrukt/src/com/grapefrukt/exporter/extractors/VectorExtractor.as
  122. +50 −0 grapefrukt/src/com/grapefrukt/exporter/filters/AddXMLSpacesFilter.as
  123. +40 −0 grapefrukt/src/com/grapefrukt/exporter/filters/IFilter.as
  124. +44 −0 grapefrukt/src/com/grapefrukt/exporter/misc/Child.as
  125. +86 −0 grapefrukt/src/com/grapefrukt/exporter/misc/FunctionQueue.as
  126. +498 −0 grapefrukt/src/com/grapefrukt/exporter/misc/MaxRectsBinPack.as
  127. +54 −0 grapefrukt/src/com/grapefrukt/exporter/misc/TextureAtlasRect.as
  128. +56 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/data/BaseDataSerializer.as
  129. +44 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/data/IDataSerializer.as
  130. +68 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/data/XMLAtlasDataSerializer.as
  131. +225 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/data/XMLDataSerializer.as
  132. +62 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/files/AtlasWrapperFileSerializer.as
  133. +79 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/files/FileOutSerializer.as
  134. +41 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/files/IFileSerializer.as
  135. +49 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/files/ServerUploadSerializer.as
  136. +68 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/files/ZipFileSerializer.as
  137. +43 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/images/IImageSerializer.as
  138. +55 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/images/PNGAtlasPackerDedupeSerializer.as
  139. +135 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/images/PNGAtlasPackerSerializer.as
  140. +54 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/images/PNGImageSerializer.as
  141. +65 −0 grapefrukt/src/com/grapefrukt/exporter/serializers/images/SVGImageSerializer.as
  142. +79 −0 grapefrukt/src/com/grapefrukt/exporter/settings/Settings.as
  143. +205 −0 grapefrukt/src/com/grapefrukt/exporter/simple/SimpleExport.as
  144. +65 −0 grapefrukt/src/com/grapefrukt/exporter/simple/SimpleExportGui.as
  145. +58 −0 grapefrukt/src/com/grapefrukt/exporter/textures/BitmapTexture.as
  146. +121 −0 grapefrukt/src/com/grapefrukt/exporter/textures/FontSheet.as
  147. +62 −0 grapefrukt/src/com/grapefrukt/exporter/textures/MultiframeBitmapTexture.as
  148. +68 −0 grapefrukt/src/com/grapefrukt/exporter/textures/TextureBase.as
  149. +85 −0 grapefrukt/src/com/grapefrukt/exporter/textures/TextureExporter.as
  150. +108 −0 grapefrukt/src/com/grapefrukt/exporter/textures/TextureSheet.as
  151. +49 −0 grapefrukt/src/com/grapefrukt/exporter/textures/VectorTexture.as
@@ -0,0 +1,15 @@
+//
+// FTCAnimEvent.h
+// FlashToCocos
+//
+// Created by Jordi.Martinez on 9/21/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface FTCAnimEvent : NSObject
+
+@property (unsafe_unretained) int frameCount;
+@property (strong) NSMutableArray *eventsInfo;
+@end
@@ -0,0 +1,30 @@
+//
+// FTCAnimEvent.m
+// FlashToCocos
+//
+// Created by Jordi.Martinez on 9/21/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "FTCAnimEvent.h"
+
+@implementation FTCAnimEvent
+@synthesize eventsInfo, frameCount;
+
+
+
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+
+ NSMutableArray *__eventsInfo = [[NSMutableArray alloc] init];
+ [self setEventsInfo:__eventsInfo];
+ __eventsInfo = nil;
+ }
+
+ return self;
+}
+
+@end
@@ -0,0 +1,18 @@
+//
+// FTCAnimationInfo.h
+// FlashToCocos
+//
+// Created by Jordi.Martinez on 9/21/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface FTCAnimationInfo : NSObject
+
+
+@property (strong) NSString *name;
+@property (strong) NSString *partName;
+@property (strong) NSArray *frameInfoArray;
+
+@end
@@ -0,0 +1,17 @@
+//
+// FTCAnimationInfo.m
+// FlashToCocos
+//
+// Created by Jordi.Martinez on 9/21/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "FTCAnimationInfo.h"
+
+@implementation FTCAnimationInfo
+
+@synthesize name, frameInfoArray, partName;
+
+
+
+@end
@@ -0,0 +1,75 @@
+//
+// FTCCharacter.h
+// FlashToCocos
+//
+// Created by Jordi.Martinez on 9/14/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "cocos2d.h"
+#import "FTCSprite.h"
+#import "FTCAnimEvent.h"
+
+@protocol FTCCharacterDelegate;
+
+@interface FTCCharacter : CCSprite
+{
+
+
+ NSArray *currentAnimEvent;
+
+ int intFrame;
+ int currentAnimationLength;
+
+ NSString *currentAnimationId;
+ NSString *nextAnimationId;
+
+ BOOL _doesLoop;
+ BOOL nextAnimationDoesLoop;
+ BOOL _isPaused;
+
+}
+
+@property (unsafe_unretained) id<FTCCharacterDelegate> delegate;
+@property (strong) NSMutableDictionary *childrenTable;
+@property (strong) NSMutableDictionary *animationEventsTable;
+
+
+
++(FTCCharacter *) characterFromXMLFile:(NSString *)_xmlfile;
+-(void) playAnimation:(NSString *)_animId loop:(BOOL)_isLoopable wait:(BOOL)_wait;
+-(void) stopAnimation;
+-(void) pauseAnimation;
+-(void) resumeAnimation;
+-(void) playFrame:(int)_frameIndex fromAnimation:(NSString *)_animationId;
+-(void) playFrame;
+
+
+-(id) initFromXMLFile:(NSString *)_xmlfile;
+-(NSString *) getCurrentAnimation;
+-(int) getDurationForAnimation:(NSString *)_animationId;
+-(FTCSprite *) getChildByName:(NSString *)_childName;
+-(int) getCurrentFrame;
+-(void) addElement:(FTCSprite *)_element withName:(NSString *)_name atIndex:(int)_index;
+-(void) reorderChildren;
+
+// private
+-(void) setFirstPose;
+-(void) createCharacterFromXML:(NSString *)_xmlfile;
+
+@end
+
+
+@protocol FTCCharacterDelegate <NSObject>
+
+
+@optional
+-(void) onCharacterCreated:(FTCCharacter *)_character;
+-(void) onCharacter:(FTCCharacter *)_character event:(NSString *)_event atFrame:(int)_frameIndex;
+-(void) onCharacter:(FTCCharacter *)_character endsAnimation:(NSString *)_animationId;
+-(void) onCharacter:(FTCCharacter *)_character startsAnimation:(NSString *)_animationId;
+-(void) onCharacter:(FTCCharacter *)_character updateToFrame:(int)_frameIndex;
+-(void) onCharacter:(FTCCharacter *)_character loopedAnimation:(NSString *)_animationId;
+
+@end
Oops, something went wrong.

0 comments on commit 8381eec

Please sign in to comment.