Merge pull request #1272 from dumganhar/iss1454_javascript

issue #1454: Removed COCOS2D_JAVASCRIPT macro.
This commit is contained in:
James Chen 2012-08-31 07:35:02 -07:00
commit ef272e8ac6
67 changed files with 4143 additions and 545 deletions

View File

@ -28,21 +28,20 @@ THE SOFTWARE.
#include <stddef.h>
#include "Export.h"
#ifdef COCOS2D_JAVASCRIPT
#include <typeinfo>
#include <ctype.h>
#include <string.h>
#endif
namespace CocosDenshion {
#ifdef COCOS2D_JAVASCRIPT
class TypeInfo
{
public:
class TypeInfo
{
public:
virtual long getClassTypeInfo() = 0;
};
static unsigned int getHashCodeByString(const char *key)
{
};
static unsigned int getHashCodeByString(const char *key)
{
unsigned int len = strlen(key);
const char *end=key+len;
unsigned int hash;
@ -53,27 +52,22 @@ namespace CocosDenshion {
hash ^= (unsigned int) (unsigned char) toupper(*key);
}
return (hash);
}
#endif
}
/**
@class SimpleAudioEngine
@brief offer a VERY simple interface to play background music & sound effect
*/
#ifdef COCOS2D_JAVASCRIPT
class EXPORT_DLL SimpleAudioEngine : public TypeInfo
#else
class EXPORT_DLL SimpleAudioEngine
#endif
{
public:
SimpleAudioEngine();
~SimpleAudioEngine();
#ifdef COCOS2D_JAVASCRIPT
virtual long getClassTypeInfo() {
return getHashCodeByString(typeid(CocosDenshion::SimpleAudioEngine).name());
}
#endif
/**
@brief Get the shared Engine object,it will new one when first time be called

View File

@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOSDENSHIONWIN32_EXPORTS;COCOS2D_JAVASCRIPT;_EXPORT_DLL_"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOSDENSHIONWIN32_EXPORTS;_EXPORT_DLL_"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -18,6 +18,9 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "samples\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
ProjectSection(ProjectDependencies) = postProject
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
EndProject
@ -32,6 +35,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\
EndProjectSection
EndProject
Global
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
@ -85,7 +91,4 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal

View File

@ -161,12 +161,11 @@ void CCTimer::update(float dt)
{
(m_pTarget->*m_pfnSelector)(m_fElapsed);
}
#ifndef COCOS2D_JAVASCRIPT
if (m_nScriptHandler)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed);
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed, NULL);
}
#endif
m_fElapsed = 0;
}
}
@ -181,12 +180,12 @@ void CCTimer::update(float dt)
{
(m_pTarget->*m_pfnSelector)(m_fElapsed);
}
#ifndef COCOS2D_JAVASCRIPT
if (m_nScriptHandler)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed);
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed, NULL);
}
#endif
m_fElapsed = m_fElapsed - m_fDelay;
m_nTimesExecuted+=1;
m_bUseDelay = false;
@ -200,12 +199,12 @@ void CCTimer::update(float dt)
{
(m_pTarget->*m_pfnSelector)(m_fElapsed);
}
#ifndef COCOS2D_JAVASCRIPT
if (m_nScriptHandler)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed);
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(m_nScriptHandler, m_fElapsed, NULL);
}
#endif
m_fElapsed = 0;
m_nTimesExecuted += 1;
@ -781,9 +780,12 @@ void CCScheduler::update(float dt)
{
if ((! pEntry->paused) && (! pEntry->markedForDeletion))
{
#ifdef COCOS2D_JAVASCRIPT
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
if (pEngine != NULL && kScriptTypeJavascript == pEngine->getScriptType())
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(1, dt, (CCNode *)pEntry->target);
#endif
}
pEntry->target->update(dt);
}
}

View File

@ -94,6 +94,7 @@ protected:
float m_fDelay;
int m_nScriptHandler;
};
//

View File

@ -355,21 +355,18 @@ protected:
O means Object.
@since v0.99.5
*/
#ifdef COCOS2D_JAVASCRIPT
class CC_DLL CCCallFuncO : public CCCallFunc, public TypeInfo
#else
class CC_DLL CCCallFuncO : public CCCallFunc
#endif
{
public:
CCCallFuncO();
virtual ~CCCallFuncO();
#ifdef COCOS2D_JAVASCRIPT
virtual long getClassTypeInfo() {
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name());
return id;
}
#endif
/** creates the action with the callback
@deprecated: This interface will be deprecated sooner or later.
typedef void (CCObject::*SEL_CallFuncO)(CCObject*);

View File

@ -91,6 +91,9 @@ CCNode::CCNode(void)
m_pActionManager->retain();
m_pScheduler = director->getScheduler();
m_pScheduler->retain();
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
m_eScriptType = pEngine != NULL ? pEngine->getScriptType() : kScriptTypeNone;
}
CCNode::~CCNode(void)
@ -795,30 +798,31 @@ void CCNode::onEnter()
m_bIsRunning = true;
#ifdef COCOS2D_JAVASCRIPT
if ( (m_eScriptType == kScriptTypeLua && m_nScriptHandler != 0)
|| m_eScriptType == kScriptTypeJavascript )
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnEnter, this);
#else
if(m_nScriptHandler) {
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnEnter);
}
#endif
}
void CCNode::onEnterTransitionDidFinish()
{
arrayMakeObjectsPerformSelector(m_pChildren, onEnterTransitionDidFinish, CCNode*);
#ifdef COCOS2D_JAVASCRIPT
if (m_eScriptType == kScriptTypeJavascript)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnEnterTransitionDidFinish, this);
#endif
}
}
void CCNode::onExitTransitionDidStart()
{
arrayMakeObjectsPerformSelector(m_pChildren, onExitTransitionDidStart, CCNode*);
#ifdef COCOS2D_JAVASCRIPT
if (m_eScriptType == kScriptTypeJavascript)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnExitTransitionDidStart, this);
#endif
}
}
void CCNode::onExit()
@ -827,15 +831,11 @@ void CCNode::onExit()
m_bIsRunning = false;
#ifdef COCOS2D_JAVASCRIPT
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnExit, this);
#else
if (m_nScriptHandler)
if ( (m_eScriptType == kScriptTypeLua && m_nScriptHandler != 0)
|| m_eScriptType == kScriptTypeJavascript )
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnExit);
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnExit, this);
}
#endif
arrayMakeObjectsPerformSelector(m_pChildren, onExit, CCNode*);
}

View File

@ -35,6 +35,7 @@
#include "shaders/ccGLStateCache.h"
#include "shaders/CCGLProgram.h"
#include "kazmath/kazmath.h"
#include "script_support/CCScriptSupport.h"
NS_CC_BEGIN
@ -288,7 +289,7 @@ protected:
bool m_bIsInverseDirty;
bool m_bReorderChildDirty;
int m_nScriptHandler;
ccScriptType m_eScriptType;
private:
//! lazy allocs
void childrenAlloc(void);

View File

@ -59,18 +59,18 @@ CCObject::~CCObject(void)
}
// if the object is referenced by Lua engine, remove it
// if (m_nLuaID)
// {
// CCScriptEngineManager::sharedManager()->getScriptEngine()->removeCCObjectByID(m_nLuaID);
// }
//
#ifdef COCOS2D_JAVASCRIPT
CCScriptEngineProtocol *engine = CCScriptEngineManager::sharedManager()->getScriptEngine();
if(engine != NULL) {
engine->removeJSObjectByCCObject(this); //cjh
if (m_nLuaID)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->removeCCObjectByID(m_nLuaID);
}
else
{
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
if (pEngine != NULL && pEngine->getScriptType() == kScriptTypeJavascript)
{
pEngine->removeJSObjectByCCObject(this);
}
}
#endif
}
CCObject* CCObject::copy()

View File

@ -98,15 +98,8 @@ CCLayer *CCLayer::create()
void CCLayer::registerWithTouchDispatcher()
{
//#ifdef COCOS2D_JAVASCRIPT
// this->registerScriptTouchHandler(1, true, 1, true);
//#endif
CCDirector* pDirector = CCDirector::sharedDirector();
#ifdef COCOS2D_JAVASCRIPT
pDirector->getTouchDispatcher()->addStandardDelegate(this, 0);
#else
if (m_pScriptHandlerEntry)
{
if (m_pScriptHandlerEntry->isMultiTouches())
@ -124,8 +117,7 @@ void CCLayer::registerWithTouchDispatcher()
return;
}
#endif
pDirector->getTouchDispatcher()->addStandardDelegate(this, 0);
}
void CCLayer::registerScriptTouchHandler(int nHandler, bool bIsMultiTouches, int nPriority, bool bSwallowsTouches)
@ -151,11 +143,17 @@ int CCLayer::excuteScriptTouchHandler(int nEventType, CCTouch *pTouch)
int CCLayer::excuteScriptTouchHandler(int nEventType, CCSet *pTouches)
{
#ifdef COCOS2D_JAVASCRIPT
return CCScriptEngineManager::sharedManager()->getScriptEngine()->executeTouchesEvent(1, nEventType, pTouches, (CCNode *)this);
#else
return CCScriptEngineManager::sharedManager()->getScriptEngine()->executeTouchesEvent(m_pScriptHandlerEntry->getHandler(), nEventType, pTouches);
#endif
int ret = 0;
if (kScriptTypeJavascript == m_eScriptType)
{
ret = CCScriptEngineManager::sharedManager()->getScriptEngine()->executeTouchesEvent(1, nEventType, pTouches, this);
}
else if (kScriptTypeLua == m_eScriptType)
{
ret = CCScriptEngineManager::sharedManager()->getScriptEngine()->executeTouchesEvent(m_pScriptHandlerEntry->getHandler(), nEventType, pTouches, this);
}
return ret;
}
/// isTouchEnabled getter
@ -303,79 +301,60 @@ void CCLayer::onEnterTransitionDidFinish()
bool CCLayer::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent)
{
#ifdef COCOS2D_JAVASCRIPT
return excuteScriptTouchHandler(CCTOUCHBEGAN, pTouch) == 0 ? false : true;
#else
if (m_pScriptHandlerEntry)
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
return excuteScriptTouchHandler(CCTOUCHBEGAN, pTouch) == 0 ? false : true;
}
#endif
CC_UNUSED_PARAM(pTouch);
CC_UNUSED_PARAM(pEvent);
CCAssert(false, "Layer#ccTouchBegan override me");
return true;
}
void CCLayer::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) {
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHMOVED, pTouch);
return;
#else
if (m_pScriptHandlerEntry)
void CCLayer::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent)
{
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHMOVED, pTouch);
return;
}
#endif
CC_UNUSED_PARAM(pTouch);
CC_UNUSED_PARAM(pEvent);
}
void CCLayer::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) {
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHENDED, pTouch);
return;
#else
if (m_pScriptHandlerEntry)
void CCLayer::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent)
{
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHENDED, pTouch);
return;
}
#endif
CC_UNUSED_PARAM(pTouch);
CC_UNUSED_PARAM(pEvent);
}
void CCLayer::ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) {
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHCANCELLED, pTouch);
return;
#else
if (m_pScriptHandlerEntry)
void CCLayer::ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent)
{
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHCANCELLED, pTouch);
return;
}
#endif
CC_UNUSED_PARAM(pTouch);
CC_UNUSED_PARAM(pEvent);
}
void CCLayer::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent)
{
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHBEGAN, pTouches);
return;
#else
if (m_pScriptHandlerEntry)
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHBEGAN, pTouches);
return;
}
#endif
CC_UNUSED_PARAM(pTouches);
CC_UNUSED_PARAM(pEvent);
@ -383,48 +362,36 @@ void CCLayer::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent)
void CCLayer::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent)
{
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHMOVED, pTouches);
return;
#else
if (m_pScriptHandlerEntry)
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHMOVED, pTouches);
return;
}
#endif
CC_UNUSED_PARAM(pTouches);
CC_UNUSED_PARAM(pEvent);
}
void CCLayer::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent)
{
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHENDED, pTouches);
return;
#else
if (m_pScriptHandlerEntry)
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHENDED, pTouches);
return;
}
#endif
CC_UNUSED_PARAM(pTouches);
CC_UNUSED_PARAM(pEvent);
}
void CCLayer::ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent)
{
#ifdef COCOS2D_JAVASCRIPT
excuteScriptTouchHandler(CCTOUCHCANCELLED, pTouches);
return;
#else
if (m_pScriptHandlerEntry)
if (kScriptTypeJavascript == m_eScriptType || (kScriptTypeLua == m_eScriptType && m_pScriptHandlerEntry))
{
excuteScriptTouchHandler(CCTOUCHCANCELLED, pTouches);
return;
}
#endif
CC_UNUSED_PARAM(pTouches);
CC_UNUSED_PARAM(pEvent);
}

View File

@ -119,12 +119,14 @@ void CCMenuItem::activate()
(m_pListener->*m_pfnSelector)(this);
}
#ifdef COCOS2D_JAVASCRIPT
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCMenuItemActivated, (CCNode *)this);
#else
// Lua
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCMenuItemActivated);
#endif
if (kScriptTypeJavascript == m_eScriptType)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCMenuItemActivated, this);
}
else if( kScriptTypeLua == m_eScriptType && m_nScriptHandler != 0)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, getTag(), this);
}
}
}

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
@ -43,7 +43,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;..\platform\win32;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libtiff;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\pthread;..\platform\third_party\win32\OGLES;..\include;..\kazmath\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -35,6 +35,12 @@ NS_CC_BEGIN
class CCTimer;
enum ccScriptType {
kScriptTypeNone = 0,
kScriptTypeLua,
kScriptTypeJavascript
};
/**
* @addtogroup script_support
* @{
@ -120,6 +126,8 @@ class CC_DLL CCScriptEngineProtocol// : public CCObject
{
public:
virtual ~CCScriptEngineProtocol() {};
virtual ccScriptType getScriptType() { return kScriptTypeNone; };
/**
@brief Method used to get a pointer to the lua_State that the script module is attached to.
@return A pointer to the lua_State that the script module is attached to.
@ -175,8 +183,6 @@ public:
*/
virtual int executeFunctionByHandler(int nHandler, int numArgs = 0) = 0;
#ifdef COCOS2D_JAVASCRIPT
virtual int executeFunctionWithIntegerData(int nHandler, int data, CCNode *self) = 0;
virtual int executeTouchesEvent(int nHandler, int eventType, CCSet *pTouches, CCNode *self) = 0;
virtual int executeFunctionWithFloatData(int nHandler, float data, CCNode *self) = 0;
@ -184,15 +190,6 @@ public:
// execute a schedule function
virtual int executeSchedule(int nHandler, float dt, CCNode *self) = 0;
#else
virtual int executeFunctionWithIntegerData(int nHandler, int data) = 0;
virtual int executeTouchesEvent(int nHandler, int eventType, CCSet *pTouches) = 0;
virtual int executeFunctionWithFloatData(int nHandler, float data) = 0;
// execute a schedule function
virtual int executeSchedule(int nHandler, float dt) = 0;
#endif
virtual int executeFunctionWithBooleanData(int nHandler, bool data) = 0;
virtual int executeFunctionWithCCObject(int nHandler, CCObject* pObject, const char* typeName) = 0;
virtual int pushIntegerToLuaStack(int data) = 0;

View File

@ -78,9 +78,6 @@ check_make_result
make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux
check_make_result
make -C $COCOS2DX20_TRUNK/samples/TestJavascript/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/TestJavascript/proj.linux
check_make_result
#cd $COCOS2DX20_TRUNK/tests/proj.linux
#./cocos2dx-test

View File

@ -1 +0,0 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -1 +0,0 @@
8957affa037faf5669fc5fdedb51eb70abc583bb

View File

@ -1 +0,0 @@
d04c7f9966964a7f6384212b434d088473703ae5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

View File

@ -0,0 +1,517 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var TAG_BASE = 2000;
var MAX_NODES = 1500;
var NODES_INCREASE = 50;
var s_nCurCase = 0;
////////////////////////////////////////////////////////
//
// NodeChildrenMenuLayer
//
////////////////////////////////////////////////////////
var NodeChildrenMenuLayer = PerformBasicLayer.extend({
_maxCases:4,
showCurrentTest:function () {
var nodes = (this.getParent()).getQuantityOfNodes();
var scene = null;
switch (this._curCase) {
case 0:
scene = new IterateSpriteSheetCArray();
break;
case 1:
scene = new AddSpriteSheet();
break;
case 2:
scene = new RemoveSpriteSheet();
break;
case 3:
scene = new ReorderSpriteSheet();
break;
}
s_nCurCase = this._curCase;
if (scene) {
scene.initWithQuantityOfNodes(nodes);
cc.Director.getInstance().replaceScene(scene);
}
}
});
////////////////////////////////////////////////////////
//
// NodeChildrenMainScene
//
////////////////////////////////////////////////////////
var NodeChildrenMainScene = cc.Scene.extend({
_lastRenderedCount:null,
_quantityOfNodes:null,
_currentQuantityOfNodes:null,
ctor:function () {
var parent = new cc.Scene();
__associateObjWithNative(this, parent);
this.init();
},
initWithQuantityOfNodes:function (nodes) {
//srand(time());
var s = cc.Director.getInstance().getWinSize();
// Title
var label = cc.LabelTTF.create(this.title(), "Arial", 40);
this.addChild(label, 1);
label.setPosition(cc.p(s.width / 2, s.height - 32));
label.setColor(cc.c3b(255, 255, 40));
// Subtitle
var strSubTitle = this.subtitle();
if (strSubTitle.length) {
var l = cc.LabelTTF.create(strSubTitle, "Thonburi", 16);
this.addChild(l, 1);
l.setPosition(cc.p(s.width / 2, s.height - 80));
}
this._lastRenderedCount = 0;
this._currentQuantityOfNodes = 0;
this._quantityOfNodes = nodes;
cc.MenuItemFont.setFontSize(65);
var that = this;
var decrease = cc.MenuItemFont.create(" - ", this, this.onDecrease);
decrease.setColor(cc.c3b(0, 200, 20));
var increase = cc.MenuItemFont.create(" + ", this, this.onIncrease);
increase.setColor(cc.c3b(0, 200, 20));
var menu = cc.Menu.create(decrease, increase);
menu.alignItemsHorizontally();
menu.setPosition(cc.p(s.width / 2, s.height / 2 + 15));
this.addChild(menu, 1);
var infoLabel = cc.LabelTTF.create("0 nodes", "Marker Felt", 30);
infoLabel.setColor(cc.c3b(0, 200, 20));
infoLabel.setPosition(cc.p(s.width / 2, s.height / 2 - 15));
this.addChild(infoLabel, 1, TAG_INFO_LAYER);
var menu = new NodeChildrenMenuLayer(true, 4, s_nCurCase);
this.addChild(menu);
this.updateQuantityLabel();
this.updateQuantityOfNodes();
},
title:function () {
return "No title";
},
subtitle:function () {
return "";
},
updateQuantityOfNodes:function () {
},
onDecrease:function (sender) {
this._quantityOfNodes -= NODES_INCREASE;
if (this._quantityOfNodes < 0) {
this._quantityOfNodes = 0;
}
this.updateQuantityLabel();
this.updateQuantityOfNodes();
},
onIncrease:function (sender) {
this._quantityOfNodes += NODES_INCREASE;
if (this._quantityOfNodes > MAX_NODES) {
this._quantityOfNodes = MAX_NODES
}
this.updateQuantityLabel();
this.updateQuantityOfNodes();
},
updateQuantityLabel:function () {
if (this._quantityOfNodes != this._lastRenderedCount) {
var infoLabel = this.getChildByTag(TAG_INFO_LAYER);
var str = this._quantityOfNodes + " nodes";
infoLabel.setString(str);
this._lastRenderedCount = this._quantityOfNodes;
}
},
getQuantityOfNodes:function () {
return this._quantityOfNodes;
}
});
////////////////////////////////////////////////////////
//
// IterateSpriteSheet
//
////////////////////////////////////////////////////////
var IterateSpriteSheet = NodeChildrenMainScene.extend({
_batchNode:null,
_profilingTimer:null,
ctor:function () {
if (cc.ENABLE_PROFILERS) {
this._profilingTimer = new cc.ProfilingTimer();
}
},
updateQuantityOfNodes:function () {
var s = cc.Director.getInstance().getWinSize();
// increase nodes
if (this._currentQuantityOfNodes < this._quantityOfNodes) {
for (var i = 0; i < (this._quantityOfNodes - this._currentQuantityOfNodes); i++) {
var sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 32, 32));
this._batchNode.addChild(sprite);
sprite.setPosition(cc.p(cc.RANDOM_0_1() * s.width, cc.RANDOM_0_1() * s.height));
}
}
// decrease nodes
else if (this._currentQuantityOfNodes > this._quantityOfNodes) {
for (var i = 0; i < (this._currentQuantityOfNodes - this._quantityOfNodes); i++) {
var index = this._currentQuantityOfNodes - i - 1;
this._batchNode.removeChildAtIndex(index, true);
}
}
this._currentQuantityOfNodes = this._quantityOfNodes;
},
initWithQuantityOfNodes:function (nodes) {
this._batchNode = cc.SpriteBatchNode.create("Images/spritesheet1.png");
this.addChild(this._batchNode);
this._super(nodes);
if (cc.ENABLE_PROFILERS) {
this._profilingTimer = cc.Profiler.timerWithName(this.profilerName(), this);
}
this.scheduleUpdate();
},
update:function (dt) {
},
profilerName:function () {
return "none";
}
});
////////////////////////////////////////////////////////
//
// IterateSpriteSheetFastEnum
//
////////////////////////////////////////////////////////
var IterateSpriteSheetFastEnum = IterateSpriteSheet.extend({
update:function (dt) {
// iterate using fast enumeration protocol
var children = this._batchNode.getChildren();
if (cc.ENABLE_PROFILERS) {
cc.ProfilingBeginTimingBlock(this._profilingTimer);
}
for (var i = 0; i < children.length; i++) {
var sprite = children[i];
sprite.setVisible(false);
}
if (cc.ENABLE_PROFILERS) {
cc.ProfilingEndTimingBlock(this._profilingTimer);
}
},
title:function () {
return "A - Iterate SpriteSheet";
},
subtitle:function () {
return "Iterate children using Fast Enum API. See console";
},
profilerName:function () {
return "iter fast enum";
}
});
////////////////////////////////////////////////////////
//
// IterateSpriteSheetCArray
//
////////////////////////////////////////////////////////
var IterateSpriteSheetCArray = IterateSpriteSheet.extend({
update:function (dt) {
// iterate using fast enumeration protocol
var children = this._batchNode.getChildren();
if (cc.ENABLE_PROFILERS) {
cc.ProfilingBeginTimingBlock(this._profilingTimer);
}
for (var i = 0; i < children.length; i++) {
var sprite = children[i];
sprite.setVisible(false);
}
if (cc.ENABLE_PROFILERS) {
cc.ProfilingEndTimingBlock(this._profilingTimer);
}
},
title:function () {
return "B - Iterate SpriteSheet";
},
subtitle:function () {
return "Iterate children using Array API. See console";
},
profilerName:function () {
return "iter c-array";
}
});
////////////////////////////////////////////////////////
//
// AddRemoveSpriteSheet
//
////////////////////////////////////////////////////////
var AddRemoveSpriteSheet = NodeChildrenMainScene.extend({
_batchNode:null,
ctor:function () {
if (cc.ENABLE_PROFILERS) {
this._profilingTimer = new cc.ProfilingTimer();
}
},
updateQuantityOfNodes:function () {
var s = cc.Director.getInstance().getWinSize();
// increase nodes
if (this._currentQuantityOfNodes < this._quantityOfNodes) {
for (var i = 0; i < (this._quantityOfNodes - this._currentQuantityOfNodes); i++) {
var sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 32, 32));
this._batchNode.addChild(sprite);
sprite.setPosition(cc.p(cc.RANDOM_0_1() * s.width, cc.RANDOM_0_1() * s.height));
sprite.setVisible(false);
}
}
// decrease nodes
else if (this._currentQuantityOfNodes > this._quantityOfNodes) {
for (var i = 0; i < (this._currentQuantityOfNodes - this._quantityOfNodes); i++) {
var index = this._currentQuantityOfNodes - i - 1;
this._batchNode.removeChildAtIndex(index, true);
}
}
this._currentQuantityOfNodes = this._quantityOfNodes;
},
initWithQuantityOfNodes:function (nodes) {
this._batchNode = cc.SpriteBatchNode.create("Images/spritesheet1.png");
this.addChild(this._batchNode);
this._super(nodes);
if (cc.ENABLE_PROFILERS) {
this._profilingTimer = cc.Profiler.timerWithName(this.profilerName(), this);
}
this.scheduleUpdate();
},
update:function (dt) {
},
profilerName:function () {
return "none";
}
});
////////////////////////////////////////////////////////
//
// AddSpriteSheet
//
////////////////////////////////////////////////////////
var AddSpriteSheet = AddRemoveSpriteSheet.extend({
update:function (dt) {
// reset seed
//srandom(0);
// 15 percent
var totalToAdd = this._currentQuantityOfNodes * 0.15;
if (totalToAdd > 0) {
var sprites = [];
var zs = [];
// Don't include the sprite creation time and random as part of the profiling
for (var i = 0; i < totalToAdd; i++) {
var sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 32, 32));
sprites.push(sprite);
zs[i] = cc.RANDOM_MINUS1_1() * 50;
}
// add them with random Z (very important!)
if (cc.ENABLE_PROFILERS)
cc.ProfilingBeginTimingBlock(this._profilingTimer);
}
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.addChild(sprites[i], zs[i], TAG_BASE + i);
}
if (cc.ENABLE_PROFILERS) {
cc.ProfilingEndTimingBlock(this._profilingTimer);
}
// remove them
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.removeChildByTag(TAG_BASE + i, true);
}
delete zs;
},
title:function () {
return "C - Add to spritesheet";
},
subtitle:function () {
return "Adds %10 of total sprites with random z. See console";
},
profilerName:function () {
return "add sprites";
}
})
;
////////////////////////////////////////////////////////
//
// RemoveSpriteSheet
//
////////////////////////////////////////////////////////
var RemoveSpriteSheet = AddRemoveSpriteSheet.extend({
update:function (dt) {
//srandom(0);
// 15 percent
var totalToAdd = this._currentQuantityOfNodes * 0.15;
if (totalToAdd > 0) {
var sprites = [];
// Don't include the sprite creation time as part of the profiling
for (var i = 0; i < totalToAdd; i++) {
var sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 32, 32));
sprites.push(sprite);
}
// add them with random Z (very important!)
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.addChild(sprites[i], cc.RANDOM_MINUS1_1() * 50, TAG_BASE + i);
}
// remove them
if (cc.ENABLE_PROFILERS) {
cc.ProfilingBeginTimingBlock(this._profilingTimer);
}
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.removeChildByTag(TAG_BASE + i, true);
}
if (cc.ENABLE_PROFILERS) {
cc.ProfilingEndTimingBlock(this._profilingTimer);
}
}
},
title:function () {
return "D - Del from spritesheet";
},
subtitle:function () {
return "Remove %10 of total sprites placed randomly. See console";
},
profilerName:function () {
return "remove sprites";
}
});
////////////////////////////////////////////////////////
//
// ReorderSpriteSheet
//
////////////////////////////////////////////////////////
var ReorderSpriteSheet = AddRemoveSpriteSheet.extend({
update:function (dt) {
//srandom(0);
// 15 percent
var totalToAdd = this._currentQuantityOfNodes * 0.15;
if (totalToAdd > 0) {
var sprites = [];
// Don't include the sprite creation time as part of the profiling
for (var i = 0; i < totalToAdd; i++) {
var sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 32, 32));
sprites.push(sprite);
}
// add them with random Z (very important!)
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.addChild(sprites[i], cc.RANDOM_MINUS1_1() * 50, TAG_BASE + i);
}
// [this._batchNode sortAllChildren];
// reorder them
if (cc.ENABLE_PROFILERS) {
cc.ProfilingBeginTimingBlock(this._profilingTimer);
}
for (var i = 0; i < totalToAdd; i++) {
var node = this._batchNode.getChildren()[i];
;
this._batchNode.reorderChild(node, cc.RANDOM_MINUS1_1() * 50);
}
if (cc.ENABLE_PROFILERS) {
cc.ProfilingEndTimingBlock(this._profilingTimer);
}
}
// remove them
for (var i = 0; i < totalToAdd; i++) {
this._batchNode.removeChildByTag(TAG_BASE + i, true);
}
},
title:function () {
return "E - Reorder from spritesheet";
},
subtitle:function () {
return "Reorder %10 of total sprites placed randomly. See console";
},
profilerName:function () {
return "reorder sprites";
}
});
function runNodeChildrenTest() {
var scene = new IterateSpriteSheetCArray();
scene.initWithQuantityOfNodes(NODES_INCREASE);
cc.Director.getInstance().replaceScene(scene);
}

