Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to 1.4.3

  • Loading branch information...
commit 1539e18431b424b029235b305a9d25a177d9a5e0 1 parent ea43cee
@DylanSale DylanSale authored
Showing with 793 additions and 80 deletions.
  1. +6 −0 CodeaTemplate/CodeaTemplate.xcodeproj/project.pbxproj
  2. +2 −0  CodeaTemplate/Codify/BasicRendererViewController.h
  3. +7 −0 CodeaTemplate/Codify/BasicRendererViewController.mm
  4. +1 −0  CodeaTemplate/Codify/CodifyScriptExecute.h
  5. +55 −1 CodeaTemplate/Codify/CodifyScriptExecute.m
  6. +1 −1  CodeaTemplate/Codify/Persistence.h
  7. +5 −0 CodeaTemplate/Codify/Project.h
  8. +60 −0 CodeaTemplate/Codify/Project.m
  9. +52 −0 CodeaTemplate/Codify/ProjectManager.h
  10. +346 −0 CodeaTemplate/Codify/ProjectManager.m
  11. +3 −21 CodeaTemplate/Codify/RenderCommands.mm
  12. +4 −2 CodeaTemplate/Codify/RenderManager.mm
  13. +2 −0  CodeaTemplate/Codify/Resources/Lua/LuaSandbox.lua
  14. +1 −0  CodeaTemplate/Codify/UIImage+Resize.h
  15. +22 −1 CodeaTemplate/Codify/UIImage+Resize.m
  16. +197 −48 CodeaTemplate/LuaLibs/color.c
  17. +5 −3 CodeaTemplate/LuaLibs/image.m
  18. +1 −1  CodeaTemplate/LuaLibs/mesh.m
  19. +4 −1 CodeaTemplate/LuaLibs/touch.c
  20. +1 −1  CodeaTemplate/LuaLibs/vec3.c
  21. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/About Info Panel.png
  22. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/About Info Panel@2x.png
  23. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Background Fade.png
  24. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Cargo Bot Title.png
  25. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Cargo Bot Title@2x.png
  26. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Arm.png
  27. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Arm@2x.png
  28. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Base.png
  29. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Base@2x.png
  30. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Left.png
  31. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Left@2x.png
  32. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Middle.png
  33. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Middle@2x.png
  34. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Right.png
  35. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Right@2x.png
  36. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Clear Button.png
  37. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Clear Button@2x.png
  38. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Icon.png
  39. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Icon@2x.png
  40. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Logo.png
  41. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Logo@2x.png
  42. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Grab.png
  43. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Grab@2x.png
  44. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Left.png
  45. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Left@2x.png
  46. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Right.png
  47. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Right@2x.png
  48. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Any.png
  49. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Any@2x.png
  50. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Blue.png
  51. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Blue@2x.png
  52. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Green.png
  53. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Green@2x.png
  54. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition None.png
  55. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition None@2x.png
  56. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Red.png
  57. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Red@2x.png
  58. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Yellow.png
  59. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Yellow@2x.png
  60. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 1.png
  61. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 1@2x.png
  62. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 2.png
  63. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 2@2x.png
  64. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 3.png
  65. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 3@2x.png
  66. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Blue.png
  67. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Blue@2x.png
  68. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Green.png
  69. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Green@2x.png
  70. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Red.png
  71. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Red@2x.png
  72. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Yellow.png
  73. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Yellow@2x.png
  74. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 1.png
  75. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 1@2x.png
  76. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 2.png
  77. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 2@2x.png
  78. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 3.png
  79. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 3@2x.png
  80. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 1.png
  81. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 1@2x.png
  82. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 2.png
  83. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 2@2x.png
  84. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 3.png
  85. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 3@2x.png
  86. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 1.png
  87. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 1@2x.png
  88. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 2.png
  89. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 2@2x.png
  90. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 3.png
  91. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 3@2x.png
  92. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Box.png
  93. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Box@2x.png
  94. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Button.png
  95. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Button@2x.png
  96. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Active.png
  97. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Active@2x.png
  98. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Inactive.png
  99. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Inactive@2x.png
  100. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area Floor.png
  101. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area Roof.png
  102. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area.png
  103. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Lower BG.png
  104. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Upper BG.png
  105. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Goal Area.png
  106. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Goal Area@2x.png
  107. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Hints Button.png
  108. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Hints Button@2x.png
  109. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/How Arrow.png
  110. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/How Arrow@2x.png
  111. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Icon.png
  112. +16 −0 CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Info.plist
  113. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select BG.png
  114. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select Frame.png
  115. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select Frame@2x.png
  116. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Loading Bar.png
  117. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Loading Bar@2x.png
  118. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Made With Codea.png
  119. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Made With Codea@2x.png
  120. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Button.png
  121. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Button@2x.png
  122. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Game Button.png
  123. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Game Button@2x.png
  124. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Next Button.png
  125. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Next Button@2x.png
  126. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Background.png
  127. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Crates.png
  128. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Crates@2x.png
  129. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Crazy.png
  130. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Crazy@2x.png
  131. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Easy.png
  132. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Easy@2x.png
  133. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Hard.png
  134. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Hard@2x.png
  135. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Impossible.png
  136. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Impossible@2x.png
  137. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Medium.png
  138. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Medium@2x.png
  139. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Tutorial.png
  140. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Tutorial@2x.png
  141. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Platform.png
  142. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Platform@2x.png
  143. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Button.png
  144. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Button@2x.png
  145. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Solution Icon.png
  146. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Solution Icon@2x.png
  147. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 1.png
  148. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 1@2x.png
  149. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 2.png
  150. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 2@2x.png
  151. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 3.png
  152. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 3@2x.png
  153. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 4.png
  154. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 4@2x.png
  155. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 5.png
  156. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 5@2x.png
  157. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Solution Icon.png
  158. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Solution Icon@2x.png
  159. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Tip.png
  160. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Tip@2x.png
  161. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot Last.png
  162. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot Last@2x.png
  163. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot.png
  164. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot@2x.png
  165. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Replay Button.png
  166. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Replay Button@2x.png
  167. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Smoke Particle.png
  168. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Smoke Particle@2x.png
  169. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Empty.png
  170. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Empty@2x.png
  171. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Filled.png
  172. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Filled@2x.png
  173. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star.png
  174. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Starry Background.png
  175. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Starry Background@2x.png
  176. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Startup Screen.png
  177. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Startup Screen@2x.png
  178. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Step Button.png
  179. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Step Button@2x.png
  180. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Stop Button.png
  181. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Stop Button@2x.png
  182. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 1.png
  183. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 1@2x.png
  184. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 2.png
  185. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 2@2x.png
  186. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 3.png
  187. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 3@2x.png
  188. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Toolbox.png
  189. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Toolbox@2x.png
  190. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/View Again Tip.png
  191. BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/View Again Tip@2x.png
  192. +2 −0  README.md
