diff --git a/samples/WatermelonWithMe/Classes/AppDelegate.cpp b/samples/WatermelonWithMe/Classes/AppDelegate.cpp
new file mode 100644
index 0000000000..06835bdea2
--- /dev/null
+++ b/samples/WatermelonWithMe/Classes/AppDelegate.cpp
@@ -0,0 +1,85 @@
+#include "AppDelegate.h"
+
+#include "cocos2d.h"
+#include "SimpleAudioEngine.h"
+#include "ScriptingCore.h"
+#include "generated/cocos2dx.hpp"
+#include "cocos2d_specifics.hpp"
+#include "js_bindings_chipmunk_registration.h"
+#include "js_bindings_ccbreader.h"
+
+USING_NS_CC;
+using namespace CocosDenshion;
+
+AppDelegate::AppDelegate()
+{
+}
+
+AppDelegate::~AppDelegate()
+{
+ CCScriptEngineManager::sharedManager()->purgeSharedManager();
+}
+
+bool AppDelegate::applicationDidFinishLaunching()
+{
+ // initialize director
+ CCDirector *pDirector = CCDirector::sharedDirector();
+ pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
+
+ // turn on display FPS
+ pDirector->setDisplayStats(true);
+
+ // set FPS. the default value is 1.0/60 if you don't call this
+ pDirector->setAnimationInterval(1.0 / 60);
+
+ ScriptingCore* sc = ScriptingCore::getInstance();
+ sc->addRegisterCallback(register_all_cocos2dx);
+ sc->addRegisterCallback(register_cocos2dx_js_extensions);
+ sc->addRegisterCallback(jsb_register_chipmunk);
+ sc->addRegisterCallback(register_CCBuilderReader);
+
+ sc->start();
+
+ CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance();
+ CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);
+ //ScriptingCore::getInstance()->runScript("src/tests-boot-jsb.js");
+ ScriptingCore::getInstance()->runScript("watermelon_with_me.js");
+
+ return true;
+}
+
+void handle_signal(int signal) {
+ static int internal_state = 0;
+ ScriptingCore* sc = ScriptingCore::getInstance();
+ // should start everything back
+ CCDirector* director = CCDirector::sharedDirector();
+ if (director->getRunningScene()) {
+ director->popToRootScene();
+ } else {
+ CCPoolManager::sharedPoolManager()->finalize();
+ if (internal_state == 0) {
+ //sc->dumpRoot(NULL, 0, NULL);
+ sc->start();
+ internal_state = 1;
+ } else {
+ sc->runScript("hello.js");
+ internal_state = 0;
+ }
+ }
+}
+
+// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
+void AppDelegate::applicationDidEnterBackground()
+{
+ CCDirector::sharedDirector()->stopAnimation();
+ SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
+ SimpleAudioEngine::sharedEngine()->pauseAllEffects();
+}
+
+// this function will be called when the app is active again
+void AppDelegate::applicationWillEnterForeground()
+{
+ CCDirector::sharedDirector()->startAnimation();
+ SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
+ SimpleAudioEngine::sharedEngine()->resumeAllEffects();
+}
diff --git a/samples/WatermelonWithMe/Classes/AppDelegate.h b/samples/WatermelonWithMe/Classes/AppDelegate.h
new file mode 100644
index 0000000000..6bd9363493
--- /dev/null
+++ b/samples/WatermelonWithMe/Classes/AppDelegate.h
@@ -0,0 +1,45 @@
+//
+// GCTestAppDelegate.h
+// GCTest
+//
+// Created by Rohan Kuruvilla on 06/08/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#ifndef _APP_DELEGATE_H_
+#define _APP_DELEGATE_H_
+
+#include "CCApplication.h"
+/**
+ @brief The cocos2d Application.
+
+ The reason for implement as private inheritance is to hide some interface call by CCDirector.
+ */
+class AppDelegate : private cocos2d::CCApplication
+{
+public:
+ AppDelegate();
+ virtual ~AppDelegate();
+
+ /**
+ @brief Implement CCDirector and CCScene init code here.
+ @return true Initialize success, app continue.
+ @return false Initialize failed, app terminate.
+ */
+ virtual bool applicationDidFinishLaunching();
+
+ /**
+ @brief The function be called when the application enter background
+ @param the pointer of the application
+ */
+ virtual void applicationDidEnterBackground();
+
+ /**
+ @brief The function be called when the application enter foreground
+ @param the pointer of the application
+ */
+ virtual void applicationWillEnterForeground();
+};
+
+#endif // _APP_DELEGATE_H_
+
diff --git a/samples/WatermelonWithMe/Resources/Abadi.GlyphProject b/samples/WatermelonWithMe/Resources/Abadi.GlyphProject
new file mode 100644
index 0000000000..389a94a47b
Binary files /dev/null and b/samples/WatermelonWithMe/Resources/Abadi.GlyphProject differ
diff --git a/samples/WatermelonWithMe/Resources/CCB/Abadi40-hd.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/Abadi40-hd.png.REMOVED.git-id
new file mode 100644
index 0000000000..18b9c22de9
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/Abadi40-hd.png.REMOVED.git-id
@@ -0,0 +1 @@
+f06c047dd32b61f12ad51e981afe518364512be6
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/Abadi40-ipad.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/Abadi40-ipad.png.REMOVED.git-id
new file mode 100644
index 0000000000..717ceb89a1
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/Abadi40-ipad.png.REMOVED.git-id
@@ -0,0 +1 @@
+4b7c1e97acefff48ae3652f023e708245992f553
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/Abadi40.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/Abadi40.png.REMOVED.git-id
new file mode 100644
index 0000000000..fb1884455b
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/Abadi40.png.REMOVED.git-id
@@ -0,0 +1 @@
+ae62d7b07ac3e7579ed7d6a2e1f903719e45c6d9
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/Gas40-hd.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/Gas40-hd.png.REMOVED.git-id
new file mode 100644
index 0000000000..5067e00b74
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/Gas40-hd.png.REMOVED.git-id
@@ -0,0 +1 @@
+12db20c3124e1bd864312257eb8cefe95d2ee349
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/Gas40-ipad.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/Gas40-ipad.png.REMOVED.git-id
new file mode 100644
index 0000000000..8ddebffce2
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/Gas40-ipad.png.REMOVED.git-id
@@ -0,0 +1 @@
+e71140c1535f16b49980f3ea0cf7d3a29a8a9788
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/konqa32-hd.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/konqa32-hd.png.REMOVED.git-id
new file mode 100644
index 0000000000..15f23ffc85
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/konqa32-hd.png.REMOVED.git-id
@@ -0,0 +1 @@
+dc235c169030151e337ecbfa1fc6302fc909e500
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/konqa32-ipad.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/konqa32-ipad.png.REMOVED.git-id
new file mode 100644
index 0000000000..2549ab6362
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/konqa32-ipad.png.REMOVED.git-id
@@ -0,0 +1 @@
+9e95a02e6eb2944fea12a49eb3f2c6fe7505a3ce
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/CCB/konqa32.png.REMOVED.git-id b/samples/WatermelonWithMe/Resources/CCB/konqa32.png.REMOVED.git-id
new file mode 100644
index 0000000000..83954562c0
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/CCB/konqa32.png.REMOVED.git-id
@@ -0,0 +1 @@
+1423c81273926b3da9fb1cb36c9b710d3f14ee0e
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/Futura.GlyphProject b/samples/WatermelonWithMe/Resources/Futura.GlyphProject
new file mode 100644
index 0000000000..6702fef2e8
Binary files /dev/null and b/samples/WatermelonWithMe/Resources/Futura.GlyphProject differ
diff --git a/samples/WatermelonWithMe/Resources/Gas.GlyphProject b/samples/WatermelonWithMe/Resources/Gas.GlyphProject
new file mode 100644
index 0000000000..f5c8699505
Binary files /dev/null and b/samples/WatermelonWithMe/Resources/Gas.GlyphProject differ
diff --git a/samples/WatermelonWithMe/Resources/Konqa.GlyphProject b/samples/WatermelonWithMe/Resources/Konqa.GlyphProject
new file mode 100644
index 0000000000..51e960b830
Binary files /dev/null and b/samples/WatermelonWithMe/Resources/Konqa.GlyphProject differ
diff --git a/samples/WatermelonWithMe/Resources/Parallax.pvr.gz.REMOVED.git-id b/samples/WatermelonWithMe/Resources/Parallax.pvr.gz.REMOVED.git-id
new file mode 100644
index 0000000000..50b460b92c
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/Parallax.pvr.gz.REMOVED.git-id
@@ -0,0 +1 @@
+2b588761f91aeed6061ac672d00fb67b5b65253d
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/game-music.mp3.REMOVED.git-id b/samples/WatermelonWithMe/Resources/game-music.mp3.REMOVED.git-id
new file mode 100644
index 0000000000..f68477bdf7
--- /dev/null
+++ b/samples/WatermelonWithMe/Resources/game-music.mp3.REMOVED.git-id
@@ -0,0 +1 @@
+5783809fbb118e460886314c5da4429ea1f6577d
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/Resources/single_files/button.xcf b/samples/WatermelonWithMe/Resources/single_files/button.xcf
new file mode 100644
index 0000000000..8ce376d191
Binary files /dev/null and b/samples/WatermelonWithMe/Resources/single_files/button.xcf differ
diff --git a/samples/WatermelonWithMe/bindings/jsb_constants.js b/samples/WatermelonWithMe/bindings/jsb_constants.js
new file mode 100644
index 0000000000..7aa0419617
--- /dev/null
+++ b/samples/WatermelonWithMe/bindings/jsb_constants.js
@@ -0,0 +1,9 @@
+//
+// Javascript Bindigns helper file
+//
+
+// DO NOT ALTER THE ORDER
+require('jsb_constants_cocos2d.js');
+require('jsb_constants_chipmunk.js');
+require('jsb_constants_gl.js');
+require('jsb_constants_cocosbuilder.js');
diff --git a/samples/WatermelonWithMe/bindings/jsb_constants_chipmunk.js b/samples/WatermelonWithMe/bindings/jsb_constants_chipmunk.js
new file mode 100644
index 0000000000..724c6afa36
--- /dev/null
+++ b/samples/WatermelonWithMe/bindings/jsb_constants_chipmunk.js
@@ -0,0 +1,253 @@
+//
+// Chipmunk defines
+//
+
+cp.v = cc.p;
+cp._v = cc._p;
+cp.vzero = cp.v(0,0);
+
+// Vector: Compatibility with Chipmunk-JS
+cp.v.add = cp.vadd;
+cp.v.clamp = cp.vclamp;
+cp.v.cross = cp.vcross;
+cp.v.dist = cp.vdist;
+cp.v.distsq = cp.vdistsq;
+cp.v.dot = cp.vdot;
+cp.v.eql = cp.veql;
+cp.v.forangle = cp.vforangle;
+cp.v.len = cp.vlength;
+cp.v.lengthsq = cp.vlengthsq;
+cp.v.lerp = cp.vlerp;
+cp.v.lerpconst = cp.vlerpconst;
+cp.v.mult = cp.vmult;
+cp.v.near = cp.vnear;
+cp.v.neg = cp.vneg;
+cp.v.normalize = cp.vnormalize;
+cp.v.normalize_safe = cp.vnormalize_safe;
+cp.v.perp = cp.vperp;
+cp.v.project = cp.vproject;
+cp.v.rotate = cp.vrotate;
+cp.v.rperp = cp.vrperp;
+cp.v.slerp = cp.vslerp;
+cp.v.slerpconst = cp.vslerpconst;
+cp.v.sub = cp.vsub;
+cp.v.toangle = cp.vtoangle;
+cp.v.unrotate = cp.vunrotate;
+
+
+
+/// Initialize an offset box shaped polygon shape.
+cp.BoxShape2 = function(body, box)
+{
+ var verts = [
+ box.l, box.b,
+ box.l, box.t,
+ box.r, box.t,
+ box.r, box.b
+ ];
+
+ return new cp.PolyShape(body, verts, cp.vzero);
+};
+
+/// Initialize a box shaped polygon shape.
+cp.BoxShape = function(body, width, height)
+{
+ var hw = width/2;
+ var hh = height/2;
+
+ return cp.BoxShape2(body, new cp.BB(-hw, -hh, hw, hh));
+};
+
+
+/// Initialize an static body
+cp.BodyStatic = function()
+{
+ return new cp.Body(Infinity, Infinity);
+};
+
+
+// "Bounding Box" compatibility with Chipmunk-JS
+cp.BB = function(l, b, r, t)
+{
+ return {l:l, b:b, r:r, t:t};
+};
+
+// helper function to create a BB
+cp.bb = function(l, b, r, t) {
+ return new cp.BB(l, b, r, t);
+};
+
+
+//
+// Some properties
+//
+// "handle" needed in some cases
+Object.defineProperties(cp.Base.prototype,
+ {
+ "handle" : {
+ get : function(){
+ return this.getHandle();
+ },
+ enumerable : true,
+ configurable : true
+ }
+ });
+
+// Properties, for Chipmunk-JS compatibility
+// Space properties
+Object.defineProperties(cp.Space.prototype,
+ {
+ "gravity" : {
+ get : function(){
+ return this.getGravity();
+ },
+ set : function(newValue){
+ this.setGravity(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "iterations" : {
+ get : function(){
+ return this.getIterations();
+ },
+ set : function(newValue){
+ this.setIterations(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "damping" : {
+ get : function(){
+ return this.getDamping();
+ },
+ set : function(newValue){
+ this.setDamping(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "staticBody" : {
+ get : function(){
+ return this.getStaticBody();
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "idleSpeedThreshold" : {
+ get : function(){
+ return this.getIdleSpeedThreshold();
+ },
+ set : function(newValue){
+ this.setIdleSpeedThreshold(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "sleepTimeThreshold": {
+ get : function(){
+ return this.getSleepTimeThreshold();
+ },
+ set : function(newValue){
+ this.setSleepTimeThreshold(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "collisionSlop": {
+ get : function(){
+ return this.getCollisionSlop();
+ },
+ set : function(newValue){
+ this.setCollisionSlop(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "collisionBias": {
+ get : function(){
+ return this.getCollisionBias();
+ },
+ set : function(newValue){
+ this.setCollisionBias(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "collisionPersistence": {
+ get : function(){
+ return this.getCollisionPersistence();
+ },
+ set : function(newValue){
+ this.setCollisionPersistence(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "enableContactGraph": {
+ get : function(){
+ return this.getEnableContactGraph();
+ },
+ set : function(newValue){
+ this.setEnableContactGraph(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ }
+ });
+
+// Body properties
+Object.defineProperties(cp.Body.prototype,
+ {
+ "a" : {
+ get : function(){
+ return this.getAngle();
+ },
+ set : function(newValue){
+ this.setAngle(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "w" : {
+ get : function(){
+ return this.getAngVel();
+ },
+ set : function(newValue){
+ this.setAngVel(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "p" : {
+ get : function(){
+ return this.getPos();
+ },
+ set : function(newValue){
+ this.setPos(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "v" : {
+ get : function(){
+ return this.getVel();
+ },
+ set : function(newValue){
+ this.setVel(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ },
+ "i" : {
+ get : function(){
+ return this.getMoment();
+ },
+ set : function(newValue){
+ this.setMoment(newValue);
+ },
+ enumerable : true,
+ configurable : true
+ }
+
+ });
diff --git a/samples/WatermelonWithMe/bindings/jsb_constants_cocos2d.js b/samples/WatermelonWithMe/bindings/jsb_constants_cocos2d.js
new file mode 100644
index 0000000000..089aaa767e
--- /dev/null
+++ b/samples/WatermelonWithMe/bindings/jsb_constants_cocos2d.js
@@ -0,0 +1,505 @@
+//
+// cocos2d constants
+//
+cc.DIRECTOR_PROJECTION_2D = 0;
+cc.DIRECTOR_PROJECTION_3D = 1;
+
+cc.TEXTURE_PIXELFORMAT_RGBA8888 = 0;
+cc.TEXTURE_PIXELFORMAT_RGB888 = 1;
+cc.TEXTURE_PIXELFORMAT_RGB565 = 2;
+cc.TEXTURE_PIXELFORMAT_A8 = 3;
+cc.TEXTURE_PIXELFORMAT_I8 = 4;
+cc.TEXTURE_PIXELFORMAT_AI88 = 5;
+cc.TEXTURE_PIXELFORMAT_RGBA4444 = 6;
+cc.TEXTURE_PIXELFORMAT_RGB5A1 = 7;
+cc.TEXTURE_PIXELFORMAT_PVRTC4 = 8;
+cc.TEXTURE_PIXELFORMAT_PVRTC4 = 9;
+cc.TEXTURE_PIXELFORMAT_DEFAULT = cc.TEXTURE_PIXELFORMAT_RGBA8888;
+
+cc.TEXT_ALIGNMENT_LEFT = 0;
+cc.TEXT_ALIGNMENT_CENTER = 1;
+cc.TEXT_ALIGNMENT_RIGHT = 2;
+
+cc.VERTICAL_TEXT_ALIGNMENT_TOP = 0;
+cc.VERTICAL_TEXT_ALIGNMENT_CENTER = 1;
+cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM = 2;
+
+cc.IMAGE_FORMAT_JPEG = 0;
+cc.IMAGE_FORMAT_PNG = 0;
+
+cc.PROGRESS_TIMER_TYPE_RADIAL = 0;
+cc.PROGRESS_TIMER_TYPE_BAR = 1;
+
+cc.PARTICLE_TYPE_FREE = 0;
+cc.PARTICLE_TYPE_RELATIVE = 1;
+cc.PARTICLE_TYPE_GROUPED = 2;
+cc.PARTICLE_DURATION_INFINITY = -1;
+cc.PARTICLE_MODE_GRAVITY = 0;
+cc.PARTICLE_MODE_RADIUS = 1;
+cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE = -1;
+cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS = -1;
+
+cc.TOUCH_ALL_AT_ONCE = 0;
+cc.TOUCH_ONE_BY_ONE = 1;
+
+cc.TMX_TILE_HORIZONTAL_FLAG = 0x80000000;
+cc.TMX_TILE_VERTICAL_FLAG = 0x40000000;
+cc.TMX_TILE_DIAGONAL_FLAG = 0x20000000;
+
+cc.TRANSITION_ORIENTATION_LEFT_OVER = 0;
+cc.TRANSITION_ORIENTATION_RIGHT_OVER = 1;
+cc.TRANSITION_ORIENTATION_UP_OVER = 0;
+cc.TRANSITION_ORIENTATION_DOWN_OVER = 1;
+
+cc.RED = {r:255, g:0, b:0};
+cc.GREEN = {r:0, g:255, b:0};
+cc.BLUE = {r:0, g:0, b:255};
+cc.BLACK = {r:0, g:0, b:0};
+cc.WHITE = {r:255, g:255, b:255};
+
+cc.POINT_ZERO = {x:0, y:0};
+
+// XXX: This definition is different than cocos2d-html5
+cc.REPEAT_FOREVER = -1;
+// reusable objects
+cc._reuse_p = [
+ {x:0, y:0},
+ {x:0, y:0},
+ {x:0, y:0},
+ {x:0, y:0}
+];
+
+cc._reuse_p_index = 0;
+cc._reuse_size = {width:0, height:0};
+cc._reuse_rect = {x:0, y:0, width:0, height:0};
+cc._reuse_color3b = {r:255, g:255, b:255 };
+cc._reuse_color4b = {r:255, g:255, b:255, a:255 };
+
+//
+// Point
+//
+cc.p = function( x, y )
+{
+ return {x:x, y:y};
+};
+
+cc.g = cc.g || cc.p;
+cc._reuse_grid = cc.g(0,0);
+
+cc.log = cc.log || log;
+
+//
+// Color 3B
+//
+cc.c3b = function (r, g, b) {
+ return {r:r, g:g, b:b };
+};
+cc._c3b = function (r, g, b) {
+ cc._reuse_color3b.r = r;
+ cc._reuse_color3b.g = g;
+ cc._reuse_color3b.b = b;
+ return cc._reuse_color3b;
+};
+
+//
+// Color 4B
+//
+cc.c4b = function (r, g, b, a) {
+ return {r:r, g:g, b:b, a:a };
+};
+cc._c4b = function (r, g, b, a) {
+ cc._reuse_color4b.r = r;
+ cc._reuse_color4b.g = g;
+ cc._reuse_color4b.b = b;
+ cc._reuse_color4b.a = a;
+ return cc._reuse_color4b;
+};
+// compatibility
+cc.c4 = cc.c4b;
+cc._c4 = cc._c4b;
+
+//
+// Color 4F
+//
+cc.c4f = function (r, g, b, a) {
+ return {r:r, g:g, b:b, a:a };
+};
+
+//
+// Point
+//
+cc.p = function (x, y) {
+ return {x:x, y:y};
+};
+cc._p = function (x, y) {
+ if (cc._reuse_p_index == cc._reuse_p.length)
+ cc._reuse_p_index = 0;
+
+ var p = cc._reuse_p[ cc._reuse_p_index];
+ cc._reuse_p_index++;
+ p.x = x;
+ p.y = y;
+ return p;
+};
+
+cc.pointEqualToPoint = function (point1, point2) {
+ return ((point1.x == point2.x) && (point1.y == point2.y));
+};
+
+//
+// Grid
+//
+cc.g = function (x, y) {
+ return {x:x, y:y};
+};
+cc._g = function (x, y) {
+ cc._reuse_grid.x = x;
+ cc._reuse_grid.y = y;
+ return cc._reuse_grid;
+};
+
+//
+// Size
+//
+cc.size = function (w, h) {
+ return {width:w, height:h};
+};
+cc._size = function (w, h) {
+ cc._reuse_size.width = w;
+ cc._reuse_size.height = h;
+ return cc._reuse_size;
+};
+cc.sizeEqualToSize = function (size1, size2) {
+ return ((size1.width == size2.width) && (size1.height == size2.height));
+};
+
+//
+// Rect
+//
+cc.rect = function (x, y, w, h) {
+ return {x:x, y:y, width:w, height:h};
+};
+cc._rect = function(x,y,w,h)
+{
+ cc._reuse_rect.x = x;
+ cc._reuse_rect.y = y;
+ cc._reuse_rect.width = w;
+ cc._reuse_rect.height = h;
+ return cc._reuse_rect;
+};
+cc.rectEqualToRect = function (rect1, rect2) {
+ return ( rect1.x==rect2.x && rect1.y==rect2.y && rect1.width==rect2.width && rect1.height==rect2.height);
+};
+
+cc._rect = function (x, y, w, h) {
+ cc._reuse_rect.x = x;
+ cc._reuse_rect.y = y;
+ cc._reuse_rect.width = w;
+ cc._reuse_rect.height = h;
+ return cc._reuse_rect;
+};
+cc.rectEqualToRect = function (rect1, rect2) {
+ return ( rect1.x == rect2.x && rect1.y == rect2.y && rect1.width == rect2.width && rect1.height == rect2.height);
+};
+
+cc.rectContainsRect = function (rect1, rect2) {
+ if ((rect1.x >= rect2.x) || (rect1.y >= rect2.y) ||
+ ( rect1.x + rect1.width <= rect2.x + rect2.width) ||
+ ( rect1.y + rect1.height <= rect2.y + rect2.height))
+ return false;
+ return true;
+};
+
+cc.rectGetMaxX = function (rect) {
+ return (rect.x + rect.width);
+};
+
+cc.rectGetMidX = function (rect) {
+ return (rect.x + rect.width / 2.0);
+};
+
+cc.rectGetMinX = function (rect) {
+ return rect.x;
+};
+
+cc.rectGetMaxY = function (rect) {
+ return(rect.y + rect.height);
+};
+
+cc.rectGetMidY = function (rect) {
+ return rect.y + rect.height / 2.0;
+};
+
+cc.rectGetMinY = function (rect) {
+ return rect.y;
+};
+
+cc.rectContainsPoint = function (rect, point) {
+ var ret = false;
+ if (point.x >= rect.x && point.x <= rect.x + rect.width &&
+ point.y >= rect.y && point.y <= rect.y + rect.height) {
+ ret = true;
+ }
+ return ret;
+};
+
+
+// XXX Should be done in native
+cc.rectIntersectsRect = function (rectA, rectB) {
+ var bool = !( rectA.x > rectB.x + rectB.width ||
+ rectA.x + rectA.width < rectB.x ||
+ rectA.y > rectB.y + rectB.height ||
+ rectA.y + rectA.height < rectB.y );
+
+ return bool;
+};
+
+cc.rectUnion = function (rectA, rectB) {
+ var rect = cc.rect(0, 0, 0, 0);
+ rect.x = Math.min(rectA.x, rectB.x);
+ rect.y = Math.min(rectA.y, rectB.y);
+ rect.width = Math.max(rectA.x + rectA.width, rectB.x + rectB.width) - rect.x;
+ rect.height = Math.max(rectA.y + rectA.height, rectB.y + rectB.height) - rect.y;
+ return rect;
+};
+
+cc.rectIntersection = function (rectA, rectB) {
+ var intersection = cc.rect(
+ Math.max(rectA.x, rectB.x),
+ Math.max(rectA.y, rectB.y),
+ 0, 0);
+
+ intersection.width = Math.min(rectA.x + rectA.width, rectB.x + rectB.width) - intersection.x;
+ intersection.height = Math.min(rectA.y + rectA.height, rectB.y + rectB.height) - intersection.y;
+ return intersection;
+};
+
+//
+// Array: for cocos2d-html5 compatibility
+//
+cc.ArrayRemoveObject = function (arr, delObj) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] == delObj) {
+ arr.splice(i, 1);
+ }
+ }
+};
+
+//
+// Helpers
+//
+cc.dump = function (obj) {
+ for (var i in obj)
+ cc.log(i + " = " + obj[i]);
+};
+
+// dump config info, but only in debug mode
+cc.dumpConfig = function () {
+ if (cc.config.debug)
+ cc.dump(cc.config);
+};
+
+//
+// Bindings Overrides
+//
+// MenuItemToggle
+cc.MenuItemToggle.create = function( /* var args */) {
+
+ var n = arguments.length;
+
+ if (typeof arguments[n-2] === 'function' || typeof arguments[n-1] === 'function') {
+ var args = Array.prototype.slice.call(arguments);
+ var obj = null;
+ if( typeof arguments[n-2] === 'function' )
+ obj = args.pop();
+
+ var func = args.pop();
+
+ // create it with arguments,
+ var item = cc.MenuItemToggle._create.apply(this, args);
+
+ // then set the callback
+ if( obj !== null )
+ item.setCallback(func, obj);
+ else
+ item.setCallback(func);
+ return item;
+ } else {
+ return cc.MenuItemToggle._create.apply(this, arguments);
+ }
+};
+
+// LabelAtlas
+cc.LabelAtlas.create = function( a,b,c,d,e ) {
+
+ var n = arguments.length;
+
+ if ( n == 5) {
+ return cc.LabelAtlas._create(a,b,c,d,e.charCodeAt(0));
+ } else {
+ return cc.LabelAtlas._create.apply(this, arguments);
+ }
+};
+
+// PhysicsDebugNode
+cc.PhysicsDebugNode.create = function( space ) {
+ var s = space;
+ if( space.handle !== undefined )
+ s = space.handle;
+ return cc.PhysicsDebugNode._create( s );
+};
+cc.PhysicsDebugNode.prototype.setSpace = function( space ) {
+ var s = space;
+ if( space.handle !== undefined )
+ s = space.handle;
+ return this._setSpace( s );
+};
+
+// PhysicsSprite
+cc.PhysicsSprite.prototype.setBody = function( body ) {
+ var b = body;
+ if( body.handle !== undefined )
+ b = body.handle;
+ return this._setBody( b );
+};
+
+
+/**
+ * Associates a base class with a native superclass
+ * @function
+ * @param {object} jsobj subclass
+ * @param {object} klass superclass
+ */
+cc.associateWithNative = function (jsobj, superclass_or_instance) {
+
+ try {
+ // Used when subclassing using the "extend" method
+ var native = new superclass_or_instance();
+ __associateObjWithNative(jsobj, native);
+ } catch (err) {
+ // Used when subclassing using the goog.inherits method
+ __associateObjWithNative(jsobj, superclass_or_instance);
+ }
+};
+
+//
+// JSB supports 2 official ways to create subclasses
+//
+// 1) Google "subclasses" borrowed from closure library
+// This is the recommended way to do it
+//
+
+cc.inherits = function (childCtor, parentCtor) {
+ /** @constructor */
+ function tempCtor() {};
+ tempCtor.prototype = parentCtor.prototype;
+ childCtor.superClass_ = parentCtor.prototype;
+ childCtor.prototype = new tempCtor();
+ childCtor.prototype.constructor = childCtor;
+
+ // Copy "static" method, but doesn't generate subclasses.
+// for( var i in parentCtor ) {
+// childCtor[ i ] = parentCtor[ i ];
+// }
+};
+
+cc.base = function (me, opt_methodName, var_args) {
+ var caller = arguments.callee.caller;
+ if (caller.superClass_) {
+ // This is a constructor. Call the superclass constructor.
+ ret = caller.superClass_.constructor.apply(me, Array.prototype.slice.call(arguments, 1));
+ return ret;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 2);
+ var foundCaller = false;
+ for (var ctor = me.constructor;
+ ctor; ctor = ctor.superClass_ && ctor.superClass_.constructor) {
+ if (ctor.prototype[opt_methodName] === caller) {
+ foundCaller = true;
+ } else if (foundCaller) {
+ return ctor.prototype[opt_methodName].apply(me, args);
+ }
+ }
+
+ // If we did not find the caller in the prototype chain,
+ // then one of two things happened:
+ // 1) The caller is an instance method.
+ // 2) This method was not called by the right caller.
+ if (me[opt_methodName] === caller) {
+ return me.constructor.prototype[opt_methodName].apply(me, args);
+ } else {
+ throw Error(
+ 'cc.base called from a method of one name ' +
+ 'to a method of a different name');
+ }
+
+};
+
+
+//
+// 2) Using "extend" subclassing
+// Simple JavaScript Inheritance By John Resig http://ejohn.org/
+//
+cc.Class = function () {};
+cc.Class.extend = function (prop) {
+ var _super = this.prototype;
+
+ // Instantiate a base class (but only create the instance,
+ // don't run the init constructor)
+ initializing = true;
+ var prototype = new this();
+ initializing = false;
+ fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
+
+ // Copy the properties over onto the new prototype
+ for (var name in prop) {
+ // Check if we're overwriting an existing function
+ prototype[name] = typeof prop[name] == "function" &&
+ typeof _super[name] == "function" && fnTest.test(prop[name]) ?
+ (function (name, fn) {
+ return function () {
+ var tmp = this._super;
+
+ // Add a new ._super() method that is the same method
+ // but on the super-class
+ this._super = _super[name];
+
+ // The method only need to be bound temporarily, so we
+ // remove it when we're done executing
+ var ret = fn.apply(this, arguments);
+ this._super = tmp;
+
+ return ret;
+ };
+ })(name, prop[name]) :
+ prop[name];
+ }
+
+ // The dummy class constructor
+ function Class() {
+ // All construction is actually done in the init method
+ if (!initializing && this.ctor)
+ this.ctor.apply(this, arguments);
+ }
+
+ // Populate our constructed prototype object
+ Class.prototype = prototype;
+
+ // Enforce the constructor to be what we expect
+ Class.prototype.constructor = Class;
+
+ // And make this class extendable
+ Class.extend = arguments.callee;
+
+ return Class;
+};
+
+cc.Node.prototype.ctor = function () {};
+cc.Node.extend = cc.Class.extend;
+cc.Layer.extend = cc.Class.extend;
+cc.LayerGradient.extend = cc.Class.extend;
+cc.LayerColor.extend = cc.Class.extend;
+cc.Sprite.extend = cc.Class.extend;
+cc.MenuItemFont.extend = cc.Class.extend;
+cc.Scene.extend = cc.Class.extend;
diff --git a/samples/WatermelonWithMe/bindings/jsb_constants_cocosbuilder.js b/samples/WatermelonWithMe/bindings/jsb_constants_cocosbuilder.js
new file mode 100644
index 0000000000..306c5e7934
--- /dev/null
+++ b/samples/WatermelonWithMe/bindings/jsb_constants_cocosbuilder.js
@@ -0,0 +1,118 @@
+//
+// CocosBuilder definitions
+//
+
+cc.Reader = {};
+
+var _ccbGlobalContext = this;
+
+cc.Reader.load = function(file, owner, parentSize)
+{
+ // Load the node graph using the correct function
+ var reader = cc._Reader.create();
+ var node;
+
+ if (owner && parentSize)
+ {
+ node = reader.load(file, owner, parentSize);
+ }
+ else if (owner)
+ {
+ node = reader.load(file,owner);
+ }
+ else
+ {
+ node = reader.load(file);
+ }
+
+ // Assign owner callbacks & member variables
+ if (owner)
+ {
+ // Callbacks
+ var ownerCallbackNames = reader.getOwnerCallbackNames();
+ var ownerCallbackNodes = reader.getOwnerCallbackNodes();
+
+ for (var i = 0; i < ownerCallbackNames.length; i++)
+ {
+ var callbackName = ownerCallbackNames[i];
+ var callbackNode = ownerCallbackNodes[i];
+
+ callbackNode.setCallback(owner[callbackName], owner);
+ }
+
+ // Variables
+ var ownerOutletNames = reader.getOwnerOutletNames();
+ var ownerOutletNodes = reader.getOwnerOutletNodes();
+
+ for (var i = 0; i < ownerOutletNames.length; i++)
+ {
+ var outletName = ownerOutletNames[i];
+ var outletNode = ownerOutletNodes[i];
+
+ owner[outletName] = outletNode;
+ }
+ }
+
+ var nodesWithAnimationManagers = reader.getNodesWithAnimationManagers();
+ var animationManagersForNodes = reader.getAnimationManagersForNodes();
+
+ // Attach animation managers to nodes and assign root node callbacks and member variables
+ for (var i = 0; i < nodesWithAnimationManagers.length; i++)
+ {
+ var innerNode = nodesWithAnimationManagers[i];
+ var animationManager = animationManagersForNodes[i];
+
+ innerNode.animationManager = animationManager;
+
+ var documentControllerName = animationManager.getDocumentControllerName();
+ if (!documentControllerName) continue;
+
+ // Create a document controller
+ var controller = new _ccbGlobalContext[documentControllerName]();
+ controller.controllerName = documentControllerName;
+
+ innerNode.controller = controller;
+ controller.rootNode = innerNode;
+
+ // Callbacks
+ var documentCallbackNames = animationManager.getDocumentCallbackNames();
+ var documentCallbackNodes = animationManager.getDocumentCallbackNodes();
+
+ for (var j = 0; j < documentCallbackNames.length; j++)
+ {
+ var callbackName = documentCallbackNames[j];
+ var callbackNode = documentCallbackNodes[j];
+
+ callbackNode.setCallback(controller[callbackName], controller);
+ }
+
+
+ // Variables
+ var documentOutletNames = animationManager.getDocumentOutletNames();
+ var documentOutletNodes = animationManager.getDocumentOutletNodes();
+
+ for (var j = 0; j < documentOutletNames.length; j++)
+ {
+ var outletName = documentOutletNames[j];
+ var outletNode = documentOutletNodes[j];
+
+ controller[outletName] = outletNode;
+ }
+
+ if (typeof(controller.onDidLoadFromCCB) == "function")
+ {
+ controller.onDidLoadFromCCB();
+ }
+ }
+
+ return node;
+}
+
+cc.Reader.loadAsScene = function(file, owner, parentSize)
+{
+ var node = cc.Reader.load(file, owner, parentSize);
+ var scene = cc.Scene.create();
+ scene.addChild( node );
+
+ return scene;
+}
diff --git a/samples/WatermelonWithMe/bindings/jsb_constants_gl.js b/samples/WatermelonWithMe/bindings/jsb_constants_gl.js
new file mode 100644
index 0000000000..8b9d2f701d
--- /dev/null
+++ b/samples/WatermelonWithMe/bindings/jsb_constants_gl.js
@@ -0,0 +1,23 @@
+//
+// OpenGL defines
+//
+
+var gl = gl || {};
+gl.NEAREST = 0x2600;
+gl.LINEAR = 0x2601;
+gl.REPEAT = 0x2901;
+gl.CLAMP_TO_EDGE = 0x812F;
+gl.CLAMP_TO_BORDER = 0x812D;
+gl.LINEAR_MIPMAP_NEAREST = 0x2701;
+gl.NEAREST_MIPMAP_NEAREST = 0x2700;
+gl.ZERO = 0;
+gl.ONE = 1;
+gl.SRC_COLOR = 0x0300;
+gl.ONE_MINUS_SRC_COLOR = 0x0301;
+gl.SRC_ALPHA = 0x0302;
+gl.ONE_MINUS_SRC_ALPHA = 0x0303;
+gl.DST_ALPHA = 0x0304;
+gl.ONE_MINUS_DST_ALPHA = 0x0305;
+gl.DST_COLOR = 0x0306;
+gl.ONE_MINUS_DST_COLOR = 0x0307;
+gl.SRC_ALPHA_SATURATE = 0x0308;
diff --git a/samples/WatermelonWithMe/proj.android/.classpath b/samples/WatermelonWithMe/proj.android/.classpath
new file mode 100644
index 0000000000..a4763d1eec
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/samples/WatermelonWithMe/proj.android/.project b/samples/WatermelonWithMe/proj.android/.project
new file mode 100644
index 0000000000..e27974fd84
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/.project
@@ -0,0 +1,33 @@
+
+
+ TestJavascript
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/samples/WatermelonWithMe/proj.android/AndroidManifest.xml b/samples/WatermelonWithMe/proj.android/AndroidManifest.xml
new file mode 100644
index 0000000000..156094ab60
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/AndroidManifest.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/WatermelonWithMe/proj.android/ant.properties b/samples/WatermelonWithMe/proj.android/ant.properties
new file mode 100644
index 0000000000..f8af38bfb4
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/ant.properties
@@ -0,0 +1 @@
+aapt.ignore.assets="!*.pvr.gz:!*.gz:!.svn:!.git:.*:
_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
diff --git a/samples/WatermelonWithMe/proj.android/build.xml b/samples/WatermelonWithMe/proj.android/build.xml
new file mode 100644
index 0000000000..f3fd9b9293
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/build.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/WatermelonWithMe/proj.android/build_native.sh b/samples/WatermelonWithMe/proj.android/build_native.sh
new file mode 100644
index 0000000000..ae23cf7826
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/build_native.sh
@@ -0,0 +1,87 @@
+APPNAME="TestJavascript"
+
+# options
+
+buildexternalsfromsource=
+PARALLEL_BUILD_FLAG=
+
+usage(){
+cat << EOF
+usage: $0 [options]
+
+Build C/C++ code for $APPNAME using Android NDK
+
+OPTIONS:
+-s Build externals from source
+-p Run make with -j8 option to take advantage of multiple processors
+-h this help
+EOF
+}
+
+while getopts "sph" OPTION; do
+case "$OPTION" in
+s)
+buildexternalsfromsource=1
+;;
+p)
+PARALLEL_BUILD_FLAG=\-j8
+;;
+h)
+usage
+exit 0
+;;
+esac
+done
+
+# exit this script if any commmand fails
+set -e
+
+# paths
+
+if [ -z "${NDK_ROOT+aaa}" ];then
+echo "please define NDK_ROOT"
+exit 1
+fi
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# ... use paths relative to current directory
+COCOS2DX_ROOT="$DIR/../../.."
+APP_ROOT="$DIR/.."
+APP_ANDROID_ROOT="$DIR"
+
+echo
+echo "Paths"
+echo " NDK_ROOT = $NDK_ROOT"
+echo " COCOS2DX_ROOT = $COCOS2DX_ROOT"
+echo " APP_ROOT = $APP_ROOT"
+echo " APP_ANDROID_ROOT = $APP_ANDROID_ROOT"
+echo
+
+# Debug
+set -x
+
+# make sure assets is exist
+if [ -d "$APP_ANDROID_ROOT"/assets ]; then
+ rm -rf "$APP_ANDROID_ROOT"/assets
+fi
+
+mkdir "$APP_ANDROID_ROOT"/assets
+mkdir "$APP_ANDROID_ROOT"/assets/res
+
+# copy "cocos2d-js-tests/res" into "assets/res"
+cp -rf "$APP_ROOT"/cocos2d-js-tests/res "$APP_ANDROID_ROOT"/assets
+
+# copy src/**/*.js from cocos2d-js-tests into assets' root
+cp -rf "$APP_ROOT"/cocos2d-js-tests/src "$APP_ANDROID_ROOT"/assets
+
+# copy bindings/*.js into assets' root
+cp -f "$APP_ROOT"/bindings/*.js "$APP_ANDROID_ROOT"/assets
+
+echo "Using prebuilt externals"
+echo
+
+set -x
+
+"$NDK_ROOT"/ndk-build $PARALLEL_BUILD_FLAG -C "$APP_ANDROID_ROOT" $* \
+ "NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt" \
+ NDK_LOG=0 V=0
diff --git a/samples/WatermelonWithMe/proj.android/jni/Android.mk b/samples/WatermelonWithMe/proj.android/jni/Android.mk
new file mode 100644
index 0000000000..46c62e42d6
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/jni/Android.mk
@@ -0,0 +1,28 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := watermelonwithme_shared
+
+LOCAL_MODULE_FILENAME := libwatermelonwithme
+
+LOCAL_SRC_FILES := watermelonwithme/main.cpp \
+ ../../Classes/AppDelegate.cpp
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
+
+LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
+LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
+LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
+LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static
+LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey
+
+LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
+
+include $(BUILD_SHARED_LIBRARY)
+
+$(call import-module,cocos2dx)
+$(call import-module,CocosDenshion/android)
+$(call import-module,external/chipmunk)
+$(call import-module,scripting/javascript/spidermonkey-android)
+$(call import-module,scripting/javascript/bindings)
diff --git a/samples/WatermelonWithMe/proj.android/jni/Application.mk b/samples/WatermelonWithMe/proj.android/jni/Application.mk
new file mode 100644
index 0000000000..1444a4d607
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/jni/Application.mk
@@ -0,0 +1,3 @@
+APP_STL := gnustl_static
+APP_CPPFLAGS := -frtti -DCOCOS2D_JAVASCRIPT=1
+APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=1
diff --git a/samples/WatermelonWithMe/proj.android/jni/watermelonwithme/main.cpp b/samples/WatermelonWithMe/proj.android/jni/watermelonwithme/main.cpp
new file mode 100644
index 0000000000..2f2d1e0c10
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/jni/watermelonwithme/main.cpp
@@ -0,0 +1,45 @@
+#include "AppDelegate.h"
+#include "cocos2d.h"
+#include "platform/android/jni/JniHelper.h"
+#include "CCEventType.h"
+#include
+#include
+
+#define LOG_TAG "main"
+#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
+
+using namespace cocos2d;
+
+extern "C"
+{
+
+jint JNI_OnLoad(JavaVM *vm, void *reserved)
+{
+ JniHelper::setJavaVM(vm);
+
+ return JNI_VERSION_1_4;
+}
+
+void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
+{
+ if (!CCDirector::sharedDirector()->getOpenGLView())
+ {
+ CCEGLView *view = CCEGLView::sharedOpenGLView();
+ view->setFrameSize(w, h);
+
+ AppDelegate *pAppDelegate = new AppDelegate();
+ CCApplication::sharedApplication()->run();
+ }
+ else
+ {
+ ccDrawInit();
+ ccGLInvalidateStateCache();
+
+ CCShaderCache::sharedShaderCache()->reloadDefaultShaders();
+ CCTextureCache::reloadAllTextures();
+ CCNotificationCenter::sharedNotificationCenter()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
+ CCDirector::sharedDirector()->setGLDefaultValues();
+ }
+}
+
+}
diff --git a/samples/WatermelonWithMe/proj.android/ndkgdb.sh b/samples/WatermelonWithMe/proj.android/ndkgdb.sh
new file mode 100644
index 0000000000..5df7332ceb
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/ndkgdb.sh
@@ -0,0 +1,47 @@
+APPNAME="TestJavascript"
+APP_ANDROID_NAME="org.cocos2dx.testjavascript"
+
+if [ -z "${SDK_ROOT+aaa}" ]; then
+# ... if SDK_ROOT is not set, use "$HOME/bin/android-sdk"
+ SDK_ROOT="$HOME/bin/android-sdk"
+fi
+
+if [ -z "${NDK_ROOT+aaa}" ]; then
+# ... if NDK_ROOT is not set, use "$HOME/bin/android-ndk"
+ NDK_ROOT="$HOME/bin/android-ndk"
+fi
+
+if [ -z "${COCOS2DX_ROOT+aaa}" ]; then
+# ... if COCOS2DX_ROOT is not set
+# ... find current working directory
+ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# ... use paths relative to current directory
+ COCOS2DX_ROOT="$DIR/../../.."
+ APP_ROOT="$DIR/.."
+ APP_ANDROID_ROOT="$DIR"
+else
+ APP_ROOT="$COCOS2DX_ROOT/samples/$APPNAME"
+ APP_ANDROID_ROOT="$COCOS2DX_ROOT/samples/$APPNAME/proj.android"
+fi
+
+echo "NDK_ROOT = $NDK_ROOT"
+echo "SDK_ROOT = $SDK_ROOT"
+echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
+echo "APP_ROOT = $APP_ROOT"
+echo "APP_ANDROID_ROOT = $APP_ANDROID_ROOT"
+echo "APP_ANDROID_NAME = $APP_ANDROID_NAME"
+
+echo
+echo "Killing and restarting ${APP_ANDROID_NAME}"
+echo
+
+set -x
+
+"${SDK_ROOT}"/platform-tools/adb shell am force-stop "${APP_ANDROID_NAME}"
+
+NDK_MODULE_PATH="${COCOS2DX_ROOT}":"${COCOS2DX_ROOT}"/cocos2dx/platform/third_party/android/prebuilt \
+ "${NDK_ROOT}"/ndk-gdb \
+ --adb="${SDK_ROOT}"/platform-tools/adb \
+ --verbose \
+ --start \
+ --force
diff --git a/samples/WatermelonWithMe/proj.android/proguard-project.txt b/samples/WatermelonWithMe/proj.android/proguard-project.txt
new file mode 100644
index 0000000000..f2fe1559a2
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/samples/WatermelonWithMe/proj.android/project.properties b/samples/WatermelonWithMe/proj.android/project.properties
new file mode 100644
index 0000000000..d5f90ebab1
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/project.properties
@@ -0,0 +1,13 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-8
+
+android.library.reference.1=../../../cocos2dx/platform/android/java
diff --git a/samples/WatermelonWithMe/proj.android/res/values/strings.xml b/samples/WatermelonWithMe/proj.android/res/values/strings.xml
new file mode 100644
index 0000000000..fbcddf55ac
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+
+ TestJavascript
+
diff --git a/samples/WatermelonWithMe/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java b/samples/WatermelonWithMe/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java
new file mode 100644
index 0000000000..69117f4a73
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java
@@ -0,0 +1,39 @@
+/****************************************************************************
+Copyright (c) 2010-2012 cocos2d-x.org
+
+http://www.cocos2d-x.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+****************************************************************************/
+package org.cocos2dx.testjavascript;
+
+import org.cocos2dx.lib.Cocos2dxActivity;
+
+import android.os.Bundle;
+
+public class TestJavascript extends Cocos2dxActivity{
+
+ protected void onCreate(Bundle savedInstanceState){
+ super.onCreate(savedInstanceState);
+ }
+
+ static {
+ System.loadLibrary("testjavascript");
+ }
+}
diff --git a/samples/WatermelonWithMe/proj.ios/AppController.h b/samples/WatermelonWithMe/proj.ios/AppController.h
new file mode 100644
index 0000000000..10287bd13f
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/AppController.h
@@ -0,0 +1,17 @@
+//
+// testjsAppController.h
+// testjs
+//
+// Created by Rolando Abarca on 3/19/12.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+@class RootViewController;
+
+@interface AppController : NSObject {
+ UIWindow *window;
+ RootViewController *viewController;
+}
+
+@end
+
diff --git a/samples/WatermelonWithMe/proj.ios/AppController.mm b/samples/WatermelonWithMe/proj.ios/AppController.mm
new file mode 100644
index 0000000000..3e3e5c9474
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/AppController.mm
@@ -0,0 +1,119 @@
+//
+// testjsAppController.mm
+// testjs
+//
+// Created by Rolando Abarca on 3/19/12.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+#import
+#import "AppController.h"
+#import "cocos2d.h"
+#import "EAGLView.h"
+#import "AppDelegate.h"
+
+#import "RootViewController.h"
+
+@implementation AppController
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+// cocos2d application instance
+static AppDelegate s_sharedApplication;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the view controller's view to the window and display.
+ window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
+ EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
+ pixelFormat: kEAGLColorFormatRGBA8
+ depthFormat: GL_DEPTH_COMPONENT16 //_OES
+ preserveBackbuffer: NO
+ sharegroup: nil
+ multiSampling: NO
+ numberOfSamples: 0 ];
+
+ // Use RootViewController manage EAGLView
+ viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
+ viewController.wantsFullScreenLayout = YES;
+ viewController.view = __glView;
+
+ // Set RootViewController to window
+ if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
+ {
+ // warning: addSubView doesn't work on iOS6
+ [window addSubview: viewController.view];
+ }
+ else
+ {
+ // use this method on ios6
+ [window setRootViewController:viewController];
+ }
+
+ [window makeKeyAndVisible];
+
+ [[UIApplication sharedApplication] setStatusBarHidden: YES];
+
+ cocos2d::CCApplication::sharedApplication()->run();
+ return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+ cocos2d::CCDirector::sharedDirector()->pause();
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+ cocos2d::CCDirector::sharedDirector()->resume();
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+ */
+ cocos2d::CCApplication::sharedApplication()->applicationDidEnterBackground();
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+ */
+ cocos2d::CCApplication::sharedApplication()->applicationWillEnterForeground();
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ /*
+ Called when the application is about to terminate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+ cocos2d::CCDirector::sharedDirector()->purgeCachedData();
+}
+
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+@end
+
diff --git a/samples/WatermelonWithMe/proj.ios/Default-568h@2x.png.REMOVED.git-id b/samples/WatermelonWithMe/proj.ios/Default-568h@2x.png.REMOVED.git-id
new file mode 100644
index 0000000000..8f5838f3a8
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/Default-568h@2x.png.REMOVED.git-id
@@ -0,0 +1 @@
+66c6d1cead373b45218424f6a82f370897e443e4
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/proj.ios/Default@2x.png.REMOVED.git-id b/samples/WatermelonWithMe/proj.ios/Default@2x.png.REMOVED.git-id
new file mode 100644
index 0000000000..8843505b20
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/Default@2x.png.REMOVED.git-id
@@ -0,0 +1 @@
+84689888a14a2123d2b39f7f2f61be8c15207479
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/proj.ios/Prefix.pch b/samples/WatermelonWithMe/proj.ios/Prefix.pch
new file mode 100644
index 0000000000..b056d8694a
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'testjs' target in the 'testjs' project
+//
+
+#ifdef __OBJC__
+ #import
+ #import
+#endif
diff --git a/samples/WatermelonWithMe/proj.ios/RootViewController.h b/samples/WatermelonWithMe/proj.ios/RootViewController.h
new file mode 100644
index 0000000000..a40c2edd28
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/RootViewController.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ Copyright (c) 2010-2011 cocos2d-x.org
+ Copyright (c) 2010 Ricardo Quesada
+
+ http://www.cocos2d-x.org
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#import
+
+
+@interface RootViewController : UIViewController {
+
+}
+
+@end
diff --git a/samples/WatermelonWithMe/proj.ios/RootViewController.mm b/samples/WatermelonWithMe/proj.ios/RootViewController.mm
new file mode 100644
index 0000000000..7a0d59ccc9
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/RootViewController.mm
@@ -0,0 +1,73 @@
+//
+// testjsAppController.h
+// testjs
+//
+// Created by Rolando Abarca on 3/19/12.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import "RootViewController.h"
+
+
+@implementation RootViewController
+
+/*
+ // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+ if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
+ // Custom initialization
+ }
+ return self;
+}
+*/
+
+/*
+// Implement loadView to create a view hierarchy programmatically, without using a nib.
+- (void)loadView {
+}
+*/
+
+/*
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad {
+ [super viewDidLoad];
+}
+
+*/
+// Override to allow orientations other than the default portrait orientation.
+// This method is deprecated on ios6
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return UIInterfaceOrientationIsLandscape( interfaceOrientation );
+}
+
+// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
+- (NSUInteger) supportedInterfaceOrientations{
+#ifdef __IPHONE_6_0
+ return UIInterfaceOrientationMaskAllButUpsideDown;
+#endif
+}
+
+- (BOOL) shouldAutorotate {
+ return YES;
+}
+
+- (void)didReceiveMemoryWarning {
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+- (void)viewDidUnload {
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+@end
diff --git a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000..03f7e357e8
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj
@@ -0,0 +1,1188 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 15384E5816119CC30021DC07 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4016119CC30021DC07 /* cocos2d_specifics.cpp */; };
+ 15384E5916119CC30021DC07 /* cocosjs_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4216119CC30021DC07 /* cocosjs_manual_conversions.cpp */; };
+ 15384E5A16119CC30021DC07 /* cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4516119CC30021DC07 /* cocos2dx.cpp */; };
+ 15384E5D16119CC30021DC07 /* js_bindings_ccbreader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4916119CC30021DC07 /* js_bindings_ccbreader.cpp */; };
+ 15384E6016119CC30021DC07 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E5016119CC30021DC07 /* js_manual_conversions.cpp */; };
+ 15384E6116119CC30021DC07 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E5216119CC30021DC07 /* ScriptingCore.cpp */; };
+ 15384ED716119D5E0021DC07 /* CCBAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E6516119D5E0021DC07 /* CCBAnimationManager.cpp */; };
+ 15384ED816119D5E0021DC07 /* CCBFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E6716119D5E0021DC07 /* CCBFileLoader.cpp */; };
+ 15384ED916119D5E0021DC07 /* CCBKeyframe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E6916119D5E0021DC07 /* CCBKeyframe.cpp */; };
+ 15384EDA16119D5E0021DC07 /* CCBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E6C16119D5E0021DC07 /* CCBReader.cpp */; };
+ 15384EDB16119D5E0021DC07 /* CCBSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E6F16119D5E0021DC07 /* CCBSequence.cpp */; };
+ 15384EDC16119D5E0021DC07 /* CCBSequenceProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7116119D5E0021DC07 /* CCBSequenceProperty.cpp */; };
+ 15384EDD16119D5E0021DC07 /* CCBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7316119D5E0021DC07 /* CCBValue.cpp */; };
+ 15384EDE16119D5E0021DC07 /* CCControlButtonLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7516119D5E0021DC07 /* CCControlButtonLoader.cpp */; };
+ 15384EDF16119D5E0021DC07 /* CCControlLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7716119D5E0021DC07 /* CCControlLoader.cpp */; };
+ 15384EE016119D5E0021DC07 /* CCData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7916119D5E0021DC07 /* CCData.cpp */; };
+ 15384EE116119D5E0021DC07 /* CCLabelBMFontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7B16119D5E0021DC07 /* CCLabelBMFontLoader.cpp */; };
+ 15384EE216119D5E0021DC07 /* CCLabelTTFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7D16119D5E0021DC07 /* CCLabelTTFLoader.cpp */; };
+ 15384EE316119D5E0021DC07 /* CCLayerColorLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E7F16119D5E0021DC07 /* CCLayerColorLoader.cpp */; };
+ 15384EE416119D5E0021DC07 /* CCLayerGradientLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8116119D5E0021DC07 /* CCLayerGradientLoader.cpp */; };
+ 15384EE516119D5E0021DC07 /* CCLayerLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8316119D5E0021DC07 /* CCLayerLoader.cpp */; };
+ 15384EE616119D5E0021DC07 /* CCMenuItemImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8516119D5E0021DC07 /* CCMenuItemImageLoader.cpp */; };
+ 15384EE716119D5E0021DC07 /* CCMenuItemLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8716119D5E0021DC07 /* CCMenuItemLoader.cpp */; };
+ 15384EE816119D5E0021DC07 /* CCNode+CCBRelativePositioning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8A16119D5E0021DC07 /* CCNode+CCBRelativePositioning.cpp */; };
+ 15384EE916119D5E0021DC07 /* CCNodeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8C16119D5E0021DC07 /* CCNodeLoader.cpp */; };
+ 15384EEA16119D5E0021DC07 /* CCNodeLoaderLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E8E16119D5E0021DC07 /* CCNodeLoaderLibrary.cpp */; };
+ 15384EEB16119D5E0021DC07 /* CCParticleSystemQuadLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E9116119D5E0021DC07 /* CCParticleSystemQuadLoader.cpp */; };
+ 15384EEC16119D5E0021DC07 /* CCScale9SpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E9316119D5E0021DC07 /* CCScale9SpriteLoader.cpp */; };
+ 15384EED16119D5E0021DC07 /* CCScrollViewLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E9516119D5E0021DC07 /* CCScrollViewLoader.cpp */; };
+ 15384EEE16119D5E0021DC07 /* CCSpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E9716119D5E0021DC07 /* CCSpriteLoader.cpp */; };
+ 15384EFB16119D5E0021DC07 /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384EB716119D5E0021DC07 /* CCEditBox.cpp */; };
+ 15384EFD16119D5E0021DC07 /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15384EBD16119D5E0021DC07 /* CCEditBoxImplIOS.mm */; };
+ 15384EFE16119D5E0021DC07 /* EditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15384EBF16119D5E0021DC07 /* EditBoxImplIOS.mm */; };
+ 15384EFF16119D5E0021DC07 /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384EC116119D5E0021DC07 /* CCScrollView.cpp */; };
+ 15384F0016119D5E0021DC07 /* CCSorting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384EC316119D5E0021DC07 /* CCSorting.cpp */; };
+ 15384F0116119D5E0021DC07 /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384EC516119D5E0021DC07 /* CCTableView.cpp */; };
+ 15384F0216119D5E0021DC07 /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384EC716119D5E0021DC07 /* CCTableViewCell.cpp */; };
+ 15426FC315B5742200712A7F /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15426AF115B5733200712A7F /* libcocos2dx.a */; };
+ 15426FE615B5743C00712A7F /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD015B5743C00712A7F /* CDAudioManager.m */; };
+ 15426FE715B5743C00712A7F /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD315B5743C00712A7F /* CDOpenALSupport.m */; };
+ 15426FE815B5743C00712A7F /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD515B5743C00712A7F /* CocosDenshion.m */; };
+ 15426FE915B5743C00712A7F /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */; };
+ 15426FEA15B5743C00712A7F /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */; };
+ 15CFE1A61612FD0E00BF2188 /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */; };
+ 15CFE1A71612FD0E00BF2188 /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */; };
+ 15CFE1A81612FD0E00BF2188 /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1911612FD0E00BF2188 /* CCControlColourPicker.cpp */; };
+ 15CFE1A91612FD0E00BF2188 /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1941612FD0E00BF2188 /* CCControlHuePicker.cpp */; };
+ 15CFE1AA1612FD0E00BF2188 /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1961612FD0E00BF2188 /* CCControlPotentiometer.cpp */; };
+ 15CFE1AB1612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1981612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.cpp */; };
+ 15CFE1AC1612FD0E00BF2188 /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE19A1612FD0E00BF2188 /* CCControlSlider.cpp */; };
+ 15CFE1AD1612FD0E00BF2188 /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE19C1612FD0E00BF2188 /* CCControlStepper.cpp */; };
+ 15CFE1AE1612FD0E00BF2188 /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE19E1612FD0E00BF2188 /* CCControlSwitch.cpp */; };
+ 15CFE1AF1612FD0E00BF2188 /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1A01612FD0E00BF2188 /* CCControlUtils.cpp */; };
+ 15CFE1B01612FD0E00BF2188 /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1A21612FD0E00BF2188 /* CCInvocation.cpp */; };
+ 15CFE1B11612FD0E00BF2188 /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1A41612FD0E00BF2188 /* CCScale9Sprite.cpp */; };
+ 15DA882A1627C44800155276 /* jsb_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88251627C44800155276 /* jsb_constants.js */; };
+ 15DA882B1627C44800155276 /* jsb_constants_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88261627C44800155276 /* jsb_constants_chipmunk.js */; };
+ 15DA882C1627C44800155276 /* jsb_constants_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88271627C44800155276 /* jsb_constants_cocos2d.js */; };
+ 15DA882D1627C44800155276 /* jsb_constants_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88281627C44800155276 /* jsb_constants_cocosbuilder.js */; };
+ 15DA882E1627C44800155276 /* jsb_constants_gl.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88291627C44800155276 /* jsb_constants_gl.js */; };
+ 15DA88B71627C62000155276 /* cocos2dxapi.js in Resources */ = {isa = PBXBuildFile; fileRef = 15DA88B61627C62000155276 /* cocos2dxapi.js */; };
+ 15E2AE9E165DC52C00F7743F /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E2AE9A165DC52C00F7743F /* CCPhysicsDebugNode.cpp */; };
+ 15E2AE9F165DC52C00F7743F /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E2AE9C165DC52C00F7743F /* CCPhysicsSprite.cpp */; };
+ 15E2AEA3165DC6DD00F7743F /* res in Resources */ = {isa = PBXBuildFile; fileRef = 15E2AEA2165DC6DD00F7743F /* res */; };
+ 15E2AEA5165DC73200F7743F /* src in Resources */ = {isa = PBXBuildFile; fileRef = 15E2AEA4165DC73200F7743F /* src */; };
+ 262829DB15EC7196002C4240 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AC15EC7196002C4240 /* chipmunk.c */; };
+ 262829DD15EC7196002C4240 /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AF15EC7196002C4240 /* cpConstraint.c */; };
+ 262829DE15EC7196002C4240 /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B015EC7196002C4240 /* cpDampedRotarySpring.c */; };
+ 262829DF15EC7196002C4240 /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B115EC7196002C4240 /* cpDampedSpring.c */; };
+ 262829E015EC7196002C4240 /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B215EC7196002C4240 /* cpGearJoint.c */; };
+ 262829E115EC7196002C4240 /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B315EC7196002C4240 /* cpGrooveJoint.c */; };
+ 262829E215EC7196002C4240 /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B415EC7196002C4240 /* cpPinJoint.c */; };
+ 262829E315EC7196002C4240 /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B515EC7196002C4240 /* cpPivotJoint.c */; };
+ 262829E415EC7196002C4240 /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B615EC7196002C4240 /* cpRatchetJoint.c */; };
+ 262829E515EC7196002C4240 /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B715EC7196002C4240 /* cpRotaryLimitJoint.c */; };
+ 262829E615EC7196002C4240 /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B815EC7196002C4240 /* cpSimpleMotor.c */; };
+ 262829E715EC7196002C4240 /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B915EC7196002C4240 /* cpSlideJoint.c */; };
+ 262829E815EC7196002C4240 /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BA15EC7196002C4240 /* cpArbiter.c */; };
+ 262829E915EC7196002C4240 /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BB15EC7196002C4240 /* cpArray.c */; };
+ 262829EA15EC7196002C4240 /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BC15EC7196002C4240 /* cpBB.c */; };
+ 262829EB15EC7196002C4240 /* cpBBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BD15EC7196002C4240 /* cpBBTree.c */; };
+ 262829EC15EC7196002C4240 /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BE15EC7196002C4240 /* cpBody.c */; };
+ 262829ED15EC7196002C4240 /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829BF15EC7196002C4240 /* cpCollision.c */; };
+ 262829EE15EC7196002C4240 /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C015EC7196002C4240 /* cpHashSet.c */; };
+ 262829EF15EC7196002C4240 /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C115EC7196002C4240 /* cpPolyShape.c */; };
+ 262829F015EC7196002C4240 /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C215EC7196002C4240 /* cpShape.c */; };
+ 262829F115EC7196002C4240 /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C315EC7196002C4240 /* cpSpace.c */; };
+ 262829F215EC7196002C4240 /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C415EC7196002C4240 /* cpSpaceComponent.c */; };
+ 262829F315EC7196002C4240 /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C515EC7196002C4240 /* cpSpaceHash.c */; };
+ 262829F415EC7196002C4240 /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C615EC7196002C4240 /* cpSpaceQuery.c */; };
+ 262829F515EC7196002C4240 /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C715EC7196002C4240 /* cpSpaceStep.c */; };
+ 262829F615EC7196002C4240 /* cpSpatialIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C815EC7196002C4240 /* cpSpatialIndex.c */; };
+ 262829F715EC7196002C4240 /* cpSweep1D.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829C915EC7196002C4240 /* cpSweep1D.c */; };
+ 262829F815EC7196002C4240 /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829CA15EC7196002C4240 /* cpVect.c */; };
+ 263B98D016548E4D00228D8A /* js_bindings_chipmunk_auto_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263B98C716548E4D00228D8A /* js_bindings_chipmunk_auto_classes.cpp */; };
+ 263B98D116548E4D00228D8A /* js_bindings_chipmunk_registration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263B98CC16548E4D00228D8A /* js_bindings_chipmunk_registration.cpp */; };
+ 263B98D216548E4D00228D8A /* js_bindings_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263B98CE16548E4D00228D8A /* js_bindings_core.cpp */; };
+ 263B98D616548EB700228D8A /* js_bindings_chipmunk_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263B98D316548EB700228D8A /* js_bindings_chipmunk_functions.cpp */; };
+ 263B98D716548EB700228D8A /* js_bindings_chipmunk_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263B98D516548EB700228D8A /* js_bindings_chipmunk_manual.cpp */; };
+ A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; };
+ A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275431517C094001B78AA /* OpenGLES.framework */; };
+ A92275461517C094001B78AA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; };
+ A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; };
+ A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; };
+ A922754C1517C094001B78AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754B1517C094001B78AA /* UIKit.framework */; };
+ A922754E1517C094001B78AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; };
+ A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; };
+ D446FDA316102D7D000ADA7B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA216102D7D000ADA7B /* Default.png */; };
+ D446FDA516102D82000ADA7B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA416102D82000ADA7B /* Default@2x.png */; };
+ D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA616102D86000ADA7B /* Default-568h@2x.png */; };
+ D45446D3156DE74F00887EB5 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D45446CE156DE74F00887EB5 /* AppController.mm */; };
+ D45446D4156DE74F00887EB5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D45446CF156DE74F00887EB5 /* main.m */; };
+ D45446D5156DE74F00887EB5 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D45446D2156DE74F00887EB5 /* RootViewController.mm */; };
+ D454520A156E22B400887EB5 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4545209156E22B400887EB5 /* libxml2.dylib */; };
+ D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; };
+ D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 15426AF015B5733200712A7F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 1551A33F158F2AB200E66CFE;
+ remoteInfo = cocos2dx;
+ };
+ 15426FC115B5741900712A7F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = 1551A33E158F2AB200E66CFE;
+ remoteInfo = cocos2dx;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 15384E4016119CC30021DC07 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = ""; };
+ 15384E4116119CC30021DC07 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = ""; };
+ 15384E4216119CC30021DC07 /* cocosjs_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocosjs_manual_conversions.cpp; sourceTree = ""; };
+ 15384E4316119CC30021DC07 /* cocosjs_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocosjs_manual_conversions.h; sourceTree = ""; };
+ 15384E4516119CC30021DC07 /* cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2dx.cpp; sourceTree = ""; };
+ 15384E4616119CC30021DC07 /* cocos2dx.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2dx.hpp; sourceTree = ""; };
+ 15384E4916119CC30021DC07 /* js_bindings_ccbreader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_ccbreader.cpp; sourceTree = ""; };
+ 15384E4A16119CC30021DC07 /* js_bindings_ccbreader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_ccbreader.h; sourceTree = ""; };
+ 15384E4F16119CC30021DC07 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = ""; };
+ 15384E5016119CC30021DC07 /* js_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_manual_conversions.cpp; sourceTree = ""; };
+ 15384E5116119CC30021DC07 /* js_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_manual_conversions.h; sourceTree = ""; };
+ 15384E5216119CC30021DC07 /* ScriptingCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptingCore.cpp; sourceTree = ""; };
+ 15384E5316119CC30021DC07 /* ScriptingCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptingCore.h; sourceTree = ""; };
+ 15384E5416119CC30021DC07 /* spidermonkey_specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spidermonkey_specifics.h; sourceTree = ""; };
+ 15384E5516119CC30021DC07 /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = ""; };
+ 15384E6516119D5E0021DC07 /* CCBAnimationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBAnimationManager.cpp; sourceTree = ""; };
+ 15384E6616119D5E0021DC07 /* CCBAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBAnimationManager.h; sourceTree = ""; };
+ 15384E6716119D5E0021DC07 /* CCBFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBFileLoader.cpp; sourceTree = ""; };
+ 15384E6816119D5E0021DC07 /* CCBFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBFileLoader.h; sourceTree = ""; };
+ 15384E6916119D5E0021DC07 /* CCBKeyframe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBKeyframe.cpp; sourceTree = ""; };
+ 15384E6A16119D5E0021DC07 /* CCBKeyframe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBKeyframe.h; sourceTree = ""; };
+ 15384E6B16119D5E0021DC07 /* CCBMemberVariableAssigner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBMemberVariableAssigner.h; sourceTree = ""; };
+ 15384E6C16119D5E0021DC07 /* CCBReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBReader.cpp; sourceTree = ""; };
+ 15384E6D16119D5E0021DC07 /* CCBReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBReader.h; sourceTree = ""; };
+ 15384E6E16119D5E0021DC07 /* CCBSelectorResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSelectorResolver.h; sourceTree = ""; };
+ 15384E6F16119D5E0021DC07 /* CCBSequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequence.cpp; sourceTree = ""; };
+ 15384E7016119D5E0021DC07 /* CCBSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequence.h; sourceTree = ""; };
+ 15384E7116119D5E0021DC07 /* CCBSequenceProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequenceProperty.cpp; sourceTree = ""; };
+ 15384E7216119D5E0021DC07 /* CCBSequenceProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequenceProperty.h; sourceTree = ""; };
+ 15384E7316119D5E0021DC07 /* CCBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBValue.cpp; sourceTree = ""; };
+ 15384E7416119D5E0021DC07 /* CCBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBValue.h; sourceTree = ""; };
+ 15384E7516119D5E0021DC07 /* CCControlButtonLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButtonLoader.cpp; sourceTree = ""; };
+ 15384E7616119D5E0021DC07 /* CCControlButtonLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButtonLoader.h; sourceTree = ""; };
+ 15384E7716119D5E0021DC07 /* CCControlLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlLoader.cpp; sourceTree = ""; };
+ 15384E7816119D5E0021DC07 /* CCControlLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlLoader.h; sourceTree = ""; };
+ 15384E7916119D5E0021DC07 /* CCData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCData.cpp; sourceTree = ""; };
+ 15384E7A16119D5E0021DC07 /* CCData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCData.h; sourceTree = ""; };
+ 15384E7B16119D5E0021DC07 /* CCLabelBMFontLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelBMFontLoader.cpp; sourceTree = ""; };
+ 15384E7C16119D5E0021DC07 /* CCLabelBMFontLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelBMFontLoader.h; sourceTree = ""; };
+ 15384E7D16119D5E0021DC07 /* CCLabelTTFLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelTTFLoader.cpp; sourceTree = ""; };
+ 15384E7E16119D5E0021DC07 /* CCLabelTTFLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelTTFLoader.h; sourceTree = ""; };
+ 15384E7F16119D5E0021DC07 /* CCLayerColorLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerColorLoader.cpp; sourceTree = ""; };
+ 15384E8016119D5E0021DC07 /* CCLayerColorLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerColorLoader.h; sourceTree = ""; };
+ 15384E8116119D5E0021DC07 /* CCLayerGradientLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerGradientLoader.cpp; sourceTree = ""; };
+ 15384E8216119D5E0021DC07 /* CCLayerGradientLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerGradientLoader.h; sourceTree = ""; };
+ 15384E8316119D5E0021DC07 /* CCLayerLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerLoader.cpp; sourceTree = ""; };
+ 15384E8416119D5E0021DC07 /* CCLayerLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerLoader.h; sourceTree = ""; };
+ 15384E8516119D5E0021DC07 /* CCMenuItemImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemImageLoader.cpp; sourceTree = ""; };
+ 15384E8616119D5E0021DC07 /* CCMenuItemImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemImageLoader.h; sourceTree = ""; };
+ 15384E8716119D5E0021DC07 /* CCMenuItemLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemLoader.cpp; sourceTree = ""; };
+ 15384E8816119D5E0021DC07 /* CCMenuItemLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemLoader.h; sourceTree = ""; };
+ 15384E8916119D5E0021DC07 /* CCMenuLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuLoader.h; sourceTree = ""; };
+ 15384E8A16119D5E0021DC07 /* CCNode+CCBRelativePositioning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCNode+CCBRelativePositioning.cpp"; sourceTree = ""; };
+ 15384E8B16119D5E0021DC07 /* CCNode+CCBRelativePositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCNode+CCBRelativePositioning.h"; sourceTree = ""; };
+ 15384E8C16119D5E0021DC07 /* CCNodeLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoader.cpp; sourceTree = ""; };
+ 15384E8D16119D5E0021DC07 /* CCNodeLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoader.h; sourceTree = ""; };
+ 15384E8E16119D5E0021DC07 /* CCNodeLoaderLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoaderLibrary.cpp; sourceTree = ""; };
+ 15384E8F16119D5E0021DC07 /* CCNodeLoaderLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderLibrary.h; sourceTree = ""; };
+ 15384E9016119D5E0021DC07 /* CCNodeLoaderListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderListener.h; sourceTree = ""; };
+ 15384E9116119D5E0021DC07 /* CCParticleSystemQuadLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCParticleSystemQuadLoader.cpp; sourceTree = ""; };
+ 15384E9216119D5E0021DC07 /* CCParticleSystemQuadLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCParticleSystemQuadLoader.h; sourceTree = ""; };
+ 15384E9316119D5E0021DC07 /* CCScale9SpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9SpriteLoader.cpp; sourceTree = ""; };
+ 15384E9416119D5E0021DC07 /* CCScale9SpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScale9SpriteLoader.h; sourceTree = ""; };
+ 15384E9516119D5E0021DC07 /* CCScrollViewLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollViewLoader.cpp; sourceTree = ""; };
+ 15384E9616119D5E0021DC07 /* CCScrollViewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollViewLoader.h; sourceTree = ""; };
+ 15384E9716119D5E0021DC07 /* CCSpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteLoader.cpp; sourceTree = ""; };
+ 15384E9816119D5E0021DC07 /* CCSpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteLoader.h; sourceTree = ""; };
+ 15384E9916119D5E0021DC07 /* cocos-ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cocos-ext.h"; sourceTree = ""; };
+ 15384E9A16119D5E0021DC07 /* ExtensionMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionMacros.h; sourceTree = ""; };
+ 15384EB716119D5E0021DC07 /* CCEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBox.cpp; sourceTree = ""; };
+ 15384EB816119D5E0021DC07 /* CCEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBox.h; sourceTree = ""; };
+ 15384EB916119D5E0021DC07 /* CCEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImpl.h; sourceTree = ""; };
+ 15384EBC16119D5E0021DC07 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = ""; };
+ 15384EBD16119D5E0021DC07 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = ""; };
+ 15384EBE16119D5E0021DC07 /* EditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditBoxImplIOS.h; sourceTree = ""; };
+ 15384EBF16119D5E0021DC07 /* EditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EditBoxImplIOS.mm; sourceTree = ""; };
+ 15384EC116119D5E0021DC07 /* CCScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollView.cpp; sourceTree = ""; };
+ 15384EC216119D5E0021DC07 /* CCScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; };
+ 15384EC316119D5E0021DC07 /* CCSorting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSorting.cpp; sourceTree = ""; };
+ 15384EC416119D5E0021DC07 /* CCSorting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSorting.h; sourceTree = ""; };
+ 15384EC516119D5E0021DC07 /* CCTableView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; };
+ 15384EC616119D5E0021DC07 /* CCTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = ""; };
+ 15384EC716119D5E0021DC07 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = ""; };
+ 15384EC816119D5E0021DC07 /* CCTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = ""; };
+ 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2dx.xcodeproj; path = ../../../cocos2dx/proj.ios/cocos2dx.xcodeproj; sourceTree = ""; };
+ 15426FCC15B5743C00712A7F /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; };
+ 15426FCD15B5743C00712A7F /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; };
+ 15426FCF15B5743C00712A7F /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; };
+ 15426FD015B5743C00712A7F /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; };
+ 15426FD115B5743C00712A7F /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; };
+ 15426FD215B5743C00712A7F /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; };
+ 15426FD315B5743C00712A7F /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; };
+ 15426FD415B5743C00712A7F /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; };
+ 15426FD515B5743C00712A7F /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; };
+ 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; };
+ 15426FD715B5743C00712A7F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; };
+ 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; };
+ 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; };
+ 15CFE18E1612FD0E00BF2188 /* CCControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; };
+ 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; };
+ 15CFE1901612FD0E00BF2188 /* CCControlButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButton.h; sourceTree = ""; };
+ 15CFE1911612FD0E00BF2188 /* CCControlColourPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlColourPicker.cpp; sourceTree = ""; };
+ 15CFE1921612FD0E00BF2188 /* CCControlColourPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlColourPicker.h; sourceTree = ""; };
+ 15CFE1931612FD0E00BF2188 /* CCControlExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlExtensions.h; sourceTree = ""; };
+ 15CFE1941612FD0E00BF2188 /* CCControlHuePicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlHuePicker.cpp; sourceTree = ""; };
+ 15CFE1951612FD0E00BF2188 /* CCControlHuePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlHuePicker.h; sourceTree = ""; };
+ 15CFE1961612FD0E00BF2188 /* CCControlPotentiometer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlPotentiometer.cpp; sourceTree = ""; };
+ 15CFE1971612FD0E00BF2188 /* CCControlPotentiometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlPotentiometer.h; sourceTree = ""; };
+ 15CFE1981612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSaturationBrightnessPicker.cpp; sourceTree = ""; };
+ 15CFE1991612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSaturationBrightnessPicker.h; sourceTree = ""; };
+ 15CFE19A1612FD0E00BF2188 /* CCControlSlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSlider.cpp; sourceTree = ""; };
+ 15CFE19B1612FD0E00BF2188 /* CCControlSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSlider.h; sourceTree = ""; };
+ 15CFE19C1612FD0E00BF2188 /* CCControlStepper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlStepper.cpp; sourceTree = ""; };
+ 15CFE19D1612FD0E00BF2188 /* CCControlStepper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlStepper.h; sourceTree = ""; };
+ 15CFE19E1612FD0E00BF2188 /* CCControlSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSwitch.cpp; sourceTree = ""; };
+ 15CFE19F1612FD0E00BF2188 /* CCControlSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSwitch.h; sourceTree = ""; };
+ 15CFE1A01612FD0E00BF2188 /* CCControlUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlUtils.cpp; sourceTree = ""; };
+ 15CFE1A11612FD0E00BF2188 /* CCControlUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlUtils.h; sourceTree = ""; };
+ 15CFE1A21612FD0E00BF2188 /* CCInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCInvocation.cpp; sourceTree = ""; };
+ 15CFE1A31612FD0E00BF2188 /* CCInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; };
+ 15CFE1A41612FD0E00BF2188 /* CCScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9Sprite.cpp; sourceTree = ""; };
+ 15CFE1A51612FD0E00BF2188 /* CCScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScale9Sprite.h; sourceTree = ""; };
+ 15DA88251627C44800155276 /* jsb_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants.js; sourceTree = ""; };
+ 15DA88261627C44800155276 /* jsb_constants_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_chipmunk.js; sourceTree = ""; };
+ 15DA88271627C44800155276 /* jsb_constants_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocos2d.js; sourceTree = ""; };
+ 15DA88281627C44800155276 /* jsb_constants_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocosbuilder.js; sourceTree = ""; };
+ 15DA88291627C44800155276 /* jsb_constants_gl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_gl.js; sourceTree = ""; };
+ 15DA88B61627C62000155276 /* cocos2dxapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = cocos2dxapi.js; path = ../../../scripting/javascript/bindings/generated/cocos2dxapi.js; sourceTree = ""; };
+ 15E2AE9A165DC52C00F7743F /* CCPhysicsDebugNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsDebugNode.cpp; sourceTree = ""; };
+ 15E2AE9B165DC52C00F7743F /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; };
+ 15E2AE9C165DC52C00F7743F /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; };
+ 15E2AE9D165DC52C00F7743F /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; };
+ 15E2AEA2165DC6DD00F7743F /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = "../cocos2d-js-tests/res"; sourceTree = ""; };
+ 15E2AEA4165DC73200F7743F /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = "../cocos2d-js-tests/src"; sourceTree = ""; };
+ 2628298215EC7196002C4240 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; };
+ 2628298315EC7196002C4240 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; };
+ 2628298415EC7196002C4240 /* chipmunk_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = ""; };
+ 2628298515EC7196002C4240 /* chipmunk_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_types.h; sourceTree = ""; };
+ 2628298615EC7196002C4240 /* chipmunk_unsafe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_unsafe.h; sourceTree = ""; };
+ 2628298815EC7196002C4240 /* cpConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpConstraint.h; sourceTree = ""; };
+ 2628298915EC7196002C4240 /* cpDampedRotarySpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpDampedRotarySpring.h; sourceTree = ""; };
+ 2628298A15EC7196002C4240 /* cpDampedSpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpDampedSpring.h; sourceTree = ""; };
+ 2628298B15EC7196002C4240 /* cpGearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpGearJoint.h; sourceTree = ""; };
+ 2628298C15EC7196002C4240 /* cpGrooveJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpGrooveJoint.h; sourceTree = ""; };
+ 2628298D15EC7196002C4240 /* cpPinJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPinJoint.h; sourceTree = ""; };
+ 2628298E15EC7196002C4240 /* cpPivotJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPivotJoint.h; sourceTree = ""; };
+ 2628298F15EC7196002C4240 /* cpRatchetJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpRatchetJoint.h; sourceTree = ""; };
+ 2628299015EC7196002C4240 /* cpRotaryLimitJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpRotaryLimitJoint.h; sourceTree = ""; };
+ 2628299115EC7196002C4240 /* cpSimpleMotor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSimpleMotor.h; sourceTree = ""; };
+ 2628299215EC7196002C4240 /* cpSlideJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSlideJoint.h; sourceTree = ""; };
+ 2628299315EC7196002C4240 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; };
+ 2628299415EC7196002C4240 /* cpArbiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpArbiter.h; sourceTree = ""; };
+ 2628299515EC7196002C4240 /* cpBB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpBB.h; sourceTree = ""; };
+ 2628299615EC7196002C4240 /* cpBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpBody.h; sourceTree = ""; };
+ 2628299715EC7196002C4240 /* cpPolyShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPolyShape.h; sourceTree = ""; };
+ 2628299815EC7196002C4240 /* cpShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpShape.h; sourceTree = ""; };
+ 2628299915EC7196002C4240 /* cpSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSpace.h; sourceTree = ""; };
+ 2628299A15EC7196002C4240 /* cpSpatialIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSpatialIndex.h; sourceTree = ""; };
+ 2628299B15EC7196002C4240 /* cpVect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = ""; };
+ 262829AC15EC7196002C4240 /* chipmunk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chipmunk.c; sourceTree = ""; };
+ 262829AD15EC7196002C4240 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; };
+ 262829AF15EC7196002C4240 /* cpConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpConstraint.c; sourceTree = ""; };
+ 262829B015EC7196002C4240 /* cpDampedRotarySpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedRotarySpring.c; sourceTree = ""; };
+ 262829B115EC7196002C4240 /* cpDampedSpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedSpring.c; sourceTree = ""; };
+ 262829B215EC7196002C4240 /* cpGearJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGearJoint.c; sourceTree = ""; };
+ 262829B315EC7196002C4240 /* cpGrooveJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGrooveJoint.c; sourceTree = ""; };
+ 262829B415EC7196002C4240 /* cpPinJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPinJoint.c; sourceTree = ""; };
+ 262829B515EC7196002C4240 /* cpPivotJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPivotJoint.c; sourceTree = ""; };
+ 262829B615EC7196002C4240 /* cpRatchetJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRatchetJoint.c; sourceTree = ""; };
+ 262829B715EC7196002C4240 /* cpRotaryLimitJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRotaryLimitJoint.c; sourceTree = ""; };
+ 262829B815EC7196002C4240 /* cpSimpleMotor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSimpleMotor.c; sourceTree = ""; };
+ 262829B915EC7196002C4240 /* cpSlideJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSlideJoint.c; sourceTree = ""; };
+ 262829BA15EC7196002C4240 /* cpArbiter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpArbiter.c; sourceTree = ""; };
+ 262829BB15EC7196002C4240 /* cpArray.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = ""; };
+ 262829BC15EC7196002C4240 /* cpBB.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBB.c; sourceTree = ""; };
+ 262829BD15EC7196002C4240 /* cpBBTree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBBTree.c; sourceTree = ""; };
+ 262829BE15EC7196002C4240 /* cpBody.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBody.c; sourceTree = ""; };
+ 262829BF15EC7196002C4240 /* cpCollision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpCollision.c; sourceTree = ""; };
+ 262829C015EC7196002C4240 /* cpHashSet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpHashSet.c; sourceTree = ""; };
+ 262829C115EC7196002C4240 /* cpPolyShape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPolyShape.c; sourceTree = ""; };
+ 262829C215EC7196002C4240 /* cpShape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpShape.c; sourceTree = ""; };
+ 262829C315EC7196002C4240 /* cpSpace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpace.c; sourceTree = ""; };
+ 262829C415EC7196002C4240 /* cpSpaceComponent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceComponent.c; sourceTree = ""; };
+ 262829C515EC7196002C4240 /* cpSpaceHash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = ""; };
+ 262829C615EC7196002C4240 /* cpSpaceQuery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceQuery.c; sourceTree = ""; };
+ 262829C715EC7196002C4240 /* cpSpaceStep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceStep.c; sourceTree = ""; };
+ 262829C815EC7196002C4240 /* cpSpatialIndex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpatialIndex.c; sourceTree = ""; };
+ 262829C915EC7196002C4240 /* cpSweep1D.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSweep1D.c; sourceTree = ""; };
+ 262829CA15EC7196002C4240 /* cpVect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = ""; };
+ 262829CB15EC7196002C4240 /* prime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = ""; };
+ 263B98C616548E4D00228D8A /* js_bindings_chipmunk_auto_classes_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_auto_classes_registration.h; sourceTree = ""; };
+ 263B98C716548E4D00228D8A /* js_bindings_chipmunk_auto_classes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_auto_classes.cpp; sourceTree = ""; };
+ 263B98C816548E4D00228D8A /* js_bindings_chipmunk_auto_classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_auto_classes.h; sourceTree = ""; };
+ 263B98CA16548E4D00228D8A /* js_bindings_chipmunk_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_functions.h; sourceTree = ""; };
+ 263B98CB16548E4D00228D8A /* js_bindings_chipmunk_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_manual.h; sourceTree = ""; };
+ 263B98CC16548E4D00228D8A /* js_bindings_chipmunk_registration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_registration.cpp; sourceTree = ""; };
+ 263B98CD16548E4D00228D8A /* js_bindings_chipmunk_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_registration.h; sourceTree = ""; };
+ 263B98CE16548E4D00228D8A /* js_bindings_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_core.cpp; sourceTree = ""; };
+ 263B98CF16548E4D00228D8A /* js_bindings_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_core.h; sourceTree = ""; };
+ 263B98D316548EB700228D8A /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = ""; };
+ 263B98D416548EB700228D8A /* js_bindings_chipmunk_functions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_functions.hpp; sourceTree = ""; };
+ 263B98D516548EB700228D8A /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = ""; };
+ A922753D1517C094001B78AA /* WatermelonWithMe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatermelonWithMe.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
+ A92275471517C094001B78AA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ A92275491517C094001B78AA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ A922754B1517C094001B78AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ A922754D1517C094001B78AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ A922754F1517C094001B78AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ D446FDA216102D7D000ADA7B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; };
+ D446FDA416102D82000ADA7B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; };
+ D446FDA616102D86000ADA7B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
+ D45446CD156DE74F00887EB5 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; };
+ D45446CE156DE74F00887EB5 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; };
+ D45446CF156DE74F00887EB5 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ D45446D0156DE74F00887EB5 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; };
+ D45446D1156DE74F00887EB5 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; };
+ D45446D2156DE74F00887EB5 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; };
+ D45446D6156DE79D00887EB5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ D4545209156E22B400887EB5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
+ D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+ D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; };
+ D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ A922753A1517C094001B78AA /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 15426FC315B5742200712A7F /* libcocos2dx.a in Frameworks */,
+ D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */,
+ D454520A156E22B400887EB5 /* libxml2.dylib in Frameworks */,
+ A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */,
+ A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */,
+ A92275461517C094001B78AA /* OpenAL.framework in Frameworks */,
+ A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */,
+ A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */,
+ A922754C1517C094001B78AA /* UIKit.framework in Frameworks */,
+ A922754E1517C094001B78AA /* Foundation.framework in Frameworks */,
+ A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 15384E3C16119CC30021DC07 /* bindings */ = {
+ isa = PBXGroup;
+ children = (
+ 263B98D316548EB700228D8A /* js_bindings_chipmunk_functions.cpp */,
+ 263B98D416548EB700228D8A /* js_bindings_chipmunk_functions.hpp */,
+ 263B98D516548EB700228D8A /* js_bindings_chipmunk_manual.cpp */,
+ 263B98C616548E4D00228D8A /* js_bindings_chipmunk_auto_classes_registration.h */,
+ 263B98C716548E4D00228D8A /* js_bindings_chipmunk_auto_classes.cpp */,
+ 263B98C816548E4D00228D8A /* js_bindings_chipmunk_auto_classes.h */,
+ 263B98CA16548E4D00228D8A /* js_bindings_chipmunk_functions.h */,
+ 263B98CB16548E4D00228D8A /* js_bindings_chipmunk_manual.h */,
+ 263B98CC16548E4D00228D8A /* js_bindings_chipmunk_registration.cpp */,
+ 263B98CD16548E4D00228D8A /* js_bindings_chipmunk_registration.h */,
+ 263B98CE16548E4D00228D8A /* js_bindings_core.cpp */,
+ 263B98CF16548E4D00228D8A /* js_bindings_core.h */,
+ 15384E4016119CC30021DC07 /* cocos2d_specifics.cpp */,
+ 15384E4116119CC30021DC07 /* cocos2d_specifics.hpp */,
+ 15384E4216119CC30021DC07 /* cocosjs_manual_conversions.cpp */,
+ 15384E4316119CC30021DC07 /* cocosjs_manual_conversions.h */,
+ 15384E4416119CC30021DC07 /* generated */,
+ 15384E4916119CC30021DC07 /* js_bindings_ccbreader.cpp */,
+ 15384E4A16119CC30021DC07 /* js_bindings_ccbreader.h */,
+ 15384E4F16119CC30021DC07 /* js_bindings_config.h */,
+ 15384E5016119CC30021DC07 /* js_manual_conversions.cpp */,
+ 15384E5116119CC30021DC07 /* js_manual_conversions.h */,
+ 15384E5216119CC30021DC07 /* ScriptingCore.cpp */,
+ 15384E5316119CC30021DC07 /* ScriptingCore.h */,
+ 15384E5416119CC30021DC07 /* spidermonkey_specifics.h */,
+ 15384E5516119CC30021DC07 /* uthash.h */,
+ );
+ name = bindings;
+ path = ../../../scripting/javascript/bindings;
+ sourceTree = "";
+ };
+ 15384E4416119CC30021DC07 /* generated */ = {
+ isa = PBXGroup;
+ children = (
+ 15384E4516119CC30021DC07 /* cocos2dx.cpp */,
+ 15384E4616119CC30021DC07 /* cocos2dx.hpp */,
+ );
+ path = generated;
+ sourceTree = "";
+ };
+ 15384E6216119D5E0021DC07 /* extensions */ = {
+ isa = PBXGroup;
+ children = (
+ 15E2AE99165DC52C00F7743F /* physics_nodes */,
+ 15384E6416119D5E0021DC07 /* CCBReader */,
+ 15384E9916119D5E0021DC07 /* cocos-ext.h */,
+ 15384E9A16119D5E0021DC07 /* ExtensionMacros.h */,
+ 15384E9B16119D5E0021DC07 /* GUI */,
+ );
+ name = extensions;
+ path = ../../../extensions;
+ sourceTree = "";
+ };
+ 15384E6416119D5E0021DC07 /* CCBReader */ = {
+ isa = PBXGroup;
+ children = (
+ 15384E6516119D5E0021DC07 /* CCBAnimationManager.cpp */,
+ 15384E6616119D5E0021DC07 /* CCBAnimationManager.h */,
+ 15384E6716119D5E0021DC07 /* CCBFileLoader.cpp */,
+ 15384E6816119D5E0021DC07 /* CCBFileLoader.h */,
+ 15384E6916119D5E0021DC07 /* CCBKeyframe.cpp */,
+ 15384E6A16119D5E0021DC07 /* CCBKeyframe.h */,
+ 15384E6B16119D5E0021DC07 /* CCBMemberVariableAssigner.h */,
+ 15384E6C16119D5E0021DC07 /* CCBReader.cpp */,
+ 15384E6D16119D5E0021DC07 /* CCBReader.h */,
+ 15384E6E16119D5E0021DC07 /* CCBSelectorResolver.h */,
+ 15384E6F16119D5E0021DC07 /* CCBSequence.cpp */,
+ 15384E7016119D5E0021DC07 /* CCBSequence.h */,
+ 15384E7116119D5E0021DC07 /* CCBSequenceProperty.cpp */,
+ 15384E7216119D5E0021DC07 /* CCBSequenceProperty.h */,
+ 15384E7316119D5E0021DC07 /* CCBValue.cpp */,
+ 15384E7416119D5E0021DC07 /* CCBValue.h */,
+ 15384E7516119D5E0021DC07 /* CCControlButtonLoader.cpp */,
+ 15384E7616119D5E0021DC07 /* CCControlButtonLoader.h */,
+ 15384E7716119D5E0021DC07 /* CCControlLoader.cpp */,
+ 15384E7816119D5E0021DC07 /* CCControlLoader.h */,
+ 15384E7916119D5E0021DC07 /* CCData.cpp */,
+ 15384E7A16119D5E0021DC07 /* CCData.h */,
+ 15384E7B16119D5E0021DC07 /* CCLabelBMFontLoader.cpp */,
+ 15384E7C16119D5E0021DC07 /* CCLabelBMFontLoader.h */,
+ 15384E7D16119D5E0021DC07 /* CCLabelTTFLoader.cpp */,
+ 15384E7E16119D5E0021DC07 /* CCLabelTTFLoader.h */,
+ 15384E7F16119D5E0021DC07 /* CCLayerColorLoader.cpp */,
+ 15384E8016119D5E0021DC07 /* CCLayerColorLoader.h */,
+ 15384E8116119D5E0021DC07 /* CCLayerGradientLoader.cpp */,
+ 15384E8216119D5E0021DC07 /* CCLayerGradientLoader.h */,
+ 15384E8316119D5E0021DC07 /* CCLayerLoader.cpp */,
+ 15384E8416119D5E0021DC07 /* CCLayerLoader.h */,
+ 15384E8516119D5E0021DC07 /* CCMenuItemImageLoader.cpp */,
+ 15384E8616119D5E0021DC07 /* CCMenuItemImageLoader.h */,
+ 15384E8716119D5E0021DC07 /* CCMenuItemLoader.cpp */,
+ 15384E8816119D5E0021DC07 /* CCMenuItemLoader.h */,
+ 15384E8916119D5E0021DC07 /* CCMenuLoader.h */,
+ 15384E8A16119D5E0021DC07 /* CCNode+CCBRelativePositioning.cpp */,
+ 15384E8B16119D5E0021DC07 /* CCNode+CCBRelativePositioning.h */,
+ 15384E8C16119D5E0021DC07 /* CCNodeLoader.cpp */,
+ 15384E8D16119D5E0021DC07 /* CCNodeLoader.h */,
+ 15384E8E16119D5E0021DC07 /* CCNodeLoaderLibrary.cpp */,
+ 15384E8F16119D5E0021DC07 /* CCNodeLoaderLibrary.h */,
+ 15384E9016119D5E0021DC07 /* CCNodeLoaderListener.h */,
+ 15384E9116119D5E0021DC07 /* CCParticleSystemQuadLoader.cpp */,
+ 15384E9216119D5E0021DC07 /* CCParticleSystemQuadLoader.h */,
+ 15384E9316119D5E0021DC07 /* CCScale9SpriteLoader.cpp */,
+ 15384E9416119D5E0021DC07 /* CCScale9SpriteLoader.h */,
+ 15384E9516119D5E0021DC07 /* CCScrollViewLoader.cpp */,
+ 15384E9616119D5E0021DC07 /* CCScrollViewLoader.h */,
+ 15384E9716119D5E0021DC07 /* CCSpriteLoader.cpp */,
+ 15384E9816119D5E0021DC07 /* CCSpriteLoader.h */,
+ );
+ path = CCBReader;
+ sourceTree = "";
+ };
+ 15384E9B16119D5E0021DC07 /* GUI */ = {
+ isa = PBXGroup;
+ children = (
+ 15CFE18C1612FD0E00BF2188 /* CCControlExtension */,
+ 15384EB616119D5E0021DC07 /* CCEditBox */,
+ 15384EC016119D5E0021DC07 /* CCScrollView */,
+ );
+ path = GUI;
+ sourceTree = "";
+ };
+ 15384EB616119D5E0021DC07 /* CCEditBox */ = {
+ isa = PBXGroup;
+ children = (
+ 15384EB716119D5E0021DC07 /* CCEditBox.cpp */,
+ 15384EB816119D5E0021DC07 /* CCEditBox.h */,
+ 15384EB916119D5E0021DC07 /* CCEditBoxImpl.h */,
+ 15384EBC16119D5E0021DC07 /* CCEditBoxImplIOS.h */,
+ 15384EBD16119D5E0021DC07 /* CCEditBoxImplIOS.mm */,
+ 15384EBE16119D5E0021DC07 /* EditBoxImplIOS.h */,
+ 15384EBF16119D5E0021DC07 /* EditBoxImplIOS.mm */,
+ );
+ path = CCEditBox;
+ sourceTree = "";
+ };
+ 15384EC016119D5E0021DC07 /* CCScrollView */ = {
+ isa = PBXGroup;
+ children = (
+ 15384EC116119D5E0021DC07 /* CCScrollView.cpp */,
+ 15384EC216119D5E0021DC07 /* CCScrollView.h */,
+ 15384EC316119D5E0021DC07 /* CCSorting.cpp */,
+ 15384EC416119D5E0021DC07 /* CCSorting.h */,
+ 15384EC516119D5E0021DC07 /* CCTableView.cpp */,
+ 15384EC616119D5E0021DC07 /* CCTableView.h */,
+ 15384EC716119D5E0021DC07 /* CCTableViewCell.cpp */,
+ 15384EC816119D5E0021DC07 /* CCTableViewCell.h */,
+ );
+ path = CCScrollView;
+ sourceTree = "";
+ };
+ 15426AEA15B5733200712A7F /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 15426AF115B5733200712A7F /* libcocos2dx.a */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 15426FC415B5743C00712A7F /* CocosDenshion */ = {
+ isa = PBXGroup;
+ children = (
+ 15426FCB15B5743C00712A7F /* include */,
+ 15426FCE15B5743C00712A7F /* ios */,
+ );
+ name = CocosDenshion;
+ path = ../../../CocosDenshion;
+ sourceTree = "";
+ };
+ 15426FCB15B5743C00712A7F /* include */ = {
+ isa = PBXGroup;
+ children = (
+ 15426FCC15B5743C00712A7F /* Export.h */,
+ 15426FCD15B5743C00712A7F /* SimpleAudioEngine.h */,
+ );
+ path = include;
+ sourceTree = "";
+ };
+ 15426FCE15B5743C00712A7F /* ios */ = {
+ isa = PBXGroup;
+ children = (
+ 15426FCF15B5743C00712A7F /* CDAudioManager.h */,
+ 15426FD015B5743C00712A7F /* CDAudioManager.m */,
+ 15426FD115B5743C00712A7F /* CDConfig.h */,
+ 15426FD215B5743C00712A7F /* CDOpenALSupport.h */,
+ 15426FD315B5743C00712A7F /* CDOpenALSupport.m */,
+ 15426FD415B5743C00712A7F /* CocosDenshion.h */,
+ 15426FD515B5743C00712A7F /* CocosDenshion.m */,
+ 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */,
+ 15426FD715B5743C00712A7F /* SimpleAudioEngine_objc.h */,
+ 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */,
+ );
+ path = ios;
+ sourceTree = "";
+ };
+ 15628F5B15F0F5C2000CF24B /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 15E2AEA4165DC73200F7743F /* src */,
+ 15E2AEA2165DC6DD00F7743F /* res */,
+ 15DA88B61627C62000155276 /* cocos2dxapi.js */,
+ 15DA88241627C44800155276 /* bindings */,
+ D446FDA616102D86000ADA7B /* Default-568h@2x.png */,
+ D446FDA416102D82000ADA7B /* Default@2x.png */,
+ D446FDA216102D7D000ADA7B /* Default.png */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 15CFE18C1612FD0E00BF2188 /* CCControlExtension */ = {
+ isa = PBXGroup;
+ children = (
+ 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */,
+ 15CFE18E1612FD0E00BF2188 /* CCControl.h */,
+ 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */,
+ 15CFE1901612FD0E00BF2188 /* CCControlButton.h */,
+ 15CFE1911612FD0E00BF2188 /* CCControlColourPicker.cpp */,
+ 15CFE1921612FD0E00BF2188 /* CCControlColourPicker.h */,
+ 15CFE1931612FD0E00BF2188 /* CCControlExtensions.h */,
+ 15CFE1941612FD0E00BF2188 /* CCControlHuePicker.cpp */,
+ 15CFE1951612FD0E00BF2188 /* CCControlHuePicker.h */,
+ 15CFE1961612FD0E00BF2188 /* CCControlPotentiometer.cpp */,
+ 15CFE1971612FD0E00BF2188 /* CCControlPotentiometer.h */,
+ 15CFE1981612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.cpp */,
+ 15CFE1991612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.h */,
+ 15CFE19A1612FD0E00BF2188 /* CCControlSlider.cpp */,
+ 15CFE19B1612FD0E00BF2188 /* CCControlSlider.h */,
+ 15CFE19C1612FD0E00BF2188 /* CCControlStepper.cpp */,
+ 15CFE19D1612FD0E00BF2188 /* CCControlStepper.h */,
+ 15CFE19E1612FD0E00BF2188 /* CCControlSwitch.cpp */,
+ 15CFE19F1612FD0E00BF2188 /* CCControlSwitch.h */,
+ 15CFE1A01612FD0E00BF2188 /* CCControlUtils.cpp */,
+ 15CFE1A11612FD0E00BF2188 /* CCControlUtils.h */,
+ 15CFE1A21612FD0E00BF2188 /* CCInvocation.cpp */,
+ 15CFE1A31612FD0E00BF2188 /* CCInvocation.h */,
+ 15CFE1A41612FD0E00BF2188 /* CCScale9Sprite.cpp */,
+ 15CFE1A51612FD0E00BF2188 /* CCScale9Sprite.h */,
+ );
+ path = CCControlExtension;
+ sourceTree = "";
+ };
+ 15DA88241627C44800155276 /* bindings */ = {
+ isa = PBXGroup;
+ children = (
+ 15DA88251627C44800155276 /* jsb_constants.js */,
+ 15DA88261627C44800155276 /* jsb_constants_chipmunk.js */,
+ 15DA88271627C44800155276 /* jsb_constants_cocos2d.js */,
+ 15DA88281627C44800155276 /* jsb_constants_cocosbuilder.js */,
+ 15DA88291627C44800155276 /* jsb_constants_gl.js */,
+ );
+ name = bindings;
+ path = ../bindings;
+ sourceTree = "";
+ };
+ 15E2AE99165DC52C00F7743F /* physics_nodes */ = {
+ isa = PBXGroup;
+ children = (
+ 15E2AE9A165DC52C00F7743F /* CCPhysicsDebugNode.cpp */,
+ 15E2AE9B165DC52C00F7743F /* CCPhysicsDebugNode.h */,
+ 15E2AE9C165DC52C00F7743F /* CCPhysicsSprite.cpp */,
+ 15E2AE9D165DC52C00F7743F /* CCPhysicsSprite.h */,
+ );
+ path = physics_nodes;
+ sourceTree = "";
+ };
+ 2628297C15EC7196002C4240 /* chipmunk */ = {
+ isa = PBXGroup;
+ children = (
+ 2628298015EC7196002C4240 /* include */,
+ 262829AB15EC7196002C4240 /* src */,
+ );
+ name = chipmunk;
+ path = ../../../external/chipmunk;
+ sourceTree = "";
+ };
+ 2628298015EC7196002C4240 /* include */ = {
+ isa = PBXGroup;
+ children = (
+ 2628298115EC7196002C4240 /* chipmunk */,
+ );
+ path = include;
+ sourceTree = "";
+ };
+ 2628298115EC7196002C4240 /* chipmunk */ = {
+ isa = PBXGroup;
+ children = (
+ 2628298215EC7196002C4240 /* chipmunk.h */,
+ 2628298315EC7196002C4240 /* chipmunk_ffi.h */,
+ 2628298415EC7196002C4240 /* chipmunk_private.h */,
+ 2628298515EC7196002C4240 /* chipmunk_types.h */,
+ 2628298615EC7196002C4240 /* chipmunk_unsafe.h */,
+ 2628298715EC7196002C4240 /* constraints */,
+ 2628299415EC7196002C4240 /* cpArbiter.h */,
+ 2628299515EC7196002C4240 /* cpBB.h */,
+ 2628299615EC7196002C4240 /* cpBody.h */,
+ 2628299715EC7196002C4240 /* cpPolyShape.h */,
+ 2628299815EC7196002C4240 /* cpShape.h */,
+ 2628299915EC7196002C4240 /* cpSpace.h */,
+ 2628299A15EC7196002C4240 /* cpSpatialIndex.h */,
+ 2628299B15EC7196002C4240 /* cpVect.h */,
+ );
+ path = chipmunk;
+ sourceTree = "";
+ };
+ 2628298715EC7196002C4240 /* constraints */ = {
+ isa = PBXGroup;
+ children = (
+ 2628298815EC7196002C4240 /* cpConstraint.h */,
+ 2628298915EC7196002C4240 /* cpDampedRotarySpring.h */,
+ 2628298A15EC7196002C4240 /* cpDampedSpring.h */,
+ 2628298B15EC7196002C4240 /* cpGearJoint.h */,
+ 2628298C15EC7196002C4240 /* cpGrooveJoint.h */,
+ 2628298D15EC7196002C4240 /* cpPinJoint.h */,
+ 2628298E15EC7196002C4240 /* cpPivotJoint.h */,
+ 2628298F15EC7196002C4240 /* cpRatchetJoint.h */,
+ 2628299015EC7196002C4240 /* cpRotaryLimitJoint.h */,
+ 2628299115EC7196002C4240 /* cpSimpleMotor.h */,
+ 2628299215EC7196002C4240 /* cpSlideJoint.h */,
+ 2628299315EC7196002C4240 /* util.h */,
+ );
+ path = constraints;
+ sourceTree = "";
+ };
+ 262829AB15EC7196002C4240 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ 262829AC15EC7196002C4240 /* chipmunk.c */,
+ 262829AD15EC7196002C4240 /* CMakeLists.txt */,
+ 262829AE15EC7196002C4240 /* constraints */,
+ 262829BA15EC7196002C4240 /* cpArbiter.c */,
+ 262829BB15EC7196002C4240 /* cpArray.c */,
+ 262829BC15EC7196002C4240 /* cpBB.c */,
+ 262829BD15EC7196002C4240 /* cpBBTree.c */,
+ 262829BE15EC7196002C4240 /* cpBody.c */,
+ 262829BF15EC7196002C4240 /* cpCollision.c */,
+ 262829C015EC7196002C4240 /* cpHashSet.c */,
+ 262829C115EC7196002C4240 /* cpPolyShape.c */,
+ 262829C215EC7196002C4240 /* cpShape.c */,
+ 262829C315EC7196002C4240 /* cpSpace.c */,
+ 262829C415EC7196002C4240 /* cpSpaceComponent.c */,
+ 262829C515EC7196002C4240 /* cpSpaceHash.c */,
+ 262829C615EC7196002C4240 /* cpSpaceQuery.c */,
+ 262829C715EC7196002C4240 /* cpSpaceStep.c */,
+ 262829C815EC7196002C4240 /* cpSpatialIndex.c */,
+ 262829C915EC7196002C4240 /* cpSweep1D.c */,
+ 262829CA15EC7196002C4240 /* cpVect.c */,
+ 262829CB15EC7196002C4240 /* prime.h */,
+ );
+ path = src;
+ sourceTree = "";
+ };
+ 262829AE15EC7196002C4240 /* constraints */ = {
+ isa = PBXGroup;
+ children = (
+ 262829AF15EC7196002C4240 /* cpConstraint.c */,
+ 262829B015EC7196002C4240 /* cpDampedRotarySpring.c */,
+ 262829B115EC7196002C4240 /* cpDampedSpring.c */,
+ 262829B215EC7196002C4240 /* cpGearJoint.c */,
+ 262829B315EC7196002C4240 /* cpGrooveJoint.c */,
+ 262829B415EC7196002C4240 /* cpPinJoint.c */,
+ 262829B515EC7196002C4240 /* cpPivotJoint.c */,
+ 262829B615EC7196002C4240 /* cpRatchetJoint.c */,
+ 262829B715EC7196002C4240 /* cpRotaryLimitJoint.c */,
+ 262829B815EC7196002C4240 /* cpSimpleMotor.c */,
+ 262829B915EC7196002C4240 /* cpSlideJoint.c */,
+ );
+ path = constraints;
+ sourceTree = "";
+ };
+ A92275321517C094001B78AA = {
+ isa = PBXGroup;
+ children = (
+ 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */,
+ 15384E3C16119CC30021DC07 /* bindings */,
+ 2628297C15EC7196002C4240 /* chipmunk */,
+ D4545214156E28EF00887EB5 /* Classes */,
+ 15426FC415B5743C00712A7F /* CocosDenshion */,
+ 15384E6216119D5E0021DC07 /* extensions */,
+ A92275401517C094001B78AA /* Frameworks */,
+ D45446CC156DE73F00887EB5 /* ios */,
+ A922753E1517C094001B78AA /* Products */,
+ 15628F5B15F0F5C2000CF24B /* Resources */,
+ );
+ sourceTree = "";
+ };
+ A922753E1517C094001B78AA /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ A922753D1517C094001B78AA /* WatermelonWithMe.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ A92275401517C094001B78AA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D454520B156E22BD00887EB5 /* libz.dylib */,
+ D4545209156E22B400887EB5 /* libxml2.dylib */,
+ A92275411517C094001B78AA /* QuartzCore.framework */,
+ A92275431517C094001B78AA /* OpenGLES.framework */,
+ A92275451517C094001B78AA /* OpenAL.framework */,
+ A92275471517C094001B78AA /* AudioToolbox.framework */,
+ A92275491517C094001B78AA /* AVFoundation.framework */,
+ A922754B1517C094001B78AA /* UIKit.framework */,
+ A922754D1517C094001B78AA /* Foundation.framework */,
+ A922754F1517C094001B78AA /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ D45446CC156DE73F00887EB5 /* ios */ = {
+ isa = PBXGroup;
+ children = (
+ D45446D6156DE79D00887EB5 /* Info.plist */,
+ D45446CD156DE74F00887EB5 /* AppController.h */,
+ D45446CE156DE74F00887EB5 /* AppController.mm */,
+ D45446CF156DE74F00887EB5 /* main.m */,
+ D45446D0156DE74F00887EB5 /* Prefix.pch */,
+ D45446D1156DE74F00887EB5 /* RootViewController.h */,
+ D45446D2156DE74F00887EB5 /* RootViewController.mm */,
+ );
+ name = ios;
+ sourceTree = "";
+ };
+ D4545214156E28EF00887EB5 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ D4545215156E28EF00887EB5 /* AppDelegate.cpp */,
+ D4545216156E28EF00887EB5 /* AppDelegate.h */,
+ );
+ name = Classes;
+ path = ../Classes;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ A922753C1517C094001B78AA /* WatermelonWithMe */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "WatermelonWithMe" */;
+ buildPhases = (
+ A92275391517C094001B78AA /* Sources */,
+ A922753A1517C094001B78AA /* Frameworks */,
+ A922753B1517C094001B78AA /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 15426FC215B5741900712A7F /* PBXTargetDependency */,
+ );
+ name = WatermelonWithMe;
+ productName = WatermelonWithMe;
+ productReference = A922753D1517C094001B78AA /* WatermelonWithMe.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ A92275341517C094001B78AA /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "WatermelonWithMe" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = A92275321517C094001B78AA;
+ productRefGroup = A922753E1517C094001B78AA /* Products */;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 15426AEA15B5733200712A7F /* Products */;
+ ProjectRef = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ A922753C1517C094001B78AA /* WatermelonWithMe */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ 15426AF115B5733200712A7F /* libcocos2dx.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libcocos2dx.a;
+ remoteRef = 15426AF015B5733200712A7F /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+ A922753B1517C094001B78AA /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D446FDA316102D7D000ADA7B /* Default.png in Resources */,
+ 15DA88B71627C62000155276 /* cocos2dxapi.js in Resources */,
+ 15DA882A1627C44800155276 /* jsb_constants.js in Resources */,
+ 15DA882B1627C44800155276 /* jsb_constants_chipmunk.js in Resources */,
+ 15DA882C1627C44800155276 /* jsb_constants_cocos2d.js in Resources */,
+ 15DA882D1627C44800155276 /* jsb_constants_cocosbuilder.js in Resources */,
+ 15DA882E1627C44800155276 /* jsb_constants_gl.js in Resources */,
+ D446FDA516102D82000ADA7B /* Default@2x.png in Resources */,
+ D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */,
+ 15E2AEA3165DC6DD00F7743F /* res in Resources */,
+ 15E2AEA5165DC73200F7743F /* src in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ A92275391517C094001B78AA /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D45446D3156DE74F00887EB5 /* AppController.mm in Sources */,
+ D45446D4156DE74F00887EB5 /* main.m in Sources */,
+ D45446D5156DE74F00887EB5 /* RootViewController.mm in Sources */,
+ D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */,
+ 15426FE615B5743C00712A7F /* CDAudioManager.m in Sources */,
+ 15426FE715B5743C00712A7F /* CDOpenALSupport.m in Sources */,
+ 15426FE815B5743C00712A7F /* CocosDenshion.m in Sources */,
+ 15426FE915B5743C00712A7F /* SimpleAudioEngine.mm in Sources */,
+ 15426FEA15B5743C00712A7F /* SimpleAudioEngine_objc.m in Sources */,
+ 262829DB15EC7196002C4240 /* chipmunk.c in Sources */,
+ 262829DD15EC7196002C4240 /* cpConstraint.c in Sources */,
+ 262829DE15EC7196002C4240 /* cpDampedRotarySpring.c in Sources */,
+ 262829DF15EC7196002C4240 /* cpDampedSpring.c in Sources */,
+ 262829E015EC7196002C4240 /* cpGearJoint.c in Sources */,
+ 262829E115EC7196002C4240 /* cpGrooveJoint.c in Sources */,
+ 262829E215EC7196002C4240 /* cpPinJoint.c in Sources */,
+ 262829E315EC7196002C4240 /* cpPivotJoint.c in Sources */,
+ 262829E415EC7196002C4240 /* cpRatchetJoint.c in Sources */,
+ 262829E515EC7196002C4240 /* cpRotaryLimitJoint.c in Sources */,
+ 262829E615EC7196002C4240 /* cpSimpleMotor.c in Sources */,
+ 262829E715EC7196002C4240 /* cpSlideJoint.c in Sources */,
+ 262829E815EC7196002C4240 /* cpArbiter.c in Sources */,
+ 262829E915EC7196002C4240 /* cpArray.c in Sources */,
+ 262829EA15EC7196002C4240 /* cpBB.c in Sources */,
+ 262829EB15EC7196002C4240 /* cpBBTree.c in Sources */,
+ 262829EC15EC7196002C4240 /* cpBody.c in Sources */,
+ 262829ED15EC7196002C4240 /* cpCollision.c in Sources */,
+ 262829EE15EC7196002C4240 /* cpHashSet.c in Sources */,
+ 262829EF15EC7196002C4240 /* cpPolyShape.c in Sources */,
+ 262829F015EC7196002C4240 /* cpShape.c in Sources */,
+ 262829F115EC7196002C4240 /* cpSpace.c in Sources */,
+ 262829F215EC7196002C4240 /* cpSpaceComponent.c in Sources */,
+ 262829F315EC7196002C4240 /* cpSpaceHash.c in Sources */,
+ 262829F415EC7196002C4240 /* cpSpaceQuery.c in Sources */,
+ 262829F515EC7196002C4240 /* cpSpaceStep.c in Sources */,
+ 262829F615EC7196002C4240 /* cpSpatialIndex.c in Sources */,
+ 262829F715EC7196002C4240 /* cpSweep1D.c in Sources */,
+ 262829F815EC7196002C4240 /* cpVect.c in Sources */,
+ 15384E5816119CC30021DC07 /* cocos2d_specifics.cpp in Sources */,
+ 15384E5916119CC30021DC07 /* cocosjs_manual_conversions.cpp in Sources */,
+ 15384E5A16119CC30021DC07 /* cocos2dx.cpp in Sources */,
+ 15384E5D16119CC30021DC07 /* js_bindings_ccbreader.cpp in Sources */,
+ 15384E6016119CC30021DC07 /* js_manual_conversions.cpp in Sources */,
+ 15384E6116119CC30021DC07 /* ScriptingCore.cpp in Sources */,
+ 15384ED716119D5E0021DC07 /* CCBAnimationManager.cpp in Sources */,
+ 15384ED816119D5E0021DC07 /* CCBFileLoader.cpp in Sources */,
+ 15384ED916119D5E0021DC07 /* CCBKeyframe.cpp in Sources */,
+ 15384EDA16119D5E0021DC07 /* CCBReader.cpp in Sources */,
+ 15384EDB16119D5E0021DC07 /* CCBSequence.cpp in Sources */,
+ 15384EDC16119D5E0021DC07 /* CCBSequenceProperty.cpp in Sources */,
+ 15384EDD16119D5E0021DC07 /* CCBValue.cpp in Sources */,
+ 15384EDE16119D5E0021DC07 /* CCControlButtonLoader.cpp in Sources */,
+ 15384EDF16119D5E0021DC07 /* CCControlLoader.cpp in Sources */,
+ 15384EE016119D5E0021DC07 /* CCData.cpp in Sources */,
+ 15384EE116119D5E0021DC07 /* CCLabelBMFontLoader.cpp in Sources */,
+ 15384EE216119D5E0021DC07 /* CCLabelTTFLoader.cpp in Sources */,
+ 15384EE316119D5E0021DC07 /* CCLayerColorLoader.cpp in Sources */,
+ 15384EE416119D5E0021DC07 /* CCLayerGradientLoader.cpp in Sources */,
+ 15384EE516119D5E0021DC07 /* CCLayerLoader.cpp in Sources */,
+ 15384EE616119D5E0021DC07 /* CCMenuItemImageLoader.cpp in Sources */,
+ 15384EE716119D5E0021DC07 /* CCMenuItemLoader.cpp in Sources */,
+ 15384EE816119D5E0021DC07 /* CCNode+CCBRelativePositioning.cpp in Sources */,
+ 15384EE916119D5E0021DC07 /* CCNodeLoader.cpp in Sources */,
+ 15384EEA16119D5E0021DC07 /* CCNodeLoaderLibrary.cpp in Sources */,
+ 15384EEB16119D5E0021DC07 /* CCParticleSystemQuadLoader.cpp in Sources */,
+ 15384EEC16119D5E0021DC07 /* CCScale9SpriteLoader.cpp in Sources */,
+ 15384EED16119D5E0021DC07 /* CCScrollViewLoader.cpp in Sources */,
+ 15384EEE16119D5E0021DC07 /* CCSpriteLoader.cpp in Sources */,
+ 15384EFB16119D5E0021DC07 /* CCEditBox.cpp in Sources */,
+ 15384EFD16119D5E0021DC07 /* CCEditBoxImplIOS.mm in Sources */,
+ 15384EFE16119D5E0021DC07 /* EditBoxImplIOS.mm in Sources */,
+ 15384EFF16119D5E0021DC07 /* CCScrollView.cpp in Sources */,
+ 15384F0016119D5E0021DC07 /* CCSorting.cpp in Sources */,
+ 15384F0116119D5E0021DC07 /* CCTableView.cpp in Sources */,
+ 15384F0216119D5E0021DC07 /* CCTableViewCell.cpp in Sources */,
+ 15CFE1A61612FD0E00BF2188 /* CCControl.cpp in Sources */,
+ 15CFE1A71612FD0E00BF2188 /* CCControlButton.cpp in Sources */,
+ 15CFE1A81612FD0E00BF2188 /* CCControlColourPicker.cpp in Sources */,
+ 15CFE1A91612FD0E00BF2188 /* CCControlHuePicker.cpp in Sources */,
+ 15CFE1AA1612FD0E00BF2188 /* CCControlPotentiometer.cpp in Sources */,
+ 15CFE1AB1612FD0E00BF2188 /* CCControlSaturationBrightnessPicker.cpp in Sources */,
+ 15CFE1AC1612FD0E00BF2188 /* CCControlSlider.cpp in Sources */,
+ 15CFE1AD1612FD0E00BF2188 /* CCControlStepper.cpp in Sources */,
+ 15CFE1AE1612FD0E00BF2188 /* CCControlSwitch.cpp in Sources */,
+ 15CFE1AF1612FD0E00BF2188 /* CCControlUtils.cpp in Sources */,
+ 15CFE1B01612FD0E00BF2188 /* CCInvocation.cpp in Sources */,
+ 15CFE1B11612FD0E00BF2188 /* CCScale9Sprite.cpp in Sources */,
+ 263B98D016548E4D00228D8A /* js_bindings_chipmunk_auto_classes.cpp in Sources */,
+ 263B98D116548E4D00228D8A /* js_bindings_chipmunk_registration.cpp in Sources */,
+ 263B98D216548E4D00228D8A /* js_bindings_core.cpp in Sources */,
+ 263B98D616548EB700228D8A /* js_bindings_chipmunk_functions.cpp in Sources */,
+ 263B98D716548EB700228D8A /* js_bindings_chipmunk_manual.cpp in Sources */,
+ 15E2AE9E165DC52C00F7743F /* CCPhysicsDebugNode.cpp in Sources */,
+ 15E2AE9F165DC52C00F7743F /* CCPhysicsSprite.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 15426FC215B5741900712A7F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = cocos2dx;
+ targetProxy = 15426FC115B5741900712A7F /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ A92276FE1517C097001B78AA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ DEBUG,
+ "COCOS2D_DEBUG=1",
+ USE_FILE32API,
+ TARGET_OS_IPHONE,
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(SRCROOT)/../../../cocos2dx",
+ "$(SRCROOT)/../../../cocos2dx/include",
+ "$(SRCROOT)/../../../cocos2dx/platform/ios",
+ "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include1",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ A92276FF1517C097001B78AA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ NDEBUG,
+ USE_FILE32API,
+ TARGET_OS_IPHONE,
+ );
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(SRCROOT)/../../../cocos2dx",
+ "$(SRCROOT)/../../../cocos2dx/include",
+ "$(SRCROOT)/../../../cocos2dx/platform/ios",
+ "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include1",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ };
+ name = Release;
+ };
+ A92277011517C097001B78AA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ COCOS2D_JAVASCRIPT,
+ DEBUG,
+ "COCOS2D_DEBUG=1",
+ USE_FILE32API,
+ TARGET_OS_IPHONE,
+ CC_ENABLE_CHIPMUNK_INTEGRATION,
+ );
+ GCC_THUMB_SUPPORT = NO;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ HEADER_SEARCH_PATHS = (
+ "\"$(SRCROOT)/../../../cocos2dx\"",
+ "\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"",
+ "\"$(SRCROOT)/../../../CocosDenshion/include\"",
+ "\"$(SDKROOT)/usr/include/libxml2\"",
+ "$(SRCROOT)/../../../cocos2dx/include",
+ "$(SRCROOT)/../../../cocos2dx/platform/ios",
+ "$(SRCROOT)/../../../external/chipmunk/include/chipmunk",
+ "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include",
+ "$(SRCROOT)/../../../scripting/javascript/bindings",
+ );
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/lib\"";
+ OTHER_LDFLAGS = (
+ "-lxml2",
+ "-lz",
+ "-ljs_static",
+ );
+ PRODUCT_NAME = WatermelonWithMe;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ A92277021517C097001B78AA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ COCOS2D_JAVASCRIPT,
+ NDEBUG,
+ USE_FILE32API,
+ TARGET_OS_IPHONE,
+ CC_ENABLE_CHIPMUNK_INTEGRATION,
+ );
+ GCC_THUMB_SUPPORT = NO;
+ HEADER_SEARCH_PATHS = (
+ "\"$(SRCROOT)/../../../cocos2dx\"",
+ "\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"",
+ "\"$(SRCROOT)/../../../CocosDenshion/include\"",
+ "\"$(SDKROOT)/usr/include/libxml2\"",
+ "$(SRCROOT)/../../../cocos2dx/include",
+ "$(SRCROOT)/../../../cocos2dx/platform/ios",
+ "$(SRCROOT)/../../../external/chipmunk/include/chipmunk",
+ "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include",
+ "$(SRCROOT)/../../../scripting/javascript/bindings",
+ );
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/lib\"";
+ OTHER_LDFLAGS = (
+ "-lxml2",
+ "-lz",
+ "-ljs_static",
+ );
+ PRODUCT_NAME = WatermelonWithMe;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A92275371517C094001B78AA /* Build configuration list for PBXProject "WatermelonWithMe" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A92276FE1517C097001B78AA /* Debug */,
+ A92276FF1517C097001B78AA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "WatermelonWithMe" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A92277011517C097001B78AA /* Debug */,
+ A92277021517C097001B78AA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = A92275341517C094001B78AA /* Project object */;
+}
diff --git a/samples/WatermelonWithMe/proj.ios/main.m b/samples/WatermelonWithMe/proj.ios/main.m
new file mode 100644
index 0000000000..e3dedca28b
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.ios/main.m
@@ -0,0 +1,17 @@
+//
+// main.m
+// testjs
+//
+// Created by Rolando Abarca on 3/19/12.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
+ [pool release];
+ return retVal;
+}
diff --git a/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj
new file mode 100644
index 0000000000..2f4008a093
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj
@@ -0,0 +1,208 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {D0F06A44-A245-4D13-A498-0120C203B539}
+ WatermelonWithMe
+
+
+
+ Application
+ Unicode
+
+
+ Application
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ $(SolutionDir)$(Configuration).win32\
+ $(Configuration).win32\
+ false
+ $(SolutionDir)$(Configuration).win32\
+ $(Configuration).win32\
+ false
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ false
+ Win32
+ true
+ $(IntDir)testjs.tlb
+ testjs.h
+
+
+ testjs_i.c
+ testjs_p.c
+
+
+ Disabled
+ $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ EditAndContinue
+ 4267;4251;4244;%(DisableSpecificWarnings)
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0409
+ $(IntDir);%(AdditionalIncludeDirectories)
+
+
+ if not exist "$(OutDir)" mkdir "$(OutDir)"
+xcopy /Y /Q "$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)"
+
+
+
+ libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies)
+ $(OutDir);%(AdditionalLibraryDirectories)
+ true
+ Windows
+ MachineX86
+
+
+
+
+
+
+ Copy js and resource files.
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ false
+ Win32
+ true
+ $(IntDir)testjs.tlb
+ testjs.h
+
+
+ testjs_i.c
+ testjs_p.c
+
+
+ $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+
+
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ 4267;4251;4244;%(DisableSpecificWarnings)
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0409
+ $(IntDir);%(AdditionalIncludeDirectories)
+
+
+ if not exist "$(OutDir)" mkdir "$(OutDir)"
+xcopy /Y /Q "$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)"
+
+
+
+ libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies)
+ $(OutDir);%(AdditionalLibraryDirectories)
+ Windows
+ MachineX86
+
+
+ if not exist "$(OutDir)" mkdir "$(OutDir)"
+if exist "$(OutDir)\WatermelonWithMeRes" rd /s /q "$(OutDir)\WatermelonWithMeRes"
+mkdir "$(OutDir)\WatermelonWithMeRes"
+xcopy "$(ProjectDir)..\cocos2d-js-tests\res" "$(OutDir)\WatermelonWithMeRes\res\" /e /Y
+xcopy "$(ProjectDir)..\bindings\*.js" "$(OutDir)\WatermelonWithMeRes" /e /Y
+xcopy "$(ProjectDir)..\cocos2d-js-tests\src" "$(OutDir)\WatermelonWithMeRes\src\" /e /Y
+
+ Copy js and resource files.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
+ false
+
+
+ {f8edd7fa-9a51-4e80-baeb-860825d2eac6}
+ false
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.filters b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.filters
new file mode 100644
index 0000000000..e2dddfc6f6
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.filters
@@ -0,0 +1,125 @@
+
+
+
+
+ {58ebb5df-595d-4e27-8c01-555be6f1c625}
+
+
+ {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest
+
+
+ {ccb2323b-1cfa-41ea-bcf4-ba5f07309396}
+
+
+ {e93a77e1-af1e-4400-87d3-504b62ebdbb0}
+
+
+ {146f26cf-13e1-4106-891b-4b0118ceac2b}
+
+
+
+
+ win32
+
+
+ Classes
+
+
+ bindings\generated
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+
+
+ win32
+
+
+ win32
+
+
+ Classes
+
+
+ bindings\generated
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+ bindings
+
+
+
+
+ resource
+
+
+
+
+ resource
+
+
+
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.user b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.user
new file mode 100644
index 0000000000..3e49b0be7f
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj.user
@@ -0,0 +1,11 @@
+
+
+
+ $(OutDir)\WatermelonWithMeRes
+ WindowsLocalDebugger
+
+
+ $(OutDir)\WatermelonWithMeRes
+ WindowsLocalDebugger
+
+
\ No newline at end of file
diff --git a/samples/WatermelonWithMe/proj.win32/main.cpp b/samples/WatermelonWithMe/proj.win32/main.cpp
new file mode 100644
index 0000000000..312eec8d7f
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/main.cpp
@@ -0,0 +1,37 @@
+#include "main.h"
+#include "AppDelegate.h"
+#include "CCEGLView.h"
+
+USING_NS_CC;
+
+// uncomment below line, open debug console
+// #define USE_WIN32_CONSOLE
+
+int APIENTRY _tWinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow)
+{
+ UNREFERENCED_PARAMETER(hPrevInstance);
+ UNREFERENCED_PARAMETER(lpCmdLine);
+
+#ifdef USE_WIN32_CONSOLE
+ AllocConsole();
+ freopen("CONIN$", "r", stdin);
+ freopen("CONOUT$", "w", stdout);
+ freopen("CONOUT$", "w", stderr);
+#endif
+
+ // create the application instance
+ AppDelegate app;
+ CCEGLView* eglView = CCEGLView::sharedOpenGLView();
+ eglView->setFrameSize(800, 450);
+
+ int ret = CCApplication::sharedApplication()->run();
+
+#ifdef USE_WIN32_CONSOLE
+ FreeConsole();
+#endif
+
+ return ret;
+}
diff --git a/samples/WatermelonWithMe/proj.win32/main.h b/samples/WatermelonWithMe/proj.win32/main.h
new file mode 100644
index 0000000000..abe1c3a007
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/main.h
@@ -0,0 +1,13 @@
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+// Windows Header Files:
+#include
+#include
+
+// C RunTime Header Files
+#include "CCStdC.h"
+
+#endif // __WINMAIN_H__
diff --git a/samples/WatermelonWithMe/proj.win32/res/testjs.ico b/samples/WatermelonWithMe/proj.win32/res/testjs.ico
new file mode 100644
index 0000000000..feaf932a74
Binary files /dev/null and b/samples/WatermelonWithMe/proj.win32/res/testjs.ico differ
diff --git a/samples/WatermelonWithMe/proj.win32/resource.h b/samples/WatermelonWithMe/proj.win32/resource.h
new file mode 100644
index 0000000000..a4cfa38af8
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/resource.h
@@ -0,0 +1,20 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by testjs.RC
+//
+
+#define IDS_PROJNAME 100
+#define IDR_TESTJS 100
+
+#define ID_FILE_NEW_WINDOW 32771
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 32775
+#endif
+#endif
diff --git a/samples/WatermelonWithMe/proj.win32/testjs.rc b/samples/WatermelonWithMe/proj.win32/testjs.rc
new file mode 100644
index 0000000000..bf10c0e6f0
--- /dev/null
+++ b/samples/WatermelonWithMe/proj.win32/testjs.rc
@@ -0,0 +1,86 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON "res\\testjs.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "testjs Module\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "testjs\0"
+ VALUE "LegalCopyright", "Copyright \0"
+ VALUE "OriginalFilename", "testjs.exe\0"
+ VALUE "ProductName", "testjs Module\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
diff --git a/samples/WatermelonWithMe/watermelon_with_me.js b/samples/WatermelonWithMe/watermelon_with_me.js
new file mode 100644
index 0000000000..d3877e5845
--- /dev/null
+++ b/samples/WatermelonWithMe/watermelon_with_me.js
@@ -0,0 +1,1100 @@
+//
+// http://www.cocos2d-iphone.org
+// http://www.chipmunk-physics.org
+//
+// Watermelon with Me
+// A JS game using cocos2d and Chipmunk
+//
+//
+// Credits:
+// Code: Ricardo Quesada
+// Physics code based on Space Patrol ( https://github.com/slembcke/SpacePatrol ) by Scott Lembcke
+// Art: Mountains from Space Patrol
+// Coins by ayt ( http://www.cocos2d-iphone.org/forum/topic/35355#post-169768 )
+// Car by Ricardo Quesada
+// Farmer's Market: ???
+// Music: By Michael Wehr ( http://www.jamendo.com/en/track/126280/disneyland )
+// License: Creative Commons 3.0: No-Commercial, Attribution
+//
+//
+// Most of the comments in the physics code were copied+pased from Space Patrol
+//
+//
+// LICENSE:
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+require("jsb_constants.js");
+
+// Z Orders (grouped by parent)
+
+// parent is scroll batch node
+Z_WATERMELON = 5;
+Z_COIN = 8;
+Z_FINISH = 9;
+Z_CHASSIS = 10;
+Z_WHEEL = 11;
+
+// parent is scroll node (parallax node)
+Z_MOUNTAINS = 0;
+Z_SPRITES = 10;
+Z_TERRAIN = 20;
+Z_DEBUG_PHYSICS = 50;
+
+// parent is game layer
+Z_SCROLL = 10;
+Z_SMOKE = 15;
+Z_HUD = 20;
+Z_LABEL = 30;
+Z_DEBUG_MENU = 30;
+
+// Game state
+STATE_PAUSE = 1;
+STATE_PLAYING = 2;
+STATE_GAME_OVER = 3;
+STATE_LEVEL_COMPLETE = 4;
+
+audioEngine = cc.AudioEngine.getInstance();
+director = cc.Director.getInstance();
+winSize = director.getWinSize();
+centerPos = cc.p( winSize.width/2, winSize.height/2 );
+
+sizeRatio = winSize.width / 480;
+
+//
+// Levels
+//
+levels = [];
+
+// Level 0
+levels.push( {'coins' : [ {x:300,y:50},{x:350,y:50},{x:400,y:50},{x:450,y:50},{x:500,y:50},{x:550,y:50},{x:600,y:50},
+ {x:1300,y:50},{x:1350,y:50},{x:1400,y:50},{x:1450,y:50},{x:1500,y:50},{x:1550,y:50},{x:1600,y:50}
+ ],
+
+ 'car' : {x:80, y:60},
+ 'finish' : {x:3000, y:20},
+
+ // points relatives to the previous point
+ 'lines' : [ {x:0,y:0}, {x:850,y:0},
+ {x:20, y:5},{x:20,y:-5}, {x:20, y:10},{x:20,y:-10}, {x:20, y:5},{x:20,y:-5},
+ {x:500,y:0},
+ {x:20, y:5},{x:20,y:-5}, {x:20, y:10},{x:20,y:-10}, {x:20, y:5},{x:20,y:-5},
+ {x:500,y:0},
+ {x:20, y:5},{x:20,y:-5}, {x:20, y:10},{x:20,y:-10}, {x:20, y:5},{x:20,y:-5},
+ {x:500,y:0},
+ {x:20, y:5},{x:20,y:-5}, {x:20, y:10},{x:20,y:-10}, {x:20, y:5},{x:20,y:-5},
+ {x:300,y:0}
+ ]
+ }
+ );
+
+// Level 1
+levels.push( {'coins' : [ {x:1120,y:150}, {x:1160,y:140}, {x:1200,y:130}, {x:1240,y:120}, {x:1280,y:110},
+ {x:2470,y:150}, {x:2510,y:140}, {x:2550,y:130}, {x:2590,y:120}, {x:2630,y:110},
+ {x:2220,y:60}, {x:2260,y:70}, {x:2300,y:80}, {x:2340,y:90}, {x:2380,y:100}
+ ],
+
+ 'car' : {x:80, y:60},
+ 'finish' : {x:3400, y:20},
+
+ // points relatives to the previous point
+ 'lines' : [ {x:0,y:0}, {x:350,y:10}, {x:20, y:5}, {x:500, y:-20}, {x:200, y:80}, {x:100, y:-40}, {x:200,y:-10}, {x:400, y:-50}, {x:300,y:0}, {x:400,y:100}, {x:200,y:-100}, {x:400,y:0}, {x:20,y:15}, {x:20,y:-15}, {x:400,y:0} ]
+ }
+ );
+
+// Level 2
+levels.push( {'coins' : [ {x:1120,y:150}, {x:1160,y:140}, {x:1200,y:130}, {x:1240,y:120}, {x:1280,y:110}
+ ],
+
+ 'car' : {x:80, y:60},
+ 'finish' : {x:4100, y:-100},
+
+ // points relatives to the previous point
+ 'lines' : [ {x:0,y:0}, {x:350,y:0},
+ {x:300, y:100}, {x:100, y:50}, {x:50, y:12}, {x:25, y:0}, {x:50,y:-12}, {x:100, y:-25}, {x:400, y:-200}, {x:500, y:0},
+ {x:20, y:15},{x:20,y:-15}, {x:20, y:5},{x:20,y:-5},
+ {x:300,y:0},
+ {x:300, y:100}, {x:100, y:50}, {x:50, y:12}, {x:25, y:0}, {x:50,y:-12}, {x:100, y:-25}, {x:400, y:-200}, {x:500, y:0},
+ {x:20, y:15},{x:20,y:-15}, {x:20, y:5},{x:20,y:-5},
+ {x:300,y:0}
+ ]
+ }
+ );
+//
+// Physics constants
+//
+
+INFINITY = 1e50;
+
+COLLISION_TYPE_CAR = 1;
+COLLISION_TYPE_COIN = 2;
+COLLISION_TYPE_WATERMELON = 3;
+COLLISION_TYPE_FLOOR = 4;
+COLLISION_TYPE_FINISH = 5;
+
+// Create some collision rules for fancy layer based filtering.
+// There is more information about how this works in the Chipmunk docs.
+COLLISION_RULE_TERRAIN_BUGGY = 1 << 0;
+COLLISION_RULE_BUGGY_ONLY = 1 << 1;
+
+// Bitwise or the rules together to get the layers for a certain shape type.
+COLLISION_LAYERS_TERRAIN = COLLISION_RULE_TERRAIN_BUGGY;
+COLLISION_LAYERS_BUGGY = (COLLISION_RULE_TERRAIN_BUGGY | COLLISION_RULE_BUGGY_ONLY);
+
+// Some constants for controlling the car and world:
+GRAVITY = 1200.0;
+WHEEL_MASS = 0.25;
+CHASSIS_MASS = 0.7;
+FRONT_SPRING = 150.0;
+FRONT_DAMPING = 3.0;
+COG_ADJUSTMENT = cp.v(0.0, -10.0);
+REAR_SPRING = 100.0;
+REAR_DAMPING = 3.0;
+ROLLING_FRICTION = 5e2;
+ENGINE_MAX_TORQUE = 6.0e4;
+ENGINE_MAX_W = 60;
+BRAKING_TORQUE = 3.0e4;
+DIFFERENTIAL_TORQUE = 0.5;
+
+// Groups
+GROUP_BUGGY = 1;
+GROUP_COIN = 2;
+
+WATERMELON_MASS = 0.05;
+
+// Node Tags (used by CocosBuilder)
+SCORE_LABEL_TAG = 10;
+TIME_LABEL_TAG = 11;
+TITLE_TAG = 50;
+
+//
+// Game Layer
+//
+var GameLayer = cc.LayerGradient.extend({
+
+ _space:null,
+ _motor:null,
+ _frontBrake:null,
+ _rearBrake:null,
+ _rearWheel:null,
+ _chassis:null,
+ _batch:null,
+ _shapesToRemove:[],
+ _rogueBodies:[],
+ _score:0,
+ _scoreLabel:null,
+ _time:0,
+ _timeLabel:null,
+ _level:0,
+ _state:STATE_PAUSE,
+ _deferredState:null,
+ _debugNode:null,
+ _scrollNode:null,
+ _terrain:null,
+ _carSprite:null,
+ _carSmoke:null,
+
+ ctor:function (level) {
+ cc.associateWithNative(this, cc.LayerGradient);
+ this.init(cc.c4b(0, 0, 0, 255), cc.c4b(255, 255, 255, 255));
+
+ this.scheduleUpdate();
+
+ this.enableEvents( true );
+
+ cc.MenuItemFont.setFontSize(16 * sizeRatio );
+
+ var item1_pause = cc.MenuItemFont.create("Pause" );
+ var item1_resume = cc.MenuItemFont.create("Resume" );
+ var item1 = cc.MenuItemToggle.create( item1_pause, item1_resume );
+ item1.setCallback( this.onPause, this);
+ var item2 = cc.MenuItemFont.create("Debug On/Off", this.onToggleDebug, this);
+ var menu = cc.Menu.create( item1, item2 );
+ menu.alignItemsVertically();
+ this.addChild( menu, Z_DEBUG_MENU );
+ menu.setPosition( winSize.width-(50*sizeRatio), winSize.height-(80*sizeRatio) );
+
+ var animCache = cc.AnimationCache.getInstance();
+ animCache.addAnimations("coins_animation.plist");
+
+ // scrollng Node.. all game objects are children of this node (or one of its subchildre)
+ var scroll = cc.ParallaxNode.create();
+ this.addChild( scroll, Z_SCROLL );
+ this._scrollNode = scroll;
+
+ // coin only needed to obtain the texture for the Batch Node
+ var coin = cc.Sprite.createWithSpriteFrameName("coin01.png");
+ this._batch = cc.SpriteBatchNode.createWithTexture( coin.getTexture(), 100 );
+ scroll.addChild( this._batch, Z_SPRITES, cc._p(1,1), cc.POINT_ZERO );
+
+ // "endless" background image
+ var background = cc.Sprite.create("Parallax.pvr.gz", cc.rect(0,0,4096,512) );
+ scroll.addChild(background, Z_MOUNTAINS , cc._p(0.2, 0.2), cc._p(0,-150));
+ background.setAnchorPoint( cc.POINT_ZERO );
+ //cjh background.getTexture().setTexParameters(gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.CLAMP_TO_EDGE);
+
+ // Terrain
+ this._terrain = cc.DrawNode.create();
+ scroll.addChild( this._terrain, Z_TERRAIN, cc._p(1,1), cc.POINT_ZERO );
+// this._terrain.setVisible( false );
+
+ // Smoke
+ this._carSmoke = cc.ParticleSystem.create( "car_smoke.plist" );
+ this._carSmoke.setPosition( cc.POINT_ZERO );
+ this.addChild( this._carSmoke, Z_SMOKE );
+ this._carSmoke.setPositionType( cc.PARTICLE_TYPE_RELATIVE );
+
+ this._shapesToRemove = [];
+ this._rogueBodies = [];
+
+ this.initHUD();
+
+ this._score = 0;
+ this._time = 0;
+ this._state = STATE_PAUSE;
+ this._level = level;
+
+ __jsc__.dumpRoot();
+ __jsc__.garbageCollect();
+ },
+
+ // HUD stuff
+ initHUD:function() {
+ var hud = cc.Reader.load("HUD.ccbi", this);
+ this.addChild( hud, Z_HUD );
+ this._scoreLabel = hud.getChildByTag( SCORE_LABEL_TAG );
+ this._timeLabel = hud.getChildByTag( TIME_LABEL_TAG );
+
+ // bug in cocosbuilder
+ this._scoreLabel.setAnchorPoint( cc._p(1, 0.5) );
+ this._timeLabel.setAnchorPoint( cc._p(0, 0.5) );
+ },
+
+ addScore:function(value) {
+ this._score += value;
+ this._scoreLabel.setString( this._score );
+ this._scoreLabel.stopAllActions();
+
+ var scaleUpTo = cc.ScaleTo.create(0.05, 1.2);
+ var scaleDownTo = cc.ScaleTo.create(0.05, 1.0);
+ var seq = cc.Sequence.create( scaleUpTo, scaleDownTo );
+ this._scoreLabel.runAction( seq );
+
+ },
+
+ //
+ // Events
+ //
+ onRestart:function(sender) {
+ var scene = cc.Scene.create();
+ var layer = new GameLayer(this._level);
+ scene.addChild( layer );
+ director.replaceScene( cc.TransitionFade.create(1, scene) );
+ this._state = STATE_PAUSE;
+ },
+
+ onPause:function(sender) {
+ if( this._state == STATE_PAUSE )
+ this._state = STATE_PLAYING;
+ else
+ this._state = STATE_PAUSE;
+ },
+
+ onNextLevel:function(sender) {
+ var scene = cc.Scene.create();
+ var layer = new GameLayer(this._level+1);
+ scene.addChild( layer );
+ director.replaceScene( cc.TransitionFade.create(1, scene) );
+ this._state = STATE_PAUSE;
+ },
+
+ onMainMenu:function(sender) {
+ var scene = cc.Reader.loadAsScene("MainMenu.ccbi");
+ director.replaceScene( scene );
+ },
+
+ onToggleDebug:function(sender) {
+ var state = this._debugNode.isVisible();
+ this._debugNode.setVisible( !state );
+ },
+
+ onMouseDown:function(event) {
+ if(this._state == STATE_PLAYING)
+ this.setThrottle(1);
+ return true;
+ },
+ onMouseUp:function(event) {
+ if(this._state == STATE_PLAYING)
+ this.setThrottle(0);
+ return true;
+ },
+ onTouchesBegan:function( touches, event) {
+ if(this._state == STATE_PLAYING)
+ this.setThrottle(1);
+ },
+ onTouchesEnded:function( touches, event) {
+ if(this._state == STATE_PLAYING)
+ this.setThrottle(0);
+ },
+
+ onEnterTransitionDidFinish:function() {
+
+ this.initPhysics();
+ this.setupLevel(this._level);
+
+ this._state = STATE_PLAYING;
+
+ // Level Label
+ var label = cc.LabelBMFont.create("LEVEL " + this._level, "Abadi40.fnt" );
+ label.setPosition( centerPos );
+ this.addChild( label, Z_LABEL );
+ var d = cc.DelayTime.create(1);
+ var scale = cc.ScaleBy.create(1.1, 5);
+ var fade = cc.FadeOut.create(1.1);
+ var s = cc.Spawn.create( scale, fade );
+ var selfremove = cc.CallFunc.create(this.onRemoveMe, this );
+ var seq = cc.Sequence.create(d, s, selfremove );
+ label.runAction( seq );
+
+ },
+
+ onRemoveMe:function( sender ) {
+ sender.removeFromParent();
+ },
+
+ onExit:function() {
+
+ this.enableCollisionEvents( false );
+ },
+
+ // Coin and Car
+ onCollisionBeginCoin : function ( arbiter, space ) {
+
+ var bodies = arbiter.getBodies();
+ var shapes = arbiter.getShapes();
+ var collTypeA = shapes[0].getCollisionType();
+ var collTypeB = shapes[1].getCollisionType();
+
+ var shapeCoin = (collTypeA == COLLISION_TYPE_COIN) ? shapes[0] : shapes[1];
+
+ // XXX: hack to prevent double deletion... argh...
+ // Since shapeCoin in 64bits is a typedArray and in 32-bits is an integer
+ // a ad-hoc solution needs to be implemented
+ if( this._shapesToRemove.length === 0 ) {
+ // since Coin is a sensor, it can't be removed at PostStep.
+ // PostStep is not called for Sensors
+ this._shapesToRemove.push( shapeCoin );
+ audioEngine.playEffect("pickup_coin.wav");
+
+ this.addScore(1);
+ }
+ return true;
+ },
+
+ // Floor and Watermelon
+ onCollisionBeginWatermelon : function ( arbiter, space ) {
+ this.setThrottle(0);
+ this.setGameStateDeferred( STATE_GAME_OVER );
+ return true;
+ },
+
+ // Car and Finish line
+ onCollisionBeginFinish : function ( arbiter, space ) {
+ this.setThrottle(0);
+ this.setGameStateDeferred( STATE_LEVEL_COMPLETE );
+ return true;
+ },
+
+ update:function(dt) {
+
+ // update state if necessary
+ if( this._deferredState )
+ this.setGameState( this._deferredState );
+
+ if( this._state == STATE_PLAYING ) {
+ // update time
+ this._time += dt;
+ this._timeLabel.setString( '' + this._time.toFixed(1) );
+ }
+
+ // Don't update physics on game over
+ if( this._state != STATE_PAUSE )
+ this._space.step(dt);
+
+ // sync smoke with car
+ if( this._carSprite ) {
+ var p = this._carSprite.convertToWorldSpace( cc.POINT_ZERO );
+ this._carSmoke.setPosition( p );
+ }
+
+ var l = this._shapesToRemove.length;
+
+ for( var i=0; i < l; i++ ) {
+ var shape = this._shapesToRemove[i];
+
+ this._space.removeStaticShape( shape );
+ // shape.free();
+
+ var body = shape.getBody();
+ var sprite = body.getUserData();
+ sprite.removeFromParent();
+
+ // body.free();
+
+ }
+
+ if( l > 0 )
+ this._shapesToRemove = [];
+ },
+
+ //
+ // Level Setup
+ //
+ setupLevel : function(lvl) {
+
+ var x = 0;
+ var y = 0;
+ var width = winSize.width;
+ var height = winSize.height;
+
+ var level = levels[ lvl ];
+
+ var i=0;
+ // Coins
+ var coins = level['coins'];
+ for( i=0;i < coins.length; i++) {
+ var coin = coins[i];
+ this.createCoin( cc._p( coin.x, coin.y) );
+ }
+
+ // car
+ var car = level['car'];
+ this.createCar( cp.v( car.x, car.y) );
+
+ // finish
+ var finish = level['finish'];
+ this.createFinish( cp._v(finish.x, finish.y) );
+
+ // lines
+ var poly = [];
+ var p = {x:0, y:0};
+ var lines = level['lines'];
+
+ for( i=0; i < lines.length; i++) {
+ var line = lines[i];
+ if( i > 0 ) {
+ this.createSegment( cp._v(p.x, p.y), cp._v( p.x+line.x, p.y+line.y ) );
+ this._terrain.drawSegment( cc._p(p.x, p.y), cc._p(p.x+line.x, p.y+line.y), 5, cc.c4f(0.43,0.39,0.34,1) );
+ }
+
+ p = {x:p.x+line.x, y:p.y+line.y};
+
+ poly.push( cc.p(p.x, p.y) );
+
+ // needed for world boundary
+ x = Math.min(x, p.x);
+ y = Math.min(y, p.y);
+ width = Math.max( width, p.x);
+ height = Math.max( height, p.y);
+ }
+
+ poly.unshift( cc.p(x,y) );
+
+ // XXX: Bug in CCDrawNode: No tesselation, so "fill" is disabled
+ // XXX: CCDrawNode#drawPoly is super expensive... using drawSegment instead
+ // poly, fill color, border width, border color
+// this._terrain.drawPoly( poly, cc.c4f(0,0,0,0 ), 1, cc.c4f(0.82,0.41,0.04,1) );
+
+ var rect = cc.rect(x,y,width,height+250);
+ var a = cc.Follow.create( this._carSprite, rect );
+ this._scrollNode.runAction( a );
+
+ this.createWorldBoundary( rect );
+ },
+
+ createWorldBoundary:function( rect ) {
+
+ var staticBody = this._space.getStaticBody();
+
+ var x = rect.x;
+ var y = rect.y;
+ var w = rect.width;
+ var h = rect.height;
+
+ // Walls
+ var walls =[new cp.SegmentShape( staticBody, cp._v(x,y), cp._v(w,y), 0 ), // bottom
+ new cp.SegmentShape( staticBody, cp._v(x,h), cp._v(w,h), 0), // top
+ new cp.SegmentShape( staticBody, cp._v(x,y), cp._v(x,h), 0), // left
+ new cp.SegmentShape( staticBody, cp._v(w,y), cp._v(w,h), 0) // right
+ ];
+ for( var i=0; i < walls.length; i++ ) {
+ var wall = walls[i];
+ wall.setElasticity(0);
+ wall.setFriction(0);
+ wall.setCollisionType(COLLISION_TYPE_FLOOR);
+ this._space.addStaticShape( wall );
+ }
+ },
+
+ //
+ // Physics
+ //
+ initPhysics : function() {
+ this._space = new cp.Space();
+
+ // Gravity
+ this._space.gravity = cp._v(0, -GRAVITY);
+
+ this.enableCollisionEvents( true );
+
+ // debug only
+ this._debugNode = cc.PhysicsDebugNode.create( this._space.handle );
+ this._debugNode.setVisible( false );
+ // Parallax ratio and offset
+ this._scrollNode.addChild( this._debugNode, Z_DEBUG_PHYSICS, cc._p(1,1), cc.POINT_ZERO );
+ },
+
+ setThrottle : function( throttle ) {
+ if(throttle > 0){
+ // The motor is modeled like an electric motor where the torque decreases inversely as the rate approaches the maximum.
+ // It's simple to code up and feels nice.
+
+ // _motor.maxForce = cpfclamp01(1.0 - (_chassis.body.angVel - _rearWheel.body.angVel)/ENGINE_MAX_W)*ENGINE_MAX_TORQUE;
+ var maxForce = cp.fclamp01(1.0 - ( (this._chassis.getAngVel() - this._rearWheel.getAngVel()) / ENGINE_MAX_W)) * ENGINE_MAX_TORQUE;
+ this._motor.setMaxForce( maxForce );
+
+ // Set the brakes to apply the baseline rolling friction torque.
+ this._frontBrake.setMaxForce( ROLLING_FRICTION );
+ this._rearBrake.setMaxForce( ROLLING_FRICTION );
+ } else if(throttle < 0){
+ // Disable the motor.
+ cp.constraintSetMaxForce( this._motor, 0 );
+ // It would be a pretty good idea to give the front and rear brakes different torques.
+ // The buggy as is now has a tendency to tip forward when braking hard.
+ this._frontBrake.setMaxForce( BRAKING_TORQUE);
+ this._rearBrake.setMaxForce( BRAKING_TORQUE);
+ } else {
+ // Disable the motor.
+ this._motor.setMaxForce( 0 );
+ // Set the brakes to apply the baseline rolling friction torque.
+ this._frontBrake.setMaxForce( ROLLING_FRICTION );
+ this._rearBrake.setMaxForce( ROLLING_FRICTION );
+ }
+ },
+
+ createCar : function(pos) {
+ var front = this.createWheel( cp.v.add(pos, cp._v(47,-25) ) );
+ this._chassis = this.createChassis( cp.v.add( pos, COG_ADJUSTMENT ) );
+ this._rearWheel = this.createWheel( cp.v.add( pos, cp._v(-35, -25) ) );
+ this.createCarJoints( this._chassis, front, this._rearWheel );
+ this.createCarFruits( pos );
+
+ this.setThrottle( 0 );
+ },
+
+ createCarJoints: function( chassis, front, rear ) {
+
+ // The front wheel strut telescopes, so we'll attach the center of the wheel to a groov joint on the chassis.
+ // I created the graphics specifically to have a 45 degree angle. So it's easy to just fudge the numbers.
+ var grv_a = chassis.world2Local( front.getPos() );
+ var grv_b = cp.v.add( grv_a, cp.v.mult( cp._v(-1, 1), 7 ) );
+ var frontJoint = new cp.GrooveJoint( chassis, front, grv_a, grv_b, cp.vzero );
+
+ // Create the front zero-length spring.
+ var front_anchor = chassis.world2Local( front.getPos() );
+ var frontSpring = new cp.DampedSpring( chassis, front, front_anchor, cp.vzero, 0, FRONT_SPRING, FRONT_DAMPING );
+
+ // The rear strut is a swinging arm that holds the wheel a at a certain distance from a pivot on the chassis.
+ // A perfect fit for a pin joint conected between the chassis and the wheel's center.
+ var rearJoint = new cp.PinJoint( chassis, rear, cp.v.sub( cp._v(-14,-8), COG_ADJUSTMENT), cp.vzero );
+
+ // return cpvtoangle(cpvsub([_chassis.body local2world:_rearJoint.anchr1], _rearWheel.body.pos));
+ var rearStrutRestAngle = cp.v.toangle( cp.v.sub(
+ chassis.local2World( rearJoint.getAnchr1() ),
+ rear.getPos() ) );
+
+ // Create the rear zero-length spring.
+ var rear_anchor = chassis.world2Local( rear.getPos() );
+ var rearSpring = new cp.DampedSpring( chassis, rear, rear_anchor, cp.vzero, 0, REAR_SPRING, REAR_DAMPING );
+
+ // Attach a slide joint to the wheel to limit it's range of motion.
+ var rearStrutLimit = new cp.SlideJoint( chassis, rear, rear_anchor, cp.vzero, 0, 20 );
+
+ // The main motor that drives the buggy.
+ var motor = new cp.SimpleMotor( chassis, rear, ENGINE_MAX_W );
+ motor.setMaxForce( 0.0 );
+
+ // I don't know if "differential" is the correct word, but it transfers a fraction of the rear torque to the front wheels.
+ // In case the rear wheels are slipping. This makes the buggy less frustrating when climbing steep hills.
+ var differential = new cp.SimpleMotor( rear, front, 0 );
+ differential.setMaxForce( ENGINE_MAX_TORQUE*DIFFERENTIAL_TORQUE );
+
+ // Wheel brakes.
+ // While you could reuse the main motor for the brakes, it's easier not to.
+ // It won't cause a performance issue to have too many extra motors unless you have hundreds of buggies in the game.
+ // Even then, the motor constraints would be the least of your performance worries.
+ var frontBrake = new cp.SimpleMotor( chassis, front, 0 );
+ frontBrake.setMaxForce( ROLLING_FRICTION );
+ var rearBrake = new cp.SimpleMotor( chassis, rear, 0 );
+ rearBrake.setMaxForce( ROLLING_FRICTION );
+
+ this._space.addConstraint( frontJoint );
+ this._space.addConstraint( rearJoint );
+ this._space.addConstraint( rearSpring );
+ this._space.addConstraint( motor );
+ this._space.addConstraint( differential );
+ this._space.addConstraint( frontBrake );
+ this._space.addConstraint( rearBrake );
+
+ this._motor = motor;
+ this._frontBrake = frontBrake;
+ this._rearBrake = rearBrake;
+ },
+
+ createWheel : function( pos ) {
+ var sprite = cc.PhysicsSprite.createWithSpriteFrameName("Wheel.png");
+ var radius = 0.95 * sprite.getContentSize().width / 2;
+
+ var body = new cp.Body(WHEEL_MASS, cp.momentForCircle(WHEEL_MASS, 0, radius, cp.vzero ) );
+ body.setPos( pos );
+ sprite.setBody( body.handle );
+
+ var shape = new cp.CircleShape( body, radius, cp.vzero );
+ shape.setFriction( 1 );
+ shape.setGroup( GROUP_BUGGY );
+ shape.setLayers( COLLISION_LAYERS_BUGGY );
+ shape.setCollisionType( COLLISION_TYPE_CAR );
+
+ this._space.addBody( body );
+ this._space.addShape( shape );
+ this._batch.addChild( sprite, Z_WHEEL);
+
+ return body;
+ },
+
+ createChassis : function(pos) {
+ var sprite = cc.PhysicsSprite.createWithSpriteFrameName("Chassis.png");
+ var anchor = cp.v.add( sprite.getAnchorPointInPoints(), COG_ADJUSTMENT );
+ var cs = sprite.getContentSize();
+ sprite.setAnchorPoint( cc.p(anchor.x / cs.width, anchor.y/cs.height) );
+
+ // XXX: Space Patrol uses a nice poly for the chassis.
+ // XXX: Add something similar here, instead of a boxed chassis
+
+ var body = new cp.Body( CHASSIS_MASS, cp.momentForBox(CHASSIS_MASS, cs.width, cs.height ) );
+ body.setPos( pos );
+ sprite.setBody( body.handle );
+
+ this._space.addBody( body );
+ this._batch.addChild( sprite, Z_CHASSIS );
+ this._carSprite = sprite;
+
+ // bottom of chassis
+ var shape = new cp.BoxShape( body, cs.width, 15 );
+ shape.setFriction(0.3);
+ shape.setGroup( GROUP_BUGGY );
+ shape.setLayers( COLLISION_LAYERS_BUGGY );
+ shape.setCollisionType( COLLISION_TYPE_CAR );
+
+ this._space.addShape( shape );
+
+ // box for fruits (left)
+ shape = new cp.BoxShape2( body, cp.bb(-50, 0, -46, 30) );
+ shape.setFriction(0.3);
+ shape.setGroup( GROUP_BUGGY );
+ shape.setLayers( COLLISION_LAYERS_BUGGY );
+ shape.setCollisionType( COLLISION_TYPE_CAR );
+ this._space.addShape( shape );
+
+ // box for fruits (right)
+ shape = new cp.BoxShape2( body, cp.bb(8, 0, 12, 30) );
+ shape.setFriction(0.3);
+ shape.setGroup( GROUP_BUGGY );
+ shape.setLayers( COLLISION_LAYERS_BUGGY );
+ shape.setCollisionType( COLLISION_TYPE_CAR );
+ this._space.addShape( shape );
+
+ return body;
+ },
+
+ createCarFruits : function(pos) {
+ // create some fruits
+ for(var i=0; i < 4;i++) {
+ var sprite = cc.PhysicsSprite.createWithSpriteFrameName("watermelon.png");
+ var radius = 0.95 * sprite.getContentSize().width / 2;
+
+ var body = new cp.Body(WATERMELON_MASS, cp.momentForCircle(WATERMELON_MASS, 0, radius, cp.vzero) );
+ body.setPos( pos );
+ sprite.setBody( body.handle );
+
+ var shape = new cp.CircleShape( body, radius, cp.vzero );
+ shape.setFriction( 1 );
+ shape.setCollisionType( COLLISION_TYPE_WATERMELON);
+
+ this._space.addShape( shape );
+ this._space.addBody( body );
+ this._batch.addChild( sprite, Z_WATERMELON );
+ }
+ },
+
+ createCoin: function( pos ) {
+ // coins are static bodies and sensors
+ var sprite = cc.PhysicsSprite.createWithSpriteFrameName("coin01.png");
+ var radius = 0.95 * sprite.getContentSize().width / 2;
+
+ var body = new cp.StaticBody();
+ body.setPos( pos );
+ sprite.setBody( body.handle );
+
+ var shape = new cp.CircleShape( body, radius, cp.vzero );
+ shape.setFriction( 1 );
+ shape.setGroup( GROUP_COIN );
+ shape.setCollisionType( COLLISION_TYPE_COIN );
+ shape.setSensor( true );
+
+ // rogue ("orphan") bodies, needs to be added to a container, otherwise they could be GC'd
+ this._rogueBodies.push( body );
+ this._space.addStaticShape( shape );
+ this._batch.addChild( sprite, Z_COIN);
+
+ var animation = cc.AnimationCache.getInstance().getAnimation("coin");
+ var animate = cc.Animate.create(animation);
+ var repeat = cc.RepeatForever.create( animate );
+ sprite.runAction( repeat );
+
+ // Needed for deletion
+ body.setUserData( sprite );
+
+ return body;
+ },
+
+ createFinish:function( pos ) {
+ var sprite = cc.PhysicsSprite.createWithSpriteFrameName("farmers-market.png");
+ var cs = sprite.getContentSize();
+ var body = new cp.StaticBody();
+ sprite.setBody( body.handle );
+ body.setPos( pos );
+
+
+ var shape = new cp.BoxShape( body, cs.width, cs.height );
+ shape.setCollisionType( COLLISION_TYPE_FINISH );
+ shape.setSensor( true );
+
+ // rogue ("orphan") bodies, needs to be added to a container, otherwise they could be GC'd
+ this._rogueBodies.push( body );
+ this._space.addStaticShape( shape );
+ this._batch.addChild( sprite, Z_FINISH);
+ },
+
+ createSegment: function( src, dst) {
+ var staticBody = this._space.getStaticBody();
+ var segment = new cp.SegmentShape( staticBody, src, dst, 5 );
+ segment.setElasticity(1);
+ segment.setFriction(1);
+ segment.setCollisionType(COLLISION_TYPE_FLOOR);
+ this._space.addStaticShape( segment );
+ },
+
+ //
+ // Game State
+ //
+
+ // call the 'deferred' option if you want to modify Chipmunk's state from a Chipmunk's callback
+ setGameStateDeferred: function( state ) {
+ this._deferredState = state;
+ },
+
+ setGameState: function( state ) {
+ if( state != this._state ) {
+
+ if( state == STATE_GAME_OVER )
+ this.displayGameOver();
+
+ else if (state == STATE_LEVEL_COMPLETE )
+ this.displayLevelComplete();
+
+ this._state = state;
+ }
+ this._deferredState = null;
+ },
+
+ displayLevelComplete:function() {
+ var legend = "";
+ var menu = null;
+ var item1 = null;
+
+ if( this._level+1 < levels.length ) {
+ cc.MenuItemFont.setFontSize(16 * sizeRatio );
+ item1 = cc.MenuItemFont.create("Next Level", this.onNextLevel, this);
+ menu = cc.Menu.create( item1 );
+ menu.alignItemsVertically();
+ this.addChild( menu, Z_DEBUG_MENU );
+ menu.setPosition( winSize.width/2, winSize.height/3 );
+
+ legend = "LEVEL COMPLETE";
+ } else {
+ cc.MenuItemFont.setFontSize(16 * sizeRatio );
+ item1 = cc.MenuItemFont.create("Main Menu", this.onMainMenu, this);
+ menu = cc.Menu.create( item1 );
+ menu.alignItemsVertically();
+ this.addChild( menu, Z_DEBUG_MENU );
+ menu.setPosition( winSize.width/2, winSize.height/3 );
+
+ legend = "GAME COMPLETE";
+ }
+
+ var label = cc.LabelBMFont.create(legend, "Abadi40.fnt" );
+ label.setPosition( centerPos );
+ label.setScale(0.2);
+ var sa = cc.ScaleTo.create(0.5, 1.05 );
+ var sb1 = cc.ScaleTo.create(0.5, 1 );
+ var sb2 = cc.ScaleTo.create(0.5, 1.05);
+ var seq = cc.Sequence.create( sb1, sb2 );
+ var rep = cc.Repeat.create( seq, 1000 );
+ var all = cc.Sequence.create( sa, rep );
+ label.runAction( all );
+ this.addChild( label, Z_LABEL );
+
+ this.enableEvents( false );
+ this.enableCollisionEvents( false );
+
+ audioEngine.playEffect("LevelComplete.wav");
+ },
+
+ displayGameOver:function() {
+ var label = cc.LabelBMFont.create("GAME OVER", "Abadi40.fnt" );
+ label.setPosition( centerPos );
+ this.addChild( label, Z_LABEL );
+ label.setScale(0.2);
+ var sa = cc.ScaleTo.create(0.5, 1.05 );
+ var sb1 = cc.ScaleTo.create(0.5, 1 );
+ var sb2 = cc.ScaleTo.create(0.5, 1.05);
+ var seq = cc.Sequence.create( sb1, sb2 );
+ var rep = cc.Repeat.create( seq, 1000 );
+ var all = cc.Sequence.create( sa, rep );
+ label.runAction( all );
+
+ this.enableEvents( false );
+ this.enableCollisionEvents( false );
+
+ audioEngine.playEffect("GameOver.wav");
+
+ cc.MenuItemFont.setFontSize(16 * sizeRatio );
+ var item1 = cc.MenuItemFont.create("Play Again", this.onRestart, this);
+ var item2 = cc.MenuItemFont.create("Main Menu", this.onMainMenu, this);
+ var menu = cc.Menu.create( item1, item2 );
+ menu.alignItemsVertically();
+ this.addChild( menu, Z_DEBUG_MENU );
+ menu.setPosition( winSize.width/2, winSize.height/3 );
+ },
+
+
+ //
+ // Helpers
+ //
+ enableEvents:function(enabled) {
+ var t = cc.config.platform;
+ if( t == 'browser' ) {
+ // this.setTouchEnabled(true);
+ // this.setKeyboardEnabled(true);
+ } else if( t == 'desktop' ) {
+ this.setMouseEnabled(true);
+ } else if( t == 'mobile' ) {
+ this.setTouchEnabled(true);
+ }
+ },
+
+ enableCollisionEvents:function(enabled) {
+ if( enabled ) {
+ // collision handler
+ this._space.addCollisionHandler( COLLISION_TYPE_CAR, COLLISION_TYPE_COIN, this.onCollisionBeginCoin.bind(this), null, null, null );
+ this._space.addCollisionHandler( COLLISION_TYPE_CAR, COLLISION_TYPE_FINISH, this.onCollisionBeginFinish.bind(this), null, null, null );
+ this._space.addCollisionHandler( COLLISION_TYPE_FLOOR, COLLISION_TYPE_WATERMELON, this.onCollisionBeginWatermelon.bind(this), null, null, null );
+ } else {
+ this._space.removeCollisionHandler( COLLISION_TYPE_FLOOR, COLLISION_TYPE_WATERMELON );
+ this._space.removeCollisionHandler( COLLISION_TYPE_COIN, COLLISION_TYPE_CAR );
+ this._space.removeCollisionHandler( COLLISION_TYPE_FINISH, COLLISION_TYPE_CAR );
+ }
+ }
+
+});
+
+//
+// Boot Layer
+//
+var BootLayer = cc.Layer.extend({
+
+ ctor:function () {
+ cc.associateWithNative(this, cc.Layer);
+ this.init();
+
+ // music
+ audioEngine.playMusic("game-music.mp3");
+ audioEngine.preloadEffect("pickup_coin.wav");
+
+ var cache = cc.SpriteFrameCache.getInstance();
+ cache.addSpriteFrames( "coins.plist" );
+
+ __jsc__.dumpRoot();
+ __jsc__.garbageCollect();
+ },
+
+ onEnter:function() {
+ var scene = cc.Reader.loadAsScene("MainMenu.ccbi");
+ director.replaceScene( scene );
+ }
+});
+
+//
+// Main Menu
+//
+
+// 'MenuLayerController' class is instantiated by CocosBuilder Reader
+var MenuLayerController = function() {};
+
+// callback triggered by CCB Reader once the instance is created
+MenuLayerController.prototype.onDidLoadFromCCB = function()
+{
+ // Spin the 'o' in the title
+ var o = this.titleLabel.getChildByTag( 8 );
+
+ var a_delay = cc.DelayTime.create(6);
+ var a_tint = cc.TintTo.create( 0.5, 0, 255, 0 );
+ var a_rotate = cc.RotateBy.create( 4, 360 );
+ var a_rep = cc.Repeat.create( a_rotate, 1000 );
+ var a_seq = cc.Sequence.create( a_delay, a_tint, a_delay.copy(), a_rep );
+ o.runAction( a_seq );
+};
+
+// callbacks for the menu, defined in the editor
+MenuLayerController.prototype.onPlay = function()
+{
+ var scene = cc.Scene.create();
+ var layer = new GameLayer(0);
+ scene.addChild( layer );
+ director.replaceScene( cc.TransitionFade.create(1, scene) );
+};
+
+MenuLayerController.prototype.onOptions = function()
+{
+ var scene = cc.Scene.create();
+ var layer = new OptionsLayer();
+ scene.addChild( layer );
+ director.replaceScene( cc.TransitionFlipY.create(1, scene) );
+};
+
+MenuLayerController.prototype.onAbout = function()
+{
+ /*var scene = cc.Scene.create();
+ var layer = new AboutLayer();
+ scene.addChild( layer );*/
+ var scene = cc.Reader.loadAsScene("About.ccbi");
+ director.replaceScene( cc.TransitionZoomFlipY.create(1, scene) );
+};
+
+//
+// About
+//
+var AboutLayerController = function() {};
+
+AboutLayerController.prototype.onDidLoadFromCCB = function()
+{
+ var back = cc.MenuItemFont.create("Back", this.onBack, this );
+ back.setColor( cc.BLACK );
+ var menu = cc.Menu.create( back );
+ this.rootNode.addChild( menu );
+ menu.zOrder = 100;
+ menu.alignItemsVertically();
+ menu.setPosition( winSize.width - 50, 50 );
+};
+
+AboutLayerController.prototype.onBack = function()
+{
+ var scene = cc.Reader.loadAsScene("MainMenu.ccbi");
+ director.replaceScene( scene );
+};
+
+//
+// Options
+//
+var OptionsLayer = cc.LayerGradient.extend({
+
+ ctor:function () {
+ cc.associateWithNative(this, cc.LayerGradient);
+ this.init(cc.c4b(0, 0, 0, 255), cc.c4b(255, 255, 255, 255));
+
+ var label1 = cc.LabelBMFont.create("MUSIC ON", "konqa32.fnt" );
+ var item1 = cc.MenuItemLabel.create(label1);
+ var label2 = cc.LabelBMFont.create("MUSIC OFF", "konqa32.fnt" );
+ var item2 = cc.MenuItemLabel.create(label2);
+ var toggle = cc.MenuItemToggle.create( item1, item2 );
+ toggle.setCallback(this.onMusicToggle, this);
+
+ var back = cc.MenuItemFont.create("Back", this.onBack, this );
+ var menu = cc.Menu.create( toggle, back );
+ this.addChild( menu );
+ menu.alignItemsVertically();
+ menu.setPosition( centerPos );
+
+ __jsc__.dumpRoot();
+ __jsc__.garbageCollect();
+ },
+
+ onBack:function( sender) {
+ var scene = cc.Reader.loadAsScene("MainMenu.ccbi");
+ director.replaceScene( scene );
+ },
+
+ onMusicToggle:function( sender ) {
+ // music
+ if ( audioEngine.isMusicPlaying() ) {
+ audioEngine.stopMusic();
+ } else {
+ audioEngine.playMusic("game-music.mp3");
+ }
+ }
+});
+
+//------------------------------------------------------------------
+//
+// Main entry point
+//
+//------------------------------------------------------------------
+function run()
+{
+ // update globals
+ winSize = director.getWinSize();
+ centerPos = cc.p( winSize.width/2, winSize.height/2 );
+
+ var scene = cc.Scene.create();
+
+ // main menu
+ var menu = new BootLayer();
+ scene.addChild( menu);
+
+ var runningScene = director.getRunningScene();
+ if( runningScene === null )
+ director.runWithScene( scene );
+ else
+ director.replaceScene( cc.TransitionFade.create(0.5, scene ) );
+}
+
+run();
+