View File

@ -0,0 +1,515 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var TAG_PARTICLE_SYSTEM = 3;
var TAG_LABEL_ATLAS = 4;
var MAX_PARTICLES = 1000;
var PARTICLE_NODES_INCREASE = 50;
var s_nParCurIdx = 0;
var TAG_PARTICLE_MENU_LAYER = 1000;
////////////////////////////////////////////////////////
//
// ParticleMenuLayer
//
////////////////////////////////////////////////////////
var ParticleMenuLayer = PerformBasicLayer.extend({
_maxCases:4,
showCurrentTest:function () {
var scene = this.getParent();
var subTest = scene.getSubTestNum();
var parNum = scene.getParticlesNum();
var newScene = null;
switch (this._curCase) {
case 0:
newScene = new ParticlePerformTest1;
break;
case 1:
newScene = new ParticlePerformTest2;
break;
case 2:
newScene = new ParticlePerformTest3;
break;
case 3:
newScene = new ParticlePerformTest4;
break;
}
s_nParCurIdx = this._curCase;
if (newScene) {
newScene.initWithSubTest(subTest, parNum);
cc.Director.getInstance().replaceScene(newScene);
}
}
});
////////////////////////////////////////////////////////
//
// ParticleMainScene
//
////////////////////////////////////////////////////////
var ParticleMainScene = cc.Scene.extend({
_lastRenderedCount:null,
_quantityParticles:null,
_subtestNumber:null,
initWithSubTest:function (asubtest, particles) {
//srandom(0);
this._subtestNumber = asubtest;
var s = cc.Director.getInstance().getWinSize();
this._lastRenderedCount = 0;
this._quantityParticles = particles;
cc.MenuItemFont.setFontSize(65);
var decrease = cc.MenuItemFont.create(" - ", this, this.onDecrease);
decrease.setColor(cc.c3b(0, 200, 20));
var increase = cc.MenuItemFont.create(" + ", this, this.onIncrease);
increase.setColor(cc.c3b(0, 200, 20));
var menu = cc.Menu.create(decrease, increase, null);
menu.alignItemsHorizontally();
menu.setPosition(cc.p(s.width / 2, s.height / 2 + 15));
this.addChild(menu, 1);
var infoLabel = cc.LabelTTF.create("0 nodes", "Marker Felt", 30);
infoLabel.setColor(cc.c3b(0, 200, 20));
infoLabel.setPosition(cc.p(s.width / 2, s.height - 90));
this.addChild(infoLabel, 1, TAG_INFO_LAYER);
// particles on stage
//var labelAtlas = cc.LabelAtlas.create("0000", "res/Images/fps_images.png", 16, 24, '.');
var labelAtlas = cc.LabelTTF.create("0000", "Marker Felt", 30);
this.addChild(labelAtlas, 0, TAG_LABEL_ATLAS);
labelAtlas.setPosition(cc.p(s.width - 66, 50));
// Next Prev Test
var menu = new ParticleMenuLayer(true, 4, s_nParCurIdx);
this.addChild(menu, 1, TAG_PARTICLE_MENU_LAYER);
// Sub Tests
cc.MenuItemFont.setFontSize(40);
var subMenu = cc.Menu.create(null);
for (var i = 1; i <= 3; ++i) {
var str = i.toString();
var itemFont = cc.MenuItemFont.create(str, this, this.testNCallback);
itemFont.setTag(i);
subMenu.addChild(itemFont, 10);
if (i <= 1) {
itemFont.setColor(cc.c3b(200, 20, 20));
}
else {
itemFont.setColor(cc.c3b(0, 200, 20));
}
}
subMenu.alignItemsHorizontally();
subMenu.setPosition(cc.p(s.width / 2, 80));
this.addChild(subMenu, 2);
var label = cc.LabelTTF.create(this.title(), "Arial", 40);
this.addChild(label, 1);
label.setPosition(cc.p(s.width / 2, s.height - 32));
label.setColor(cc.c3b(255, 255, 40));
this.updateQuantityLabel();
this.createParticleSystem();
this.schedule(this.step);
},
title:function () {
return "No title";
},
step:function (dt) {
var atlas = this.getChildByTag(TAG_LABEL_ATLAS);
var emitter = this.getChildByTag(TAG_PARTICLE_SYSTEM);
var str = emitter.getParticleCount();
atlas.setString(str);
},
createParticleSystem:function () {
var particleSystem = null;
/*
* Tests:
* 1 Quad Particle System using 32-bit textures (PNG)
* 2: Quad Particle System using 16-bit textures (PNG)
* 3: Quad Particle System using 8-bit textures (PNG)
* 4: Quad Particle System using 4-bit textures (PVRTC)
*/
this.removeChildByTag(TAG_PARTICLE_SYSTEM, true);
//todo
// remove the "fire.png" from the TextureCache cache.
var texture = cc.TextureCache.getInstance().addImage("res/Images/fire.png");
cc.TextureCache.getInstance().removeTexture(texture);
particleSystem = new cc.ParticleSystemQuad();
switch (this._subtestNumber) {
case 1:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGBA8888);
particleSystem.initWithTotalParticles(this._quantityParticles);
particleSystem.setTexture(cc.TextureCache.getInstance().addImage("res/Images/fire.png"));
break;
case 2:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGBA4444);
particleSystem.initWithTotalParticles(this._quantityParticles);
particleSystem.setTexture(cc.TextureCache.getInstance().addImage("res/Images/fire.png"));
break;
case 3:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_A8);
particleSystem.initWithTotalParticles(this._quantityParticles);
particleSystem.setTexture(cc.TextureCache.getInstance().addImage("res/Images/fire.png"));
break;
default:
particleSystem = null;
cc.log("Shall not happen!");
break;
}
this.addChild(particleSystem, 0, TAG_PARTICLE_SYSTEM);
this.doTest();
// restore the default pixel format
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGBA8888);
},
onDecrease:function (sender) {
this._quantityParticles -= PARTICLE_NODES_INCREASE;
if (this._quantityParticles < 0)
this._quantityParticles = 0;
this.updateQuantityLabel();
this.createParticleSystem();
},
onIncrease:function (sender) {
this._quantityParticles += PARTICLE_NODES_INCREASE;
if (this._quantityParticles > MAX_PARTICLES) {
this._quantityParticles = MAX_PARTICLES;
}
this.updateQuantityLabel();
this.createParticleSystem();
},
testNCallback:function (sender) {
this._subtestNumber = sender.getTag();
var menu = this.getChildByTag(TAG_PARTICLE_MENU_LAYER);
menu.restartCallback(sender);
},
updateQuantityLabel:function () {
if (this._quantityParticles != this._lastRenderedCount) {
var infoLabel = this.getChildByTag(TAG_INFO_LAYER);
var str = this._quantityParticles + " particles";
infoLabel.setString(str);
this._lastRenderedCount = this._quantityParticles;
}
},
getSubTestNum:function () {
return this._subtestNumber;
},
getParticlesNum:function () {
return this._quantityParticles;
},
doTest:function () {
}
});
////////////////////////////////////////////////////////
//
// ParticlePerformTest1
//
////////////////////////////////////////////////////////
var ParticlePerformTest1 = ParticleMainScene.extend({
title:function () {
return "A " + this._subtestNumber + " size=4";
},
doTest:function () {
var s = cc.Director.getInstance().getWinSize();
var particleSystem = this.getChildByTag(TAG_PARTICLE_SYSTEM);
// duration
particleSystem.setDuration(-1);
// gravity
particleSystem.setGravity(cc.p(0, -90));
// angle
particleSystem.setAngle(90);
particleSystem.setAngleVar(0);
// radial
particleSystem.setRadialAccel(0);
particleSystem.setRadialAccelVar(0);
// speed of particles
particleSystem.setSpeed(180);
particleSystem.setSpeedVar(50);
// emitter position
particleSystem.setPosition(cc.p(s.width / 2, 100));
particleSystem.setPosVar(cc.p(s.width / 2, 0));
// life of particles
particleSystem.setLife(2.0);
particleSystem.setLifeVar(1);
// emits per frame
particleSystem.setEmissionRate(particleSystem.getTotalParticles() / particleSystem.getLife());
// color of particles
var startColor = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColor(startColor);
var startColorVar = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColorVar(startColorVar);
var endColor = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColor(endColor);
var endColorVar = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColorVar(endColorVar);
// size, in pixels
particleSystem.setEndSize(4.0);
particleSystem.setStartSize(4.0);
particleSystem.setEndSizeVar(0);
particleSystem.setStartSizeVar(0);
// additive
particleSystem.setBlendAdditive(false);
}
});
////////////////////////////////////////////////////////
//
// ParticlePerformTest2
//
////////////////////////////////////////////////////////
var ParticlePerformTest2 = ParticleMainScene.extend({
title:function () {
return "B " + this._subtestNumber + " size=8";
},
doTest:function () {
var s = cc.Director.getInstance().getWinSize();
var particleSystem = this.getChildByTag(TAG_PARTICLE_SYSTEM);
// duration
particleSystem.setDuration(-1);
// gravity
particleSystem.setGravity(cc.p(0, -90));
// angle
particleSystem.setAngle(90);
particleSystem.setAngleVar(0);
// radial
particleSystem.setRadialAccel(0);
particleSystem.setRadialAccelVar(0);
// speed of particles
particleSystem.setSpeed(180);
particleSystem.setSpeedVar(50);
// emitter position
particleSystem.setPosition(cc.p(s.width / 2, 100));
particleSystem.setPosVar(cc.p(s.width / 2, 0));
// life of particles
particleSystem.setLife(2.0);
particleSystem.setLifeVar(1);
// emits per frame
particleSystem.setEmissionRate(particleSystem.getTotalParticles() / particleSystem.getLife());
// color of particles
var startColor = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColor(startColor);
var startColorVar = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColorVar(startColorVar);
var endColor = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColor(endColor);
var endColorVar = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColorVar(endColorVar);
// size, in pixels
particleSystem.setEndSize(8.0);
particleSystem.setStartSize(8.0);
particleSystem.setEndSizeVar(0);
particleSystem.setStartSizeVar(0);
// additive
particleSystem.setBlendAdditive(false);
}
});
////////////////////////////////////////////////////////
//
// ParticlePerformTest3
//
////////////////////////////////////////////////////////
var ParticlePerformTest3 = ParticleMainScene.extend({
title:function () {
return "C " + this._subtestNumber + " size=32";
},
doTest:function () {
var s = cc.Director.getInstance().getWinSize();
var particleSystem = this.getChildByTag(TAG_PARTICLE_SYSTEM);
// duration
particleSystem.setDuration(-1);
// gravity
particleSystem.setGravity(cc.p(0, -90));
// angle
particleSystem.setAngle(90);
particleSystem.setAngleVar(0);
// radial
particleSystem.setRadialAccel(0);
particleSystem.setRadialAccelVar(0);
// speed of particles
particleSystem.setSpeed(180);
particleSystem.setSpeedVar(50);
// emitter position
particleSystem.setPosition(cc.p(s.width / 2, 100));
particleSystem.setPosVar(cc.p(s.width / 2, 0));
// life of particles
particleSystem.setLife(2.0);
particleSystem.setLifeVar(1);
// emits per frame
particleSystem.setEmissionRate(particleSystem.getTotalParticles() / particleSystem.getLife());
// color of particles
var startColor = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColor(startColor);
var startColorVar = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColorVar(startColorVar);
var endColor = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColor(endColor);
var endColorVar = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColorVar(endColorVar);
// size, in pixels
particleSystem.setEndSize(32.0);
particleSystem.setStartSize(32.0);
particleSystem.setEndSizeVar(0);
particleSystem.setStartSizeVar(0);
// additive
particleSystem.setBlendAdditive(false);
}
});
////////////////////////////////////////////////////////
//
// ParticlePerformTest4
//
////////////////////////////////////////////////////////
var ParticlePerformTest4 = ParticleMainScene.extend({
title:function () {
return "D " + this._subtestNumber + " size=64";
},
doTest:function () {
var s = cc.Director.getInstance().getWinSize();
var particleSystem = this.getChildByTag(TAG_PARTICLE_SYSTEM);
// duration
particleSystem.setDuration(-1);
// gravity
particleSystem.setGravity(cc.p(0, -90));
// angle
particleSystem.setAngle(90);
particleSystem.setAngleVar(0);
// radial
particleSystem.setRadialAccel(0);
particleSystem.setRadialAccelVar(0);
// speed of particles
particleSystem.setSpeed(180);
particleSystem.setSpeedVar(50);
// emitter position
particleSystem.setPosition(cc.p(s.width / 2, 100));
particleSystem.setPosVar(cc.p(s.width / 2, 0));
// life of particles
particleSystem.setLife(2.0);
particleSystem.setLifeVar(1);
// emits per frame
particleSystem.setEmissionRate(particleSystem.getTotalParticles() / particleSystem.getLife());
// color of particles
var startColor = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColor(startColor);
var startColorVar = new cc.Color4F(0.5, 0.5, 0.5, 1.0);
particleSystem.setStartColorVar(startColorVar);
var endColor = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColor(endColor);
var endColorVar = new cc.Color4F(0.1, 0.1, 0.1, 0.2);
particleSystem.setEndColorVar(endColorVar);
// size, in pixels
particleSystem.setEndSize(64.0);
particleSystem.setStartSize(64.0);
particleSystem.setEndSizeVar(0);
particleSystem.setStartSizeVar(0);
// additive
particleSystem.setBlendAdditive(false);
}
});
function runParticleTest() {
var scene = new ParticlePerformTest1;
scene.initWithSubTest(1, PARTICLE_NODES_INCREASE);
cc.Director.getInstance().replaceScene(scene);
}