View
6 CodeaTemplate/CodeaTemplate.xcodeproj/project.pbxproj
@@ -232,6 +232,7 @@
FC65C1B614CEC62B002B1B67 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC65C1B514CEC62B002B1B67 /* CoreMedia.framework */; };
FC65C1BA14CED49E002B1B67 /* CodifyAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FC65C1B914CED49E002B1B67 /* CodifyAppDelegate.m */; };
FC852AA314F52BD70001E8C9 /* UIDevice-Hardware.m in Sources */ = {isa = PBXBuildFile; fileRef = FC852AA214F52BD70001E8C9 /* UIDevice-Hardware.m */; };
+ FC9EBE1115CAAE70002D647C /* ProjectManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FC9EBE1015CAAE70002D647C /* ProjectManager.m */; };
FCCF511E14F4E79300A9E63D /* SharedRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = FCCF511D14F4E79300A9E63D /* SharedRenderer.m */; };
FCCF512114F4E84C00A9E63D /* soundbuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = FCCF512014F4E84C00A9E63D /* soundbuffer.m */; };
FCCF512714F4E8BB00A9E63D /* DeviceCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = FCCF512614F4E8BB00A9E63D /* DeviceCommands.m */; };
@@ -871,6 +872,8 @@
FC852AA214F52BD70001E8C9 /* UIDevice-Hardware.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice-Hardware.m"; path = "Codify/UIDevice-Hardware.m"; sourceTree = "<group>"; };
FC852AA814F52D830001E8C9 /* swizzle.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = swizzle.hpp; sourceTree = "<group>"; };
FC852AA914F52D830001E8C9 /* swizzle.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = swizzle.inl; sourceTree = "<group>"; };
+ FC9EBE0F15CAAE70002D647C /* ProjectManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProjectManager.h; path = Codify/ProjectManager.h; sourceTree = "<group>"; };
+ FC9EBE1015CAAE70002D647C /* ProjectManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ProjectManager.m; path = Codify/ProjectManager.m; sourceTree = "<group>"; };
FCCF511C14F4E79300A9E63D /* SharedRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedRenderer.h; path = Codify/SharedRenderer.h; sourceTree = "<group>"; };
FCCF511D14F4E79300A9E63D /* SharedRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SharedRenderer.m; path = Codify/SharedRenderer.m; sourceTree = "<group>"; };
FCCF511F14F4E84C00A9E63D /* soundbuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = soundbuffer.h; sourceTree = "<group>"; };
@@ -1681,6 +1684,8 @@
FC65C12614CEB89B002B1B67 /* PhysicsCommands.mm */,
FC65C12714CEB89B002B1B67 /* PhysicsManager.h */,
FC65C12814CEB89B002B1B67 /* PhysicsManager.mm */,
+ FC9EBE0F15CAAE70002D647C /* ProjectManager.h */,
+ FC9EBE1015CAAE70002D647C /* ProjectManager.m */,
FC65C12C14CEB8A7002B1B67 /* RenderCommands.h */,
FC65C12D14CEB8A7002B1B67 /* RenderCommands.mm */,
FC65C13214CEB8B1002B1B67 /* RenderManager.h */,
@@ -2160,6 +2165,7 @@
FCDFAB1A151D6E9D002766CC /* OSCommands.m in Sources */,
FC129DAD15459124007BD6BB /* BasicRendererViewController.mm in Sources */,
FC245A4315762CCF00E227DD /* UIImage+Resize.m in Sources */,
+ FC9EBE1115CAAE70002D647C /* ProjectManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
2  CodeaTemplate/Codify/BasicRendererViewController.h
@@ -119,4 +119,6 @@
- (void) setupPhysicsGlobals;
- (void) setupAccelerometerValues;
+- (void) cleanupDataStore;
+
@end
View
7 CodeaTemplate/Codify/BasicRendererViewController.mm
@@ -190,6 +190,13 @@ - (void) setupDataStore
setupGlobalData();
}
+- (void) cleanupDataStore
+{
+ setLocalDataPrefix(nil);
+ setProjectDataPath(nil);
+ setProjectInfoStore(nil);
+}
+
- (void) setupRenderGlobals
{
//Create a global touch
View
1  CodeaTemplate/Codify/CodifyScriptExecute.h
@@ -28,6 +28,7 @@
@protocol ScriptValidateErrorDelegate <NSObject>
- (void) error:(LuaError)error inBuffer:(EditorBuffer*)buffer;
+- (void) error:(LuaError)error inBuffer:(NSString*)bufferName inDependentProject:(NSString*)projectName;
@end
@interface CodifyScriptExecute : NSObject
View
56 CodeaTemplate/Codify/CodifyScriptExecute.m
@@ -24,6 +24,7 @@
#import "SharedRenderer.h"
#import "EditorBuffer.h"
#import "LuaState.h"
+#import "ProjectManager.h"
@implementation CodifyScriptExecute
@synthesize errorDelegate;
@@ -88,6 +89,47 @@ - (BOOL) loadAdditionalCode
return !containsErrors;
}
+- (BOOL) loadDependentProjects:(Project*)project
+{
+ BOOL containsErrors = NO;
+
+ for( NSString *dep in project.dependencies )
+ {
+ LuaState *scriptState = [LuaState sharedInstance];
+ Project *dependentProject = [[ProjectManager sharedInstance] userProjectNamed:dep];
+
+ if( dependentProject )
+ {
+ [dependentProject load];
+
+ for( int i = 0; i < dependentProject.buffers.count; i++ )
+ {
+ EditorBuffer *buffer = [dependentProject.buffers objectAtIndex:i];
+ NSString *bufferName = [dependentProject.bufferNames objectAtIndex:i];
+
+ //Load all buffers except for "Main"
+ if( ![bufferName isEqualToString:@"Main"] )
+ {
+ //Attempt to load this buffer into the Lua state
+ LuaError error = [scriptState loadString:buffer.text];
+
+ if( error.lineNumber != NSNotFound )
+ {
+ containsErrors = YES;
+
+ if( [errorDelegate respondsToSelector:@selector(error:inBuffer:inDependentProject:)] )
+ {
+ [errorDelegate error:error inBuffer:bufferName inDependentProject:dependentProject.name];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return !containsErrors;
+}
+
- (BOOL) validateProject:(Project*)project
{
//Get the script state
@@ -100,7 +142,9 @@ - (BOOL) validateProject:(Project*)project
[renderController setupPhysicsGlobals];
[renderController setupDataStore];
- BOOL containsErrors = ![self loadAdditionalCode];
+ BOOL containsErrors = ![self loadAdditionalCode];
+
+ containsErrors = ![self loadDependentProjects:project];
for( EditorBuffer *buffer in project.buffers )
{
@@ -123,6 +167,11 @@ - (BOOL) validateProject:(Project*)project
}
}
+ if( containsErrors )
+ {
+ [renderController cleanupDataStore];
+ }
+
return !containsErrors;
}
@@ -144,6 +193,11 @@ - (BOOL) runProject:(Project*)project
return NO;
}
+ if( ![self loadDependentProjects:project] )
+ {
+ return NO;
+ }
+
for( EditorBuffer *buffer in project.buffers )
{
LuaError error = [scriptState loadString:buffer.text];
View
2  CodeaTemplate/Codify/Persistence.h
@@ -32,7 +32,7 @@ extern "C" {
#endif
int saveLocalData(lua_State *L);
- int readLocalData(lua_State *L);
+ int readLocalData( lua_State *L);
int clearLocalData(lua_State *L);
int listLocalData(lua_State *L);
View
5 CodeaTemplate/Codify/Project.h
@@ -33,6 +33,7 @@
@property (nonatomic,readonly) NSMutableArray *bufferNames;
@property (readonly) NSMutableArray *buffers;
@property (nonatomic,readonly) NSArray *codeFiles;
+@property (nonatomic,readonly) NSArray *dependencies;
@property (nonatomic,readonly) BOOL isLoaded;
@@ -41,4 +42,8 @@
- (void) load;
- (void) unload;
+- (BOOL) hasDependency:(NSString*)projectName;
+- (void) addDependency:(NSString*)projectName;
+- (void) removeDependency:(NSString*)projectName;
+
@end
View
60 CodeaTemplate/Codify/Project.m
@@ -57,6 +57,66 @@ - (BOOL) containsBufferNamed:(NSString*)checkName
return NO;
}
+#pragma mark - Dependencies
+
+- (NSArray*) dependencies
+{
+ NSArray *dep = [self.info objectForKey:@"Dependencies"];
+
+ return dep;
+}
+
+- (BOOL) hasDependency:(NSString*)projectName
+{
+ NSArray *deps = self.dependencies;
+
+ if( deps )
+ {
+ return [deps containsObject:projectName];
+ }
+
+ return NO;
+}
+
+- (void) addDependency:(NSString*)projectName
+{
+ if( ![self hasDependency:projectName] )
+ {
+ NSMutableArray *deps;
+
+ if( self.dependencies )
+ {
+ deps = [[self.dependencies mutableCopy] autorelease];
+ }
+ else
+ {
+ deps = [NSMutableArray array];
+ }
+
+ [deps addObject:projectName];
+ [self.info setObject:deps forKey:@"Dependencies"];
+ }
+}
+
+- (void) removeDependency:(NSString*)projectName
+{
+ if( [self hasDependency:projectName] )
+ {
+ NSMutableArray *deps;
+
+ if( self.dependencies )
+ {
+ deps = [[self.dependencies mutableCopy] autorelease];
+
+ NSUInteger idx = [deps indexOfObject:projectName];
+
+ [deps removeObjectAtIndex:idx];
+
+ [self.info setObject:deps forKey:@"Dependencies"];
+ }
+ }
+}
+
#pragma mark - Saving
- (BOOL) writeToBundlePath:(NSString*)theBundlePath
View
52 CodeaTemplate/Codify/ProjectManager.h
@@ -0,0 +1,52 @@
+//
+// ProjectManager.h
+// Codea
+//
+// Created by Simeon Nasilowski on 17/09/11.
+//
+// Copyright 2012 Two Lives Left Pty. Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#import <Foundation/Foundation.h>
+#import "SynthesizeSingleton.h"
+#import "Bundle.h"
+#import "Project.h"
+
+
+@interface ProjectManager : NSObject
+{
+ NSArray *templateProjectsCache;
+ NSArray *exampleProjectsCache;
+ NSArray *userProjectsCache;
+}
+SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(ProjectManager);
+
+@property (nonatomic,readonly) NSArray *templateProjects;
+@property (nonatomic,readonly) NSArray *exampleProjects;
+@property (nonatomic,readonly) NSArray *userProjects;
+
+- (Project*) userProjectNamed:(NSString*)projectName;
+
+- (void) reloadUserProjects;
+
+- (BOOL) doesUserProjectExist:(NSString*)projectName;
+- (BOOL) saveUserProject:(Project*)project;
+- (BOOL) deleteUserProject:(Project*)project;
+
+- (void) convertUsersCodifyProjectsToCodea;
+
+- (Project*) createProject:(NSString*)name withTemplate:(Project*)projectTemplate;
+
+@end
View
346 CodeaTemplate/Codify/ProjectManager.m
@@ -0,0 +1,346 @@
+//
+// ProjectManager.m
+// Codea
+//
+// Created by Simeon Nasilowski on 17/09/11.
+//
+// Copyright 2012 Two Lives Left Pty. Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#import "ProjectManager.h"
+
+#import "Persistence.h"
+
+@implementation ProjectManager
+
+SYNTHESIZE_SINGLETON_FOR_CLASS(ProjectManager);
+
+- (NSArray*) loadProjectsInList:(NSArray*)list inPath:(NSString*)path userProjects:(BOOL)user
+{
+ NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:NULL];
+ NSMutableArray *projects = [NSMutableArray arrayWithCapacity:[contents count]];
+
+ for( NSString *projectStr in list )
+ {
+ NSString *projFile = [projectStr stringByAppendingPathExtension:@"codea"];
+
+ if( [contents containsObject:projFile] )
+ {
+ //Add the project
+ NSString *projectPath = [path stringByAppendingPathComponent:projFile];
+ Project *project = [Project bundleWithPath:projectPath validFileTypes:[NSArray arrayWithObjects:@"lua", @"plist", nil]];
+ project.userProject = user;
+ [projects addObject:project];
+ }
+ }
+
+ /*
+ for( NSString *folder in contents )
+ {
+ //Validate that folder is in list
+ BOOL isInList = NO;
+ for( NSString *validFile in list )
+ {
+ if( [[folder stringByDeletingPathExtension] isEqualToString:validFile] )
+ {
+ isInList = YES;
+ }
+ }
+
+ if( isInList )
+ {
+ //DBLog(@"Processing %@ in path: %@", folder, path);
+
+ if( [[folder pathExtension] isEqualToString:@"codea"] || [[folder pathExtension] isEqualToString:@"codify"] )
+ {
+ NSString *projectPath = [path stringByAppendingPathComponent:folder];
+ Project *project = [Project bundleWithPath:projectPath validFileTypes:[NSArray arrayWithObjects:@"lua", @"plist", nil]];
+ project.userProject = user;
+ [projects addObject:project];
+ }
+ }
+ }
+ */
+
+ return projects;
+}
+
+- (NSArray*) loadProjectsInPath:(NSString*)path userProjects:(BOOL)user
+{
+ NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:NULL];
+ NSMutableArray *projects = [NSMutableArray arrayWithCapacity:[contents count]];
+
+ for( NSString *folder in contents )
+ {
+ //DBLog(@"Processing %@ in path: %@", folder, path);
+
+ if( [[folder pathExtension] isEqualToString:@"codea"] || [[folder pathExtension] isEqualToString:@"codify"] )
+ {
+ NSString *projectPath = [path stringByAppendingPathComponent:folder];
+ Project *project = [Project bundleWithPath:projectPath validFileTypes:[NSArray arrayWithObjects:@"lua", @"plist", nil]];
+ project.userProject = user;
+ [projects addObject:project];
+ }
+ }
+
+ return projects;
+}
+
+- (NSString*) documentsFolder
+{
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ return [paths objectAtIndex:0];
+}
+
+- (id)init
+{
+ self = [super init];
+ if (self)
+ {
+ //Load template and example projects
+ NSString *templatesPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Templates"];
+
+ //Templates
+ templateProjectsCache = [[self loadProjectsInPath:templatesPath userProjects:NO] retain];
+
+ //Examples
+#ifdef CODEA_PLAY
+ NSString *examplesPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Play"];
+
+ NSArray *validExamples = [[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"PlayProjects" ofType:@"plist"]] objectForKey:@"Examples"];
+ exampleProjectsCache = [[self loadProjectsInList:validExamples inPath:examplesPath userProjects:NO] retain];
+#else
+ NSString *examplesPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Examples"];
+
+ NSArray *validExamples = [[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"ExampleProjects" ofType:@"plist"]] objectForKey:@"Examples"];
+ exampleProjectsCache = [[self loadProjectsInList:validExamples inPath:examplesPath userProjects:NO] retain];
+#endif
+ }
+
+ return self;
+}
+
+- (void) dealloc
+{
+ [templateProjectsCache release];
+ [exampleProjectsCache release];
+ [userProjectsCache release];
+
+ [super dealloc];
+}
+
+#pragma mark - Properties
+
+- (NSArray*) templateProjects
+{
+ return templateProjectsCache;
+}
+
+- (NSArray*) exampleProjects
+{
+ return exampleProjectsCache;
+}
+
+- (NSArray*) userProjects
+{
+ if( userProjectsCache == nil )
+ {
+ userProjectsCache = [[self loadProjectsInPath:[self documentsFolder] userProjects:YES] retain];
+ }
+ return userProjectsCache;
+}
+
+#pragma mark - User project methods
+
+- (void) reloadUserProjects
+{
+ [userProjectsCache release];
+ userProjectsCache = nil;
+}
+
+- (NSString*) projectBundleForName:(NSString*)projectName
+{
+ return [[self documentsFolder] stringByAppendingPathComponent:[projectName stringByAppendingPathExtension:@"codea"]];
+}
+
+- (NSString*) oldProjectBundleForName:(NSString*)projectName
+{
+ return [[self documentsFolder] stringByAppendingPathComponent:[projectName stringByAppendingPathExtension:@"codify"]];
+}
+
+- (BOOL) createBundleForProject:(NSString*)projectName
+{
+ NSString *projectBundle = [self projectBundleForName:projectName];
+
+ //Ensure there is a bundle for the project
+ BOOL isDir = NO;
+ BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:projectBundle isDirectory:&isDir];
+
+ if( exists && !isDir )
+ {
+ DBLog(@"ERROR: File exists at project bundle location, %@", projectBundle);
+ return NO;
+ }
+ else if( !exists )
+ {
+ //Create the directory for the project
+ BOOL didCreateBundle = [[NSFileManager defaultManager] createDirectoryAtPath:projectBundle withIntermediateDirectories:NO attributes:nil error:NULL];
+
+ if( !didCreateBundle )
+ {
+ DBLog(@"ERROR: Unable to create project bundle at path: %@", projectBundle);
+ return NO;
+ }
+ }
+
+ return YES;
+}
+
+- (BOOL) doesUserProjectExist:(NSString*)projectName
+{
+ NSArray *projects = self.userProjects;
+
+ for( Project *p in projects )
+ {
+ if( [[p.name lowercaseString] isEqualToString:[projectName lowercaseString]] )
+ {
+ return YES;
+ }
+ }
+
+ return NO;
+}
+
+- (Project*) userProjectNamed:(NSString *)projectName
+{
+ NSArray *projects = self.userProjects;
+
+ for( Project *p in projects )
+ {
+ if( [p.name isEqualToString:projectName] )
+ {
+ return p;
+ }
+ }
+
+ return nil;
+}
+
+- (Project*) createProject:(NSString*)name withTemplate:(Project*)template
+{
+ NSString *projectBundle = [self projectBundleForName:name];
+
+ if( ![self createBundleForProject:name] )
+ {
+ return nil;
+ }
+
+ for( NSString *file in template.files )
+ {
+ //Copy each template file to the project bundle
+ NSString *projectFilePath = [projectBundle stringByAppendingPathComponent:[file lastPathComponent]];
+ if( ![[NSFileManager defaultManager] copyItemAtPath:file toPath:projectFilePath error:NULL] )
+ {
+ DBLog(@"ERROR Create project with template failed to copy template file %@ to project file %@", file, projectFilePath);
+ return nil;
+ }
+ else
+ {
+ //Apply replacements to each Lua file
+ if( [[[projectFilePath pathExtension] lowercaseString] isEqualToString:@"lua"] )
+ {
+ NSString *contents = [NSString stringWithContentsOfFile:projectFilePath usedEncoding:NULL error:NULL];
+
+ contents = [contents stringByReplacingOccurrencesOfString:@"__ProjectName__" withString:name];
+
+ [contents writeToFile:projectFilePath atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+ }
+ }
+ }
+
+ Project *project = [Project bundleWithPath:projectBundle validFileTypes:[NSArray arrayWithObjects:@"lua", @"plist", nil]];
+ project.userProject = YES;
+ return project;
+}
+
+- (BOOL) saveUserProject:(Project*)project
+{
+ if( project.userProject )
+ {
+ //Project path
+ NSString *projectBundle = [self projectBundleForName:project.name];
+
+ //Ensure there is a bundle for the project
+ [self createBundleForProject:project.name];
+
+ //Write the project out, overwriting any existing files
+ return [project writeToBundlePath:projectBundle];
+ }
+
+ return NO;
+}
+
+- (BOOL) deleteUserProject:(Project*)project
+{
+ if( project.userProject )
+ {
+ NSString *projectBundle = [self projectBundleForName:project.name];
+
+ BOOL didDelete = [[NSFileManager defaultManager] removeItemAtPath:projectBundle error:NULL];
+
+ if (didDelete)
+ {
+ removeLocalDataForPrefix(project.name);
+ }
+
+ [self reloadUserProjects];
+
+
+ return didDelete;
+ }
+ return NO;
+}
+
+- (void) convertUsersCodifyProjectsToCodea
+{
+ NSArray *projects = self.userProjects;
+
+ for( Project *p in projects )
+ {
+ NSString *oldProjectBundle = [self oldProjectBundleForName:p.name];
+ NSString *newProjectBundle = [self projectBundleForName:p.name];
+
+ BOOL isDir = NO;
+
+ if( [[NSFileManager defaultManager] fileExistsAtPath:oldProjectBundle isDirectory:&isDir] )
+ {
+ if( isDir )
+ {
+ NSError *error = nil;
+ [[NSFileManager defaultManager] moveItemAtPath:oldProjectBundle toPath:newProjectBundle error:&error];
+
+ if( error )
+ {
+ NSLog(@"Error moving old project to new location: %@", error);
+ }
+ }
+ }
+ }
+
+ //Makes sure all project icons point to the right ones!
+ [self reloadUserProjects];
+}
+
+@end
View
24 CodeaTemplate/Codify/RenderCommands.mm
@@ -122,7 +122,7 @@ int background(lua_State *L)
} break;
}
- glClear(GL_COLOR_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
return 0;
}
@@ -1139,8 +1139,8 @@ int spriteSize(struct lua_State *L)
CCTexture2D *texture = [[SpriteManager sharedInstance] spriteTextureFromString:spriteName];
- lua_pushinteger(L, texture.pixelsWide / [SharedRenderer renderer].glView.contentScaleFactor );
- lua_pushinteger(L, texture.pixelsHigh / [SharedRenderer renderer].glView.contentScaleFactor );
+ lua_pushinteger(L, texture.pixelsWide / texture.scale );
+ lua_pushinteger(L, texture.pixelsHigh / texture.scale );
return 2;
}
@@ -1173,24 +1173,6 @@ int sprite(struct lua_State *L)
if (image->dataChanged || image->texture == nil)
{
updateImageTextureIfRequired(image);
-
- //Pre multiply the alpha
-// size_t textureSize = image->width*image->height*sizeof(image_type_data);
-// image_type_data* premultData = (image_type_data*)malloc(textureSize);
-// memcpy(premultData, image->data, textureSize);
-// image_type_data* dataPtr = premultData;
-// size_t len = image->width*image->height;
-// for(int i=0; i < len; i++, dataPtr++)
-// {
-// image_color_element alpha = dataPtr->a;
-// dataPtr->r = (image_color_element)(dataPtr->r/255.f*alpha);
-// dataPtr->g = (image_color_element)(dataPtr->g/255.f*alpha);
-// dataPtr->b = (image_color_element)(dataPtr->b/255.f*alpha);
-// //dataPtr->a = alpha;
-// }
- //End premultiply
-
- //free(premultData); premultData = 0;
}
if( image->premultiplied )
View
6 CodeaTemplate/Codify/RenderManager.mm
@@ -890,10 +890,12 @@ - (void) setBlendMode:(RenderManagerBlendingMode)blendMode
switch (currentBlendMode)
{
case BLEND_MODE_NORMAL:
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
+ GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
break;
case BLEND_MODE_PREMULT:
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
break;
default:
break;
View
2  CodeaTemplate/Codify/Resources/Lua/LuaSandbox.lua
@@ -22,11 +22,13 @@
arg=nil
+--[[
setfenv=nil
getfenv=nil
string.dump=nil
dofile=nil
io={write=io.write}
+--]]
load=nil
loadfile=nil
View
1  CodeaTemplate/Codify/UIImage+Resize.h
@@ -25,5 +25,6 @@
+ (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize scaleFactor:(CGFloat)factor;
+ (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;
++ (UIImage *)imageWithView:(UIView *)view;
@end
View
23 CodeaTemplate/Codify/UIImage+Resize.m
@@ -21,14 +21,20 @@
#import "UIImage+Resize.h"
+#import <QuartzCore/QuartzCore.h>
+
@implementation UIImage (Resize)
+ (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize scaleFactor:(CGFloat)factor
{
UIGraphicsBeginImageContextWithOptions(newSize, NO, factor);
+
[image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
- UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
+
+ UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
+
UIGraphicsEndImageContext();
+
return newImage;
}
@@ -37,4 +43,19 @@ + (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize
return [UIImage imageWithImage:image scaledToSize:newSize scaleFactor:0.0];
}
++ (UIImage *) imageWithView:(UIView *)view
+{
+ UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
+
+ CGContextRef imageContext = UIGraphicsGetCurrentContext();
+
+ [view.layer renderInContext:imageContext];
+
+ UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
+
+ UIGraphicsEndImageContext();
+
+ return img;
+}
+
@end
View
245 CodeaTemplate/LuaLibs/color.c
@@ -23,19 +23,29 @@
*/
#include <stdio.h>
+#include <string.h>
#include "color.h"
#include "lua.h"
#include "lauxlib.h"
-#define MYTYPE "color"
+#if !defined(MIN)
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+
+#if !defined(MAX)
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#define COLORTYPE "color"
#define COLDIM 4
+#define COLCLAMP(x) MAX(MIN((x),255),0)
color_type *checkcolor(lua_State *L, int i)
{
if( lua_isuserdata(L, i) )
{
- color_type *v = luaL_checkudata(L,i,MYTYPE);
+ color_type *v = luaL_checkudata(L,i,COLORTYPE);
luaL_argcheck(L, v != NULL, 1, "`color' expected");
@@ -47,16 +57,16 @@ color_type *checkcolor(lua_State *L, int i)
static color_type *Pget(lua_State *L, int i)
{
- if (luaL_checkudata(L,i,MYTYPE)==NULL) luaL_typerror(L,i,MYTYPE);
- return lua_touserdata(L,i);
+ if (luaL_checkudata(L,i,COLORTYPE)==NULL) luaL_typerror(L,i,COLORTYPE);
+ return lua_touserdata(L,i);
}
static color_type *Pnew(lua_State *L)
{
- color_type *v=lua_newuserdata(L,sizeof(color_type)/*COLDIM*sizeof(lua_Number)*/);
- luaL_getmetatable(L,MYTYPE);
- lua_setmetatable(L,-2);
- return v;
+ color_type *v=lua_newuserdata(L,sizeof(color_type)/*COLDIM*sizeof(lua_Number)*/);
+ luaL_getmetatable(L,COLORTYPE);
+ lua_setmetatable(L,-2);
+ return v;
}
color_type* pushcolor(lua_State *L, lua_Number r, lua_Number g, lua_Number b, lua_Number a)
@@ -72,51 +82,179 @@ color_type* pushcolor(lua_State *L, lua_Number r, lua_Number g, lua_Number b, lu
static int Lnew(lua_State *L) /** color(r, g, b, a) */
{
- color_type *v;
- lua_settop(L,COLDIM);
- v=Pnew(L);
- v->r=luaL_optnumber(L,1,0);
- v->g=luaL_optnumber(L,2,0);
- v->b=luaL_optnumber(L,3,0);
- v->a=luaL_optnumber(L,4,255);
- return 1;
+ color_type *v;
+ lua_settop(L,COLDIM);
+ v=Pnew(L);
+ v->r=luaL_optnumber(L,1,0);
+ v->g=luaL_optnumber(L,2,0);
+ v->b=luaL_optnumber(L,3,0);
+ v->a=luaL_optnumber(L,4,255);
+ return 1;
}
static int Lget(lua_State *L)
{
- color_type *v=Pget(L,1);
- const char* i=luaL_checkstring(L,2);
- switch (*i) { /* lazy! */
- case '1': case 'x': case 'r': lua_pushnumber(L,v->r); break;
- case '2': case 'y': case 'g': lua_pushnumber(L,v->g); break;
- case '3': case 'z': case 'b': lua_pushnumber(L,v->b); break;
- case '4': case 'w': case 'a': lua_pushnumber(L,v->a); break;
- default: lua_pushnil(L); break;
- }
- return 1;
+ color_type *v=Pget(L,1);
+ const char* i=luaL_checkstring(L,2);
+
+ if( strlen(i) == 1 )
+ {
+ switch (*i)
+ { /* lazy! */
+ case '1': case 'x': case 'r': lua_pushnumber(L,v->r); break;
+ case '2': case 'y': case 'g': lua_pushnumber(L,v->g); break;
+ case '3': case 'z': case 'b': lua_pushnumber(L,v->b); break;
+ case '4': case 'w': case 'a': lua_pushnumber(L,v->a); break;
+ default:
+ {
+ //Load the metatable and value for key
+ luaL_getmetatable(L, COLORTYPE);
+ lua_pushstring(L, i);
+ lua_gettable(L, -2);
+ } break;
+ }
+ }
+ else
+ {
+ //Load the metatable and value for key
+ luaL_getmetatable(L, COLORTYPE);
+ lua_pushstring(L, i);
+ lua_gettable(L, -2);
+ }
+
+ return 1;
}
-static int Lset(lua_State *L) {
- color_type *v=Pget(L,1);
- const char* i=luaL_checkstring(L,2);
- lua_Number t=luaL_checknumber(L,3);
- switch (*i) { /* lazy! */
- case '1': case 'x': case 'r': v->r = t; break;
- case '2': case 'y': case 'g': v->g = t; break;
- case '3': case 'z': case 'b': v->b = t; break;
- case '4': case 'w': case 'a': v->a = t; break;
- default: break;
- }
- return 1;
+static int Lset(lua_State *L)
+{
+ color_type *v=Pget(L,1);
+ const char* i=luaL_checkstring(L,2);
+ lua_Number t=luaL_checknumber(L,3);
+ switch (*i)
+ { /* lazy! */
+ case '1': case 'x': case 'r': v->r = t; break;
+ case '2': case 'y': case 'g': v->g = t; break;
+ case '3': case 'z': case 'b': v->b = t; break;
+ case '4': case 'w': case 'a': v->a = t; break;
+ default: break;
+ }
+ return 1;
}
static int Ltostring(lua_State *L)
{
- color_type *v=Pget(L,1);
- char s[64];
- sprintf(s,"(%d, %d, %d, %d)",(int)v->r,(int)v->g,(int)v->b,(int)v->a);
- lua_pushstring(L,s);
- return 1;
+ color_type *v=Pget(L,1);
+ char s[64];
+ sprintf(s,"(%d, %d, %d, %d)",(int)v->r,(int)v->g,(int)v->b,(int)v->a);
+ lua_pushstring(L,s);
+ return 1;
+}
+
+static int Lmul(lua_State *L)
+{
+ color_type *o1 = checkcolor(L, 1);
+ color_type *o2 = checkcolor(L, 2);
+
+ if( o1 && o2 )
+ {
+ pushcolor(L,
+ COLCLAMP( (o1->r * o2->r)/255.0f ),
+ COLCLAMP( (o1->g * o2->g)/255.0f ),
+ COLCLAMP( (o1->b * o2->b)/255.0f ),
+ COLCLAMP( (o1->a + o2->a) ));
+
+ return 1;
+ }
+
+ return 0;
+}
+
+static int Ladd(lua_State *L)
+{
+ color_type *o1 = checkcolor(L, 1);
+ color_type *o2 = checkcolor(L, 2);
+
+ if( o1 && o2 )
+ {
+ pushcolor(L,
+ COLCLAMP( o1->r + o2->r ),
+ COLCLAMP( o1->g + o2->g ),
+ COLCLAMP( o1->b + o2->b ),
+ COLCLAMP( o1->a + o2->a ));
+
+ return 1;
+ }
+
+ return 0;
+}
+
+static int Leq(lua_State *L)
+{
+ color_type *o1 = checkcolor(L, 1);
+ color_type *o2 = checkcolor(L, 2);
+
+ if( o1 && o2 )
+ {
+ if( o1->r == o2->r &&
+ o1->g == o2->g &&
+ o1->b == o2->b &&
+ o1->a == o2->a )
+ {
+ lua_pushboolean(L, 1);
+ }
+ else
+ {
+ lua_pushboolean(L, 0);
+ }
+
+ return 1;
+ }
+
+ return 0;
+}
+
+static int Lblend(lua_State *L)
+{
+ color_type *o1 = checkcolor(L, 1);
+ color_type *o2 = checkcolor(L, 2);
+
+ if( o1 && o2 )
+ {
+ lua_Number alpha = o1->a / 255.0f;
+ lua_Number inv = 1 - alpha;
+
+ pushcolor(L,
+ COLCLAMP( o1->r * alpha + o2->r * inv ),
+ COLCLAMP( o1->g * alpha + o2->g * inv ),
+ COLCLAMP( o1->b * alpha + o2->b * inv ),
+ COLCLAMP( o1->a + o2->a ));
+
+ return 1;
+ }
+
+ return 0;
+}
+
+static int Llerp(lua_State *L)
+{
+ color_type *o1 = checkcolor(L, 1);
+ color_type *o2 = checkcolor(L, 2);
+ lua_Number t = luaL_checknumber(L,3);
+
+ if( o1 && o2 )
+ {
+ lua_Number invt = 1 - t;
+
+ pushcolor(L,
+ COLCLAMP( o1->r * t + o2->r * invt ),
+ COLCLAMP( o1->g * t + o2->g * invt ),
+ COLCLAMP( o1->b * t + o2->b * invt ),
+ COLCLAMP( o1->a * t + o2->a * invt ));
+
+ return 1;
+ }
+
+ return 0;
}
static const luaL_reg R[] =
@@ -124,13 +262,24 @@ static const luaL_reg R[] =
{ "__index", Lget },
{ "__newindex", Lset },
{ "__tostring", Ltostring },
- { NULL, NULL }
+ { "__add", Ladd },
+ { "__mul", Lmul },
+ { "__eq", Leq },
+ { "blend", Lblend },
+ { "mix", Llerp },
+ { NULL, NULL }
};
LUALIB_API int luaopen_color(lua_State *L)
{
- luaL_newmetatable(L,MYTYPE);
- luaL_openlib(L,NULL,R,0);
- lua_register(L,"color",Lnew);
- return 1;
+ luaL_newmetatable(L,COLORTYPE);
+
+ lua_pushstring(L, "__index");
+ lua_pushvalue(L, -2);
+ lua_settable(L, -3);
+
+ luaL_register(L, NULL, R);
+ lua_register(L,"color",Lnew);
+
+ return 1;
}
View
8 CodeaTemplate/LuaLibs/image.m
@@ -311,8 +311,8 @@ static int getPixelRaw( lua_State *L )
{
image_type *v=Pnew(L);
- v->rawWidth = width;
- v->rawHeight = height;
+ v->rawWidth = width * scale;
+ v->rawHeight = height * scale;
v->scaledWidth = width;
v->scaledHeight = height;
v->scaleFactor = scale;
@@ -381,10 +381,12 @@ static CGContextRef newBitmapRGBA8ContextFromImage(image_type* image)
{
CGImageRef imageRef = image.CGImage;
+ //This is the raw width and height of the image
size_t width = CGImageGetWidth(imageRef);
size_t height = CGImageGetHeight(imageRef);
- image_type* luaImage = pushimage(L, NULL, width, height, 1, image.scale);
+ //Call this with the UIImage's reported size (in case of retina)
+ image_type* luaImage = pushimage(L, NULL, image.size.width, image.size.height, 1, image.scale);
if (!luaImage)
{
NSLog(@"Error creating lua image");
View
2  CodeaTemplate/LuaLibs/mesh.m
@@ -102,7 +102,7 @@ static void resizeBuffer(float_buffer* buffer, int newLength)
if(buffer->buffer != NULL)
{
//Zero out new parts of the buffer
- for( int i = MAX( buffer->length-1, 0 ); i < newLength; i++ )
+ for( int i = MAX( buffer->length, 0 ); i < newLength; i++ )
{
buffer->buffer[ i * buffer->elementSize ] = 0;
}
View
5 CodeaTemplate/LuaLibs/touch.c
@@ -98,7 +98,10 @@ static int Lget( lua_State *L )
}
else
{
- lua_pushnil(L);
+ //Load the metatable and value for key
+ luaL_getmetatable(L, TOUCHTYPE);
+ lua_pushstring(L, c);
+ lua_gettable(L, -2);
}
return 1;
View
2  CodeaTemplate/LuaLibs/vec3.c
@@ -433,7 +433,7 @@ LUALIB_API int luaopen_vec3(lua_State *L)
//luaL_openlib(L,NULL,R,0);
luaL_register(L, NULL, R);
-
lua_register(L,"vec3",Lnew);
+
return 1;
}
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/About Info Panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/About Info Panel@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Background Fade.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Cargo Bot Title.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Cargo Bot Title@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Arm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Arm@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Base.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Base@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Left@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Middle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Middle@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Claw Right@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Clear Button.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Clear Button@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Icon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Codea Logo@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Grab.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Grab@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Left@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Right.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Command Right@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Any.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Any@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Blue.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Blue@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Green.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Green@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition None.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition None@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Red.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Red@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Yellow.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Condition Yellow@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Blue 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Blue.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Blue@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Green.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Green@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Red.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Red@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Yellow.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Goal Yellow@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Green 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Red 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Crate Yellow 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Box.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Box@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Dialogue Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Active.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Active@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Inactive.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Fast Button Inactive@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area Floor.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area Roof.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Area.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Lower BG.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Game Upper BG.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Goal Area.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Goal Area@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Hints Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Hints Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/How Arrow.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/How Arrow@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Icon.png
Diff not rendered
View
16 CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Info.plist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Author</key>
+ <string>Simeon</string>
+ <key>Name</key>
+ <string>Cargo Bot</string>
+ <key>Link</key>
+ <string>TwoLivesLeft.com</string>
+ <key>Icon</key>
+ <string>Icon</string>
+ <key>Retina</key>
+ <true/>
+</dict>
+</plist>
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select BG.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select Frame.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Level Select Frame@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Loading Bar.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Loading Bar@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Made With Codea.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Made With Codea@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Game Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Menu Game Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Next Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Next Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Background.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Crates.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Opening Crates@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Crazy.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Crazy@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Easy.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Easy@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Hard.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Hard@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Impossible.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Impossible@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Medium.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Medium@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Tutorial.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Pack Tutorial@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Platform.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Platform@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Solution Icon.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Play Solution Icon@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 4.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 4@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 5.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Program 5@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Solution Icon.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Solution Icon@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Tip.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Record Tip@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot Last.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot Last@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Register Slot@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Replay Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Replay Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Smoke Particle.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Smoke Particle@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Empty.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Empty@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Filled.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star Filled@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Star.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Starry Background.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Starry Background@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Startup Screen.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Startup Screen@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Step Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Step Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Stop Button.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Stop Button@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 1.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 1@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 2.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 2@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 3.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Title Large Crate 3@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Toolbox.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Toolbox@2x.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/View Again Tip.png
Diff not rendered
View
BIN  CodeaTemplate/SpritePacks/Cargo Bot.spritepack/View Again Tip@2x.png
Diff not rendered
View
2  README.md
@@ -9,6 +9,7 @@ Versions
-------
The topmost is the current version.
+- **1.4.3** Current Codea Version - Mostly bug fixes
- **1.4.2** Current Codea Beta version
- **1.4.1** Current Codea version
- **1.3.6** Release BETA Version
@@ -66,6 +67,7 @@ Sprite Pack Attribution
+ "Small World" art by Daniel Cook ([Lostgarden.com](http://lostgarden.com))
+ "SpaceCute" art by Daniel Cook ([Lostgarden.com](http://lostgarden.com))
+ "Tyrian Remastered" art by Daniel Cook ([Lostgarden.com](http://lostgarden.com))
++ "Cargo Bot" art by Simeon ([Two Lives Left](http://twolivesleft.com))
Copyright and Trademark Guidelines
----------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.