Permalink
Browse files

Merge branch 'develop'

Conflicts:
	CodeaTemplate/CodeaTemplate.xcodeproj/project.pbxproj
  • Loading branch information...
2 parents 3be1c48 + 915bf0d commit ea43cee8c88d43026b0ea994dc2ce982f5fba847 @DylanSale DylanSale committed Aug 2, 2012
@@ -7,12 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
- DB7123DE1580388500970405 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123DD1580388500970405 /* Icon-72@2x.png */; };
- DB7123E11580388900970405 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123E01580388900970405 /* Icon-72.png */; };
- DB7123E31580389000970405 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123E21580389000970405 /* Default-Landscape@2x~ipad.png */; };
- DB7123E51580389400970405 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123E41580389400970405 /* Default-Landscape~ipad.png */; };
- DB7123E71580389900970405 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123E61580389900970405 /* Default-Portrait@2x~ipad.png */; };
- DB7123E91580389D00970405 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123E81580389D00970405 /* Default-Portrait~ipad.png */; };
+ DB7123C9158036E100970405 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123C8158036E100970405 /* Icon-72@2x.png */; };
+ DB7123CC158036E500970405 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123CB158036E500970405 /* Icon-72.png */; };
+ DB7123CE158036EC00970405 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123CD158036EC00970405 /* Default-Landscape@2x~ipad.png */; };
+ DB7123D0158036F000970405 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123CF158036F000970405 /* Default-Landscape~ipad.png */; };
+ DB7123D2158036F500970405 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123D1158036F500970405 /* Default-Portrait@2x~ipad.png */; };
+ DB7123D4158036F900970405 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = DB7123D3158036F900970405 /* Default-Portrait~ipad.png */; };
FC10E9A214D117F8004B5EFE /* Project.m in Sources */ = {isa = PBXBuildFile; fileRef = FC10E9A114D117F8004B5EFE /* Project.m */; };
FC10E9A614D11879004B5EFE /* EditorBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = FC10E9A514D11879004B5EFE /* EditorBuffer.m */; };
FC10E9A914D11A60004B5EFE /* Class.lua in Resources */ = {isa = PBXBuildFile; fileRef = FC10E9A714D11A60004B5EFE /* Class.lua */; };
@@ -256,12 +256,12 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
- DB7123DD1580388500970405 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
- DB7123E01580388900970405 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
- DB7123E21580389000970405 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = "<group>"; };
- DB7123E41580389400970405 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
- DB7123E61580389900970405 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = "<group>"; };
- DB7123E81580389D00970405 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = "<group>"; };
+ DB7123C8158036E100970405 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
+ DB7123CB158036E500970405 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
+ DB7123CD158036EC00970405 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = "<group>"; };
+ DB7123CF158036F000970405 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
+ DB7123D1158036F500970405 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = "<group>"; };
+ DB7123D3158036F900970405 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = "<group>"; };
FC0043C214F5239200F4B97B /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
FC0043C414F5239200F4B97B /* _detail.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = _detail.hpp; sourceTree = "<group>"; };
FC0043C514F5239200F4B97B /* _fixes.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = _fixes.hpp; sourceTree = "<group>"; };
@@ -1260,12 +1260,12 @@
FC65BDE714CEB3CE002B1B67 /* Classes */,
FC65BDE014CEB3CE002B1B67 /* Frameworks */,
FC65BDDE14CEB3CE002B1B67 /* Products */,
- DB7123E81580389D00970405 /* Default-Portrait~ipad.png */,
- DB7123E61580389900970405 /* Default-Portrait@2x~ipad.png */,
- DB7123E41580389400970405 /* Default-Landscape~ipad.png */,
- DB7123E21580389000970405 /* Default-Landscape@2x~ipad.png */,
- DB7123E01580388900970405 /* Icon-72.png */,
- DB7123DD1580388500970405 /* Icon-72@2x.png */,
+ DB7123D3158036F900970405 /* Default-Portrait~ipad.png */,
+ DB7123D1158036F500970405 /* Default-Portrait@2x~ipad.png */,
+ DB7123CF158036F000970405 /* Default-Landscape~ipad.png */,
+ DB7123CD158036EC00970405 /* Default-Landscape@2x~ipad.png */,
+ DB7123CB158036E500970405 /* Icon-72.png */,
+ DB7123C8158036E100970405 /* Icon-72@2x.png */,
);
sourceTree = "<group>";
};
@@ -1980,12 +1980,12 @@
FC129DD615459B45007BD6BB /* CaptureSaveItButton.png in Resources */,
FC129DD715459B45007BD6BB /* CaptureSaveItButton@2x.png in Resources */,
FC129DDA15459B66007BD6BB /* MadeWithCodea.png in Resources */,
- DB7123DE1580388500970405 /* Icon-72@2x.png in Resources */,
- DB7123E11580388900970405 /* Icon-72.png in Resources */,
- DB7123E31580389000970405 /* Default-Landscape@2x~ipad.png in Resources */,
- DB7123E51580389400970405 /* Default-Landscape~ipad.png in Resources */,
- DB7123E71580389900970405 /* Default-Portrait@2x~ipad.png in Resources */,
- DB7123E91580389D00970405 /* Default-Portrait~ipad.png in Resources */,
+ DB7123C9158036E100970405 /* Icon-72@2x.png in Resources */,
+ DB7123CC158036E500970405 /* Icon-72.png in Resources */,
+ DB7123CE158036EC00970405 /* Default-Landscape@2x~ipad.png in Resources */,
+ DB7123D0158036F000970405 /* Default-Landscape~ipad.png in Resources */,
+ DB7123D2158036F500970405 /* Default-Portrait@2x~ipad.png in Resources */,
+ DB7123D4158036F900970405 /* Default-Portrait~ipad.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1,3 +1,19 @@
+//
+// 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.
+//
+
//
// CodifyAppDelegate.h
// ___PROJECTNAME___
@@ -114,6 +114,7 @@
- (void) clearSupportedOrientations;
- (void) addSupportedOrientation:(NSUInteger)codeaOrientation;
+- (void) setupDataStore;
- (void) setupRenderGlobals;
- (void) setupPhysicsGlobals;
- (void) setupAccelerometerValues;
@@ -104,14 +104,14 @@ - (int) orientationFromUIOrientation:(UIInterfaceOrientation)uio
- (id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
-
- if(self){
- supportedOrientations = [[NSMutableSet alloc] initWithCapacity:4];
- [self addSupportedOrientation:ORIENTATION_ANY];
- }
-
- return self;
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+
+ if(self){
+ supportedOrientations = [[NSMutableSet alloc] initWithCapacity:4];
+ [self addSupportedOrientation:ORIENTATION_ANY];
+ }
+
+ return self;
}
- (void) setup
@@ -178,6 +178,18 @@ - (void) setup
screenCapture.delegate = self;
}
+- (void) setupDataStore
+{
+ if( self.project )
+ {
+ setLocalDataPrefix(self.project.name);
+ setProjectDataPath(self.project.bundlePath);
+ setProjectInfoStore(self.project.info);
+ }
+
+ setupGlobalData();
+}
+
- (void) setupRenderGlobals
{
//Create a global touch
@@ -489,7 +501,7 @@ - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterface
#pragma mark - View preparation
- (void) prepareViewForDisplay
-{
+{
//Do some basic GL setup
[self startAnimation];
[self initialDrawSetup];
@@ -572,7 +584,7 @@ - (void)viewDidLoad
//Create keyboard input view
keyboardInputView = [[KeyboardInputView alloc] init];
- [self.view addSubview:keyboardInputView];
+ [self.view addSubview:keyboardInputView];
keyboardInputView.delegate = self;
}
@@ -932,11 +944,6 @@ - (void)initialDrawSetup
[physicsManager reset];
pc_initialize(physicsManager);
- setLocalDataPrefix(self.project.name);
- setProjectDataPath(self.project.bundlePath);
- setProjectInfoStore(self.project.info);
- setupGlobalData();
-
self.glView.retainedBacking = NO;
[self.glView setFramebuffer];
@@ -1151,7 +1158,7 @@ - (void) addSupportedOrientation:(NSUInteger)codeaOrientation
[supportedOrientations addObject:[NSNumber numberWithUnsignedInteger:UIInterfaceOrientationLandscapeRight]];
[supportedOrientations addObject:[NSNumber numberWithUnsignedInteger:UIInterfaceOrientationPortrait]];
[supportedOrientations addObject:[NSNumber numberWithUnsignedInteger:UIInterfaceOrientationPortraitUpsideDown]];
- break;
+ break;
default: //Default to landscape left and right
[supportedOrientations addObject:[NSNumber numberWithUnsignedInteger:UIInterfaceOrientationLandscapeLeft]];
@@ -51,8 +51,8 @@ - (id) init
*/
//Pre-load classes and sandbox lua files
- [preloadScripts addObject:SCRIPT_STRING("LuaSandbox")];
- [preloadScripts addObject:SCRIPT_STRING("Class")];
+ [preloadScripts addObject:SCRIPT_STRING("LuaSandbox")];
+ [preloadScripts addObject:SCRIPT_STRING("Class")];
//luaSandbox = [[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"LuaSandbox" ofType:@"lua"] usedEncoding:NULL error:NULL] retain];
//luaClasses = [[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Class" ofType:@"lua"] usedEncoding:NULL error:NULL] retain];
@@ -97,6 +97,8 @@ - (BOOL) validateProject:(Project*)project
[scriptState close];
[scriptState createWithFakeLibs];
[renderController setupRenderGlobals];
+ [renderController setupPhysicsGlobals];
+ [renderController setupDataStore];
BOOL containsErrors = ![self loadAdditionalCode];
@@ -134,6 +136,7 @@ - (BOOL) runProject:(Project*)project
[scriptState create];
[renderController setupRenderGlobals];
[renderController setupPhysicsGlobals];
+ [renderController setupDataStore];
[renderController setupAccelerometerValues];
if( ![self loadAdditionalCode] )
@@ -643,11 +643,14 @@ - (void) create
LuaRegFunc(readLocalData);
LuaRegFunc(saveLocalData);
LuaRegFunc(clearLocalData);
+ LuaRegFunc(listLocalData);
LuaRegFunc(readProjectData);
LuaRegFunc(saveProjectData);
LuaRegFunc(clearProjectData);
+ LuaRegFunc(listProjectData);
LuaRegFunc(readGlobalData);
LuaRegFunc(saveGlobalData);
+ LuaRegFunc(listGlobalData);
LuaRegFunc(readProjectInfo);
LuaRegFunc(saveProjectInfo);
// LuaRegFunc(saveDocumentsImage);
@@ -798,11 +801,14 @@ - (void) createWithFakeLibs
LuaRegFunc(readLocalData);
LuaDudFunc(saveLocalData);
LuaDudFunc(clearLocalData);
+ LuaDudFunc(listLocalData);
LuaRegFunc(readProjectData);
LuaDudFunc(saveProjectData);
LuaDudFunc(clearProjectData);
+ LuaDudFunc(listProjectData);
LuaRegFunc(readGlobalData);
LuaDudFunc(saveGlobalData);
+ LuaDudFunc(listGlobalData);
LuaRegFunc(readProjectInfo);
LuaDudFunc(saveProjectInfo);
// LuaDudFunc(saveDocumentsImage);
@@ -34,13 +34,16 @@ extern "C" {
int saveLocalData(lua_State *L);
int readLocalData(lua_State *L);
int clearLocalData(lua_State *L);
+ int listLocalData(lua_State *L);
int saveProjectData(lua_State *L);
int readProjectData(lua_State *L);
int clearProjectData(lua_State *L);
+ int listProjectData(lua_State *L);
int saveGlobalData(lua_State *L);
int readGlobalData(lua_State *L);
+ int listGlobalData(lua_State *L);
int saveProjectInfo(lua_State *L);
int readProjectInfo(lua_State *L);
Oops, something went wrong.

0 comments on commit ea43cee

Please sign in to comment.