View File

@ -0,0 +1,576 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var MAX_SPRITES = 1000;
var SPRITES_INCREASE = 50;
var TAG_INFO_LAYER = 1;
var TAG_MAIN_LAYER = 2;
var TAG_SPRITE_MENU_LAYER = (MAX_SPRITES + 1000);
var s_nSpriteCurCase = 0;
////////////////////////////////////////////////////////
//
// SubTest
//
////////////////////////////////////////////////////////
var SubTest = cc.Class.extend({
_subtestNumber:null,
_batchNode:null,
_parent:null,
removeByTag:function (tag) {
switch (this._subtestNumber) {
case 1:
case 4:
case 7:
this._parent.removeChildByTag(tag + 100, true);
break;
case 2:
case 3:
case 5:
case 6:
case 8:
case 9:
this._batchNode.removeChildAtIndex(tag, true);
break;
default:
break;
}
},
createSpriteWithTag:function (tag) {
// create
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA8888);
var sprite = null;
switch (this._subtestNumber) {
case 1:
{
sprite = cc.Sprite.create("Images/grossinis_sister1.png");
this._parent.addChild(sprite, 0, tag + 100);
break;
}
case 2:
case 3:
{
sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(0, 0, 52, 139));
this._batchNode.addChild(sprite, 0, tag + 100);
break;
}
case 4:
{
var idx = parseInt(cc.RANDOM_0_1() * 14) + 1;
idx = idx < 10 ? "0" + idx : idx.toString();
var str = "Images/grossini_dance_" + idx + ".png";
sprite = cc.Sprite.create(str);
this._parent.addChild(sprite, 0, tag + 100);
break;
}
case 5:
case 6:
{
var idx = 0 | (cc.RANDOM_0_1() * 14);
var x = (idx % 5) * 85;
var y = (0 | (idx / 5)) * 121;
sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(x, y, 85, 121));
this._batchNode.addChild(sprite, 0, tag + 100);
break;
}
case 7:
{
var y, x;
var r = 0 | (cc.RANDOM_0_1() * 64);
y = parseInt(r / 8);
x = parseInt(r % 8);
var str = "Images/sprites_test/sprite-" + x + "-" + y + ".png";
sprite = cc.Sprite.create(str);
this._parent.addChild(sprite, 0, tag + 100);
break;
}
case 8:
case 9:
{
var y, x;
var r = 0 | (cc.RANDOM_0_1() * 64);
y = (0 | (r / 8)) * 32;
x = (r % 8) * 32;
sprite = cc.Sprite.createWithTexture(this._batchNode.getTexture(), cc.rect(x, y, 32, 32));
this._batchNode.addChild(sprite, 0, tag + 100);
break;
}
default:
break;
}
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_DEFAULT);
return sprite;
},
initWithSubTest:function (subTest, p) {
this._subtestNumber = subTest;
this._parent = p;
this._batchNode = null;
/*
* Tests:
* 1: 1 (32-bit) PNG sprite of 52 x 139
* 2: 1 (32-bit) PNG Batch Node using 1 sprite of 52 x 139
* 3: 1 (16-bit) PNG Batch Node using 1 sprite of 52 x 139
* 4: 1 (4-bit) PVRTC Batch Node using 1 sprite of 52 x 139
* 5: 14 (32-bit) PNG sprites of 85 x 121 each
* 6: 14 (32-bit) PNG Batch Node of 85 x 121 each
* 7: 14 (16-bit) PNG Batch Node of 85 x 121 each
* 8: 14 (4-bit) PVRTC Batch Node of 85 x 121 each
* 9: 64 (32-bit) sprites of 32 x 32 each
*10: 64 (32-bit) PNG Batch Node of 32 x 32 each
*11: 64 (16-bit) PNG Batch Node of 32 x 32 each
*12: 64 (4-bit) PVRTC Batch Node of 32 x 32 each
*/
// purge textures
log("initWithSubTest 01");
var mgr = cc.TextureCache.getInstance();
log("initWithSubTest 02");
// [mgr removeAllTextures];
mgr.removeTexture(mgr.addImage("Images/grossinis_sister1.png"));
mgr.removeTexture(mgr.addImage("Images/grossini_dance_atlas.png"));
mgr.removeTexture(mgr.addImage("Images/spritesheet1.png"));
log("initWithSubTest 03");
switch (this._subtestNumber) {
case 1:
case 4:
case 7:
break;
///
case 2:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA8888);
this._batchNode = cc.SpriteBatchNode.create("Images/grossinis_sister1.png", 100);
p.addChild(this._batchNode, 0);
break;
case 3:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA4444);
this._batchNode = cc.SpriteBatchNode.create("Images/grossinis_sister1.png", 100);
p.addChild(this._batchNode, 0);
break;
///
case 5:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA8888);
this._batchNode = cc.SpriteBatchNode.create("Images/grossini_dance_atlas.png", 100);
p.addChild(this._batchNode, 0);
break;
case 6:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA4444);
this._batchNode = cc.SpriteBatchNode.create("Images/grossini_dance_atlas.png", 100);
p.addChild(this._batchNode, 0);
break;
///
case 8:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA8888);
this._batchNode = cc.SpriteBatchNode.create("Images/spritesheet1.png", 100);
p.addChild(this._batchNode, 0);
break;
case 9:
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_RGBA4444);
this._batchNode = cc.SpriteBatchNode.create("Images/spritesheet1.png", 100);
p.addChild(this._batchNode, 0);
break;
default:
break;
}
log("initWithSubTest 04");
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_PIXELFORMAT_DEFAULT);
log("initWithSubTest 05");
}
});
////////////////////////////////////////////////////////
//
// SpriteMenuLayer
//
////////////////////////////////////////////////////////
var SpriteMenuLayer = PerformBasicLayer.extend({
_maxCases:7,
showCurrentTest:function () {
var scene = null;
var preScene = this.getParent();
var subTest = preScene.getSubTestNum();
var nodes = preScene.getNodesNum();
switch (this._curCase) {
case 0:
scene = new SpritePerformTest1();
break;
case 1:
scene = new SpritePerformTest2();
break;
case 2:
scene = new SpritePerformTest3();
break;
case 3:
scene = new SpritePerformTest4();
break;
case 4:
scene = new SpritePerformTest5();
break;
case 5:
scene = new SpritePerformTest6();
break;
case 6:
scene = new SpritePerformTest7();
break;
}
s_nSpriteCurCase = this._curCase;
if (scene) {
scene.initWithSubTest(subTest, nodes);
cc.Director.getInstance().replaceScene(scene);
}
}
});
////////////////////////////////////////////////////////
//
// SpriteMainScene
//
////////////////////////////////////////////////////////
var SpriteMainScene = cc.Scene.extend({
_lastRenderedCount:null,
_quantityNodes:null,
_subTest:null,
_subtestNumber:1,
ctor:function () {
var parent = new cc.Scene();
__associateObjWithNative(this, parent);
this.init();
},
title:function () {
return "No title";
},
initWithSubTest:function (asubtest, nodes) {
this._subtestNumber = asubtest;
this._subTest = new SubTest();
this._subTest.initWithSubTest(asubtest, this);
var s = cc.Director.getInstance().getWinSize();
this._lastRenderedCount = 0;
this._quantityNodes = 0;
// add title label
var label = cc.LabelTTF.create(this.title(), "Arial", 40);
this.addChild(label, 1);
label.setPosition(cc.p(s.width / 2, s.height - 32));
label.setColor(cc.c3b(255, 255, 40));
cc.MenuItemFont.setFontSize(65);
var decrease = cc.MenuItemFont.create(" - ", this, this.onDecrease);
decrease.setColor(cc.c3b(0, 200, 20));
var increase = cc.MenuItemFont.create(" + ", this, this.onIncrease);
increase.setColor(cc.c3b(0, 200, 20));
var menu = cc.Menu.create(decrease, increase);
menu.alignItemsHorizontally();
menu.setPosition(cc.p(s.width / 2, s.height - 65));
this.addChild(menu, 1);
var infoLabel = cc.LabelTTF.create("0 nodes", "Marker Felt", 30);
infoLabel.setColor(cc.c3b(0, 200, 20));
infoLabel.setPosition(cc.p(s.width / 2, s.height - 90));
this.addChild(infoLabel, 1, TAG_INFO_LAYER);
// add menu
var menu = new SpriteMenuLayer(true, 7, s_nSpriteCurCase);
this.addChild(menu, 1, TAG_SPRITE_MENU_LAYER);
// Sub Tests
cc.MenuItemFont.setFontSize(32);
var subMenu = cc.Menu.create();
for (var i = 1; i <= 9; ++i) {
var text = i.toString();
var itemFont = cc.MenuItemFont.create(text, this, this.testNCallback);
itemFont.setTag(i);
subMenu.addChild(itemFont, 10);
if (i <= 3)
itemFont.setColor(cc.c3b(200, 20, 20));
else if (i <= 6)
itemFont.setColor(cc.c3b(0, 200, 20));
else
itemFont.setColor(cc.c3b(0, 20, 200));
}
subMenu.alignItemsHorizontally();
subMenu.setPosition(cc.p(s.width / 2, 80));
this.addChild(subMenu, 2);
while (this._quantityNodes < nodes) {
this.onIncrease(this);
}
},
updateNodes:function () {
if (this._quantityNodes != this._lastRenderedCount) {
var infoLabel = this.getChildByTag(TAG_INFO_LAYER);
var str = this._quantityNodes + " nodes";
infoLabel.setString(str);
this._lastRenderedCount = this._quantityNodes;
}
},
testNCallback:function (sender) {
this._subtestNumber = sender.getTag();
var menu = this.getChildByTag(TAG_SPRITE_MENU_LAYER);
menu.restartCallback(sender);
},
onIncrease:function (sender) {
if (this._quantityNodes >= MAX_SPRITES)
return;
for (var i = 0; i < SPRITES_INCREASE; i++) {
var sprite = this._subTest.createSpriteWithTag(this._quantityNodes);
this.doTest(sprite);
this._quantityNodes++;
}
this.updateNodes();
},
onDecrease:function (sender) {
if (this._quantityNodes <= 0)
return;
for (var i = 0; i < SPRITES_INCREASE; i++) {
this._quantityNodes--;
this._subTest.removeByTag(this._quantityNodes);
}
this.updateNodes();
},
doTest:function (sprite) {
},
getSubTestNum:function () {
return this._subtestNumber
},
getNodesNum:function () {
return this._quantityNodes
}
});
////////////////////////////////////////////////////////
//
// For test functions
//
////////////////////////////////////////////////////////
function performanceActions(sprite) {
var size = cc.Director.getInstance().getWinSize();
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
var period = 0.5 + (Math.random() * 1000) / 500.0;
var rot = cc.RotateBy.create(period, 360.0 * cc.RANDOM_0_1());
var rot_back = rot.reverse();
var permanentRotation = cc.RepeatForever.create(cc.Sequence.create(rot, rot_back));
sprite.runAction(permanentRotation);
var growDuration = 0.5 + (Math.random() * 1000) / 500.0;
var grow = cc.ScaleBy.create(growDuration, 0.5, 0.5);
var permanentScaleLoop = cc.RepeatForever.create(cc.Sequence.create(grow, grow.reverse()));
sprite.runAction(permanentScaleLoop);
}
function performanceActions20(sprite) {
var size = cc.Director.getInstance().getWinSize();
if (cc.RANDOM_0_1() < 0.2)
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
else
sprite.setPosition(cc.p(-1000, -1000));
var period = 0.5 + (Math.random() * 1000) / 500.0;
var rot = cc.RotateBy.create(period, 360.0 * cc.RANDOM_0_1());
var rot_back = rot.reverse();
var permanentRotation = cc.RepeatForever.create(cc.Sequence.create(rot, rot_back));
sprite.runAction(permanentRotation);
var growDuration = 0.5 + (Math.random() * 1000) / 500.0;
var grow = cc.ScaleBy.create(growDuration, 0.5, 0.5);
var permanentScaleLoop = cc.RepeatForever.create(cc.Sequence._actionOneTwo(grow, grow.reverse()));
sprite.runAction(permanentScaleLoop);
}
function performanceRotationScale(sprite) {
var size = cc.Director.getInstance().getWinSize();
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
sprite.setRotation(cc.RANDOM_0_1() * 360);
sprite.setScale(cc.RANDOM_0_1() * 2);
}
function performancePosition(sprite) {
var size = cc.Director.getInstance().getWinSize();
log("performancePosition 01");
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
log("performancePosition 02");
}
function performanceout20(sprite) {
var size = cc.Director.getInstance().getWinSize();
if (cc.RANDOM_0_1() < 0.2)
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
else
sprite.setPosition(cc.p(-1000, -1000));
}
function performanceOut100(sprite) {
sprite.setPosition(cc.p(-1000, -1000));
}
function performanceScale(sprite) {
var size = cc.Director.getInstance().getWinSize();
sprite.setPosition(cc.p(parseInt(Math.random() * size.width), parseInt(Math.random() * size.height)));
sprite.setScale(cc.RANDOM_0_1() * 100 / 50);
}
////////////////////////////////////////////////////////
//
// SpritePerformTest1
//
////////////////////////////////////////////////////////
var SpritePerformTest1 = SpriteMainScene.extend({
doTest:function (sprite) {
performancePosition(sprite);
},
title:function () {
return "A (" + this._subtestNumber + ") position";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest2
//
////////////////////////////////////////////////////////
var SpritePerformTest2 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceScale(sprite);
},
title:function () {
return "B (" + this._subtestNumber + ") scale";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest3
//
////////////////////////////////////////////////////////
var SpritePerformTest3 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceRotationScale(sprite);
},
title:function () {
return "C (" + this._subtestNumber + ") scale + rot";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest4
//
////////////////////////////////////////////////////////
var SpritePerformTest4 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceOut100(sprite);
},
title:function () {
return "D (" + this._subtestNumber + ") 100% out";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest5
//
////////////////////////////////////////////////////////
var SpritePerformTest5 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceout20(sprite);
},
title:function () {
return "E (" + this._subtestNumber + ") 80% out";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest6
//
////////////////////////////////////////////////////////
var SpritePerformTest6 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceActions(sprite);
},
title:function () {
return "F (" + this._subtestNumber + ") actions";
}
});
////////////////////////////////////////////////////////
//
// SpritePerformTest7
//
////////////////////////////////////////////////////////
var SpritePerformTest7 = SpriteMainScene.extend({
doTest:function (sprite) {
performanceActions20(sprite);
},
title:function () {
return "G (" + this._subtestNumber + ") actions 80% out";
}
});
function runSpriteTest() {
log("runSpriteTest 01");
var scene = new SpritePerformTest1;
log("runSpriteTest 02");
scene.initWithSubTest(1, 50);
log("runSpriteTest 03");
cc.Director.getInstance().replaceScene(scene);
log("runSpriteTest 04");
}

View File

