From 12292afee605ddf4d219d06e9e09653df0d04716 Mon Sep 17 00:00:00 2001 From: Rohan Kuruvilla Date: Tue, 9 Oct 2012 14:59:16 -0700 Subject: [PATCH 01/19] Adding CCSchedule bindings. Also adding CCOrbitCamera bindings and modifying cocos2dx.ini --- .../javascript/bindings/ScriptingCore.cpp | 25 ++ scripting/javascript/bindings/ScriptingCore.h | 2 + .../javascript/bindings/cocos2d_specifics.cpp | 218 +++++++++++++++++- .../javascript/bindings/cocos2d_specifics.hpp | 51 ++++ tools/tojs/cocos2dx.ini | 8 +- 5 files changed, 296 insertions(+), 8 deletions(-) diff --git a/scripting/javascript/bindings/ScriptingCore.cpp b/scripting/javascript/bindings/ScriptingCore.cpp index b4c6878578..08357e029f 100644 --- a/scripting/javascript/bindings/ScriptingCore.cpp +++ b/scripting/javascript/bindings/ScriptingCore.cpp @@ -462,6 +462,29 @@ JSBool ScriptingCore::removeRootJS(JSContext *cx, uint32_t argc, jsval *vp) return JS_FALSE; } +void ScriptingCore::pauseSchedulesAndActions(CCNode *node) { + + CCArray * arr = JSSchedule::getTargetForNativeNode(node); + if(! arr) return; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(arr->objectAtIndex(i)) { + node->getScheduler()->pauseTarget(arr->objectAtIndex(i)); + } + } +} + + +void ScriptingCore::resumeSchedulesAndActions(CCNode *node) { + + CCArray * arr = JSSchedule::getTargetForNativeNode(node); + if(!arr) return; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(!arr->objectAtIndex(i)) continue; + node->getScheduler()->resumeTarget(arr->objectAtIndex(i)); + } +} + + int ScriptingCore::executeNodeEvent(CCNode* pNode, int nAction) { js_proxy_t * p; @@ -477,10 +500,12 @@ int ScriptingCore::executeNodeEvent(CCNode* pNode, int nAction) if(nAction == kCCNodeOnEnter) { executeJSFunctionWithName(this->cx, p->obj, "onEnter", dataVal, retval); + resumeSchedulesAndActions(pNode); } else if(nAction == kCCNodeOnExit) { executeJSFunctionWithName(this->cx, p->obj, "onExit", dataVal, retval); + pauseSchedulesAndActions(pNode); } else if(nAction == kCCNodeOnEnterTransitionDidFinish) { diff --git a/scripting/javascript/bindings/ScriptingCore.h b/scripting/javascript/bindings/ScriptingCore.h index b3cc01dfe3..4cf47360cf 100644 --- a/scripting/javascript/bindings/ScriptingCore.h +++ b/scripting/javascript/bindings/ScriptingCore.h @@ -57,6 +57,8 @@ public: @return other if the string is excuted wrongly. */ virtual int executeString(const char* codes) { return 0; } + void pauseSchedulesAndActions(CCNode *node); + void resumeSchedulesAndActions(CCNode *node); /** @brief Execute a script file. diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp b/scripting/javascript/bindings/cocos2d_specifics.cpp index db3e0ec738..9766c99bf0 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp @@ -2,6 +2,9 @@ #include "cocos2d_specifics.hpp" #include +schedFunc_proxy_t *_schedFunc_target_ht = NULL; +schedTarget_proxy_t *_schedTarget_native_ht = NULL; + void JSTouchDelegate::setJSObject(JSObject *obj) { _mObj = obj; } @@ -395,14 +398,14 @@ JSBool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { JS_ValueToNumber(cx, argv[1], &arg1); } - ret = cocos2d::CCAnimation::create(arg0, arg1); - } else if (argc > 0) { + ret = cocos2d::CCAnimation::createWithSpriteFrames(arg0, arg1); + } else if (argc == 3) { unsigned int loops; JS_ValueToNumber(cx, argv[1], &arg1); JS_ValueToECMAUint32(cx, argv[1], &loops); ret = cocos2d::CCAnimation::create(arg0, arg1, loops); - } else if (argc == 0) { - ret = cocos2d::CCAnimation::create(); + } else if (argc == 1) { + ret = cocos2d::CCAnimation::createWithSpriteFrames(arg0); } jsval jsret; if (ret) { @@ -567,6 +570,205 @@ JSBool js_callFunc(JSContext *cx, uint32_t argc, jsval *vp) return JS_TRUE; } + +void JSSchedule::setTargetForSchedule(jsval sched, JSSchedule *target) { + do { + schedFunc_proxy_t *p = (schedFunc_proxy_t *)malloc(sizeof(schedFunc_proxy_t)); + assert(p); + p->ptr = (void *)JSVAL_TO_OBJECT(sched); + p->obj = target; + HASH_ADD_PTR(_schedFunc_target_ht, ptr, p); + } while(0); +} + +JSSchedule * JSSchedule::getTargetForSchedule(jsval sched) { + schedFunc_proxy_t *t; + JSObject *o = JSVAL_TO_OBJECT(sched); + HASH_FIND_PTR(_schedFunc_target_ht, &o, t); + return t->obj; +} + + +void JSSchedule::setTargetForNativeNode(CCNode *pNode, JSSchedule *target) { + schedTarget_proxy_t *t; + HASH_FIND_PTR(_schedTarget_native_ht, &pNode, t); + + CCArray *arr; + if(!t) { + arr = new CCArray(); + } else { + arr = t->obj; + } + + arr->addObject(target); + + schedTarget_proxy_t *p = (schedTarget_proxy_t *)malloc(sizeof(schedTarget_proxy_t)); + assert(p); + p->ptr = (void *)pNode; + p->obj = arr; + HASH_ADD_PTR(_schedTarget_native_ht, ptr, p); +} + +CCArray * JSSchedule::getTargetForNativeNode(CCNode *pNode) { + + schedTarget_proxy_t *t; + HASH_FIND_PTR(_schedTarget_native_ht, &pNode, t); + if(!t) { + return NULL; + } + return t->obj; + +} + +void JSSchedule::setJSScheduleFunc(jsval func) { + jsSchedule = func; +} + +void JSSchedule::setJSScheduleThis(jsval thisObj) { + jsThisObj = thisObj; +} + + + +JSBool js_CCNode_unschedule(JSContext *cx, uint32_t argc, jsval *vp) +{ + + if (argc == 1) { + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + + if(!node) return JS_FALSE; + + CCScheduler *sched = node->getScheduler(); + + JSSchedule *tmpCobj = JSSchedule::getTargetForSchedule(argv[0]); + + sched->unscheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + } + return JS_TRUE; +} + + + +JSBool js_CCNode_scheduleOnce(JSContext *cx, uint32_t argc, jsval *vp) +{ + + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + + CCScheduler *sched = node->getScheduler(); + + JSSchedule *tmpCobj = new JSSchedule(); + + + // + // delay + // + double interval; + if( argc >= 2 ) { + if( ! JS_ValueToNumber(cx, argv[1], &interval ) ) + return JS_FALSE; + } + + tmpCobj->setJSScheduleThis(OBJECT_TO_JSVAL(obj)); + tmpCobj->setJSScheduleFunc(argv[0]); + + JSSchedule::setTargetForSchedule(argv[0], tmpCobj); + JSSchedule::setTargetForNativeNode(node, tmpCobj); + + if(argc == 1) { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, 0, node->isRunning(), 0, 0); + } else { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, interval, node->isRunning(), 0, 0); + } + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + } + return JS_TRUE; +} + + + +JSBool js_CCNode_schedule(JSContext *cx, uint32_t argc, jsval *vp) +{ + + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + + CCScheduler *sched = node->getScheduler(); + + JSSchedule *tmpCobj = new JSSchedule(); + + double interval; + if( argc >= 2 ) { + if( ! JS_ValueToNumber(cx, argv[1], &interval ) ) + return JS_FALSE; + } + + // + // repeat + // + double repeat; + if( argc >= 3 ) { + if( ! JS_ValueToNumber(cx, argv[2], &repeat ) ) + return JS_FALSE; + } + + // + // delay + // + double delay; + if( argc >= 4 ) { + if( ! JS_ValueToNumber(cx, argv[3], &delay ) ) + return JS_FALSE; + } + + tmpCobj->setJSScheduleThis(OBJECT_TO_JSVAL(obj)); + tmpCobj->setJSScheduleFunc(argv[0]); + + JSSchedule::setTargetForSchedule(argv[0], tmpCobj); + JSSchedule::setTargetForNativeNode(node, tmpCobj); + + if(argc == 1) { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, 0, node->isRunning()); + } if(argc == 2) { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, interval, node->isRunning()); + } if(argc == 3) { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, 0, node->isRunning(), repeat, 0); + } if (argc == 4) { + sched->scheduleSelector(schedule_selector(JSSchedule::scheduleFunc), tmpCobj, 0, node->isRunning(), repeat, delay); + + } + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + } + return JS_TRUE; +} + + + +JSBool js_doNothing(JSContext *cx, uint32_t argc, jsval *vp) { + return JS_TRUE; +} + + + JSBool js_forceGC(JSContext *cx, uint32_t argc, jsval *vp) { JSRuntime *rt = JS_GetRuntime(cx); JS_GC(rt); @@ -653,6 +855,13 @@ void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) JSObject *tmpObj; JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "getChildren", js_cocos2dx_CCNode_getChildren, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "onExit", js_doNothing, 1, JSPROP_ENUMERATE | JSPROP_SHARED | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "onEnter", js_doNothing, 1, JSPROP_ENUMERATE | JSPROP_SHARED | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "schedule", js_CCNode_schedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "scheduleOnce", js_CCNode_scheduleOnce, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "unschedule", js_CCNode_unschedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCAction_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); @@ -666,6 +875,7 @@ void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) JS_DefineFunction(cx, js_cocos2dx_CCMenuItem_prototype, "setCallback", js_cocos2dx_setCallback, 2, JSPROP_READONLY | JSPROP_PERMANENT); tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Node.prototype; })()")); JS_DefineFunction(cx, tmpObj, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "schedule", js_CCNode_schedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Menu; })()")); JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenu_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItem; })()")); diff --git a/scripting/javascript/bindings/cocos2d_specifics.hpp b/scripting/javascript/bindings/cocos2d_specifics.hpp index 98d47f3324..fcdb5a7838 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.hpp +++ b/scripting/javascript/bindings/cocos2d_specifics.hpp @@ -85,6 +85,57 @@ private: jsval *extraData; }; +class JSSchedule; + +typedef struct jsScheduleFunc_proxy { + void * ptr; + JSSchedule *obj; + UT_hash_handle hh; +} schedFunc_proxy_t; + +typedef struct jsScheduleTarget_proxy { + void * ptr; + CCArray *obj; + UT_hash_handle hh; +} schedTarget_proxy_t; + + +extern schedFunc_proxy_t *_schedFunc_target_ht; +extern schedTarget_proxy_t *_schedTarget_native_ht; + +class JSSchedule: public CCObject { + +public: + JSSchedule(jsval func): jsSchedule(func) {} + JSSchedule() {} + ~JSSchedule(){} + + static void setTargetForSchedule(jsval sched, JSSchedule *target); + static JSSchedule * getTargetForSchedule(jsval sched); + static void setTargetForNativeNode(CCNode *pNode, JSSchedule *target); + static CCArray * getTargetForNativeNode(CCNode *pNode); + + void setJSScheduleFunc(jsval obj); + void setJSScheduleThis(jsval thisObj); + + void pause(); + + void scheduleFunc(CCNode *node) const { + + jsval retObj = JSVAL_NULL; + ScriptingCore::getInstance()->executeJSFunctionWithThisObj(jsThisObj, + jsSchedule, + retObj); + + } +private: + + jsval jsSchedule; + jsval jsThisObj; + +}; + + class JSTouchDelegate: public CCTouchDelegate, public CCNode { public: void setJSObject(JSObject *obj); diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index f444f2336b..8904ec1988 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/inc # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^CCMenu*$". -classes = CCSprite.* CCScene CCNode CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCSequence CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet SimpleAudioEngine +classes = CCSprite.* CCScene CCNode CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCSequence CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -34,9 +34,9 @@ classes = CCSprite.* CCScene CCNode CCDirector CCLayer.* CCMenu.* CCTouch CC.*Ac # add a single "*" as functions. See bellow for several examples. A special class name is "*", which # will apply to all class names. This is a convenience wildcard to be able to skip similar named # functions from all classes. -skip = CCNode::[.*Transform convertToWindowSpace getChildren getGrid setGLServerState description getActionManager getCamera getShaderProgram getUserObject .*UserData getGLServerState], +skip = CCNode::[.*Transform convertToWindowSpace getChildren getGrid setGLServerState description getCamera getShaderProgram getUserObject .*UserData getGLServerState], CCSprite::[getQuad displayFrame getTexture getBlendFunc setBlendFunc getTextureAtlas setSpriteBatchNode getSpriteBatchNode], - CCDirector::[getAccelerometer getKeypadDispatcher getTouchDispatcher getActionManager setWatcherCallbackFun getOpenGLView getScheduler getProjection], + CCDirector::[getAccelerometer getKeypadDispatcher getTouchDispatcher setWatcherCallbackFun getOpenGLView getScheduler getProjection], CCLayer.*::[didAccelerate (g|s)etBlendFunc], CCMenu.*::[.*Target getSubItems create alignItemsInColumns initWithItems alignItemsInRows], CCMenuItem.*::[create], @@ -86,7 +86,7 @@ skip = CCNode::[.*Transform convertToWindowSpace getChildren getGrid setGLServer *::[copyWith.* onEnter.* onExit.* description getObjectType .*RGB.* .*HSV.*] rename_functions = CCDirector::[sharedDirector=getInstance], - CCSpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame], + CCSpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY], CCMenuItemFont::[setFontNameObj=setFontName setFontSizeObj=setFontSize fontSizeObj=fontSize fontNameObj=fontName], CCProgressTimer::[setReverseProgress=setReverseDirection], CCTextureCache::[sharedTextureCache=getInstance], From 66d843ce389a7c4d4f5f9fdbdcaa700a61ef8ec3 Mon Sep 17 00:00:00 2001 From: folecr Date: Tue, 9 Oct 2012 12:20:40 -0700 Subject: [PATCH 02/19] Jenkins script for auto-generating and committing JS bindings. --- .../mac/android/generate-js-cxx-bindings.sh | 83 ++++++++++++++++--- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh index ad6c5c9f33..3f1aead81f 100755 --- a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh +++ b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh @@ -2,24 +2,87 @@ # Generate JS bindings for Cocos2D-X # ... using Android NDK system headers +# ... and automatically update submodule references +# ... and push these changes to remote repos -# Dependencies (see ../../../tojs/genbindings.sh +# Dependencies +# +# For bindings generator: +# (see ../../../tojs/genbindings.sh # ... for the defaults used if the environment is not customized) # # * $PYTHON_BIN # * $CLANG_ROOT # * $NDK_ROOT +# +# For automatically pushing changes: +# +# * REMOTE_COCOS2DX_REPOSITORY +# * REMOTE_AUTOGEN_BINDINGS_REPOSITORY +# * Ensure you have ssh access to above repositories -compileresult=0 +# Exit on error +set -e + +if [ -z "${REMOTE_COCOS2DX_REPOSITORY+aaa}" ]; then + echo Environment variable must be set REMOTE_COCOS2DX_REPOSITORY +# example +# REMOTE_COCOS2DX_REPOSITORY="git@github.com:cocos2d/cocos2d-x.git" +# REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2d-x" + exit 1 +fi + +if [ -z "${REMOTE_AUTOGEN_BINDINGS_REPOSITORY+aaa}" ]; then + echo Environment variable must be set REMOTE_AUTOGEN_BINDINGS_REPOSITORY +# example +# REMOTE_COCOS2DX_REPOSITORY="git@github.com:folecr/cocos2dx-autogen-bindings.git" +# REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2dx-autogen-bindings" + exit 1 +fi + +if [ -z "${COMMITTAG+aaa}" ]; then +# ... if COMMITTAG is not set, use this machine's hostname + COMMITTAG=`hostname -s` +fi +echo Using "'$COMMITTAG'" in the commit messages + +ELAPSEDSECS=`date +%s` +echo Using "$ELAPSEDSECS" in the branch names for pseudo-uniqueness + +GENERATED_BRANCH=autogeneratedbindings_"$ELAPSEDSECS" +COCOS_BRANCH=updategeneratedsubmodule_"$ELAPSEDSECS" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -COCOS2DX_ROOT="$DIR"/../../../../ /bin/bash ../../../tojs/genbindings.sh +COCOS2DX_ROOT="$DIR"/../../../.. +GENERATED_GITDIR="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated/.git +GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated -compileresult=$[$compileresult+$?] +# git command shortcut +gitcmd_GEN="git --git-dir=$GENERATED_GITDIR --work-tree=$GENERATED_WORKTREE" -# return the compileresult. -if [ $compileresult != 0 ]; then - exit 1 -else - exit 0 -fi +# testing... +${gitcmd_GEN} status + +# 1. Generate JS bindings +COCOS2DX_ROOT="$COCOS2DX_ROOT" /bin/bash ../../../tojs/genbindings.sh + +# 2. In JSBindings repo, Check out a branch named "autogeneratedbindings" and commit the auto generated bindings to it +${gitcmd_GEN} add README cocos2dx.cpp cocos2dx.hpp cocos2dxapi.js +${gitcmd_GEN} checkout origin/master -b "$GENERATED_BRANCH" +${gitcmd_GEN} commit -m "$COMMITTAG : autogenerated bindings" + +# 3. In JSBindings repo, Push the commit with generated bindings to "master" of the auto generated bindings repository +${gitcmd_GEN} push "$REMOTE_AUTOGEN_BINDINGS_REPOSITORY" "$GENERATED_BRANCH":master + +pushd "${DIR}" + +# 4. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings +cd "${COCOS2DX_ROOT}" +git add scripting/javascript/bindings/generated +git checkout origin/gles20 -b "$COCOS_BRANCH" +git commit -m "$COMMITTAG : updating submodule reference to latest autogenerated bindings" + +# 5. In Cocos2D-X repo, Push the commit with updated submodule to "gles20" of the cocos2d-x repository +git push "$REMOTE_COCOS2DX_REPOSITORY" "$COCOS_BRANCH":gles20 + +popd From 96b3232910d08d4f7e4788d06d83bcc29bd8e60b Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 10 Oct 2012 11:36:02 +0800 Subject: [PATCH 03/19] fixed #1500:make rendertexture work ok on certain Qualcomm Andreno gpu --- cocos2dx/misc_nodes/CCRenderTexture.cpp | 62 +++++++++++++++++++------ cocos2dx/misc_nodes/CCRenderTexture.h | 1 + 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index bed3dae646..12f2c2d432 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -49,6 +49,7 @@ CCRenderTexture::CCRenderTexture() , m_uDepthRenderBufffer(0) , m_nOldFBO(0) , m_pTexture(0) +, m_pTextureCopy(0) , m_pUITextureImage(NULL) , m_ePixelFormat(kCCTexture2DPixelFormat_RGBA8888) { @@ -62,6 +63,8 @@ CCRenderTexture::CCRenderTexture() CCRenderTexture::~CCRenderTexture() { + CC_SAFE_RELEASE(m_pTextureCopy); + glDeleteFramebuffers(1, &m_uFBO); if (m_uDepthRenderBufffer) { @@ -168,6 +171,7 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma CCAssert(m_ePixelFormat != kCCTexture2DPixelFormat_A8, "only RGB and RGBA formats are valid for a render texture"); bool bRet = false; + void *data = NULL; do { w *= (int)CC_CONTENT_SCALE_FACTOR(); @@ -179,30 +183,47 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma unsigned int powW = 0; unsigned int powH = 0; - if( CCConfiguration::sharedConfiguration()->supportsNPOT() ) { + if (CCConfiguration::sharedConfiguration()->supportsNPOT()) + { powW = w; powH = h; - } else { + } + else + { powW = ccNextPOT(w); powH = ccNextPOT(h); } - void *data = malloc((int)(powW * powH * 4)); + data = malloc((int)(powW * powH * 4)); CC_BREAK_IF(! data); memset(data, 0, (int)(powW * powH * 4)); m_ePixelFormat = eFormat; m_pTexture = new CCTexture2D(); - if (m_pTexture) { - m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h)); - free( data ); - } else { - free( data ); // ScopeGuard (a simulated Finally clause) would be more elegant. - break; + if (m_pTexture) + { + m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h)); + } + else + { + break; } GLint oldRBO; glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRBO); + + if (CCConfiguration::sharedConfiguration()->checkForGLExtension("GL_QCOM")) + { + m_pTextureCopy = new CCTexture2D(); + if (m_pTextureCopy) + { + m_pTextureCopy->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h)); + } + else + { + break; + } + } // generate FBO glGenFramebuffers(1, &m_uFBO); @@ -221,10 +242,11 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma // if depth format is the one with stencil part, bind same render buffer as stencil attachment if (uDepthStencilFormat == CC_GL_DEPTH24_STENCIL8) + { glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_uDepthRenderBufffer); + } } - // check if it worked (probably worth doing :) ) CCAssert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Could not attach texture to framebuffer"); @@ -243,8 +265,10 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma glBindFramebuffer(GL_FRAMEBUFFER, m_nOldFBO); bRet = true; } while (0); - return bRet; + CC_SAFE_DELETE(data); + + return bRet; } void CCRenderTexture::begin() @@ -271,6 +295,17 @@ void CCRenderTexture::begin() glGetIntegerv(GL_FRAMEBUFFER_BINDING, &m_nOldFBO); glBindFramebuffer(GL_FRAMEBUFFER, m_uFBO); + + /* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of CCRenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. + */ + if (CCConfiguration::sharedConfiguration()->checkForGLExtension("GL_QCOM")) + { + // -- bind a temporary texture so we can clear the render buffer without losing our texture + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_pTextureCopy->getName(), 0); + CHECK_GL_ERROR_DEBUG(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_pTexture->getName(), 0); + } } void CCRenderTexture::beginWithClear(float r, float g, float b, float a) @@ -444,7 +479,6 @@ CCImage* CCRenderTexture::newCCImage() { CC_BREAK_IF(! (pBuffer = new GLubyte[nSavedBufferWidth * nSavedBufferHeight * 4])); - if(! (pTempData = new GLubyte[nSavedBufferWidth * nSavedBufferHeight * 4])) { delete[] pBuffer; @@ -462,8 +496,8 @@ CCImage* CCRenderTexture::newCCImage() for (int i = 0; i < nSavedBufferHeight; ++i) { memcpy(&pBuffer[i * nSavedBufferWidth * 4], - &pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4], - nSavedBufferWidth * 4); + &pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4], + nSavedBufferWidth * 4); } pImage->initWithImageData(pBuffer, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8); diff --git a/cocos2dx/misc_nodes/CCRenderTexture.h b/cocos2dx/misc_nodes/CCRenderTexture.h index 22d9ae8c0b..32bc44cf4d 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.h +++ b/cocos2dx/misc_nodes/CCRenderTexture.h @@ -147,6 +147,7 @@ protected: GLuint m_uDepthRenderBufffer; GLint m_nOldFBO; CCTexture2D* m_pTexture; + CCTexture2D* m_pTextureCopy; // a copy of m_pTexture CCImage* m_pUITextureImage; GLenum m_ePixelFormat; }; From d8b0c75675ae765162f0d2e0c59e5d2ce8ae34cc Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 10 Oct 2012 12:02:56 +0800 Subject: [PATCH 04/19] fixed #1500:fix a memory leak --- cocos2dx/misc_nodes/CCRenderTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 12f2c2d432..68e63e45f9 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -266,7 +266,7 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma bRet = true; } while (0); - CC_SAFE_DELETE(data); + CC_SAFE_FREE(data); return bRet; } From 12d711a13ea090c1bba7c2557aa2d1d0922ccd3b Mon Sep 17 00:00:00 2001 From: folecr Date: Tue, 9 Oct 2012 21:18:58 -0700 Subject: [PATCH 05/19] Update to latest generated JS bindings --- scripting/javascript/bindings/generated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/javascript/bindings/generated b/scripting/javascript/bindings/generated index bb14056784..53bcda70b1 160000 --- a/scripting/javascript/bindings/generated +++ b/scripting/javascript/bindings/generated @@ -1 +1 @@ -Subproject commit bb14056784ea0d3ab3f30ae5a86c1bd3ad483703 +Subproject commit 53bcda70b188533548b70cb957bb2419d96f4453 From e6622eebd0d465e2adb647768de0a8f9a39035ec Mon Sep 17 00:00:00 2001 From: folecr Date: Tue, 9 Oct 2012 21:36:32 -0700 Subject: [PATCH 06/19] Allow partial run of script when cocos2dx remote repository is not set. * Also fix some comments. --- .../mac/android/generate-js-cxx-bindings.sh | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh index 3f1aead81f..a3c6f52d39 100755 --- a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh +++ b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh @@ -24,19 +24,11 @@ # Exit on error set -e -if [ -z "${REMOTE_COCOS2DX_REPOSITORY+aaa}" ]; then - echo Environment variable must be set REMOTE_COCOS2DX_REPOSITORY -# example -# REMOTE_COCOS2DX_REPOSITORY="git@github.com:cocos2d/cocos2d-x.git" -# REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2d-x" - exit 1 -fi - if [ -z "${REMOTE_AUTOGEN_BINDINGS_REPOSITORY+aaa}" ]; then echo Environment variable must be set REMOTE_AUTOGEN_BINDINGS_REPOSITORY # example -# REMOTE_COCOS2DX_REPOSITORY="git@github.com:folecr/cocos2dx-autogen-bindings.git" -# REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2dx-autogen-bindings" +# REMOTE_AUTOGEN_BINDINGS_REPOSITORY="git@github.com:folecr/cocos2dx-autogen-bindings.git" +# REMOTE_AUTOGEN_BINDINGS_REPOSITORY="$HOME/test/cocos2dx-autogen-bindings" exit 1 fi @@ -74,6 +66,14 @@ ${gitcmd_GEN} commit -m "$COMMITTAG : autogenerated bindings" # 3. In JSBindings repo, Push the commit with generated bindings to "master" of the auto generated bindings repository ${gitcmd_GEN} push "$REMOTE_AUTOGEN_BINDINGS_REPOSITORY" "$GENERATED_BRANCH":master +if [ -z "${REMOTE_COCOS2DX_REPOSITORY+aaa}" ]; then + echo Environment variable must be set REMOTE_COCOS2DX_REPOSITORY +# example +# REMOTE_COCOS2DX_REPOSITORY="git@github.com:cocos2d/cocos2d-x.git" +# REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2d-x" + exit 1 +fi + pushd "${DIR}" # 4. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings From d03ff0616ab19b527eb9b4d6ff1a077938761018 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 14:50:04 +0800 Subject: [PATCH 07/19] issue #1469: Added MoonWarriors sources and made it works on windows. --- samples/MoonWarriors/Classes/AppDelegate.cpp | 83 ++ samples/MoonWarriors/Classes/AppDelegate.h | 45 + .../MoonWarriors/MoonWarriors-html5.js | 69 + .../MoonWarriors/MoonWarriors-native.js | 69 + .../res/Music/bgMusic.mp3.REMOVED.git-id | 1 + .../Music/mainMainMusic.mp3.REMOVED.git-id | 1 + .../MoonWarriors/res/arial-14.GlyphProject | Bin 0 -> 3188 bytes .../MoonWarriors/res/b01.png.REMOVED.git-id | 1 + .../res/explosion.png.REMOVED.git-id | 1 + .../res/loading.png.REMOVED.git-id | 1 + .../Resources/MoonWarriors/src/AboutLayer.js | 47 + .../Resources/MoonWarriors/src/Bullet.js | 62 + .../Resources/MoonWarriors/src/Effect.js | 78 + .../Resources/MoonWarriors/src/Enemy.js | 75 + .../Resources/MoonWarriors/src/Explosion.js | 38 + .../MoonWarriors/src/GameControlMenu.js | 35 + .../MoonWarriors/src/GameController.js | 70 + .../Resources/MoonWarriors/src/GameLayer.js | 315 +++++ .../Resources/MoonWarriors/src/GameOver.js | 83 ++ .../MoonWarriors/src/LevelManager.js | 99 ++ .../Resources/MoonWarriors/src/Resource.js | 89 ++ .../MoonWarriors/src/SettingsLayer.js | 85 ++ .../Resources/MoonWarriors/src/Ship.js | 128 ++ .../Resources/MoonWarriors/src/SysMenu.js | 110 ++ .../MoonWarriors/src/config/EnemyType.js | 56 + .../MoonWarriors/src/config/GameConfig.js | 94 ++ .../MoonWarriors/src/config/Level.js | 49 + .../Resources/jshelper/jsb_constants.js | 475 +++++++ .../Resources/jshelper/jsb_constants_gl.js | 23 + samples/MoonWarriors/proj.android/.classpath | 8 + samples/MoonWarriors/proj.android/.project | 40 + .../proj.android/AndroidManifest.xml | 28 + .../MoonWarriors/proj.android/ant.properties | 1 + samples/MoonWarriors/proj.android/build.xml | 92 ++ .../MoonWarriors/proj.android/build_native.sh | 100 ++ .../MoonWarriors/proj.android/jni/Android.mk | 28 + .../proj.android/jni/Application.mk | 3 + .../proj.android/jni/testjavascript/main.cpp | 45 + .../proj.android/proguard-project.txt | 20 + .../proj.android/project.properties | 13 + .../proj.android/res/values/strings.xml | 4 + .../testjavascript/TestJavascript.java | 39 + samples/MoonWarriors/proj.ios/AppController.h | 17 + .../MoonWarriors/proj.ios/AppController.mm | 119 ++ .../Default-568h@2x.png.REMOVED.git-id | 1 + .../proj.ios/Default@2x.png.REMOVED.git-id | 1 + .../MoonWarriors.xcodeproj/project.pbxproj | 1254 +++++++++++++++++ samples/MoonWarriors/proj.ios/Prefix.pch | 8 + .../proj.ios/RootViewController.h | 33 + .../proj.ios/RootViewController.mm | 73 + samples/MoonWarriors/proj.ios/main.m | 17 + .../proj.win32/MoonWarriors.vcproj | 295 ++++ .../proj.win32/TestJavascript.vcproj.user | 23 + .../proj.win32/TestJavascript.vcxproj | 186 +++ .../proj.win32/TestJavascript.vcxproj.filters | 110 ++ .../proj.win32/TestJavascript.vcxproj.user | 11 + samples/MoonWarriors/proj.win32/main.cpp | 37 + samples/MoonWarriors/proj.win32/main.h | 13 + .../MoonWarriors/proj.win32/res/testjs.ico | Bin 0 -> 47629 bytes samples/MoonWarriors/proj.win32/resource.h | 20 + samples/MoonWarriors/proj.win32/testjs.rc | 86 ++ .../MoonWarriors/MoonWarriors-html5.js | 69 + .../MoonWarriors/MoonWarriors-native.js | 69 + .../res/Music/bgMusic.mp3.REMOVED.git-id | 1 + .../Music/mainMainMusic.mp3.REMOVED.git-id | 1 + .../MoonWarriors/res/arial-14.GlyphProject | Bin 0 -> 3188 bytes .../MoonWarriors/res/b01.png.REMOVED.git-id | 1 + .../res/explosion.png.REMOVED.git-id | 1 + .../res/loading.png.REMOVED.git-id | 1 + .../Resources/MoonWarriors/src/AboutLayer.js | 47 + .../Resources/MoonWarriors/src/Bullet.js | 62 + .../Resources/MoonWarriors/src/Effect.js | 78 + .../Resources/MoonWarriors/src/Enemy.js | 75 + .../Resources/MoonWarriors/src/Explosion.js | 38 + .../MoonWarriors/src/GameControlMenu.js | 35 + .../MoonWarriors/src/GameController.js | 70 + .../Resources/MoonWarriors/src/GameLayer.js | 315 +++++ .../Resources/MoonWarriors/src/GameOver.js | 83 ++ .../MoonWarriors/src/LevelManager.js | 99 ++ .../Resources/MoonWarriors/src/Resource.js | 89 ++ .../MoonWarriors/src/SettingsLayer.js | 85 ++ .../Resources/MoonWarriors/src/Ship.js | 128 ++ .../Resources/MoonWarriors/src/SysMenu.js | 110 ++ .../MoonWarriors/src/config/EnemyType.js | 56 + .../MoonWarriors/src/config/GameConfig.js | 94 ++ .../MoonWarriors/src/config/Level.js | 49 + .../Resources/js/jsb_constants.js | 475 +++++++ .../Resources/js/jsb_constants_gl.js | 23 + 88 files changed, 7161 insertions(+) create mode 100644 samples/MoonWarriors/Classes/AppDelegate.cpp create mode 100644 samples/MoonWarriors/Classes/AppDelegate.h create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/arial-14.GlyphProject create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js create mode 100644 samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js create mode 100644 samples/MoonWarriors/Resources/jshelper/jsb_constants.js create mode 100644 samples/MoonWarriors/Resources/jshelper/jsb_constants_gl.js create mode 100644 samples/MoonWarriors/proj.android/.classpath create mode 100644 samples/MoonWarriors/proj.android/.project create mode 100644 samples/MoonWarriors/proj.android/AndroidManifest.xml create mode 100644 samples/MoonWarriors/proj.android/ant.properties create mode 100644 samples/MoonWarriors/proj.android/build.xml create mode 100644 samples/MoonWarriors/proj.android/build_native.sh create mode 100644 samples/MoonWarriors/proj.android/jni/Android.mk create mode 100644 samples/MoonWarriors/proj.android/jni/Application.mk create mode 100644 samples/MoonWarriors/proj.android/jni/testjavascript/main.cpp create mode 100644 samples/MoonWarriors/proj.android/proguard-project.txt create mode 100644 samples/MoonWarriors/proj.android/project.properties create mode 100644 samples/MoonWarriors/proj.android/res/values/strings.xml create mode 100644 samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java create mode 100644 samples/MoonWarriors/proj.ios/AppController.h create mode 100644 samples/MoonWarriors/proj.ios/AppController.mm create mode 100644 samples/MoonWarriors/proj.ios/Default-568h@2x.png.REMOVED.git-id create mode 100644 samples/MoonWarriors/proj.ios/Default@2x.png.REMOVED.git-id create mode 100644 samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj create mode 100644 samples/MoonWarriors/proj.ios/Prefix.pch create mode 100644 samples/MoonWarriors/proj.ios/RootViewController.h create mode 100644 samples/MoonWarriors/proj.ios/RootViewController.mm create mode 100644 samples/MoonWarriors/proj.ios/main.m create mode 100644 samples/MoonWarriors/proj.win32/MoonWarriors.vcproj create mode 100644 samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user create mode 100644 samples/MoonWarriors/proj.win32/TestJavascript.vcxproj create mode 100644 samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters create mode 100644 samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user create mode 100644 samples/MoonWarriors/proj.win32/main.cpp create mode 100644 samples/MoonWarriors/proj.win32/main.h create mode 100644 samples/MoonWarriors/proj.win32/res/testjs.ico create mode 100644 samples/MoonWarriors/proj.win32/resource.h create mode 100644 samples/MoonWarriors/proj.win32/testjs.rc create mode 100644 samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-html5.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-native.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/arial-14.GlyphProject create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id create mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Effect.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameController.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Resource.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Ship.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js create mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js create mode 100644 samples/TestJavascript/Resources/js/jsb_constants.js create mode 100644 samples/TestJavascript/Resources/js/jsb_constants_gl.js diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp new file mode 100644 index 0000000000..7278015021 --- /dev/null +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -0,0 +1,83 @@ +#include "AppDelegate.h" + +#include "cocos2d.h" +#include "SimpleAudioEngine.h" +#include "ScriptingCore.h" +#include "generated/cocos2dx.hpp" +#include "cocos2d_specifics.hpp" +#include "js_bindings_chipmunk_manual.hpp" + +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()); + + // enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices. + // pDirector->enableRetinaDisplay(true); + + // 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->start(); + + CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance(); + CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine); + ScriptingCore::getInstance()->runScript("MoonWarriors/MoonWarriors-native.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/MoonWarriors/Classes/AppDelegate.h b/samples/MoonWarriors/Classes/AppDelegate.h new file mode 100644 index 0000000000..6bd9363493 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js b/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js new file mode 100644 index 0000000000..1aee15ae78 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js @@ -0,0 +1,69 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +// boot code needed for cocos2d-html5 +// Not needed by cocos2d + JS bindings + +var MW = MW || {}; + +(function () { + var d = document; + var c = { + menuType:'canvas', //whether to use canvas mode menu or dom menu + COCOS2D_DEBUG:2, //0 to turn debug off, 1 for basic debug, and 2 for full debug + showFPS:true, + frameRate:60, + tag:'gameCanvas', //the dom element to run cocos2d on + engineDir:'libs/cocos2d/', + appFiles:[ + 'MoonWarriors/src/Resource.js', + 'MoonWarriors/src/config/GameConfig.js', + 'MoonWarriors/src/config/EnemyType.js', + 'MoonWarriors/src/config/Level.js', + 'MoonWarriors/src/Effect.js', + 'MoonWarriors/src/Bullet.js', + 'MoonWarriors/src/Enemy.js', + 'MoonWarriors/src/Explosion.js', + 'MoonWarriors/src/Ship.js', + 'MoonWarriors/src/LevelManager.js', + 'MoonWarriors/src/GameController.js', + 'MoonWarriors/src/GameControlMenu.js', + 'MoonWarriors/src/GameLayer.js', + 'MoonWarriors/src/GameOver.js', + 'MoonWarriors/src/AboutLayer.js', + 'MoonWarriors/src/SettingsLayer.js', + 'MoonWarriors/src/SysMenu.js' + ] + }; + window.addEventListener('DOMContentLoaded', function () { + //first load engine file if specified + var s = d.createElement('script'); + s.src = c.engineDir + 'platform/jsloader.js'; + d.body.appendChild(s); + s.c = c; + s.id = 'cocos2d-html5'; + //else if single file specified, load singlefile + }); +})(); diff --git a/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js b/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js new file mode 100644 index 0000000000..5d1e42551e --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js @@ -0,0 +1,69 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +// boot code needed for cocos2d + JS bindings. +// Not needed by cocos2d-html5 + +require("jshelper/jsb_constants.js"); + +var MW = MW || {}; + +var appFiles = [ + 'MoonWarriors/src/Resource.js', + 'MoonWarriors/src/config/GameConfig.js', + 'MoonWarriors/src/config/EnemyType.js', + 'MoonWarriors/src/config/Level.js', + 'MoonWarriors/src/Effect.js', + 'MoonWarriors/src/Bullet.js', + 'MoonWarriors/src/Enemy.js', + 'MoonWarriors/src/Explosion.js', + 'MoonWarriors/src/Ship.js', + 'MoonWarriors/src/LevelManager.js', + 'MoonWarriors/src/GameControlMenu.js', + 'MoonWarriors/src/GameLayer.js', + 'MoonWarriors/src/GameOver.js', + 'MoonWarriors/src/AboutLayer.js', + 'MoonWarriors/src/SettingsLayer.js', + 'MoonWarriors/src/SysMenu.js' +]; + +cc.dumpConfig(); + +for( var i=0; i < appFiles.length; i++) { + require( appFiles[i] ); +} + +var director = cc.Director.getInstance(); +director.setDisplayStats(true); + +// set FPS. the default value is 1.0/60 if you don't call this +director.setAnimationInterval(1.0 / 60); + +// create a scene. it's an autorelease object +var mainScene = SysMenu.scene(); + +// run +director.runWithScene(mainScene); + diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id b/samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id new file mode 100644 index 0000000000..d86bcca004 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id @@ -0,0 +1 @@ +59362b16ba4da187e064648be4d0bcb1c09b504d \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id b/samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id new file mode 100644 index 0000000000..7a63ad234e --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id @@ -0,0 +1 @@ +c0488f23a6a785893f4845b7fadc59ed892ceedc \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/arial-14.GlyphProject b/samples/MoonWarriors/Resources/MoonWarriors/res/arial-14.GlyphProject new file mode 100644 index 0000000000000000000000000000000000000000..cbac22bf53b6cc81cdace7e013d3125ea209c0e6 GIT binary patch literal 3188 zcmb7G3wTrI8GipiIhRy{aHoJ;O1T%Bq)FRwu@|6-wP|U3Zy_F%)Am4`6LL;yE26(T zZ(~jcZ{P*3&M~J}6q!?}PEov#aZ^N@IvQOz)2uEQXpu)z)iA{k4@HRr8Y6NaY8n)CG4Yt*o5wB#v?aF@o_^?9Zq z9|dyN-2+Yq5@cvtgSCjF8!_mJV;vGOU?Pe2=s_>~a1l1(Vr;}ExD*VR;c{GoAK*${ zg{yH5uEh_r2|vPh_%W`>4Y(1Tu?08bX54~XaT~T`8*axPxD!9Y&+rHy!!GQ=HD*?7Q8l1+t6b9=?TdF+YQ1WtNsE|W?RwITYB9Au)*0pI(WcsKCKFsVweqN@ z7+S1zrP>?U6K0i~h;b?8oH)40`2T=sgJ`2T&3@8peTHhB}R~lVPMDMBT=rB~XCFFE=e1m_P zm5$Mv-Y^8eg)JCY!aQ8Fg~D>f55^Pf`V8Xbv54B+#@UIeiCSHYnX9x|IGT*8k+e^~ zI|JiExN4mn3zewQVbh{hRCWoZmyoNuuhZ%ZRfnM2M=L#eA!!fQJddNLMC zQ)JodbW<_;62P>k&*2!A&xw) zp37q$I)|M!)J%bc908|lWaf0WW+v1Nv~JC8O`oe(%&zZb@=X(Tsaj{(;6@8Yy~WWW z#8ktzWlCV>a9UlPQ{9s3!@=m^_EJ*@Ppy+r2L5u$BWe2SFz({>XFKl3J?O{1xQ~}6 z5L}!zOuakBiq!{dJ6Bnqm=gGKYUSc#J!!~^&_ z9>hbf>3J68#cWPLs>W%~`tdLZPSZ38f;FkZpLVhnkMe-2=>6D<0q5}CXBprmts6XE zSALGW$h9%#43$?bUb3`u*?G&)uezW*P*c02E?D2t*woz8s;mx2)Q-+BZOz(fcTA73 zOBiNyeNS)SMQ%@_*H=_r;&c?KZ%$BgF{dg6xu}ZeQF>G<}N-yq1_$>#q9|t(! zhZ<6*=BOS{bv#?f&Px^6^0^&v@KWx;k%mC9ZdnEM*Enam=9Lt>3yVEIpWmJ1n&&I> z7Q1|YS4klk+#a{DsHDhKT+BUNbvuf;SDx1Q_u(BJ!|yO~x|%0rHE$aaqZ)DDngxR( z-{Y=+&(7zlN*OQ|)o}~YWD7)zr_kr|dp#ZtgtsXDDj5WE0w3~;6bM!)O=WddU804p zpSF_dyB8;LGSxHR>Kal!4-NC@Oxj+b%U|Lu^!u!cg)UzSk6PsQalz&Hy4}S^-V*;1 ze2?R=%wOrw;cw(t>;iJjcp-;6{yVq3a`-!?P5*I!hR?0~{S*IUK~~?7FYqO6U`_wE zegrs3C~N$F!HDqxlq$nCk+?etYyLjd!tG(yCz1B1-&EC2#|-DUF`HHY6)=A)F@ z`Tc1;Ih#x;Zc<2YAe+fe>|6#6XZ$q zG?8ZhL2{V9N!}uFlVjvv@;>>1949BpN%9e0MwinnT1{){ z3L2yhw28LRHoB6As6xY3rJYoxYiT#t={joAB<-PnbOYT;FQu2!E9jN2v8zd6Jwb&zH;PfLt#t za#+4j-X`B6-z)EsACjMxpO#;c_sa+6Bl1!C9r=Cv1Npf8C;628wSzcp4%so*G2T(` z2smmTb&e)S#L?ln(s8w8pW}ezO~&mCW9*|WxFP0Gr#dJ3R4y^`$oI{2NH`yXyb B$+`dl literal 0 HcmV?d00001 diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id b/samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id new file mode 100644 index 0000000000..ab880f0157 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id @@ -0,0 +1 @@ +46f10a6bf5c63f03ddf8566f392aa7a8f258d7e8 \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id b/samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id new file mode 100644 index 0000000000..56b3df641c --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id @@ -0,0 +1 @@ +97bca7d49fb6ec5c330f6ab6f5f49d335601a669 \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id b/samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id new file mode 100644 index 0000000000..a35d4e432f --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id @@ -0,0 +1 @@ +ca7905a1a07e2be3e02fbf329772c2c361400af7 \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js b/samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js new file mode 100644 index 0000000000..4d188d335a --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js @@ -0,0 +1,47 @@ +var AboutLayer = cc.Layer.extend({ + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); + var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 36, 100, 34)); + title.setPosition(cc.p(winSize.width / 2, winSize.height - 60)); + this.addChild(title); + + // There is a bug in LabelTTF native. Apparently it fails with some unicode chars. +// var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n \n Programmer: \n Shengxiang Chen (陈升想) \n Dingping Lv (吕定平) \n Effects animation: Hao Wu(吴昊)\n Quality Assurance: Sean Lin(林顺)", "Arial", 14, cc.size(winSize.width * 0.85, 100), cc.TEXT_ALIGNMENT_LEFT ); + var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n\nProgrammer: \n Shengxiang Chen\n Dingping Lv \n Effects animation: Hao Wu\n Quality Assurance: Sean Lin", "Arial", 14, cc.size(winSize.width * 0.85, 320), cc.TEXT_ALIGNMENT_LEFT ); + about.setPosition(cc.p(winSize.width / 2, winSize.height/2 -20) ); + about.setAnchorPoint( cc.p(0.5, 0.5)); + this.addChild(about); + + var label = cc.LabelTTF.create("Go back", "Arial", 14); + var back = cc.MenuItemLabel.create(label, this, this.backCallback); + var menu = cc.Menu.create(back); + menu.setPosition(cc.p(winSize.width / 2, 40)); + this.addChild(menu); + bRet = true; + } + + return bRet; + }, + backCallback:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + } +}); + +AboutLayer.create = function () { + var sg = new AboutLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js new file mode 100644 index 0000000000..d22c3b015a --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js @@ -0,0 +1,62 @@ +//bullet +var Bullet = cc.Sprite.extend({ + active:true, + xVelocity:0, + yVelocity:200, + power:1, + HP:1, + moveType:null, + zOrder:3000, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + parentType:MW.BULLET_TYPE.PLAYER, + ctor:function (bulletSpeed, weaponType, attackMode) { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + this.yVelocity = -bulletSpeed; + this.attackMode = attackMode; + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_bullet_plist); + this.initWithSpriteFrameName(weaponType); + this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + /*var tmpAction; + switch (this.attackMode) { + case MW.ENEMY_MOVE_TYPE.NORMAL: + tmpAction = cc.MoveBy.create(2, cc.p(this.getPosition().x, 400)); + break; + case MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN: + tmpAction = cc.MoveTo.create(2, GameLayer.create()._ship.getPosition()); + break; + } + this.runAction(tmpAction);*/ + }, + update:function (dt) { + var p = this.getPosition(); + p.x -= this.xVelocity * dt; + p.y -= this.yVelocity * dt; + this.setPosition( p ); + if (this.HP <= 0) { + this.active = false; + } + }, + destroy:function () { + var explode = cc.Sprite.create(s_hit); + explode.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + explode.setPosition(this.getPosition()); + explode.setRotation(Math.random()*360); + explode.setScale(0.75); + this.getParent().addChild(explode,9999); + cc.ArrayRemoveObject(MW.CONTAINER.ENEMY_BULLETS,this); + cc.ArrayRemoveObject(MW.CONTAINER.PLAYER_BULLETS,this); + this.removeFromParentAndCleanup(true); + var removeExplode = cc.CallFunc.create(explode,explode.removeFromParentAndCleanup); + explode.runAction(cc.ScaleBy.create(0.3, 2,2)); + explode.runAction(cc.Sequence.create(cc.FadeOut.create(0.3), removeExplode)); + }, + hurt:function () { + this.HP--; + }, + collideRect:function(){ + var p = this.getPosition(); + return cc.rect(p.x - 3, p.y - 3, 6, 6); + } +}); diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js new file mode 100644 index 0000000000..faaa03c491 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js @@ -0,0 +1,78 @@ +var flareEffect = function (parent, target, callback) { + var flare = cc.Sprite.create(s_flare); + flare.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + parent.addChild(flare, 10); + flare.setOpacity(0); + flare.setPosition(cc.p(-30, 297)); + flare.setRotation(-120); + flare.setScale(0.2); + + var opacityAnim = cc.FadeTo.create(0.5, 255); + var opacDim = cc.FadeTo.create(1, 0); + var biggeAnim = cc.ScaleBy.create(0.7, 1.2, 1.2); + var biggerEase = cc.EaseSineOut.create(biggeAnim); + var moveAnim = cc.MoveBy.create(0.5, cc.p(328, 0)); + var easeMove = cc.EaseSineOut.create(moveAnim); + var rotateAnim = cc.RotateBy.create(2.5, 90); + var rotateEase = cc.EaseExponentialOut.create(rotateAnim); + var bigger = cc.ScaleTo.create(0.5, 1); + + var onComplete = cc.CallFunc.create(target, callback); + var killflare = cc.CallFunc.create(flare, function () { + this.getParent().removeChild(this,true); + }); + flare.runAction(cc.Sequence.create(opacityAnim, biggerEase, opacDim, killflare, onComplete)); + flare.runAction(easeMove); + flare.runAction(rotateEase); + flare.runAction(bigger); +}; + +var removeFromParent = function( sprite ) +{ + sprite.removeFromParentAndCleanup( true ); +}; + +var spark = function (ccpoint, parent, scale, duration) { + scale = scale || 0.3; + duration = duration || 0.5; + + var one = cc.Sprite.create(s_explode1); + var two = cc.Sprite.create(s_explode2); + var three = cc.Sprite.create(s_explode3); + + one.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + two.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + three.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + + one.setPosition(ccpoint); + two.setPosition(ccpoint); + three.setPosition(ccpoint); + + //parent.addChild(one); + parent.addChild(two); + parent.addChild(three); + one.setScale(scale); + two.setScale(scale); + three.setScale(scale); + + three.setRotation(Math.random() * 360); + + var left = cc.RotateBy.create(duration, -45); + var right = cc.RotateBy.create(duration, 45); + var scaleBy = cc.ScaleBy.create(duration, 3, 3); + var fadeOut = cc.FadeOut.create(duration); + var remove = cc.CallFunc.create(this, removeFromParent ); + var seq = cc.Sequence.create( fadeOut, remove ); + + one.runAction(left); + two.runAction(right); + + one.runAction(scaleBy); + two.runAction(scaleBy.copy()); + three.runAction(scaleBy.copy()); + + one.runAction(seq); + two.runAction(seq.copy() ); + three.runAction(seq.copy()); +}; + diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js new file mode 100644 index 0000000000..e266118547 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js @@ -0,0 +1,75 @@ +var Enemy = cc.Sprite.extend({ + eID:0, + active:true, + speed:200, + bulletSpeed:-200, + HP:15, + bulletPowerValue:1, + moveType:null, + scoreValue:200, + zOrder:1000, + delayTime:1 + 1.2 * Math.random(), + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + _hurtColorLife:0, + ctor:function (arg) { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + this.HP = arg.HP; + this.moveType = arg.moveType; + this.scoreValue = arg.scoreValue; + this.attackMode = arg.attackMode; + + this.initWithSpriteFrameName(arg.textureName); + this.schedule(this.shoot, this.delayTime); + }, + _timeTick:0, + update:function (dt) { + if (this.HP <= 0) { + this.active = false; + } + this._timeTick += dt; + if (this._timeTick > 0.1) { + this._timeTick = 0; + if (this._hurtColorLife > 0) { + this._hurtColorLife--; + } + if (this._hurtColorLife == 1) { + this.setColor( cc.WHITE ); + } + } + }, + destroy:function () { + MW.SCORE += this.scoreValue; + var a = new Explosion(); + a.setPosition(this.getPosition()); + this.getParent().addChild(a); + spark(this.getPosition(),this.getParent(), 1.2, 0.7); + cc.ArrayRemoveObject(MW.CONTAINER.ENEMIES,this); + this.removeFromParentAndCleanup(true); + if(MW.SOUND){ + cc.AudioEngine.getInstance().playEffect(s_explodeEffect); + } + }, + shoot:function () { + var p = this.getPosition(); + var b = new Bullet(this.bulletSpeed, "W2.png", this.attackMode); + MW.CONTAINER.ENEMY_BULLETS.push(b); + this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.ENMEY_BULLET); + b.setPosition(cc.p(p.x, p.y - this.getContentSize().height * 0.2)); + }, + hurt:function () { + this._hurtColorLife = 2; + this.HP--; + this.setColor( cc.RED ); + }, + collideRect:function(){ + var a = this.getContentSize(); + var p = this.getPosition(); + return cc.rect(p.x - a.width/2, p.y - a.height/4,a.width,a.height/2); + } +}); + +Enemy.sharedEnemy = function(){ + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_Enemy_plist, s_Enemy); +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js new file mode 100644 index 0000000000..8ccd225c5d --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js @@ -0,0 +1,38 @@ +var Explosion = cc.Sprite.extend({ + tmpWidth:0, + tmpHeight:0, + ctor:function () { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + var pFrame = cc.SpriteFrameCache.getInstance().getSpriteFrame("explosion_01.png"); + this.initWithSpriteFrame(pFrame); + + var cs = this.getContentSize(); + this.tmpWidth = cs.width; + this.tmpHeight = cs.height; + + var animation = cc.AnimationCache.getInstance().getAnimation("Explosion"); + this.runAction(cc.Sequence.create( + cc.Animate.create(animation), + cc.CallFunc.create(this, this.destroy) + )); + this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + }, + destroy:function () { + this.getParent().removeChild(this,true); + } +}); + +Explosion.sharedExplosion = function () { + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_explosion_plist); + var animFrames = []; + var str = ""; + for (var i = 1; i < 35; i++) { + str = "explosion_" + (i < 10 ? ("0" + i) : i) + ".png"; + var frame = cc.SpriteFrameCache.getInstance().getSpriteFrame(str); + animFrames.push(frame); + } + var animation = cc.Animation.create(animFrames, 0.04); + cc.AnimationCache.getInstance().addAnimation(animation, "Explosion"); +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js b/samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js new file mode 100644 index 0000000000..3fcdac736e --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js @@ -0,0 +1,35 @@ +var GameControlMenu = cc.Layer.extend({ + ctor:function() { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Layer); + }, + init:function () { + var bRet = false; + if (this._super()) { + cc.MenuItemFont.setFontSize(18); + cc.MenuItemFont.setFontName("Arial"); + var systemMenu = cc.MenuItemFont.create("Main Menu", this, this.sysMenu); + var menu = cc.Menu.create(systemMenu); + menu.setPosition(cc.p(0, 0)); + systemMenu.setAnchorPoint(cc.p(0, 0)); + systemMenu.setPosition(cc.p(winSize.width-95, 5)); + this.addChild(menu, 1, 2); + bRet = true; + } + + return bRet; + }, + sysMenu:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); + } +}); + +GameControlMenu.create = function () { + var sg = new GameControlMenu(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js b/samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js new file mode 100644 index 0000000000..d5aed4be94 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js @@ -0,0 +1,70 @@ +/** + * Cocos2d-html5 show case : Moon Warriors + * + * @Licensed: + * This showcase is licensed under GPL. + * + * @Authors: + * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada + * Effects animation: Hao Wu (吴昊) + * Quality Assurance: Sean Lin (林顺) + * + * @Links: + * http://www.cocos2d-x.org + * http://bbs.html5china.com + * + */ + + +MW.GameController = cc.Class.extend({ + _curScene:null, + _gameState:MW.GAME_STATE.HOME, + _isNewGame:true, + _curLevel:MW.LEVEL.STAGE1, + _selectLevel:MW.LEVEL.STAGE1, + init:function () { + return true; + }, + setCurScene:function (s) { + if (this._curScene != s) { + if (this._curScene !== null) { + this._curScene.onExit(); + } + this._curScene = s; + if (this._curScene) { + this._curScene.onEnter(); + cc.Director.getInstance().replaceScene(s); + } + } + }, + getCurScene:function () { + return this._curScene; + }, + runGame:function () { + + }, + newGame:function () { + + }, + option:function () { + + }, + about:function () { + + } +}); + +MW.GameController.getInstance = function () { + cc.Assert(this._sharedGame, "Havn't call setSharedGame"); + if (!this._sharedGame) { + this._sharedGame = new MW.GameController(); + if (this._sharedGame.init()) { + return this._sharedGame; + } + } else { + return this._sharedGame; + } + return null; +}; + +MW.GameController._sharedGame = null; \ No newline at end of file diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js b/samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js new file mode 100644 index 0000000000..60ee0ba738 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js @@ -0,0 +1,315 @@ +// +// MoonWarriors +// +// Handles the Game Logic +// + +STATE_PLAYING = 0; +STATE_GAMEOVER = 1; + +var GameLayer = cc.Layer.extend({ + _time:null, + _ship:null, + _backSky:null, + _backSkyHeight:0, + _backSkyRe:null, + _backTileMap:null, + _backTileMapHeight:0, + _backTileMapRe:null, + _levelManager:null, + _tmpScore:0, + _isBackSkyReload:false, + _isBackTileReload:false, + lbScore:null, + screenRect:null, + explosionAnimation:[], + _beginPos:cc.p(0, 0), + _state:STATE_PLAYING, + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + + // reset global values + MW.CONTAINER.ENEMIES = []; + MW.CONTAINER.ENEMY_BULLETS = []; + MW.CONTAINER.PLAYER_BULLETS = []; + MW.SCORE = 0; + MW.LIFE = 4; + this._state = STATE_PLAYING; + + Explosion.sharedExplosion(); + Enemy.sharedEnemy(); + winSize = cc.Director.getInstance().getWinSize(); + this._levelManager = new LevelManager(this); + this.initBackground(); + this.screenRect = cc.rect(0, 0, winSize.width, winSize.height + 10); + + // score + this.lbScore = cc.LabelBMFont.create("Score: 0", s_arial14_fnt); + this.lbScore.setAnchorPoint( cc.p(1,0) ); + this.lbScore.setAlignment( cc.TEXT_ALIGNMENT_RIGHT ); + this.addChild(this.lbScore, 1000); + this.lbScore.setPosition(cc.p(winSize.width - 5 , winSize.height - 30)); + + // ship life + var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); + var life = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + life.setScale(0.6); + life.setPosition(cc.p(30, 460)); + this.addChild(life, 1, 5); + + // ship Life count + this._lbLife = cc.LabelTTF.create("0", "Arial", 20); + this._lbLife.setPosition(cc.p(60, 463)); + this._lbLife.setColor(cc.RED); + this.addChild(this._lbLife, 1000); + + // ship + this._ship = new Ship(); + this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); + + // accept touch now! + + var t = cc.config.deviceType; + if( t == 'browser' ) { + this.setTouchEnabled(true); + this.setKeyboardEnabled(true); + } else if( t == 'desktop' ) { + this.setMouseEnabled(true); + } else if( t == 'mobile' ) { + this.setTouchEnabled(true); + } + + // schedule + this.scheduleUpdate(); + this.schedule(this.scoreCounter, 1); + + if (MW.SOUND) { + cc.AudioEngine.getInstance().playBackgroundMusic(s_bgMusic, true); + } + + bRet = true; + } + return bRet; + }, + scoreCounter:function () { + if( this._state == STATE_PLAYING ) { + this._time++; + + var minute = 0 | (this._time / 60); + var second = this._time % 60; + minute = minute > 9 ? minute : "0" + minute; + second = second > 9 ? second : "0" + second; + var curTime = minute + ":" + second; + this._levelManager.loadLevelResource(this._time); + } + }, + + onTouchesMoved:function (touches, event) { + this.processEvent( touches[0] ); + }, + + onMouseDragged:function( event ) { + this.processEvent( event ); + }, + + processEvent:function( event ) { + if( this._state == STATE_PLAYING ) { + var delta = event.getDelta(); + var curPos = this._ship.getPosition(); + curPos= cc.pAdd( curPos, delta ); + curPos = cc.pClamp(curPos, cc.POINT_ZERO, cc.p(winSize.width, winSize.height) ); + this._ship.setPosition( curPos ); + } + }, + + onKeyDown:function (e) { + MW.KEYS[e] = true; + }, + + onKeyUp:function (e) { + MW.KEYS[e] = false; + }, + + update:function (dt) { + if( this._state == STATE_PLAYING ) { + this.checkIsCollide(); + this.removeInactiveUnit(dt); + this.checkIsReborn(); + this.updateUI(); + } + + if( cc.config.deviceType == 'browser' ) + cc.$("#cou").innerHTML = "Ship:" + 1 + ", Enemy: " + MW.CONTAINER.ENEMIES.length + ", Bullet:" + MW.CONTAINER.ENEMY_BULLETS.length + "," + MW.CONTAINER.PLAYER_BULLETS.length + " all:" + this.getChildren().length; + }, + checkIsCollide:function () { + var selChild, bulletChild; + //check collide + var i =0; + for (i = 0; i < MW.CONTAINER.ENEMIES.length; i++) { + selChild = MW.CONTAINER.ENEMIES[i]; + for (var j = 0; j < MW.CONTAINER.PLAYER_BULLETS.length; j++) { + bulletChild = MW.CONTAINER.PLAYER_BULLETS[j]; + if (this.collide(selChild, bulletChild)) { + bulletChild.hurt(); + selChild.hurt(); + } + if (!cc.rectIntersectsRect(this.screenRect, bulletChild.getBoundingBox() )) { + bulletChild.destroy(); + } + } + if (this.collide(selChild, this._ship)) { + if (this._ship.active) { + selChild.hurt(); + this._ship.hurt(); + } + } + if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { + selChild.destroy(); + } + } + + for (i = 0; i < MW.CONTAINER.ENEMY_BULLETS.length; i++) { + selChild = MW.CONTAINER.ENEMY_BULLETS[i]; + if (this.collide(selChild, this._ship)) { + if (this._ship.active) { + selChild.hurt(); + this._ship.hurt(); + } + } + if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { + selChild.destroy(); + } + } + }, + removeInactiveUnit:function (dt) { + var selChild, layerChildren = this.getChildren(); + for (var i in layerChildren) { + selChild = layerChildren[i]; + if (selChild) { + if( typeof selChild.update == 'function' ) { + selChild.update(dt); + var tag = selChild.getTag(); + if ((tag == MW.UNIT_TAG.PLAYER) || (tag == MW.UNIT_TAG.PLAYER_BULLET) || + (tag == MW.UNIT_TAG.ENEMY) || (tag == MW.UNIT_TAG.ENMEY_BULLET)) { + if (selChild && !selChild.active) { + selChild.destroy(); + } + } + } + } + } + }, + checkIsReborn:function () { + if (MW.LIFE > 0 && !this._ship.active) { + // ship + this._ship = new Ship(); + this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); + } + else if (MW.LIFE <= 0 && !this._ship.active) { + this._state = STATE_GAMEOVER; + // XXX: needed for JS bindings. + this._ship = null; + this.runAction(cc.Sequence.create( + cc.DelayTime.create(0.2), + cc.CallFunc.create(this, this.onGameOver))); + } + }, + updateUI:function () { + if (this._tmpScore < MW.SCORE) { + this._tmpScore += 5; + } + this._lbLife.setString(MW.LIFE); + this.lbScore.setString("Score: " + this._tmpScore); + }, + collide:function (a, b) { + var aRect = a.collideRect(); + var bRect = b.collideRect(); + if (cc.rectIntersectsRect(aRect, bRect)) { + return true; + } + }, + initBackground:function () { + // bg + this._backSky = cc.Sprite.create(s_bg01); + this._backSky.setAnchorPoint(cc.p(0, 0)); + this._backSkyHeight = this._backSky.getContentSize().height; + this.addChild(this._backSky, -10); + + //tilemap + this._backTileMap = cc.TMXTiledMap.create(s_level01); + this.addChild(this._backTileMap, -9); + this._backTileMapHeight = this._backTileMap.getMapSize().height * this._backTileMap.getTileSize().height; + + this._backSkyHeight -= 48; + this._backTileMapHeight -= 200; + this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + + this.schedule(this.movingBackground, 3); + }, + movingBackground:function () { + this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + this._backSkyHeight -= 48; + this._backTileMapHeight -= 200; + + if (this._backSkyHeight <= winSize.height) { + if (!this._isBackSkyReload) { + this._backSkyRe = cc.Sprite.create(s_bg01); + this._backSkyRe.setAnchorPoint(cc.p(0, 0)); + this.addChild(this._backSkyRe, -10); + this._backSkyRe.setPosition(cc.p(0, winSize.height)); + this._isBackSkyReload = true; + } + this._backSkyRe.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + } + if (this._backSkyHeight <= 0) { + this._backSkyHeight = this._backSky.getContentSize().height; + this.removeChild(this._backSky, true); + this._backSky = this._backSkyRe; + this._backSkyRe = null; + this._isBackSkyReload = false; + } + + if (this._backTileMapHeight <= winSize.height) { + if (!this._isBackTileReload) { + this._backTileMapRe = cc.TMXTiledMap.create(s_level01); + this.addChild(this._backTileMapRe, -9); + this._backTileMapRe.setPosition(cc.p(0, winSize.height)); + this._isBackTileReload = true; + } + this._backTileMapRe.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + } + if (this._backTileMapHeight <= 0) { + this._backTileMapHeight = this._backTileMapRe.getMapSize().height * this._backTileMapRe.getTileSize().height; + this.removeChild(this._backTileMap, true); + this._backTileMap = this._backTileMapRe; + this._backTileMapRe = null; + this._isBackTileReload = false; + } + }, + onGameOver:function () { + var scene = cc.Scene.create(); + scene.addChild(GameOver.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + } +}); + +GameLayer.create = function () { + var sg = new GameLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +GameLayer.scene = function () { + var scene = cc.Scene.create(); + var layer = GameLayer.create(); + scene.addChild(layer, 1); + return scene; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js b/samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js new file mode 100644 index 0000000000..7fcf87c645 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js @@ -0,0 +1,83 @@ +var GameOver = cc.Layer.extend({ + _ship:null, + _lbScore:0, + ctor:function() { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Layer); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint( cc.p(0,0) ); + this.addChild(sp, 0, 1); + + var logo = cc.Sprite.create(s_gameOver); + logo.setAnchorPoint(cc.p(0,0)); + logo.setPosition(cc.p(0,300)); + this.addChild(logo,10,1); + + var playAgainNormal = cc.Sprite.create(s_menu, cc.rect(378, 0, 126, 33)); + var playAgainSelected = cc.Sprite.create(s_menu, cc.rect(378, 33, 126, 33)); + var playAgainDisabled = cc.Sprite.create(s_menu, cc.rect(378, 33 * 2, 126, 33)); + + var cocos2dhtml5 = cc.Sprite.create(s_cocos2dhtml5); + cocos2dhtml5.setPosition(cc.p(160,150)); + this.addChild(cocos2dhtml5,10); + var playAgain = cc.MenuItemSprite.create(playAgainNormal, playAgainSelected, playAgainDisabled, this, function(){ + flareEffect(this,this,this.onPlayAgain); + }); + + var menu = cc.Menu.create(playAgain); + this.addChild(menu, 1, 2); + menu.setPosition(cc.p(winSize.width / 2, 220)); + + var lbScore = cc.LabelTTF.create("Your Score:"+MW.SCORE,"Arial Bold",16); + lbScore.setPosition(cc.p(160,280)); + lbScore.setColor(cc.c3b(250,179,0)); + this.addChild(lbScore,10); + + var b1 = cc.LabelTTF.create("Download Cocos2d-html5","Arial",14); + var b2 = cc.LabelTTF.create("Download This Sample","Arial",14); + var menu1 = cc.MenuItemLabel.create(b1,this,function(){ + window.location.href = "http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-html5"; + }); + var menu2 = cc.MenuItemLabel.create(b2,this,function(){ + window.location.href = "https://github.com/ShengxiangChen/MoonWarriors"; + }); + var cocos2dMenu = cc.Menu.create(menu1,menu2); + cocos2dMenu.alignItemsVerticallyWithPadding(10); + cocos2dMenu.setPosition(cc.p(160,80)); + this.addChild(cocos2dMenu); + + + if(MW.SOUND){ + cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic); + } + + bRet = true; + } + return bRet; + }, + onPlayAgain:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(GameLayer.create()); + scene.addChild(GameControlMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); + } +}); + +GameOver.create = function () { + var sg = new GameOver(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +GameOver.scene = function () { + var scene = cc.Scene.create(); + var layer = GameOver.create(); + scene.addChild(layer); + return scene; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js b/samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js new file mode 100644 index 0000000000..6866d7412f --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js @@ -0,0 +1,99 @@ +var LevelManager = cc.Class.extend({ + _currentLevel:null, + _gameLayer:null, + ctor:function(gameLayer){ + if(!gameLayer){ + throw "gameLayer must be non-nil"; + } + this._currentLevel = Level1; + this._gameLayer = gameLayer; + this.setLevel(this._currentLevel); + }, + + setLevel:function(level){ + for(var i = 0; i< level.enemies.length; i++){ + this._currentLevel.enemies[i].ShowTime = this._minuteToSecond(this._currentLevel.enemies[i].ShowTime); + } + }, + _minuteToSecond:function(minuteStr){ + if(!minuteStr) + return 0; + if(typeof(minuteStr) != "number"){ + var mins = minuteStr.split(':'); + if(mins.length == 1){ + return parseInt(mins[0],10); + }else { + return parseInt(mins[0],10 )* 60 + parseInt(mins[1],10); + } + } + return minuteStr; + }, + + loadLevelResource:function(deltaTime){ + //load enemy + for(var i = 0; i< this._currentLevel.enemies.length; i++){ + var selEnemy = this._currentLevel.enemies[i]; + if(selEnemy){ + if(selEnemy.ShowType == "Once"){ + if(selEnemy.ShowTime == deltaTime){ + for(var tIndex = 0; tIndex < selEnemy.Types.length;tIndex++ ){ + this.addEnemyToGameLayer(selEnemy.Types[tIndex]); + } + } + }else if(selEnemy.ShowType == "Repeate"){ + if(deltaTime % selEnemy.ShowTime === 0){ + for(var rIndex = 0; rIndex < selEnemy.Types.length;rIndex++ ){ + this.addEnemyToGameLayer(selEnemy.Types[rIndex]); + } + } + } + } + } + }, + + addEnemyToGameLayer:function(enemyType){ + var addEnemy = new Enemy(EnemyType[enemyType]); + + var enemypos = cc.p( 80 + (winSize.width - 160) * Math.random(), winSize.height); + var enemycs = addEnemy.getContentSize(); + addEnemy.setPosition( enemypos ); + + + var offset, tmpAction; + var a0=0; + var a1=0; + switch (addEnemy.moveType) { + case MW.ENEMY_MOVE_TYPE.ATTACK: + offset = this._gameLayer._ship.getPosition(); + tmpAction = cc.MoveTo.create(1, offset); + break; + case MW.ENEMY_MOVE_TYPE.VERTICAL: + offset = cc.p(0, -winSize.height - enemycs.height); + tmpAction = cc.MoveBy.create(4, offset); + break; + case MW.ENEMY_MOVE_TYPE.HORIZONTAL: + offset = cc.p(0, -100 - 200 * Math.random()); + a0 = cc.MoveBy.create(0.5, offset); + a1 = cc.MoveBy.create(1, cc.p(-50 - 100 * Math.random(), 0)); + var onComplete = cc.CallFunc.create(addEnemy, function (pSender) { + var a2 = cc.DelayTime.create(1); + var a3 = cc.MoveBy.create(1, cc.p(100 + 100 * Math.random(), 0)); + pSender.runAction(cc.RepeatForever.create( + cc.Sequence.create(a2, a3, a2.copy(), a3.reverse()) + )); + }); + tmpAction = cc.Sequence.create(a0, a1, onComplete); + break; + case MW.ENEMY_MOVE_TYPE.OVERLAP: + var newX = (enemypos.x <= winSize.width / 2) ? 320 : -320; + a0 = cc.MoveBy.create(4, cc.p(newX, -240)); + a1 = cc.MoveBy.create(4,cc.p(-newX,-320)); + tmpAction = cc.Sequence.create(a0,a1); + break; + } + + this._gameLayer.addChild(addEnemy, addEnemy.zOrder, MW.UNIT_TAG.ENEMY); + MW.CONTAINER.ENEMIES.push(addEnemy); + addEnemy.runAction(tmpAction); + } +}); diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js new file mode 100644 index 0000000000..c2f6becdad --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js @@ -0,0 +1,89 @@ +var dirImg = ""; +var dirMusic = ""; +var musicSuffix = ".mp3"; +if( cc.config.deviceType == 'browser' || cc.config.engine == 'cocos2d-x') { + dirImg = "MoonWarriors/res/"; + dirMusic = "MoonWarriors/res/Music/"; + musicSuffix = ""; +} + +//image +var s_bg01 = dirImg + "bg01.jpg"; +var s_loading = dirImg + "loading.png"; +var s_ship01 = dirImg + "ship01.png"; +var s_menu = dirImg + "menu.png"; +var s_logo = dirImg + "logo.png"; +var s_cocos2dhtml5 = dirImg + "cocos2d-html5.png"; +var s_gameOver = dirImg + "gameOver.png"; +var s_menuTitle = dirImg + "menuTitle.png"; +var s_Enemy = dirImg + "Enemy.png"; +var s_flare = dirImg + "flare.jpg"; +var s_bullet = dirImg + "bullet.png"; +var s_explosion = dirImg + "explosion.png"; +var s_explode1 = dirImg + "explode1.jpg"; +var s_explode2= dirImg + "explode2.jpg"; +var s_explode3 = dirImg + "explode3.jpg"; +var s_hit = dirImg + "hit.jpg"; +var s_arial14 = dirImg + "arial-14.png"; +var s_arial14_fnt = dirImg + "arial-14.fnt"; + +//music +var s_bgMusic = dirMusic + "bgMusic" + musicSuffix; +var s_mainMainMusic = dirMusic + "mainMainMusic" + musicSuffix; + +//effect +var s_buttonEffect = dirMusic + "buttonEffet" + musicSuffix; +var s_explodeEffect = dirMusic + "explodeEffect" + musicSuffix; +var s_fireEffect = dirMusic + "fireEffect" + musicSuffix; +var s_shipDestroyEffect = dirMusic + "shipDestroyEffect" + musicSuffix; + +//tmx +var s_level01 = dirImg + "level01.tmx"; + +//plist +var s_Enemy_plist = dirImg + "Enemy.plist"; +var s_explosion_plist = dirImg + "explosion.plist"; +var s_bullet_plist = dirImg + "bullet.plist"; + +var g_ressources = [ + //image + {type:"image", src:s_bg01}, + {type:"image", src:s_loading}, + {type:"image", src:s_ship01}, + {type:"image", src:s_menu}, + {type:"image", src:s_logo}, + {type:"image", src:s_cocos2dhtml5}, + {type:"image", src:s_gameOver}, + {type:"image", src:s_menuTitle}, + {type:"image", src:s_Enemy}, + {type:"image", src:s_flare}, + {type:"image", src:s_bullet}, + {type:"image", src:s_explosion}, + {type:"image", src:s_explode1}, + {type:"image", src:s_explode2}, + {type:"image", src:s_explode3}, + {type:"image", src:s_hit}, + {type:"image", src:s_arial14}, + + //tmx + {type:"tmx", src:s_level01}, + + //plist + {type:"plist", src:s_Enemy_plist}, + {type:"plist", src:s_explosion_plist}, + {type:"plist", src:s_bullet_plist}, + + //music + {type:"bgm", src:s_bgMusic}, + {type:"bgm", src:s_mainMainMusic}, + + //effect + {type:"effect", src:s_buttonEffect}, + {type:"effect", src:s_explodeEffect}, + {type:"effect", src:s_fireEffect}, + {type:"effect", src:s_shipDestroyEffect}, + + // FNT + {type:"fnt", src:s_arial14_fnt} + +]; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js b/samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js new file mode 100644 index 0000000000..4f8b545311 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js @@ -0,0 +1,85 @@ +var SettingsLayer = cc.Layer.extend({ + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); + var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 0, 134, 34)); + title.setPosition(cc.p(winSize.width / 2, winSize.height - 120)); + this.addChild(title); + + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(18); + var title1 = cc.MenuItemFont.create("Sound"); + title1.setEnabled(false); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var item1 = cc.MenuItemToggle.create( + cc.MenuItemFont.create("On"), + cc.MenuItemFont.create("Off") ); + item1.setCallback(this, this.soundControl ); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(18); + var title2 = cc.MenuItemFont.create("Mode"); + title2.setEnabled(false); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var item2 = cc.MenuItemToggle.create( + cc.MenuItemFont.create("Easy"), + cc.MenuItemFont.create("Normal"), + cc.MenuItemFont.create("Hard")); + item2.setCallback( this, this.modeControl ); + + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var label = cc.LabelTTF.create("Go back", "Arial", 20); + var back = cc.MenuItemLabel.create(label, this, this.backCallback); + back.setScale(0.8); + + var menu = cc.Menu.create(title1, title2, item1, item2, back); + menu.alignItemsInColumns(2, 2, 1); + this.addChild(menu); + + var cp_back = back.getPosition(); + cp_back.y -= 50.0; + back.setPosition(cp_back); + + + bRet = true; + } + + return bRet; + }, + backCallback:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + soundControl:function(){ + MW.SOUND = MW.SOUND ? false : true; + if(!MW.SOUND){ + cc.AudioEngine.getInstance().stopBackgroundMusic(); + } + }, + modeControl:function(){ + } +}); + +SettingsLayer.create = function () { + var sg = new SettingsLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js b/samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js new file mode 100644 index 0000000000..84aa6342db --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js @@ -0,0 +1,128 @@ +var Ship = cc.Sprite.extend({ + speed:220, + bulletSpeed:900, + HP:5, + bulletTypeValue:1, + bulletPowerValue:1, + throwBombing:false, + canBeAttack:true, + isThrowingBomb:false, + zOrder:3000, + maxBulletPowerValue:4, + appearPosition:cc.p(160, 60), + _hurtColorLife:0, + active:true, + ctor:function () { + + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + //init life + var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); + this.initWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + this.setTag(this.zOrder); + this.setPosition(this.appearPosition); + + // set frame + var frame0 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + var frame1 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(60, 0, 60, 38)); + + var animFrames = []; + animFrames.push(frame0); + animFrames.push(frame1); + + // ship animate + var animation = cc.Animation.create(animFrames, 0.1); + var animate = cc.Animate.create(animation); + this.runAction(cc.RepeatForever.create(animate)); + this.schedule(this.shoot, 1 / 6); + + //revive effect + this.canBeAttack = false; + var ghostSprite = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 45, 60, 38)); + ghostSprite.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + ghostSprite.setScale(8); + ghostSprite.setPosition(cc.p(this.getContentSize().width / 2, 12)); + this.addChild(ghostSprite, 3000, 99999); + ghostSprite.runAction(cc.ScaleTo.create(0.5, 1, 1)); + var blinks = cc.Blink.create(3, 9); + var makeBeAttack = cc.CallFunc.create(this, function (t) { + t.canBeAttack = true; + t.setVisible(true); + t.removeChild(ghostSprite,true); + }); + this.runAction(cc.Sequence.create(cc.DelayTime.create(0.5), blinks, makeBeAttack)); + }, + update:function (dt) { + + // Keys are only enabled on the browser + if( cc.config.deviceType == 'browser' ) { + var pos = this.getPosition(); + if ((MW.KEYS[cc.KEY.w] || MW.KEYS[cc.KEY.up]) && pos.y <= winSize.height) { + pos.y += dt * this.speed; + } + if ((MW.KEYS[cc.KEY.s] || MW.KEYS[cc.KEY.down]) && pos.y >= 0) { + pos.y -= dt * this.speed; + } + if ((MW.KEYS[cc.KEY.a] || MW.KEYS[cc.KEY.left]) && pos.x >= 0) { + pos.x -= dt * this.speed; + } + if ((MW.KEYS[cc.KEY.d] || MW.KEYS[cc.KEY.right]) && pos.x <= winSize.width) { + pos.x += dt * this.speed; + } + this.setPosition( pos ); + } + + if (this.HP <= 0) { + this.active = false; + } + this._timeTick += dt; + if (this._timeTick > 0.1) { + this._timeTick = 0; + if (this._hurtColorLife > 0) { + this._hurtColorLife--; + } + if (this._hurtColorLife == 1) { + this.setColor(cc.WHITE); + } + } + }, + shoot:function (dt) { + //this.shootEffect(); + var offset = 13; + var p = this.getPosition(); + var cs = this.getContentSize(); + var a = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); + MW.CONTAINER.PLAYER_BULLETS.push(a); + this.getParent().addChild(a, a.zOrder, MW.UNIT_TAG.PLAYER_BULLET); + a.setPosition(cc.p(p.x + offset, p.y + 3 + cs.height * 0.3)); + + var b = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); + MW.CONTAINER.PLAYER_BULLETS.push(b); + this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.PLAYER_BULLET); + b.setPosition(cc.p(p.x - offset, p.y + 3 + cs.height * 0.3)); + }, + destroy:function () { + MW.LIFE--; + var p = this.getPosition(); + var myParent = this.getParent(); + myParent.addChild( new Explosion(p) ); + myParent.removeChild(this,true); + if (MW.SOUND) { + cc.AudioEngine.getInstance().playEffect(s_shipDestroyEffect); + } + }, + hurt:function () { + if (this.canBeAttack) { + this._hurtColorLife = 2; + this.HP--; + this.setColor(cc.RED); + } + }, + collideRect:function(){ + var p = this.getPosition(); + var a = this.getContentSize(); + var r = new cc.rect(p.x - a.width/2, p.y - a.height/2, a.width, a.height/2); + return r; + } +}); diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js b/samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js new file mode 100644 index 0000000000..a265636363 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js @@ -0,0 +1,110 @@ +cc.dumpConfig(); + +var SysMenu = cc.Layer.extend({ + _ship:null, + + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + winSize = cc.Director.getInstance().getWinSize(); + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var logo = cc.Sprite.create(s_logo); + logo.setAnchorPoint(cc.p(0, 0)); + logo.setPosition(cc.p(0, 250)); + this.addChild(logo, 10, 1); + + var newGameNormal = cc.Sprite.create(s_menu, cc.rect(0, 0, 126, 33)); + var newGameSelected = cc.Sprite.create(s_menu, cc.rect(0, 33, 126, 33)); + var newGameDisabled = cc.Sprite.create(s_menu, cc.rect(0, 33 * 2, 126, 33)); + + var gameSettingsNormal = cc.Sprite.create(s_menu, cc.rect(126, 0, 126, 33)); + var gameSettingsSelected = cc.Sprite.create(s_menu, cc.rect(126, 33, 126, 33)); + var gameSettingsDisabled = cc.Sprite.create(s_menu, cc.rect(126, 33 * 2, 126, 33)); + + var aboutNormal = cc.Sprite.create(s_menu, cc.rect(252, 0, 126, 33)); + var aboutSelected = cc.Sprite.create(s_menu, cc.rect(252, 33, 126, 33)); + var aboutDisabled = cc.Sprite.create(s_menu, cc.rect(252, 33 * 2, 126, 33)); + + var newGame = cc.MenuItemSprite.create(newGameNormal, newGameSelected, newGameDisabled, this, function () { + this.onButtonEffect(); + flareEffect(this, this, this.onNewGame); + }); + var gameSettings = cc.MenuItemSprite.create(gameSettingsNormal, gameSettingsSelected, gameSettingsDisabled, this, this.onSettings); + var about = cc.MenuItemSprite.create(aboutNormal, aboutSelected, aboutDisabled, this, this.onAbout); + + var menu = cc.Menu.create(newGame, gameSettings, about); + menu.alignItemsVerticallyWithPadding(10); + this.addChild(menu, 1, 2); + menu.setPosition(cc.p(winSize.width / 2, winSize.height / 2 - 80)); + this.schedule(this.update, 0.1); + + var tmp = cc.TextureCache.getInstance().addImage(s_ship01); + this._ship = cc.Sprite.createWithTexture(tmp,cc.rect(0, 45, 60, 38)); + this.addChild(this._ship, 0, 4); + var pos = cc.p(Math.random() * winSize.width, 0); + this._ship.setPosition( pos ); + this._ship.runAction(cc.MoveBy.create(2, cc.p(Math.random() * winSize.width, pos.y + winSize.height + 100))); + + if (MW.SOUND) { + cc.AudioEngine.getInstance().setBackgroundMusicVolume(0.7); + cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic, true); + } + + bRet = true; + } + return bRet; + }, + onNewGame:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(GameLayer.create()); + scene.addChild(GameControlMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + onSettings:function (pSender) { + this.onButtonEffect(); + var scene = cc.Scene.create(); + scene.addChild(SettingsLayer.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + onAbout:function (pSender) { + this.onButtonEffect(); + var scene = cc.Scene.create(); + scene.addChild(AboutLayer.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + update:function () { + if (this._ship.getPosition().y > 480) { + var pos = cc.p(Math.random() * winSize.width, 10); + this._ship.setPosition( pos ); + this._ship.runAction( cc.MoveBy.create( + parseInt(5 * Math.random(), 10), + cc.p(Math.random() * winSize.width, pos.y + 480))); + } + }, + onButtonEffect:function(){ + if (MW.SOUND) { + var s = cc.AudioEngine.getInstance().playEffect(s_buttonEffect); + } + } +}); + +SysMenu.create = function () { + var sg = new SysMenu(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +SysMenu.scene = function () { + var scene = cc.Scene.create(); + var layer = SysMenu.create(); + scene.addChild(layer); + return scene; +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js b/samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js new file mode 100644 index 0000000000..c947d58903 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js @@ -0,0 +1,56 @@ +var EnemyType = [ + { + type:0, + textureName:"E0.png", + bulletType:"W2.png", + HP:1, + moveType:MW.ENEMY_MOVE_TYPE.ATTACK, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:15 + }, + { + type:1, + textureName:"E1.png", + bulletType:"W2.png", + HP:2, + moveType:MW.ENEMY_MOVE_TYPE.ATTACK, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:40 + }, + { + type:2, + textureName:"E2.png", + bulletType:"W2.png", + HP:4, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, + scoreValue:60 + }, + { + type:3, + textureName:"E3.png", + bulletType:"W2.png", + HP:6, + moveType:MW.ENEMY_MOVE_TYPE.OVERLAP, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:80 + }, + { + type:4, + textureName:"E4.png", + bulletType:"W2.png", + HP:10, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, + scoreValue:150 + }, + { + type:5, + textureName:"E5.png", + bulletType:"W2.png", + HP:15, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:200 + } +]; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js b/samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js new file mode 100644 index 0000000000..554d322aa1 --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js @@ -0,0 +1,94 @@ +/** + * Cocos2d-html5 show case : Moon Warriors + * + * @Licensed: + * This showcase is licensed under GPL. + * + * @Authors: + * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada + * Effects animation: Hao Wu (吴昊) + * Quality Assurance: Sean Lin (林顺) + * + * @Links: + * http://www.cocos2d-x.org + * http://bbs.html5china.com + * + */ + +//game state +MW.GAME_STATE = { + HOME:0, + PLAY:1, + OVER:2 +}; + +//keys +MW.KEYS = []; + +//level +MW.LEVEL = { + STAGE1:1, + STAGE2:2, + STAGE3:3 +}; + +//life +MW.LIFE = 4; + +//score +MW.SCORE = 0; + +//sound +MW.SOUND = true; + +//enemy move type +MW.ENEMY_MOVE_TYPE = { + ATTACK:0, + VERTICAL:1, + HORIZONTAL:2, + OVERLAP:3 +}; + +//delta x +MW.DELTA_X = -100; + +//offset x +MW.OFFSET_X = -24; + +//rot +MW.ROT = -5.625; + +//bullet type +MW.BULLET_TYPE = { + PLAYER:1, + ENEMY:2 +}; + +//weapon type +MW.WEAPON_TYPE = { + ONE:1 +}; + +//unit tag +MW.UNIT_TAG = { + ENMEY_BULLET:900, + PLAYER_BULLET:901, + ENEMY:1000, + PLAYER:1000 +}; + +//attack mode +MW.ENEMY_ATTACK_MODE = { + NORMAL:1, + TSUIHIKIDAN:2 +}; + +//life up sorce +MW.LIFEUP_SORCE = [50000, 100000, 150000, 200000, 250000, 300000]; + +//container +MW.CONTAINER = { + ENEMIES:[], + ENEMY_BULLETS:[], + PLAYER_BULLETS:[] +}; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js b/samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js new file mode 100644 index 0000000000..321a7a270f --- /dev/null +++ b/samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js @@ -0,0 +1,49 @@ +var Level1 = { + enemies:[ + { + ShowType:"Repeate", + ShowTime:"00:02", + Types:[0,1,2] + }, + { + ShowType:"Repeate", + ShowTime:"00:05", + Types:[3,4,5] + } + /*{ + ShowType:"Repeate", + ShowTime:"00:08", + Types:[0,4,3,5] + }, + { + ShowType:"Once", + ShowTime:"00:6", + Types:[0,2,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:16", + Types:[0,2,5,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:25", + Types:[0,3,5,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:35", + Types:[4,5,3,1,3] + }, + { + ShowType:"Once", + ShowTime:"00:50", + Types:[0,3,2,1,0,3] + }, + { + ShowType:"Once", + ShowTime:"01:15", + Types:[4,5,2,1,0] + }*/ + ] +}; diff --git a/samples/MoonWarriors/Resources/jshelper/jsb_constants.js b/samples/MoonWarriors/Resources/jshelper/jsb_constants.js new file mode 100644 index 0000000000..7ad903713a --- /dev/null +++ b/samples/MoonWarriors/Resources/jshelper/jsb_constants.js @@ -0,0 +1,475 @@ +require('jshelper/jsb_constants_gl.js'); +// cocos2d Helper + +cc.c3 = cc.c3 || function (r, g, b) { + return {r: r, g: g, b: b}; +}; + +cc.c3b = cc.c3; + +cc.c4 = cc.c4 || function (r, g, b, o) { + return {r: r, g: g, b: b, a: o}; +}; + +cc.c4b = cc.c4; + +cc.c4f = cc.c4f || function (r, g, b, o) { + return {r: r, g: g, b: b, a: o}; +}; + +cc.p = cc.p || function( x, y ) +{ + return {x:x, y:y}; +}; + +cc.g = cc.g || cc.p; +cc.log = cc.log || log; + +// +// cocos2d constants +// +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.RED = cc.c3(255,0,0); +cc.GREEN = cc.c3(0,255,0); +cc.BLUE = cc.c3(0,0,255); +cc.BLACK = cc.c3(0,0,0); +cc.WHITE = cc.c3(255,255,255); + +cc.POINT_ZERO = {x:0, y:0}; + +cc._reuse_p0 = {x:0, y:0}; +cc._reuse_p1 = {x:0, y:0}; +cc._reuse_p_index = 0; +cc._reuse_color3b = cc.c3(255, 255, 255 ); +cc._reuse_color4b = cc.c4(255, 255, 255, 255 ); +cc._reuse_grid = cc.g(0,0); + +// dump config info, but only in debug mode +cc.dumpConfig = function() +{ + if( cc.config.debug ) { + for(var i in cc.config) + cc.log( i + " = " + cc.config[i] ); + } +}; + +// +// Point +// +cc._p = function( x, y ) +{ + if( cc._reuse_p_index === 0 ) { + cc._reuse_p0.x = x; + cc._reuse_p0.y = y; + cc._reuse_p_index = 1; + return cc._reuse_p0; + } else { + cc._reuse_p1.x = x; + cc._reuse_p1.y = y; + cc._reuse_p_index = 0; + return cc._reuse_p1; + } +}; + +cc._to_p = function( point ) +{ + return point; +}; + +cc._from_p = function( size ) +{ + return size; +}; + +// +// Grid +// +cc._g = function( x, y ) +{ + cc._reuse_grid.x = x; + cc._reuse_grid.y = y; + return cc._reuse_grid; +} + +// +// Color +// +// +// 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; +}; +// compatibility +cc.c3 = cc.c3b; +cc._c3 = cc._c3b; + +// +// 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; + + +// +// Size +// +cc.size = function(w,h) +{ + return {width:w, height:h}; +} + +cc._to_size = function( size ) +{ + return size; +} + +cc._from_size = function( size ) +{ + return size; +} + +// +// Rect +// +cc.rect = function(x,y,w,h) +{ + return {x:x, y:y, width:w, height:h}; +} + +cc._to_rect = function( rect ) +{ + return rect; +} + +cc._from_rect = function( rect ) +{ + return rect; +} + +// 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; +} + +// point functions +cc.pAdd = cc.pAdd || function (p1, p2) { + return {x: p1.x + p2.x, y: p1.y + p2.y}; +}; + +cc.pSub = cc.pSub || function (p1, p2) { + return {x: p1.x - p2.x, y: p1.y - p2.y}; +} + +cc.pMult = cc.pMult || function (p1, s) { + return {x: p1.x * s, y: p1.y * s}; +}; + +/** + * Calculates dot product of two points. + * @param {cc.Point} v1 + * @param {cc.Point} v2 + * @return {Number} + */ +cc.pDot = function (v1, v2) { + return v1.x * v2.x + v1.y * v2.y; +}; + +/** + * Calculates the square length of a cc.Point (not calling sqrt() ) + * @param {cc.Point} v + *@return {cc.pDot} + */ +cc.pLengthSQ = function (v) { + return cc.pDot(v, v); +}; + +/** + * Calculates distance between point an origin + * @param {cc.Point} v + * @return {Number} + */ +cc.pLength = function (v) { + return Math.sqrt(cc.pLengthSQ(v)); +}; + +/** + * Calculates the distance between two points + * @param {cc.Point} v1 + * @param {cc.Point} v2 + * @return {cc.pLength} + */ +cc.pDistance = function (v1, v2) { + return cc.pLength(cc.pSub(v1, v2)); +}; + +/** + * Clamp a value between from and to. + * @param {Number} value + * @param {Number} min_inclusive + * @param {Number} max_inclusive + * @return {Number} + */ +cc.clampf = function (value, min_inclusive, max_inclusive) { + if (min_inclusive > max_inclusive) { + var temp = min_inclusive; + min_inclusive = max_inclusive; + max_inclusive = temp; + } + return value < min_inclusive ? min_inclusive : value < max_inclusive ? value : max_inclusive; +}; + +/** + * Clamp a point between from and to. + * @param {Number} p + * @param {Number} min_inclusive + * @param {Number} max_inclusive + * @return {cc.Point} + */ +cc.pClamp = function (p, min_inclusive, max_inclusive) { + return cc.p(cc.clampf(p.x, min_inclusive.x, max_inclusive.x), cc.clampf(p.y, min_inclusive.y, max_inclusive.y)); +}; + +/** + * returns a random float between 0 and 1 + * @return {Number} + * @function + */ +cc.RANDOM_0_1 = function () { + return Math.random(); +}; + +/** + * Associates a base class with a native superclass + * @function + * @param {object} jsobj subclass + * @param {object} klass superclass + */ +cc.associateWithNative = function( jsobj, superclass ) { + var native = new superclass(); + __associateObjWithNative( jsobj, native ); +}; + +// +// Array: for cocos2d-hmtl5 compatibility +// +cc.ArrayRemoveObject = function (arr, delObj) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == delObj) { + arr.splice(i, 1); + } + } +}; + +// +// Google "subclasses" +// borrowed from closure library +// +var goog = goog || {}; // Check to see if already defined in current scope +goog.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 ]; +// } +}; +goog.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)); + + // XXX: SpiderMonkey bindings extensions +// __associateObjWithNative( me, ret ); + 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( + 'goog.base called from a method of one name ' + + 'to a method of a different name'); + } +}; + + +// +// Simple subclass +// + +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.Layer.extend = cc.Class.extend; +cc.Scene.extend = cc.Class.extend; +cc.LayerGradient.extend = cc.Class.extend; +cc.Sprite.extend = cc.Class.extend; +cc.MenuItemFont.extend = cc.Class.extend; + +// +// Chipmunk helpers +// +var cp = cp || {}; + +cp.v = cc.p; +cp._v = cc._p; +cp.vzero = cp.v(0,0); + +// +// OpenGL Helpers +// +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/MoonWarriors/Resources/jshelper/jsb_constants_gl.js b/samples/MoonWarriors/Resources/jshelper/jsb_constants_gl.js new file mode 100644 index 0000000000..8b9d2f701d --- /dev/null +++ b/samples/MoonWarriors/Resources/jshelper/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/MoonWarriors/proj.android/.classpath b/samples/MoonWarriors/proj.android/.classpath new file mode 100644 index 0000000000..a4763d1eec --- /dev/null +++ b/samples/MoonWarriors/proj.android/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/samples/MoonWarriors/proj.android/.project b/samples/MoonWarriors/proj.android/.project new file mode 100644 index 0000000000..9e6dbbfb7f --- /dev/null +++ b/samples/MoonWarriors/proj.android/.project @@ -0,0 +1,40 @@ + + + MoonWarriors + + + + + + 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 + + + + src_common + 2 + PARENT-3-PROJECT_LOC/cocos2dx/platform/android/java/src_common + + + diff --git a/samples/MoonWarriors/proj.android/AndroidManifest.xml b/samples/MoonWarriors/proj.android/AndroidManifest.xml new file mode 100644 index 0000000000..4270c77a8e --- /dev/null +++ b/samples/MoonWarriors/proj.android/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + diff --git a/samples/MoonWarriors/proj.android/ant.properties b/samples/MoonWarriors/proj.android/ant.properties new file mode 100644 index 0000000000..f8af38bfb4 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.android/build.xml b/samples/MoonWarriors/proj.android/build.xml new file mode 100644 index 0000000000..ae419c802d --- /dev/null +++ b/samples/MoonWarriors/proj.android/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/MoonWarriors/proj.android/build_native.sh b/samples/MoonWarriors/proj.android/build_native.sh new file mode 100644 index 0000000000..0e10e99149 --- /dev/null +++ b/samples/MoonWarriors/proj.android/build_native.sh @@ -0,0 +1,100 @@ +APPNAME="MoonWarriors" + +# 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 + +# make sure assets is exist +if [ -d "$APP_ANDROID_ROOT"/assets ]; then + rm -rf "$APP_ANDROID_ROOT"/assets +fi + +mkdir "$APP_ANDROID_ROOT"/assets + + +# copy resources +for file in "$APP_ROOT"/Resources/* +do +if [ -d "$file" ]; then + cp -rf "$file" "$APP_ANDROID_ROOT"/assets +fi + + +if [ -f "$file" ]; then + cp "$file" "$APP_ANDROID_ROOT"/assets +fi +done + + +rm -f "$APP_ANDROID_ROOT"/assets/Images/landscape-1024x1024-rgba8888.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_image_rgba4444.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_a8.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgb888.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgba4444.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgba8888.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/test_image_rgba4444.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/texture1024x1024_rgba4444.pvr.gz +rm -f "$APP_ANDROID_ROOT"/assets/Images/PlanetCute-1024x1024-rgba4444.pvr.gz + + +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=1 V=1 diff --git a/samples/MoonWarriors/proj.android/jni/Android.mk b/samples/MoonWarriors/proj.android/jni/Android.mk new file mode 100644 index 0000000000..05af70ea6e --- /dev/null +++ b/samples/MoonWarriors/proj.android/jni/Android.mk @@ -0,0 +1,28 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := test_javascript_shared + +LOCAL_MODULE_FILENAME := libtestjavascript + +LOCAL_SRC_FILES := testjavascript/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/MoonWarriors/proj.android/jni/Application.mk b/samples/MoonWarriors/proj.android/jni/Application.mk new file mode 100644 index 0000000000..4b8115b893 --- /dev/null +++ b/samples/MoonWarriors/proj.android/jni/Application.mk @@ -0,0 +1,3 @@ +APP_STL := gnustl_static +APP_CPPFLAGS := -frtti -DCOCOS2D_JAVASCRIPT=1 +APP_CPPFLAGS += -DCOCOS2D_DEBUG=2 diff --git a/samples/MoonWarriors/proj.android/jni/testjavascript/main.cpp b/samples/MoonWarriors/proj.android/jni/testjavascript/main.cpp new file mode 100644 index 0000000000..2f2d1e0c10 --- /dev/null +++ b/samples/MoonWarriors/proj.android/jni/testjavascript/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/MoonWarriors/proj.android/proguard-project.txt b/samples/MoonWarriors/proj.android/proguard-project.txt new file mode 100644 index 0000000000..f2fe1559a2 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.android/project.properties b/samples/MoonWarriors/proj.android/project.properties new file mode 100644 index 0000000000..d5f90ebab1 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.android/res/values/strings.xml b/samples/MoonWarriors/proj.android/res/values/strings.xml new file mode 100644 index 0000000000..707408a4d7 --- /dev/null +++ b/samples/MoonWarriors/proj.android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + MoonWarriors + diff --git a/samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java b/samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java new file mode 100644 index 0000000000..9679124592 --- /dev/null +++ b/samples/MoonWarriors/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 MoonWarriors extends Cocos2dxActivity{ + + protected void onCreate(Bundle savedInstanceState){ + super.onCreate(savedInstanceState); + } + + static { + System.loadLibrary("testjavascript"); + } +} diff --git a/samples/MoonWarriors/proj.ios/AppController.h b/samples/MoonWarriors/proj.ios/AppController.h new file mode 100644 index 0000000000..10287bd13f --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.ios/AppController.mm b/samples/MoonWarriors/proj.ios/AppController.mm new file mode 100644 index 0000000000..3e3e5c9474 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.ios/Default-568h@2x.png.REMOVED.git-id b/samples/MoonWarriors/proj.ios/Default-568h@2x.png.REMOVED.git-id new file mode 100644 index 0000000000..8f5838f3a8 --- /dev/null +++ b/samples/MoonWarriors/proj.ios/Default-568h@2x.png.REMOVED.git-id @@ -0,0 +1 @@ +66c6d1cead373b45218424f6a82f370897e443e4 \ No newline at end of file diff --git a/samples/MoonWarriors/proj.ios/Default@2x.png.REMOVED.git-id b/samples/MoonWarriors/proj.ios/Default@2x.png.REMOVED.git-id new file mode 100644 index 0000000000..8843505b20 --- /dev/null +++ b/samples/MoonWarriors/proj.ios/Default@2x.png.REMOVED.git-id @@ -0,0 +1 @@ +84689888a14a2123d2b39f7f2f61be8c15207479 \ No newline at end of file diff --git a/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6c72c9f956 --- /dev/null +++ b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj @@ -0,0 +1,1254 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 15384E5716119CC30021DC07 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */; }; + 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 */; }; + 15384E5E16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */; }; + 15384E5F16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.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 */; }; + 15628F6C15F0F5E5000CF24B /* ballbounce.wav in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5D15F0F5E5000CF24B /* ballbounce.wav */; }; + 15628F6D15F0F5E5000CF24B /* cowbell.wav in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5E15F0F5E5000CF24B /* cowbell.wav */; }; + 15628F6E15F0F5E5000CF24B /* Cyber Advance!.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */; }; + 15628F6F15F0F5E5000CF24B /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6015F0F5E5000CF24B /* Fonts */; }; + 15628F7015F0F5E5000CF24B /* Images in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6115F0F5E5000CF24B /* Images */; }; + 15628F7115F0F5E5000CF24B /* js in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6215F0F5E5000CF24B /* js */; }; + 15628F7215F0F5E5000CF24B /* oldjs in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6315F0F5E5000CF24B /* oldjs */; }; + 15628F7315F0F5E5000CF24B /* Particles in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6415F0F5E5000CF24B /* Particles */; }; + 15628F7415F0F5E5000CF24B /* Silly Fun Theme A.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */; }; + 15628F7515F0F5E5000CF24B /* tank.plist in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6615F0F5E5000CF24B /* tank.plist */; }; + 15628F7615F0F5E5000CF24B /* tank.png in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6715F0F5E5000CF24B /* tank.png */; }; + 15628F7715F0F5E5000CF24B /* tank.tps in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6815F0F5E5000CF24B /* tank.tps */; }; + 15628F7815F0F5E5000CF24B /* tank1.png in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6915F0F5E5000CF24B /* tank1.png */; }; + 15628F7915F0F5E5000CF24B /* TileMaps in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6A15F0F5E5000CF24B /* TileMaps */; }; + 15628FA915F1057E000CF24B /* animations in Resources */ = {isa = PBXBuildFile; fileRef = 15628FA815F1057E000CF24B /* animations */; }; + 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 */; }; + 262829CC15EC7196002C4240 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 2628297D15EC7196002C4240 /* .gitignore */; }; + 262829CD15EC7196002C4240 /* Android.mk in Resources */ = {isa = PBXBuildFile; fileRef = 2628297E15EC7196002C4240 /* Android.mk */; }; + 262829CE15EC7196002C4240 /* chipmunk-docs.html in Resources */ = {isa = PBXBuildFile; fileRef = 2628297F15EC7196002C4240 /* chipmunk-docs.html */; }; + 262829CF15EC7196002C4240 /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = 2628299C15EC7196002C4240 /* LICENSE.txt */; }; + 262829D015EC7196002C4240 /* .cproject in Resources */ = {isa = PBXBuildFile; fileRef = 2628299E15EC7196002C4240 /* .cproject */; }; + 262829D115EC7196002C4240 /* .project in Resources */ = {isa = PBXBuildFile; fileRef = 2628299F15EC7196002C4240 /* .project */; }; + 262829D215EC7196002C4240 /* .cproject in Resources */ = {isa = PBXBuildFile; fileRef = 262829A115EC7196002C4240 /* .cproject */; }; + 262829D315EC7196002C4240 /* .project in Resources */ = {isa = PBXBuildFile; fileRef = 262829A215EC7196002C4240 /* .project */; }; + 262829D415EC7196002C4240 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 262829A315EC7196002C4240 /* Makefile */; }; + 262829D515EC7196002C4240 /* chipmunk.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = 262829A515EC7196002C4240 /* chipmunk.vcproj */; }; + 262829D615EC7196002C4240 /* chipmunk.vcproj.user in Resources */ = {isa = PBXBuildFile; fileRef = 262829A615EC7196002C4240 /* chipmunk.vcproj.user */; }; + 262829D715EC7196002C4240 /* chipmunk.vcxproj in Resources */ = {isa = PBXBuildFile; fileRef = 262829A715EC7196002C4240 /* chipmunk.vcxproj */; }; + 262829D815EC7196002C4240 /* chipmunk.vcxproj.filters in Resources */ = {isa = PBXBuildFile; fileRef = 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */; }; + 262829D915EC7196002C4240 /* chipmunk.vcxproj.user in Resources */ = {isa = PBXBuildFile; fileRef = 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */; }; + 262829DA15EC7196002C4240 /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = 262829AA15EC7196002C4240 /* README.txt */; }; + 262829DB15EC7196002C4240 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AC15EC7196002C4240 /* chipmunk.c */; }; + 262829DC15EC7196002C4240 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = 262829AD15EC7196002C4240 /* CMakeLists.txt */; }; + 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 */; }; + 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 */ + 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; + 15384E3F16119CC30021DC07 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; + 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 = ""; }; + 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = ""; }; + 15384E4C16119CC30021DC07 /* js_bindings_chipmunk_functions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_functions.hpp; sourceTree = ""; }; + 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = ""; }; + 15384E4E16119CC30021DC07 /* js_bindings_chipmunk_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_manual.hpp; 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 = ""; }; + 15628F5D15F0F5E5000CF24B /* ballbounce.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ballbounce.wav; path = ../Resources/ballbounce.wav; sourceTree = ""; }; + 15628F5E15F0F5E5000CF24B /* cowbell.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = cowbell.wav; path = ../Resources/cowbell.wav; sourceTree = ""; }; + 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "Cyber Advance!.mp3"; path = "../Resources/Cyber Advance!.mp3"; sourceTree = ""; }; + 15628F6015F0F5E5000CF24B /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Fonts; path = ../Resources/Fonts; sourceTree = ""; }; + 15628F6115F0F5E5000CF24B /* Images */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Images; path = ../Resources/Images; sourceTree = ""; }; + 15628F6215F0F5E5000CF24B /* js */ = {isa = PBXFileReference; lastKnownFileType = folder; name = js; path = ../Resources/js; sourceTree = ""; }; + 15628F6315F0F5E5000CF24B /* oldjs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = oldjs; path = ../Resources/oldjs; sourceTree = ""; }; + 15628F6415F0F5E5000CF24B /* Particles */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Particles; path = ../Resources/Particles; sourceTree = ""; }; + 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "Silly Fun Theme A.mp3"; path = "../Resources/Silly Fun Theme A.mp3"; sourceTree = ""; }; + 15628F6615F0F5E5000CF24B /* tank.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = tank.plist; path = ../Resources/tank.plist; sourceTree = ""; }; + 15628F6715F0F5E5000CF24B /* tank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank.png; path = ../Resources/tank.png; sourceTree = ""; }; + 15628F6815F0F5E5000CF24B /* tank.tps */ = {isa = PBXFileReference; lastKnownFileType = file; name = tank.tps; path = ../Resources/tank.tps; sourceTree = ""; }; + 15628F6915F0F5E5000CF24B /* tank1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank1.png; path = ../Resources/tank1.png; sourceTree = ""; }; + 15628F6A15F0F5E5000CF24B /* TileMaps */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TileMaps; path = ../Resources/TileMaps; sourceTree = ""; }; + 15628FA815F1057E000CF24B /* animations */ = {isa = PBXFileReference; lastKnownFileType = folder; name = animations; path = ../Resources/animations; 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 = ""; }; + 2628297D15EC7196002C4240 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; + 2628297E15EC7196002C4240 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; + 2628297F15EC7196002C4240 /* chipmunk-docs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "chipmunk-docs.html"; 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 = ""; }; + 2628299C15EC7196002C4240 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; + 2628299E15EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = ""; }; + 2628299F15EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = ""; }; + 262829A115EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = ""; }; + 262829A215EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = ""; }; + 262829A315EC7196002C4240 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 262829A515EC7196002C4240 /* chipmunk.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj; sourceTree = ""; }; + 262829A615EC7196002C4240 /* chipmunk.vcproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj.user; sourceTree = ""; }; + 262829A715EC7196002C4240 /* chipmunk.vcxproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj; sourceTree = ""; }; + 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.filters; sourceTree = ""; }; + 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.user; sourceTree = ""; }; + 262829AA15EC7196002C4240 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; 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 = ""; }; + A922753D1517C094001B78AA /* MoonWarriors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoonWarriors.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 = ( + 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */, + 15384E3F16119CC30021DC07 /* CCPhysicsSprite.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 */, + 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */, + 15384E4C16119CC30021DC07 /* js_bindings_chipmunk_functions.hpp */, + 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp */, + 15384E4E16119CC30021DC07 /* js_bindings_chipmunk_manual.hpp */, + 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 = ( + 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 = ( + D446FDA616102D86000ADA7B /* Default-568h@2x.png */, + D446FDA416102D82000ADA7B /* Default@2x.png */, + D446FDA216102D7D000ADA7B /* Default.png */, + 15628FA815F1057E000CF24B /* animations */, + 15628F5D15F0F5E5000CF24B /* ballbounce.wav */, + 15628F5E15F0F5E5000CF24B /* cowbell.wav */, + 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */, + 15628F6015F0F5E5000CF24B /* Fonts */, + 15628F6115F0F5E5000CF24B /* Images */, + 15628F6215F0F5E5000CF24B /* js */, + 15628F6315F0F5E5000CF24B /* oldjs */, + 15628F6415F0F5E5000CF24B /* Particles */, + 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */, + 15628F6615F0F5E5000CF24B /* tank.plist */, + 15628F6715F0F5E5000CF24B /* tank.png */, + 15628F6815F0F5E5000CF24B /* tank.tps */, + 15628F6915F0F5E5000CF24B /* tank1.png */, + 15628F6A15F0F5E5000CF24B /* TileMaps */, + ); + 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 = ""; + }; + 2628297C15EC7196002C4240 /* chipmunk */ = { + isa = PBXGroup; + children = ( + 2628297D15EC7196002C4240 /* .gitignore */, + 2628297E15EC7196002C4240 /* Android.mk */, + 2628297F15EC7196002C4240 /* chipmunk-docs.html */, + 2628298015EC7196002C4240 /* include */, + 2628299C15EC7196002C4240 /* LICENSE.txt */, + 2628299D15EC7196002C4240 /* proj.blackberry */, + 262829A015EC7196002C4240 /* proj.linux */, + 262829A415EC7196002C4240 /* proj.win32 */, + 262829AA15EC7196002C4240 /* README.txt */, + 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 = ""; + }; + 2628299D15EC7196002C4240 /* proj.blackberry */ = { + isa = PBXGroup; + children = ( + 2628299E15EC7196002C4240 /* .cproject */, + 2628299F15EC7196002C4240 /* .project */, + ); + path = proj.blackberry; + sourceTree = ""; + }; + 262829A015EC7196002C4240 /* proj.linux */ = { + isa = PBXGroup; + children = ( + 262829A115EC7196002C4240 /* .cproject */, + 262829A215EC7196002C4240 /* .project */, + 262829A315EC7196002C4240 /* Makefile */, + ); + path = proj.linux; + sourceTree = ""; + }; + 262829A415EC7196002C4240 /* proj.win32 */ = { + isa = PBXGroup; + children = ( + 262829A515EC7196002C4240 /* chipmunk.vcproj */, + 262829A615EC7196002C4240 /* chipmunk.vcproj.user */, + 262829A715EC7196002C4240 /* chipmunk.vcxproj */, + 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */, + 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */, + ); + path = proj.win32; + 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 = ( + 15384E6216119D5E0021DC07 /* extensions */, + 15384E3C16119CC30021DC07 /* bindings */, + 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */, + 15628F5B15F0F5C2000CF24B /* Resources */, + 2628297C15EC7196002C4240 /* chipmunk */, + D4545214156E28EF00887EB5 /* Classes */, + 15426FC415B5743C00712A7F /* CocosDenshion */, + A92275401517C094001B78AA /* Frameworks */, + D45446CC156DE73F00887EB5 /* ios */, + A922753E1517C094001B78AA /* Products */, + ); + sourceTree = ""; + }; + A922753E1517C094001B78AA /* Products */ = { + isa = PBXGroup; + children = ( + A922753D1517C094001B78AA /* MoonWarriors.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 /* MoonWarriors */ = { + isa = PBXNativeTarget; + buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "MoonWarriors" */; + buildPhases = ( + A92275391517C094001B78AA /* Sources */, + A922753A1517C094001B78AA /* Frameworks */, + A922753B1517C094001B78AA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 15426FC215B5741900712A7F /* PBXTargetDependency */, + ); + name = MoonWarriors; + productName = MoonWarriors; + productReference = A922753D1517C094001B78AA /* MoonWarriors.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 "MoonWarriors" */; + 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 /* MoonWarriors */, + ); + }; +/* 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 = ( + 262829CC15EC7196002C4240 /* .gitignore in Resources */, + 262829CD15EC7196002C4240 /* Android.mk in Resources */, + 262829CE15EC7196002C4240 /* chipmunk-docs.html in Resources */, + 262829CF15EC7196002C4240 /* LICENSE.txt in Resources */, + 262829D015EC7196002C4240 /* .cproject in Resources */, + 262829D115EC7196002C4240 /* .project in Resources */, + 262829D215EC7196002C4240 /* .cproject in Resources */, + 262829D315EC7196002C4240 /* .project in Resources */, + 262829D515EC7196002C4240 /* chipmunk.vcproj in Resources */, + 262829D615EC7196002C4240 /* chipmunk.vcproj.user in Resources */, + 262829D715EC7196002C4240 /* chipmunk.vcxproj in Resources */, + 262829D815EC7196002C4240 /* chipmunk.vcxproj.filters in Resources */, + 262829D915EC7196002C4240 /* chipmunk.vcxproj.user in Resources */, + 262829DA15EC7196002C4240 /* README.txt in Resources */, + 262829DC15EC7196002C4240 /* CMakeLists.txt in Resources */, + 15628F6C15F0F5E5000CF24B /* ballbounce.wav in Resources */, + 15628F6D15F0F5E5000CF24B /* cowbell.wav in Resources */, + 15628F6E15F0F5E5000CF24B /* Cyber Advance!.mp3 in Resources */, + 15628F6F15F0F5E5000CF24B /* Fonts in Resources */, + 15628F7015F0F5E5000CF24B /* Images in Resources */, + 15628F7115F0F5E5000CF24B /* js in Resources */, + 15628F7215F0F5E5000CF24B /* oldjs in Resources */, + 15628F7315F0F5E5000CF24B /* Particles in Resources */, + 15628F7415F0F5E5000CF24B /* Silly Fun Theme A.mp3 in Resources */, + 15628F7515F0F5E5000CF24B /* tank.plist in Resources */, + 15628F7615F0F5E5000CF24B /* tank.png in Resources */, + 15628F7715F0F5E5000CF24B /* tank.tps in Resources */, + 15628F7815F0F5E5000CF24B /* tank1.png in Resources */, + 15628F7915F0F5E5000CF24B /* TileMaps in Resources */, + 15628FA915F1057E000CF24B /* animations in Resources */, + D446FDA316102D7D000ADA7B /* Default.png in Resources */, + D446FDA516102D82000ADA7B /* Default@2x.png in Resources */, + D446FDA716102D86000ADA7B /* Default-568h@2x.png 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 */, + 262829D415EC7196002C4240 /* Makefile 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 */, + 15384E5716119CC30021DC07 /* CCPhysicsSprite.cpp 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 */, + 15384E5E16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp in Sources */, + 15384E5F16119CC30021DC07 /* js_bindings_chipmunk_manual.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 */, + ); + 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, + ); + "GCC_THUMB_SUPPORT[arch=armv6]" = ""; + 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 = MoonWarriors; + 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, + ); + "GCC_THUMB_SUPPORT[arch=armv6]" = ""; + 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 = MoonWarriors; + 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 "MoonWarriors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92276FE1517C097001B78AA /* Debug */, + A92276FF1517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "MoonWarriors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92277011517C097001B78AA /* Debug */, + A92277021517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A92275341517C094001B78AA /* Project object */; +} diff --git a/samples/MoonWarriors/proj.ios/Prefix.pch b/samples/MoonWarriors/proj.ios/Prefix.pch new file mode 100644 index 0000000000..b056d8694a --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.ios/RootViewController.h b/samples/MoonWarriors/proj.ios/RootViewController.h new file mode 100644 index 0000000000..a40c2edd28 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.ios/RootViewController.mm b/samples/MoonWarriors/proj.ios/RootViewController.mm new file mode 100644 index 0000000000..7a0d59ccc9 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.ios/main.m b/samples/MoonWarriors/proj.ios/main.m new file mode 100644 index 0000000000..e3dedca28b --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.win32/MoonWarriors.vcproj b/samples/MoonWarriors/proj.win32/MoonWarriors.vcproj new file mode 100644 index 0000000000..ea77235a92 --- /dev/null +++ b/samples/MoonWarriors/proj.win32/MoonWarriors.vcproj @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user b/samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user new file mode 100644 index 0000000000..eb4c2b142b --- /dev/null +++ b/samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj new file mode 100644 index 0000000000..e1d6d76865 --- /dev/null +++ b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {D0F06A44-A245-4D13-A498-0120C203B539} + MoonWarriors + + + + 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 + .;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(SolutionDir)extensions;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)CocosDenshion\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=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 "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)" + + + + libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + false + Win32 + true + $(IntDir)testjs.tlb + testjs.h + + + testjs_i.c + testjs_p.c + + + .;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(SolutionDir)extensions;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)CocosDenshion\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_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 "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)" + + + + libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + Windows + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} + false + + + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} + false + + + + + + \ No newline at end of file diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters new file mode 100644 index 0000000000..93bc5303f2 --- /dev/null +++ b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters @@ -0,0 +1,110 @@ + + + + + {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 + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings\generated + + + + + win32 + + + win32 + + + Classes + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings\generated + + + + + resource + + + + + resource + + + \ No newline at end of file diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user new file mode 100644 index 0000000000..314a27ae4d --- /dev/null +++ b/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user @@ -0,0 +1,11 @@ + + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + \ No newline at end of file diff --git a/samples/MoonWarriors/proj.win32/main.cpp b/samples/MoonWarriors/proj.win32/main.cpp new file mode 100644 index 0000000000..6a84a0be6e --- /dev/null +++ b/samples/MoonWarriors/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(320, 480); + + int ret = CCApplication::sharedApplication()->run(); + +#ifdef USE_WIN32_CONSOLE + FreeConsole(); +#endif + + return ret; +} diff --git a/samples/MoonWarriors/proj.win32/main.h b/samples/MoonWarriors/proj.win32/main.h new file mode 100644 index 0000000000..abe1c3a007 --- /dev/null +++ b/samples/MoonWarriors/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/MoonWarriors/proj.win32/res/testjs.ico b/samples/MoonWarriors/proj.win32/res/testjs.ico new file mode 100644 index 0000000000000000000000000000000000000000..feaf932a7465e435af6271bd8204c0145731a6eb GIT binary patch literal 47629 zcmeHw2Ut~C_C2VmbW{*T6tMvI-cS^5*boF23l{9X7erK4RIJ#0@4ZH&F|j4F#B>vr zXks*zOomCAk(tS4`u?wV?mO>Ynu?N{`Tf7)`wsWLTh6XKz=;E-cIr zf0gWl+t}F!;#03)#`mi;?CiSXTrj?dA*CSM<39D5VjS}OKRV3LWoAUl(3zc_(`R*Y z{vf%FOUA6Ou1^Y_y5Jd8O2X&oP09GZ*-@@f=Eb-^nIG%+WI<22Ckx};pDga{{v@rR z`;(>pJ)SHd&OqnN}#(6&3Jkj&XmdTz^womhV zvSYee=FXXAKiNIA?54d*W!vwZ>*0}?{4*ko*M!XblDoS64(VUBBVFZL3GXV9Q)YH{ zk;G0eG977ZgtJWU;4Bl`JInaCPBONQlZ*~`l96FfGNQGU3`ZK;DtF@fQMhkRJ3NQy zCn3+N$UiaKRgz=fBqh#WQv13~+JI8BJfXCt4=XKeMwXHFqsz#~ah|eiyr*oQ=q1}G zd&%~xWo5_ova)-ox9pkaEqjx_W&a!>Ihf+}heHdzPajMz8=^6Q9u=D%;ZhSafATzX zQ|6gnAZte#nFJZfwsBT64Q}Zq1DZQY?X(!*bxKM^trF6%MhOWIE+MT0 zi%ZLD#U-Swk(yhMEvuD~R)HlXtUB(kRZ=?EEh$|aI7)Zq)icCN;#)h*;C3!DvZJd^ zjB=A1J=|q>9}ihLsFbW6UPjhIew4Xvo8qP9-Z=xZCmC|@o9!(J=K9E?`Q_yBf^u?n zVL3UL=KJ9IBHtFoV0wEe-(-~g>`0e?KCQf!+$fXDDBrPd4VeeEaFjlH$Cw5sC9-Y_ ziKqz~f(+RjRdSFz6^cm>-(phLyO{WwDJs6Dib`3xB2vbsh?I7=Bz*RCErRpLb$_p7 zQmtGusae56>Q^o<&5&PMZD0aCqM89;U@@pYuz=o8j&+w={X8UfaA{dN+EX^7>~|)X zRb{>}*+dJ5pJEc=Sya3rpK}R2DOS`@irCwUy#V4V0s6345`JY*008Dp}HA+}(;v=~52j;ZaPS zp$j?hDPGJ@Dg(cEs7H|~_nxhsrGHyP?s3s>G7a`%ZvRq}HoUZ~rv6X$lHIe)TFTtV z&~?b2t;|Zo+V z54uj7?d|QQc=6(p*Ig=B^p)V?%2K~xurz8^LmDGBYZ@$}Evre(7XJ9|BLM+!z{CO1 z*sJH=oa`kW_Fz0@o;Scl77vB4k3yZF;3->R=V04m-+U}(o>SM$TXfx!`<2yxa()fu zUSC08+f-35ZK?39=h6MVLDSnAfPFAWTrCz-T(xOGEvYot<5zR;{{t?@kgK87HC0D`Hm8OSnn(kr@bE?w6%{B|tGY=M*hg2?hoN2FWbYhrIm|M*$bB4k-B#wx zz8Pf>UB9@&Qs!GIyOLY3@2(_o?yL0D@(*t5C}o@tefRP4RdUD1^px1xUZRftj1<$o z2kLoi=yfaU+&NO(we28HnlzJ^IM=>?gfwdwB2Ak%&y|`qX$~D~23@F!d%cxiaEATt z1zUIs?YYu**!5G(4PA#_x7s&V-m0Egl*^F&%67=U%U|ByTS?y9S4nOh40tK|C!)Sr zC~cH`*|OeB#<*U6C9YQ=m3mk(;IUK3&PwK9J$p;Bsg?A^XX-~t^A;+x zjx+-nMha2qnl){SdzvE;UvY3in}Yf<)^)CUd2JZhnt(5bdQde0sRL_zrOt?zTW^DHEOKPnl)DzEnFgt z7cZ0P(`L%Z5u>Gl{6L9E;;~QfevqfV^z0F*o{d6XY1giU#KiQFe#oP5pLk#sCmlO= zk=Cukq(w+;iR>Bz8&Xb+p?xfkzSOKCWt80KVAt8EUEEkv+4k3=>z5%n>-n`^&~;Vj z0rECvzje5>ymPd&+&NbHh0DKBQ%5O*cW`!gR^>i8VVEQg8lqB4$^w}-EfMv$yEG4J zAz|U+GGxdwS+jP7%$YM!1`bHD-b<_~=fHu3W%8t{G9z&o>PJ_pTd$r31_ep|1`S|0 zJ4^50eWfk1qRvEh3&pX#6h*t>SGJgJPbr7C+-TD%x3+JT`}!V>u3O6d))6JQynCXG zynm|73&}sRgNu|b#(s^xv$g>zS5amD9%TRUY*qRATvfSyq3Uy&|J*27N$HM0H^!#kmbR`F+Ve>h zr^v(!lO=J+Ea?T?N1b3_*2&RMDwMaA#`W!_M^rKC(8gYZsu~!yZ5uB0Qc~4(6UI-H zL zJumb(*P|auyUseU>>K2M=U8RPU0Epi2WP6H%pv#rYVzrYYI5(jYR{B^4$3>FyPIGx zLKa}$8Pm9=vUwgJrDW=q>8R&3)G;Y(j`;gmQtwFH#B#4++fFvGFC~BZIat1VR9WI; zF%GPNYh^rS=FDW7K0Q%APkRv*R9VWR+}niO%bgp3@{hk)m-A|^4aTw^2Hm0 z`O6QvjWRdnPVMC`n1@kgQ!3%K_!(wJ35twEgL3t=gyb8Xb+}MpDAwcZc+|*BC=yK zx%*)ylz*_id8NFBHn&&yqqwE~nSb@_HKkAAc=V~+Z)z$XBRWdMhV}8gMWr(44X&WA zQ}&H=qs+D3s?0A3%7d$r{mmeG_;ygX^4GdPFUCz$dm81vsJDltVU7XwZW4hx4*q_t zR;?v1ZK*6+uu!FW^A<@P^yheuiS?hhuM%`Uq=}s*#5+h-Cwr+8Y$u+m7bQ!Ul%cTs zsi})pngQG4hVh}hyPX6=KiY)a$1<<}Jxi40e&n`jNF9%u59CE)EEMMOUmdCe(4f!p)PPymzfb7t9 z%DotK3zU5s=G@XCf4Ndc)VmKFl%V8KTf9`5lIJXtHtjlE%b)K^9iY9Z-KYNgl|z4} zl%dBiE||NSJRNx~Q_rWQER^!)%d2N7tFI4iC!V1`xZ%44#y#fwfhtvlp!adozkfXX zRvoN$L*w5Nb7+^*?%jjjpR=B`%&(!$ud~d9<2zbFUK zSFTc3=FMMZeLgL1xwJ;VhS!K2b-g6oK|aIp<~&))YSpeQT`{JLj~^iE>D^&Fjk+I( zd6EX0gDZ{pDRqjs+}FBJxou@G-`uXQ63ZWDo<+G;nPX0oHEY(Xv=+z7Q)kMc!6RW8e6zi)`MvdL+ONL-2Fa2o$Yb?dmB;es z=`vyB46FUr_vUqUbaaxC7Of?sV^s(-5nep@b0Z->hxq;h5nAtW8Jz9GBatObnO-+PEJODCa>pt zE}(K%32zf29U{8O;K9R@&j1-eu8P8a!r(IU#TAQvv*@}}&vVO83@ATzJxiClAveps zlp*(s(y|tFO{+(iR&$X2{a(G|WXJZMvTf^jmA2#a66kN={=;Ozpb^qCv@P`4u#;vP zhzrYY$gnYzoIGE)TApV<+qdnI#mHmmi1E@sqN_MM=7oX1_*L+imaW>V)GaDjMvNFE zD_0JYWlQTS`4f72Sjs%eV&5oZ-m+`?q3c<+Z_7ECKEx>R)tFPH-0R0+PIauOtQ=8B zY6lqo`H2%I%HF;EWY@0UD(&92M|SSmDFY#UT%QDqA2?h(c8-!tC?|J!4=Giuv{b8B zU816U$>3q*WEf=Jym_1Oxm`PrJdC{d$b?BVlpe+P8H74sU)<5hA{M1emysHnQ)$(@ zy@a$3S1BQ32>QLJZlBYo3c}GuBlM=4Uk=} zt4#2cWspAz^VuxVMT^qp;DJLbZQi^^_Uzdw2M->SOcNU=Tp zOV2or@8XB5G%#VLtXQ!c&mNTh`wnDJ`wz&bjay{c@Nv?o-w>rwZQ6B~X3bkk^A=$$ z@pF@Aq0*&mv`iR3QO1m!0Q)yejvi^Q-mM4Ze_DB)W!LgU*Rxp1S6g%)YiO#>H*Sl&%A@6otPOKH@&h174@ z9Ov4h+{a+7JVhoYmHS<&@d{o%J8GXR*AoekdEE>(+I&DP`4M zE7#FdVF$fDilF^+kUhKi$btO_rGEVevTfUTg~f>zC)M%j(c?0H!Zg^iIO)`-hji}R zLn5Pkqiq-^Tej?w)2Gh}?`1jw9XNjc1U{cKrIT{%)M+_z@UV;mmMvPg!T7(Kksy0( zjC;q99glGX#~ssDA7aaviL!rxQziev9v%gjf8D4uS*o6M4FS5Y%bap^Eom3}(h${J%1s&1y>i}q@0l}a zp|`6b>ly30Z27!$PL3Tr4*90a@ZqCmz`z6wHA5)+f<#PO-ng+NvQ zb0(B6u>7d!SzEDgxQ%NmD098Gz%`Y9STp9@>HMK((1)|f_|_j|&6?`Bl9Fc0n{U1) zZ@h8&h0>TYV`TN})pG6Xb=c6oau)hy&g;mLqq2Sb4%mpJm>-ypanjseDH-#N=g&>W zTyr_q*IbQxFmwHW)@Rm#*taaD>nQU*rZwY(kXx@Ar;hLxN662>eXv<>C)@+rscanpVyJNCC->B?c24NrAwD$?r)G>xqQW%7q6c>bqe`il0#@) z=FXif^XJdcmFCTxFR#2ZQ33;6oci*=mq$=2X%a*P3{`()uojdQU8aRNegW!;j?Mci&U? zkUGNaITQ7yM)ew)4-AmYD0|+Y^B$gK9aspPla{tbrNxWWFy>2BpI4%7O5KKbNR%mXJu_Xo-+ zcR$H?P2cz4d+(!tU$5%O^5x4hUR;j(f`ynnodmhl(N|cCK5$F*F0q~5Gdad)wo^{69UQ<*xjw3-8~U%x)|{HA>R>8D8d#wcX^gY>*_aEea9p`B~SFKtFOxIY`_U&s> zAG%6JL?o`IpiS~ra}2Lz-t$@dp7T2O|JdSkStp?DTt_>@HDjzFavja^k1*Dg&cI*d zB+hd^iR*`4QyCXuTFDq49W5Cd8A?vd`uNdf^l=YMxpL)TAFs-Iy5lQ*ce7VAeBF04eKCmMY*Z}bHRVtnKvjp{neS8o?g_lX7NKe41-ma69{ zQ@wV29&0J)wNt&Gq-5WVwT1naUT8cfVHSgLiJf zBmAt-7v%T|II^#~5#x+an>HhDlC^6$qduje|5**~eNi=MPCL9TxnS+S)&t59`<9if z%s0V5g6n8o{Vio~tfOJQ+`6{FHN+9UOQ|`baIEir|NU|Ujd$|soP(=rw0 zNcqpMDxal%L+BHOwNt%jtk%laI-0R|$~6^Z9nHFSDo3#9%K2vYi?(myE>E6hNoMBn zo|$Mb&YwRozx&` zcFNy7vS4FAGd`3bx}KGD?ewx`&6xF^Wlp)do@8D-<+{rISWg-|z_0^s3+~^)FMs&M zAD)@08*KM@|Gj(nWXhB&knM@-xj$n3a}0f?UFaL{QR)8uEf@nBbEIzY8Kmq^STEZK zKOeJ91^G<*;Rls<3A#>yAmtN-HDj(Ja{W-3xmr)cI@+D%mh~jat=15+w(us_nySE0 zk2=8d+28;E5Bd4$pP!ok@|VA;w!eM*_V9&itj2mg$LId~*S{)UI40P?f4`bnc0xCZmIDM zu`u6D+rako$dMyzZt3^G--r4UuJql%d@;F)Iep5wDXqNh#2j})yy=O#3gnaYOH)8(#)1Uq%lvV%z z?Qeg}_MPXc|5vVDQL-OBdQ?96U=PN~v8sRPi}|;U&`T`?%l*My1#k29^E^`ixAq5Q z-JorQe}wXhfqw+oPPtaD{RDJ*b8UfZN%uL&j`gIk@cVjxo%4>@VIuHx=;t_!8~U0{(ZA)omHGW&_A}*&>{*5{ zkgnreZey+7sN+~iZVN+fphY)_Jbmy{x=BpQrq=Z&`QfC!ot5b^PP=#@eZtU6na(4$EAx zqdm%JjvaZ*j^%z>yDWxrc`+G3e!ObuGcz-#M~@yDC%>=oV0%Yf&p*}+jvo(TUj5?5 z!4;mfOAL3j~~Z;S1NoP%BuUDHE@zU(8a=(H)mdyAF^j@ z`=x{flp+4aJ=wI97! zODpZh%43E$7TwTvYy3c);KTala$x9ztp)$kpIi;f!~^aVt%RL zdH{U;$9gE+)}%=j`14nW?DkTzyn}4T7><4#ztnH%m+#j%gMW>3xmr-Wo?m`XJAW5# zO5?hYN`AHn^d)N9*jaA>!Z!YC@AT+K(3MBGf@VLy9sGx<-B%db-a;SC6LU3`oof{{ zMtRBIU$AX|);mMyzdpKAb?~E`RU3SBEBMT_?tj_q)N%TPu}^dPNWj0nuIGCHTfuLA z^Hv4l2M?;2cyuE;1h(+YT=$?4QyAx1za}6~Vfk#I|GeCk=~nQ!-`oi52wk-PJ$x%L z6m{X%$G5BhR2VXw^Pv1U(Z^={Vm|-x{!E?!=62AVU%nOCdG1^U(VPC{ie0gXHv*dg zgZYndR{sF{kO|xPWE`V_76w>H2neZ3Ogs)uY#_^t+@S(}vGRZR&z9gC3 zr+Q_=r{eeUrTG@I$v1W-m0i9&$tOIgy~z*T#7<82!MAZ9aoJDhBY4p`T|S5M5&VXV z=}+q7V(?dVc99uO79I<7SunPHY95K_c|DQOG9UQQ&jwG$T=>tY(2tz4BJibF{`2sq zR{o_Hf9iDln8Ke<`C7uSQu&#JyMTVC29Jf8^2OQ;-@|QFY(99}FUjDufNv7oQu-z# z-P%8|Y(!2x$!np{C3STj3jO@c%V1{3&BFI#aD9LS1AgJ-!ACF#@y{c}$O*t0cxOof zAI88IPSPKo82#Xv-WRDiVg}>jN8PKjk$U2&6VLHlAKcdu&-4e+!9c|P4`H5&bsgE> zRmOn-Vgi1D3gS>^fcsz;{MJ(tr?3!l;Y;9?u!7jqhgJKpDt|`c3BNuoo)&J9T{GbG zWAbrRc*6JRAl6p2-xK|R5MP|CapZAQb2~>KiRp{tN!_z@hyXv$9YE|9j|ezFh!-)5 zX-F;+N9hUmcXIriq>g*9v?FcLGo9sLhAW;3S}L%^?d1hxVtUe+}cck1r{| zh*;{s#4b(^p{IW?D6ZhvQT36!NGz#`)IsVWaiorQ2Y(1L>_SreQ(BQbR`mb0xKH$^PgSZZFXy-tC zT2M?i-^nC!tr#3PhHkPxD~=oJ4S7$flkE_5LOd1s3Gl36vAEPCmOc(r*@7eS@^mdK zu8xQyDsGQBGJC|u+QWZ9C&oA#pLw2hVdO$_b;5JN-M2Jw1}92YVvPLj6JO|aXe~!+ z3q9_Hv2=8Zv-E21BK@JiLoL`&CboTn?V!?D_x+g z5r|`I15Th&=uvaj?M4B`r5@Irsi%R!wgPn1-KmHa2Ud)SM{z%Q;yfIm^KdRA6}^xr zFs)Y^^&zmNw1j<7I@`!ey1_2=40VxyZCxdyqnnI^zrh5|<4lLX&c@pRLiolmNBgyo zHWq$Td!VOmmo)DV@uYv1!A$`?fvMqFXW*%PZs2c3AB^*B{Q3dYRc5>j`k8ub!`DS| zve2%wJ&LF9q7CW+&K`}iwgoA#ncw}?;h7ekr$CPZ5oC@PSv1USlLve34g$*#rf)ZO- zS2wJcR+5@EYD=9u^`s8@b-=4r3#n#JOR9k*6TXvgr$PO?;3BDm*x4G0rLGLTy%F1o zI6~N7b9vQ5TgG;2vn3X02kQ84-OjUJLYrjpO+i2NXy;D=Pg|WQM~Th1Qu|$zpT*!K zGW>Af*i!LF^#3yo1HWhGK`uHU_|lkV=9*X@<@KErcFao zf4jgRI!f^@kw1o9OXOYRXL6-9XaN0f*cdw8$i%Od^LuvgCGs%UuW#@#b?(#N`ZkKF$DxX8`Z%JQM;Hmx4G;a$yYkpB& z8^e}rd3dajcm(1`zM>clXH)m+9^m#d63=z*(oNX{@>fxp8MjS7E82$;*oScFw*Jm@ zIa5>1xrT^m3khk4820)ov-0Re*xJdu7?#4@uB`%Xm=-BgRN2hFefop%sgL40BG*yQL@ub-t;3ZKXx}aZell?ueyDJ1 zO8zV0N)D~gow_RS3vy+VBPzettZ572-V){56ue4R;FoCYH`GKQcR$*x?CnxMb>70I zWYl?orK5&lu;C+Wa0|gtbid&n3}32W1XprQYCWYNMJsSYk!z|qI3UQSr4w<~oLj`W zOXseNbBsFOw@oKlD_4Q;Kkj0SHNIhe@5)gq*&C50NCTfkX!a1m?cdML`I z722~F;GYOYf7pg?2<8+F4mLm4&RhGUR_;BM4b8vK!@nMQ!rxl?Bf`HHzIla?>uAhZ zmBd=S#x)dpki&{t=tO=lrjdvcNSD*F!{kyl^61RuB~icg4mk`qilhhsv*P^H_Qz=cMhF`g&3vBL49f6It=B~7TC6d?^O->Put#eEc^@4gF8*}#$mjq`l6eS zzNopKzXltcv(9TB)jpK;n}yGCq2WqSnhxNW)tLJE`6*0?4jG}iw*~_j;<0@BD&V*c zwzHQS3((K12>SA_Zm#I3){|MubL8BsuOW60@s=nD@^Lt0zMj+mr zG1tUo)#~+#wVR^2c{Ki<2cYkU=5*uvX3d++;Ug!6d`85SdFVvWKk~bcA2(5s9Y2j& z?t#iLl+TeLhMX{Fo;R#QsebZsJV)NUc8HM;508Ld=?HsX$*KnxF#p52EES^zOrN*T zs~86Ox*9(1hOaMp;9d$>>gZhZ(}FXq4(3rcR%|=S>8E+#hzYq6$4!`Iy@&iZ_CH;g<%{LXw@wF-r8I1C@s2}&PXMmjOS&4{lbJ9eD9*AbjK9^g%0*kq4A^-G5x2j zzA&zedyJT3O=&ddwDp*uylZ2}j91)o)G2;u+cbO5d?^85DXmw;f*4fvvs1it!PSf- zIjM*b?;8W$R)VjPcrq`YANlB3q_4(&OG(8&NB$=AP?5hbunIV6DuTxf+pxFWWC zzAUs=Yh@QAA~3dto$l1B8+a^RtNAjm6N@L7&DIySw)2))6UA4j>-;Iyd8;43;g3#V z)lV)I99OfBYA(CF{x)6ZJCnnYe11&S+m-3-5L+Isu%e8ttJJRmaP&0*w^?jt5t%&B zQTp{Nrg;8{jVtuFV#RWZ)!V4rIh7x|I>1-5X3a*}%MOa?n>={+YS~HG2z!}0)=>ua zbC4ztfHU$?9AT&vn)8pm8@=NCNcZlsiu;cIciq7O*tKhYtL-R)a@;cakR#I!bOpa;A~9pL6>xZ*t$Tt)BsY zH_a26nwkcllnLrO@1cz3x+33W?doMb9495L~t_9saYWmHnt01YhguqH_P!N-B>(|0!4&&v#W^gcZTZNV{UT z-L-1h0gqGy`UM@c?DIw1Uyv?9PxyXl2=jl3sOgc zrQ%(qU-9R!2R#?A)X@}6onHWMd&NPgxY*pK1Ljn89SRR`1OCVb-~yRtNlD-uSp%M! zX4ZSud^PH)A7myE8fouet2tr~Xu2v(?N~a?X#O zq~s%{{bOQ#J_p=%Zis8s*ehJY?O7f+k@fe?3F4|TsU;u3S5fhIlDCt3);cTPdi?np<3K=qVxN3{oHr0R~h>0vJ zpMKWkYqH|HNWLi6^-hb*z-aQ^gY)@luE*$%U)A&a+)I^G;Gn$<0RYN&1kOZ9u}H z!LoG8GAjpVs^X$dlaZq)03X}9R<~Q^Rb<;w3?n<*%eavxr5EgEgSvK7wKDn&=z9@| zP>exWrmvL+^HWvc%a*MKXW1Ba%@w-H{zToHb`sIXUdAGic(i?u>KXk5_AA(zWBF)I zd2EWggWi|}ii?Yv$rIyX0}P%(7Z(?lgKbW{Bj#&$ERM3F7hyxSj#~IDRZPxx;0b?m z!(Sh9IXA0YaaDC5?UI$hl`~W-*ecAv5?EAue_ginDVkuz&=vd00Rg1m53AjUyiU9yti9ajOuIYe3wCACrzG# zHm#`g3)Z}sRZMv(u3TVBE@5*&i}^7T*PcB&{}YdXU_4?ao8`iu_pv+q>ikmRNgZ859zF0y&584{j;}cWBwysxrOT~p*|O!5 zlspf%a5CC|+x!;ampV&%$$886n)nh+jt|I%%>Dwgr=E`)I~il&bhKSY-o$nOf+dQ7 zf_X6ya&N;=maDs~xJe>3!8wS4|{o6fy^i&*@D_5?9ZW$>Z zNAi(Qnvx_{ss>u`)z1)H%1qhWpJMw?zjS`rA_p~98<>AV-EtpNXA8DoPdC*PGdursnUKTD|CS%7}XH)wG11}_Uanqx*6N|KDeN_rul(0Av-r} zUOH;Vm$-r#I78w296Guhdr}co`Zfkz<^#wLuwwa2g)8|}bt1RPbm;34aAS@fJxP4a zSI8GzEwlMp6TFyHr_YuJ7+0{&biNzG&$?p8DsZ!=0H5drqIAKyE zbbmc~zQDht^XBg$O`kDaCc?%v4>7oo%w>|_=bG?4Airzt@DAw1cEkMPD9r1Q2G2u( zaEaHj;<_QVyp6A!cos1JmbfnN{3;iUX&{56vx)45MB`j+KEn2ix z+-uu`qdDyaXX{GvI`#plY5ag;imx@gdvC?{nxEV}Ul(iJBSuY>;Ugztu6mv@A9KF^ zOg`8p7=w`qcg(nHis!dP3EQ|YXa4Mu1Xr&G?(I&n%jAY_0~^yz&4&#cG8Wt+39wrY zthlBn`q*MT^Jtgy(oyp{;<_Z>J;UbDjJ>Fy!=IUcIr`mu_3Q<^f7HsKOCCIO;Tk-; zyD&F5T5-pc19kxTV#yy{uYO}GVczf0wG&g24kD13V{!S9h!o1#j#|@W<}i zy*CH1u95#P{Kmw|i83%@l(I9-w@%%Lid&cSE3EU57z38`^^=B;nq$wB2*qXGBD4*7 zi^HI&LuA~z@tAubFMIb40XI<-t4y=TmNj@F^5Fz9W0==x;<{{rM~3P>ng9X&4l_JT78i5$Iq!OhFhhrvZhj{3-GtU1LERQUGp zI~cZMq~h8oZ*NSGeiGL=K?V&O1HM-5Qvkq!4{Z=%ZpSu_e}D!rCj|W@1S`-^Spz?Fbt%VFKqJC%_hfS9#BH@Lw2Qwv;Pz zj90F{Q(pMxcaFFM(+pMT$?=PJiFhiXd*Df*d+e8K@V-uj|DuHlbU+7NA8TI9e8t~N zj$`t;E(KR3Iqt~aOO8LDA2wo~bdE%u3mlnZzj|6R3;a4`;O7lH7ZWJffJd$%2B{TaVvvg zxf^tvn9QHQSWcpRjv)^|Z{%fs=67>qJvjyLS+;G&lw8Xl!P`uoR0+NVnsd1x_=g)d z4pI9TO`kpk^O;k@$1@c+b~^GL4gO7of01$(2Cl1ymC49m=WX1?3QtQ61AXop!w>>L zVg5et*k<&n&Yyo($jj~6zltMynb2XNd2{@(`Ui+d`@Aue#2&r!4ehU z{SdTI6T$7iYSlW0+p8!a>oa(s<+X9cM#ZPkvNB)G_L=$P`h^P@)f_nIs@uVju1(tr z?7I|+zW*SsflmXs*esbbBQaZ=I57$9>*LW^G`Ql4>w5IFa@OsFd?&8JG(*?<&E`6< z<7~KBqsh0CzIf#=^DW#<<0529NtvfOLD&}{hw%AxujZYA)1}ug$?Ld>&oS|SCUQ#W zeD2bvHx$qI?Add`sdFXQ^_=%#y!aYy!WzZRwsOTv#W_uWvN?Eu)~s2IvznZ(<}_tW zGI%;CVqUkF)xI9U{9r+F%y}?Y#;eT7!GA1C;%8BDA z6u&V0OYCo5hWzB&E{t^f@)g;#c?*0EdV=ryEo+`n`wen=led@crRMV{r+0p7+O)ay z-n$dA&SRUycy&*~IZn;k64%Y+y)tsPOF8{-mA@!s7!V7_Jtn;^yaho)L0Et5VlC(S z^A{*y=QrMXF%IyY&yho$yyt;|LCOY@8~p9JZz`VsSI=KiWvHKF8PE=}?(iAf$|8>ZqApoZM;TekLB~bnV)8E7!RB{IfojN0;`ReA}~N8$Y}E8QSl$Soa&KILxn^ zeuv!SY$M6#O>SfMeP_>^1A9B~sVO-*RqlQ~Mw&M_{0J%_PU$}8tO|;y`F`RGUiu6j zTc`H)Hr08?+1PyUE&j}it@A-l8gb2;$h$(mW%5mtvzCdUsZ-p$fLz`B{PP^&#`EN; zZr(fu`x92e+{keBL5eHeL+)F19^^A8zuOh)?QL8;u>XLh%uSKh1*!R_1-Q0o(PHp| z4*^fQ(H6IA>ikle5?|s9JDOo@mn^*RmO7s;w$8*2ogc33A8>DjckjHXc-+bFe(Tn4 zh3y>Zj{dH=;&JWv?K|qaI?sFaNaP1+KU0@sR8$mr!avP*FFEGP6VJro=a`Rt@!Y2& zzm$sgxAp7Nz`NedI_KLzwp5|u3O@M^?Q^f(64uL2XDf_DSTqZr!?pXZ8U&Hb1l`;&2vrpf-FWZr;49 zaA#c|Hf)&ESMt)E?>B!Y=PApAe73&6z6LKoI1SDBm_KumfcIeI*J56M$&w`~=VjKk zeEAC1-{Rg7EdND|mSgXjWikkH2z+<0J-mLfa-rb5e~x#Cj;B3L{{MX9X;o|;_l`$w zov)?;8ix2t#@U>M4};cWPft(O#oG$IyWsv;>F!;5`0ye2ac%*hs7{LaZPcjI$|v|+(;}scO2Mo&~ zR?r>mK!*_Pp#7O+5zDJ}cm?|8-+c2c#TiYT!1VRkkHC|BK;6Ur7HEr;lanp?8TaUW z^E$FG@F_6+?6are`vv&@$!AYIiR~&=;+P>dmE4Vi$`-6$y9sNCW7QfX-#sC&^h;x^ z+pR+jd@{6-T4NX(^Q~hQRs5$BXQN^j$<2)T>6wU!B&N!rdAq-Co?A|eSk~#9!+-TL z_{SeScwpO$0Jh;<@Y$2gSL4rp&%XWkTiZRBJrA<&XQ0pFdF}^6-159`IsfqC*Q&3( za^*@j_A>8vuwunJ@S(1Tt*VImp}rV9?8O|c?R~al9qUE(Gv_nZ*P{!|W#o*Z&lXQ> zj$yFGEe%8L-WwKw<}2ii-(~nSw*+@5F{6JA_p$l@`|pMOLg@6}x8Gs!pf{DS@;-7w za-RTw{iTn$9cw^o{c4k7=0G=zxA3cuEg%Lwtgujjr5+3qplU%=1Yzk&9GdogfN3XTzUVx2#Bbd89lU|bx8{)IFAXQnG|OO|n$ zwr+)jDa(PlVt<+p_MP(9QA<4SW=mX%MMoK{sCD$seYUtI#@hr|GGYuk7UMYU#~(9M z*T1u-@4ovE*!~_qF^g6E#=RWO*I(vyM#gVdzis`x^;lcP8m2XEM*mc$H2CMTfX z2R{V%k!;-9*z=aS7DoR{>o#!(rWv_n>vWur#&auT7=URmpL^h__ukh2w+kj3e7<~F zasdDI)1NJSUfA}&;QlG(MCKkCwmmWQb$!JC7{H0;lKsBlpg-|jwFgV~^BF>Z<kS76LfVE?0Xffedjwexr3+U1Ng9NTweA_T+gJJ&tN- z2Lt15%>K8x;MW{n#n4&C7js_l=Rf}}KmPDz_5{3$S+4Vz`)EVBN6qJ-e=dLgS_^D@=fae@lKb&x zu{1wVT)|C{VeHj|xFt)wr20;I)%m@aIGckuu7B?DVD)EaTnOfZ*3C71NBGVm@Ux`O za$gVbRr0)vdzcU_&Iz#J|MSm3E52*m(6qEPb&dDv{QmT(pU`i8N9ic{ebH&_);$=D zY{fgIfIr&s!PI)HkNeiV+C4SA)xZ8F(7C7Y#X`N*iCA(Rz&xf-ohohGw82=oHaOb^rIWrP9-k-ad#SHlzwX?* zLshjtPfWQ_#MP@;(J$Qx{XC@7-o1x0kGLOYvT7c08TtI&&XFYz| z@6^}VxA&nXNwe79M-@z!vuDo|iUR$m zr>CP2zaZadsH@zkhuN?+(UXk+zYI8Z}b=uAEqLE|G0fLH@2^zi!o4V*1{D zN6}WLVoztAZ{Do&FXtDO6Srr5C$7LWL+>s3)OcFxXr6I4y3SuS?O&0HZzK0O2nGM5 z#x^oCQnlk|3_0h``ux0qoY&F1dhp;etfw4De|8n(w{7(!rqhe>&-X0+^1Du4(KcnU z@02aJ&e9iE?R>U6k2o8~Ex}H)&gb&E2cG%ucf@!2@M559D>Swo=W^dC{l~qIxNgp| z*0cWD2UGh#tM>mG+Nl%h8*f2Omd!u7Nj;}RnWxSVzx>V<*IP#dGITs`&c5hV>pb+6 z?b5?H3+B)KCi=acmp5ap_l+W!Tu&G=V#KpxRdc%s4je!~;3&oe$1(oe0e_)})_iLQ zm6VUrAIVSlU-CS0edl=P3~LO1j=pHNb{;y)eaLjIqS~`2pE#Rmy)*la9+(@~*v7=f zsPPoR+6uBQC|JXm}`ZfDj`j0l4^ScKR9)Zum3Do`FC<|MEisPx5^{sf83{SgG zT!CqZYUdIA@v*7SXN#wO!&K*?pE|Y<&%dxf9NOTISS=f`Uhm$$RbT(!y?YApgoFeI zBliQ-<6w>Jd+)ugd_RvLKZUs#VrugRSk z^vFj47cT3ky=y_P5m&TL8SIOyI?wpeobj}vv#(xL3Efx8@^bto0v#XHK3xfpPz8a5mZYJElE7wLN>k|9O7*m%4|zV*j`d z>gX5d7<#nz1#RbF_8mWit?AsxSjRWxx^Uq_1?yK|eT^~jX{5!l6Q0&Gpsurz@v^^P zn9mbe>`RxS#-FsIz*E;8_a&j0%{HNRus8iq~aTtZgXAK{C29qm&`%%R$R z7`eCbJ@os`&;7T2Ca(9d1%9V=lz9FJbTlUxx6$8oCNDX3m9aH%zkLl{u!jGXwhyB) zulw(=OF7^3Y2Uf`6!i3l=6QJ9z5lLjyVGs)$#v?~0WXMcZk)aoYZts+OvS%L4($8* z@ar2voBo^1et19IyqDHb9vjzndZ|6`{~dVh-*|j8_|n6hLEZHC|Au2oBio!8@#Nkb zqX(9e2N>u5H@x5Tyu;Tw14n;y#mfcu;P&&}|4ZNVKE@~Ju`TQOz)2uEQXpu)z)iA{k4@HRr8Y6NaY8n)CG4Yt*o5wB#v?aF@o_^?9Zq z9|dyN-2+Yq5@cvtgSCjF8!_mJV;vGOU?Pe2=s_>~a1l1(Vr;}ExD*VR;c{GoAK*${ zg{yH5uEh_r2|vPh_%W`>4Y(1Tu?08bX54~XaT~T`8*axPxD!9Y&+rHy!!GQ=HD*?7Q8l1+t6b9=?TdF+YQ1WtNsE|W?RwITYB9Au)*0pI(WcsKCKFsVweqN@ z7+S1zrP>?U6K0i~h;b?8oH)40`2T=sgJ`2T&3@8peTHhB}R~lVPMDMBT=rB~XCFFE=e1m_P zm5$Mv-Y^8eg)JCY!aQ8Fg~D>f55^Pf`V8Xbv54B+#@UIeiCSHYnX9x|IGT*8k+e^~ zI|JiExN4mn3zewQVbh{hRCWoZmyoNuuhZ%ZRfnM2M=L#eA!!fQJddNLMC zQ)JodbW<_;62P>k&*2!A&xw) zp37q$I)|M!)J%bc908|lWaf0WW+v1Nv~JC8O`oe(%&zZb@=X(Tsaj{(;6@8Yy~WWW z#8ktzWlCV>a9UlPQ{9s3!@=m^_EJ*@Ppy+r2L5u$BWe2SFz({>XFKl3J?O{1xQ~}6 z5L}!zOuakBiq!{dJ6Bnqm=gGKYUSc#J!!~^&_ z9>hbf>3J68#cWPLs>W%~`tdLZPSZ38f;FkZpLVhnkMe-2=>6D<0q5}CXBprmts6XE zSALGW$h9%#43$?bUb3`u*?G&)uezW*P*c02E?D2t*woz8s;mx2)Q-+BZOz(fcTA73 zOBiNyeNS)SMQ%@_*H=_r;&c?KZ%$BgF{dg6xu}ZeQF>G<}N-yq1_$>#q9|t(! zhZ<6*=BOS{bv#?f&Px^6^0^&v@KWx;k%mC9ZdnEM*Enam=9Lt>3yVEIpWmJ1n&&I> z7Q1|YS4klk+#a{DsHDhKT+BUNbvuf;SDx1Q_u(BJ!|yO~x|%0rHE$aaqZ)DDngxR( z-{Y=+&(7zlN*OQ|)o}~YWD7)zr_kr|dp#ZtgtsXDDj5WE0w3~;6bM!)O=WddU804p zpSF_dyB8;LGSxHR>Kal!4-NC@Oxj+b%U|Lu^!u!cg)UzSk6PsQalz&Hy4}S^-V*;1 ze2?R=%wOrw;cw(t>;iJjcp-;6{yVq3a`-!?P5*I!hR?0~{S*IUK~~?7FYqO6U`_wE zegrs3C~N$F!HDqxlq$nCk+?etYyLjd!tG(yCz1B1-&EC2#|-DUF`HHY6)=A)F@ z`Tc1;Ih#x;Zc<2YAe+fe>|6#6XZ$q zG?8ZhL2{V9N!}uFlVjvv@;>>1949BpN%9e0MwinnT1{){ z3L2yhw28LRHoB6As6xY3rJYoxYiT#t={joAB<-PnbOYT;FQu2!E9jN2v8zd6Jwb&zH;PfLt#t za#+4j-X`B6-z)EsACjMxpO#;c_sa+6Bl1!C9r=Cv1Npf8C;628wSzcp4%so*G2T(` z2smmTb&e)S#L?ln(s8w8pW}ezO~&mCW9*|WxFP0Gr#dJ3R4y^`$oI{2NH`yXyb B$+`dl literal 0 HcmV?d00001 diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id new file mode 100644 index 0000000000..ab880f0157 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id @@ -0,0 +1 @@ +46f10a6bf5c63f03ddf8566f392aa7a8f258d7e8 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id new file mode 100644 index 0000000000..56b3df641c --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id @@ -0,0 +1 @@ +97bca7d49fb6ec5c330f6ab6f5f49d335601a669 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id new file mode 100644 index 0000000000..a35d4e432f --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id @@ -0,0 +1 @@ +ca7905a1a07e2be3e02fbf329772c2c361400af7 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js new file mode 100644 index 0000000000..4d188d335a --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js @@ -0,0 +1,47 @@ +var AboutLayer = cc.Layer.extend({ + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); + var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 36, 100, 34)); + title.setPosition(cc.p(winSize.width / 2, winSize.height - 60)); + this.addChild(title); + + // There is a bug in LabelTTF native. Apparently it fails with some unicode chars. +// var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n \n Programmer: \n Shengxiang Chen (陈升想) \n Dingping Lv (吕定平) \n Effects animation: Hao Wu(吴昊)\n Quality Assurance: Sean Lin(林顺)", "Arial", 14, cc.size(winSize.width * 0.85, 100), cc.TEXT_ALIGNMENT_LEFT ); + var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n\nProgrammer: \n Shengxiang Chen\n Dingping Lv \n Effects animation: Hao Wu\n Quality Assurance: Sean Lin", "Arial", 14, cc.size(winSize.width * 0.85, 320), cc.TEXT_ALIGNMENT_LEFT ); + about.setPosition(cc.p(winSize.width / 2, winSize.height/2 -20) ); + about.setAnchorPoint( cc.p(0.5, 0.5)); + this.addChild(about); + + var label = cc.LabelTTF.create("Go back", "Arial", 14); + var back = cc.MenuItemLabel.create(label, this, this.backCallback); + var menu = cc.Menu.create(back); + menu.setPosition(cc.p(winSize.width / 2, 40)); + this.addChild(menu); + bRet = true; + } + + return bRet; + }, + backCallback:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + } +}); + +AboutLayer.create = function () { + var sg = new AboutLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js b/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js new file mode 100644 index 0000000000..d22c3b015a --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js @@ -0,0 +1,62 @@ +//bullet +var Bullet = cc.Sprite.extend({ + active:true, + xVelocity:0, + yVelocity:200, + power:1, + HP:1, + moveType:null, + zOrder:3000, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + parentType:MW.BULLET_TYPE.PLAYER, + ctor:function (bulletSpeed, weaponType, attackMode) { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + this.yVelocity = -bulletSpeed; + this.attackMode = attackMode; + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_bullet_plist); + this.initWithSpriteFrameName(weaponType); + this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + /*var tmpAction; + switch (this.attackMode) { + case MW.ENEMY_MOVE_TYPE.NORMAL: + tmpAction = cc.MoveBy.create(2, cc.p(this.getPosition().x, 400)); + break; + case MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN: + tmpAction = cc.MoveTo.create(2, GameLayer.create()._ship.getPosition()); + break; + } + this.runAction(tmpAction);*/ + }, + update:function (dt) { + var p = this.getPosition(); + p.x -= this.xVelocity * dt; + p.y -= this.yVelocity * dt; + this.setPosition( p ); + if (this.HP <= 0) { + this.active = false; + } + }, + destroy:function () { + var explode = cc.Sprite.create(s_hit); + explode.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + explode.setPosition(this.getPosition()); + explode.setRotation(Math.random()*360); + explode.setScale(0.75); + this.getParent().addChild(explode,9999); + cc.ArrayRemoveObject(MW.CONTAINER.ENEMY_BULLETS,this); + cc.ArrayRemoveObject(MW.CONTAINER.PLAYER_BULLETS,this); + this.removeFromParentAndCleanup(true); + var removeExplode = cc.CallFunc.create(explode,explode.removeFromParentAndCleanup); + explode.runAction(cc.ScaleBy.create(0.3, 2,2)); + explode.runAction(cc.Sequence.create(cc.FadeOut.create(0.3), removeExplode)); + }, + hurt:function () { + this.HP--; + }, + collideRect:function(){ + var p = this.getPosition(); + return cc.rect(p.x - 3, p.y - 3, 6, 6); + } +}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js b/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js new file mode 100644 index 0000000000..faaa03c491 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js @@ -0,0 +1,78 @@ +var flareEffect = function (parent, target, callback) { + var flare = cc.Sprite.create(s_flare); + flare.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + parent.addChild(flare, 10); + flare.setOpacity(0); + flare.setPosition(cc.p(-30, 297)); + flare.setRotation(-120); + flare.setScale(0.2); + + var opacityAnim = cc.FadeTo.create(0.5, 255); + var opacDim = cc.FadeTo.create(1, 0); + var biggeAnim = cc.ScaleBy.create(0.7, 1.2, 1.2); + var biggerEase = cc.EaseSineOut.create(biggeAnim); + var moveAnim = cc.MoveBy.create(0.5, cc.p(328, 0)); + var easeMove = cc.EaseSineOut.create(moveAnim); + var rotateAnim = cc.RotateBy.create(2.5, 90); + var rotateEase = cc.EaseExponentialOut.create(rotateAnim); + var bigger = cc.ScaleTo.create(0.5, 1); + + var onComplete = cc.CallFunc.create(target, callback); + var killflare = cc.CallFunc.create(flare, function () { + this.getParent().removeChild(this,true); + }); + flare.runAction(cc.Sequence.create(opacityAnim, biggerEase, opacDim, killflare, onComplete)); + flare.runAction(easeMove); + flare.runAction(rotateEase); + flare.runAction(bigger); +}; + +var removeFromParent = function( sprite ) +{ + sprite.removeFromParentAndCleanup( true ); +}; + +var spark = function (ccpoint, parent, scale, duration) { + scale = scale || 0.3; + duration = duration || 0.5; + + var one = cc.Sprite.create(s_explode1); + var two = cc.Sprite.create(s_explode2); + var three = cc.Sprite.create(s_explode3); + + one.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + two.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + three.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + + one.setPosition(ccpoint); + two.setPosition(ccpoint); + three.setPosition(ccpoint); + + //parent.addChild(one); + parent.addChild(two); + parent.addChild(three); + one.setScale(scale); + two.setScale(scale); + three.setScale(scale); + + three.setRotation(Math.random() * 360); + + var left = cc.RotateBy.create(duration, -45); + var right = cc.RotateBy.create(duration, 45); + var scaleBy = cc.ScaleBy.create(duration, 3, 3); + var fadeOut = cc.FadeOut.create(duration); + var remove = cc.CallFunc.create(this, removeFromParent ); + var seq = cc.Sequence.create( fadeOut, remove ); + + one.runAction(left); + two.runAction(right); + + one.runAction(scaleBy); + two.runAction(scaleBy.copy()); + three.runAction(scaleBy.copy()); + + one.runAction(seq); + two.runAction(seq.copy() ); + three.runAction(seq.copy()); +}; + diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js b/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js new file mode 100644 index 0000000000..e266118547 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js @@ -0,0 +1,75 @@ +var Enemy = cc.Sprite.extend({ + eID:0, + active:true, + speed:200, + bulletSpeed:-200, + HP:15, + bulletPowerValue:1, + moveType:null, + scoreValue:200, + zOrder:1000, + delayTime:1 + 1.2 * Math.random(), + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + _hurtColorLife:0, + ctor:function (arg) { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + this.HP = arg.HP; + this.moveType = arg.moveType; + this.scoreValue = arg.scoreValue; + this.attackMode = arg.attackMode; + + this.initWithSpriteFrameName(arg.textureName); + this.schedule(this.shoot, this.delayTime); + }, + _timeTick:0, + update:function (dt) { + if (this.HP <= 0) { + this.active = false; + } + this._timeTick += dt; + if (this._timeTick > 0.1) { + this._timeTick = 0; + if (this._hurtColorLife > 0) { + this._hurtColorLife--; + } + if (this._hurtColorLife == 1) { + this.setColor( cc.WHITE ); + } + } + }, + destroy:function () { + MW.SCORE += this.scoreValue; + var a = new Explosion(); + a.setPosition(this.getPosition()); + this.getParent().addChild(a); + spark(this.getPosition(),this.getParent(), 1.2, 0.7); + cc.ArrayRemoveObject(MW.CONTAINER.ENEMIES,this); + this.removeFromParentAndCleanup(true); + if(MW.SOUND){ + cc.AudioEngine.getInstance().playEffect(s_explodeEffect); + } + }, + shoot:function () { + var p = this.getPosition(); + var b = new Bullet(this.bulletSpeed, "W2.png", this.attackMode); + MW.CONTAINER.ENEMY_BULLETS.push(b); + this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.ENMEY_BULLET); + b.setPosition(cc.p(p.x, p.y - this.getContentSize().height * 0.2)); + }, + hurt:function () { + this._hurtColorLife = 2; + this.HP--; + this.setColor( cc.RED ); + }, + collideRect:function(){ + var a = this.getContentSize(); + var p = this.getPosition(); + return cc.rect(p.x - a.width/2, p.y - a.height/4,a.width,a.height/2); + } +}); + +Enemy.sharedEnemy = function(){ + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_Enemy_plist, s_Enemy); +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js b/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js new file mode 100644 index 0000000000..8ccd225c5d --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js @@ -0,0 +1,38 @@ +var Explosion = cc.Sprite.extend({ + tmpWidth:0, + tmpHeight:0, + ctor:function () { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + var pFrame = cc.SpriteFrameCache.getInstance().getSpriteFrame("explosion_01.png"); + this.initWithSpriteFrame(pFrame); + + var cs = this.getContentSize(); + this.tmpWidth = cs.width; + this.tmpHeight = cs.height; + + var animation = cc.AnimationCache.getInstance().getAnimation("Explosion"); + this.runAction(cc.Sequence.create( + cc.Animate.create(animation), + cc.CallFunc.create(this, this.destroy) + )); + this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + }, + destroy:function () { + this.getParent().removeChild(this,true); + } +}); + +Explosion.sharedExplosion = function () { + cc.SpriteFrameCache.getInstance().addSpriteFrames(s_explosion_plist); + var animFrames = []; + var str = ""; + for (var i = 1; i < 35; i++) { + str = "explosion_" + (i < 10 ? ("0" + i) : i) + ".png"; + var frame = cc.SpriteFrameCache.getInstance().getSpriteFrame(str); + animFrames.push(frame); + } + var animation = cc.Animation.create(animFrames, 0.04); + cc.AnimationCache.getInstance().addAnimation(animation, "Explosion"); +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js new file mode 100644 index 0000000000..3fcdac736e --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js @@ -0,0 +1,35 @@ +var GameControlMenu = cc.Layer.extend({ + ctor:function() { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Layer); + }, + init:function () { + var bRet = false; + if (this._super()) { + cc.MenuItemFont.setFontSize(18); + cc.MenuItemFont.setFontName("Arial"); + var systemMenu = cc.MenuItemFont.create("Main Menu", this, this.sysMenu); + var menu = cc.Menu.create(systemMenu); + menu.setPosition(cc.p(0, 0)); + systemMenu.setAnchorPoint(cc.p(0, 0)); + systemMenu.setPosition(cc.p(winSize.width-95, 5)); + this.addChild(menu, 1, 2); + bRet = true; + } + + return bRet; + }, + sysMenu:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); + } +}); + +GameControlMenu.create = function () { + var sg = new GameControlMenu(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js new file mode 100644 index 0000000000..d5aed4be94 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js @@ -0,0 +1,70 @@ +/** + * Cocos2d-html5 show case : Moon Warriors + * + * @Licensed: + * This showcase is licensed under GPL. + * + * @Authors: + * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada + * Effects animation: Hao Wu (吴昊) + * Quality Assurance: Sean Lin (林顺) + * + * @Links: + * http://www.cocos2d-x.org + * http://bbs.html5china.com + * + */ + + +MW.GameController = cc.Class.extend({ + _curScene:null, + _gameState:MW.GAME_STATE.HOME, + _isNewGame:true, + _curLevel:MW.LEVEL.STAGE1, + _selectLevel:MW.LEVEL.STAGE1, + init:function () { + return true; + }, + setCurScene:function (s) { + if (this._curScene != s) { + if (this._curScene !== null) { + this._curScene.onExit(); + } + this._curScene = s; + if (this._curScene) { + this._curScene.onEnter(); + cc.Director.getInstance().replaceScene(s); + } + } + }, + getCurScene:function () { + return this._curScene; + }, + runGame:function () { + + }, + newGame:function () { + + }, + option:function () { + + }, + about:function () { + + } +}); + +MW.GameController.getInstance = function () { + cc.Assert(this._sharedGame, "Havn't call setSharedGame"); + if (!this._sharedGame) { + this._sharedGame = new MW.GameController(); + if (this._sharedGame.init()) { + return this._sharedGame; + } + } else { + return this._sharedGame; + } + return null; +}; + +MW.GameController._sharedGame = null; \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js new file mode 100644 index 0000000000..60ee0ba738 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js @@ -0,0 +1,315 @@ +// +// MoonWarriors +// +// Handles the Game Logic +// + +STATE_PLAYING = 0; +STATE_GAMEOVER = 1; + +var GameLayer = cc.Layer.extend({ + _time:null, + _ship:null, + _backSky:null, + _backSkyHeight:0, + _backSkyRe:null, + _backTileMap:null, + _backTileMapHeight:0, + _backTileMapRe:null, + _levelManager:null, + _tmpScore:0, + _isBackSkyReload:false, + _isBackTileReload:false, + lbScore:null, + screenRect:null, + explosionAnimation:[], + _beginPos:cc.p(0, 0), + _state:STATE_PLAYING, + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + + // reset global values + MW.CONTAINER.ENEMIES = []; + MW.CONTAINER.ENEMY_BULLETS = []; + MW.CONTAINER.PLAYER_BULLETS = []; + MW.SCORE = 0; + MW.LIFE = 4; + this._state = STATE_PLAYING; + + Explosion.sharedExplosion(); + Enemy.sharedEnemy(); + winSize = cc.Director.getInstance().getWinSize(); + this._levelManager = new LevelManager(this); + this.initBackground(); + this.screenRect = cc.rect(0, 0, winSize.width, winSize.height + 10); + + // score + this.lbScore = cc.LabelBMFont.create("Score: 0", s_arial14_fnt); + this.lbScore.setAnchorPoint( cc.p(1,0) ); + this.lbScore.setAlignment( cc.TEXT_ALIGNMENT_RIGHT ); + this.addChild(this.lbScore, 1000); + this.lbScore.setPosition(cc.p(winSize.width - 5 , winSize.height - 30)); + + // ship life + var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); + var life = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + life.setScale(0.6); + life.setPosition(cc.p(30, 460)); + this.addChild(life, 1, 5); + + // ship Life count + this._lbLife = cc.LabelTTF.create("0", "Arial", 20); + this._lbLife.setPosition(cc.p(60, 463)); + this._lbLife.setColor(cc.RED); + this.addChild(this._lbLife, 1000); + + // ship + this._ship = new Ship(); + this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); + + // accept touch now! + + var t = cc.config.deviceType; + if( t == 'browser' ) { + this.setTouchEnabled(true); + this.setKeyboardEnabled(true); + } else if( t == 'desktop' ) { + this.setMouseEnabled(true); + } else if( t == 'mobile' ) { + this.setTouchEnabled(true); + } + + // schedule + this.scheduleUpdate(); + this.schedule(this.scoreCounter, 1); + + if (MW.SOUND) { + cc.AudioEngine.getInstance().playBackgroundMusic(s_bgMusic, true); + } + + bRet = true; + } + return bRet; + }, + scoreCounter:function () { + if( this._state == STATE_PLAYING ) { + this._time++; + + var minute = 0 | (this._time / 60); + var second = this._time % 60; + minute = minute > 9 ? minute : "0" + minute; + second = second > 9 ? second : "0" + second; + var curTime = minute + ":" + second; + this._levelManager.loadLevelResource(this._time); + } + }, + + onTouchesMoved:function (touches, event) { + this.processEvent( touches[0] ); + }, + + onMouseDragged:function( event ) { + this.processEvent( event ); + }, + + processEvent:function( event ) { + if( this._state == STATE_PLAYING ) { + var delta = event.getDelta(); + var curPos = this._ship.getPosition(); + curPos= cc.pAdd( curPos, delta ); + curPos = cc.pClamp(curPos, cc.POINT_ZERO, cc.p(winSize.width, winSize.height) ); + this._ship.setPosition( curPos ); + } + }, + + onKeyDown:function (e) { + MW.KEYS[e] = true; + }, + + onKeyUp:function (e) { + MW.KEYS[e] = false; + }, + + update:function (dt) { + if( this._state == STATE_PLAYING ) { + this.checkIsCollide(); + this.removeInactiveUnit(dt); + this.checkIsReborn(); + this.updateUI(); + } + + if( cc.config.deviceType == 'browser' ) + cc.$("#cou").innerHTML = "Ship:" + 1 + ", Enemy: " + MW.CONTAINER.ENEMIES.length + ", Bullet:" + MW.CONTAINER.ENEMY_BULLETS.length + "," + MW.CONTAINER.PLAYER_BULLETS.length + " all:" + this.getChildren().length; + }, + checkIsCollide:function () { + var selChild, bulletChild; + //check collide + var i =0; + for (i = 0; i < MW.CONTAINER.ENEMIES.length; i++) { + selChild = MW.CONTAINER.ENEMIES[i]; + for (var j = 0; j < MW.CONTAINER.PLAYER_BULLETS.length; j++) { + bulletChild = MW.CONTAINER.PLAYER_BULLETS[j]; + if (this.collide(selChild, bulletChild)) { + bulletChild.hurt(); + selChild.hurt(); + } + if (!cc.rectIntersectsRect(this.screenRect, bulletChild.getBoundingBox() )) { + bulletChild.destroy(); + } + } + if (this.collide(selChild, this._ship)) { + if (this._ship.active) { + selChild.hurt(); + this._ship.hurt(); + } + } + if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { + selChild.destroy(); + } + } + + for (i = 0; i < MW.CONTAINER.ENEMY_BULLETS.length; i++) { + selChild = MW.CONTAINER.ENEMY_BULLETS[i]; + if (this.collide(selChild, this._ship)) { + if (this._ship.active) { + selChild.hurt(); + this._ship.hurt(); + } + } + if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { + selChild.destroy(); + } + } + }, + removeInactiveUnit:function (dt) { + var selChild, layerChildren = this.getChildren(); + for (var i in layerChildren) { + selChild = layerChildren[i]; + if (selChild) { + if( typeof selChild.update == 'function' ) { + selChild.update(dt); + var tag = selChild.getTag(); + if ((tag == MW.UNIT_TAG.PLAYER) || (tag == MW.UNIT_TAG.PLAYER_BULLET) || + (tag == MW.UNIT_TAG.ENEMY) || (tag == MW.UNIT_TAG.ENMEY_BULLET)) { + if (selChild && !selChild.active) { + selChild.destroy(); + } + } + } + } + } + }, + checkIsReborn:function () { + if (MW.LIFE > 0 && !this._ship.active) { + // ship + this._ship = new Ship(); + this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); + } + else if (MW.LIFE <= 0 && !this._ship.active) { + this._state = STATE_GAMEOVER; + // XXX: needed for JS bindings. + this._ship = null; + this.runAction(cc.Sequence.create( + cc.DelayTime.create(0.2), + cc.CallFunc.create(this, this.onGameOver))); + } + }, + updateUI:function () { + if (this._tmpScore < MW.SCORE) { + this._tmpScore += 5; + } + this._lbLife.setString(MW.LIFE); + this.lbScore.setString("Score: " + this._tmpScore); + }, + collide:function (a, b) { + var aRect = a.collideRect(); + var bRect = b.collideRect(); + if (cc.rectIntersectsRect(aRect, bRect)) { + return true; + } + }, + initBackground:function () { + // bg + this._backSky = cc.Sprite.create(s_bg01); + this._backSky.setAnchorPoint(cc.p(0, 0)); + this._backSkyHeight = this._backSky.getContentSize().height; + this.addChild(this._backSky, -10); + + //tilemap + this._backTileMap = cc.TMXTiledMap.create(s_level01); + this.addChild(this._backTileMap, -9); + this._backTileMapHeight = this._backTileMap.getMapSize().height * this._backTileMap.getTileSize().height; + + this._backSkyHeight -= 48; + this._backTileMapHeight -= 200; + this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + + this.schedule(this.movingBackground, 3); + }, + movingBackground:function () { + this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + this._backSkyHeight -= 48; + this._backTileMapHeight -= 200; + + if (this._backSkyHeight <= winSize.height) { + if (!this._isBackSkyReload) { + this._backSkyRe = cc.Sprite.create(s_bg01); + this._backSkyRe.setAnchorPoint(cc.p(0, 0)); + this.addChild(this._backSkyRe, -10); + this._backSkyRe.setPosition(cc.p(0, winSize.height)); + this._isBackSkyReload = true; + } + this._backSkyRe.runAction(cc.MoveBy.create(3, cc.p(0, -48))); + } + if (this._backSkyHeight <= 0) { + this._backSkyHeight = this._backSky.getContentSize().height; + this.removeChild(this._backSky, true); + this._backSky = this._backSkyRe; + this._backSkyRe = null; + this._isBackSkyReload = false; + } + + if (this._backTileMapHeight <= winSize.height) { + if (!this._isBackTileReload) { + this._backTileMapRe = cc.TMXTiledMap.create(s_level01); + this.addChild(this._backTileMapRe, -9); + this._backTileMapRe.setPosition(cc.p(0, winSize.height)); + this._isBackTileReload = true; + } + this._backTileMapRe.runAction(cc.MoveBy.create(3, cc.p(0, -200))); + } + if (this._backTileMapHeight <= 0) { + this._backTileMapHeight = this._backTileMapRe.getMapSize().height * this._backTileMapRe.getTileSize().height; + this.removeChild(this._backTileMap, true); + this._backTileMap = this._backTileMapRe; + this._backTileMapRe = null; + this._isBackTileReload = false; + } + }, + onGameOver:function () { + var scene = cc.Scene.create(); + scene.addChild(GameOver.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + } +}); + +GameLayer.create = function () { + var sg = new GameLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +GameLayer.scene = function () { + var scene = cc.Scene.create(); + var layer = GameLayer.create(); + scene.addChild(layer, 1); + return scene; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js new file mode 100644 index 0000000000..7fcf87c645 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js @@ -0,0 +1,83 @@ +var GameOver = cc.Layer.extend({ + _ship:null, + _lbScore:0, + ctor:function() { + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Layer); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint( cc.p(0,0) ); + this.addChild(sp, 0, 1); + + var logo = cc.Sprite.create(s_gameOver); + logo.setAnchorPoint(cc.p(0,0)); + logo.setPosition(cc.p(0,300)); + this.addChild(logo,10,1); + + var playAgainNormal = cc.Sprite.create(s_menu, cc.rect(378, 0, 126, 33)); + var playAgainSelected = cc.Sprite.create(s_menu, cc.rect(378, 33, 126, 33)); + var playAgainDisabled = cc.Sprite.create(s_menu, cc.rect(378, 33 * 2, 126, 33)); + + var cocos2dhtml5 = cc.Sprite.create(s_cocos2dhtml5); + cocos2dhtml5.setPosition(cc.p(160,150)); + this.addChild(cocos2dhtml5,10); + var playAgain = cc.MenuItemSprite.create(playAgainNormal, playAgainSelected, playAgainDisabled, this, function(){ + flareEffect(this,this,this.onPlayAgain); + }); + + var menu = cc.Menu.create(playAgain); + this.addChild(menu, 1, 2); + menu.setPosition(cc.p(winSize.width / 2, 220)); + + var lbScore = cc.LabelTTF.create("Your Score:"+MW.SCORE,"Arial Bold",16); + lbScore.setPosition(cc.p(160,280)); + lbScore.setColor(cc.c3b(250,179,0)); + this.addChild(lbScore,10); + + var b1 = cc.LabelTTF.create("Download Cocos2d-html5","Arial",14); + var b2 = cc.LabelTTF.create("Download This Sample","Arial",14); + var menu1 = cc.MenuItemLabel.create(b1,this,function(){ + window.location.href = "http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-html5"; + }); + var menu2 = cc.MenuItemLabel.create(b2,this,function(){ + window.location.href = "https://github.com/ShengxiangChen/MoonWarriors"; + }); + var cocos2dMenu = cc.Menu.create(menu1,menu2); + cocos2dMenu.alignItemsVerticallyWithPadding(10); + cocos2dMenu.setPosition(cc.p(160,80)); + this.addChild(cocos2dMenu); + + + if(MW.SOUND){ + cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic); + } + + bRet = true; + } + return bRet; + }, + onPlayAgain:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(GameLayer.create()); + scene.addChild(GameControlMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); + } +}); + +GameOver.create = function () { + var sg = new GameOver(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +GameOver.scene = function () { + var scene = cc.Scene.create(); + var layer = GameOver.create(); + scene.addChild(layer); + return scene; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js b/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js new file mode 100644 index 0000000000..6866d7412f --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js @@ -0,0 +1,99 @@ +var LevelManager = cc.Class.extend({ + _currentLevel:null, + _gameLayer:null, + ctor:function(gameLayer){ + if(!gameLayer){ + throw "gameLayer must be non-nil"; + } + this._currentLevel = Level1; + this._gameLayer = gameLayer; + this.setLevel(this._currentLevel); + }, + + setLevel:function(level){ + for(var i = 0; i< level.enemies.length; i++){ + this._currentLevel.enemies[i].ShowTime = this._minuteToSecond(this._currentLevel.enemies[i].ShowTime); + } + }, + _minuteToSecond:function(minuteStr){ + if(!minuteStr) + return 0; + if(typeof(minuteStr) != "number"){ + var mins = minuteStr.split(':'); + if(mins.length == 1){ + return parseInt(mins[0],10); + }else { + return parseInt(mins[0],10 )* 60 + parseInt(mins[1],10); + } + } + return minuteStr; + }, + + loadLevelResource:function(deltaTime){ + //load enemy + for(var i = 0; i< this._currentLevel.enemies.length; i++){ + var selEnemy = this._currentLevel.enemies[i]; + if(selEnemy){ + if(selEnemy.ShowType == "Once"){ + if(selEnemy.ShowTime == deltaTime){ + for(var tIndex = 0; tIndex < selEnemy.Types.length;tIndex++ ){ + this.addEnemyToGameLayer(selEnemy.Types[tIndex]); + } + } + }else if(selEnemy.ShowType == "Repeate"){ + if(deltaTime % selEnemy.ShowTime === 0){ + for(var rIndex = 0; rIndex < selEnemy.Types.length;rIndex++ ){ + this.addEnemyToGameLayer(selEnemy.Types[rIndex]); + } + } + } + } + } + }, + + addEnemyToGameLayer:function(enemyType){ + var addEnemy = new Enemy(EnemyType[enemyType]); + + var enemypos = cc.p( 80 + (winSize.width - 160) * Math.random(), winSize.height); + var enemycs = addEnemy.getContentSize(); + addEnemy.setPosition( enemypos ); + + + var offset, tmpAction; + var a0=0; + var a1=0; + switch (addEnemy.moveType) { + case MW.ENEMY_MOVE_TYPE.ATTACK: + offset = this._gameLayer._ship.getPosition(); + tmpAction = cc.MoveTo.create(1, offset); + break; + case MW.ENEMY_MOVE_TYPE.VERTICAL: + offset = cc.p(0, -winSize.height - enemycs.height); + tmpAction = cc.MoveBy.create(4, offset); + break; + case MW.ENEMY_MOVE_TYPE.HORIZONTAL: + offset = cc.p(0, -100 - 200 * Math.random()); + a0 = cc.MoveBy.create(0.5, offset); + a1 = cc.MoveBy.create(1, cc.p(-50 - 100 * Math.random(), 0)); + var onComplete = cc.CallFunc.create(addEnemy, function (pSender) { + var a2 = cc.DelayTime.create(1); + var a3 = cc.MoveBy.create(1, cc.p(100 + 100 * Math.random(), 0)); + pSender.runAction(cc.RepeatForever.create( + cc.Sequence.create(a2, a3, a2.copy(), a3.reverse()) + )); + }); + tmpAction = cc.Sequence.create(a0, a1, onComplete); + break; + case MW.ENEMY_MOVE_TYPE.OVERLAP: + var newX = (enemypos.x <= winSize.width / 2) ? 320 : -320; + a0 = cc.MoveBy.create(4, cc.p(newX, -240)); + a1 = cc.MoveBy.create(4,cc.p(-newX,-320)); + tmpAction = cc.Sequence.create(a0,a1); + break; + } + + this._gameLayer.addChild(addEnemy, addEnemy.zOrder, MW.UNIT_TAG.ENEMY); + MW.CONTAINER.ENEMIES.push(addEnemy); + addEnemy.runAction(tmpAction); + } +}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js b/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js new file mode 100644 index 0000000000..c2f6becdad --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js @@ -0,0 +1,89 @@ +var dirImg = ""; +var dirMusic = ""; +var musicSuffix = ".mp3"; +if( cc.config.deviceType == 'browser' || cc.config.engine == 'cocos2d-x') { + dirImg = "MoonWarriors/res/"; + dirMusic = "MoonWarriors/res/Music/"; + musicSuffix = ""; +} + +//image +var s_bg01 = dirImg + "bg01.jpg"; +var s_loading = dirImg + "loading.png"; +var s_ship01 = dirImg + "ship01.png"; +var s_menu = dirImg + "menu.png"; +var s_logo = dirImg + "logo.png"; +var s_cocos2dhtml5 = dirImg + "cocos2d-html5.png"; +var s_gameOver = dirImg + "gameOver.png"; +var s_menuTitle = dirImg + "menuTitle.png"; +var s_Enemy = dirImg + "Enemy.png"; +var s_flare = dirImg + "flare.jpg"; +var s_bullet = dirImg + "bullet.png"; +var s_explosion = dirImg + "explosion.png"; +var s_explode1 = dirImg + "explode1.jpg"; +var s_explode2= dirImg + "explode2.jpg"; +var s_explode3 = dirImg + "explode3.jpg"; +var s_hit = dirImg + "hit.jpg"; +var s_arial14 = dirImg + "arial-14.png"; +var s_arial14_fnt = dirImg + "arial-14.fnt"; + +//music +var s_bgMusic = dirMusic + "bgMusic" + musicSuffix; +var s_mainMainMusic = dirMusic + "mainMainMusic" + musicSuffix; + +//effect +var s_buttonEffect = dirMusic + "buttonEffet" + musicSuffix; +var s_explodeEffect = dirMusic + "explodeEffect" + musicSuffix; +var s_fireEffect = dirMusic + "fireEffect" + musicSuffix; +var s_shipDestroyEffect = dirMusic + "shipDestroyEffect" + musicSuffix; + +//tmx +var s_level01 = dirImg + "level01.tmx"; + +//plist +var s_Enemy_plist = dirImg + "Enemy.plist"; +var s_explosion_plist = dirImg + "explosion.plist"; +var s_bullet_plist = dirImg + "bullet.plist"; + +var g_ressources = [ + //image + {type:"image", src:s_bg01}, + {type:"image", src:s_loading}, + {type:"image", src:s_ship01}, + {type:"image", src:s_menu}, + {type:"image", src:s_logo}, + {type:"image", src:s_cocos2dhtml5}, + {type:"image", src:s_gameOver}, + {type:"image", src:s_menuTitle}, + {type:"image", src:s_Enemy}, + {type:"image", src:s_flare}, + {type:"image", src:s_bullet}, + {type:"image", src:s_explosion}, + {type:"image", src:s_explode1}, + {type:"image", src:s_explode2}, + {type:"image", src:s_explode3}, + {type:"image", src:s_hit}, + {type:"image", src:s_arial14}, + + //tmx + {type:"tmx", src:s_level01}, + + //plist + {type:"plist", src:s_Enemy_plist}, + {type:"plist", src:s_explosion_plist}, + {type:"plist", src:s_bullet_plist}, + + //music + {type:"bgm", src:s_bgMusic}, + {type:"bgm", src:s_mainMainMusic}, + + //effect + {type:"effect", src:s_buttonEffect}, + {type:"effect", src:s_explodeEffect}, + {type:"effect", src:s_fireEffect}, + {type:"effect", src:s_shipDestroyEffect}, + + // FNT + {type:"fnt", src:s_arial14_fnt} + +]; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js new file mode 100644 index 0000000000..4f8b545311 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js @@ -0,0 +1,85 @@ +var SettingsLayer = cc.Layer.extend({ + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); + var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 0, 134, 34)); + title.setPosition(cc.p(winSize.width / 2, winSize.height - 120)); + this.addChild(title); + + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(18); + var title1 = cc.MenuItemFont.create("Sound"); + title1.setEnabled(false); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var item1 = cc.MenuItemToggle.create( + cc.MenuItemFont.create("On"), + cc.MenuItemFont.create("Off") ); + item1.setCallback(this, this.soundControl ); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(18); + var title2 = cc.MenuItemFont.create("Mode"); + title2.setEnabled(false); + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var item2 = cc.MenuItemToggle.create( + cc.MenuItemFont.create("Easy"), + cc.MenuItemFont.create("Normal"), + cc.MenuItemFont.create("Hard")); + item2.setCallback( this, this.modeControl ); + + + cc.MenuItemFont.setFontName("Arial"); + cc.MenuItemFont.setFontSize(26); + var label = cc.LabelTTF.create("Go back", "Arial", 20); + var back = cc.MenuItemLabel.create(label, this, this.backCallback); + back.setScale(0.8); + + var menu = cc.Menu.create(title1, title2, item1, item2, back); + menu.alignItemsInColumns(2, 2, 1); + this.addChild(menu); + + var cp_back = back.getPosition(); + cp_back.y -= 50.0; + back.setPosition(cp_back); + + + bRet = true; + } + + return bRet; + }, + backCallback:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(SysMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + soundControl:function(){ + MW.SOUND = MW.SOUND ? false : true; + if(!MW.SOUND){ + cc.AudioEngine.getInstance().stopBackgroundMusic(); + } + }, + modeControl:function(){ + } +}); + +SettingsLayer.create = function () { + var sg = new SettingsLayer(); + if (sg && sg.init()) { + return sg; + } + return null; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js b/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js new file mode 100644 index 0000000000..84aa6342db --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js @@ -0,0 +1,128 @@ +var Ship = cc.Sprite.extend({ + speed:220, + bulletSpeed:900, + HP:5, + bulletTypeValue:1, + bulletPowerValue:1, + throwBombing:false, + canBeAttack:true, + isThrowingBomb:false, + zOrder:3000, + maxBulletPowerValue:4, + appearPosition:cc.p(160, 60), + _hurtColorLife:0, + active:true, + ctor:function () { + + // needed for JS-Bindings compatibility + cc.associateWithNative( this, cc.Sprite ); + + //init life + var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); + this.initWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + this.setTag(this.zOrder); + this.setPosition(this.appearPosition); + + // set frame + var frame0 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); + var frame1 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(60, 0, 60, 38)); + + var animFrames = []; + animFrames.push(frame0); + animFrames.push(frame1); + + // ship animate + var animation = cc.Animation.create(animFrames, 0.1); + var animate = cc.Animate.create(animation); + this.runAction(cc.RepeatForever.create(animate)); + this.schedule(this.shoot, 1 / 6); + + //revive effect + this.canBeAttack = false; + var ghostSprite = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 45, 60, 38)); + ghostSprite.setBlendFunc(gl.SRC_ALPHA, gl.ONE); + ghostSprite.setScale(8); + ghostSprite.setPosition(cc.p(this.getContentSize().width / 2, 12)); + this.addChild(ghostSprite, 3000, 99999); + ghostSprite.runAction(cc.ScaleTo.create(0.5, 1, 1)); + var blinks = cc.Blink.create(3, 9); + var makeBeAttack = cc.CallFunc.create(this, function (t) { + t.canBeAttack = true; + t.setVisible(true); + t.removeChild(ghostSprite,true); + }); + this.runAction(cc.Sequence.create(cc.DelayTime.create(0.5), blinks, makeBeAttack)); + }, + update:function (dt) { + + // Keys are only enabled on the browser + if( cc.config.deviceType == 'browser' ) { + var pos = this.getPosition(); + if ((MW.KEYS[cc.KEY.w] || MW.KEYS[cc.KEY.up]) && pos.y <= winSize.height) { + pos.y += dt * this.speed; + } + if ((MW.KEYS[cc.KEY.s] || MW.KEYS[cc.KEY.down]) && pos.y >= 0) { + pos.y -= dt * this.speed; + } + if ((MW.KEYS[cc.KEY.a] || MW.KEYS[cc.KEY.left]) && pos.x >= 0) { + pos.x -= dt * this.speed; + } + if ((MW.KEYS[cc.KEY.d] || MW.KEYS[cc.KEY.right]) && pos.x <= winSize.width) { + pos.x += dt * this.speed; + } + this.setPosition( pos ); + } + + if (this.HP <= 0) { + this.active = false; + } + this._timeTick += dt; + if (this._timeTick > 0.1) { + this._timeTick = 0; + if (this._hurtColorLife > 0) { + this._hurtColorLife--; + } + if (this._hurtColorLife == 1) { + this.setColor(cc.WHITE); + } + } + }, + shoot:function (dt) { + //this.shootEffect(); + var offset = 13; + var p = this.getPosition(); + var cs = this.getContentSize(); + var a = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); + MW.CONTAINER.PLAYER_BULLETS.push(a); + this.getParent().addChild(a, a.zOrder, MW.UNIT_TAG.PLAYER_BULLET); + a.setPosition(cc.p(p.x + offset, p.y + 3 + cs.height * 0.3)); + + var b = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); + MW.CONTAINER.PLAYER_BULLETS.push(b); + this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.PLAYER_BULLET); + b.setPosition(cc.p(p.x - offset, p.y + 3 + cs.height * 0.3)); + }, + destroy:function () { + MW.LIFE--; + var p = this.getPosition(); + var myParent = this.getParent(); + myParent.addChild( new Explosion(p) ); + myParent.removeChild(this,true); + if (MW.SOUND) { + cc.AudioEngine.getInstance().playEffect(s_shipDestroyEffect); + } + }, + hurt:function () { + if (this.canBeAttack) { + this._hurtColorLife = 2; + this.HP--; + this.setColor(cc.RED); + } + }, + collideRect:function(){ + var p = this.getPosition(); + var a = this.getContentSize(); + var r = new cc.rect(p.x - a.width/2, p.y - a.height/2, a.width, a.height/2); + return r; + } +}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js b/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js new file mode 100644 index 0000000000..a265636363 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js @@ -0,0 +1,110 @@ +cc.dumpConfig(); + +var SysMenu = cc.Layer.extend({ + _ship:null, + + ctor:function () { + cc.associateWithNative( this, cc.Layer ); + }, + init:function () { + var bRet = false; + if (this._super()) { + winSize = cc.Director.getInstance().getWinSize(); + var sp = cc.Sprite.create(s_loading); + sp.setAnchorPoint(cc.p(0,0)); + this.addChild(sp, 0, 1); + + var logo = cc.Sprite.create(s_logo); + logo.setAnchorPoint(cc.p(0, 0)); + logo.setPosition(cc.p(0, 250)); + this.addChild(logo, 10, 1); + + var newGameNormal = cc.Sprite.create(s_menu, cc.rect(0, 0, 126, 33)); + var newGameSelected = cc.Sprite.create(s_menu, cc.rect(0, 33, 126, 33)); + var newGameDisabled = cc.Sprite.create(s_menu, cc.rect(0, 33 * 2, 126, 33)); + + var gameSettingsNormal = cc.Sprite.create(s_menu, cc.rect(126, 0, 126, 33)); + var gameSettingsSelected = cc.Sprite.create(s_menu, cc.rect(126, 33, 126, 33)); + var gameSettingsDisabled = cc.Sprite.create(s_menu, cc.rect(126, 33 * 2, 126, 33)); + + var aboutNormal = cc.Sprite.create(s_menu, cc.rect(252, 0, 126, 33)); + var aboutSelected = cc.Sprite.create(s_menu, cc.rect(252, 33, 126, 33)); + var aboutDisabled = cc.Sprite.create(s_menu, cc.rect(252, 33 * 2, 126, 33)); + + var newGame = cc.MenuItemSprite.create(newGameNormal, newGameSelected, newGameDisabled, this, function () { + this.onButtonEffect(); + flareEffect(this, this, this.onNewGame); + }); + var gameSettings = cc.MenuItemSprite.create(gameSettingsNormal, gameSettingsSelected, gameSettingsDisabled, this, this.onSettings); + var about = cc.MenuItemSprite.create(aboutNormal, aboutSelected, aboutDisabled, this, this.onAbout); + + var menu = cc.Menu.create(newGame, gameSettings, about); + menu.alignItemsVerticallyWithPadding(10); + this.addChild(menu, 1, 2); + menu.setPosition(cc.p(winSize.width / 2, winSize.height / 2 - 80)); + this.schedule(this.update, 0.1); + + var tmp = cc.TextureCache.getInstance().addImage(s_ship01); + this._ship = cc.Sprite.createWithTexture(tmp,cc.rect(0, 45, 60, 38)); + this.addChild(this._ship, 0, 4); + var pos = cc.p(Math.random() * winSize.width, 0); + this._ship.setPosition( pos ); + this._ship.runAction(cc.MoveBy.create(2, cc.p(Math.random() * winSize.width, pos.y + winSize.height + 100))); + + if (MW.SOUND) { + cc.AudioEngine.getInstance().setBackgroundMusicVolume(0.7); + cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic, true); + } + + bRet = true; + } + return bRet; + }, + onNewGame:function (pSender) { + var scene = cc.Scene.create(); + scene.addChild(GameLayer.create()); + scene.addChild(GameControlMenu.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + onSettings:function (pSender) { + this.onButtonEffect(); + var scene = cc.Scene.create(); + scene.addChild(SettingsLayer.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + onAbout:function (pSender) { + this.onButtonEffect(); + var scene = cc.Scene.create(); + scene.addChild(AboutLayer.create()); + cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); + }, + update:function () { + if (this._ship.getPosition().y > 480) { + var pos = cc.p(Math.random() * winSize.width, 10); + this._ship.setPosition( pos ); + this._ship.runAction( cc.MoveBy.create( + parseInt(5 * Math.random(), 10), + cc.p(Math.random() * winSize.width, pos.y + 480))); + } + }, + onButtonEffect:function(){ + if (MW.SOUND) { + var s = cc.AudioEngine.getInstance().playEffect(s_buttonEffect); + } + } +}); + +SysMenu.create = function () { + var sg = new SysMenu(); + if (sg && sg.init()) { + return sg; + } + return null; +}; + +SysMenu.scene = function () { + var scene = cc.Scene.create(); + var layer = SysMenu.create(); + scene.addChild(layer); + return scene; +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js new file mode 100644 index 0000000000..c947d58903 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js @@ -0,0 +1,56 @@ +var EnemyType = [ + { + type:0, + textureName:"E0.png", + bulletType:"W2.png", + HP:1, + moveType:MW.ENEMY_MOVE_TYPE.ATTACK, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:15 + }, + { + type:1, + textureName:"E1.png", + bulletType:"W2.png", + HP:2, + moveType:MW.ENEMY_MOVE_TYPE.ATTACK, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:40 + }, + { + type:2, + textureName:"E2.png", + bulletType:"W2.png", + HP:4, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, + scoreValue:60 + }, + { + type:3, + textureName:"E3.png", + bulletType:"W2.png", + HP:6, + moveType:MW.ENEMY_MOVE_TYPE.OVERLAP, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:80 + }, + { + type:4, + textureName:"E4.png", + bulletType:"W2.png", + HP:10, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, + scoreValue:150 + }, + { + type:5, + textureName:"E5.png", + bulletType:"W2.png", + HP:15, + moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, + attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, + scoreValue:200 + } +]; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js new file mode 100644 index 0000000000..554d322aa1 --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js @@ -0,0 +1,94 @@ +/** + * Cocos2d-html5 show case : Moon Warriors + * + * @Licensed: + * This showcase is licensed under GPL. + * + * @Authors: + * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada + * Effects animation: Hao Wu (吴昊) + * Quality Assurance: Sean Lin (林顺) + * + * @Links: + * http://www.cocos2d-x.org + * http://bbs.html5china.com + * + */ + +//game state +MW.GAME_STATE = { + HOME:0, + PLAY:1, + OVER:2 +}; + +//keys +MW.KEYS = []; + +//level +MW.LEVEL = { + STAGE1:1, + STAGE2:2, + STAGE3:3 +}; + +//life +MW.LIFE = 4; + +//score +MW.SCORE = 0; + +//sound +MW.SOUND = true; + +//enemy move type +MW.ENEMY_MOVE_TYPE = { + ATTACK:0, + VERTICAL:1, + HORIZONTAL:2, + OVERLAP:3 +}; + +//delta x +MW.DELTA_X = -100; + +//offset x +MW.OFFSET_X = -24; + +//rot +MW.ROT = -5.625; + +//bullet type +MW.BULLET_TYPE = { + PLAYER:1, + ENEMY:2 +}; + +//weapon type +MW.WEAPON_TYPE = { + ONE:1 +}; + +//unit tag +MW.UNIT_TAG = { + ENMEY_BULLET:900, + PLAYER_BULLET:901, + ENEMY:1000, + PLAYER:1000 +}; + +//attack mode +MW.ENEMY_ATTACK_MODE = { + NORMAL:1, + TSUIHIKIDAN:2 +}; + +//life up sorce +MW.LIFEUP_SORCE = [50000, 100000, 150000, 200000, 250000, 300000]; + +//container +MW.CONTAINER = { + ENEMIES:[], + ENEMY_BULLETS:[], + PLAYER_BULLETS:[] +}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js new file mode 100644 index 0000000000..321a7a270f --- /dev/null +++ b/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js @@ -0,0 +1,49 @@ +var Level1 = { + enemies:[ + { + ShowType:"Repeate", + ShowTime:"00:02", + Types:[0,1,2] + }, + { + ShowType:"Repeate", + ShowTime:"00:05", + Types:[3,4,5] + } + /*{ + ShowType:"Repeate", + ShowTime:"00:08", + Types:[0,4,3,5] + }, + { + ShowType:"Once", + ShowTime:"00:6", + Types:[0,2,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:16", + Types:[0,2,5,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:25", + Types:[0,3,5,4,3] + }, + { + ShowType:"Once", + ShowTime:"00:35", + Types:[4,5,3,1,3] + }, + { + ShowType:"Once", + ShowTime:"00:50", + Types:[0,3,2,1,0,3] + }, + { + ShowType:"Once", + ShowTime:"01:15", + Types:[4,5,2,1,0] + }*/ + ] +}; diff --git a/samples/TestJavascript/Resources/js/jsb_constants.js b/samples/TestJavascript/Resources/js/jsb_constants.js new file mode 100644 index 0000000000..ac634f2712 --- /dev/null +++ b/samples/TestJavascript/Resources/js/jsb_constants.js @@ -0,0 +1,475 @@ +require('js/jsb_constants_gl.js'); +// cocos2d Helper + +cc.c3 = cc.c3 || function (r, g, b) { + return {r: r, g: g, b: b}; +}; + +cc.c3b = cc.c3; + +cc.c4 = cc.c4 || function (r, g, b, o) { + return {r: r, g: g, b: b, a: o}; +}; + +cc.c4b = cc.c4; + +cc.c4f = cc.c4f || function (r, g, b, o) { + return {r: r, g: g, b: b, a: o}; +}; + +cc.p = cc.p || function( x, y ) +{ + return {x:x, y:y}; +}; + +cc.g = cc.g || cc.p; +cc.log = cc.log || log; + +// +// cocos2d constants +// +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.RED = cc.c3(255,0,0); +cc.GREEN = cc.c3(0,255,0); +cc.BLUE = cc.c3(0,0,255); +cc.BLACK = cc.c3(0,0,0); +cc.WHITE = cc.c3(255,255,255); + +cc.POINT_ZERO = {x:0, y:0}; + +cc._reuse_p0 = {x:0, y:0}; +cc._reuse_p1 = {x:0, y:0}; +cc._reuse_p_index = 0; +cc._reuse_color3b = cc.c3(255, 255, 255 ); +cc._reuse_color4b = cc.c4(255, 255, 255, 255 ); +cc._reuse_grid = cc.g(0,0); + +// dump config info, but only in debug mode +cc.dumpConfig = function() +{ + if( cc.config.debug ) { + for(var i in cc.config) + cc.log( i + " = " + cc.config[i] ); + } +}; + +// +// Point +// +cc._p = function( x, y ) +{ + if( cc._reuse_p_index === 0 ) { + cc._reuse_p0.x = x; + cc._reuse_p0.y = y; + cc._reuse_p_index = 1; + return cc._reuse_p0; + } else { + cc._reuse_p1.x = x; + cc._reuse_p1.y = y; + cc._reuse_p_index = 0; + return cc._reuse_p1; + } +}; + +cc._to_p = function( point ) +{ + return point; +}; + +cc._from_p = function( size ) +{ + return size; +}; + +// +// Grid +// +cc._g = function( x, y ) +{ + cc._reuse_grid.x = x; + cc._reuse_grid.y = y; + return cc._reuse_grid; +} + +// +// Color +// +// +// 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; +}; +// compatibility +cc.c3 = cc.c3b; +cc._c3 = cc._c3b; + +// +// 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; + + +// +// Size +// +cc.size = function(w,h) +{ + return {width:w, height:h}; +} + +cc._to_size = function( size ) +{ + return size; +} + +cc._from_size = function( size ) +{ + return size; +} + +// +// Rect +// +cc.rect = function(x,y,w,h) +{ + return {x:x, y:y, width:w, height:h}; +} + +cc._to_rect = function( rect ) +{ + return rect; +} + +cc._from_rect = function( rect ) +{ + return rect; +} + +// 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; +} + +// point functions +cc.pAdd = cc.pAdd || function (p1, p2) { + return {x: p1.x + p2.x, y: p1.y + p2.y}; +}; + +cc.pSub = cc.pSub || function (p1, p2) { + return {x: p1.x - p2.x, y: p1.y - p2.y}; +} + +cc.pMult = cc.pMult || function (p1, s) { + return {x: p1.x * s, y: p1.y * s}; +}; + +/** + * Calculates dot product of two points. + * @param {cc.Point} v1 + * @param {cc.Point} v2 + * @return {Number} + */ +cc.pDot = function (v1, v2) { + return v1.x * v2.x + v1.y * v2.y; +}; + +/** + * Calculates the square length of a cc.Point (not calling sqrt() ) + * @param {cc.Point} v + *@return {cc.pDot} + */ +cc.pLengthSQ = function (v) { + return cc.pDot(v, v); +}; + +/** + * Calculates distance between point an origin + * @param {cc.Point} v + * @return {Number} + */ +cc.pLength = function (v) { + return Math.sqrt(cc.pLengthSQ(v)); +}; + +/** + * Calculates the distance between two points + * @param {cc.Point} v1 + * @param {cc.Point} v2 + * @return {cc.pLength} + */ +cc.pDistance = function (v1, v2) { + return cc.pLength(cc.pSub(v1, v2)); +}; + +/** + * Clamp a value between from and to. + * @param {Number} value + * @param {Number} min_inclusive + * @param {Number} max_inclusive + * @return {Number} + */ +cc.clampf = function (value, min_inclusive, max_inclusive) { + if (min_inclusive > max_inclusive) { + var temp = min_inclusive; + min_inclusive = max_inclusive; + max_inclusive = temp; + } + return value < min_inclusive ? min_inclusive : value < max_inclusive ? value : max_inclusive; +}; + +/** + * Clamp a point between from and to. + * @param {Number} p + * @param {Number} min_inclusive + * @param {Number} max_inclusive + * @return {cc.Point} + */ +cc.pClamp = function (p, min_inclusive, max_inclusive) { + return cc.p(cc.clampf(p.x, min_inclusive.x, max_inclusive.x), cc.clampf(p.y, min_inclusive.y, max_inclusive.y)); +}; + +/** + * returns a random float between 0 and 1 + * @return {Number} + * @function + */ +cc.RANDOM_0_1 = function () { + return Math.random(); +}; + +/** + * Associates a base class with a native superclass + * @function + * @param {object} jsobj subclass + * @param {object} klass superclass + */ +cc.associateWithNative = function( jsobj, superclass ) { + var native = new superclass(); + __associateObjWithNative( jsobj, native ); +}; + +// +// Array: for cocos2d-hmtl5 compatibility +// +cc.ArrayRemoveObject = function (arr, delObj) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == delObj) { + arr.splice(i, 1); + } + } +}; + +// +// Google "subclasses" +// borrowed from closure library +// +var goog = goog || {}; // Check to see if already defined in current scope +goog.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 ]; +// } +}; +goog.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)); + + // XXX: SpiderMonkey bindings extensions +// __associateObjWithNative( me, ret ); + 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( + 'goog.base called from a method of one name ' + + 'to a method of a different name'); + } +}; + + +// +// Simple subclass +// + +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.Layer.extend = cc.Class.extend; +cc.Scene.extend = cc.Class.extend; +cc.LayerGradient.extend = cc.Class.extend; +cc.Sprite.extend = cc.Class.extend; +cc.MenuItemFont.extend = cc.Class.extend; + +// +// Chipmunk helpers +// +var cp = cp || {}; + +cp.v = cc.p; +cp._v = cc._p; +cp.vzero = cp.v(0,0); + +// +// OpenGL Helpers +// +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/TestJavascript/Resources/js/jsb_constants_gl.js b/samples/TestJavascript/Resources/js/jsb_constants_gl.js new file mode 100644 index 0000000000..8b9d2f701d --- /dev/null +++ b/samples/TestJavascript/Resources/js/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; From 5054684e005519c0607d4b32035abff2208a0c21 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:06:11 +0800 Subject: [PATCH 08/19] issue #1469: Made MoonWarriors works on android. --- samples/MoonWarriors/Classes/AppDelegate.cpp | 2 +- samples/MoonWarriors/proj.android/.project | 7 ------- samples/MoonWarriors/proj.android/AndroidManifest.xml | 4 ++-- samples/MoonWarriors/proj.android/jni/Android.mk | 6 +++--- .../jni/{testjavascript => moonwarriors}/main.cpp | 0 .../TestJavascript.java => moonwarriors/MoonWarriors.java} | 4 ++-- 6 files changed, 8 insertions(+), 15 deletions(-) rename samples/MoonWarriors/proj.android/jni/{testjavascript => moonwarriors}/main.cpp (100%) rename samples/MoonWarriors/proj.android/src/org/cocos2dx/{testjavascript/TestJavascript.java => moonwarriors/MoonWarriors.java} (92%) diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp index 7278015021..9d8fe2282e 100644 --- a/samples/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -24,7 +24,7 @@ bool AppDelegate::applicationDidFinishLaunching() // initialize director CCDirector *pDirector = CCDirector::sharedDirector(); pDirector->setOpenGLView(CCEGLView::sharedOpenGLView()); - + CCEGLView::sharedOpenGLView()->setDesignResolutionSize(320, 480, kResolutionShowAll); // enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices. // pDirector->enableRetinaDisplay(true); diff --git a/samples/MoonWarriors/proj.android/.project b/samples/MoonWarriors/proj.android/.project index 9e6dbbfb7f..16a1a72d7b 100644 --- a/samples/MoonWarriors/proj.android/.project +++ b/samples/MoonWarriors/proj.android/.project @@ -30,11 +30,4 @@ com.android.ide.eclipse.adt.AndroidNature org.eclipse.jdt.core.javanature - - - src_common - 2 - PARENT-3-PROJECT_LOC/cocos2dx/platform/android/java/src_common - - diff --git a/samples/MoonWarriors/proj.android/AndroidManifest.xml b/samples/MoonWarriors/proj.android/AndroidManifest.xml index 4270c77a8e..a7e2802621 100644 --- a/samples/MoonWarriors/proj.android/AndroidManifest.xml +++ b/samples/MoonWarriors/proj.android/AndroidManifest.xml @@ -1,6 +1,6 @@ @@ -12,7 +12,7 @@ diff --git a/samples/MoonWarriors/proj.android/jni/Android.mk b/samples/MoonWarriors/proj.android/jni/Android.mk index 05af70ea6e..91eb4e64bb 100644 --- a/samples/MoonWarriors/proj.android/jni/Android.mk +++ b/samples/MoonWarriors/proj.android/jni/Android.mk @@ -2,11 +2,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := test_javascript_shared +LOCAL_MODULE := moonwarriors_shared -LOCAL_MODULE_FILENAME := libtestjavascript +LOCAL_MODULE_FILENAME := libmoonwarriors -LOCAL_SRC_FILES := testjavascript/main.cpp \ +LOCAL_SRC_FILES := moonwarriors/main.cpp \ ../../Classes/AppDelegate.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes diff --git a/samples/MoonWarriors/proj.android/jni/testjavascript/main.cpp b/samples/MoonWarriors/proj.android/jni/moonwarriors/main.cpp similarity index 100% rename from samples/MoonWarriors/proj.android/jni/testjavascript/main.cpp rename to samples/MoonWarriors/proj.android/jni/moonwarriors/main.cpp diff --git a/samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java b/samples/MoonWarriors/proj.android/src/org/cocos2dx/moonwarriors/MoonWarriors.java similarity index 92% rename from samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java rename to samples/MoonWarriors/proj.android/src/org/cocos2dx/moonwarriors/MoonWarriors.java index 9679124592..46f8edc518 100644 --- a/samples/MoonWarriors/proj.android/src/org/cocos2dx/testjavascript/TestJavascript.java +++ b/samples/MoonWarriors/proj.android/src/org/cocos2dx/moonwarriors/MoonWarriors.java @@ -21,7 +21,7 @@ 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; +package org.cocos2dx.moonwarriors; import org.cocos2dx.lib.Cocos2dxActivity; @@ -34,6 +34,6 @@ public class MoonWarriors extends Cocos2dxActivity{ } static { - System.loadLibrary("testjavascript"); + System.loadLibrary("moonwarriors"); } } From 48b146a0985f228da09803e42643cd690e8aa19c Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:08:11 +0800 Subject: [PATCH 09/19] issue #1469: Exported 'cocos2dVersion'. --- cocos2dx/include/cocos2d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/include/cocos2d.h b/cocos2dx/include/cocos2d.h index 52bd76ad88..fea7298579 100755 --- a/cocos2dx/include/cocos2d.h +++ b/cocos2dx/include/cocos2d.h @@ -233,7 +233,7 @@ THE SOFTWARE. NS_CC_BEGIN -const char* cocos2dVersion(); +CC_DLL const char* cocos2dVersion(); NS_CC_END From abd1d7e3bf165290322f336870e8ac1ba6098532 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:14:19 +0800 Subject: [PATCH 10/19] issue #1469: VS2010 compilation works. --- ...t.vcproj.user => MoonWarriors.vcproj.user} | 0 ...avascript.vcxproj => MoonWarriors.vcxproj} | 10 +------- ...j.filters => MoonWarriors.vcxproj.filters} | 24 ------------------- ...vcxproj.user => MoonWarriors.vcxproj.user} | 0 4 files changed, 1 insertion(+), 33 deletions(-) rename samples/MoonWarriors/proj.win32/{TestJavascript.vcproj.user => MoonWarriors.vcproj.user} (100%) rename samples/MoonWarriors/proj.win32/{TestJavascript.vcxproj => MoonWarriors.vcxproj} (91%) rename samples/MoonWarriors/proj.win32/{TestJavascript.vcxproj.filters => MoonWarriors.vcxproj.filters} (72%) rename samples/MoonWarriors/proj.win32/{TestJavascript.vcxproj.user => MoonWarriors.vcxproj.user} (100%) diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user b/samples/MoonWarriors/proj.win32/MoonWarriors.vcproj.user similarity index 100% rename from samples/MoonWarriors/proj.win32/TestJavascript.vcproj.user rename to samples/MoonWarriors/proj.win32/MoonWarriors.vcproj.user diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj similarity index 91% rename from samples/MoonWarriors/proj.win32/TestJavascript.vcxproj rename to samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj index e1d6d76865..49e05c3542 100644 --- a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj +++ b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj @@ -11,7 +11,7 @@ - {D0F06A44-A245-4D13-A498-0120C203B539} + {1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2} MoonWarriors @@ -136,26 +136,18 @@ xcopy /Y /Q "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(O - - - - - - - - diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj.filters similarity index 72% rename from samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters rename to samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj.filters index 93bc5303f2..37fdd0783f 100644 --- a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.filters +++ b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj.filters @@ -25,30 +25,18 @@ Classes - - bindings - - - bindings - bindings bindings - - bindings - bindings bindings - - bindings - bindings\generated @@ -63,15 +51,6 @@ Classes - - bindings - - - bindings - - - bindings - bindings @@ -84,9 +63,6 @@ bindings - - bindings - bindings diff --git a/samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj.user similarity index 100% rename from samples/MoonWarriors/proj.win32/TestJavascript.vcxproj.user rename to samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj.user From bb135e49d1f0b5911015de781bd16b5af825ba5e Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:23:13 +0800 Subject: [PATCH 11/19] issue #1469: Ignored 'getBlendFunc' and 'setBlendFunc' for CCSpriteBatchNode,CCMotionStreak,CCAtlasNode,CCParticleBatchNode,CCLayerColor,CCParticleSystem. --- tools/tojs/cocos2dx.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 8904ec1988..c8f0ba2964 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -36,6 +36,12 @@ classes = CCSprite.* CCScene CCNode CCDirector CCLayer.* CCMenu.* CCTouch CC.*Ac # functions from all classes. skip = CCNode::[.*Transform convertToWindowSpace getChildren getGrid setGLServerState description getCamera getShaderProgram getUserObject .*UserData getGLServerState], CCSprite::[getQuad displayFrame getTexture getBlendFunc setBlendFunc getTextureAtlas setSpriteBatchNode getSpriteBatchNode], + CCSpriteBatchNode::[getBlendFunc setBlendFunc], + CCMotionStreak::[getBlendFunc setBlendFunc], + CCAtlasNode::[getBlendFunc setBlendFunc], + CCParticleBatchNode::[getBlendFunc setBlendFunc], + CCLayerColor::[getBlendFunc setBlendFunc], + CCParticleSystem::[getBlendFunc setBlendFunc], CCDirector::[getAccelerometer getKeypadDispatcher getTouchDispatcher setWatcherCallbackFun getOpenGLView getScheduler getProjection], CCLayer.*::[didAccelerate (g|s)etBlendFunc], CCMenu.*::[.*Target getSubItems create alignItemsInColumns initWithItems alignItemsInRows], @@ -94,6 +100,7 @@ rename_functions = CCDirector::[sharedDirector=getInstance], CCAnimation::[addSpriteFrameWithFileName=addSpriteFrameWithFilename], CCAnimationCache::[sharedAnimationCache=getInstance addAnimationsWithFile=addAnimations animationByName=getAnimation], CCLayerGradient::[initWithColor=init], + CCNode::[boundingBox=getBoundingBox], SimpleAudioEngine::[sharedEngine=getInstance] rename_classes = CCParticleSystemQuad::CCParticleSystem From b3e0f3e96e63b71927298558ac748fedd86e8918 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:23:46 +0800 Subject: [PATCH 12/19] issue #1469: Updated solutions for vs2008 and vs2010. --- cocos2d-win32.vc2008.sln | 10 ++++++++++ cocos2d-win32.vc2010.sln | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/cocos2d-win32.vc2008.sln b/cocos2d-win32.vc2008.sln index a21437128a..b0a8df1fed 100644 --- a/cocos2d-win32.vc2008.sln +++ b/cocos2d-win32.vc2008.sln @@ -53,6 +53,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "samples\MoonWarriors\proj.win32\MoonWarriors.vcproj", "{A0EA54FA-6F12-45EC-AD5C-D139AA3CD528}" + ProjectSection(ProjectDependencies) = postProject + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} + {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} + EndProjectSection +EndProject Global GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} @@ -106,6 +112,10 @@ Global {B53D3C68-96DA-4806-BB26-94888B52191A}.Debug|Win32.Build.0 = Debug|Win32 {B53D3C68-96DA-4806-BB26-94888B52191A}.Release|Win32.ActiveCfg = Release|Win32 {B53D3C68-96DA-4806-BB26-94888B52191A}.Release|Win32.Build.0 = Release|Win32 + {A0EA54FA-6F12-45EC-AD5C-D139AA3CD528}.Debug|Win32.ActiveCfg = Debug|Win32 + {A0EA54FA-6F12-45EC-AD5C-D139AA3CD528}.Debug|Win32.Build.0 = Debug|Win32 + {A0EA54FA-6F12-45EC-AD5C-D139AA3CD528}.Release|Win32.ActiveCfg = Release|Win32 + {A0EA54FA-6F12-45EC-AD5C-D139AA3CD528}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/cocos2d-win32.vc2010.sln b/cocos2d-win32.vc2010.sln index ddc9efe7a0..bebbee39ce 100644 --- a/cocos2d-win32.vc2010.sln +++ b/cocos2d-win32.vc2010.sln @@ -35,6 +35,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "samples\MoonWarriors\proj.win32\MoonWarriors.vcxproj", "{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}" +EndProject Global GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} @@ -88,6 +90,10 @@ Global {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32 + {1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.Build.0 = Debug|Win32 + {1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.ActiveCfg = Release|Win32 + {1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 9f93b609e800131a9550b2671408fcffa5a63973 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:24:20 +0800 Subject: [PATCH 13/19] issue #1469: Added cc.config for js-bindings. --- .../javascript/bindings/ScriptingCore.cpp | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/scripting/javascript/bindings/ScriptingCore.cpp b/scripting/javascript/bindings/ScriptingCore.cpp index 08357e029f..17433f47c1 100644 --- a/scripting/javascript/bindings/ScriptingCore.cpp +++ b/scripting/javascript/bindings/ScriptingCore.cpp @@ -165,10 +165,102 @@ void js_log(const char *format, ...) { } } +#define JSB_COMPATIBLE_WITH_COCOS2D_HTML5_BASIC_TYPES 1 + +void jsb_register_cocos2d_config( JSContext *_cx, JSObject *cocos2d) +{ + // Config Object + JSObject *ccconfig = JS_NewObject(_cx, NULL, NULL, NULL); + // config.os: The Operating system + // osx, ios, android, windows, linux, etc.. +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + JSString *str = JS_InternString(_cx, "ios"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JSString *str = JS_InternString(_cx, "android"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + JSString *str = JS_InternString(_cx, "windows"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) + JSString *str = JS_InternString(_cx, "marmalade"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) + JSString *str = JS_InternString(_cx, "linux"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) + JSString *str = JS_InternString(_cx, "bada"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) + JSString *str = JS_InternString(_cx, "blackberry"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + JSString *str = JS_InternString(_cx, "osx"); +#else + JSString *str = JS_InternString(_cx, "unknown"); +#endif + JS_DefineProperty(_cx, ccconfig, "os", STRING_TO_JSVAL(str), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.deviceType: Device Type + // 'mobile' for any kind of mobile devices, 'desktop' for PCs, 'browser' for Web Browsers +// #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +// str = JS_InternString(_cx, "desktop"); +// #else + str = JS_InternString(_cx, "mobile"); +// #endif + JS_DefineProperty(_cx, ccconfig, "deviceType", STRING_TO_JSVAL(str), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.engine: Type of renderer + // 'cocos2d', 'cocos2d-x', 'cocos2d-html5/canvas', 'cocos2d-html5/webgl', etc.. + str = JS_InternString(_cx, "cocos2d-x"); + JS_DefineProperty(_cx, ccconfig, "engine", STRING_TO_JSVAL(str), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.arch: CPU Architecture + // i386, ARM, x86_64, web +#ifdef __LP64__ + str = JS_InternString(_cx, "x86_64"); +#elif defined(__arm__) || defined(__ARM_NEON__) + str = JS_InternString(_cx, "arm"); +#else + str = JS_InternString(_cx, "i386"); +#endif + JS_DefineProperty(_cx, ccconfig, "arch", STRING_TO_JSVAL(str), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.version: Version of cocos2d + renderer + str = JS_InternString(_cx, cocos2dVersion() ); + JS_DefineProperty(_cx, ccconfig, "version", STRING_TO_JSVAL(str), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.usesTypedArrays +#if JSB_COMPATIBLE_WITH_COCOS2D_HTML5_BASIC_TYPES + JSBool b = JS_FALSE; +#else + JSBool b = JS_TRUE; +#endif + JS_DefineProperty(_cx, ccconfig, "usesTypedArrays", BOOLEAN_TO_JSVAL(b), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + // config.debug: Debug build ? +#if COCOS2D_DEBUG > 0 + b = JS_TRUE; +#else + b = JS_FALSE; +#endif + JS_DefineProperty(_cx, ccconfig, "debug", BOOLEAN_TO_JSVAL(b), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); + + + // Add "config" to "cc" + JS_DefineProperty(_cx, cocos2d, "config", OBJECT_TO_JSVAL(ccconfig), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); +} + void registerDefaultClasses(JSContext* cx, JSObject* global) { if (!JS_InitStandardClasses(cx, global)) { js_log("error initializing the standard classes"); } + // first, try to get the ns + jsval nsval; + JSObject *ns; + JS_GetProperty(cx, global, "cc", &nsval); + if (nsval == JSVAL_VOID) { + ns = JS_NewObject(cx, NULL, NULL, NULL); + nsval = OBJECT_TO_JSVAL(ns); + JS_SetProperty(cx, global, "cc", &nsval); + } else { + JS_ValueToObject(cx, nsval, &ns); + } + + jsb_register_cocos2d_config(cx, ns); // // Javascript controller (__jsc__) From 700b83f3b9fc6cd400af16603b80365e1621a28c Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 15:25:27 +0800 Subject: [PATCH 14/19] issue #1469: Added 'setBlendFunc' support for CCSprite, CCParticleSystem...etc. --- .../javascript/bindings/cocos2d_specifics.cpp | 79 ++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp b/scripting/javascript/bindings/cocos2d_specifics.cpp index 9766c99bf0..51ec52efaf 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp @@ -392,7 +392,7 @@ JSBool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc > 0) { arg0 = jsval_to_ccarray(cx, argv[0]); } - cocos2d::CCAnimation* ret; + cocos2d::CCAnimation* ret = NULL; double arg1 = 0.0f; if (argc > 0 && argc == 2) { if (argc == 2) { @@ -834,6 +834,72 @@ extern JSObject* js_cocos2dx_CCAnimation_prototype; extern JSObject* js_cocos2dx_CCMenuItem_prototype; extern JSObject* js_cocos2dx_CCSpriteFrame_prototype; extern JSObject* js_cocos2dx_CCSet_prototype; +extern JSObject* js_cocos2dx_CCSprite_prototype; +extern JSObject* js_cocos2dx_CCSpriteBatchNode_prototype; +//extern JSObject* js_cocos2dx_CCMotionStreak_prototype; +extern JSObject* js_cocos2dx_CCAtlasNode_prototype; +extern JSObject* js_cocos2dx_CCParticleBatchNode_prototype; +extern JSObject* js_cocos2dx_CCLayerColor_prototype; +extern JSObject* js_cocos2dx_CCParticleSystem_prototype; + +// setBlendFunc +template +JSBool js_cocos2dx_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj; + T* cobj; + obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cobj = (T*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + if (argc == 2) + { + GLenum src, dst; + JS_ValueToInt32(cx, argv[0], (int32_t*)&src); + JS_ValueToInt32(cx, argv[1], (int32_t*)&dst); + ccBlendFunc blendFunc = {src, dst}; + cobj->setBlendFunc(blendFunc); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCSprite_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCSpriteBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +// JSBool js_cocos2dx_CCMotionStreak_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +// { +// return js_cocos2dx_setBlendFunc(cx, argc, vp); +// } + +JSBool js_cocos2dx_CCAtlasNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCParticleBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCLayerColor_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCParticleSystem_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) { @@ -860,10 +926,17 @@ void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "schedule", js_CCNode_schedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "scheduleOnce", js_CCNode_scheduleOnce, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "unschedule", js_CCNode_unschedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); - - JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, js_cocos2dx_CCSprite_prototype, "setBlendFunc", js_cocos2dx_CCSprite_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCSpriteBatchNode_prototype, "setBlendFunc", js_cocos2dx_CCSpriteBatchNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + //JS_DefineFunction(cx, js_cocos2dx_CCMotionStreak_prototype, "setBlendFunc", js_cocos2dx_CCMotionStreak_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCAtlasNode_prototype, "setBlendFunc", js_cocos2dx_CCAtlasNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCParticleBatchNode_prototype, "setBlendFunc", js_cocos2dx_CCParticleBatchNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCLayerColor_prototype, "setBlendFunc", js_cocos2dx_CCLayerColor_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCParticleSystem_prototype, "setBlendFunc", js_cocos2dx_CCParticleSystem_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, js_cocos2dx_CCAction_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCAction_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCAction_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); From 36d8e86879d2708d6b55b14ff2a1444339366ff7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 22:06:44 +0800 Subject: [PATCH 15/19] issue #1469: Made MoonWarriors works on iOS. --- samples/MoonWarriors/Classes/AppDelegate.cpp | 3 +- .../{MoonWarriors/src => js}/AboutLayer.js | 0 .../{MoonWarriors/src => js}/Bullet.js | 0 .../{MoonWarriors/src => js}/Effect.js | 0 .../{MoonWarriors/src => js}/Enemy.js | 0 .../{MoonWarriors/src => js}/Explosion.js | 0 .../src => js}/GameControlMenu.js | 0 .../src => js}/GameController.js | 0 .../{MoonWarriors/src => js}/GameLayer.js | 0 .../{MoonWarriors/src => js}/GameOver.js | 0 .../{MoonWarriors/src => js}/LevelManager.js | 0 .../MoonWarriors-html5.js | 0 .../MoonWarriors-native.js | 34 +- .../{MoonWarriors/src => js}/Resource.js | 11 +- .../{MoonWarriors/src => js}/SettingsLayer.js | 0 .../{MoonWarriors/src => js}/Ship.js | 0 .../{MoonWarriors/src => js}/SysMenu.js | 0 .../src => js}/config/EnemyType.js | 0 .../src => js}/config/GameConfig.js | 0 .../{MoonWarriors/src => js}/config/Level.js | 0 .../{jshelper => js/helper}/jsb_constants.js | 2 +- .../helper}/jsb_constants_gl.js | 0 .../res/Music/bgMusic.mp3.REMOVED.git-id | 0 .../Music/mainMainMusic.mp3.REMOVED.git-id | 0 .../res/arial-14.GlyphProject | Bin .../res/b01.png.REMOVED.git-id | 0 .../res/explosion.png.REMOVED.git-id | 0 .../res/loading.png.REMOVED.git-id | 0 .../MoonWarriors.xcodeproj/project.pbxproj | 1316 ++++------------- 29 files changed, 339 insertions(+), 1027 deletions(-) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/AboutLayer.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Bullet.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Effect.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Enemy.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Explosion.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/GameControlMenu.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/GameController.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/GameLayer.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/GameOver.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/LevelManager.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => js}/MoonWarriors-html5.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => js}/MoonWarriors-native.js (74%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Resource.js (92%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/SettingsLayer.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/Ship.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/SysMenu.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/config/EnemyType.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/config/GameConfig.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors/src => js}/config/Level.js (100%) rename samples/MoonWarriors/Resources/{jshelper => js/helper}/jsb_constants.js (99%) rename samples/MoonWarriors/Resources/{jshelper => js/helper}/jsb_constants_gl.js (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/Music/bgMusic.mp3.REMOVED.git-id (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/Music/mainMainMusic.mp3.REMOVED.git-id (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/arial-14.GlyphProject (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/b01.png.REMOVED.git-id (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/explosion.png.REMOVED.git-id (100%) rename samples/MoonWarriors/Resources/{MoonWarriors => }/res/loading.png.REMOVED.git-id (100%) diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp index 9d8fe2282e..f4947cf2e5 100644 --- a/samples/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -5,7 +5,6 @@ #include "ScriptingCore.h" #include "generated/cocos2dx.hpp" #include "cocos2d_specifics.hpp" -#include "js_bindings_chipmunk_manual.hpp" USING_NS_CC; using namespace CocosDenshion; @@ -42,7 +41,7 @@ bool AppDelegate::applicationDidFinishLaunching() CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance(); CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine); - ScriptingCore::getInstance()->runScript("MoonWarriors/MoonWarriors-native.js"); + ScriptingCore::getInstance()->runScript("js/MoonWarriors-native.js"); return true; } diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js b/samples/MoonWarriors/Resources/js/AboutLayer.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/AboutLayer.js rename to samples/MoonWarriors/Resources/js/AboutLayer.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js b/samples/MoonWarriors/Resources/js/Bullet.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Bullet.js rename to samples/MoonWarriors/Resources/js/Bullet.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js b/samples/MoonWarriors/Resources/js/Effect.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Effect.js rename to samples/MoonWarriors/Resources/js/Effect.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js b/samples/MoonWarriors/Resources/js/Enemy.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Enemy.js rename to samples/MoonWarriors/Resources/js/Enemy.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js b/samples/MoonWarriors/Resources/js/Explosion.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Explosion.js rename to samples/MoonWarriors/Resources/js/Explosion.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js b/samples/MoonWarriors/Resources/js/GameControlMenu.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/GameControlMenu.js rename to samples/MoonWarriors/Resources/js/GameControlMenu.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js b/samples/MoonWarriors/Resources/js/GameController.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/GameController.js rename to samples/MoonWarriors/Resources/js/GameController.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js b/samples/MoonWarriors/Resources/js/GameLayer.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/GameLayer.js rename to samples/MoonWarriors/Resources/js/GameLayer.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js b/samples/MoonWarriors/Resources/js/GameOver.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/GameOver.js rename to samples/MoonWarriors/Resources/js/GameOver.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js b/samples/MoonWarriors/Resources/js/LevelManager.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/LevelManager.js rename to samples/MoonWarriors/Resources/js/LevelManager.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js b/samples/MoonWarriors/Resources/js/MoonWarriors-html5.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-html5.js rename to samples/MoonWarriors/Resources/js/MoonWarriors-html5.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js b/samples/MoonWarriors/Resources/js/MoonWarriors-native.js similarity index 74% rename from samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js rename to samples/MoonWarriors/Resources/js/MoonWarriors-native.js index 5d1e42551e..d6cce44e24 100644 --- a/samples/MoonWarriors/Resources/MoonWarriors/MoonWarriors-native.js +++ b/samples/MoonWarriors/Resources/js/MoonWarriors-native.js @@ -26,27 +26,27 @@ // boot code needed for cocos2d + JS bindings. // Not needed by cocos2d-html5 -require("jshelper/jsb_constants.js"); +require("js/helper/jsb_constants.js"); var MW = MW || {}; var appFiles = [ - 'MoonWarriors/src/Resource.js', - 'MoonWarriors/src/config/GameConfig.js', - 'MoonWarriors/src/config/EnemyType.js', - 'MoonWarriors/src/config/Level.js', - 'MoonWarriors/src/Effect.js', - 'MoonWarriors/src/Bullet.js', - 'MoonWarriors/src/Enemy.js', - 'MoonWarriors/src/Explosion.js', - 'MoonWarriors/src/Ship.js', - 'MoonWarriors/src/LevelManager.js', - 'MoonWarriors/src/GameControlMenu.js', - 'MoonWarriors/src/GameLayer.js', - 'MoonWarriors/src/GameOver.js', - 'MoonWarriors/src/AboutLayer.js', - 'MoonWarriors/src/SettingsLayer.js', - 'MoonWarriors/src/SysMenu.js' + 'js/Resource.js', + 'js/config/GameConfig.js', + 'js/config/EnemyType.js', + 'js/config/Level.js', + 'js/Effect.js', + 'js/Bullet.js', + 'js/Enemy.js', + 'js/Explosion.js', + 'js/Ship.js', + 'js/LevelManager.js', + 'js/GameControlMenu.js', + 'js/GameLayer.js', + 'js/GameOver.js', + 'js/AboutLayer.js', + 'js/SettingsLayer.js', + 'js/SysMenu.js' ]; cc.dumpConfig(); diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js b/samples/MoonWarriors/Resources/js/Resource.js similarity index 92% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js rename to samples/MoonWarriors/Resources/js/Resource.js index c2f6becdad..340dded6b2 100644 --- a/samples/MoonWarriors/Resources/MoonWarriors/src/Resource.js +++ b/samples/MoonWarriors/Resources/js/Resource.js @@ -1,11 +1,16 @@ var dirImg = ""; var dirMusic = ""; var musicSuffix = ".mp3"; -if( cc.config.deviceType == 'browser' || cc.config.engine == 'cocos2d-x') { - dirImg = "MoonWarriors/res/"; - dirMusic = "MoonWarriors/res/Music/"; +if( cc.config.deviceType == 'browser') { + dirImg = "res/"; + dirMusic = "res/Music/"; musicSuffix = ""; } +else if( cc.config.engine == 'cocos2d-x') { + dirImg = "res/"; + dirMusic = "res/Music/"; + musicSuffix = ".mp3"; +} //image var s_bg01 = dirImg + "bg01.jpg"; diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js b/samples/MoonWarriors/Resources/js/SettingsLayer.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/SettingsLayer.js rename to samples/MoonWarriors/Resources/js/SettingsLayer.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js b/samples/MoonWarriors/Resources/js/Ship.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/Ship.js rename to samples/MoonWarriors/Resources/js/Ship.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js b/samples/MoonWarriors/Resources/js/SysMenu.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/SysMenu.js rename to samples/MoonWarriors/Resources/js/SysMenu.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js b/samples/MoonWarriors/Resources/js/config/EnemyType.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/config/EnemyType.js rename to samples/MoonWarriors/Resources/js/config/EnemyType.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js b/samples/MoonWarriors/Resources/js/config/GameConfig.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/config/GameConfig.js rename to samples/MoonWarriors/Resources/js/config/GameConfig.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js b/samples/MoonWarriors/Resources/js/config/Level.js similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/src/config/Level.js rename to samples/MoonWarriors/Resources/js/config/Level.js diff --git a/samples/MoonWarriors/Resources/jshelper/jsb_constants.js b/samples/MoonWarriors/Resources/js/helper/jsb_constants.js similarity index 99% rename from samples/MoonWarriors/Resources/jshelper/jsb_constants.js rename to samples/MoonWarriors/Resources/js/helper/jsb_constants.js index 7ad903713a..d744f521bf 100644 --- a/samples/MoonWarriors/Resources/jshelper/jsb_constants.js +++ b/samples/MoonWarriors/Resources/js/helper/jsb_constants.js @@ -1,4 +1,4 @@ -require('jshelper/jsb_constants_gl.js'); +require('js/helper/jsb_constants_gl.js'); // cocos2d Helper cc.c3 = cc.c3 || function (r, g, b) { diff --git a/samples/MoonWarriors/Resources/jshelper/jsb_constants_gl.js b/samples/MoonWarriors/Resources/js/helper/jsb_constants_gl.js similarity index 100% rename from samples/MoonWarriors/Resources/jshelper/jsb_constants_gl.js rename to samples/MoonWarriors/Resources/js/helper/jsb_constants_gl.js diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id b/samples/MoonWarriors/Resources/res/Music/bgMusic.mp3.REMOVED.git-id similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id rename to samples/MoonWarriors/Resources/res/Music/bgMusic.mp3.REMOVED.git-id diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id b/samples/MoonWarriors/Resources/res/Music/mainMainMusic.mp3.REMOVED.git-id similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id rename to samples/MoonWarriors/Resources/res/Music/mainMainMusic.mp3.REMOVED.git-id diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/arial-14.GlyphProject b/samples/MoonWarriors/Resources/res/arial-14.GlyphProject similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/arial-14.GlyphProject rename to samples/MoonWarriors/Resources/res/arial-14.GlyphProject diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id b/samples/MoonWarriors/Resources/res/b01.png.REMOVED.git-id similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/b01.png.REMOVED.git-id rename to samples/MoonWarriors/Resources/res/b01.png.REMOVED.git-id diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id b/samples/MoonWarriors/Resources/res/explosion.png.REMOVED.git-id similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id rename to samples/MoonWarriors/Resources/res/explosion.png.REMOVED.git-id diff --git a/samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id b/samples/MoonWarriors/Resources/res/loading.png.REMOVED.git-id similarity index 100% rename from samples/MoonWarriors/Resources/MoonWarriors/res/loading.png.REMOVED.git-id rename to samples/MoonWarriors/Resources/res/loading.png.REMOVED.git-id diff --git a/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj index 6c72c9f956..efe0a52e68 100644 --- a/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj +++ b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj @@ -7,154 +7,53 @@ objects = { /* Begin PBXBuildFile section */ - 15384E5716119CC30021DC07 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */; }; - 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 */; }; - 15384E5E16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */; }; - 15384E5F16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.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 */; }; - 15628F6C15F0F5E5000CF24B /* ballbounce.wav in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5D15F0F5E5000CF24B /* ballbounce.wav */; }; - 15628F6D15F0F5E5000CF24B /* cowbell.wav in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5E15F0F5E5000CF24B /* cowbell.wav */; }; - 15628F6E15F0F5E5000CF24B /* Cyber Advance!.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */; }; - 15628F6F15F0F5E5000CF24B /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6015F0F5E5000CF24B /* Fonts */; }; - 15628F7015F0F5E5000CF24B /* Images in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6115F0F5E5000CF24B /* Images */; }; - 15628F7115F0F5E5000CF24B /* js in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6215F0F5E5000CF24B /* js */; }; - 15628F7215F0F5E5000CF24B /* oldjs in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6315F0F5E5000CF24B /* oldjs */; }; - 15628F7315F0F5E5000CF24B /* Particles in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6415F0F5E5000CF24B /* Particles */; }; - 15628F7415F0F5E5000CF24B /* Silly Fun Theme A.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */; }; - 15628F7515F0F5E5000CF24B /* tank.plist in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6615F0F5E5000CF24B /* tank.plist */; }; - 15628F7615F0F5E5000CF24B /* tank.png in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6715F0F5E5000CF24B /* tank.png */; }; - 15628F7715F0F5E5000CF24B /* tank.tps in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6815F0F5E5000CF24B /* tank.tps */; }; - 15628F7815F0F5E5000CF24B /* tank1.png in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6915F0F5E5000CF24B /* tank1.png */; }; - 15628F7915F0F5E5000CF24B /* TileMaps in Resources */ = {isa = PBXBuildFile; fileRef = 15628F6A15F0F5E5000CF24B /* TileMaps */; }; - 15628FA915F1057E000CF24B /* animations in Resources */ = {isa = PBXBuildFile; fileRef = 15628FA815F1057E000CF24B /* animations */; }; - 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 */; }; - 262829CC15EC7196002C4240 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 2628297D15EC7196002C4240 /* .gitignore */; }; - 262829CD15EC7196002C4240 /* Android.mk in Resources */ = {isa = PBXBuildFile; fileRef = 2628297E15EC7196002C4240 /* Android.mk */; }; - 262829CE15EC7196002C4240 /* chipmunk-docs.html in Resources */ = {isa = PBXBuildFile; fileRef = 2628297F15EC7196002C4240 /* chipmunk-docs.html */; }; - 262829CF15EC7196002C4240 /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = 2628299C15EC7196002C4240 /* LICENSE.txt */; }; - 262829D015EC7196002C4240 /* .cproject in Resources */ = {isa = PBXBuildFile; fileRef = 2628299E15EC7196002C4240 /* .cproject */; }; - 262829D115EC7196002C4240 /* .project in Resources */ = {isa = PBXBuildFile; fileRef = 2628299F15EC7196002C4240 /* .project */; }; - 262829D215EC7196002C4240 /* .cproject in Resources */ = {isa = PBXBuildFile; fileRef = 262829A115EC7196002C4240 /* .cproject */; }; - 262829D315EC7196002C4240 /* .project in Resources */ = {isa = PBXBuildFile; fileRef = 262829A215EC7196002C4240 /* .project */; }; - 262829D415EC7196002C4240 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 262829A315EC7196002C4240 /* Makefile */; }; - 262829D515EC7196002C4240 /* chipmunk.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = 262829A515EC7196002C4240 /* chipmunk.vcproj */; }; - 262829D615EC7196002C4240 /* chipmunk.vcproj.user in Resources */ = {isa = PBXBuildFile; fileRef = 262829A615EC7196002C4240 /* chipmunk.vcproj.user */; }; - 262829D715EC7196002C4240 /* chipmunk.vcxproj in Resources */ = {isa = PBXBuildFile; fileRef = 262829A715EC7196002C4240 /* chipmunk.vcxproj */; }; - 262829D815EC7196002C4240 /* chipmunk.vcxproj.filters in Resources */ = {isa = PBXBuildFile; fileRef = 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */; }; - 262829D915EC7196002C4240 /* chipmunk.vcxproj.user in Resources */ = {isa = PBXBuildFile; fileRef = 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */; }; - 262829DA15EC7196002C4240 /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = 262829AA15EC7196002C4240 /* README.txt */; }; - 262829DB15EC7196002C4240 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AC15EC7196002C4240 /* chipmunk.c */; }; - 262829DC15EC7196002C4240 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = 262829AD15EC7196002C4240 /* CMakeLists.txt */; }; - 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 */; }; - 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 */; }; + 1A1D97421625AFB400D5E31D /* js in Resources */ = {isa = PBXBuildFile; fileRef = 1A1D97401625AFB400D5E31D /* js */; }; + 1A1D97431625AFB400D5E31D /* res in Resources */ = {isa = PBXBuildFile; fileRef = 1A1D97411625AFB400D5E31D /* res */; }; + 1A7CC34016257DF6006B3D18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC33F16257DF6006B3D18 /* QuartzCore.framework */; }; + 1A7CC34216257DF6006B3D18 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34116257DF6006B3D18 /* OpenGLES.framework */; }; + 1A7CC34416257DF6006B3D18 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34316257DF6006B3D18 /* OpenAL.framework */; }; + 1A7CC34616257DF6006B3D18 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34516257DF6006B3D18 /* AudioToolbox.framework */; }; + 1A7CC34816257DF6006B3D18 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34716257DF6006B3D18 /* AVFoundation.framework */; }; + 1A7CC34A16257DF6006B3D18 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34916257DF6006B3D18 /* UIKit.framework */; }; + 1A7CC34C16257DF6006B3D18 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34B16257DF6006B3D18 /* Foundation.framework */; }; + 1A7CC34E16257DF6006B3D18 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC34D16257DF6006B3D18 /* CoreGraphics.framework */; }; + 1A7CC72116258056006B3D18 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC71F16258056006B3D18 /* AppDelegate.cpp */; }; + 1A7CC72816258081006B3D18 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC72416258081006B3D18 /* AppController.mm */; }; + 1A7CC72916258081006B3D18 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC72516258081006B3D18 /* main.m */; }; + 1A7CC72A16258081006B3D18 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC72716258081006B3D18 /* RootViewController.mm */; }; + 1A7CC75F16258252006B3D18 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC75D16258252006B3D18 /* Info.plist */; }; + 1A7CC76716258283006B3D18 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76016258283006B3D18 /* Default-568h@2x.png */; }; + 1A7CC76816258283006B3D18 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76116258283006B3D18 /* Default.png */; }; + 1A7CC76916258283006B3D18 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76216258283006B3D18 /* Default@2x.png */; }; + 1A7CC76A16258283006B3D18 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76316258283006B3D18 /* Icon-57.png */; }; + 1A7CC76B16258283006B3D18 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76416258283006B3D18 /* Icon-72.png */; }; + 1A7CC76C16258283006B3D18 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76516258283006B3D18 /* Icon-114.png */; }; + 1A7CC76D16258283006B3D18 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC76616258283006B3D18 /* Icon-144.png */; }; + 1A7CC77C16258754006B3D18 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC76E16258754006B3D18 /* cocos2d_specifics.cpp */; }; + 1A7CC77D16258754006B3D18 /* cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC77116258754006B3D18 /* cocos2dx.cpp */; }; + 1A7CC77E16258754006B3D18 /* cocos2dxapi.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC77316258754006B3D18 /* cocos2dxapi.js */; }; + 1A7CC77F16258754006B3D18 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CC77416258754006B3D18 /* README */; }; + 1A7CC78016258754006B3D18 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC77616258754006B3D18 /* js_manual_conversions.cpp */; }; + 1A7CC78116258754006B3D18 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC77816258754006B3D18 /* ScriptingCore.cpp */; }; + 1A7CC782162587E0006B3D18 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7CC71D16257E75006B3D18 /* libcocos2dx.a */; }; + 1A7CC79216258828006B3D18 /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC78916258828006B3D18 /* CDAudioManager.m */; }; + 1A7CC79316258828006B3D18 /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC78C16258828006B3D18 /* CDOpenALSupport.m */; }; + 1A7CC79416258828006B3D18 /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC78E16258828006B3D18 /* CocosDenshion.m */; }; + 1A7CC79516258828006B3D18 /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC78F16258828006B3D18 /* SimpleAudioEngine.mm */; }; + 1A7CC79616258828006B3D18 /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC79116258828006B3D18 /* SimpleAudioEngine_objc.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 15426AF015B5733200712A7F /* PBXContainerItemProxy */ = { + 1A7CC71C16257E75006B3D18 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */; + containerPortal = 1A7CC71516257E74006B3D18 /* cocos2dx.xcodeproj */; proxyType = 2; remoteGlobalIDString = 1551A33F158F2AB200E66CFE; remoteInfo = cocos2dx; }; - 15426FC115B5741900712A7F /* PBXContainerItemProxy */ = { + 1A7CC730162580CE006B3D18 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */; + containerPortal = 1A7CC71516257E74006B3D18 /* cocos2dx.xcodeproj */; proxyType = 1; remoteGlobalIDString = 1551A33E158F2AB200E66CFE; remoteInfo = cocos2dx; @@ -162,939 +61,349 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; - 15384E3F16119CC30021DC07 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; - 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 = ""; }; - 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = ""; }; - 15384E4C16119CC30021DC07 /* js_bindings_chipmunk_functions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_functions.hpp; sourceTree = ""; }; - 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = ""; }; - 15384E4E16119CC30021DC07 /* js_bindings_chipmunk_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_manual.hpp; 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 = ""; }; - 15628F5D15F0F5E5000CF24B /* ballbounce.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ballbounce.wav; path = ../Resources/ballbounce.wav; sourceTree = ""; }; - 15628F5E15F0F5E5000CF24B /* cowbell.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = cowbell.wav; path = ../Resources/cowbell.wav; sourceTree = ""; }; - 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "Cyber Advance!.mp3"; path = "../Resources/Cyber Advance!.mp3"; sourceTree = ""; }; - 15628F6015F0F5E5000CF24B /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Fonts; path = ../Resources/Fonts; sourceTree = ""; }; - 15628F6115F0F5E5000CF24B /* Images */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Images; path = ../Resources/Images; sourceTree = ""; }; - 15628F6215F0F5E5000CF24B /* js */ = {isa = PBXFileReference; lastKnownFileType = folder; name = js; path = ../Resources/js; sourceTree = ""; }; - 15628F6315F0F5E5000CF24B /* oldjs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = oldjs; path = ../Resources/oldjs; sourceTree = ""; }; - 15628F6415F0F5E5000CF24B /* Particles */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Particles; path = ../Resources/Particles; sourceTree = ""; }; - 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "Silly Fun Theme A.mp3"; path = "../Resources/Silly Fun Theme A.mp3"; sourceTree = ""; }; - 15628F6615F0F5E5000CF24B /* tank.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = tank.plist; path = ../Resources/tank.plist; sourceTree = ""; }; - 15628F6715F0F5E5000CF24B /* tank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank.png; path = ../Resources/tank.png; sourceTree = ""; }; - 15628F6815F0F5E5000CF24B /* tank.tps */ = {isa = PBXFileReference; lastKnownFileType = file; name = tank.tps; path = ../Resources/tank.tps; sourceTree = ""; }; - 15628F6915F0F5E5000CF24B /* tank1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank1.png; path = ../Resources/tank1.png; sourceTree = ""; }; - 15628F6A15F0F5E5000CF24B /* TileMaps */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TileMaps; path = ../Resources/TileMaps; sourceTree = ""; }; - 15628FA815F1057E000CF24B /* animations */ = {isa = PBXFileReference; lastKnownFileType = folder; name = animations; path = ../Resources/animations; 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 = ""; }; - 2628297D15EC7196002C4240 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; - 2628297E15EC7196002C4240 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; - 2628297F15EC7196002C4240 /* chipmunk-docs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "chipmunk-docs.html"; 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 = ""; }; - 2628299C15EC7196002C4240 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; - 2628299E15EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = ""; }; - 2628299F15EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = ""; }; - 262829A115EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = ""; }; - 262829A215EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = ""; }; - 262829A315EC7196002C4240 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 262829A515EC7196002C4240 /* chipmunk.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj; sourceTree = ""; }; - 262829A615EC7196002C4240 /* chipmunk.vcproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj.user; sourceTree = ""; }; - 262829A715EC7196002C4240 /* chipmunk.vcxproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj; sourceTree = ""; }; - 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.filters; sourceTree = ""; }; - 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.user; sourceTree = ""; }; - 262829AA15EC7196002C4240 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; 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 = ""; }; - A922753D1517C094001B78AA /* MoonWarriors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoonWarriors.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 = ""; }; + 1A1D97401625AFB400D5E31D /* js */ = {isa = PBXFileReference; lastKnownFileType = folder; name = js; path = ../Resources/js; sourceTree = ""; }; + 1A1D97411625AFB400D5E31D /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../Resources/res; sourceTree = ""; }; + 1A7CC33B16257DF5006B3D18 /* MoonWarriors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoonWarriors.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A7CC33F16257DF6006B3D18 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 1A7CC34116257DF6006B3D18 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 1A7CC34316257DF6006B3D18 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 1A7CC34516257DF6006B3D18 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 1A7CC34716257DF6006B3D18 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 1A7CC34916257DF6006B3D18 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 1A7CC34B16257DF6006B3D18 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1A7CC34D16257DF6006B3D18 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 1A7CC71516257E74006B3D18 /* cocos2dx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2dx.xcodeproj; path = ../../../cocos2dx/proj.ios/cocos2dx.xcodeproj; sourceTree = ""; }; + 1A7CC71F16258056006B3D18 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; + 1A7CC72016258056006B3D18 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1A7CC72316258081006B3D18 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; + 1A7CC72416258081006B3D18 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; + 1A7CC72516258081006B3D18 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1A7CC72616258081006B3D18 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 1A7CC72716258081006B3D18 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; }; + 1A7CC75D16258252006B3D18 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A7CC75E16258252006B3D18 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 1A7CC76016258283006B3D18 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 1A7CC76116258283006B3D18 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 1A7CC76216258283006B3D18 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 1A7CC76316258283006B3D18 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 1A7CC76416258283006B3D18 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 1A7CC76516258283006B3D18 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 1A7CC76616258283006B3D18 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 1A7CC76E16258754006B3D18 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = ""; }; + 1A7CC76F16258754006B3D18 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = ""; }; + 1A7CC77116258754006B3D18 /* cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2dx.cpp; sourceTree = ""; }; + 1A7CC77216258754006B3D18 /* cocos2dx.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2dx.hpp; sourceTree = ""; }; + 1A7CC77316258754006B3D18 /* cocos2dxapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = cocos2dxapi.js; sourceTree = ""; }; + 1A7CC77416258754006B3D18 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + 1A7CC77516258754006B3D18 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = ""; }; + 1A7CC77616258754006B3D18 /* js_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_manual_conversions.cpp; sourceTree = ""; }; + 1A7CC77716258754006B3D18 /* js_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_manual_conversions.h; sourceTree = ""; }; + 1A7CC77816258754006B3D18 /* ScriptingCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptingCore.cpp; sourceTree = ""; }; + 1A7CC77916258754006B3D18 /* ScriptingCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptingCore.h; sourceTree = ""; }; + 1A7CC77A16258754006B3D18 /* spidermonkey_specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spidermonkey_specifics.h; sourceTree = ""; }; + 1A7CC77B16258754006B3D18 /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = ""; }; + 1A7CC78516258828006B3D18 /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; + 1A7CC78616258828006B3D18 /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; }; + 1A7CC78816258828006B3D18 /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; + 1A7CC78916258828006B3D18 /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; }; + 1A7CC78A16258828006B3D18 /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; }; + 1A7CC78B16258828006B3D18 /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; }; + 1A7CC78C16258828006B3D18 /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; }; + 1A7CC78D16258828006B3D18 /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; }; + 1A7CC78E16258828006B3D18 /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; }; + 1A7CC78F16258828006B3D18 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; + 1A7CC79016258828006B3D18 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; + 1A7CC79116258828006B3D18 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - A922753A1517C094001B78AA /* Frameworks */ = { + 1A7CC33816257DF5006B3D18 /* 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 */, + 1A7CC782162587E0006B3D18 /* libcocos2dx.a in Frameworks */, + 1A7CC34016257DF6006B3D18 /* QuartzCore.framework in Frameworks */, + 1A7CC34216257DF6006B3D18 /* OpenGLES.framework in Frameworks */, + 1A7CC34416257DF6006B3D18 /* OpenAL.framework in Frameworks */, + 1A7CC34616257DF6006B3D18 /* AudioToolbox.framework in Frameworks */, + 1A7CC34816257DF6006B3D18 /* AVFoundation.framework in Frameworks */, + 1A7CC34A16257DF6006B3D18 /* UIKit.framework in Frameworks */, + 1A7CC34C16257DF6006B3D18 /* Foundation.framework in Frameworks */, + 1A7CC34E16257DF6006B3D18 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 15384E3C16119CC30021DC07 /* bindings */ = { + 1A7CC33016257DF5006B3D18 = { isa = PBXGroup; children = ( - 15384E3E16119CC30021DC07 /* CCPhysicsSprite.cpp */, - 15384E3F16119CC30021DC07 /* CCPhysicsSprite.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 */, - 15384E4B16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp */, - 15384E4C16119CC30021DC07 /* js_bindings_chipmunk_functions.hpp */, - 15384E4D16119CC30021DC07 /* js_bindings_chipmunk_manual.cpp */, - 15384E4E16119CC30021DC07 /* js_bindings_chipmunk_manual.hpp */, - 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 */, + 1A7CC71516257E74006B3D18 /* cocos2dx.xcodeproj */, + 1A7CC732162580F9006B3D18 /* bindings */, + 1A7CC71E16258056006B3D18 /* Classes */, + 1A7CC78316258819006B3D18 /* CocosDenshion */, + 1A7CC33E16257DF5006B3D18 /* Frameworks */, + 1A7CC7221625806F006B3D18 /* ios */, + 1A7CC33C16257DF5006B3D18 /* Products */, + 1A7CC72B162580AD006B3D18 /* Resources */, ); - name = bindings; - path = ../../../scripting/javascript/bindings; sourceTree = ""; }; - 15384E4416119CC30021DC07 /* generated */ = { + 1A7CC33C16257DF5006B3D18 /* Products */ = { isa = PBXGroup; children = ( - 15384E4516119CC30021DC07 /* cocos2dx.cpp */, - 15384E4616119CC30021DC07 /* cocos2dx.hpp */, - ); - path = generated; - sourceTree = ""; - }; - 15384E6216119D5E0021DC07 /* extensions */ = { - isa = PBXGroup; - children = ( - 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 */, + 1A7CC33B16257DF5006B3D18 /* MoonWarriors.app */, ); name = Products; sourceTree = ""; }; - 15426FC415B5743C00712A7F /* CocosDenshion */ = { + 1A7CC33E16257DF5006B3D18 /* Frameworks */ = { 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 = ( - D446FDA616102D86000ADA7B /* Default-568h@2x.png */, - D446FDA416102D82000ADA7B /* Default@2x.png */, - D446FDA216102D7D000ADA7B /* Default.png */, - 15628FA815F1057E000CF24B /* animations */, - 15628F5D15F0F5E5000CF24B /* ballbounce.wav */, - 15628F5E15F0F5E5000CF24B /* cowbell.wav */, - 15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */, - 15628F6015F0F5E5000CF24B /* Fonts */, - 15628F6115F0F5E5000CF24B /* Images */, - 15628F6215F0F5E5000CF24B /* js */, - 15628F6315F0F5E5000CF24B /* oldjs */, - 15628F6415F0F5E5000CF24B /* Particles */, - 15628F6515F0F5E5000CF24B /* Silly Fun Theme A.mp3 */, - 15628F6615F0F5E5000CF24B /* tank.plist */, - 15628F6715F0F5E5000CF24B /* tank.png */, - 15628F6815F0F5E5000CF24B /* tank.tps */, - 15628F6915F0F5E5000CF24B /* tank1.png */, - 15628F6A15F0F5E5000CF24B /* TileMaps */, - ); - 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 = ""; - }; - 2628297C15EC7196002C4240 /* chipmunk */ = { - isa = PBXGroup; - children = ( - 2628297D15EC7196002C4240 /* .gitignore */, - 2628297E15EC7196002C4240 /* Android.mk */, - 2628297F15EC7196002C4240 /* chipmunk-docs.html */, - 2628298015EC7196002C4240 /* include */, - 2628299C15EC7196002C4240 /* LICENSE.txt */, - 2628299D15EC7196002C4240 /* proj.blackberry */, - 262829A015EC7196002C4240 /* proj.linux */, - 262829A415EC7196002C4240 /* proj.win32 */, - 262829AA15EC7196002C4240 /* README.txt */, - 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 = ""; - }; - 2628299D15EC7196002C4240 /* proj.blackberry */ = { - isa = PBXGroup; - children = ( - 2628299E15EC7196002C4240 /* .cproject */, - 2628299F15EC7196002C4240 /* .project */, - ); - path = proj.blackberry; - sourceTree = ""; - }; - 262829A015EC7196002C4240 /* proj.linux */ = { - isa = PBXGroup; - children = ( - 262829A115EC7196002C4240 /* .cproject */, - 262829A215EC7196002C4240 /* .project */, - 262829A315EC7196002C4240 /* Makefile */, - ); - path = proj.linux; - sourceTree = ""; - }; - 262829A415EC7196002C4240 /* proj.win32 */ = { - isa = PBXGroup; - children = ( - 262829A515EC7196002C4240 /* chipmunk.vcproj */, - 262829A615EC7196002C4240 /* chipmunk.vcproj.user */, - 262829A715EC7196002C4240 /* chipmunk.vcxproj */, - 262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */, - 262829A915EC7196002C4240 /* chipmunk.vcxproj.user */, - ); - path = proj.win32; - 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 = ( - 15384E6216119D5E0021DC07 /* extensions */, - 15384E3C16119CC30021DC07 /* bindings */, - 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */, - 15628F5B15F0F5C2000CF24B /* Resources */, - 2628297C15EC7196002C4240 /* chipmunk */, - D4545214156E28EF00887EB5 /* Classes */, - 15426FC415B5743C00712A7F /* CocosDenshion */, - A92275401517C094001B78AA /* Frameworks */, - D45446CC156DE73F00887EB5 /* ios */, - A922753E1517C094001B78AA /* Products */, - ); - sourceTree = ""; - }; - A922753E1517C094001B78AA /* Products */ = { - isa = PBXGroup; - children = ( - A922753D1517C094001B78AA /* MoonWarriors.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 */, + 1A7CC33F16257DF6006B3D18 /* QuartzCore.framework */, + 1A7CC34116257DF6006B3D18 /* OpenGLES.framework */, + 1A7CC34316257DF6006B3D18 /* OpenAL.framework */, + 1A7CC34516257DF6006B3D18 /* AudioToolbox.framework */, + 1A7CC34716257DF6006B3D18 /* AVFoundation.framework */, + 1A7CC34916257DF6006B3D18 /* UIKit.framework */, + 1A7CC34B16257DF6006B3D18 /* Foundation.framework */, + 1A7CC34D16257DF6006B3D18 /* CoreGraphics.framework */, ); name = Frameworks; sourceTree = ""; }; - D45446CC156DE73F00887EB5 /* ios */ = { + 1A7CC71616257E74006B3D18 /* Products */ = { isa = PBXGroup; children = ( - D45446D6156DE79D00887EB5 /* Info.plist */, - D45446CD156DE74F00887EB5 /* AppController.h */, - D45446CE156DE74F00887EB5 /* AppController.mm */, - D45446CF156DE74F00887EB5 /* main.m */, - D45446D0156DE74F00887EB5 /* Prefix.pch */, - D45446D1156DE74F00887EB5 /* RootViewController.h */, - D45446D2156DE74F00887EB5 /* RootViewController.mm */, + 1A7CC71D16257E75006B3D18 /* libcocos2dx.a */, ); - name = ios; + name = Products; sourceTree = ""; }; - D4545214156E28EF00887EB5 /* Classes */ = { + 1A7CC71E16258056006B3D18 /* Classes */ = { isa = PBXGroup; children = ( - D4545215156E28EF00887EB5 /* AppDelegate.cpp */, - D4545216156E28EF00887EB5 /* AppDelegate.h */, + 1A7CC71F16258056006B3D18 /* AppDelegate.cpp */, + 1A7CC72016258056006B3D18 /* AppDelegate.h */, ); name = Classes; path = ../Classes; sourceTree = ""; }; + 1A7CC7221625806F006B3D18 /* ios */ = { + isa = PBXGroup; + children = ( + 1A7CC75D16258252006B3D18 /* Info.plist */, + 1A7CC75E16258252006B3D18 /* Prefix.pch */, + 1A7CC72316258081006B3D18 /* AppController.h */, + 1A7CC72416258081006B3D18 /* AppController.mm */, + 1A7CC72516258081006B3D18 /* main.m */, + 1A7CC72616258081006B3D18 /* RootViewController.h */, + 1A7CC72716258081006B3D18 /* RootViewController.mm */, + ); + name = ios; + sourceTree = ""; + }; + 1A7CC72B162580AD006B3D18 /* Resources */ = { + isa = PBXGroup; + children = ( + 1A1D97401625AFB400D5E31D /* js */, + 1A1D97411625AFB400D5E31D /* res */, + 1A7CC76016258283006B3D18 /* Default-568h@2x.png */, + 1A7CC76116258283006B3D18 /* Default.png */, + 1A7CC76216258283006B3D18 /* Default@2x.png */, + 1A7CC76316258283006B3D18 /* Icon-57.png */, + 1A7CC76416258283006B3D18 /* Icon-72.png */, + 1A7CC76516258283006B3D18 /* Icon-114.png */, + 1A7CC76616258283006B3D18 /* Icon-144.png */, + ); + name = Resources; + sourceTree = ""; + }; + 1A7CC732162580F9006B3D18 /* bindings */ = { + isa = PBXGroup; + children = ( + 1A7CC76E16258754006B3D18 /* cocos2d_specifics.cpp */, + 1A7CC76F16258754006B3D18 /* cocos2d_specifics.hpp */, + 1A7CC77016258754006B3D18 /* generated */, + 1A7CC77516258754006B3D18 /* js_bindings_config.h */, + 1A7CC77616258754006B3D18 /* js_manual_conversions.cpp */, + 1A7CC77716258754006B3D18 /* js_manual_conversions.h */, + 1A7CC77816258754006B3D18 /* ScriptingCore.cpp */, + 1A7CC77916258754006B3D18 /* ScriptingCore.h */, + 1A7CC77A16258754006B3D18 /* spidermonkey_specifics.h */, + 1A7CC77B16258754006B3D18 /* uthash.h */, + ); + name = bindings; + path = ../../../scripting/javascript/bindings; + sourceTree = ""; + }; + 1A7CC77016258754006B3D18 /* generated */ = { + isa = PBXGroup; + children = ( + 1A7CC77116258754006B3D18 /* cocos2dx.cpp */, + 1A7CC77216258754006B3D18 /* cocos2dx.hpp */, + 1A7CC77316258754006B3D18 /* cocos2dxapi.js */, + 1A7CC77416258754006B3D18 /* README */, + ); + path = generated; + sourceTree = ""; + }; + 1A7CC78316258819006B3D18 /* CocosDenshion */ = { + isa = PBXGroup; + children = ( + 1A7CC78416258828006B3D18 /* include */, + 1A7CC78716258828006B3D18 /* ios */, + ); + name = CocosDenshion; + sourceTree = ""; + }; + 1A7CC78416258828006B3D18 /* include */ = { + isa = PBXGroup; + children = ( + 1A7CC78516258828006B3D18 /* Export.h */, + 1A7CC78616258828006B3D18 /* SimpleAudioEngine.h */, + ); + name = include; + path = ../../../CocosDenshion/include; + sourceTree = ""; + }; + 1A7CC78716258828006B3D18 /* ios */ = { + isa = PBXGroup; + children = ( + 1A7CC78816258828006B3D18 /* CDAudioManager.h */, + 1A7CC78916258828006B3D18 /* CDAudioManager.m */, + 1A7CC78A16258828006B3D18 /* CDConfig.h */, + 1A7CC78B16258828006B3D18 /* CDOpenALSupport.h */, + 1A7CC78C16258828006B3D18 /* CDOpenALSupport.m */, + 1A7CC78D16258828006B3D18 /* CocosDenshion.h */, + 1A7CC78E16258828006B3D18 /* CocosDenshion.m */, + 1A7CC78F16258828006B3D18 /* SimpleAudioEngine.mm */, + 1A7CC79016258828006B3D18 /* SimpleAudioEngine_objc.h */, + 1A7CC79116258828006B3D18 /* SimpleAudioEngine_objc.m */, + ); + name = ios; + path = ../../../CocosDenshion/ios; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - A922753C1517C094001B78AA /* MoonWarriors */ = { + 1A7CC33A16257DF5006B3D18 /* MoonWarriors */ = { isa = PBXNativeTarget; - buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "MoonWarriors" */; + buildConfigurationList = 1A7CC70D16257E02006B3D18 /* Build configuration list for PBXNativeTarget "MoonWarriors" */; buildPhases = ( - A92275391517C094001B78AA /* Sources */, - A922753A1517C094001B78AA /* Frameworks */, - A922753B1517C094001B78AA /* Resources */, + 1A7CC33716257DF5006B3D18 /* Sources */, + 1A7CC33816257DF5006B3D18 /* Frameworks */, + 1A7CC33916257DF5006B3D18 /* Resources */, ); buildRules = ( ); dependencies = ( - 15426FC215B5741900712A7F /* PBXTargetDependency */, + 1A7CC731162580CE006B3D18 /* PBXTargetDependency */, ); name = MoonWarriors; productName = MoonWarriors; - productReference = A922753D1517C094001B78AA /* MoonWarriors.app */; + productReference = 1A7CC33B16257DF5006B3D18 /* MoonWarriors.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - A92275341517C094001B78AA /* Project object */ = { + 1A7CC33216257DF5006B3D18 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0450; }; - buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "MoonWarriors" */; + buildConfigurationList = 1A7CC33516257DF5006B3D18 /* Build configuration list for PBXProject "MoonWarriors" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = A92275321517C094001B78AA; - productRefGroup = A922753E1517C094001B78AA /* Products */; + mainGroup = 1A7CC33016257DF5006B3D18; + productRefGroup = 1A7CC33C16257DF5006B3D18 /* Products */; projectDirPath = ""; projectReferences = ( { - ProductGroup = 15426AEA15B5733200712A7F /* Products */; - ProjectRef = 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */; + ProductGroup = 1A7CC71616257E74006B3D18 /* Products */; + ProjectRef = 1A7CC71516257E74006B3D18 /* cocos2dx.xcodeproj */; }, ); projectRoot = ""; targets = ( - A922753C1517C094001B78AA /* MoonWarriors */, + 1A7CC33A16257DF5006B3D18 /* MoonWarriors */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 15426AF115B5733200712A7F /* libcocos2dx.a */ = { + 1A7CC71D16257E75006B3D18 /* libcocos2dx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libcocos2dx.a; - remoteRef = 15426AF015B5733200712A7F /* PBXContainerItemProxy */; + remoteRef = 1A7CC71C16257E75006B3D18 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ - A922753B1517C094001B78AA /* Resources */ = { + 1A7CC33916257DF5006B3D18 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 262829CC15EC7196002C4240 /* .gitignore in Resources */, - 262829CD15EC7196002C4240 /* Android.mk in Resources */, - 262829CE15EC7196002C4240 /* chipmunk-docs.html in Resources */, - 262829CF15EC7196002C4240 /* LICENSE.txt in Resources */, - 262829D015EC7196002C4240 /* .cproject in Resources */, - 262829D115EC7196002C4240 /* .project in Resources */, - 262829D215EC7196002C4240 /* .cproject in Resources */, - 262829D315EC7196002C4240 /* .project in Resources */, - 262829D515EC7196002C4240 /* chipmunk.vcproj in Resources */, - 262829D615EC7196002C4240 /* chipmunk.vcproj.user in Resources */, - 262829D715EC7196002C4240 /* chipmunk.vcxproj in Resources */, - 262829D815EC7196002C4240 /* chipmunk.vcxproj.filters in Resources */, - 262829D915EC7196002C4240 /* chipmunk.vcxproj.user in Resources */, - 262829DA15EC7196002C4240 /* README.txt in Resources */, - 262829DC15EC7196002C4240 /* CMakeLists.txt in Resources */, - 15628F6C15F0F5E5000CF24B /* ballbounce.wav in Resources */, - 15628F6D15F0F5E5000CF24B /* cowbell.wav in Resources */, - 15628F6E15F0F5E5000CF24B /* Cyber Advance!.mp3 in Resources */, - 15628F6F15F0F5E5000CF24B /* Fonts in Resources */, - 15628F7015F0F5E5000CF24B /* Images in Resources */, - 15628F7115F0F5E5000CF24B /* js in Resources */, - 15628F7215F0F5E5000CF24B /* oldjs in Resources */, - 15628F7315F0F5E5000CF24B /* Particles in Resources */, - 15628F7415F0F5E5000CF24B /* Silly Fun Theme A.mp3 in Resources */, - 15628F7515F0F5E5000CF24B /* tank.plist in Resources */, - 15628F7615F0F5E5000CF24B /* tank.png in Resources */, - 15628F7715F0F5E5000CF24B /* tank.tps in Resources */, - 15628F7815F0F5E5000CF24B /* tank1.png in Resources */, - 15628F7915F0F5E5000CF24B /* TileMaps in Resources */, - 15628FA915F1057E000CF24B /* animations in Resources */, - D446FDA316102D7D000ADA7B /* Default.png in Resources */, - D446FDA516102D82000ADA7B /* Default@2x.png in Resources */, - D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */, + 1A7CC75F16258252006B3D18 /* Info.plist in Resources */, + 1A7CC76716258283006B3D18 /* Default-568h@2x.png in Resources */, + 1A7CC76816258283006B3D18 /* Default.png in Resources */, + 1A7CC76916258283006B3D18 /* Default@2x.png in Resources */, + 1A7CC76A16258283006B3D18 /* Icon-57.png in Resources */, + 1A7CC76B16258283006B3D18 /* Icon-72.png in Resources */, + 1A7CC76C16258283006B3D18 /* Icon-114.png in Resources */, + 1A7CC76D16258283006B3D18 /* Icon-144.png in Resources */, + 1A7CC77F16258754006B3D18 /* README in Resources */, + 1A1D97421625AFB400D5E31D /* js in Resources */, + 1A1D97431625AFB400D5E31D /* res in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - A92275391517C094001B78AA /* Sources */ = { + 1A7CC33716257DF5006B3D18 /* 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 */, - 262829D415EC7196002C4240 /* Makefile 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 */, - 15384E5716119CC30021DC07 /* CCPhysicsSprite.cpp 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 */, - 15384E5E16119CC30021DC07 /* js_bindings_chipmunk_functions.cpp in Sources */, - 15384E5F16119CC30021DC07 /* js_bindings_chipmunk_manual.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 */, + 1A7CC72116258056006B3D18 /* AppDelegate.cpp in Sources */, + 1A7CC72816258081006B3D18 /* AppController.mm in Sources */, + 1A7CC72916258081006B3D18 /* main.m in Sources */, + 1A7CC72A16258081006B3D18 /* RootViewController.mm in Sources */, + 1A7CC77C16258754006B3D18 /* cocos2d_specifics.cpp in Sources */, + 1A7CC77D16258754006B3D18 /* cocos2dx.cpp in Sources */, + 1A7CC77E16258754006B3D18 /* cocos2dxapi.js in Sources */, + 1A7CC78016258754006B3D18 /* js_manual_conversions.cpp in Sources */, + 1A7CC78116258754006B3D18 /* ScriptingCore.cpp in Sources */, + 1A7CC79216258828006B3D18 /* CDAudioManager.m in Sources */, + 1A7CC79316258828006B3D18 /* CDOpenALSupport.m in Sources */, + 1A7CC79416258828006B3D18 /* CocosDenshion.m in Sources */, + 1A7CC79516258828006B3D18 /* SimpleAudioEngine.mm in Sources */, + 1A7CC79616258828006B3D18 /* SimpleAudioEngine_objc.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 15426FC215B5741900712A7F /* PBXTargetDependency */ = { + 1A7CC731162580CE006B3D18 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = cocos2dx; - targetProxy = 15426FC115B5741900712A7F /* PBXContainerItemProxy */; + targetProxy = 1A7CC730162580CE006B3D18 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - A92276FE1517C097001B78AA /* Debug */ = { + 1A7CC70B16257E02006B3D18 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; @@ -1106,22 +415,26 @@ "COCOS2D_DEBUG=1", USE_FILE32API, TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, ); 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", + "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx\"", + "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/third_party/ios\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/ios\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; SDKROOT = iphoneos; }; name = Debug; }; - A92276FF1517C097001B78AA /* Release */ = { + 1A7CC70C16257E02006B3D18 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; @@ -1131,45 +444,43 @@ NDEBUG, USE_FILE32API, TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, ); 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", + "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx\"", + "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/third_party/ios\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/ios\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; name = Release; }; - A92277011517C097001B78AA /* Debug */ = { + 1A7CC70E16257E02006B3D18 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 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, - ); "GCC_THUMB_SUPPORT[arch=armv6]" = ""; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../cocos2dx\"", "\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../cocos2dx\"", "\"$(SRCROOT)/../../../CocosDenshion/include\"", "\"$(SDKROOT)/usr/include/libxml2\"", - "$(SRCROOT)/../../../cocos2dx/include", - "$(SRCROOT)/../../../cocos2dx/platform/ios", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "\"$(SRCROOT)/../../../cocos2dx/include\"", + "\"$(SRCROOT)/../../../cocos2dx/platform/third_party/ios\"", + "\"$(SRCROOT)/../../../cocos2dx/platform/ios\"", "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include", "$(SRCROOT)/../../../scripting/javascript/bindings", ); @@ -1181,34 +492,30 @@ "-lz", "-ljs_static", ); - PRODUCT_NAME = MoonWarriors; + PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; WRAPPER_EXTENSION = app; }; name = Debug; }; - A92277021517C097001B78AA /* Release */ = { + 1A7CC70F16257E02006B3D18 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - COCOS2D_JAVASCRIPT, - NDEBUG, - USE_FILE32API, - TARGET_OS_IPHONE, - ); "GCC_THUMB_SUPPORT[arch=armv6]" = ""; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../cocos2dx\"", "\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../cocos2dx\"", "\"$(SRCROOT)/../../../CocosDenshion/include\"", "\"$(SDKROOT)/usr/include/libxml2\"", - "$(SRCROOT)/../../../cocos2dx/include", - "$(SRCROOT)/../../../cocos2dx/platform/ios", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "\"$(SRCROOT)/../../../cocos2dx/include\"", + "\"$(SRCROOT)/../../../cocos2dx/platform/third_party/ios\"", + "\"$(SRCROOT)/../../../cocos2dx/platform/ios\"", "$(SRCROOT)/../../../scripting/javascript/spidermonkey-ios/include", "$(SRCROOT)/../../../scripting/javascript/bindings", ); @@ -1220,8 +527,9 @@ "-lz", "-ljs_static", ); - PRODUCT_NAME = MoonWarriors; + PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; }; @@ -1230,25 +538,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - A92275371517C094001B78AA /* Build configuration list for PBXProject "MoonWarriors" */ = { + 1A7CC33516257DF5006B3D18 /* Build configuration list for PBXProject "MoonWarriors" */ = { isa = XCConfigurationList; buildConfigurations = ( - A92276FE1517C097001B78AA /* Debug */, - A92276FF1517C097001B78AA /* Release */, + 1A7CC70B16257E02006B3D18 /* Debug */, + 1A7CC70C16257E02006B3D18 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "MoonWarriors" */ = { + 1A7CC70D16257E02006B3D18 /* Build configuration list for PBXNativeTarget "MoonWarriors" */ = { isa = XCConfigurationList; buildConfigurations = ( - A92277011517C097001B78AA /* Debug */, - A92277021517C097001B78AA /* Release */, + 1A7CC70E16257E02006B3D18 /* Debug */, + 1A7CC70F16257E02006B3D18 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = A92275341517C094001B78AA /* Project object */; + rootObject = 1A7CC33216257DF5006B3D18 /* Project object */; } From 122a7480291438b04c6554ce1ba437dadc75398a Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 22:15:47 +0800 Subject: [PATCH 16/19] issue #1469: Removed some unused resources. --- .../MoonWarriors/MoonWarriors-html5.js | 69 ---- .../MoonWarriors/MoonWarriors-native.js | 69 ---- .../res/Music/bgMusic.mp3.REMOVED.git-id | 1 - .../Music/mainMainMusic.mp3.REMOVED.git-id | 1 - .../MoonWarriors/res/arial-14.GlyphProject | Bin 3188 -> 0 bytes .../MoonWarriors/res/b01.png.REMOVED.git-id | 1 - .../res/explosion.png.REMOVED.git-id | 1 - .../res/loading.png.REMOVED.git-id | 1 - .../Resources/MoonWarriors/src/AboutLayer.js | 47 --- .../Resources/MoonWarriors/src/Bullet.js | 62 ---- .../Resources/MoonWarriors/src/Effect.js | 78 ----- .../Resources/MoonWarriors/src/Enemy.js | 75 ----- .../Resources/MoonWarriors/src/Explosion.js | 38 --- .../MoonWarriors/src/GameControlMenu.js | 35 -- .../MoonWarriors/src/GameController.js | 70 ---- .../Resources/MoonWarriors/src/GameLayer.js | 315 ------------------ .../Resources/MoonWarriors/src/GameOver.js | 83 ----- .../MoonWarriors/src/LevelManager.js | 99 ------ .../Resources/MoonWarriors/src/Resource.js | 89 ----- .../MoonWarriors/src/SettingsLayer.js | 85 ----- .../Resources/MoonWarriors/src/Ship.js | 128 ------- .../Resources/MoonWarriors/src/SysMenu.js | 110 ------ .../MoonWarriors/src/config/EnemyType.js | 56 ---- .../MoonWarriors/src/config/GameConfig.js | 94 ------ .../MoonWarriors/src/config/Level.js | 49 --- 25 files changed, 1656 deletions(-) delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-html5.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-native.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/arial-14.GlyphProject delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Effect.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameController.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Resource.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/Ship.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js delete mode 100644 samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js diff --git a/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-html5.js b/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-html5.js deleted file mode 100644 index 1aee15ae78..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-html5.js +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - 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. - ****************************************************************************/ - -// boot code needed for cocos2d-html5 -// Not needed by cocos2d + JS bindings - -var MW = MW || {}; - -(function () { - var d = document; - var c = { - menuType:'canvas', //whether to use canvas mode menu or dom menu - COCOS2D_DEBUG:2, //0 to turn debug off, 1 for basic debug, and 2 for full debug - showFPS:true, - frameRate:60, - tag:'gameCanvas', //the dom element to run cocos2d on - engineDir:'libs/cocos2d/', - appFiles:[ - 'MoonWarriors/src/Resource.js', - 'MoonWarriors/src/config/GameConfig.js', - 'MoonWarriors/src/config/EnemyType.js', - 'MoonWarriors/src/config/Level.js', - 'MoonWarriors/src/Effect.js', - 'MoonWarriors/src/Bullet.js', - 'MoonWarriors/src/Enemy.js', - 'MoonWarriors/src/Explosion.js', - 'MoonWarriors/src/Ship.js', - 'MoonWarriors/src/LevelManager.js', - 'MoonWarriors/src/GameController.js', - 'MoonWarriors/src/GameControlMenu.js', - 'MoonWarriors/src/GameLayer.js', - 'MoonWarriors/src/GameOver.js', - 'MoonWarriors/src/AboutLayer.js', - 'MoonWarriors/src/SettingsLayer.js', - 'MoonWarriors/src/SysMenu.js' - ] - }; - window.addEventListener('DOMContentLoaded', function () { - //first load engine file if specified - var s = d.createElement('script'); - s.src = c.engineDir + 'platform/jsloader.js'; - d.body.appendChild(s); - s.c = c; - s.id = 'cocos2d-html5'; - //else if single file specified, load singlefile - }); -})(); diff --git a/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-native.js b/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-native.js deleted file mode 100644 index e32f5ff64d..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/MoonWarriors-native.js +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - 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. - ****************************************************************************/ - -// boot code needed for cocos2d + JS bindings. -// Not needed by cocos2d-html5 - -require("js/jsb_constants.js"); - -var MW = MW || {}; - -var appFiles = [ - 'MoonWarriors/src/Resource.js', - 'MoonWarriors/src/config/GameConfig.js', - 'MoonWarriors/src/config/EnemyType.js', - 'MoonWarriors/src/config/Level.js', - 'MoonWarriors/src/Effect.js', - 'MoonWarriors/src/Bullet.js', - 'MoonWarriors/src/Enemy.js', - 'MoonWarriors/src/Explosion.js', - 'MoonWarriors/src/Ship.js', - 'MoonWarriors/src/LevelManager.js', - 'MoonWarriors/src/GameControlMenu.js', - 'MoonWarriors/src/GameLayer.js', - 'MoonWarriors/src/GameOver.js', - 'MoonWarriors/src/AboutLayer.js', - 'MoonWarriors/src/SettingsLayer.js', - 'MoonWarriors/src/SysMenu.js' -]; - -cc.dumpConfig(); - -for( var i=0; i < appFiles.length; i++) { - require( appFiles[i] ); -} - -var director = cc.Director.getInstance(); -director.setDisplayStats(true); - -// set FPS. the default value is 1.0/60 if you don't call this -director.setAnimationInterval(1.0 / 60); - -// create a scene. it's an autorelease object -var mainScene = SysMenu.scene(); - -// run -director.runWithScene(mainScene); - diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id deleted file mode 100644 index d86bcca004..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/res/Music/bgMusic.mp3.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -59362b16ba4da187e064648be4d0bcb1c09b504d \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id deleted file mode 100644 index 7a63ad234e..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/res/Music/mainMainMusic.mp3.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c0488f23a6a785893f4845b7fadc59ed892ceedc \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/arial-14.GlyphProject b/samples/TestJavascript/Resources/MoonWarriors/res/arial-14.GlyphProject deleted file mode 100644 index cbac22bf53b6cc81cdace7e013d3125ea209c0e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3188 zcmb7G3wTrI8GipiIhRy{aHoJ;O1T%Bq)FRwu@|6-wP|U3Zy_F%)Am4`6LL;yE26(T zZ(~jcZ{P*3&M~J}6q!?}PEov#aZ^N@IvQOz)2uEQXpu)z)iA{k4@HRr8Y6NaY8n)CG4Yt*o5wB#v?aF@o_^?9Zq z9|dyN-2+Yq5@cvtgSCjF8!_mJV;vGOU?Pe2=s_>~a1l1(Vr;}ExD*VR;c{GoAK*${ zg{yH5uEh_r2|vPh_%W`>4Y(1Tu?08bX54~XaT~T`8*axPxD!9Y&+rHy!!GQ=HD*?7Q8l1+t6b9=?TdF+YQ1WtNsE|W?RwITYB9Au)*0pI(WcsKCKFsVweqN@ z7+S1zrP>?U6K0i~h;b?8oH)40`2T=sgJ`2T&3@8peTHhB}R~lVPMDMBT=rB~XCFFE=e1m_P zm5$Mv-Y^8eg)JCY!aQ8Fg~D>f55^Pf`V8Xbv54B+#@UIeiCSHYnX9x|IGT*8k+e^~ zI|JiExN4mn3zewQVbh{hRCWoZmyoNuuhZ%ZRfnM2M=L#eA!!fQJddNLMC zQ)JodbW<_;62P>k&*2!A&xw) zp37q$I)|M!)J%bc908|lWaf0WW+v1Nv~JC8O`oe(%&zZb@=X(Tsaj{(;6@8Yy~WWW z#8ktzWlCV>a9UlPQ{9s3!@=m^_EJ*@Ppy+r2L5u$BWe2SFz({>XFKl3J?O{1xQ~}6 z5L}!zOuakBiq!{dJ6Bnqm=gGKYUSc#J!!~^&_ z9>hbf>3J68#cWPLs>W%~`tdLZPSZ38f;FkZpLVhnkMe-2=>6D<0q5}CXBprmts6XE zSALGW$h9%#43$?bUb3`u*?G&)uezW*P*c02E?D2t*woz8s;mx2)Q-+BZOz(fcTA73 zOBiNyeNS)SMQ%@_*H=_r;&c?KZ%$BgF{dg6xu}ZeQF>G<}N-yq1_$>#q9|t(! zhZ<6*=BOS{bv#?f&Px^6^0^&v@KWx;k%mC9ZdnEM*Enam=9Lt>3yVEIpWmJ1n&&I> z7Q1|YS4klk+#a{DsHDhKT+BUNbvuf;SDx1Q_u(BJ!|yO~x|%0rHE$aaqZ)DDngxR( z-{Y=+&(7zlN*OQ|)o}~YWD7)zr_kr|dp#ZtgtsXDDj5WE0w3~;6bM!)O=WddU804p zpSF_dyB8;LGSxHR>Kal!4-NC@Oxj+b%U|Lu^!u!cg)UzSk6PsQalz&Hy4}S^-V*;1 ze2?R=%wOrw;cw(t>;iJjcp-;6{yVq3a`-!?P5*I!hR?0~{S*IUK~~?7FYqO6U`_wE zegrs3C~N$F!HDqxlq$nCk+?etYyLjd!tG(yCz1B1-&EC2#|-DUF`HHY6)=A)F@ z`Tc1;Ih#x;Zc<2YAe+fe>|6#6XZ$q zG?8ZhL2{V9N!}uFlVjvv@;>>1949BpN%9e0MwinnT1{){ z3L2yhw28LRHoB6As6xY3rJYoxYiT#t={joAB<-PnbOYT;FQu2!E9jN2v8zd6Jwb&zH;PfLt#t za#+4j-X`B6-z)EsACjMxpO#;c_sa+6Bl1!C9r=Cv1Npf8C;628wSzcp4%so*G2T(` z2smmTb&e)S#L?ln(s8w8pW}ezO~&mCW9*|WxFP0Gr#dJ3R4y^`$oI{2NH`yXyb B$+`dl diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id deleted file mode 100644 index ab880f0157..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/res/b01.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -46f10a6bf5c63f03ddf8566f392aa7a8f258d7e8 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id deleted file mode 100644 index 56b3df641c..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/res/explosion.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -97bca7d49fb6ec5c330f6ab6f5f49d335601a669 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id b/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id deleted file mode 100644 index a35d4e432f..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/res/loading.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ca7905a1a07e2be3e02fbf329772c2c361400af7 \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js deleted file mode 100644 index 4d188d335a..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/AboutLayer.js +++ /dev/null @@ -1,47 +0,0 @@ -var AboutLayer = cc.Layer.extend({ - ctor:function () { - cc.associateWithNative( this, cc.Layer ); - }, - init:function () { - var bRet = false; - if (this._super()) { - var sp = cc.Sprite.create(s_loading); - sp.setAnchorPoint(cc.p(0,0)); - this.addChild(sp, 0, 1); - - var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); - var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 36, 100, 34)); - title.setPosition(cc.p(winSize.width / 2, winSize.height - 60)); - this.addChild(title); - - // There is a bug in LabelTTF native. Apparently it fails with some unicode chars. -// var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n \n Programmer: \n Shengxiang Chen (陈升想) \n Dingping Lv (吕定平) \n Effects animation: Hao Wu(吴昊)\n Quality Assurance: Sean Lin(林顺)", "Arial", 14, cc.size(winSize.width * 0.85, 100), cc.TEXT_ALIGNMENT_LEFT ); - var about = cc.LabelTTF.create(" This showcase utilizes many features from Cocos2d-html5 engine, including: Parallax background, tilemap, actions, ease, frame animation, schedule, Labels, keyboard Dispatcher, Scene Transition. \n Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrigted material without permission. This showcase is licensed under GPL. \n\nProgrammer: \n Shengxiang Chen\n Dingping Lv \n Effects animation: Hao Wu\n Quality Assurance: Sean Lin", "Arial", 14, cc.size(winSize.width * 0.85, 320), cc.TEXT_ALIGNMENT_LEFT ); - about.setPosition(cc.p(winSize.width / 2, winSize.height/2 -20) ); - about.setAnchorPoint( cc.p(0.5, 0.5)); - this.addChild(about); - - var label = cc.LabelTTF.create("Go back", "Arial", 14); - var back = cc.MenuItemLabel.create(label, this, this.backCallback); - var menu = cc.Menu.create(back); - menu.setPosition(cc.p(winSize.width / 2, 40)); - this.addChild(menu); - bRet = true; - } - - return bRet; - }, - backCallback:function (pSender) { - var scene = cc.Scene.create(); - scene.addChild(SysMenu.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - } -}); - -AboutLayer.create = function () { - var sg = new AboutLayer(); - if (sg && sg.init()) { - return sg; - } - return null; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js b/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js deleted file mode 100644 index d22c3b015a..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Bullet.js +++ /dev/null @@ -1,62 +0,0 @@ -//bullet -var Bullet = cc.Sprite.extend({ - active:true, - xVelocity:0, - yVelocity:200, - power:1, - HP:1, - moveType:null, - zOrder:3000, - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - parentType:MW.BULLET_TYPE.PLAYER, - ctor:function (bulletSpeed, weaponType, attackMode) { - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Sprite ); - - this.yVelocity = -bulletSpeed; - this.attackMode = attackMode; - cc.SpriteFrameCache.getInstance().addSpriteFrames(s_bullet_plist); - this.initWithSpriteFrameName(weaponType); - this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - /*var tmpAction; - switch (this.attackMode) { - case MW.ENEMY_MOVE_TYPE.NORMAL: - tmpAction = cc.MoveBy.create(2, cc.p(this.getPosition().x, 400)); - break; - case MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN: - tmpAction = cc.MoveTo.create(2, GameLayer.create()._ship.getPosition()); - break; - } - this.runAction(tmpAction);*/ - }, - update:function (dt) { - var p = this.getPosition(); - p.x -= this.xVelocity * dt; - p.y -= this.yVelocity * dt; - this.setPosition( p ); - if (this.HP <= 0) { - this.active = false; - } - }, - destroy:function () { - var explode = cc.Sprite.create(s_hit); - explode.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - explode.setPosition(this.getPosition()); - explode.setRotation(Math.random()*360); - explode.setScale(0.75); - this.getParent().addChild(explode,9999); - cc.ArrayRemoveObject(MW.CONTAINER.ENEMY_BULLETS,this); - cc.ArrayRemoveObject(MW.CONTAINER.PLAYER_BULLETS,this); - this.removeFromParentAndCleanup(true); - var removeExplode = cc.CallFunc.create(explode,explode.removeFromParentAndCleanup); - explode.runAction(cc.ScaleBy.create(0.3, 2,2)); - explode.runAction(cc.Sequence.create(cc.FadeOut.create(0.3), removeExplode)); - }, - hurt:function () { - this.HP--; - }, - collideRect:function(){ - var p = this.getPosition(); - return cc.rect(p.x - 3, p.y - 3, 6, 6); - } -}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js b/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js deleted file mode 100644 index faaa03c491..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Effect.js +++ /dev/null @@ -1,78 +0,0 @@ -var flareEffect = function (parent, target, callback) { - var flare = cc.Sprite.create(s_flare); - flare.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - parent.addChild(flare, 10); - flare.setOpacity(0); - flare.setPosition(cc.p(-30, 297)); - flare.setRotation(-120); - flare.setScale(0.2); - - var opacityAnim = cc.FadeTo.create(0.5, 255); - var opacDim = cc.FadeTo.create(1, 0); - var biggeAnim = cc.ScaleBy.create(0.7, 1.2, 1.2); - var biggerEase = cc.EaseSineOut.create(biggeAnim); - var moveAnim = cc.MoveBy.create(0.5, cc.p(328, 0)); - var easeMove = cc.EaseSineOut.create(moveAnim); - var rotateAnim = cc.RotateBy.create(2.5, 90); - var rotateEase = cc.EaseExponentialOut.create(rotateAnim); - var bigger = cc.ScaleTo.create(0.5, 1); - - var onComplete = cc.CallFunc.create(target, callback); - var killflare = cc.CallFunc.create(flare, function () { - this.getParent().removeChild(this,true); - }); - flare.runAction(cc.Sequence.create(opacityAnim, biggerEase, opacDim, killflare, onComplete)); - flare.runAction(easeMove); - flare.runAction(rotateEase); - flare.runAction(bigger); -}; - -var removeFromParent = function( sprite ) -{ - sprite.removeFromParentAndCleanup( true ); -}; - -var spark = function (ccpoint, parent, scale, duration) { - scale = scale || 0.3; - duration = duration || 0.5; - - var one = cc.Sprite.create(s_explode1); - var two = cc.Sprite.create(s_explode2); - var three = cc.Sprite.create(s_explode3); - - one.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - two.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - three.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - - one.setPosition(ccpoint); - two.setPosition(ccpoint); - three.setPosition(ccpoint); - - //parent.addChild(one); - parent.addChild(two); - parent.addChild(three); - one.setScale(scale); - two.setScale(scale); - three.setScale(scale); - - three.setRotation(Math.random() * 360); - - var left = cc.RotateBy.create(duration, -45); - var right = cc.RotateBy.create(duration, 45); - var scaleBy = cc.ScaleBy.create(duration, 3, 3); - var fadeOut = cc.FadeOut.create(duration); - var remove = cc.CallFunc.create(this, removeFromParent ); - var seq = cc.Sequence.create( fadeOut, remove ); - - one.runAction(left); - two.runAction(right); - - one.runAction(scaleBy); - two.runAction(scaleBy.copy()); - three.runAction(scaleBy.copy()); - - one.runAction(seq); - two.runAction(seq.copy() ); - three.runAction(seq.copy()); -}; - diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js b/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js deleted file mode 100644 index e266118547..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Enemy.js +++ /dev/null @@ -1,75 +0,0 @@ -var Enemy = cc.Sprite.extend({ - eID:0, - active:true, - speed:200, - bulletSpeed:-200, - HP:15, - bulletPowerValue:1, - moveType:null, - scoreValue:200, - zOrder:1000, - delayTime:1 + 1.2 * Math.random(), - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - _hurtColorLife:0, - ctor:function (arg) { - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Sprite ); - - this.HP = arg.HP; - this.moveType = arg.moveType; - this.scoreValue = arg.scoreValue; - this.attackMode = arg.attackMode; - - this.initWithSpriteFrameName(arg.textureName); - this.schedule(this.shoot, this.delayTime); - }, - _timeTick:0, - update:function (dt) { - if (this.HP <= 0) { - this.active = false; - } - this._timeTick += dt; - if (this._timeTick > 0.1) { - this._timeTick = 0; - if (this._hurtColorLife > 0) { - this._hurtColorLife--; - } - if (this._hurtColorLife == 1) { - this.setColor( cc.WHITE ); - } - } - }, - destroy:function () { - MW.SCORE += this.scoreValue; - var a = new Explosion(); - a.setPosition(this.getPosition()); - this.getParent().addChild(a); - spark(this.getPosition(),this.getParent(), 1.2, 0.7); - cc.ArrayRemoveObject(MW.CONTAINER.ENEMIES,this); - this.removeFromParentAndCleanup(true); - if(MW.SOUND){ - cc.AudioEngine.getInstance().playEffect(s_explodeEffect); - } - }, - shoot:function () { - var p = this.getPosition(); - var b = new Bullet(this.bulletSpeed, "W2.png", this.attackMode); - MW.CONTAINER.ENEMY_BULLETS.push(b); - this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.ENMEY_BULLET); - b.setPosition(cc.p(p.x, p.y - this.getContentSize().height * 0.2)); - }, - hurt:function () { - this._hurtColorLife = 2; - this.HP--; - this.setColor( cc.RED ); - }, - collideRect:function(){ - var a = this.getContentSize(); - var p = this.getPosition(); - return cc.rect(p.x - a.width/2, p.y - a.height/4,a.width,a.height/2); - } -}); - -Enemy.sharedEnemy = function(){ - cc.SpriteFrameCache.getInstance().addSpriteFrames(s_Enemy_plist, s_Enemy); -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js b/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js deleted file mode 100644 index 8ccd225c5d..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Explosion.js +++ /dev/null @@ -1,38 +0,0 @@ -var Explosion = cc.Sprite.extend({ - tmpWidth:0, - tmpHeight:0, - ctor:function () { - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Sprite ); - - var pFrame = cc.SpriteFrameCache.getInstance().getSpriteFrame("explosion_01.png"); - this.initWithSpriteFrame(pFrame); - - var cs = this.getContentSize(); - this.tmpWidth = cs.width; - this.tmpHeight = cs.height; - - var animation = cc.AnimationCache.getInstance().getAnimation("Explosion"); - this.runAction(cc.Sequence.create( - cc.Animate.create(animation), - cc.CallFunc.create(this, this.destroy) - )); - this.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - }, - destroy:function () { - this.getParent().removeChild(this,true); - } -}); - -Explosion.sharedExplosion = function () { - cc.SpriteFrameCache.getInstance().addSpriteFrames(s_explosion_plist); - var animFrames = []; - var str = ""; - for (var i = 1; i < 35; i++) { - str = "explosion_" + (i < 10 ? ("0" + i) : i) + ".png"; - var frame = cc.SpriteFrameCache.getInstance().getSpriteFrame(str); - animFrames.push(frame); - } - var animation = cc.Animation.create(animFrames, 0.04); - cc.AnimationCache.getInstance().addAnimation(animation, "Explosion"); -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js deleted file mode 100644 index 3fcdac736e..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/GameControlMenu.js +++ /dev/null @@ -1,35 +0,0 @@ -var GameControlMenu = cc.Layer.extend({ - ctor:function() { - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Layer); - }, - init:function () { - var bRet = false; - if (this._super()) { - cc.MenuItemFont.setFontSize(18); - cc.MenuItemFont.setFontName("Arial"); - var systemMenu = cc.MenuItemFont.create("Main Menu", this, this.sysMenu); - var menu = cc.Menu.create(systemMenu); - menu.setPosition(cc.p(0, 0)); - systemMenu.setAnchorPoint(cc.p(0, 0)); - systemMenu.setPosition(cc.p(winSize.width-95, 5)); - this.addChild(menu, 1, 2); - bRet = true; - } - - return bRet; - }, - sysMenu:function (pSender) { - var scene = cc.Scene.create(); - scene.addChild(SysMenu.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); - } -}); - -GameControlMenu.create = function () { - var sg = new GameControlMenu(); - if (sg && sg.init()) { - return sg; - } - return null; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js deleted file mode 100644 index d5aed4be94..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/GameController.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Cocos2d-html5 show case : Moon Warriors - * - * @Licensed: - * This showcase is licensed under GPL. - * - * @Authors: - * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada - * Effects animation: Hao Wu (吴昊) - * Quality Assurance: Sean Lin (林顺) - * - * @Links: - * http://www.cocos2d-x.org - * http://bbs.html5china.com - * - */ - - -MW.GameController = cc.Class.extend({ - _curScene:null, - _gameState:MW.GAME_STATE.HOME, - _isNewGame:true, - _curLevel:MW.LEVEL.STAGE1, - _selectLevel:MW.LEVEL.STAGE1, - init:function () { - return true; - }, - setCurScene:function (s) { - if (this._curScene != s) { - if (this._curScene !== null) { - this._curScene.onExit(); - } - this._curScene = s; - if (this._curScene) { - this._curScene.onEnter(); - cc.Director.getInstance().replaceScene(s); - } - } - }, - getCurScene:function () { - return this._curScene; - }, - runGame:function () { - - }, - newGame:function () { - - }, - option:function () { - - }, - about:function () { - - } -}); - -MW.GameController.getInstance = function () { - cc.Assert(this._sharedGame, "Havn't call setSharedGame"); - if (!this._sharedGame) { - this._sharedGame = new MW.GameController(); - if (this._sharedGame.init()) { - return this._sharedGame; - } - } else { - return this._sharedGame; - } - return null; -}; - -MW.GameController._sharedGame = null; \ No newline at end of file diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js deleted file mode 100644 index 60ee0ba738..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/GameLayer.js +++ /dev/null @@ -1,315 +0,0 @@ -// -// MoonWarriors -// -// Handles the Game Logic -// - -STATE_PLAYING = 0; -STATE_GAMEOVER = 1; - -var GameLayer = cc.Layer.extend({ - _time:null, - _ship:null, - _backSky:null, - _backSkyHeight:0, - _backSkyRe:null, - _backTileMap:null, - _backTileMapHeight:0, - _backTileMapRe:null, - _levelManager:null, - _tmpScore:0, - _isBackSkyReload:false, - _isBackTileReload:false, - lbScore:null, - screenRect:null, - explosionAnimation:[], - _beginPos:cc.p(0, 0), - _state:STATE_PLAYING, - ctor:function () { - cc.associateWithNative( this, cc.Layer ); - }, - init:function () { - var bRet = false; - if (this._super()) { - - // reset global values - MW.CONTAINER.ENEMIES = []; - MW.CONTAINER.ENEMY_BULLETS = []; - MW.CONTAINER.PLAYER_BULLETS = []; - MW.SCORE = 0; - MW.LIFE = 4; - this._state = STATE_PLAYING; - - Explosion.sharedExplosion(); - Enemy.sharedEnemy(); - winSize = cc.Director.getInstance().getWinSize(); - this._levelManager = new LevelManager(this); - this.initBackground(); - this.screenRect = cc.rect(0, 0, winSize.width, winSize.height + 10); - - // score - this.lbScore = cc.LabelBMFont.create("Score: 0", s_arial14_fnt); - this.lbScore.setAnchorPoint( cc.p(1,0) ); - this.lbScore.setAlignment( cc.TEXT_ALIGNMENT_RIGHT ); - this.addChild(this.lbScore, 1000); - this.lbScore.setPosition(cc.p(winSize.width - 5 , winSize.height - 30)); - - // ship life - var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); - var life = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); - life.setScale(0.6); - life.setPosition(cc.p(30, 460)); - this.addChild(life, 1, 5); - - // ship Life count - this._lbLife = cc.LabelTTF.create("0", "Arial", 20); - this._lbLife.setPosition(cc.p(60, 463)); - this._lbLife.setColor(cc.RED); - this.addChild(this._lbLife, 1000); - - // ship - this._ship = new Ship(); - this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); - - // accept touch now! - - var t = cc.config.deviceType; - if( t == 'browser' ) { - this.setTouchEnabled(true); - this.setKeyboardEnabled(true); - } else if( t == 'desktop' ) { - this.setMouseEnabled(true); - } else if( t == 'mobile' ) { - this.setTouchEnabled(true); - } - - // schedule - this.scheduleUpdate(); - this.schedule(this.scoreCounter, 1); - - if (MW.SOUND) { - cc.AudioEngine.getInstance().playBackgroundMusic(s_bgMusic, true); - } - - bRet = true; - } - return bRet; - }, - scoreCounter:function () { - if( this._state == STATE_PLAYING ) { - this._time++; - - var minute = 0 | (this._time / 60); - var second = this._time % 60; - minute = minute > 9 ? minute : "0" + minute; - second = second > 9 ? second : "0" + second; - var curTime = minute + ":" + second; - this._levelManager.loadLevelResource(this._time); - } - }, - - onTouchesMoved:function (touches, event) { - this.processEvent( touches[0] ); - }, - - onMouseDragged:function( event ) { - this.processEvent( event ); - }, - - processEvent:function( event ) { - if( this._state == STATE_PLAYING ) { - var delta = event.getDelta(); - var curPos = this._ship.getPosition(); - curPos= cc.pAdd( curPos, delta ); - curPos = cc.pClamp(curPos, cc.POINT_ZERO, cc.p(winSize.width, winSize.height) ); - this._ship.setPosition( curPos ); - } - }, - - onKeyDown:function (e) { - MW.KEYS[e] = true; - }, - - onKeyUp:function (e) { - MW.KEYS[e] = false; - }, - - update:function (dt) { - if( this._state == STATE_PLAYING ) { - this.checkIsCollide(); - this.removeInactiveUnit(dt); - this.checkIsReborn(); - this.updateUI(); - } - - if( cc.config.deviceType == 'browser' ) - cc.$("#cou").innerHTML = "Ship:" + 1 + ", Enemy: " + MW.CONTAINER.ENEMIES.length + ", Bullet:" + MW.CONTAINER.ENEMY_BULLETS.length + "," + MW.CONTAINER.PLAYER_BULLETS.length + " all:" + this.getChildren().length; - }, - checkIsCollide:function () { - var selChild, bulletChild; - //check collide - var i =0; - for (i = 0; i < MW.CONTAINER.ENEMIES.length; i++) { - selChild = MW.CONTAINER.ENEMIES[i]; - for (var j = 0; j < MW.CONTAINER.PLAYER_BULLETS.length; j++) { - bulletChild = MW.CONTAINER.PLAYER_BULLETS[j]; - if (this.collide(selChild, bulletChild)) { - bulletChild.hurt(); - selChild.hurt(); - } - if (!cc.rectIntersectsRect(this.screenRect, bulletChild.getBoundingBox() )) { - bulletChild.destroy(); - } - } - if (this.collide(selChild, this._ship)) { - if (this._ship.active) { - selChild.hurt(); - this._ship.hurt(); - } - } - if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { - selChild.destroy(); - } - } - - for (i = 0; i < MW.CONTAINER.ENEMY_BULLETS.length; i++) { - selChild = MW.CONTAINER.ENEMY_BULLETS[i]; - if (this.collide(selChild, this._ship)) { - if (this._ship.active) { - selChild.hurt(); - this._ship.hurt(); - } - } - if (!cc.rectIntersectsRect(this.screenRect, selChild.getBoundingBox() )) { - selChild.destroy(); - } - } - }, - removeInactiveUnit:function (dt) { - var selChild, layerChildren = this.getChildren(); - for (var i in layerChildren) { - selChild = layerChildren[i]; - if (selChild) { - if( typeof selChild.update == 'function' ) { - selChild.update(dt); - var tag = selChild.getTag(); - if ((tag == MW.UNIT_TAG.PLAYER) || (tag == MW.UNIT_TAG.PLAYER_BULLET) || - (tag == MW.UNIT_TAG.ENEMY) || (tag == MW.UNIT_TAG.ENMEY_BULLET)) { - if (selChild && !selChild.active) { - selChild.destroy(); - } - } - } - } - } - }, - checkIsReborn:function () { - if (MW.LIFE > 0 && !this._ship.active) { - // ship - this._ship = new Ship(); - this.addChild(this._ship, this._ship.zOrder, MW.UNIT_TAG.PLAYER); - } - else if (MW.LIFE <= 0 && !this._ship.active) { - this._state = STATE_GAMEOVER; - // XXX: needed for JS bindings. - this._ship = null; - this.runAction(cc.Sequence.create( - cc.DelayTime.create(0.2), - cc.CallFunc.create(this, this.onGameOver))); - } - }, - updateUI:function () { - if (this._tmpScore < MW.SCORE) { - this._tmpScore += 5; - } - this._lbLife.setString(MW.LIFE); - this.lbScore.setString("Score: " + this._tmpScore); - }, - collide:function (a, b) { - var aRect = a.collideRect(); - var bRect = b.collideRect(); - if (cc.rectIntersectsRect(aRect, bRect)) { - return true; - } - }, - initBackground:function () { - // bg - this._backSky = cc.Sprite.create(s_bg01); - this._backSky.setAnchorPoint(cc.p(0, 0)); - this._backSkyHeight = this._backSky.getContentSize().height; - this.addChild(this._backSky, -10); - - //tilemap - this._backTileMap = cc.TMXTiledMap.create(s_level01); - this.addChild(this._backTileMap, -9); - this._backTileMapHeight = this._backTileMap.getMapSize().height * this._backTileMap.getTileSize().height; - - this._backSkyHeight -= 48; - this._backTileMapHeight -= 200; - this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); - this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); - - this.schedule(this.movingBackground, 3); - }, - movingBackground:function () { - this._backSky.runAction(cc.MoveBy.create(3, cc.p(0, -48))); - this._backTileMap.runAction(cc.MoveBy.create(3, cc.p(0, -200))); - this._backSkyHeight -= 48; - this._backTileMapHeight -= 200; - - if (this._backSkyHeight <= winSize.height) { - if (!this._isBackSkyReload) { - this._backSkyRe = cc.Sprite.create(s_bg01); - this._backSkyRe.setAnchorPoint(cc.p(0, 0)); - this.addChild(this._backSkyRe, -10); - this._backSkyRe.setPosition(cc.p(0, winSize.height)); - this._isBackSkyReload = true; - } - this._backSkyRe.runAction(cc.MoveBy.create(3, cc.p(0, -48))); - } - if (this._backSkyHeight <= 0) { - this._backSkyHeight = this._backSky.getContentSize().height; - this.removeChild(this._backSky, true); - this._backSky = this._backSkyRe; - this._backSkyRe = null; - this._isBackSkyReload = false; - } - - if (this._backTileMapHeight <= winSize.height) { - if (!this._isBackTileReload) { - this._backTileMapRe = cc.TMXTiledMap.create(s_level01); - this.addChild(this._backTileMapRe, -9); - this._backTileMapRe.setPosition(cc.p(0, winSize.height)); - this._isBackTileReload = true; - } - this._backTileMapRe.runAction(cc.MoveBy.create(3, cc.p(0, -200))); - } - if (this._backTileMapHeight <= 0) { - this._backTileMapHeight = this._backTileMapRe.getMapSize().height * this._backTileMapRe.getTileSize().height; - this.removeChild(this._backTileMap, true); - this._backTileMap = this._backTileMapRe; - this._backTileMapRe = null; - this._isBackTileReload = false; - } - }, - onGameOver:function () { - var scene = cc.Scene.create(); - scene.addChild(GameOver.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - } -}); - -GameLayer.create = function () { - var sg = new GameLayer(); - if (sg && sg.init()) { - return sg; - } - return null; -}; - -GameLayer.scene = function () { - var scene = cc.Scene.create(); - var layer = GameLayer.create(); - scene.addChild(layer, 1); - return scene; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js b/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js deleted file mode 100644 index 7fcf87c645..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/GameOver.js +++ /dev/null @@ -1,83 +0,0 @@ -var GameOver = cc.Layer.extend({ - _ship:null, - _lbScore:0, - ctor:function() { - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Layer); - }, - init:function () { - var bRet = false; - if (this._super()) { - var sp = cc.Sprite.create(s_loading); - sp.setAnchorPoint( cc.p(0,0) ); - this.addChild(sp, 0, 1); - - var logo = cc.Sprite.create(s_gameOver); - logo.setAnchorPoint(cc.p(0,0)); - logo.setPosition(cc.p(0,300)); - this.addChild(logo,10,1); - - var playAgainNormal = cc.Sprite.create(s_menu, cc.rect(378, 0, 126, 33)); - var playAgainSelected = cc.Sprite.create(s_menu, cc.rect(378, 33, 126, 33)); - var playAgainDisabled = cc.Sprite.create(s_menu, cc.rect(378, 33 * 2, 126, 33)); - - var cocos2dhtml5 = cc.Sprite.create(s_cocos2dhtml5); - cocos2dhtml5.setPosition(cc.p(160,150)); - this.addChild(cocos2dhtml5,10); - var playAgain = cc.MenuItemSprite.create(playAgainNormal, playAgainSelected, playAgainDisabled, this, function(){ - flareEffect(this,this,this.onPlayAgain); - }); - - var menu = cc.Menu.create(playAgain); - this.addChild(menu, 1, 2); - menu.setPosition(cc.p(winSize.width / 2, 220)); - - var lbScore = cc.LabelTTF.create("Your Score:"+MW.SCORE,"Arial Bold",16); - lbScore.setPosition(cc.p(160,280)); - lbScore.setColor(cc.c3b(250,179,0)); - this.addChild(lbScore,10); - - var b1 = cc.LabelTTF.create("Download Cocos2d-html5","Arial",14); - var b2 = cc.LabelTTF.create("Download This Sample","Arial",14); - var menu1 = cc.MenuItemLabel.create(b1,this,function(){ - window.location.href = "http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-html5"; - }); - var menu2 = cc.MenuItemLabel.create(b2,this,function(){ - window.location.href = "https://github.com/ShengxiangChen/MoonWarriors"; - }); - var cocos2dMenu = cc.Menu.create(menu1,menu2); - cocos2dMenu.alignItemsVerticallyWithPadding(10); - cocos2dMenu.setPosition(cc.p(160,80)); - this.addChild(cocos2dMenu); - - - if(MW.SOUND){ - cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic); - } - - bRet = true; - } - return bRet; - }, - onPlayAgain:function (pSender) { - var scene = cc.Scene.create(); - scene.addChild(GameLayer.create()); - scene.addChild(GameControlMenu.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2,scene)); - } -}); - -GameOver.create = function () { - var sg = new GameOver(); - if (sg && sg.init()) { - return sg; - } - return null; -}; - -GameOver.scene = function () { - var scene = cc.Scene.create(); - var layer = GameOver.create(); - scene.addChild(layer); - return scene; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js b/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js deleted file mode 100644 index 6866d7412f..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/LevelManager.js +++ /dev/null @@ -1,99 +0,0 @@ -var LevelManager = cc.Class.extend({ - _currentLevel:null, - _gameLayer:null, - ctor:function(gameLayer){ - if(!gameLayer){ - throw "gameLayer must be non-nil"; - } - this._currentLevel = Level1; - this._gameLayer = gameLayer; - this.setLevel(this._currentLevel); - }, - - setLevel:function(level){ - for(var i = 0; i< level.enemies.length; i++){ - this._currentLevel.enemies[i].ShowTime = this._minuteToSecond(this._currentLevel.enemies[i].ShowTime); - } - }, - _minuteToSecond:function(minuteStr){ - if(!minuteStr) - return 0; - if(typeof(minuteStr) != "number"){ - var mins = minuteStr.split(':'); - if(mins.length == 1){ - return parseInt(mins[0],10); - }else { - return parseInt(mins[0],10 )* 60 + parseInt(mins[1],10); - } - } - return minuteStr; - }, - - loadLevelResource:function(deltaTime){ - //load enemy - for(var i = 0; i< this._currentLevel.enemies.length; i++){ - var selEnemy = this._currentLevel.enemies[i]; - if(selEnemy){ - if(selEnemy.ShowType == "Once"){ - if(selEnemy.ShowTime == deltaTime){ - for(var tIndex = 0; tIndex < selEnemy.Types.length;tIndex++ ){ - this.addEnemyToGameLayer(selEnemy.Types[tIndex]); - } - } - }else if(selEnemy.ShowType == "Repeate"){ - if(deltaTime % selEnemy.ShowTime === 0){ - for(var rIndex = 0; rIndex < selEnemy.Types.length;rIndex++ ){ - this.addEnemyToGameLayer(selEnemy.Types[rIndex]); - } - } - } - } - } - }, - - addEnemyToGameLayer:function(enemyType){ - var addEnemy = new Enemy(EnemyType[enemyType]); - - var enemypos = cc.p( 80 + (winSize.width - 160) * Math.random(), winSize.height); - var enemycs = addEnemy.getContentSize(); - addEnemy.setPosition( enemypos ); - - - var offset, tmpAction; - var a0=0; - var a1=0; - switch (addEnemy.moveType) { - case MW.ENEMY_MOVE_TYPE.ATTACK: - offset = this._gameLayer._ship.getPosition(); - tmpAction = cc.MoveTo.create(1, offset); - break; - case MW.ENEMY_MOVE_TYPE.VERTICAL: - offset = cc.p(0, -winSize.height - enemycs.height); - tmpAction = cc.MoveBy.create(4, offset); - break; - case MW.ENEMY_MOVE_TYPE.HORIZONTAL: - offset = cc.p(0, -100 - 200 * Math.random()); - a0 = cc.MoveBy.create(0.5, offset); - a1 = cc.MoveBy.create(1, cc.p(-50 - 100 * Math.random(), 0)); - var onComplete = cc.CallFunc.create(addEnemy, function (pSender) { - var a2 = cc.DelayTime.create(1); - var a3 = cc.MoveBy.create(1, cc.p(100 + 100 * Math.random(), 0)); - pSender.runAction(cc.RepeatForever.create( - cc.Sequence.create(a2, a3, a2.copy(), a3.reverse()) - )); - }); - tmpAction = cc.Sequence.create(a0, a1, onComplete); - break; - case MW.ENEMY_MOVE_TYPE.OVERLAP: - var newX = (enemypos.x <= winSize.width / 2) ? 320 : -320; - a0 = cc.MoveBy.create(4, cc.p(newX, -240)); - a1 = cc.MoveBy.create(4,cc.p(-newX,-320)); - tmpAction = cc.Sequence.create(a0,a1); - break; - } - - this._gameLayer.addChild(addEnemy, addEnemy.zOrder, MW.UNIT_TAG.ENEMY); - MW.CONTAINER.ENEMIES.push(addEnemy); - addEnemy.runAction(tmpAction); - } -}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js b/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js deleted file mode 100644 index c2f6becdad..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Resource.js +++ /dev/null @@ -1,89 +0,0 @@ -var dirImg = ""; -var dirMusic = ""; -var musicSuffix = ".mp3"; -if( cc.config.deviceType == 'browser' || cc.config.engine == 'cocos2d-x') { - dirImg = "MoonWarriors/res/"; - dirMusic = "MoonWarriors/res/Music/"; - musicSuffix = ""; -} - -//image -var s_bg01 = dirImg + "bg01.jpg"; -var s_loading = dirImg + "loading.png"; -var s_ship01 = dirImg + "ship01.png"; -var s_menu = dirImg + "menu.png"; -var s_logo = dirImg + "logo.png"; -var s_cocos2dhtml5 = dirImg + "cocos2d-html5.png"; -var s_gameOver = dirImg + "gameOver.png"; -var s_menuTitle = dirImg + "menuTitle.png"; -var s_Enemy = dirImg + "Enemy.png"; -var s_flare = dirImg + "flare.jpg"; -var s_bullet = dirImg + "bullet.png"; -var s_explosion = dirImg + "explosion.png"; -var s_explode1 = dirImg + "explode1.jpg"; -var s_explode2= dirImg + "explode2.jpg"; -var s_explode3 = dirImg + "explode3.jpg"; -var s_hit = dirImg + "hit.jpg"; -var s_arial14 = dirImg + "arial-14.png"; -var s_arial14_fnt = dirImg + "arial-14.fnt"; - -//music -var s_bgMusic = dirMusic + "bgMusic" + musicSuffix; -var s_mainMainMusic = dirMusic + "mainMainMusic" + musicSuffix; - -//effect -var s_buttonEffect = dirMusic + "buttonEffet" + musicSuffix; -var s_explodeEffect = dirMusic + "explodeEffect" + musicSuffix; -var s_fireEffect = dirMusic + "fireEffect" + musicSuffix; -var s_shipDestroyEffect = dirMusic + "shipDestroyEffect" + musicSuffix; - -//tmx -var s_level01 = dirImg + "level01.tmx"; - -//plist -var s_Enemy_plist = dirImg + "Enemy.plist"; -var s_explosion_plist = dirImg + "explosion.plist"; -var s_bullet_plist = dirImg + "bullet.plist"; - -var g_ressources = [ - //image - {type:"image", src:s_bg01}, - {type:"image", src:s_loading}, - {type:"image", src:s_ship01}, - {type:"image", src:s_menu}, - {type:"image", src:s_logo}, - {type:"image", src:s_cocos2dhtml5}, - {type:"image", src:s_gameOver}, - {type:"image", src:s_menuTitle}, - {type:"image", src:s_Enemy}, - {type:"image", src:s_flare}, - {type:"image", src:s_bullet}, - {type:"image", src:s_explosion}, - {type:"image", src:s_explode1}, - {type:"image", src:s_explode2}, - {type:"image", src:s_explode3}, - {type:"image", src:s_hit}, - {type:"image", src:s_arial14}, - - //tmx - {type:"tmx", src:s_level01}, - - //plist - {type:"plist", src:s_Enemy_plist}, - {type:"plist", src:s_explosion_plist}, - {type:"plist", src:s_bullet_plist}, - - //music - {type:"bgm", src:s_bgMusic}, - {type:"bgm", src:s_mainMainMusic}, - - //effect - {type:"effect", src:s_buttonEffect}, - {type:"effect", src:s_explodeEffect}, - {type:"effect", src:s_fireEffect}, - {type:"effect", src:s_shipDestroyEffect}, - - // FNT - {type:"fnt", src:s_arial14_fnt} - -]; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js b/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js deleted file mode 100644 index 4f8b545311..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/SettingsLayer.js +++ /dev/null @@ -1,85 +0,0 @@ -var SettingsLayer = cc.Layer.extend({ - ctor:function () { - cc.associateWithNative( this, cc.Layer ); - }, - init:function () { - var bRet = false; - if (this._super()) { - var sp = cc.Sprite.create(s_loading); - sp.setAnchorPoint(cc.p(0,0)); - this.addChild(sp, 0, 1); - - var cacheImage = cc.TextureCache.getInstance().addImage(s_menuTitle); - var title = cc.Sprite.createWithTexture(cacheImage, cc.rect(0, 0, 134, 34)); - title.setPosition(cc.p(winSize.width / 2, winSize.height - 120)); - this.addChild(title); - - - cc.MenuItemFont.setFontName("Arial"); - cc.MenuItemFont.setFontSize(18); - var title1 = cc.MenuItemFont.create("Sound"); - title1.setEnabled(false); - - cc.MenuItemFont.setFontName("Arial"); - cc.MenuItemFont.setFontSize(26); - var item1 = cc.MenuItemToggle.create( - cc.MenuItemFont.create("On"), - cc.MenuItemFont.create("Off") ); - item1.setCallback(this, this.soundControl ); - - cc.MenuItemFont.setFontName("Arial"); - cc.MenuItemFont.setFontSize(18); - var title2 = cc.MenuItemFont.create("Mode"); - title2.setEnabled(false); - - cc.MenuItemFont.setFontName("Arial"); - cc.MenuItemFont.setFontSize(26); - var item2 = cc.MenuItemToggle.create( - cc.MenuItemFont.create("Easy"), - cc.MenuItemFont.create("Normal"), - cc.MenuItemFont.create("Hard")); - item2.setCallback( this, this.modeControl ); - - - cc.MenuItemFont.setFontName("Arial"); - cc.MenuItemFont.setFontSize(26); - var label = cc.LabelTTF.create("Go back", "Arial", 20); - var back = cc.MenuItemLabel.create(label, this, this.backCallback); - back.setScale(0.8); - - var menu = cc.Menu.create(title1, title2, item1, item2, back); - menu.alignItemsInColumns(2, 2, 1); - this.addChild(menu); - - var cp_back = back.getPosition(); - cp_back.y -= 50.0; - back.setPosition(cp_back); - - - bRet = true; - } - - return bRet; - }, - backCallback:function (pSender) { - var scene = cc.Scene.create(); - scene.addChild(SysMenu.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - }, - soundControl:function(){ - MW.SOUND = MW.SOUND ? false : true; - if(!MW.SOUND){ - cc.AudioEngine.getInstance().stopBackgroundMusic(); - } - }, - modeControl:function(){ - } -}); - -SettingsLayer.create = function () { - var sg = new SettingsLayer(); - if (sg && sg.init()) { - return sg; - } - return null; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js b/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js deleted file mode 100644 index 84aa6342db..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/Ship.js +++ /dev/null @@ -1,128 +0,0 @@ -var Ship = cc.Sprite.extend({ - speed:220, - bulletSpeed:900, - HP:5, - bulletTypeValue:1, - bulletPowerValue:1, - throwBombing:false, - canBeAttack:true, - isThrowingBomb:false, - zOrder:3000, - maxBulletPowerValue:4, - appearPosition:cc.p(160, 60), - _hurtColorLife:0, - active:true, - ctor:function () { - - // needed for JS-Bindings compatibility - cc.associateWithNative( this, cc.Sprite ); - - //init life - var shipTexture = cc.TextureCache.getInstance().addImage(s_ship01); - this.initWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); - this.setTag(this.zOrder); - this.setPosition(this.appearPosition); - - // set frame - var frame0 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(0, 0, 60, 38)); - var frame1 = cc.SpriteFrame.createWithTexture(shipTexture, cc.rect(60, 0, 60, 38)); - - var animFrames = []; - animFrames.push(frame0); - animFrames.push(frame1); - - // ship animate - var animation = cc.Animation.create(animFrames, 0.1); - var animate = cc.Animate.create(animation); - this.runAction(cc.RepeatForever.create(animate)); - this.schedule(this.shoot, 1 / 6); - - //revive effect - this.canBeAttack = false; - var ghostSprite = cc.Sprite.createWithTexture(shipTexture, cc.rect(0, 45, 60, 38)); - ghostSprite.setBlendFunc(gl.SRC_ALPHA, gl.ONE); - ghostSprite.setScale(8); - ghostSprite.setPosition(cc.p(this.getContentSize().width / 2, 12)); - this.addChild(ghostSprite, 3000, 99999); - ghostSprite.runAction(cc.ScaleTo.create(0.5, 1, 1)); - var blinks = cc.Blink.create(3, 9); - var makeBeAttack = cc.CallFunc.create(this, function (t) { - t.canBeAttack = true; - t.setVisible(true); - t.removeChild(ghostSprite,true); - }); - this.runAction(cc.Sequence.create(cc.DelayTime.create(0.5), blinks, makeBeAttack)); - }, - update:function (dt) { - - // Keys are only enabled on the browser - if( cc.config.deviceType == 'browser' ) { - var pos = this.getPosition(); - if ((MW.KEYS[cc.KEY.w] || MW.KEYS[cc.KEY.up]) && pos.y <= winSize.height) { - pos.y += dt * this.speed; - } - if ((MW.KEYS[cc.KEY.s] || MW.KEYS[cc.KEY.down]) && pos.y >= 0) { - pos.y -= dt * this.speed; - } - if ((MW.KEYS[cc.KEY.a] || MW.KEYS[cc.KEY.left]) && pos.x >= 0) { - pos.x -= dt * this.speed; - } - if ((MW.KEYS[cc.KEY.d] || MW.KEYS[cc.KEY.right]) && pos.x <= winSize.width) { - pos.x += dt * this.speed; - } - this.setPosition( pos ); - } - - if (this.HP <= 0) { - this.active = false; - } - this._timeTick += dt; - if (this._timeTick > 0.1) { - this._timeTick = 0; - if (this._hurtColorLife > 0) { - this._hurtColorLife--; - } - if (this._hurtColorLife == 1) { - this.setColor(cc.WHITE); - } - } - }, - shoot:function (dt) { - //this.shootEffect(); - var offset = 13; - var p = this.getPosition(); - var cs = this.getContentSize(); - var a = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); - MW.CONTAINER.PLAYER_BULLETS.push(a); - this.getParent().addChild(a, a.zOrder, MW.UNIT_TAG.PLAYER_BULLET); - a.setPosition(cc.p(p.x + offset, p.y + 3 + cs.height * 0.3)); - - var b = new Bullet(this.bulletSpeed, "W1.png", MW.ENEMY_MOVE_TYPE.NORMAL); - MW.CONTAINER.PLAYER_BULLETS.push(b); - this.getParent().addChild(b, b.zOrder, MW.UNIT_TAG.PLAYER_BULLET); - b.setPosition(cc.p(p.x - offset, p.y + 3 + cs.height * 0.3)); - }, - destroy:function () { - MW.LIFE--; - var p = this.getPosition(); - var myParent = this.getParent(); - myParent.addChild( new Explosion(p) ); - myParent.removeChild(this,true); - if (MW.SOUND) { - cc.AudioEngine.getInstance().playEffect(s_shipDestroyEffect); - } - }, - hurt:function () { - if (this.canBeAttack) { - this._hurtColorLife = 2; - this.HP--; - this.setColor(cc.RED); - } - }, - collideRect:function(){ - var p = this.getPosition(); - var a = this.getContentSize(); - var r = new cc.rect(p.x - a.width/2, p.y - a.height/2, a.width, a.height/2); - return r; - } -}); diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js b/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js deleted file mode 100644 index a265636363..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/SysMenu.js +++ /dev/null @@ -1,110 +0,0 @@ -cc.dumpConfig(); - -var SysMenu = cc.Layer.extend({ - _ship:null, - - ctor:function () { - cc.associateWithNative( this, cc.Layer ); - }, - init:function () { - var bRet = false; - if (this._super()) { - winSize = cc.Director.getInstance().getWinSize(); - var sp = cc.Sprite.create(s_loading); - sp.setAnchorPoint(cc.p(0,0)); - this.addChild(sp, 0, 1); - - var logo = cc.Sprite.create(s_logo); - logo.setAnchorPoint(cc.p(0, 0)); - logo.setPosition(cc.p(0, 250)); - this.addChild(logo, 10, 1); - - var newGameNormal = cc.Sprite.create(s_menu, cc.rect(0, 0, 126, 33)); - var newGameSelected = cc.Sprite.create(s_menu, cc.rect(0, 33, 126, 33)); - var newGameDisabled = cc.Sprite.create(s_menu, cc.rect(0, 33 * 2, 126, 33)); - - var gameSettingsNormal = cc.Sprite.create(s_menu, cc.rect(126, 0, 126, 33)); - var gameSettingsSelected = cc.Sprite.create(s_menu, cc.rect(126, 33, 126, 33)); - var gameSettingsDisabled = cc.Sprite.create(s_menu, cc.rect(126, 33 * 2, 126, 33)); - - var aboutNormal = cc.Sprite.create(s_menu, cc.rect(252, 0, 126, 33)); - var aboutSelected = cc.Sprite.create(s_menu, cc.rect(252, 33, 126, 33)); - var aboutDisabled = cc.Sprite.create(s_menu, cc.rect(252, 33 * 2, 126, 33)); - - var newGame = cc.MenuItemSprite.create(newGameNormal, newGameSelected, newGameDisabled, this, function () { - this.onButtonEffect(); - flareEffect(this, this, this.onNewGame); - }); - var gameSettings = cc.MenuItemSprite.create(gameSettingsNormal, gameSettingsSelected, gameSettingsDisabled, this, this.onSettings); - var about = cc.MenuItemSprite.create(aboutNormal, aboutSelected, aboutDisabled, this, this.onAbout); - - var menu = cc.Menu.create(newGame, gameSettings, about); - menu.alignItemsVerticallyWithPadding(10); - this.addChild(menu, 1, 2); - menu.setPosition(cc.p(winSize.width / 2, winSize.height / 2 - 80)); - this.schedule(this.update, 0.1); - - var tmp = cc.TextureCache.getInstance().addImage(s_ship01); - this._ship = cc.Sprite.createWithTexture(tmp,cc.rect(0, 45, 60, 38)); - this.addChild(this._ship, 0, 4); - var pos = cc.p(Math.random() * winSize.width, 0); - this._ship.setPosition( pos ); - this._ship.runAction(cc.MoveBy.create(2, cc.p(Math.random() * winSize.width, pos.y + winSize.height + 100))); - - if (MW.SOUND) { - cc.AudioEngine.getInstance().setBackgroundMusicVolume(0.7); - cc.AudioEngine.getInstance().playBackgroundMusic(s_mainMainMusic, true); - } - - bRet = true; - } - return bRet; - }, - onNewGame:function (pSender) { - var scene = cc.Scene.create(); - scene.addChild(GameLayer.create()); - scene.addChild(GameControlMenu.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - }, - onSettings:function (pSender) { - this.onButtonEffect(); - var scene = cc.Scene.create(); - scene.addChild(SettingsLayer.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - }, - onAbout:function (pSender) { - this.onButtonEffect(); - var scene = cc.Scene.create(); - scene.addChild(AboutLayer.create()); - cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene)); - }, - update:function () { - if (this._ship.getPosition().y > 480) { - var pos = cc.p(Math.random() * winSize.width, 10); - this._ship.setPosition( pos ); - this._ship.runAction( cc.MoveBy.create( - parseInt(5 * Math.random(), 10), - cc.p(Math.random() * winSize.width, pos.y + 480))); - } - }, - onButtonEffect:function(){ - if (MW.SOUND) { - var s = cc.AudioEngine.getInstance().playEffect(s_buttonEffect); - } - } -}); - -SysMenu.create = function () { - var sg = new SysMenu(); - if (sg && sg.init()) { - return sg; - } - return null; -}; - -SysMenu.scene = function () { - var scene = cc.Scene.create(); - var layer = SysMenu.create(); - scene.addChild(layer); - return scene; -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js deleted file mode 100644 index c947d58903..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/config/EnemyType.js +++ /dev/null @@ -1,56 +0,0 @@ -var EnemyType = [ - { - type:0, - textureName:"E0.png", - bulletType:"W2.png", - HP:1, - moveType:MW.ENEMY_MOVE_TYPE.ATTACK, - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - scoreValue:15 - }, - { - type:1, - textureName:"E1.png", - bulletType:"W2.png", - HP:2, - moveType:MW.ENEMY_MOVE_TYPE.ATTACK, - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - scoreValue:40 - }, - { - type:2, - textureName:"E2.png", - bulletType:"W2.png", - HP:4, - moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, - attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, - scoreValue:60 - }, - { - type:3, - textureName:"E3.png", - bulletType:"W2.png", - HP:6, - moveType:MW.ENEMY_MOVE_TYPE.OVERLAP, - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - scoreValue:80 - }, - { - type:4, - textureName:"E4.png", - bulletType:"W2.png", - HP:10, - moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, - attackMode:MW.ENEMY_ATTACK_MODE.TSUIHIKIDAN, - scoreValue:150 - }, - { - type:5, - textureName:"E5.png", - bulletType:"W2.png", - HP:15, - moveType:MW.ENEMY_MOVE_TYPE.HORIZONTAL, - attackMode:MW.ENEMY_MOVE_TYPE.NORMAL, - scoreValue:200 - } -]; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js deleted file mode 100644 index 554d322aa1..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/config/GameConfig.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Cocos2d-html5 show case : Moon Warriors - * - * @Licensed: - * This showcase is licensed under GPL. - * - * @Authors: - * Programmer: Shengxiang Chen (陈升想), Dingping Lv (吕定平), Ricardo Quesada - * Effects animation: Hao Wu (吴昊) - * Quality Assurance: Sean Lin (林顺) - * - * @Links: - * http://www.cocos2d-x.org - * http://bbs.html5china.com - * - */ - -//game state -MW.GAME_STATE = { - HOME:0, - PLAY:1, - OVER:2 -}; - -//keys -MW.KEYS = []; - -//level -MW.LEVEL = { - STAGE1:1, - STAGE2:2, - STAGE3:3 -}; - -//life -MW.LIFE = 4; - -//score -MW.SCORE = 0; - -//sound -MW.SOUND = true; - -//enemy move type -MW.ENEMY_MOVE_TYPE = { - ATTACK:0, - VERTICAL:1, - HORIZONTAL:2, - OVERLAP:3 -}; - -//delta x -MW.DELTA_X = -100; - -//offset x -MW.OFFSET_X = -24; - -//rot -MW.ROT = -5.625; - -//bullet type -MW.BULLET_TYPE = { - PLAYER:1, - ENEMY:2 -}; - -//weapon type -MW.WEAPON_TYPE = { - ONE:1 -}; - -//unit tag -MW.UNIT_TAG = { - ENMEY_BULLET:900, - PLAYER_BULLET:901, - ENEMY:1000, - PLAYER:1000 -}; - -//attack mode -MW.ENEMY_ATTACK_MODE = { - NORMAL:1, - TSUIHIKIDAN:2 -}; - -//life up sorce -MW.LIFEUP_SORCE = [50000, 100000, 150000, 200000, 250000, 300000]; - -//container -MW.CONTAINER = { - ENEMIES:[], - ENEMY_BULLETS:[], - PLAYER_BULLETS:[] -}; diff --git a/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js b/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js deleted file mode 100644 index 321a7a270f..0000000000 --- a/samples/TestJavascript/Resources/MoonWarriors/src/config/Level.js +++ /dev/null @@ -1,49 +0,0 @@ -var Level1 = { - enemies:[ - { - ShowType:"Repeate", - ShowTime:"00:02", - Types:[0,1,2] - }, - { - ShowType:"Repeate", - ShowTime:"00:05", - Types:[3,4,5] - } - /*{ - ShowType:"Repeate", - ShowTime:"00:08", - Types:[0,4,3,5] - }, - { - ShowType:"Once", - ShowTime:"00:6", - Types:[0,2,4,3] - }, - { - ShowType:"Once", - ShowTime:"00:16", - Types:[0,2,5,4,3] - }, - { - ShowType:"Once", - ShowTime:"00:25", - Types:[0,3,5,4,3] - }, - { - ShowType:"Once", - ShowTime:"00:35", - Types:[4,5,3,1,3] - }, - { - ShowType:"Once", - ShowTime:"00:50", - Types:[0,3,2,1,0,3] - }, - { - ShowType:"Once", - ShowTime:"01:15", - Types:[4,5,2,1,0] - }*/ - ] -}; From 918045e6ac077b505d526564a41b7c377a3d7391 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 10 Oct 2012 22:18:27 +0800 Subject: [PATCH 17/19] issue #1469: Deleted two unused files. --- .../Resources/js/jsb_constants.js | 475 ------------------ .../Resources/js/jsb_constants_gl.js | 23 - 2 files changed, 498 deletions(-) delete mode 100644 samples/TestJavascript/Resources/js/jsb_constants.js delete mode 100644 samples/TestJavascript/Resources/js/jsb_constants_gl.js diff --git a/samples/TestJavascript/Resources/js/jsb_constants.js b/samples/TestJavascript/Resources/js/jsb_constants.js deleted file mode 100644 index ac634f2712..0000000000 --- a/samples/TestJavascript/Resources/js/jsb_constants.js +++ /dev/null @@ -1,475 +0,0 @@ -require('js/jsb_constants_gl.js'); -// cocos2d Helper - -cc.c3 = cc.c3 || function (r, g, b) { - return {r: r, g: g, b: b}; -}; - -cc.c3b = cc.c3; - -cc.c4 = cc.c4 || function (r, g, b, o) { - return {r: r, g: g, b: b, a: o}; -}; - -cc.c4b = cc.c4; - -cc.c4f = cc.c4f || function (r, g, b, o) { - return {r: r, g: g, b: b, a: o}; -}; - -cc.p = cc.p || function( x, y ) -{ - return {x:x, y:y}; -}; - -cc.g = cc.g || cc.p; -cc.log = cc.log || log; - -// -// cocos2d constants -// -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.RED = cc.c3(255,0,0); -cc.GREEN = cc.c3(0,255,0); -cc.BLUE = cc.c3(0,0,255); -cc.BLACK = cc.c3(0,0,0); -cc.WHITE = cc.c3(255,255,255); - -cc.POINT_ZERO = {x:0, y:0}; - -cc._reuse_p0 = {x:0, y:0}; -cc._reuse_p1 = {x:0, y:0}; -cc._reuse_p_index = 0; -cc._reuse_color3b = cc.c3(255, 255, 255 ); -cc._reuse_color4b = cc.c4(255, 255, 255, 255 ); -cc._reuse_grid = cc.g(0,0); - -// dump config info, but only in debug mode -cc.dumpConfig = function() -{ - if( cc.config.debug ) { - for(var i in cc.config) - cc.log( i + " = " + cc.config[i] ); - } -}; - -// -// Point -// -cc._p = function( x, y ) -{ - if( cc._reuse_p_index === 0 ) { - cc._reuse_p0.x = x; - cc._reuse_p0.y = y; - cc._reuse_p_index = 1; - return cc._reuse_p0; - } else { - cc._reuse_p1.x = x; - cc._reuse_p1.y = y; - cc._reuse_p_index = 0; - return cc._reuse_p1; - } -}; - -cc._to_p = function( point ) -{ - return point; -}; - -cc._from_p = function( size ) -{ - return size; -}; - -// -// Grid -// -cc._g = function( x, y ) -{ - cc._reuse_grid.x = x; - cc._reuse_grid.y = y; - return cc._reuse_grid; -} - -// -// Color -// -// -// 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; -}; -// compatibility -cc.c3 = cc.c3b; -cc._c3 = cc._c3b; - -// -// 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; - - -// -// Size -// -cc.size = function(w,h) -{ - return {width:w, height:h}; -} - -cc._to_size = function( size ) -{ - return size; -} - -cc._from_size = function( size ) -{ - return size; -} - -// -// Rect -// -cc.rect = function(x,y,w,h) -{ - return {x:x, y:y, width:w, height:h}; -} - -cc._to_rect = function( rect ) -{ - return rect; -} - -cc._from_rect = function( rect ) -{ - return rect; -} - -// 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; -} - -// point functions -cc.pAdd = cc.pAdd || function (p1, p2) { - return {x: p1.x + p2.x, y: p1.y + p2.y}; -}; - -cc.pSub = cc.pSub || function (p1, p2) { - return {x: p1.x - p2.x, y: p1.y - p2.y}; -} - -cc.pMult = cc.pMult || function (p1, s) { - return {x: p1.x * s, y: p1.y * s}; -}; - -/** - * Calculates dot product of two points. - * @param {cc.Point} v1 - * @param {cc.Point} v2 - * @return {Number} - */ -cc.pDot = function (v1, v2) { - return v1.x * v2.x + v1.y * v2.y; -}; - -/** - * Calculates the square length of a cc.Point (not calling sqrt() ) - * @param {cc.Point} v - *@return {cc.pDot} - */ -cc.pLengthSQ = function (v) { - return cc.pDot(v, v); -}; - -/** - * Calculates distance between point an origin - * @param {cc.Point} v - * @return {Number} - */ -cc.pLength = function (v) { - return Math.sqrt(cc.pLengthSQ(v)); -}; - -/** - * Calculates the distance between two points - * @param {cc.Point} v1 - * @param {cc.Point} v2 - * @return {cc.pLength} - */ -cc.pDistance = function (v1, v2) { - return cc.pLength(cc.pSub(v1, v2)); -}; - -/** - * Clamp a value between from and to. - * @param {Number} value - * @param {Number} min_inclusive - * @param {Number} max_inclusive - * @return {Number} - */ -cc.clampf = function (value, min_inclusive, max_inclusive) { - if (min_inclusive > max_inclusive) { - var temp = min_inclusive; - min_inclusive = max_inclusive; - max_inclusive = temp; - } - return value < min_inclusive ? min_inclusive : value < max_inclusive ? value : max_inclusive; -}; - -/** - * Clamp a point between from and to. - * @param {Number} p - * @param {Number} min_inclusive - * @param {Number} max_inclusive - * @return {cc.Point} - */ -cc.pClamp = function (p, min_inclusive, max_inclusive) { - return cc.p(cc.clampf(p.x, min_inclusive.x, max_inclusive.x), cc.clampf(p.y, min_inclusive.y, max_inclusive.y)); -}; - -/** - * returns a random float between 0 and 1 - * @return {Number} - * @function - */ -cc.RANDOM_0_1 = function () { - return Math.random(); -}; - -/** - * Associates a base class with a native superclass - * @function - * @param {object} jsobj subclass - * @param {object} klass superclass - */ -cc.associateWithNative = function( jsobj, superclass ) { - var native = new superclass(); - __associateObjWithNative( jsobj, native ); -}; - -// -// Array: for cocos2d-hmtl5 compatibility -// -cc.ArrayRemoveObject = function (arr, delObj) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == delObj) { - arr.splice(i, 1); - } - } -}; - -// -// Google "subclasses" -// borrowed from closure library -// -var goog = goog || {}; // Check to see if already defined in current scope -goog.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 ]; -// } -}; -goog.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)); - - // XXX: SpiderMonkey bindings extensions -// __associateObjWithNative( me, ret ); - 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( - 'goog.base called from a method of one name ' + - 'to a method of a different name'); - } -}; - - -// -// Simple subclass -// - -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.Layer.extend = cc.Class.extend; -cc.Scene.extend = cc.Class.extend; -cc.LayerGradient.extend = cc.Class.extend; -cc.Sprite.extend = cc.Class.extend; -cc.MenuItemFont.extend = cc.Class.extend; - -// -// Chipmunk helpers -// -var cp = cp || {}; - -cp.v = cc.p; -cp._v = cc._p; -cp.vzero = cp.v(0,0); - -// -// OpenGL Helpers -// -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/TestJavascript/Resources/js/jsb_constants_gl.js b/samples/TestJavascript/Resources/js/jsb_constants_gl.js deleted file mode 100644 index 8b9d2f701d..0000000000 --- a/samples/TestJavascript/Resources/js/jsb_constants_gl.js +++ /dev/null @@ -1,23 +0,0 @@ -// -// 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; From 57e8c4b30495d54a7a433827eb1e008c35b7844b Mon Sep 17 00:00:00 2001 From: folecr Date: Wed, 10 Oct 2012 08:08:52 -0700 Subject: [PATCH 18/19] Updated script behaviour * Auto generated bindings are always pushed to remote repo. * If a remote repository is not given, exit with failure. * Updating the submodule reference is not done unless * ... remote cocos2dx repo is set. --- .../mac/android/generate-js-cxx-bindings.sh | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh index a3c6f52d39..9023c335e7 100755 --- a/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh +++ b/tools/jenkins_scripts/mac/android/generate-js-cxx-bindings.sh @@ -24,8 +24,24 @@ # Exit on error set -e +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +COCOS2DX_ROOT="$DIR"/../../../.. + +# 1. Generate JS bindings +COCOS2DX_ROOT="$COCOS2DX_ROOT" /bin/bash ../../../tojs/genbindings.sh + +echo +echo Bindings generated successfully +echo + if [ -z "${REMOTE_AUTOGEN_BINDINGS_REPOSITORY+aaa}" ]; then + echo echo Environment variable must be set REMOTE_AUTOGEN_BINDINGS_REPOSITORY + echo This script expects to automatically push changes + echo to this repo + echo + echo Exiting with failure. + echo # example # REMOTE_AUTOGEN_BINDINGS_REPOSITORY="git@github.com:folecr/cocos2dx-autogen-bindings.git" # REMOTE_AUTOGEN_BINDINGS_REPOSITORY="$HOME/test/cocos2dx-autogen-bindings" @@ -42,10 +58,6 @@ ELAPSEDSECS=`date +%s` echo Using "$ELAPSEDSECS" in the branch names for pseudo-uniqueness GENERATED_BRANCH=autogeneratedbindings_"$ELAPSEDSECS" -COCOS_BRANCH=updategeneratedsubmodule_"$ELAPSEDSECS" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -COCOS2DX_ROOT="$DIR"/../../../.. GENERATED_GITDIR="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated/.git GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated @@ -55,9 +67,6 @@ gitcmd_GEN="git --git-dir=$GENERATED_GITDIR --work-tree=$GENERATED_WORKTREE" # testing... ${gitcmd_GEN} status -# 1. Generate JS bindings -COCOS2DX_ROOT="$COCOS2DX_ROOT" /bin/bash ../../../tojs/genbindings.sh - # 2. In JSBindings repo, Check out a branch named "autogeneratedbindings" and commit the auto generated bindings to it ${gitcmd_GEN} add README cocos2dx.cpp cocos2dx.hpp cocos2dxapi.js ${gitcmd_GEN} checkout origin/master -b "$GENERATED_BRANCH" @@ -67,13 +76,21 @@ ${gitcmd_GEN} commit -m "$COMMITTAG : autogenerated bindings" ${gitcmd_GEN} push "$REMOTE_AUTOGEN_BINDINGS_REPOSITORY" "$GENERATED_BRANCH":master if [ -z "${REMOTE_COCOS2DX_REPOSITORY+aaa}" ]; then - echo Environment variable must be set REMOTE_COCOS2DX_REPOSITORY + echo + echo Environment variable is not set REMOTE_COCOS2DX_REPOSITORY + echo This script will NOT automatically push changes + echo unless this variable is set. + echo + echo Exiting with success. + echo # example # REMOTE_COCOS2DX_REPOSITORY="git@github.com:cocos2d/cocos2d-x.git" # REMOTE_COCOS2DX_REPOSITORY="$HOME/test/cocos2d-x" - exit 1 + exit 0 fi +COCOS_BRANCH=updategeneratedsubmodule_"$ELAPSEDSECS" + pushd "${DIR}" # 4. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings From 4af5abbc56813294c16cd648b34b108b7189d7ab Mon Sep 17 00:00:00 2001 From: folecr Date: Wed, 10 Oct 2012 20:07:46 -0700 Subject: [PATCH 19/19] Update submodule reference to point to latest auto-generated changes --- scripting/javascript/bindings/generated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/javascript/bindings/generated b/scripting/javascript/bindings/generated index 53bcda70b1..7bee281e6c 160000 --- a/scripting/javascript/bindings/generated +++ b/scripting/javascript/bindings/generated @@ -1 +1 @@ -Subproject commit 53bcda70b188533548b70cb957bb2419d96f4453 +Subproject commit 7bee281e6c33d25ed2874261da6658b66a43e073