@ -0,0 +1,188 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
require("js/PerformanceTest/testResource.js");
require("js/PerformanceTest/testbasic.js");
/*
require("js/PerformanceTest/PerformanceParticleTest.js");
require("js/PerformanceTest/PerformanceTextureTest.js");
*/
var ITEM_TAG_BASIC = 1000;
var nCurCase = 0;
var PerformanceTests = [
"PerformanceNodeChildrenTest",
"PerformanceParticleTest",
"PerformanceSpriteTest",
"PerformanceTextureTest",
"PerformanceTouchesTest"
];
////////////////////////////////////////////////////////
//
// PerformanceMainLayer
//
////////////////////////////////////////////////////////
var PerformanceMainLayer = cc.Layer.extend({
ctor:function () {
var parent = new cc.Layer();
__associateObjWithNative(this, parent);
this.init();
},
onEnter:function () {
//this._super();
var s = cc.Director.getInstance().getWinSize();
var menu = cc.Menu.create();
menu.setPosition(cc.POINT_ZERO);
cc.MenuItemFont.setFontName("Arial");
cc.MenuItemFont.setFontSize(24);
for (var i = 0; i < PerformanceTests.length; i++) {
var pItem = cc.MenuItemFont.create(PerformanceTests[i], this, this.menuCallback);
pItem.setPosition(cc.p(s.width / 2, s.height - (i + 1) * LINE_SPACE));
menu.addChild(pItem, ITEM_TAG_BASIC + i);
}
this.addChild(menu);
},
menuCallback:function (sender) {
var index = sender.getZOrder() - ITEM_TAG_BASIC;
// create the test scene and run it
switch (index) {
case 0:
require("js/PerformanceTest/PerformanceNodeChildrenTest.js");
runNodeChildrenTest();
break;
case 1:
//runParticleTest();
break;
case 2:
require("js/PerformanceTest/PerformanceSpriteTest.js");
runSpriteTest();
break;
case 3:
//runTextureTest();
break;
case 4:
//runTouchesTest();
break;
default:
break;
}
}
});
////////////////////////////////////////////////////////
//
// PerformBasicLayer
//
////////////////////////////////////////////////////////
var PerformBasicLayer = cc.Layer.extend({
_controlMenuVisible:true,
_maxCases:1,
_curCase:0,
ctor:function () {
this._curCase = nCurCase;
var parent = new cc.Layer();
__associateObjWithNative(this, parent);
this.init();
},
onEnter:function () {
// this._super();
var s = cc.Director.getInstance().getWinSize();
cc.MenuItemFont.setFontName("Arial");
cc.MenuItemFont.setFontSize(24);
var mainItem = cc.MenuItemFont.create("Back", this, this.toMainLayer);
mainItem.setPosition(cc.p(s.width - 50, 25));
var menu = cc.Menu.create(mainItem);
menu.setPosition(cc.POINT_ZERO);
if (this._controlMenuVisible) {
var item1 = cc.MenuItemImage.create(s_pathB1, s_pathB2, this, this.backCallback);
var item2 = cc.MenuItemImage.create(s_pathR1, s_pathR2, this, this.restartCallback);
var item3 = cc.MenuItemImage.create(s_pathF1, s_pathF2, this, this.nextCallback);
item1.setPosition(cc.p(s.width / 2 - 100, 30));
item2.setPosition(cc.p(s.width / 2, 30));
item3.setPosition(cc.p(s.width / 2 + 100, 30));
menu.addChild(item1, ITEM_TAG_BASIC);
menu.addChild(item2, ITEM_TAG_BASIC);
menu.addChild(item3, ITEM_TAG_BASIC);
}
this.addChild(menu);
},
restartCallback:function (sender) {
this.showCurrentTest();
},
nextCallback:function (sender) {
this._curCase++;
this._curCase = this._curCase % this._maxCases;
nCurCase = this._curCase;
this.showCurrentTest();
},
backCallback:function (sender) {
this._curCase--;
if (this._curCase < 0) {
this._curCase += this._maxCases;
}
nCurCase = this._curCase;
this.showCurrentTest();
},
showCurrentTest:function (sender) {
},
toMainLayer:function (sender) {
var scene = new PerformanceTestScene();
scene.runThisTest();
}
});
////////////////////////////////////////////////////////
//
// PerformanceTestScene
//
////////////////////////////////////////////////////////
var PerformanceTestScene = TestScene.extend({
runThisTest:function () {
var layer = new PerformanceMainLayer();
this.addChild(layer);
cc.Director.getInstance().replaceScene(this);
}
});
function runPerformanceTest() {
var scene = new PerformanceTestScene();
scene.runThisTest();
}
runPerformanceTest();

View File

@ -0,0 +1,171 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var s_nTexCurCase = 0;
////////////////////////////////////////////////////////
//
// TextureMenuLayer
//
////////////////////////////////////////////////////////
var TextureMenuLayer = PerformBasicLayer.extend({
showCurrentTest:function () {
var scene = null;
switch (this._curCase) {
case 0:
scene = TextureTest.scene();
break;
}
s_nTexCurCase = this._curCase;
if (scene) {
cc.Director.getInstance().replaceScene(scene);
}
},
onEnter:function () {
this._super();
var s = cc.Director.getInstance().getWinSize();
// Title
var label = cc.LabelTTF.create(this.title(), "Arial", 40);
this.addChild(label, 1);
label.setPosition(cc.p(s.width / 2, s.height - 32));
label.setColor(cc.c3b(255, 255, 40));
// Subtitle
var strSubTitle = this.subtitle();
if (strSubTitle.length) {
var l = cc.LabelTTF.create(strSubTitle, "Thonburi", 16);
this.addChild(l, 1);
l.setPosition(cc.p(s.width / 2, s.height - 80));
}
this.performTests();
},
title:function () {
return "no title";
},
subtitle:function () {
return "no subtitle";
},
performTests:function () {
}
})
////////////////////////////////////////////////////////
//
// TextureTest
//
////////////////////////////////////////////////////////
var TextureTest = TextureMenuLayer.extend({
performTests:function () {
cc.log("--------");
cc.log("--- PNG 128x128 ---");
this.performTestsPNG("res/Images/test_image.png");
cc.log("--- PNG 512x512 ---");
this.performTestsPNG("res/Images/texture512x512.png");
cc.log("EMPTY IMAGE");
cc.log("--- PNG 1024x1024 ---");
this.performTestsPNG("res/Images/texture1024x1024.png");
cc.log("LANDSCAPE IMAGE");
cc.log("--- PNG 1024x1024 ---");
this.performTestsPNG("res/Images/landscape-1024x1024.png");
},
title:function () {
return "Texture Performance Test";
},
subtitle:function () {
return "See console for results";
},
performTestsPNG:function (filename) {
var now = cc.timeval();
var texture;
var cache = cc.TextureCache.getInstance();
cc.log("RGBA 8888");
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGBA8888);
var now = cc.Time.gettimeofdayCocos2d();
texture = cache.addImage(filename);
if (texture)
cc.log(" ms:" + calculateDeltaTime(now));
else
cc.log(" ERROR");
cache.removeTexture(texture);
cc.log("RGBA 4444");
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGBA4444);
var now = cc.Time.gettimeofdayCocos2d();
texture = cache.addImage(filename);
if (texture)
cc.log(" ms:" + calculateDeltaTime(now));
else
cc.log(" ERROR");
cache.removeTexture(texture);
cc.log("RGBA 5551");
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGB5A1);
var now = cc.Time.gettimeofdayCocos2d();
texture = cache.addImage(filename);
if (texture)
cc.log(" ms:" + calculateDeltaTime(now));
else
cc.log(" ERROR");
cache.removeTexture(texture);
cc.log("RGB 565");
cc.Texture2D.setDefaultAlphaPixelFormat(cc.TEXTURE_2D_PIXEL_FORMAT_RGB565);
var now = cc.Time.gettimeofdayCocos2d();
texture = cache.addImage(filename);
if (texture)
cc.log(" ms:" + calculateDeltaTime(now));
else
cc.log(" ERROR");
cache.removeTexture(texture);
}
});
TextureTest.scene = function () {
var scene = cc.Scene.create();
var layer = new TextureTest(false, 1, s_nTexCurCase);
scene.addChild(layer);
return scene;
};
function runTextureTest() {
s_nTexCurCase = 0;
var scene = TextureTest.scene();
cc.Director.getInstance().replaceScene(scene);
}
function calculateDeltaTime(lastUpdate) {
var now = cc.Time.gettimeofdayCocos2d();
var dt = (now.tv_sec - lastUpdate.tv_sec) + (now.tv_usec - lastUpdate.tv_usec) / 1000000.0;
return dt;
}

View File

@ -0,0 +1,162 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var s_nTouchCurCase = 0;
var TouchesMainScene = PerformBasicLayer.extend({
_maxCases:2,
_plabel:null,
_numberOfTouchesB:0,
_numberOfTouchesM:0,
_numberOfTouchesE:0,
_numberOfTouchesC:0,
_elapsedTime:null,
showCurrentTest:function () {
var layer = null;
switch (this._curCase) {
case 0:
layer = new TouchesPerformTest1(true, 2, this._curCase);
break;
case 1:
layer = new TouchesPerformTest2(true, 2, this._curCase);
break;
}
s_nTouchCurCase = this._curCase;
if (layer) {
var scene = cc.Scene.create();
scene.addChild(layer);
cc.Director.getInstance().replaceScene(scene);
}
},
onEnter:function () {
this._super();
var s = cc.Director.getInstance().getWinSize();
// add title
var label = cc.LabelTTF.create(this.title(), "Arial", 32);
this.addChild(label, 1);
label.setPosition(cc.p(s.width / 2, s.height - 50));
this.scheduleUpdate();
this._plabel = cc.LabelTTF.create("00.0", "Arial", 16);
this._plabel.setPosition(cc.p(s.width / 2, s.height / 2));
this.addChild(this._plabel);
this._elapsedTime = 0;
this._numberOfTouchesB = this._numberOfTouchesM = this._numberOfTouchesE = this._numberOfTouchesC = 0;
},
title:function () {
return "No title";
},
update:function (dt) {
this._elapsedTime += dt;
if (this._elapsedTime > 1.0) {
var frameRateB = (this._numberOfTouchesB / this._elapsedTime).toFixed(1);
var frameRateM = (this._numberOfTouchesM / this._elapsedTime).toFixed(1);
var frameRateE = (this._numberOfTouchesE / this._elapsedTime).toFixed(1);
var frameRateC = (this._numberOfTouchesC / this._elapsedTime).toFixed(1);
this._elapsedTime = 0;
this._numberOfTouchesB = this._numberOfTouchesM = this._numberOfTouchesE = this._numberOfTouchesC = 0;
var str = frameRateB + " " + frameRateM + " " + frameRateE + " " + frameRateC;
this._plabel.setString(str);
}
}
});
////////////////////////////////////////////////////////
//
// TouchesPerformTest1
//
////////////////////////////////////////////////////////
var TouchesPerformTest1 = TouchesMainScene.extend({
onEnter:function () {
this._super();
this.setTouchEnabled(true);
},
title:function () {
return "Targeted touches";
},
registerWithTouchDispatcher:function () {
cc.Director.getInstance().getTouchDispatcher().addTargetedDelegate(this, 0, true);
},
onTouchBegan:function (touch, event) {
this._numberOfTouchesB++;
return true;
},
onTouchMoved:function (touch, event) {
this._numberOfTouchesM++;
},
onTouchEnded:function (touch, event) {
this._numberOfTouchesE++;
},
onTouchCancelled:function (touch, event) {
this._numberOfTouchesC++;
}
});
////////////////////////////////////////////////////////
//
// TouchesPerformTest2
//
////////////////////////////////////////////////////////
var TouchesPerformTest2 = TouchesMainScene.extend({
onEnter:function () {
this._super();
this.setTouchEnabled(true);
},
title:function () {
return "Standard touches";
},
registerWithTouchDispatcher:function () {
cc.Director.getInstance().getTouchDispatcher().addStandardDelegate(this, 0);
},
onTouchesBegan:function (touches, event) {
this._numberOfTouchesB += touches.length;
},
onTouchesMoved:function (touches, event) {
this._numberOfTouchesM += touches.length;
},
onTouchesEnded:function (touches, event) {
this._numberOfTouchesE += touches.length;
},
onTouchesCancelled:function (touches, event) {
this._numberOfTouchesC += touches.length;
}
});
function runTouchesTest() {
s_nTouchCurCase = 0;
var scene = cc.Scene.create();
var layer = new TouchesPerformTest1(true, 2, s_nTouchCurCase);
scene.addChild(layer);
cc.Director.getInstance().replaceScene(scene);
}

View File

@ -0,0 +1,322 @@
var s_pathGrossini = "Images/grossini.png";
var s_pathSister1 = "Images/grossinis_sister1.png";
var s_pathSister2 = "Images/grossinis_sister2.png";
var s_pathB1 = "Images/b1.png";
var s_pathB2 = "Images/b2.png";
var s_pathR1 = "Images/r1.png";
var s_pathR2 = "Images/r2.png";
var s_pathF1 = "Images/f1.png";
var s_pathF2 = "Images/f2.png";
var s_pathBlock = "Images/blocks.png";
var s_back = "Images/background.png";
var s_back1 = "Images/background1.png";
var s_back2 = "Images/background2.png";
var s_back3 = "Images/background3.png";
var s_stars1 = "Images/stars.png";
var s_stars2 = "Images/stars2.png";
var s_fire = "Images/fire.png";
var s_snow = "Images/snow.png";
var s_streak = "Images/streak.png";
var s_playNormal = "Images/btn-play-normal.png";
var s_playSelect = "Images/btn-play-selected.png";
var s_aboutNormal = "Images/btn-about-normal.png";
var s_aboutSelect = "Images/btn-about-selected.png";
var s_highNormal = "Images/btn-highscores-normal.png";
var s_highSelect = "Images/btn-highscores-selected.png";
var s_ball = "Images/ball.png";
var s_paddle = "Images/paddle.png";
var s_pathClose = "Images/close.png";
var s_menuItem = "Images/menuitemsprite.png";
var s_shapeModeMenuItem = "Images/shapemode.png";
var s_textureModeMenuItem = "Images/texturemode.png";
var s_MovementMenuItem = "Images/movement.png";
var s_sendScore = "Images/SendScoreButton.png";
var s_pressSendScore = "Images/SendScoreButtonPressed.png";
var s_power = "Images/powered.png";
var s_atlasTest = "Images/atlastest.png";
var s_stars2Grayscale = "Images/stars2-grayscale.png";
var s_starsGrayscale = "Images/stars-grayscale.png";
var s_grossini_dance_atlas = "Images/grossini_dance_atlas.png";
var s_piece = "Images/piece.png";
var s_grossini_dance_atlas_mono = "Images/grossini_dance_atlas-mono.png";
var s_grossini = "animations/grossini.png";
var s_grossini_gray = "animations/grossini_gray.png";
var s_grossini_blue = "animations/grossini_blue.png";
var s_grossini_aliases = "animations/grossini-aliases.png";
var s_dragon_animation = "animations/dragon_animation.png";
var s_ghosts = "animations/ghosts.png";
var s_grossini_family = "animations/grossini_family.png";
var s_boilingFoamPlist = "Images/BoilingFoam.plist";
var s_grossiniPlist = "animations/grossini.plist";
var s_grossini_grayPlist = "animations/grossini_gray.plist";
var s_grossini_bluePlist = "animations/grossini_blue.plist";
var s_grossini_aliasesPlist = "animations/grossini-aliases.plist";
var s_ghostsPlist = "animations/ghosts.plist";
var s_grossini_familyPlist = "animations/grossini_family.plist";
var s_animations2Plist = "animations/animations-2.plist";
var s_animationsPlist = "animations/animations.plist";
var s_helloWorld = "Images/HelloWorld.png";
var s_grossiniDance01 = "Images/grossini_dance_01.png";
var s_grossiniDance02 = "Images/grossini_dance_02.png";
var s_grossiniDance03 = "Images/grossini_dance_03.png";
var s_grossiniDance04 = "Images/grossini_dance_04.png";
var s_grossiniDance05 = "Images/grossini_dance_05.png";
var s_grossiniDance06 = "Images/grossini_dance_06.png";
var s_grossiniDance07 = "Images/grossini_dance_07.png";
var s_grossiniDance08 = "Images/grossini_dance_08.png";
var s_grossiniDance09 = "Images/grossini_dance_09.png";
var s_grossiniDance10 = "Images/grossini_dance_10.png";
var s_grossiniDance11 = "Images/grossini_dance_11.png";
var s_grossiniDance12 = "Images/grossini_dance_12.png";
var s_grossiniDance13 = "Images/grossini_dance_13.png";
var s_grossiniDance14 = "Images/grossini_dance_14.png";
var s_arrows = "Images/arrows.png";
var s_arrowsBar = "Images/arrowsBar.png";
var s_arrows_hd = "Images/arrows-hd.png";
var s_arrowsBar_hd = "Images/arrowsBar-hd.png";
// tilemaps resource
var s_tilesPng = "TileMaps/tiles.png";
var s_levelMapTga = "TileMaps/levelmap.tga";
var s_fixedOrthoTest2Png = "TileMaps/fixed-ortho-test2.png";
var s_hexaTilesPng = "TileMaps/hexa-tiles.png";
var s_isoTestPng = "TileMaps/iso-test.png";
var s_isoTest2Png = "TileMaps/iso-test2.png";
var s_isoPng = "TileMaps/iso.png";
var s_orthoTest1BwPng = "TileMaps/ortho-test1_bw.png";
var s_orthoTest1Png = "TileMaps/ortho-test1.png";
var s_tilesHdPng = "TileMaps/tiles-hd.png";
var s_tmwDesertSpacingHdPng = "TileMaps/tmw_desert_spacing-hd.png";
var s_tmwDesertSpacingPng = "TileMaps/tmw_desert_spacing.png";
var s_fnTuffyBoldItalicCharmapPng = "fonts/tuffy_bold_italic-charmap.png";
var s_fpsImages = "fonts/fps_images.png";
var s_bitmapFontTest = "fonts/bitmapFontTest.png";
var s_bitmapFontTest2 = "fonts/bitmapFontTest2.png";
var s_bitmapFontTest3 = "fonts/bitmapFontTest3.png";
var s_bitmapFontTest4 = "fonts/bitmapFontTest4.png";
var s_bitmapFontTest5 = "fonts/bitmapFontTest5.png";
var s_konqa32 = "fonts/konqa32.png";
var s_konqa32_hd = "fonts/konqa32-hd.png";
var s_bitmapFontChinese = "fonts/bitmapFontChinese.png";
var s_arial16 = "fonts/arial16.png";
var s_larabie_16 = "fonts/larabie-16.png";
var s_larabie_16_hd = "fonts/larabie-16-hd.png";
var s_futura48 = "fonts/futura-48.png";
var s_arial_unicode_26 = "fonts/arial-unicode-26.png";
var s_bitmapFontTest_fnt = "fonts/bitmapFontTest.fnt";
var s_bitmapFontTest2_fnt = "fonts/bitmapFontTest2.fnt";
var s_bitmapFontTest3_fnt = "fonts/bitmapFontTest3.fnt";
var s_bitmapFontTest4_fnt = "fonts/bitmapFontTest4.fnt";
var s_bitmapFontTest5_fnt = "fonts/bitmapFontTest5.fnt";
var s_konqa32_fnt = "fonts/konqa32.fnt";
var s_konqa32_hd_fnt = "fonts/konqa32-hd.fnt";
var s_bitmapFontChinese_fnt = "fonts/bitmapFontChinese.fnt";
var s_arial16_fnt = "fonts/arial16.fnt";
var s_futura48_fnt = "fonts/futura-48.fnt";
var s_helvetica32_fnt = "fonts/helvetica-32.fnt";
var s_geneva32_fnt = "fonts/geneva-32.fnt";
var s_arial_unicode_26_fnt = "fonts/arial-unicode-26.fnt";
var s_markerFelt_fnt = "fonts/markerFelt.fnt";
var s_markerFelt_hd_fnt = "fonts/markerFelt-hd.fnt";
var s_larabie_16_plist = "fonts/larabie-16.plist";
var s_larabie_16_hd_plist = "fonts/larabie-16-hd.plist";
var s_tuffy_bold_italic_charmap = "fonts/tuffy_bold_italic-charmap.plist";
var s_tuffy_bold_italic_charmap_hd = "fonts/tuffy_bold_italic-charmap-hd.plist";
var s_particles = "Images/particles.png";
var s_particles_hd = "Images/particles-hd.png";
var g_ressources = [
//image ressources
{type:"image", src:s_particles},
{type:"image", src:s_particles_hd},
{type:"image", src:s_pathGrossini},
{type:"image", src:s_fnTuffyBoldItalicCharmapPng},
{type:"image", src:s_fpsImages},
{type:"image", src:s_pathSister1},
{type:"image", src:s_pathSister2},
{type:"image", src:s_pathB1},
{type:"image", src:s_pathB2},
{type:"image", src:s_pathR1},
{type:"image", src:s_pathR2},
{type:"image", src:s_pathF1},
{type:"image", src:s_pathF2},
{type:"image", src:s_pathBlock},
{type:"image", src:s_back},
{type:"image", src:s_back1},
{type:"image", src:s_back2},
{type:"image", src:s_back3},
{type:"image", src:s_stars1},
{type:"image", src:s_stars2},
{type:"image", src:s_fire},
{type:"image", src:s_snow},
{type:"image", src:s_playNormal},
{type:"image", src:s_playSelect},
{type:"image", src:s_aboutNormal},
{type:"image", src:s_aboutSelect},
{type:"image", src:s_highNormal},
{type:"image", src:s_highSelect},
{type:"image", src:s_ball},
{type:"image", src:s_paddle},
{type:"image", src:s_pathClose},
{type:"image", src:s_menuItem},
{type:"image", src:s_shapeModeMenuItem},
{type:"image", src:s_textureModeMenuItem},
{type:"image", src:s_MovementMenuItem},
{type:"image", src:s_sendScore},
{type:"image", src:s_pressSendScore},
{type:"image", src:s_power},
{type:"image", src:s_atlasTest},
{type:"image", src:s_tilesPng},
{type:"image", src:s_streak},
{type:"image", src:s_starsGrayscale},
{type:"image", src:s_stars2Grayscale},
{type:"image", src:s_piece},
{type:"image", src:s_grossini_dance_atlas_mono},
{type:"image", src:s_fixedOrthoTest2Png},
{type:"image", src:s_hexaTilesPng},
{type:"image", src:s_isoTestPng},
{type:"image", src:s_isoTest2Png},
{type:"image", src:s_isoPng},
{type:"image", src:s_orthoTest1BwPng},
{type:"image", src:s_orthoTest1Png},
{type:"image", src:s_tilesHdPng},
{type:"image", src:s_tmwDesertSpacingHdPng},
{type:"image", src:s_tmwDesertSpacingPng},
{type:"image", src:s_grossini},
{type:"image", src:s_grossini_gray},
{type:"image", src:s_grossini_blue},
{type:"image", src:s_grossini_dance_atlas},
{type:"image", src:s_grossini_aliases},
{type:"image", src:s_dragon_animation},
{type:"image", src:s_ghosts},
{type:"image", src:s_grossini_family},
{type:"image", src:s_helloWorld},
{type:"image", src:s_grossiniDance01},
{type:"image", src:s_grossiniDance02},
{type:"image", src:s_grossiniDance03},
{type:"image", src:s_grossiniDance04},
{type:"image", src:s_grossiniDance05},
{type:"image", src:s_grossiniDance06},
{type:"image", src:s_grossiniDance07},
{type:"image", src:s_grossiniDance08},
{type:"image", src:s_grossiniDance09},
{type:"image", src:s_grossiniDance10},
{type:"image", src:s_grossiniDance11},
{type:"image", src:s_grossiniDance12},
{type:"image", src:s_grossiniDance13},
{type:"image", src:s_grossiniDance14},
{type:"image", src:s_bitmapFontTest},
{type:"image", src:s_bitmapFontTest2},
{type:"image", src:s_bitmapFontTest3},
{type:"image", src:s_bitmapFontTest4},
{type:"image", src:s_bitmapFontTest5},
{type:"image", src:s_konqa32},
{type:"image", src:s_konqa32_hd},
{type:"image", src:s_bitmapFontChinese},
{type:"image", src:s_arial16},
{type:"image", src:s_larabie_16},
{type:"image", src:s_larabie_16_hd},
{type:"image", src:s_futura48},
{type:"image", src:s_arial_unicode_26},
{type:"image", src:s_arrows},
{type:"image", src:s_arrowsBar},
{type:"image", src:s_arrows_hd},
{type:"image", src:s_arrowsBar_hd},
{type:"plist", src:s_boilingFoamPlist},
{type:"plist", src:s_animations2Plist},
{type:"plist", src:s_animationsPlist},
{type:"plist", src:s_grossiniPlist},
{type:"plist", src:s_grossini_grayPlist},
{type:"plist", src:s_grossini_bluePlist},
{type:"plist", src:s_grossini_aliasesPlist},
{type:"plist", src:s_ghostsPlist},
{type:"plist", src:s_grossini_familyPlist},
{type:"plist", src:s_larabie_16_plist},
{type:"plist", src:s_larabie_16_hd_plist},
{type:"plist", src:s_tuffy_bold_italic_charmap},
{type:"plist", src:s_tuffy_bold_italic_charmap_hd},
//tmx ressources
{type:"tmx", src:"TileMaps/orthogonal-test1.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test1.tsx"},
{type:"tmx", src:"TileMaps/orthogonal-test2.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test3.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test4.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test4-hd.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test5.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test6.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test6-hd.tmx"},
{type:"tmx", src:"TileMaps/hexa-test.tmx"},
{type:"tmx", src:"TileMaps/iso-test.tmx"},
{type:"tmx", src:"TileMaps/iso-test1.tmx"},
{type:"tmx", src:"TileMaps/iso-test2.tmx"},
{type:"tmx", src:"TileMaps/iso-test2-uncompressed.tmx"},
{type:"tmx", src:"TileMaps/ortho-objects.tmx"},
{type:"tmx", src:"TileMaps/iso-test-objectgroup.tmx"},
{type:"tmx", src:"TileMaps/iso-test-zorder.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test-zorder.tmx"},
{type:"tmx", src:"TileMaps/iso-test-vertexz.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test-vertexz.tmx"},
{type:"tmx", src:"TileMaps/iso-test-movelayer.tmx"},
{type:"tmx", src:"TileMaps/orthogonal-test-movelayer.tmx"},
{type:"tmx", src:"TileMaps/iso-test-bug787.tmx"},
{type:"tmx", src:"TileMaps/test-object-layer.tmx"},
{type:"tmx", src:"TileMaps/ortho-tile-property.tmx"},
{type:"tmx", src:"TileMaps/ortho-rotation-test.tmx"},
//audio ressources
{type:"bgm", src:"background"},
{type:"effect", src:"effect2"},
//tga ressources
{type:"tga", src:s_levelMapTga},
//fnt ressources
{type:"fnt", src:s_bitmapFontTest_fnt},
{type:"fnt", src:s_bitmapFontTest2_fnt},
{type:"fnt", src:s_bitmapFontTest3_fnt},
{type:"fnt", src:s_bitmapFontTest4_fnt},
{type:"fnt", src:s_bitmapFontTest5_fnt},
{type:"fnt", src:s_konqa32_fnt},
{type:"fnt", src:s_konqa32_hd_fnt},
{type:"fnt", src:s_bitmapFontChinese_fnt},
{type:"fnt", src:s_arial16_fnt},
{type:"fnt", src:s_futura48_fnt},
{type:"fnt", src:s_helvetica32_fnt},
{type:"fnt", src:s_geneva32_fnt},
{type:"fnt", src:s_arial_unicode_26_fnt},
{type:"fnt", src:s_markerFelt_fnt},
{type:"fnt", src:s_markerFelt_hd_fnt},
{type:"plist", src:"fonts/strings.xml"},
{type:"plist", src:"Particles/BoilingFoam.plist"},
{type:"plist", src:"Particles/BurstPipe.plist"},
{type:"plist", src:"Particles/Comet.plist"},
{type:"plist", src:"Particles/debian.plist"},
{type:"plist", src:"Particles/ExplodingRing.plist"},
{type:"plist", src:"Particles/Flower.plist"},
{type:"plist", src:"Particles/Galaxy.plist"},
{type:"plist", src:"Particles/LavaFlow.plist"},
{type:"plist", src:"Particles/Phoenix.plist"},
{type:"plist", src:"Particles/SmallSun.plist"},
{type:"plist", src:"Particles/SpinningPeas.plist"},
{type:"plist", src:"Particles/Spiral.plist"},
{type:"plist", src:"Particles/SpookyPeas.plist"},
{type:"plist", src:"Particles/TestPremultipliedAlpha.plist"},
{type:"plist", src:"Particles/Upsidedown.plist"}
];

View File

@ -0,0 +1,330 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
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.
****************************************************************************/
var TestScene = cc.Scene.extend({
ctor:function (bPortrait) {
//this._super();
var parent = new cc.Scene();
__associateObjWithNative(this, parent);
this.init();
},
onEnter:function () {
//this._super();
var label = cc.LabelTTF.create("MainMenu", "Arial", 20);
var menuItem = cc.MenuItemLabel.create(label, this, this.MainMenuCallback);
var menu = cc.Menu.create(menuItem);
var s = cc.Director.getInstance().getWinSize();
menu.setPosition(cc.POINT_ZERO);
menuItem.setPosition(cc.p(s.width - 50, 25));
this.addChild(menu, 1);
},
runThisTest:function () {
},
MainMenuCallback:function () {
require("js/main.js");
/*
var scene = cc.Scene.create();
var layer = new TestController();
scene.addChild(layer);
cc.Director.getInstance().replaceScene(scene);
*/
}
});
//Controller stuff
var LINE_SPACE = 40;
var s_pathClose = null;
var curPos = cc.POINT_ZERO;
var TestController = cc.Layer.extend({
_itemMenu:null,
_beginPos:cc.POINT_ZERO,
isMouseDown:false,
ctor:function () {
var parent = new cc.Layer();
__associateObjWithNative(this, parent);
this.init();
// add close menu
if (!s_pathClose) {
s_pathClose = cc.TextureCache.getInstance().textureForKey("CloseNormal.png");
}
var closeItem = cc.MenuItemImage.create(s_pathClose, s_pathClose, this, this.closeCallback);
var menu = cc.Menu.create(closeItem);//pmenu is just a holder for the close button
var s = cc.Director.getInstance().getWinSize();
menu.setPosition(cc.POINT_ZERO);
closeItem.setPosition(cc.p(s.width - 30, s.height - 30));
// add menu items for tests
this._itemMenu = cc.Menu.create();//item menu is where all the label goes, and the one gets scrolled
for (var i = 0, len = testNames.length; i < len; i++) {
var label = cc.LabelTTF.create(testNames[i].title, "Arial", 24);
var menuItem = cc.MenuItemLabel.create(label, this, this.menuCallback);
this._itemMenu.addChild(menuItem, i + 10000);
menuItem.setPosition(cc.p(s.width / 2, (s.height - (i + 1) * LINE_SPACE)));
}
this._itemMenu.setContentSize(cc.size(s.width, (testNames.length + 1) * LINE_SPACE));
this._itemMenu.setPosition(curPos);
this.setTouchEnabled(true);
this.addChild(this._itemMenu);
this.addChild(menu, 1);
},
menuCallback:function (sender) {
var idx = sender.getZOrder() - 10000;
// get the userdata, it's the index of the menu item clicked
// create the test scene and run it
var scene = testNames[idx].testScene();
if (scene) {
scene.runThisTest();
}
},
closeCallback:function () {
history.go(-1);
},
onTouchesBegan:function (touches, event) {
if (!this.isMouseDown) {
//this._beginPos = cc.p(touches[0].getLocation().x, touches[0].getLocation().y);
this._beginPos = touches[0].getLocation().y;
}
this.isMouseDown = true;
},
onTouchesMoved:function (touches, event) {
if (this.isMouseDown) {
var touchLocation = touches[0].getLocation().y;
var nMoveY = touchLocation - this._beginPos;
curPos = cc.p(this._itemMenu.getPosition().x, this._itemMenu.getPosition().y);
var nextPos = cc.p(curPos.x, curPos.y + nMoveY);
var winSize = cc.Director.getInstance().getWinSize();
if (nextPos.y < 0.0) {
this._itemMenu.setPosition(cc.POINT_ZERO);
return;
}
if (nextPos.y > ((testNames.length + 1) * LINE_SPACE - winSize.height)) {
this._itemMenu.setPosition(cc.p(0, ((testNames.length + 1) * LINE_SPACE - winSize.height)));
return;
}
this._itemMenu.setPosition(nextPos);
this._beginPos = cc.p(0, touchLocation).y;
curPos = nextPos;
}
},
onTouchesEnded:function () {
this.isMouseDown = false;
}
});
var testNames = [
//"Accelerometer",
{
title:"ActionManagerTest",
testScene:function () {
return new ActionManagerTestScene();
}
},
{
title:"ActionsTest",
testScene:function () {
return new ActionsTestScene();
}
},
{
title:"Box2DTest",
testScene:function () {
return new Box2DTestScene();
}
},
//"Box2dTestBed",
//"BugsTest",
//"ChipmunkTest",
{
title:"ClickAndMoveTest",
testScene:function () {
return new ClickAndMoveTestScene();
}
},
{
title:"CocosDenshionTest",
testScene:function () {
return new CocosDenshionTestScene();
}
},
{
title:"CocosNodeTest",
testScene:function () {
return new CocosNodeTestScene();
}
},
{
title:"CurrentLanguageTest",
testScene:function () {
return new CurrentLanguageTestScene();
}
},
//"CurlTest",
{
title:"DrawPrimitivesTest",
testScene:function () {
return new DrawPrimitivesTestScene();
}
},
{
title:"EaseActionsTest",
testScene:function () {
return new EaseActionsTestScene();
}
},
//"EffectsTest",
//"EffectAdvancedTest",
//"ExtensionsTest",
{
title:"FontTest",
testScene:function () {
return new FontTestScene();
}
},
//"HiResTest",
{
title:"IntervalTest",
testScene:function () {
return new IntervalTestScene();
}
},
//"KeyboardTest",
{
title:"LabelTest",
testScene:function () {
return new LabelTestScene();
}
},
{
title:"LayerTest",
testScene:function () {
return new LayerTestScene();
}
},
{
title:"MenuTest",
testScene:function () {
return new MenuTestScene();
}
},
{
title:"MultiTouchTest",
testScene:function () {
return new MultiTouchTestScene();
}
},
//"MotionStreakTest",
{
title:"ParallaxTest",
testScene:function () {
return new ParallaxTestScene();
}
},
{
title:"ParticleTest",
testScene:function () {
return new ParticleTestScene();
}
},
{
title:"PerformanceTest",
testScene:function () {
return new PerformanceTestScene();
}
},
{
title:"ProgressActionsTest",
testScene:function () {
return new ProgressActionsTestScene();
}
},
//"RenderTextureTest",
{
title:"RotateWorldTest",
testScene:function () {
return new RotateWorldTestScene();
}
},
{
title:"SceneTest",
testScene:function () {
return new SceneTestScene();
}
},
{
title:"SchedulerTest",
testScene:function () {
return new SchedulerTestScene();
}
},
{
title:"SpriteTest",
testScene:function () {
return new SpriteTestScene();
}
},
{
title:"TextInputTest",
testScene:function () {
return new TextInputTestScene();
}
},
//"Texture2DTest",
{
title:"TextureCacheTest",
testScene:function () {
return new TextureCacheTestScene();
}
},
{
title:"TileMapTest",
testScene:function () {
return new TileMapTestScene();
}
},
{
title:"TouchesTest",
testScene:function () {
return new TouchesTestScene();
}
},
{
title:"TransitionsTest",
testScene:function () {
return new TransitionsTestScene();
}
}
//"UserDefaultTest",
//"ZwoptexTest",
];

View File

@ -127,22 +127,43 @@ cc._g = function( x, y )
//
// Color
//
cc._c3 = function( r, g, b )
//
// Color 3B
//
cc.c3b = function( r, g, b )
{
cc._reuse_color3b[0] = r;
cc._reuse_color3b[1] = g;
cc._reuse_color3b[2] = 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;
cc._c4 = function( r, g, b, a )
//
// Color 4B
//
cc.c4b = function( r, g, b, a )
{
cc._reuse_color4b[0] = r;
cc._reuse_color4b[1] = g;
cc._reuse_color4b[2] = b;
cc._reuse_color4b[3] = 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
@ -204,6 +225,54 @@ 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));
};
/**
* returns a random float between 0 and 1
* @return {Number}
* @function
*/
cc.RANDOM_0_1 = function () {
return Math.random();
};
//
// Array: for cocos2d-hmtl5 compatibility
//
@ -329,6 +398,7 @@ cc.Class.extend = function (prop) {
};
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;

View File

@ -151,7 +151,7 @@ MainTest = BaseLayer.extend({
var item12 = cc.MenuItemFont.create("Tilemap Tests", this, function() { require("js/test-tilemap.js"); } );
var item13 = cc.MenuItemFont.create("CocosDenshion Tests", this, function() { require("js/test-cocosdenshion.js"); } );
var item14 = cc.MenuItemFont.create("cocos2d presentation", this, function() { require("js/test-cocos2djs.js"); } );
var item14 = cc.MenuItemFont.create("Performance test", this, function() { require("js/test-performance.js"); } );
var item14 = cc.MenuItemFont.create("Performance test", this, function() { require("js/PerformanceTest/PerformanceTest.js"); } );
this._menu = cc.Menu.create( item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14 );

View File

@ -51,7 +51,9 @@ var loadScene = function (sceneIdx)
// scene.walkSceneGraph(0);
director.replaceScene( scene );
}
__jsc__.dumpRoot();
__jsc__.garbageCollect();
}
//
@ -162,9 +164,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -179,9 +181,9 @@ var BaseLayer = cc.LayerGradient.extend({
this.addChild(menu, 1);
// Setup Sprites for this:w
this._grossini = cc.Sprite.create("grossini.png");
this._tamara = cc.Sprite.create("grossinis_sister1.png");
this._kathia = cc.Sprite.create("grossinis_sister2.png");
this._grossini = cc.Sprite.create("Images/grossini.png");
this._tamara = cc.Sprite.create("Images/grossinis_sister1.png");
this._kathia = cc.Sprite.create("Images/grossinis_sister2.png");
this.addChild(this._grossini, 1);
this.addChild(this._tamara, 2);
this.addChild(this._kathia, 3);
@ -579,7 +581,7 @@ var ActionAnimate = BaseLayer.extend({
//
var animation = cc.Animation.create();
for (var i = 1; i < 15; i++) {
var frameName = "grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png";
var frameName = "Images/grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png";
animation.addSpriteFrameWithFilename(frameName);
}
animation.setDelayPerUnit(2.8 / 14);
@ -1295,7 +1297,7 @@ var Issue1305 = BaseLayer.extend({
this._super();
this.centerSprites(0);
this._spriteTmp = cc.Sprite.create("grossini.png");
this._spriteTmp = cc.Sprite.create("Images/grossini.png");
/* c++ can't support block, so we use CCCallFuncN instead.
[spriteTmp_ runAction:[CCCallBlockN actionWithBlock:^(CCNode* node) {
NSLog(@"This message SHALL ONLY appear when the sprite is added to the scene, NOT BEFORE");
@ -1335,7 +1337,7 @@ var Issue1305_2 = BaseLayer.extend({
this._super();
this.centerSprites(0);
var spr = cc.Sprite.create("grossini.png");
var spr = cc.Sprite.create("Images/grossini.png");
spr.setPosition(cc.p(200,200));
this.addChild(spr);
@ -1379,7 +1381,7 @@ var Issue1288 = BaseLayer.extend({
this._super();
this.centerSprites(0);
var spr = cc.Sprite.create("grossini.png");
var spr = cc.Sprite.create("Images/grossini.png");
spr.setPosition(cc.p(100, 100));
this.addChild(spr);
@ -1403,7 +1405,7 @@ var Issue1288_2 = BaseLayer.extend({
this._super();
this.centerSprites(0);
var spr = cc.Sprite.create("grossini.png");
var spr = cc.Sprite.create("Images/grossini.png");
spr.setPosition(cc.p(100, 100));
this.addChild(spr);
@ -1423,7 +1425,7 @@ var Issue1327 = BaseLayer.extend({
this._super();
this.centerSprites(0);
var spr = cc.Sprite.create("grossini.png");
var spr = cc.Sprite.create("Images/grossini.png");
spr.setPosition(cc.p(100, 100));
this.addChild(spr);

View File

@ -55,9 +55,9 @@ var loadScene = function (sceneIdx)
// __jsc__.garbageCollect();
}
var s_pathSister1 = "grossinis_sister1.png";
var s_pathSister2 = "grossinis_sister2.png";
var s_pathBlock = "blocks.png";
var s_pathSister1 = "Images/grossinis_sister1.png";
var s_pathSister2 = "Images/grossinis_sister2.png";
var s_pathBlock = "Images/blocks.png";
var s_grossiniPlist = "animations/grossini.plist";
//
@ -126,9 +126,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );

View File

@ -93,9 +93,9 @@ BaseLayer.prototype.onEnter = function() {
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -188,7 +188,7 @@ ChipmunkSpriteTest.prototype.createPhysicsSprite = function( pos ) {
cp.shapeSetFriction( shape, 0.5 );
cp.spaceAddShape( this.space, shape );
var sprite = cc.PhysicsSprite.create("grossini.png");
var sprite = cc.PhysicsSprite.create("Images/grossini.png");
sprite.setBody( body );
return sprite;
}
@ -235,7 +235,7 @@ var ChipmunkSpriteBatchTest = function() {
goog.base(this);
// batch node
this.batch = cc.SpriteBatchNode.create('grossini.png', 50 );
this.batch = cc.SpriteBatchNode.create('Images/grossini.png', 50 );
this.addChild( this.batch );
this.addSprite = function( pos ) {
@ -315,8 +315,8 @@ var ChipmunkCollisionTest = function() {
this.initPhysics();
this.scheduleUpdate();
var sprite1 = this.createPhysicsSprite( cc.p(winSize.width/2, winSize.height-20), "grossini.png", 1);
var sprite2 = this.createPhysicsSprite( cc.p(winSize.width/2, 50), "grossinis_sister1.png", 2);
var sprite1 = this.createPhysicsSprite( cc.p(winSize.width/2, winSize.height-20), "Images/grossini.png", 1);
var sprite2 = this.createPhysicsSprite( cc.p(winSize.width/2, 50), "Images/grossinis_sister1.png", 2);
this.addChild( sprite1 );
this.addChild( sprite2 );
@ -336,7 +336,7 @@ var ChipmunkCollisionTest = function() {
this.collisionBegin = function ( arbiter, space ) {
if( ! this.messageDisplayed ) {
var label = cc.LabelBMFont.create("Collision Detected", "bitmapFontTest5.fnt");
var label = cc.LabelBMFont.create("Collision Detected", "Fonts/bitmapFontTest5.fnt");
this.addChild( label );
label.setPosition( centerPos );
this.messageDisplayed = true;

View File

@ -126,9 +126,9 @@ var BaseLayer = cc.LayerGradient.extend({
this.addChild( labelbg,9);
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -144,9 +144,9 @@ var BaseLayer = cc.LayerGradient.extend({
this.addChild(menu, 1);
// Setup Sprites for this:w
this._grossini = cc.Sprite.create("grossini.png");
this._tamara = cc.Sprite.create("grossinis_sister1.png");
this._kathia = cc.Sprite.create("grossinis_sister2.png");
this._grossini = cc.Sprite.create("Images/grossini.png");
this._tamara = cc.Sprite.create("Images/grossinis_sister1.png");
this._kathia = cc.Sprite.create("Images/grossinis_sister2.png");
this.addChild(this._grossini, 1);
this.addChild(this._tamara, 2);
this.addChild(this._kathia, 3);

View File

@ -55,9 +55,9 @@ var loadScene = function (sceneIdx)
// __jsc__.garbageCollect();
}
var s_pathSister1 = "grossinis_sister1.png";
var s_pathSister2 = "grossinis_sister2.png";
var s_pathBlock = "blocks.png";
var s_pathSister1 = "Images/grossinis_sister1.png";
var s_pathSister2 = "Images/grossinis_sister2.png";
var s_pathBlock = "Images/blocks.png";
var s_grossiniPlist = "animations/grossini.plist";
//
@ -126,9 +126,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -149,15 +149,15 @@ var BaseLayer = cc.LayerGradient.extend({
node.runAction( this.getEffect(3) );
this.addChild( node );
var bg = cc.Sprite.create("background3.png");
var bg = cc.Sprite.create("Images/background3.png");
bg.setPosition( cc._p( winSize.width/2, winSize.height/2) );
node.addChild( bg );
var sister1 = cc.Sprite.create("grossinis_sister1.png");
var sister1 = cc.Sprite.create("Images/grossinis_sister1.png");
sister1.setPosition( cc._p( winSize.width/3, winSize.height/2 ) );
node.addChild( sister1, 1 );
var sister2 = cc.Sprite.create("grossinis_sister2.png");
var sister2 = cc.Sprite.create("Images/grossinis_sister2.png");
sister2.setPosition( cc._p( winSize.width*2/3, winSize.height/2 ) );
node.addChild( sister2, 1 );

View File

@ -93,11 +93,11 @@ BaseLayer.prototype.onEnter = function() {
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
cc.MenuItemFont.setFontSize( 22 );
var menu = cc.Menu.create(item1, item2, item3, item4 );
@ -136,12 +136,12 @@ var LabelAtlasTest = function(file) {
this.initialize = function() {
this.label1 = cc.LabelAtlas.create("123 Test", "tuffy_bold_italic-charmap.plist");
this.label1 = cc.LabelAtlas.create("123 Test", "Fonts/tuffy_bold_italic-charmap.plist");
this.addChild( this.label1 );
this.label1.setPosition( cc.p(10,100) );
this.label1.setOpacity( 200 );
this.label2 = cc.LabelAtlas.create( "0123456789", "tuffy_bold_italic-charmap.plist" );
this.label2 = cc.LabelAtlas.create( "0123456789", "Fonts/tuffy_bold_italic-charmap.plist" );
this.addChild( this.label2 );
this.label2.setPosition( cc.p(10,200) );
this.label2.setOpacity( 32 );
@ -185,19 +185,19 @@ var BMFontColorTest = function(file) {
this.initialize = function() {
var label = cc.LabelBMFont.create("Blue", "bitmapFontTest5.fnt");
var label = cc.LabelBMFont.create("Blue", "Fonts/bitmapFontTest5.fnt");
this.addChild( label );
label.setColor( cc.c3b(0,0,255) );
label.setPosition( cc.p( winSize.width/2, 1*winSize.height/4) );
label.setAnchorPoint( cc.p(0.5, 0.5) );
label = cc.LabelBMFont.create("Red", "bitmapFontTest5.fnt");
label = cc.LabelBMFont.create("Red", "Fonts/bitmapFontTest5.fnt");
this.addChild( label );
label.setColor( cc.c3b(255,0,0) );
label.setPosition( cc.p( winSize.width/2, 2*winSize.height/4) );
label.setAnchorPoint( cc.p(0.5, 0.5) );
label = cc.LabelBMFont.create("Red", "bitmapFontTest5.fnt");
label = cc.LabelBMFont.create("Red", "Fonts/bitmapFontTest5.fnt");
this.addChild( label );
label.setColor( cc.c3b(0,255,0) );
label.setPosition( cc.p( winSize.width/2, 3*winSize.height/4) );

View File

@ -122,9 +122,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -211,9 +211,9 @@ var MenuItemImageTest = BaseLayer.extend({
onEnter:function () {
this._super();
var item1 = cc.MenuItemImage.create("btn-play-normal.png", "btn-play-selected.png" );
var item2 = cc.MenuItemImage.create("btn-highscores-normal.png", "btn-highscores-selected.png", this, this.item_cb );
var item3 = cc.MenuItemImage.create("btn-about-normal.png", "btn-about-selected.png", this, this.item_cb );
var item1 = cc.MenuItemImage.create("Images/btn-play-normal.png", "Images/btn-play-selected.png" );
var item2 = cc.MenuItemImage.create("Images/btn-highscores-normal.png", "Images/btn-highscores-selected.png", this, this.item_cb );
var item3 = cc.MenuItemImage.create("Images/btn-about-normal.png", "Images/btn-about-selected.png", this, this.item_cb );
// callback function can be modified in runtime
item1.setCallback( this, this.item_cb );
@ -237,7 +237,7 @@ var MenuItemImageTest = BaseLayer.extend({
return "3 items. 3rd should be disabled.";
},
code:function () {
return "item = cc.MenuItemImage.create('normal.png', 'selected.png' , 'disabled.png', this, this.cb )";
return "item = cc.MenuItemImage.create('Images/normal.png', 'Images/selected.png' , 'Images/disabled.png', this, this.cb )";
},
// callback
@ -269,14 +269,14 @@ var MenuItemSpriteTest = BaseLayer.extend({
// Sprites can't be reused since they are children of MenuItem
// If you want to reuse them, use "MenuItemImage" instead
var sprite1_1 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_1 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite1_2 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_2 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite3_2 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*0, 115, 23) );
var sprite1_3 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_3 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite3_3 = cc.Sprite.create("menuitemsprite.png", cc.rect(0, 23*0, 115, 23) );
var sprite1_1 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_1 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite1_2 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_2 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite3_2 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*0, 115, 23) );
var sprite1_3 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*2, 115, 23) );
var sprite2_3 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*1, 115, 23) );
var sprite3_3 = cc.Sprite.create("Images/menuitemsprite.png", cc.rect(0, 23*0, 115, 23) );
var item1 = cc.MenuItemSprite.create(sprite1_1, sprite2_1);
var item2 = cc.MenuItemSprite.create(sprite1_2, sprite2_2, sprite3_2, this, this.item_cb);
@ -335,7 +335,7 @@ var MenuItemLabelTest = BaseLayer.extend({
this._super();
var label1 = cc.LabelTTF.create("This is a LabelTTF item", "Arial", 24 );
var label2 = cc.LabelBMFont.create("And this is a LabelBMFont item", "futura-48.fnt" );
var label2 = cc.LabelBMFont.create("And this is a LabelBMFont item", "Fonts/futura-48.fnt" );
var label3 = cc.LabelTTF.create("Disabled Item", "Arial", 24 );
var item1 = cc.MenuItemLabel.create(label1);
@ -393,9 +393,9 @@ var MenuItemToggleTest = BaseLayer.extend({
onEnter:function () {
this._super();
var label1 = cc.LabelBMFont.create("Volume Off", "futura-48.fnt" );
var label1 = cc.LabelBMFont.create("Volume Off", "Fonts/futura-48.fnt" );
var item1 = cc.MenuItemLabel.create(label1);
var label2 = cc.LabelBMFont.create("Volume On", "futura-48.fnt" );
var label2 = cc.LabelBMFont.create("Volume On", "Fonts/futura-48.fnt" );
var item2 = cc.MenuItemLabel.create(label2);
var itema = cc.MenuItemFont.create("Sound Off");

View File

@ -123,9 +123,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -158,7 +158,7 @@ ParallaxTest1 = BaseLayer.extend({
this._super();
// Top Layer, a simple image
var cocosImage = cc.Sprite.create("powered.png");
var cocosImage = cc.Sprite.create("Images/powered.png");
// scale the image (optional)
cocosImage.setScale(1.5);
// change the transform anchor point to 0,0 (optional)
@ -175,7 +175,7 @@ ParallaxTest1 = BaseLayer.extend({
tilemap.getTexture().setAntiAliasTexParameters();
// background layer: another image
var background = cc.Sprite.create("background.png");
var background = cc.Sprite.create("Images/background.png");
// scale the image (optional)
background.setScale(1.5);
// change the transform anchor point (optional)
@ -236,7 +236,7 @@ ParallaxTest2 = BaseLayer.extend({
this.setTouchEnabled( true );
// Top Layer, a simple image
var cocosImage = cc.Sprite.create("powered.png");
var cocosImage = cc.Sprite.create("Images/powered.png");
// scale the image (optional)
cocosImage.setScale(1.5);
// change the transform anchor point to 0,0 (optional)
@ -254,7 +254,7 @@ ParallaxTest2 = BaseLayer.extend({
// background layer: another image
var background = cc.Sprite.create("background.png");
var background = cc.Sprite.create("Images/background.png");
// scale the image (optional)
background.setScale(1.5);
// change the transform anchor point (optional)

View File

@ -60,12 +60,12 @@ var loadScene = function (sceneIdx)
//
var TAG_LABEL_ATLAS = 100;
var s_stars1 = 'stars.png';
var s_stars2 = 'stars2.png';
var s_starsGrayscale = 'stars-grayscale.png';
var s_fire = 'fire.png';
var s_smoke = 'smoke.png';
var s_snow = 'snow.png';
var s_stars1 = 'Images/stars.png';
var s_stars2 = 'Images/stars2.png';
var s_starsGrayscale = 'Images/stars-grayscale.png';
var s_fire = 'Images/fire.png';
var s_smoke = 'Images/smoke.png';
var s_snow = 'Images/snow.png';
//
// Base Layer
@ -113,11 +113,11 @@ var BaseLayer = cc.LayerGradient.extend({
this.addChild(menu, 1);
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
cc.MenuItemFont.setFontSize( 22 );
var menu = cc.Menu.create(item1, item2, item3, item4 );
@ -127,16 +127,16 @@ var BaseLayer = cc.LayerGradient.extend({
item3.setPosition( cc.p(winSize.width / 2 + 100, 30));
item4.setPosition( cc.p(winSize.width - 60, winSize.height - 30 ) );
this.addChild(menu, 1);
this.addChild(menu, 10);
//TODO
var labelAtlas = cc.LabelAtlas.create("0000", "fps_images.plist");
var labelAtlas = cc.LabelAtlas.create("0000", "Fonts/fps_images.plist");
this.addChild(labelAtlas, 100, TAG_LABEL_ATLAS);
labelAtlas.setPosition( cc.p( winSize.width - 66, 50));
// moving background
this._background = cc.Sprite.create("background3.png");
this._background = cc.Sprite.create("Images/background3.png");
this.addChild(this._background, 5);
this._background.setPosition(cc.p(winSize.width / 2, winSize.height - 180));
@ -161,7 +161,7 @@ var BaseLayer = cc.LayerGradient.extend({
onEnter:function () {
// don't call super_.this()
var pLabel = this.getChildByTag(1000);
pLabel.setString(this.title());
//cjh pLabel.setString(this.title());
},
title:function () {
return "No title";
@ -202,7 +202,9 @@ var BaseLayer = cc.LayerGradient.extend({
var pos = cc.p( 0, 0 );
if (this._background)
pos = this._background.convertToWorldSpace( cc.p(0,0) );
if (this._emitter) {
this._emitter.setPosition(cc.pSub(location, pos));
}
},
onMouseDown : function( event ) {
@ -698,8 +700,8 @@ var ParallaxParticle = BaseLayer.extend({
var p = cc.ParallaxNode.create();
this.addChild(p, 5);
var p1 = cc.Sprite.create("background3.png");
var p2 = cc.Sprite.create("background3.png");
var p1 = cc.Sprite.create("Images/background3.png");
var p2 = cc.Sprite.create("Images/background3.png");
p.addChild(p1, 1, cc.p(0.5, 1), cc.p(0, 250));
p.addChild(p2, 2, cc.p(1.5, 1), cc.p(0, 50));
@ -1066,7 +1068,7 @@ var Issue870 = BaseLayer.extend({
this._background = null;
var system = cc.ParticleSystem.create( "Particles/SpinningPeas.plist" );
system.setTextureWithRect(cc.TextureCache.getInstance().addImage("particles.png"), cc.rect(0, 0, 32, 32));
system.setTextureWithRect(cc.TextureCache.getInstance().addImage("Images/particles.png"), cc.rect(0, 0, 32, 32));
this.addChild(system, 10);
this._emitter = system;

View File

@ -55,9 +55,9 @@ var loadScene = function (sceneIdx)
// __jsc__.garbageCollect();
}
var s_pathSister1 = "grossinis_sister1.png";
var s_pathSister2 = "grossinis_sister2.png";
var s_pathBlock = "blocks.png";
var s_pathSister1 = "Images/grossinis_sister1.png";
var s_pathSister2 = "Images/grossinis_sister2.png";
var s_pathBlock = "Images/blocks.png";
var s_grossiniPlist = "animations/grossini.plist";
//
@ -126,9 +126,9 @@ var BaseLayer = cc.LayerGradient.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
@ -164,7 +164,7 @@ var RenderTextureSave = BaseLayer.extend({
else if( platform.substring(0,6) == 'mobile' )
this.setTouchEnabled( true );
this._brush = cc.Sprite.create("fire.png");
this._brush = cc.Sprite.create("Images/fire.png");
this._brush.retain();
this._brush.setColor( cc.RED );

View File

@ -93,11 +93,11 @@ BaseLayer.prototype.onEnter = function() {
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
cc.MenuItemFont.setFontSize( 22 );
var menu = cc.Menu.create(item1, item2, item3, item4 );
@ -178,7 +178,7 @@ SpriteTouchTest.prototype.createSprite = function( pos ) {
var x = Math.floor(idx%5) * 85;
var y = Math.floor(idx/5) * 121;
var sprite = cc.Sprite.create("grossini_dance_atlas.png", cc.rect(x,y,85,121) );
var sprite = cc.Sprite.create("Images/grossini_dance_atlas.png", cc.rect(x,y,85,121) );
sprite.setPosition( pos );
var rand = Math.random();
@ -213,7 +213,7 @@ var SpriteBatchTouchTest = function() {
goog.base(this);
this.initialize = function() {
this.batch = cc.SpriteBatchNode.create("grossini_dance_atlas.png", 50 );
this.batch = cc.SpriteBatchNode.create("Images/grossini_dance_atlas.png", 50 );
this.addChild( this.batch );
var platform = __getPlatform();
@ -290,7 +290,7 @@ var SpriteFrameTest = function() {
frames.push( frame );
}
var animation = cc.Animation.create( frames, 0.3 );
var animation = cc.Animation.createWithSpriteFrames( frames, 0.3 );
// 14 frames * 1sec = 14 seconds
sprite1.runAction( cc.RepeatForever.create( cc.Animate.create( animation ) ) );
@ -321,7 +321,7 @@ var SpriteFrameTest = function() {
moreFrames.concat( frames );
var animMixed = cc.Animation.create( moreFrames, 0.3 );
var animMixed = cc.Animation.createWithSpriteFrames( moreFrames, 0.3 );
// 32 frames * 1 seconds = 32 seconds
sprite2.runAction( cc.RepeatForever.create( cc.Animate.create( animMixed ) ) );
@ -354,10 +354,10 @@ var SpriteAnchorPoint = function() {
this.initialize = function() {
for(var i=0;i<3;i++) {
var sprite = cc.Sprite.create("grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
var sprite = cc.Sprite.create("Images/grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
sprite.setPosition( cc.p( winSize.width/4*(i+1), winSize.height/2) );
var point = cc.Sprite.create( "r1.png" );
var point = cc.Sprite.create( "Images/r1.png" );
point.setScale( 0.25 );
point.setPosition( sprite.getPosition() );
this.addChild( point, 10 );
@ -402,12 +402,12 @@ var SpriteBatchAnchorPoint = function() {
goog.base(this);
this.initialize = function() {
var batch = cc.SpriteBatchNode.create( "grossini_dance_atlas.png" );
var batch = cc.SpriteBatchNode.create( "Images/grossini_dance_atlas.png" );
for(var i=0;i<3;i++) {
var sprite = cc.Sprite.create("grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
var sprite = cc.Sprite.create("Images/grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
sprite.setPosition( cc.p( winSize.width/4*(i+1), winSize.height/2) );
var point = cc.Sprite.create( "r1.png" );
var point = cc.Sprite.create( "Images/r1.png" );
point.setScale( 0.25 );
point.setPosition( sprite.getPosition() );
this.addChild( point, 10 );
@ -458,10 +458,10 @@ var SpriteOffsetAnchorFlip = function() {
cache.addSpriteFrames("animations/grossini_gray.plist", "animations/grossini_gray.png");
for(var i=0;i<3;i++) {
var sprite = cc.Sprite.create("grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
var sprite = cc.Sprite.create("Images/grossini_dance_atlas.png", cc.rect(85*i, 121*1, 85, 121) );
sprite.setPosition( cc.p( winSize.width/4*(i+1), winSize.height/2) );
var point = cc.Sprite.create( "r1.png" );
var point = cc.Sprite.create( "Images/r1.png" );
point.setScale( 0.25 );
point.setPosition( sprite.getPosition() );
this.addChild( point, 10 );
@ -489,7 +489,7 @@ var SpriteOffsetAnchorFlip = function() {
frames.push( frame );
}
var animation = cc.Animation.create( frames, 0.3 );
var animation = cc.Animation.createWithSpriteFrames( frames, 0.3 );
sprite.runAction( cc.RepeatForever.create( cc.Animate.create( animation ) ) );
var flip = cc.FlipY.create( true );
@ -535,7 +535,7 @@ var SpriteBatchOffsetAnchorFlip = function() {
var sprite = cc.Sprite.createWithSpriteFrameName("grossini_dance_01.png");
sprite.setPosition( cc.p( winSize.width/4*(i+1), winSize.height/2) );
var point = cc.Sprite.create( "r1.png" );
var point = cc.Sprite.create( "Images/r1.png" );
point.setScale( 0.25 );
point.setPosition( sprite.getPosition() );
this.addChild( point, 10 );
@ -563,7 +563,7 @@ var SpriteBatchOffsetAnchorFlip = function() {
frames.push( frame );
}
var animation = cc.Animation.create( frames, 0.3 );
var animation = cc.Animation.createWithSpriteFrames( frames, 0.3 );
sprite.runAction( cc.RepeatForever.create( cc.Animate.create( animation ) ) );
var flip = cc.FlipY.create( true );
@ -601,14 +601,14 @@ var SpriteColorOpacity = function() {
goog.base(this);
this.initialize = function() {
var sprite1 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite2 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite3 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite4 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var sprite5 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite6 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite7 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite8 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var sprite1 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite2 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite3 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite4 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var sprite5 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite6 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite7 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite8 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
sprite1.setPosition(cc.p((winSize.width / 5) * 1, (winSize.height / 3) * 1));
sprite2.setPosition(cc.p((winSize.width / 5) * 2, (winSize.height / 3) * 1));
@ -677,15 +677,15 @@ var SpriteBatchColorOpacity = function() {
goog.base(this);
this.initialize = function() {
var batch = cc.SpriteBatchNode.create('grossini_dance_atlas.png', 10);
var sprite1 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite2 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite3 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite4 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var sprite5 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite6 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite7 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite8 = cc.Sprite.create('grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var batch = cc.SpriteBatchNode.create('Images/grossini_dance_atlas.png', 10);
var sprite1 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite2 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite3 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite4 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
var sprite5 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 0, 121 * 1, 85, 121));
var sprite6 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 1, 121 * 1, 85, 121));
var sprite7 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 2, 121 * 1, 85, 121));
var sprite8 = cc.Sprite.create('Images/grossini_dance_atlas.png', cc.rect(85 * 3, 121 * 1, 85, 121));
sprite1.setPosition(cc.p((winSize.width / 5) * 1, (winSize.height / 3) * 1));
sprite2.setPosition(cc.p((winSize.width / 5) * 2, (winSize.height / 3) * 1));

View File

@ -133,11 +133,11 @@ var BaseLayer = cc.Layer.extend({
}
// Menu
var item1 = cc.MenuItemImage.create("b1.png", "b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("r1.png", "r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("f1.png", "f2.png", this, this.nextCallback);
var item1 = cc.MenuItemImage.create("Images/b1.png", "Images/b2.png", this, this.backCallback);
var item2 = cc.MenuItemImage.create("Images/r1.png", "Images/r2.png", this, this.restartCallback);
var item3 = cc.MenuItemImage.create("Images/f1.png", "Images/f2.png", this, this.nextCallback);
var item4 = cc.MenuItemFont.create("back", this, function() { require("js/main.js"); } );
item4.setFontSize( 22 );
cc.MenuItemFont.setFontSize( 22 );
var menu = cc.Menu.create(item1, item2, item3, item4 );
@ -815,7 +815,7 @@ var TMXIsoZorder = BaseLayer.extend({
var s = map.getContentSize();
map.setPosition(cc.p(-s.width / 2, 0));
this.tamara = cc.Sprite.create("grossinis_sister1.png");
this.tamara = cc.Sprite.create("Images/grossinis_sister1.png");
map.addChild(this.tamara, map.getChildren().length);
// move map to the center of the screen
@ -875,7 +875,7 @@ var TMXOrthoZorder = BaseLayer.extend({
var s = map.getContentSize();
this.tamara = cc.Sprite.create("grossinis_sister1.png");
this.tamara = cc.Sprite.create("Images/grossinis_sister1.png");
map.addChild(this.tamara, map.getChildren().length, TAG_TILE_MAP);
this.tamara.setAnchorPoint(cc.p(0.5, 0));

View File

@ -53,6 +53,7 @@ fi
mkdir "$APP_ANDROID_ROOT"/assets
# copy resources
for file in "$APP_ROOT"/Resources/*
do
@ -60,38 +61,38 @@ if [ -d "$file" ]; then
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
fi
if [ -f "$file" ]; then
cp "$file" "$APP_ANDROID_ROOT"/assets
fi
done
# extra magic to deal with Images and Fonts for android
for file in "$APP_ROOT"/Resources/Images/*
do
if [ -d "$file" ]; then
for file in "$APP_ANDROID_ROOT"/assets/Images/*; 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
for file in "$APP_ROOT"/Resources/Fonts/*
do
if [ -d "$file" ]; then
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
for file in "$APP_ANDROID_ROOT"/assets/Fonts/*; do
if [ -d "$file" ];then
cp -f "$file" "$APP_ANDROID_ROOT"/assets
fi
if [ -f "$file" ]; then
cp "$file" "$APP_ANDROID_ROOT"/assets
fi
done
rm -rf "$APP_ANDROID_ROOT"/assets/Fonts
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
# copy js
if [ -d "$APP_ROOT/js" ]; then
cp -rf "$APP_ROOT/js" "$APP_ANDROID_ROOT"/assets
fi
if [[ "$buildexternalsfromsource" ]]; then
echo "Building external dependencies from source"

View File

@ -0,0 +1,897 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
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 */; };
15628F6B15F0F5E5000CF24B /* animations in Resources */ = {isa = PBXBuildFile; fileRef = 15628F5C15F0F5E5000CF24B /* animations */; };
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 */; };
2628296215EC6C1B002C4240 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295315EC6C1B002C4240 /* ScriptingCore.cpp */; };
2628296315EC6C1B002C4240 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295515EC6C1B002C4240 /* js_manual_conversions.cpp */; };
2628296415EC6C1B002C4240 /* js_bindings_chipmunk_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295815EC6C1B002C4240 /* js_bindings_chipmunk_manual.cpp */; };
2628296515EC6C1B002C4240 /* js_bindings_chipmunk_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295A15EC6C1B002C4240 /* js_bindings_chipmunk_functions.cpp */; };
2628296615EC6C1B002C4240 /* cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295C15EC6C1B002C4240 /* cocos2dx.cpp */; };
2628296715EC6C1B002C4240 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628295E15EC6C1B002C4240 /* cocos2d_specifics.cpp */; };
2628296815EC6C1B002C4240 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628296015EC6C1B002C4240 /* CCPhysicsSprite.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 */; };
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 */
15426AE915B5733200712A7F /* cocos2dx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2dx.xcodeproj; path = ../../../cocos2dx/proj.ios/cocos2dx.xcodeproj; sourceTree = "<group>"; };
15426FCC15B5743C00712A7F /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
15426FCD15B5743C00712A7F /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = "<group>"; };
15426FCF15B5743C00712A7F /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = "<group>"; };
15426FD015B5743C00712A7F /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = "<group>"; };
15426FD115B5743C00712A7F /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = "<group>"; };
15426FD215B5743C00712A7F /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = "<group>"; };
15426FD315B5743C00712A7F /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = "<group>"; };
15426FD415B5743C00712A7F /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = "<group>"; };
15426FD515B5743C00712A7F /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = "<group>"; };
15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = "<group>"; };
15426FD715B5743C00712A7F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = "<group>"; };
15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = "<group>"; };
15628F5C15F0F5E5000CF24B /* animations */ = {isa = PBXFileReference; lastKnownFileType = folder; name = animations; path = ../Resources/animations; sourceTree = "<group>"; };
15628F5D15F0F5E5000CF24B /* ballbounce.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ballbounce.wav; path = ../Resources/ballbounce.wav; sourceTree = "<group>"; };
15628F5E15F0F5E5000CF24B /* cowbell.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = cowbell.wav; path = ../Resources/cowbell.wav; sourceTree = "<group>"; };
15628F5F15F0F5E5000CF24B /* Cyber Advance!.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "Cyber Advance!.mp3"; path = "../Resources/Cyber Advance!.mp3"; sourceTree = "<group>"; };
15628F6015F0F5E5000CF24B /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Fonts; path = ../Resources/Fonts; sourceTree = "<group>"; };
15628F6115F0F5E5000CF24B /* Images */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Images; path = ../Resources/Images; sourceTree = "<group>"; };
15628F6215F0F5E5000CF24B /* js */ = {isa = PBXFileReference; lastKnownFileType = folder; name = js; path = ../Resources/js; sourceTree = "<group>"; };
15628F6315F0F5E5000CF24B /* oldjs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = oldjs; path = ../Resources/oldjs; sourceTree = "<group>"; };
15628F6415F0F5E5000CF24B /* Particles */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Particles; path = ../Resources/Particles; sourceTree = "<group>"; };
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 = "<group>"; };
15628F6615F0F5E5000CF24B /* tank.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = tank.plist; path = ../Resources/tank.plist; sourceTree = "<group>"; };
15628F6715F0F5E5000CF24B /* tank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank.png; path = ../Resources/tank.png; sourceTree = "<group>"; };
15628F6815F0F5E5000CF24B /* tank.tps */ = {isa = PBXFileReference; lastKnownFileType = file; name = tank.tps; path = ../Resources/tank.tps; sourceTree = "<group>"; };
15628F6915F0F5E5000CF24B /* tank1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tank1.png; path = ../Resources/tank1.png; sourceTree = "<group>"; };
15628F6A15F0F5E5000CF24B /* TileMaps */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TileMaps; path = ../Resources/TileMaps; sourceTree = "<group>"; };
2628295015EC6C1B002C4240 /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = "<group>"; };
2628295115EC6C1B002C4240 /* spidermonkey_specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spidermonkey_specifics.h; sourceTree = "<group>"; };
2628295215EC6C1B002C4240 /* ScriptingCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptingCore.h; sourceTree = "<group>"; };
2628295315EC6C1B002C4240 /* ScriptingCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptingCore.cpp; sourceTree = "<group>"; };
2628295415EC6C1B002C4240 /* js_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_manual_conversions.h; sourceTree = "<group>"; };
2628295515EC6C1B002C4240 /* js_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_manual_conversions.cpp; sourceTree = "<group>"; };
2628295615EC6C1B002C4240 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = "<group>"; };
2628295715EC6C1B002C4240 /* js_bindings_chipmunk_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_manual.hpp; sourceTree = "<group>"; };
2628295815EC6C1B002C4240 /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = "<group>"; };
2628295915EC6C1B002C4240 /* js_bindings_chipmunk_functions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_bindings_chipmunk_functions.hpp; sourceTree = "<group>"; };
2628295A15EC6C1B002C4240 /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = "<group>"; };
2628295B15EC6C1B002C4240 /* cocos2dx.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2dx.hpp; sourceTree = "<group>"; };
2628295C15EC6C1B002C4240 /* cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2dx.cpp; sourceTree = "<group>"; };
2628295D15EC6C1B002C4240 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = "<group>"; };
2628295E15EC6C1B002C4240 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = "<group>"; };
2628295F15EC6C1B002C4240 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = "<group>"; };
2628296015EC6C1B002C4240 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = "<group>"; };
2628297D15EC7196002C4240 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
2628297E15EC7196002C4240 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = "<group>"; };
2628297F15EC7196002C4240 /* chipmunk-docs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "chipmunk-docs.html"; sourceTree = "<group>"; };
2628298215EC7196002C4240 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = "<group>"; };
2628298315EC7196002C4240 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = "<group>"; };
2628298415EC7196002C4240 /* chipmunk_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = "<group>"; };
2628298515EC7196002C4240 /* chipmunk_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_types.h; sourceTree = "<group>"; };
2628298615EC7196002C4240 /* chipmunk_unsafe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_unsafe.h; sourceTree = "<group>"; };
2628298815EC7196002C4240 /* cpConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpConstraint.h; sourceTree = "<group>"; };
2628298915EC7196002C4240 /* cpDampedRotarySpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpDampedRotarySpring.h; sourceTree = "<group>"; };
2628298A15EC7196002C4240 /* cpDampedSpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpDampedSpring.h; sourceTree = "<group>"; };
2628298B15EC7196002C4240 /* cpGearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpGearJoint.h; sourceTree = "<group>"; };
2628298C15EC7196002C4240 /* cpGrooveJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpGrooveJoint.h; sourceTree = "<group>"; };
2628298D15EC7196002C4240 /* cpPinJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPinJoint.h; sourceTree = "<group>"; };
2628298E15EC7196002C4240 /* cpPivotJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPivotJoint.h; sourceTree = "<group>"; };
2628298F15EC7196002C4240 /* cpRatchetJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpRatchetJoint.h; sourceTree = "<group>"; };
2628299015EC7196002C4240 /* cpRotaryLimitJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpRotaryLimitJoint.h; sourceTree = "<group>"; };
2628299115EC7196002C4240 /* cpSimpleMotor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSimpleMotor.h; sourceTree = "<group>"; };
2628299215EC7196002C4240 /* cpSlideJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSlideJoint.h; sourceTree = "<group>"; };
2628299315EC7196002C4240 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = "<group>"; };
2628299415EC7196002C4240 /* cpArbiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpArbiter.h; sourceTree = "<group>"; };
2628299515EC7196002C4240 /* cpBB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpBB.h; sourceTree = "<group>"; };
2628299615EC7196002C4240 /* cpBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpBody.h; sourceTree = "<group>"; };
2628299715EC7196002C4240 /* cpPolyShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpPolyShape.h; sourceTree = "<group>"; };
2628299815EC7196002C4240 /* cpShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpShape.h; sourceTree = "<group>"; };
2628299915EC7196002C4240 /* cpSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSpace.h; sourceTree = "<group>"; };
2628299A15EC7196002C4240 /* cpSpatialIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpSpatialIndex.h; sourceTree = "<group>"; };
2628299B15EC7196002C4240 /* cpVect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = "<group>"; };
2628299C15EC7196002C4240 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
2628299E15EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = "<group>"; };
2628299F15EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = "<group>"; };
262829A115EC7196002C4240 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = "<group>"; };
262829A215EC7196002C4240 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = "<group>"; };
262829A315EC7196002C4240 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
262829A515EC7196002C4240 /* chipmunk.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj; sourceTree = "<group>"; };
262829A615EC7196002C4240 /* chipmunk.vcproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcproj.user; sourceTree = "<group>"; };
262829A715EC7196002C4240 /* chipmunk.vcxproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj; sourceTree = "<group>"; };
262829A815EC7196002C4240 /* chipmunk.vcxproj.filters */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.filters; sourceTree = "<group>"; };
262829A915EC7196002C4240 /* chipmunk.vcxproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = chipmunk.vcxproj.user; sourceTree = "<group>"; };
262829AA15EC7196002C4240 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
262829AC15EC7196002C4240 /* chipmunk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chipmunk.c; sourceTree = "<group>"; };
262829AD15EC7196002C4240 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
262829AF15EC7196002C4240 /* cpConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpConstraint.c; sourceTree = "<group>"; };
262829B015EC7196002C4240 /* cpDampedRotarySpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedRotarySpring.c; sourceTree = "<group>"; };
262829B115EC7196002C4240 /* cpDampedSpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedSpring.c; sourceTree = "<group>"; };
262829B215EC7196002C4240 /* cpGearJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGearJoint.c; sourceTree = "<group>"; };
262829B315EC7196002C4240 /* cpGrooveJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGrooveJoint.c; sourceTree = "<group>"; };
262829B415EC7196002C4240 /* cpPinJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPinJoint.c; sourceTree = "<group>"; };
262829B515EC7196002C4240 /* cpPivotJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPivotJoint.c; sourceTree = "<group>"; };
262829B615EC7196002C4240 /* cpRatchetJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRatchetJoint.c; sourceTree = "<group>"; };
262829B715EC7196002C4240 /* cpRotaryLimitJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRotaryLimitJoint.c; sourceTree = "<group>"; };
262829B815EC7196002C4240 /* cpSimpleMotor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSimpleMotor.c; sourceTree = "<group>"; };
262829B915EC7196002C4240 /* cpSlideJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSlideJoint.c; sourceTree = "<group>"; };
262829BA15EC7196002C4240 /* cpArbiter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpArbiter.c; sourceTree = "<group>"; };
262829BB15EC7196002C4240 /* cpArray.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = "<group>"; };
262829BC15EC7196002C4240 /* cpBB.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBB.c; sourceTree = "<group>"; };
262829BD15EC7196002C4240 /* cpBBTree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBBTree.c; sourceTree = "<group>"; };
262829BE15EC7196002C4240 /* cpBody.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpBody.c; sourceTree = "<group>"; };
262829BF15EC7196002C4240 /* cpCollision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpCollision.c; sourceTree = "<group>"; };
262829C015EC7196002C4240 /* cpHashSet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpHashSet.c; sourceTree = "<group>"; };
262829C115EC7196002C4240 /* cpPolyShape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPolyShape.c; sourceTree = "<group>"; };
262829C215EC7196002C4240 /* cpShape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpShape.c; sourceTree = "<group>"; };
262829C315EC7196002C4240 /* cpSpace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpace.c; sourceTree = "<group>"; };
262829C415EC7196002C4240 /* cpSpaceComponent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceComponent.c; sourceTree = "<group>"; };
262829C515EC7196002C4240 /* cpSpaceHash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = "<group>"; };
262829C615EC7196002C4240 /* cpSpaceQuery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceQuery.c; sourceTree = "<group>"; };
262829C715EC7196002C4240 /* cpSpaceStep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpaceStep.c; sourceTree = "<group>"; };
262829C815EC7196002C4240 /* cpSpatialIndex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSpatialIndex.c; sourceTree = "<group>"; };
262829C915EC7196002C4240 /* cpSweep1D.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSweep1D.c; sourceTree = "<group>"; };
262829CA15EC7196002C4240 /* cpVect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = "<group>"; };
262829CB15EC7196002C4240 /* prime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = "<group>"; };
A922753D1517C094001B78AA /* TestJavascript.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestJavascript.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; };
D45446CD156DE74F00887EB5 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
D45446CE156DE74F00887EB5 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = "<group>"; };
D45446CF156DE74F00887EB5 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
D45446D0156DE74F00887EB5 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; };
D45446D1156DE74F00887EB5 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
D45446D2156DE74F00887EB5 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = "<group>"; };
D45446D6156DE79D00887EB5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
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 = "<group>"; };
D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
/* 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 */
15426AEA15B5733200712A7F /* Products */ = {
isa = PBXGroup;
children = (
15426AF115B5733200712A7F /* libcocos2dx.a */,
);
name = Products;
sourceTree = "<group>";
};
15426FC415B5743C00712A7F /* CocosDenshion */ = {
isa = PBXGroup;
children = (
15426FCB15B5743C00712A7F /* include */,
15426FCE15B5743C00712A7F /* ios */,
);
name = CocosDenshion;
path = ../../../CocosDenshion;
sourceTree = "<group>";
};
15426FCB15B5743C00712A7F /* include */ = {
isa = PBXGroup;
children = (
15426FCC15B5743C00712A7F /* Export.h */,
15426FCD15B5743C00712A7F /* SimpleAudioEngine.h */,
);
path = include;
sourceTree = "<group>";
};
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 = "<group>";
};
15628F5B15F0F5C2000CF24B /* Resources */ = {
isa = PBXGroup;
children = (
15628F5C15F0F5E5000CF24B /* 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 = "<group>";
};
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 = "<group>";
};
2628298015EC7196002C4240 /* include */ = {
isa = PBXGroup;
children = (
2628298115EC7196002C4240 /* chipmunk */,
);
path = include;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
2628299D15EC7196002C4240 /* proj.blackberry */ = {
isa = PBXGroup;
children = (
2628299E15EC7196002C4240 /* .cproject */,
2628299F15EC7196002C4240 /* .project */,
);
path = proj.blackberry;
sourceTree = "<group>";
};
262829A015EC7196002C4240 /* proj.linux */ = {
isa = PBXGroup;
children = (
262829A115EC7196002C4240 /* .cproject */,
262829A215EC7196002C4240 /* .project */,
262829A315EC7196002C4240 /* Makefile */,
);
path = proj.linux;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
A92275321517C094001B78AA = {
isa = PBXGroup;
children = (
15628F5B15F0F5C2000CF24B /* Resources */,
2628297C15EC7196002C4240 /* chipmunk */,
15426AE915B5733200712A7F /* cocos2dx.xcodeproj */,
F2837A9C15B9639100A5707B /* bindings */,
D4545214156E28EF00887EB5 /* Classes */,
15426FC415B5743C00712A7F /* CocosDenshion */,
A92275401517C094001B78AA /* Frameworks */,
D45446CC156DE73F00887EB5 /* ios */,
A922753E1517C094001B78AA /* Products */,
);
sourceTree = "<group>";
};
A922753E1517C094001B78AA /* Products */ = {
isa = PBXGroup;
children = (
A922753D1517C094001B78AA /* TestJavascript.app */,
);
name = Products;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
D4545214156E28EF00887EB5 /* Classes */ = {
isa = PBXGroup;
children = (
D4545215156E28EF00887EB5 /* AppDelegate.cpp */,
D4545216156E28EF00887EB5 /* AppDelegate.h */,
);
name = Classes;
path = ../Classes;
sourceTree = "<group>";
};
F2837A9C15B9639100A5707B /* bindings */ = {
isa = PBXGroup;
children = (
2628295015EC6C1B002C4240 /* uthash.h */,
2628295115EC6C1B002C4240 /* spidermonkey_specifics.h */,
2628295215EC6C1B002C4240 /* ScriptingCore.h */,
2628295315EC6C1B002C4240 /* ScriptingCore.cpp */,
2628295415EC6C1B002C4240 /* js_manual_conversions.h */,
2628295515EC6C1B002C4240 /* js_manual_conversions.cpp */,
2628295615EC6C1B002C4240 /* js_bindings_config.h */,
2628295715EC6C1B002C4240 /* js_bindings_chipmunk_manual.hpp */,
2628295815EC6C1B002C4240 /* js_bindings_chipmunk_manual.cpp */,
2628295915EC6C1B002C4240 /* js_bindings_chipmunk_functions.hpp */,
2628295A15EC6C1B002C4240 /* js_bindings_chipmunk_functions.cpp */,
2628295B15EC6C1B002C4240 /* cocos2dx.hpp */,
2628295C15EC6C1B002C4240 /* cocos2dx.cpp */,
2628295D15EC6C1B002C4240 /* cocos2d_specifics.hpp */,
2628295E15EC6C1B002C4240 /* cocos2d_specifics.cpp */,
2628295F15EC6C1B002C4240 /* CCPhysicsSprite.h */,
2628296015EC6C1B002C4240 /* CCPhysicsSprite.cpp */,
);
name = bindings;
path = ../../../scripting/javascript/bindings;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
A922753C1517C094001B78AA /* TestJavascript */ = {
isa = PBXNativeTarget;
buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "TestJavascript" */;
buildPhases = (
A92275391517C094001B78AA /* Sources */,
A922753A1517C094001B78AA /* Frameworks */,
A922753B1517C094001B78AA /* Resources */,
);
buildRules = (
);
dependencies = (
15426FC215B5741900712A7F /* PBXTargetDependency */,
);
name = TestJavascript;
productName = TestJavascript;
productReference = A922753D1517C094001B78AA /* TestJavascript.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 "TestJavascript" */;
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 /* TestJavascript */,
);
};
/* 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 */,
15628F6B15F0F5E5000CF24B /* animations 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 */,
);
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 */,
2628296215EC6C1B002C4240 /* ScriptingCore.cpp in Sources */,
2628296315EC6C1B002C4240 /* js_manual_conversions.cpp in Sources */,
2628296415EC6C1B002C4240 /* js_bindings_chipmunk_manual.cpp in Sources */,
2628296515EC6C1B002C4240 /* js_bindings_chipmunk_functions.cpp in Sources */,
2628296615EC6C1B002C4240 /* cocos2dx.cpp in Sources */,
2628296715EC6C1B002C4240 /* cocos2d_specifics.cpp in Sources */,
2628296815EC6C1B002C4240 /* CCPhysicsSprite.cpp 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 */,
);
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",
);
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 = TestJavascript;
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",
);
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 = TestJavascript;
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 "TestJavascript" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A92276FE1517C097001B78AA /* Debug */,
A92276FF1517C097001B78AA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "TestJavascript" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A92277011517C097001B78AA /* Debug */,
A92277021517C097001B78AA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = A92275341517C094001B78AA /* Project object */;
}

View File

@ -1 +0,0 @@
04843420d139fde908a5be016f6948adb04401d5

View File

@ -1,83 +0,0 @@
CC = gcc
CXX = g++
TARGET = testjs
CCFLAGS = -Wall -g -O2
CXXFLAGS = -Wall -g -O2
VISIBILITY =
COCOS2DX_PATH = ../../../cocos2dx
JSBINDING_PATH=../../../scripting/javascript/bindings
INCLUDES = -I../ \
-I../Classes \
-I$(JSBINDING_PATH) \
-I$(JSBINDING_PATH)/../spidermonkey-linux/js-1.8.5/js/src \
-I../../../CocosDenshion/include \
-I$(COCOS2DX_PATH) \
-I$(COCOS2DX_PATH)/cocoa \
-I$(COCOS2DX_PATH)/include \
-I$(COCOS2DX_PATH)/platform \
-I$(COCOS2DX_PATH)/platform/linux \
-I$(COCOS2DX_PATH)/platform/third_party/linux \
-I$(COCOS2DX_PATH)/platform/third_party/linux/libfreetype2 \
-I$(COCOS2DX_PATH)/platform/third_party/linux/glew-1.7.0/glew-1.7.0/include/ \
-I$(COCOS2DX_PATH)/platform/third_party/linux/libxml2 \
-I$(COCOS2DX_PATH)/platform/third_party/linux/libjpeg \
-I$(COCOS2DX_PATH)/kazmath/include \
DEFINES = -DLINUX
OBJECTS = ./main.o \
../Classes/AppDelegate.o \
$(JSBINDING_PATH)/ScriptingCore.o \
$(JSBINDING_PATH)/cocos2d_generated.o \
$(JSBINDING_PATH)/cocos2d_manual_bindings.o \
$(JSBINDING_PATH)/cocos_denshion_generated.o \
# ../Classes/simple_class.o \
# ../Classes/simple_native_generated.o
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
STATICLIBS_DIR = ../../../cocos2dx/platform/third_party/linux/libraries/lib64
else
STATICLIBS_DIR = ../../../cocos2dx/platform/third_party/linux/libraries
endif
STATICLIBS =
STATICLIBS += $(STATICLIBS_DIR)/libtiff.a \
$(JSBINDING_PATH)/../spidermonkey-linux/js-1.8.5/js/src/libjs_static.a \
ifeq ($(LBITS),64)
SHAREDLIBS_DIR = ../../../CocosDenshion/third_party/fmod/lib64/api/lib
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex64
else
SHAREDLIBS_DIR = ../../../CocosDenshion/third_party/fmod/api/lib
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
endif
SHAREDLIBS += -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../../lib/linux/Debug/
SHAREDLIBS += -lglfw -lcurl
#SHAREDLIBS += -lGLEW
SHAREDLIBS += -Wl,-rpath,../$(SHAREDLIBS_DIR)
SHAREDLIBS += -Wl,-rpath,../../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
SHAREDLIBS += -L../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
#$(shell ../../build-linux.sh $<)
BIN_DIR=bin
####### Build rules
$(TARGET): $(OBJECTS)
test -d $(BIN_DIR) || mkdir $(BIN_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(BIN_DIR)/$(TARGET) $(SHAREDLIBS) $(STATICLIBS)
####### Compile
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
%.o: %.c
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET) core
rm -r $(BIN_DIR)

View File

@ -1,35 +0,0 @@
#include "main.h"
#include "../Classes/AppDelegate.h"
#include "cocos2d.h"
#include "CCEGLView.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string>
USING_NS_CC;
// 500 is enough?
#define MAXPATHLEN 500
int main(int argc, char **argv)
{
// get application path
int length;
char fullpath[MAXPATHLEN];
length = readlink("/proc/self/exe", fullpath, sizeof(fullpath));
fullpath[length] = '\0';
std::string resourcePath = fullpath;
resourcePath = resourcePath.substr(0, resourcePath.find_last_of("/"));
resourcePath += "/../../Resources/";
// create the application instance
AppDelegate app;
CCApplication::sharedApplication()->setResourceRootPath(resourcePath.c_str());
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setFrameSize(480, 320);
return CCApplication::sharedApplication()->run();
}

View File

@ -1,7 +0,0 @@
#ifndef __MAIN_H__
#define __MAIN_H__
// C RunTime Header Files
#include "CCStdC.h"
#endif // __MAIN_H__

View File

@ -136,8 +136,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;..\Classes;&quot;$(SolutionDir)scripting\javascript\spidermonkey-win32\include&quot;;&quot;$(SolutionDir)scripting\javascript\bindings&quot;;&quot;$(SolutionDir)cocos2dx&quot;;&quot;$(SolutionDir)cocos2dx\include&quot;;&quot;$(SolutionDir)cocos2dx\kazmath\include&quot;;&quot;$(SolutionDir)cocos2dx\platform\win32&quot;;&quot;$(SolutionDir)cocos2dx\platform\third_party\win32&quot;;&quot;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES&quot;;&quot;$(SolutionDir)CocosDenshion\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories=".;..\Classes;&quot;$(SolutionDir)scripting\javascript\spidermonkey-win32\include&quot;;&quot;$(SolutionDir)scripting\javascript\bindings&quot;;&quot;$(SolutionDir)external\chipmunk\include\chipmunk&quot;;&quot;$(SolutionDir)cocos2dx&quot;;&quot;$(SolutionDir)cocos2dx\include&quot;;&quot;$(SolutionDir)cocos2dx\kazmath\include&quot;;&quot;$(SolutionDir)cocos2dx\platform\win32&quot;;&quot;$(SolutionDir)cocos2dx\platform\third_party\win32&quot;;&quot;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES&quot;;&quot;$(SolutionDir)CocosDenshion\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;NDEBUG;COCOS2D_JAVASCRIPT;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
ExceptionHandling="0"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@ -160,7 +160,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcocos2d.lib opengl32.lib glew32.lib libCocosDenshion.lib js.lib"
AdditionalDependencies="libcocos2d.lib libCocosDenshion.lib libchipmunk.lib mozjs.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="$(OutDir)"
SubSystem="2"
@ -264,18 +264,6 @@
Name="resource"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest"
>
<File
RelativePath="..\Resources\CloseNormal.png"
>
</File>
<File
RelativePath="..\Resources\CloseSelected.png"
>
</File>
<File
RelativePath="..\Resources\HelloWorld.png"
>
</File>
<File
RelativePath=".\res\testjs.ico"
>

View File

@ -63,7 +63,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)scripting\javascript\bindings;$(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)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(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)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>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)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -85,7 +85,7 @@ xcopy /Y /Q "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(O
</Command>
</PreLinkEvent>
<Link>
<AdditionalDependencies>libcocos2d.lib;libCocosDenshion.lib;js.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libcocos2d.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@ -106,7 +106,7 @@ xcopy /Y /Q "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(O
<ProxyFileName>testjs_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>.;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)scripting\javascript\bindings;$(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)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(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)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@ -129,32 +129,38 @@ xcopy /Y /Q "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(O
</Command>
</PreLinkEvent>
<Link>
<AdditionalDependencies>libcocos2d.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;js.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libcocos2d.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_generated.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_manual_bindings.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos_denshion_generated.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\CCPhysicsSprite.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2dx.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_specifics.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_manual_conversions.cpp" />
<ClCompile Include="..\..\..\scripting\javascript\bindings\ScriptingCore.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="..\Classes\AppDelegate.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2d_generated.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos_denshion_generated.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\CCPhysicsSprite.h" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2dx.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2d_specifics.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.hpp" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_config.h" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_manual_conversions.h" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\ScriptingCore.h" />
<ClInclude Include="..\..\..\scripting\javascript\bindings\spidermonkey_specifics.h" />
<ClInclude Include="main.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="..\Classes\AppDelegate.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\Resources\CloseNormal.png" />
<None Include="..\Resources\CloseSelected.png" />
<None Include="..\Resources\HelloWorld.png" />
<None Include="res\testjs.ico" />
</ItemGroup>
<ItemGroup>

View File

@ -16,35 +16,35 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_generated.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_manual_bindings.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos_denshion_generated.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\ScriptingCore.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>win32</Filter>
</ClCompile>
<ClCompile Include="..\Classes\AppDelegate.cpp">
<Filter>Classes</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\CCPhysicsSprite.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2d_specifics.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\cocos2dx.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\js_manual_conversions.cpp">
<Filter>bindings</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scripting\javascript\bindings\ScriptingCore.cpp">
<Filter>bindings</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2d_generated.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos_denshion_generated.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\ScriptingCore.h">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="main.h">
<Filter>win32</Filter>
</ClInclude>
@ -54,17 +54,35 @@
<ClInclude Include="..\Classes\AppDelegate.h">
<Filter>Classes</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\CCPhysicsSprite.h">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2d_specifics.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\cocos2dx.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.hpp">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_config.h">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_manual_conversions.h">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\ScriptingCore.h">
<Filter>bindings</Filter>
</ClInclude>
<ClInclude Include="..\..\..\scripting\javascript\bindings\spidermonkey_specifics.h">
<Filter>bindings</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Resources\CloseNormal.png">
<Filter>resource</Filter>
</None>
<None Include="..\Resources\CloseSelected.png">
<Filter>resource</Filter>
</None>
<None Include="..\Resources\HelloWorld.png">
<Filter>resource</Filter>
</None>
<None Include="res\testjs.ico">
<Filter>resource</Filter>
</None>

View File

@ -42,6 +42,8 @@ public:
return pInstance;
};
virtual ccScriptType getScriptType() { return kScriptTypeJavascript; };
lua_State* getLuaState(void) { return NULL; }
/**

View File

@ -1 +0,0 @@
d19a3f7a6e0414d685adcb4cd1e49dbc6eb62451

View File

@ -1 +1 @@
dee2cc34e7eecd1a44c4b1db741bf703e827e426
1add31bd5868e40261e6fc1706c097108a551e98

View File

@ -1 +1 @@
8cdc0687624980d6eea5a0df6d085c8393318200
7432280bb264dae5297eec03a32592aa515f48d6

View File

@ -201,13 +201,13 @@ int CCLuaEngine::executeFunctionByHandler(int nHandler, int numArgs)
}
}
int CCLuaEngine::executeFunctionWithIntegerData(int nHandler, int data)
int CCLuaEngine::executeFunctionWithIntegerData(int nHandler, int data, CCNode *self)
{
lua_pushinteger(m_state, data);
return executeFunctionByHandler(nHandler, 1);
}
int CCLuaEngine::executeFunctionWithFloatData(int nHandler, float data)
int CCLuaEngine::executeFunctionWithFloatData(int nHandler, float data, CCNode *self)
{
lua_pushnumber(m_state, data);
return executeFunctionByHandler(nHandler, 1);
@ -259,7 +259,7 @@ int CCLuaEngine::executeTouchEvent(int nHandler, int eventType, CCTouch *pTouch)
return executeFunctionByHandler(nHandler, 3);
}
int CCLuaEngine::executeTouchesEvent(int nHandler, int eventType, CCSet *pTouches)
int CCLuaEngine::executeTouchesEvent(int nHandler, int eventType, CCSet *pTouches, CCNode *self)
{
lua_pushinteger(m_state, eventType);
lua_newtable(m_state);
@ -282,9 +282,9 @@ int CCLuaEngine::executeTouchesEvent(int nHandler, int eventType, CCSet *pTouche
return executeFunctionByHandler(nHandler, 2);
}
int CCLuaEngine::executeSchedule(int nHandler, float dt)
int CCLuaEngine::executeSchedule(int nHandler, float dt, CCNode *self)
{
return executeFunctionWithFloatData(nHandler, dt);
return executeFunctionWithFloatData(nHandler, dt, self);
}
void CCLuaEngine::addLuaLoader(lua_CFunction func)

View File

@ -43,7 +43,7 @@ class CCLuaEngine : public CCScriptEngineProtocol
{
public:
~CCLuaEngine();
virtual ccScriptType getScriptType() { return kScriptTypeLua; };
/**
@brief Method used to get a pointer to the lua_State that the script module is attached to.
@return A pointer to the lua_State that the script module is attached to.
@ -98,8 +98,8 @@ public:
@return The integer value returned from the script function.
*/
virtual int executeFunctionByHandler(int nHandler, int numArgs = 0);
virtual int executeFunctionWithIntegerData(int nHandler, int data);
virtual int executeFunctionWithFloatData(int nHandler, float data);
virtual int executeFunctionWithIntegerData(int nHandler, int data, cocos2d::CCNode *self);
virtual int executeFunctionWithFloatData(int nHandler, float data, cocos2d::CCNode *self);
virtual int executeFunctionWithBooleanData(int nHandler, bool data);
virtual int executeFunctionWithCCObject(int nHandler, CCObject* pObject, const char* typeName);
virtual int pushIntegerToLuaStack(int data);
@ -109,10 +109,10 @@ public:
// functions for excute touch event
virtual int executeTouchEvent(int nHandler, int eventType, cocos2d::CCTouch *pTouch);
virtual int executeTouchesEvent(int nHandler, int eventType, cocos2d::CCSet *pTouches);
virtual int executeTouchesEvent(int nHandler, int eventType, cocos2d::CCSet *pTouches, cocos2d::CCNode *self);
// execute a schedule function
virtual int executeSchedule(int nHandler, float dt);
virtual int executeSchedule(int nHandler, float dt, cocos2d::CCNode *self);
// Add lua loader, now it is used on android
virtual void addLuaLoader(lua_CFunction func);